diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
commit | 6fe5c7aa327e188b7176daa5595bbf075a6b94df (patch) | |
tree | 4cfca640904d1896e25032757a61f8959c066919 /utils/TableGen/InstrInfoEmitter.cpp | |
parent | 989df958a10f0beb90b89ccadd8351cbe51d90b1 (diff) | |
download | src-6fe5c7aa327e188b7176daa5595bbf075a6b94df.tar.gz src-6fe5c7aa327e188b7176daa5595bbf075a6b94df.zip |
Update LLVM to r96341.
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=203954
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index cf40c78fa72e..898c92af8da9 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -118,7 +118,20 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) { Res += "|(1<<TOI::OptionalDef)"; // Fill in constraint info. - Res += ", " + Inst.OperandList[i].Constraints[j]; + Res += ", "; + + const CodeGenInstruction::ConstraintInfo &Constraint = + Inst.OperandList[i].Constraints[j]; + if (Constraint.isNone()) + Res += "0"; + else if (Constraint.isEarlyClobber()) + Res += "(1 << TOI::EARLY_CLOBBER)"; + else { + assert(Constraint.isTied()); + Res += "((" + utostr(Constraint.getTiedOperand()) + + " << 16) | (1 << TOI::TIED_TO))"; + } + Result.push_back(Res); } } @@ -346,7 +359,7 @@ void InstrInfoEmitter::emitShiftedValue(Record *R, StringInit *Val, R->getName() != "IMPLICIT_DEF" && R->getName() != "SUBREG_TO_REG" && R->getName() != "COPY_TO_REGCLASS" && - R->getName() != "DEBUG_VALUE") + R->getName() != "DBG_VALUE") throw R->getName() + " doesn't have a field named '" + Val->getValue() + "'!"; return; |