brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · adf331b Raw
77 lines · plain
1; RUN: llc < %s -mtriple=i686-- -no-integrated-as2 3define i32 @test1() nounwind {4	; Dest is AX, dest type = i32.5        %tmp4 = call i32 asm sideeffect "FROB $0", "={ax}"()6        ret i32 %tmp47}8 9define void @test2(i32 %V) nounwind {10	; input is AX, in type = i32.11        call void asm sideeffect "FROB $0", "{ax}"(i32 %V)12        ret void13}14 15define void @test3() nounwind {16        ; FP constant as a memory operand.17        tail call void asm sideeffect "frob $0", "m"( float 0x41E0000000000000)18        ret void19}20 21define void @test4() nounwind {22       ; J means a constant in range 0 to 63.23       tail call void asm sideeffect "bork $0", "J"(i32 37) nounwind24       ret void25}26 27; rdar://973858528define i32 @test5() nounwind {29entry:30  %0 = tail call i32 asm "test", "=l,~{dirflag},~{fpsr},~{flags}"() nounwind31  ret i32 032}33 34; rdar://9777108 PR1035235define void @test6(i1 zeroext %desired) nounwind {36entry:37  tail call void asm sideeffect "foo $0", "q,~{dirflag},~{fpsr},~{flags}"(i1 %desired) nounwind38  ret void39}40 41define void @test7(i1 zeroext %desired, ptr %p) nounwind {42entry:43  %0 = tail call i8 asm sideeffect "xchg $0, $1", "=r,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %p, i1 %desired) nounwind44  ret void45}46 47; <rdar://problem/11542429>48; The constrained GR32_ABCD register class of the 'q' constraint requires49; special handling after the preceding outputs used up eax-edx.50define void @constrain_abcd(ptr %h) nounwind ssp {51entry:52  %0 = call { i32, i32, i32, i32, i32 } asm sideeffect "", "=&r,=&r,=&r,=&r,=&q,r,~{ecx},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %h) nounwind53  ret void54}55 56; Mix normal and EC defs of the same register.57define i32 @pr14376() nounwind noinline {58entry:59  %asm = tail call i32 asm sideeffect "", "={ax},i,~{eax},~{flags},~{rax}"(i64 61) nounwind60  ret i32 %asm61}62 63@test8_v = global i32 4264 65define void @test8() {66  call void asm sideeffect "${0:P}", "i"( ptr @test8_v )67  ret void68}69 70define void @test9() {71  call void asm sideeffect "${0:P}", "X"( ptr blockaddress(@test9, %bb) )72  br label %bb73 74bb:75  ret void76}77