summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-01-15 23:07:53 +0000
committerChad Rosier <mcrosier@apple.com>2013-01-15 23:07:53 +0000
commit7245033a98ca4e35c5543943777c91934b8dc7ce (patch)
tree2dd11cbe11e1c433070a498c897bb0893bac08f3 /llvm/lib/MC/MCParser/AsmParser.cpp
parent17233946bcaba7b23cb003ef789f64dc41cef292 (diff)
downloadbcm5719-llvm-7245033a98ca4e35c5543943777c91934b8dc7ce.tar.gz
bcm5719-llvm-7245033a98ca4e35c5543943777c91934b8dc7ce.zip
[ms-inline asm] Address the FIXME in AsmParser.cpp.
// FIXME: Constraints are hard coded to 'm', but we need an 'r' // constraint for addressof. This needs to be cleaned up! Test cases are already in place. Specifically, clang/test/CodeGen/ms-inline-asm.c t15(), t16(), and t24(). llvm-svn: 172569
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index ce5ce1dc3f9..43c872b8098 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -3972,15 +3972,13 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
unsigned NumExprs = NumOutputs + NumInputs;
OpDecls.resize(NumExprs);
Constraints.resize(NumExprs);
- // FIXME: Constraints are hard coded to 'm', but we need an 'r'
- // constraint for addressof. This needs to be cleaned up!
for (unsigned i = 0; i < NumOutputs; ++i) {
OpDecls[i] = std::make_pair(OutputDecls[i], OutputDeclsAddressOf[i]);
- Constraints[i] = OutputDeclsAddressOf[i] ? "=r" : OutputConstraints[i];
+ Constraints[i] = OutputConstraints[i];
}
for (unsigned i = 0, j = NumOutputs; i < NumInputs; ++i, ++j) {
OpDecls[j] = std::make_pair(InputDecls[i], InputDeclsAddressOf[i]);
- Constraints[j] = InputDeclsAddressOf[i] ? "r" : InputConstraints[i];
+ Constraints[j] = InputConstraints[i];
}
}
OpenPOWER on IntegriCloud