[llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp
Evan Cheng
evan.cheng at apple.com
Wed Nov 1 15:03:25 PST 2006
Changes in directory llvm/utils/TableGen:
CodeGenTarget.cpp updated: 1.70 -> 1.71
---
Log message:
Tied-to constraint must be op_with_larger_idx = op_with_smaller_idx or else throw an exception.
---
Diffs of the changes: (+3 -0)
CodeGenTarget.cpp | 3 +++
1 files changed, 3 insertions(+)
Index: llvm/utils/TableGen/CodeGenTarget.cpp
diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.70 llvm/utils/TableGen/CodeGenTarget.cpp:1.71
--- llvm/utils/TableGen/CodeGenTarget.cpp:1.70 Tue Oct 31 18:27:05 2006
+++ llvm/utils/TableGen/CodeGenTarget.cpp Wed Nov 1 17:03:11 2006
@@ -280,6 +280,7 @@
assert(pos != std::string::npos && "Unrecognized constraint");
std::string Name = CStr.substr(1, pos); // Skip '$'
+ // TIED_TO: $src1 = $dst
const std::string delims(" \t");
std::string::size_type wpos = Name.find_first_of(delims);
if (wpos != std::string::npos)
@@ -291,6 +292,8 @@
if (wpos != std::string::npos)
Name = Name.substr(wpos+1);
unsigned TIdx = I->getOperandNamed(Name);
+ if (TIdx >= FIdx)
+ throw "Illegal tied-to operand constraint '" + CStr + "'";
return std::make_pair(FIdx, (TIdx << 16) | 1);
}
More information about the llvm-commits
mailing list