blob: 02988fcc29f317ee1fbb34bc5f40c494dc99e7a3 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | llc -march=x86
2
Evan Cheng4fb2c0f2008-09-22 23:57:37 +00003define i32 @test1() nounwind {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004 ; Dest is AX, dest type = i32.
5 %tmp4 = call i32 asm sideeffect "FROB $0", "={ax}"()
6 ret i32 %tmp4
7}
8
Evan Cheng4fb2c0f2008-09-22 23:57:37 +00009define void @test2(i32 %V) nounwind {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010 ; input is AX, in type = i32.
11 call void asm sideeffect "FROB $0", "{ax}"(i32 %V)
12 ret void
13}
14
Evan Cheng4fb2c0f2008-09-22 23:57:37 +000015define void @test3() nounwind {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016 ; FP constant as a memory operand.
17 tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000)
18 ret void
19}
20
Evan Cheng4fb2c0f2008-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}