aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
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
commit9f2505b934745b18d580ade4dac7b8b16952a30c (patch)
treee8e37baedefb465f4e67abc5b564aafdeafff3b4 /lib/CodeGen/CGStmt.cpp
parentd7a7c00e077111a78a3fe644da59624806ef9e65 (diff)
More inline asm fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index bee40e5c28..fd01905698 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/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);