diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-03 07:27:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-03 07:27:51 +0000 |
commit | 4df4ee0ff6f804e9d3dd478712e3b5b20cd3bf2f (patch) | |
tree | 720f189d430ecbbe197927fb84fa15afebe80a38 /test/CodeGen/asm.c | |
parent | 481fef9e25128fe87b19e41c48f771ee20c33cbe (diff) |
handle codegen of asms where a small input is tied to a large output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/asm.c')
-rw-r--r-- | test/CodeGen/asm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c index abe91519ed..757a2740a7 100644 --- a/test/CodeGen/asm.c +++ b/test/CodeGen/asm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t -arch=i386 && +c// RUN: clang-cc -emit-llvm %s -o %t -arch=i386 && void t1(int len) { __asm__ volatile("" : "=&r"(len), "+&r"(len)); } @@ -49,3 +49,13 @@ unsigned t9(unsigned int a) { void t10(int r) { __asm__("PR3908 %[lf] %[xx] %[li] %[r]" : [r] "+r" (r) : [lf] "mx" (0), [li] "mr" (0), [xx] "x" ((double)(0))); } + + +// PR3373 +unsigned t11(signed char input) { + unsigned output; + __asm__("xyz" + : "=a" (output) + : "0" (input)); + return output; +} |