diff options
author | Chad Rosier <mcrosier@apple.com> | 2013-01-15 23:07:53 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2013-01-15 23:07:53 +0000 |
commit | 1c99a7f4892a24eb227802e042917d05d8cd415f (patch) | |
tree | a7e5f8a029ba07e2ca6298db3427de1e368bc44e /lib/MC | |
parent | 6ee130893072977aa70e8ae6470e88171e782e46 (diff) | |
download | external_llvm-1c99a7f4892a24eb227802e042917d05d8cd415f.zip external_llvm-1c99a7f4892a24eb227802e042917d05d8cd415f.tar.gz external_llvm-1c99a7f4892a24eb227802e042917d05d8cd415f.tar.bz2 |
[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().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index ce5ce1d..43c872b 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/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]; } } |