diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-03 08:32:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-03 08:32:32 +0000 |
commit | cc1cde9c579a747e6374ca90828a39c0cb075646 (patch) | |
tree | 9ac9bf45c5fd0d1e5bf3b4d7823aceaa5e7fcca2 /clang/test/CodeGen/asm.c | |
parent | 97de21f754eafe54864a4a1eb32d77e2ae402424 (diff) | |
download | bcm5719-llvm-cc1cde9c579a747e6374ca90828a39c0cb075646.tar.gz bcm5719-llvm-cc1cde9c579a747e6374ca90828a39c0cb075646.zip |
allow references to the larger value in a tied constraint
from the asm string, but reject references to the smaller one.
llvm-svn: 70679
Diffstat (limited to 'clang/test/CodeGen/asm.c')
-rw-r--r-- | clang/test/CodeGen/asm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c index d7309149ebb..8aa392aa807 100644 --- a/clang/test/CodeGen/asm.c +++ b/clang/test/CodeGen/asm.c @@ -69,11 +69,22 @@ unsigned char t12(unsigned input) { return output; } +unsigned char t13(unsigned input) { + unsigned char output; + __asm__("xyz %1" + : "=a" (output) + : "0" (input)); + return output; +} + +// bitfield destination of an asm. struct S { int a : 4; }; -void test13(struct S *P) { +void t14(struct S *P) { __asm__("abc %0" : "=r"(P->a) ); } + + |