Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 2 | |
Evan Cheng | 4fb2c0f | 2008-09-22 23:57:37 +0000 | [diff] [blame] | 3 | define i32 @test1() nounwind { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 4 | ; Dest is AX, dest type = i32. |
| 5 | %tmp4 = call i32 asm sideeffect "FROB $0", "={ax}"() |
| 6 | ret i32 %tmp4 |
| 7 | } |
| 8 | |
Evan Cheng | 4fb2c0f | 2008-09-22 23:57:37 +0000 | [diff] [blame] | 9 | define void @test2(i32 %V) nounwind { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 10 | ; input is AX, in type = i32. |
| 11 | call void asm sideeffect "FROB $0", "{ax}"(i32 %V) |
| 12 | ret void |
| 13 | } |
| 14 | |
Evan Cheng | 4fb2c0f | 2008-09-22 23:57:37 +0000 | [diff] [blame] | 15 | define void @test3() nounwind { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 16 | ; FP constant as a memory operand. |
| 17 | tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000) |
| 18 | ret void |
| 19 | } |
| 20 | |
Evan Cheng | 4fb2c0f | 2008-09-22 23:57:37 +0000 | [diff] [blame] | 21 | define 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 | } |