diff options
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 3 | ||||
-rw-r--r-- | clang/test/CodeGen/asm.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 0cf36f98a83..ce55fae87e9 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -177,9 +177,6 @@ int AsmStmt::getNamedOperand(const std::string &SymbolicName) const { for (unsigned i = 0, e = getNumOutputs(); i != e; ++i) { if (getOutputName(i) == SymbolicName) return i; - - // Keep track of the number of '+' operands. - if (isOutputPlusConstraint(i)) ++NumPlusOperands; } for (unsigned i = 0, e = getNumInputs(); i != e; ++i) diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c index 91d6320ac54..abe91519ed1 100644 --- a/clang/test/CodeGen/asm.c +++ b/clang/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))); +} |