mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Recommitting changes after more testing. These appear to cause no problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea2378138f
commit
5b4153710e
@ -872,6 +872,10 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
|
||||
std::vector<unsigned char> VT;
|
||||
VT.push_back(MVT::iPTR);
|
||||
MadeChange = UpdateNodeType(VT, TP);
|
||||
} else if (ResultNode->getName() == "unknown") {
|
||||
std::vector<unsigned char> VT;
|
||||
VT.push_back(MVT::isUnknown);
|
||||
MadeChange = UpdateNodeType(VT, TP);
|
||||
} else {
|
||||
assert(ResultNode->isSubClassOf("RegisterClass") &&
|
||||
"Operands should be register classes!");
|
||||
@ -910,13 +914,15 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
|
||||
MadeChange |= Child->UpdateNodeType(VT, TP);
|
||||
} else if (OperandNode->getName() == "ptr_rc") {
|
||||
MadeChange |= Child->UpdateNodeType(MVT::iPTR, TP);
|
||||
} else if (OperandNode->getName() == "unknown") {
|
||||
MadeChange |= Child->UpdateNodeType(MVT::isUnknown, TP);
|
||||
} else {
|
||||
assert(0 && "Unknown operand type!");
|
||||
abort();
|
||||
}
|
||||
MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters);
|
||||
}
|
||||
|
||||
|
||||
if (ChildNo != getNumChildren())
|
||||
TP.error("Instruction '" + getOperator()->getName() +
|
||||
"' was provided too many operands!");
|
||||
|
@ -163,7 +163,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
|
||||
isVariadic = true;
|
||||
continue;
|
||||
} else if (!Rec->isSubClassOf("RegisterClass") &&
|
||||
Rec->getName() != "ptr_rc")
|
||||
Rec->getName() != "ptr_rc" && Rec->getName() != "unknown")
|
||||
throw "Unknown operand class '" + Rec->getName() +
|
||||
"' in instruction '" + R->getName() + "' instruction!";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user