mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Add support to tablegen for specifying subregister classes on a per register class basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -199,6 +199,16 @@ CodeGenRegisterClass::CodeGenRegisterClass(Record *R) : TheDef(R) {
|
||||
Elements.push_back(Reg);
|
||||
}
|
||||
|
||||
std::vector<Record*> SubRegClassList =
|
||||
R->getValueAsListOfDefs("SubRegClassList");
|
||||
for (unsigned i = 0, e = SubRegClassList.size(); i != e; ++i) {
|
||||
Record *SubRegClass = SubRegClassList[i];
|
||||
if (!SubRegClass->isSubClassOf("RegisterClass"))
|
||||
throw "Register Class member '" + SubRegClass->getName() +
|
||||
"' does not derive from the RegisterClass class!";
|
||||
SubRegClasses.push_back(SubRegClass);
|
||||
}
|
||||
|
||||
// Allow targets to override the size in bits of the RegisterClass.
|
||||
unsigned Size = R->getValueAsInt("Size");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user