mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Allow the commuted form of tied-operand constraints in tablegen ("$dst = $src",
rather than "$src = $dst"). llvm-svn: 166382
This commit is contained in:
parent
2ee8edf34a
commit
784ac6493a
@ -233,11 +233,12 @@ static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) {
|
||||
if (wpos == std::string::npos)
|
||||
throw "Illegal format for tied-to constraint: '" + CStr + "'";
|
||||
|
||||
std::pair<unsigned,unsigned> SrcOp =
|
||||
Ops.ParseOperandName(Name.substr(wpos), false);
|
||||
if (SrcOp > DestOp)
|
||||
throw "Illegal tied-to operand constraint '" + CStr + "'";
|
||||
|
||||
std::string SrcOpName = Name.substr(wpos);
|
||||
std::pair<unsigned,unsigned> SrcOp = Ops.ParseOperandName(SrcOpName, false);
|
||||
if (SrcOp > DestOp) {
|
||||
std::swap(SrcOp, DestOp);
|
||||
std::swap(SrcOpName, DestOpName);
|
||||
}
|
||||
|
||||
unsigned FlatOpNo = Ops.getFlattenedOperandNumber(SrcOp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user