aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/asm.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-03 08:32:32 +0000
committerChris Lattner <sabre@nondot.org>2009-05-03 08:32:32 +0000
commit3351f1145aa91ddd8022fcd3ca16c219db9e8277 (patch)
tree30c654afec1843001d0a3ad1fa447d6269a31ead /test/CodeGen/asm.c
parent58bce89d12b1dfba16637ce3754d6cb24c3099bb (diff)
allow references to the larger value in a tied constraint
from the asm string, but reject references to the smaller one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/asm.c')
-rw-r--r--test/CodeGen/asm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c
index d7309149eb..8aa392aa80 100644
--- a/test/CodeGen/asm.c
+++ b/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) );
}
+
+