blob: 02988fcc29f317ee1fbb34bc5f40c494dc99e7a3 [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
Evan Cheng364091e2008-09-22 23:57:37 +00003define i32 @test1() nounwind {
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
Evan Cheng364091e2008-09-22 23:57:37 +00009define void @test2(i32 %V) nounwind {
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
Evan Cheng364091e2008-09-22 23:57:37 +000015define void @test3() nounwind {
Chris Lattner7754d2f2007-03-08 22:33:06 +000016 ; FP constant as a memory operand.
17 tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000)
18 ret void
19}
20
Evan Cheng364091e2008-09-22 23:57:37 +000021define void @test4() nounwind {
22 ; J means a constant in range 0 to 63.
23 tail call void asm sideeffect "bork $0", "J"(i32 37) nounwind
24 ret void
25}