summaryrefslogtreecommitdiff
path: root/test/CodeGen/asm-inout.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-26 22:09:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-26 22:09:03 +0000
commitc3b054d250cdca485c71845089c316e10610ebad (patch)
treeabae0246ec9156cc1a7cbb947b2b0dfe95fa3189 /test/CodeGen/asm-inout.c
parentbca07a4524feb4edec581062d631a13116320a24 (diff)
Diffstat (limited to 'test/CodeGen/asm-inout.c')
-rw-r--r--test/CodeGen/asm-inout.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c
index 5b0a5f7ef16a..29142f7c5592 100644
--- a/test/CodeGen/asm-inout.c
+++ b/test/CodeGen/asm-inout.c
@@ -29,3 +29,12 @@ asm(
: "edi"
);
}
+
+// PR8959 - This should implicitly truncate the immediate to a byte.
+int test4(volatile int *addr) {
+ unsigned char oldval;
+ __asm__ ("frob %0" : "=r"(oldval) : "0"(0xff));
+ return (int)oldval;
+// CHECK: call i8 asm "frob $0", "=r,0{{.*}}"(i8 -1)
+}
+