summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/asm.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-07-07 23:11:01 +0000
committerEric Christopher <echristo@apple.com>2011-07-07 23:11:01 +0000
commitf7d303c541ee0815e99e2930bdfd1b7235ff0ac5 (patch)
tree3804258b8d4d7e36edc8f618d2f4d1f674fb53d0 /clang/test/CodeGen/asm.c
parentc6466fc9abfa08c31009cc93f1b7701a4f2f84ed (diff)
downloadbcm5719-llvm-f7d303c541ee0815e99e2930bdfd1b7235ff0ac5.tar.gz
bcm5719-llvm-f7d303c541ee0815e99e2930bdfd1b7235ff0ac5.zip
Add a testcase for the previous commit and update an existing test for an
extra register. Part of PR10299 and rdar://9740322 llvm-svn: 134657
Diffstat (limited to 'clang/test/CodeGen/asm.c')
-rw-r--r--clang/test/CodeGen/asm.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c
index eb112858718..7199f09e1a3 100644
--- a/clang/test/CodeGen/asm.c
+++ b/clang/test/CodeGen/asm.c
@@ -49,10 +49,10 @@ unsigned t9(unsigned int a) {
// PR3908
void t10(int r) {
__asm__("PR3908 %[lf] %[xx] %[li] %[r]" : [r] "+r" (r) : [lf] "mx" (0), [li] "mr" (0), [xx] "x" ((double)(0)));
-
+
// CHECK: @t10(
// CHECK:PR3908 $1 $3 $2 $0
-}
+}
// PR3373
@@ -119,7 +119,7 @@ int t16() {
void t17() {
int i;
__asm__ ( "nop": "=m"(i));
-
+
// CHECK: @t17()
// CHECK: call void asm "nop", "=*m,
}
@@ -127,7 +127,7 @@ void t17() {
// <rdar://problem/6841383>
int t18(unsigned data) {
int a, b;
-
+
asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
return a + b;
// CHECK: t18(i32
@@ -140,7 +140,7 @@ int t18(unsigned data) {
// PR6780
int t19(unsigned data) {
int a, b;
-
+
asm("x{abc|def|ghi}z" :"=r"(a): "r"(data));
return a + b;
// CHECK: t19(i32
@@ -153,7 +153,7 @@ double t20(double x) {
register long double result;
__asm __volatile ("frndint" : "=t" (result) : "0" (x));
return result;
-
+
// CHECK: @t20
// CHECK: fpext double {{.*}} to x86_fp80
// CHECK-NEXT: call x86_fp80 asm sideeffect "frndint"
@@ -190,3 +190,17 @@ unsigned char t23(unsigned char a, unsigned char b) {
"edx", "cc");
return res;
}
+
+
+// PR10299 - fpsr, fpcr
+void test(void)
+{
+ __asm__ __volatile__( \
+ "finit" \
+ : \
+ : \
+ :"st","st(1)","st(2)","st(3)", \
+ "st(4)","st(5)","st(6)","st(7)", \
+ "fpsr","fpcr" \
+ );
+}
OpenPOWER on IntegriCloud