diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-07 01:27:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-07 01:27:55 +0000 |
commit | 5d14eac21da9b92de4c9a976322e62a3c28ef968 (patch) | |
tree | cb730e4795e0a054a23eb77880ca024a223a8638 | |
parent | f62138e79267870125e80402053ddac1ca0c626d (diff) | |
download | llvm-5d14eac21da9b92de4c9a976322e62a3c28ef968.tar.gz |
emit TIED_TO correctly
llvm-svn: 31484
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index aaf21b5d6c06..440e7c670346 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -297,7 +297,7 @@ static std::string ParseConstraint(const std::string &CStr, throw "Illegal tied-to operand constraint '" + CStr + "'"; // Build the string. - return "((" + utostr(TIdx) + " << 16) | TargetInstrInfo::TIED_TO)"; + return "((" + utostr(TIdx) + " << 16) | (1 << TargetInstrInfo::TIED_TO))"; } static void ParseConstraints(const std::string &CStr, CodeGenInstruction *I) { @@ -408,7 +408,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) // For backward compatibility: isTwoAddress means operand 1 is tied to // operand 0. if (isTwoAddress && OperandList[1].Constraint.empty()) - OperandList[1].Constraint = "((0 << 16) | TargetInstrInfo::TIED_TO)"; + OperandList[1].Constraint = "((0 << 16) | (1 << TargetInstrInfo::TIED_TO))"; // Any operands with unset constraints get 0 as their constraint. for (unsigned op = 0, e = OperandList.size(); op != e; ++op) |