Add support for the X86 'l' constraint.
[oota-llvm.git] / test / CodeGen / X86 / inline-asm.ll
1 ; RUN: llc < %s -march=x86
2
3 define i32 @test1() nounwind {
4         ; Dest is AX, dest type = i32.
5         %tmp4 = call i32 asm sideeffect "FROB $0", "={ax}"()
6         ret i32 %tmp4
7 }
8
9 define void @test2(i32 %V) nounwind {
10         ; input is AX, in type = i32.
11         call void asm sideeffect "FROB $0", "{ax}"(i32 %V)
12         ret void
13 }
14
15 define void @test3() nounwind {
16         ; FP constant as a memory operand.
17         tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000)
18         ret void
19 }
20
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 }
26
27 ; rdar://9738585
28 define i32 @test5() nounwind {
29 entry:
30   %0 = tail call i32 asm "test", "=l,~{dirflag},~{fpsr},~{flags}"() nounwind
31   ret i32 0
32 }