mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Add the SubRegIndex TableGen class.
This is the beginning of purely symbolic subregister indices, but we need a bit of jiggling before the explicit numeric indices can be completely removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -224,6 +224,7 @@ void MatcherGen::EmitLeafMatchCode(const TreePatternNode *N) {
|
||||
if (// Handle register references. Nothing to do here, they always match.
|
||||
LeafRec->isSubClassOf("RegisterClass") ||
|
||||
LeafRec->isSubClassOf("PointerLikeRegClass") ||
|
||||
LeafRec->isSubClassOf("SubRegIndex") ||
|
||||
// Place holder for SRCVALUE nodes. Nothing to do here.
|
||||
LeafRec->getName() == "srcvalue")
|
||||
return;
|
||||
@ -597,6 +598,14 @@ void MatcherGen::EmitResultLeafAsOperand(const TreePatternNode *N,
|
||||
ResultOps.push_back(NextRecordedOperandNo++);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle a subregister index. This is used for INSERT_SUBREG etc.
|
||||
if (DI->getDef()->isSubClassOf("SubRegIndex")) {
|
||||
std::string Value = getQualifiedName(DI->getDef());
|
||||
AddMatcher(new EmitStringIntegerMatcher(Value, MVT::i32));
|
||||
ResultOps.push_back(NextRecordedOperandNo++);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
errs() << "unhandled leaf node: \n";
|
||||
|
Reference in New Issue
Block a user