summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-08-24 22:33:12 +0000
committerDale Johannesen <dalej@apple.com>2010-08-24 22:33:12 +0000
commit46742a4771e96e598aa4ec9e67f4946d774e81d6 (patch)
treec9e55c6cea570f20c9a87e5dd603e7f60306d5b1 /clang/test/CodeGen
parent576048657ecee4548683de12e28152cb5262bcd8 (diff)
downloadbcm5719-llvm-46742a4771e96e598aa4ec9e67f4946d774e81d6.tar.gz
bcm5719-llvm-46742a4771e96e598aa4ec9e67f4946d774e81d6.zip
Add some missing X86-specific asm constraint letters, and fix
some bugs in setting allowsRegister on the ones there. 8348447. llvm-svn: 111980
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/asm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c
index 50770288786..eb112858718 100644
--- a/clang/test/CodeGen/asm.c
+++ b/clang/test/CodeGen/asm.c
@@ -168,3 +168,25 @@ float t21(long double x) {
// CHECK: call x86_fp80 asm sideeffect "frndint"
// CHECK-NEXT: fptrunc x86_fp80 {{.*}} to float
}
+
+// <rdar://problem/8348447> - accept 'l' constraint
+unsigned char t22(unsigned char a, unsigned char b) {
+ unsigned int la = a;
+ unsigned int lb = b;
+ unsigned int bigres;
+ unsigned char res;
+ __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) :
+ "edx", "cc");
+ res = bigres;
+ return res;
+}
+
+// <rdar://problem/8348447> - accept 'l' constraint
+unsigned char t23(unsigned char a, unsigned char b) {
+ unsigned int la = a;
+ unsigned int lb = b;
+ unsigned char res;
+ __asm__ ("0:\n1:\n" : [res] "=la"(res) : [la] "0"(la), [lb] "c"(lb) :
+ "edx", "cc");
+ return res;
+}
OpenPOWER on IntegriCloud