diff options
author | Owen Anderson <resistor@mac.com> | 2011-07-29 17:32:03 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-07-29 17:32:03 +0000 |
commit | d217da1131388680ec73794ecd5d6fcf3766c114 (patch) | |
tree | d6566aba25566a9b4469af93ac1760e70d1809c9 /utils/TableGen/FixedLenDecoderEmitter.cpp | |
parent | 3401a9028760d55170cacd8201e2a7fcd6fa9367 (diff) | |
download | external_llvm-d217da1131388680ec73794ecd5d6fcf3766c114.zip external_llvm-d217da1131388680ec73794ecd5d6fcf3766c114.tar.gz external_llvm-d217da1131388680ec73794ecd5d6fcf3766c114.tar.bz2 |
Fix a case where, when trying to track tied operands, we'd accidentally overwrite our mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r-- | utils/TableGen/FixedLenDecoderEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 4a2483b..206d15f 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -1228,10 +1228,8 @@ static bool populateInstruction(const CodeGenInstruction &CGI, std::map<Init*, std::string> TiedNames; for (unsigned i = 0; i < CGI.Operands.size(); ++i) { int tiedTo = CGI.Operands[i].getTiedRegister(); - if (tiedTo != -1) { + if (tiedTo != -1) TiedNames[InOutOperands[i].first] = InOutOperands[tiedTo].second; - TiedNames[InOutOperands[tiedTo].first] = InOutOperands[i].second; - } } // For each operand, see if we can figure out where it is encoded. @@ -1267,6 +1265,8 @@ static bool populateInstruction(const CodeGenInstruction &CGI, unsigned Offset = 0; for (unsigned bi = 0; bi < Bits.getNumBits(); ++bi) { + std::string name = NI->second; + std::string altname = TiedNames[NI->first]; VarBitInit *BI = dynamic_cast<VarBitInit*>(Bits.getBit(bi)); if (!BI) { if (Base != ~0U) { |