aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index aaf21b5d6c..440e7c6703 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/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)