2010-11-03 07:03:52 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -triple x86_64 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
|
|
|
|
int mout0;
|
|
|
|
int min1;
|
|
|
|
int marray[2];
|
|
|
|
double dout0;
|
|
|
|
double din1;
|
|
|
|
|
|
|
|
// CHECK: @single_R
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_R(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "=R,R[[CLOBBERS:[a-zA-Z0-9@%{},~_ ]*\"]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=R" (mout0) : "R" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_q
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_q(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "=q,q[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=q" (mout0) : "q" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_Q
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_Q(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "=Q,Q[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=Q" (mout0) : "Q" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_a
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_a(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={ax},{ax}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=a" (mout0) : "a" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_b
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_b(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={bx},{bx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=b" (mout0) : "b" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_c
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_c(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={cx},{cx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=c" (mout0) : "c" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_d
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_d(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={dx},{dx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=d" (mout0) : "d" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_S
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_S(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={si},{si}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=S" (mout0) : "S" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_D
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_D(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "={di},{di}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=D" (mout0) : "D" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_A
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_A(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "=A,A[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=A" (mout0) : "A" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_f
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_f(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_t
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_t(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_u
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_u(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_y
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_y(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: call double asm "foo $1,$0", "=y,y[[CLOBBERS]](double {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=y" (dout0) : "y" (din1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_x
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_x(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// CHECK: asm "foo $1,$0", "=x,x[[CLOBBERS]](double {{[a-zA-Z0-9@%]+}})
|
|
|
|
asm("foo %1,%0" : "=x" (dout0) : "x" (din1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_Y
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_Y(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536
llvm-svn: 242665
2015-07-20 20:08:00 +08:00
|
|
|
// 'Y' constraint currently broken.
|
2010-11-03 07:03:52 +08:00
|
|
|
//asm("foo %1,%0" : "=Y0" (mout0) : "Y0" (min1));
|
|
|
|
//asm("foo %1,%0" : "=Yz" (mout0) : "Yz" (min1));
|
|
|
|
//asm("foo %1,%0" : "=Yt" (mout0) : "Yt" (min1));
|
|
|
|
//asm("foo %1,%0" : "=Yi" (mout0) : "Yi" (min1));
|
|
|
|
//asm("foo %1,%0" : "=Ym" (mout0) : "Ym" (min1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_I
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_I(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,I[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "I" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_J
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_J(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,J[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "J" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_K
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_K(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,K[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "K" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_L
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_L(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,L[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 255)
|
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536
llvm-svn: 242665
2015-07-20 20:08:00 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "L" (0xff));
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,L[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 65535)
|
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536
llvm-svn: 242665
2015-07-20 20:08:00 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "L" (0xffff));
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,L[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 -1)
|
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536
llvm-svn: 242665
2015-07-20 20:08:00 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "L" (0xffffffff));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_M
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_M(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,M[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "M" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_N
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_N(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,N[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "N" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_G
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_G(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,G[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "G" (1.0));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_C
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_C(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,C[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "C" (1.0));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_e
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_e(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,e[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "e" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @single_Z
|
2022-02-16 05:06:01 +08:00
|
|
|
void single_Z(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*m,Z[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2010-11-03 07:03:52 +08:00
|
|
|
asm("foo %1,%0" : "=m" (mout0) : "Z" (1));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_R
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_R(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|R|m,r|R|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,R,m" (mout0) : "r,R,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_q
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_q(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|q|m,r|q|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,q,m" (mout0) : "r,q,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_Q
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_Q(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|Q|m,r|Q|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,Q,m" (mout0) : "r,Q,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_a
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_a(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{ax}|m,r|{ax}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,a,m" (mout0) : "r,a,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_b
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_b(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{bx}|m,r|{bx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,b,m" (mout0) : "r,b,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_c
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_c(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{cx}|m,r|{cx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,c,m" (mout0) : "r,c,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_d
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_d(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{dx}|m,r|{dx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,d,m" (mout0) : "r,d,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_S
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_S(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{si}|m,r|{si}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,S,m" (mout0) : "r,S,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_D
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_D(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|{di}|m,r|{di}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,D,m" (mout0) : "r,D,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_A
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_A(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|A|m,r|A|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,A,m" (mout0) : "r,A,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_f
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_f(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_t
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_t(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_u
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_u(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
//FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_y
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_y(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|y|m,r|y|m[[CLOBBERS]](double* elementtype(double) @dout0, double {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,y,m" (dout0) : "r,y,m" (din1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_x
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_x(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|x|m,r|x|m[[CLOBBERS]](double* elementtype(double) @dout0, double {{[a-zA-Z0-9@%]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,x,m" (dout0) : "r,x,m" (din1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_Y
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_Y0(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
|
|
|
// Y constraint currently broken.
|
2011-03-25 02:51:57 +08:00
|
|
|
//asm("foo %1,%0" : "=r,Y0,m" (mout0) : "r,Y0,m" (min1));
|
|
|
|
//asm("foo %1,%0" : "=r,Yz,m" (mout0) : "r,Yz,m" (min1));
|
|
|
|
//asm("foo %1,%0" : "=r,Yt,m" (mout0) : "r,Yt,m" (min1));
|
|
|
|
//asm("foo %1,%0" : "=r,Yi,m" (mout0) : "r,Yi,m" (min1));
|
|
|
|
//asm("foo %1,%0" : "=r,Ym,m" (mout0) : "r,Ym,m" (min1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_I
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_I(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|I|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,I,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_J
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_J(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|J|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,J,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_K
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_K(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|K|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,K,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_L
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_L(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|L|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,L,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_M
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_M(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|M|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,M,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_N
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_N(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|N|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,N,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_G
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_G(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|G|m[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,G,m" (1.0));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_C
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_C(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|C|m[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,C,m" (1.0));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_e
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_e(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|e|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,e,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @multi_Z
|
2022-02-16 05:06:01 +08:00
|
|
|
void multi_Z(void)
|
2010-11-03 07:03:52 +08:00
|
|
|
{
|
2022-01-05 22:16:24 +08:00
|
|
|
// CHECK: asm "foo $1,$0", "=*r|m|m,r|Z|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
|
2011-03-25 02:51:57 +08:00
|
|
|
asm("foo %1,%0" : "=r,m,m" (mout0) : "r,Z,m" (1));
|
2010-11-03 07:03:52 +08:00
|
|
|
}
|