aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/asm.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-04-03 05:57:08 +0000
committerAnders Carlsson <andersca@mac.com>2009-04-03 05:57:08 +0000
commitec91dab1977154f13621cfb63184364afee84ea1 (patch)
tree9ae35be270f097d0b39b5e547ab36a3eac737205 /test/CodeGen/asm.c
parent23d16b3efb640f0d34d95557c51b82d037d08adc (diff)
Ignore plus operands when looking up the operand number from a named operand. This matches llvm-gcc and fixes PR3908.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/asm.c')
-rw-r--r--test/CodeGen/asm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c
index 91d6320ac5..abe91519ed 100644
--- a/test/CodeGen/asm.c
+++ b/test/CodeGen/asm.c
@@ -28,7 +28,7 @@ void t6(void) {
__asm__ volatile("" : : "i" (t6));
}
-// RUN: grep "T7 NAMED: \$2" %t &&
+// RUN: grep "T7 NAMED: \$1" %t &&
void t7(int a) {
__asm__ volatile("T7 NAMED: %[input]" : "+r"(a): [input] "i" (4));
}
@@ -43,3 +43,9 @@ unsigned t9(unsigned int a) {
asm("bswap %0 %1" : "+r" (a));
return a;
}
+
+// PR3908
+// RUN: grep "PR3908 \$1 \$3 \$2 \$0" %t
+void t10(int r) {
+ __asm__("PR3908 %[lf] %[xx] %[li] %[r]" : [r] "+r" (r) : [lf] "mx" (0), [li] "mr" (0), [xx] "x" ((double)(0)));
+}