blob: 54dfe76478ae36d5a15dc4452bab2fa2ff94a387 [file] [log] [blame]
Chris Lattner7754d2f2007-03-08 22:33:06 +00001; RUN: llvm-as < %s | llc -march=x86
Chris Lattner5591c512006-06-08 18:20:13 +00002
Chris Lattner7754d2f2007-03-08 22:33:06 +00003define i32 @test1() {
Chris Lattner5591c512006-06-08 18:20:13 +00004 ; Dest is AX, dest type = i32.
Chris Lattner7754d2f2007-03-08 22:33:06 +00005 %tmp4 = call i32 asm sideeffect "FROB $0", "={ax}"()
6 ret i32 %tmp4
Chris Lattner5591c512006-06-08 18:20:13 +00007}
8
Chris Lattner7754d2f2007-03-08 22:33:06 +00009define void @test2(i32 %V) {
Chris Lattner586e6532006-06-08 18:26:48 +000010 ; input is AX, in type = i32.
Chris Lattner7754d2f2007-03-08 22:33:06 +000011 call void asm sideeffect "FROB $0", "{ax}"(i32 %V)
Chris Lattner586e6532006-06-08 18:26:48 +000012 ret void
13}
14
Chris Lattner7754d2f2007-03-08 22:33:06 +000015define void @test3() {
16 ; FP constant as a memory operand.
17 tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000)
18 ret void
19}
20
21