diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-10 06:33:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-10 06:33:24 +0000 |
commit | d7d5fdf0903ef9855cfd4682a1e85659862786e7 (patch) | |
tree | 67c53433812259583b187a987ee727c660537205 /clang/test/CodeGen/asm.c | |
parent | 80337892f4842657e99d34dbd7e5abe8c3c14ae3 (diff) | |
download | bcm5719-llvm-d7d5fdf0903ef9855cfd4682a1e85659862786e7.tar.gz bcm5719-llvm-d7d5fdf0903ef9855cfd4682a1e85659862786e7.zip |
move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.
llvm-svn: 66531
Diffstat (limited to 'clang/test/CodeGen/asm.c')
-rw-r--r-- | clang/test/CodeGen/asm.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c index e8088d40b13..4e6ff4da90f 100644 --- a/clang/test/CodeGen/asm.c +++ b/clang/test/CodeGen/asm.c @@ -1,21 +1,17 @@ -// RUN: clang -emit-llvm %s -o %t -arch=i386 -void t1(int len) -{ +// RUN: clang -emit-llvm %s -o %t -arch=i386 && +void t1(int len) { __asm__ volatile("" : "=&r"(len), "+&r"(len)); } -void t2(unsigned long long t) -{ +void t2(unsigned long long t) { __asm__ volatile("" : "+m"(t)); } -void t3(unsigned char *src, unsigned long long temp) -{ +void t3(unsigned char *src, unsigned long long temp) { __asm__ volatile("" : "+m"(temp), "+r"(src)); } -void t4() -{ +void t4() { unsigned long long a; struct reg { unsigned long long a, b; } b; @@ -23,13 +19,16 @@ void t4() } // PR3417 -void t5(int i) -{ +void t5(int i) { asm("nop" : "=r"(i) : "0"(t5)); } // PR3641 -void t6(void) -{ +void t6(void) { __asm__ volatile("" : : "i" (t6)); } + +// RUN: grep "T7 NAMED: \$2" %t +void t7(int a) { + __asm__ volatile("T7 NAMED: %[input]" : "+r"(a): [input] "i" (4)); +}
\ No newline at end of file |