xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/X86/inline-asm-q-regs.ll (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc; RUN: llc < %s -march=x86-64 -mattr=+avx -no-integrated-as
2f4a2713aSLionel Sambuc; rdar://7066579
3f4a2713aSLionel Sambuc
4f4a2713aSLionel Sambuc	%0 = type { i64, i64, i64, i64, i64 }		; type %0
5f4a2713aSLionel Sambuc
6f4a2713aSLionel Sambucdefine void @test1() nounwind {
7f4a2713aSLionel Sambucentry:
8f4a2713aSLionel Sambuc	%asmtmp = call %0 asm sideeffect "mov    %cr0, $0       \0Amov    %cr2, $1       \0Amov    %cr3, $2       \0Amov    %cr4, $3       \0Amov    %cr8, $0       \0A", "=q,=q,=q,=q,=q,~{dirflag},~{fpsr},~{flags}"() nounwind		; <%0> [#uses=0]
9f4a2713aSLionel Sambuc	ret void
10f4a2713aSLionel Sambuc}
11f4a2713aSLionel Sambuc
12f4a2713aSLionel Sambuc; PR9602
13f4a2713aSLionel Sambucdefine void @test2(float %tmp) nounwind {
14f4a2713aSLionel Sambuc  call void asm sideeffect "$0", "q"(float %tmp) nounwind
15f4a2713aSLionel Sambuc  call void asm sideeffect "$0", "Q"(float %tmp) nounwind
16f4a2713aSLionel Sambuc  ret void
17f4a2713aSLionel Sambuc}
18f4a2713aSLionel Sambuc
19f4a2713aSLionel Sambucdefine void @test3(double %tmp) nounwind {
20f4a2713aSLionel Sambuc  call void asm sideeffect "$0", "q"(double %tmp) nounwind
21f4a2713aSLionel Sambuc  ret void
22f4a2713aSLionel Sambuc}
23f4a2713aSLionel Sambuc
24f4a2713aSLionel Sambuc; rdar://10392864
25f4a2713aSLionel Sambucdefine void @test4(i8 signext %val, i8 signext %a, i8 signext %b, i8 signext %c, i8 signext %d) nounwind {
26f4a2713aSLionel Sambucentry:
27f4a2713aSLionel Sambuc  %0 = tail call { i8, i8, i8, i8, i8 } asm "foo $1, $2, $3, $4, $1\0Axchgb ${0:b}, ${0:h}", "=q,={ax},={bx},={cx},={dx},0,1,2,3,4,~{dirflag},~{fpsr},~{flags}"(i8 %val, i8 %a, i8 %b, i8 %c, i8 %d) nounwind
28f4a2713aSLionel Sambuc  ret void
29f4a2713aSLionel Sambuc}
30f4a2713aSLionel Sambuc
31f4a2713aSLionel Sambuc; rdar://10614894
32f4a2713aSLionel Sambucdefine <8 x float> @test5(<8 x float> %a, <8 x float> %b) nounwind {
33f4a2713aSLionel Sambucentry:
34f4a2713aSLionel Sambuc  %0 = tail call <8 x float> asm "vperm2f128 $3, $2, $1, $0", "=x,x,x,i,~{dirflag},~{fpsr},~{flags}"(<8 x float> %a, <8 x float> %b, i32 16) nounwind
35f4a2713aSLionel Sambuc  ret <8 x float> %0
36f4a2713aSLionel Sambuc}
37f4a2713aSLionel Sambuc
38