summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-01-11 21:23:27 +0000
committerAnders Carlsson <andersca@mac.com>2009-01-11 21:23:27 +0000
commit431acd112933c97114ffea1a711b81f438b5a62e (patch)
tree3c7c56acc65162bef7e0b7ec5e9c6baff02fb63c /clang/lib/CodeGen
parentbc088218e6b2922da6c2e280ec321152699e9c30 (diff)
downloadbcm5719-llvm-431acd112933c97114ffea1a711b81f438b5a62e.tar.gz
bcm5719-llvm-431acd112933c97114ffea1a711b81f438b5a62e.zip
More inline asm fixes
llvm-svn: 62049
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index bee40e5c28b..fd01905698a 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -944,7 +944,10 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
const Expr *InputExpr = S.getOutputExpr(i);
llvm::Value *Arg = EmitAsmInput(S, Info, InputExpr, InOutConstraints);
- InOutConstraints += llvm::utostr(Args.size());
+ if (Info & TargetInfo::CI_AllowsRegister)
+ InOutConstraints += llvm::utostr(i);
+ else
+ InOutConstraints += OutputConstraint;
InOutArgTypes.push_back(Arg->getType());
InOutArgs.push_back(Arg);
OpenPOWER on IntegriCloud