mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-26 14:15:53 +00:00
Move the subregister indicies enum into the REGINFO_ENUM section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88e48e7d58
commit
5d9651df89
@ -90,6 +90,20 @@ RegisterInfoEmitter::runEnums(raw_ostream &OS,
|
|||||||
OS << "}\n";
|
OS << "}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayRef<CodeGenSubRegIndex*> SubRegIndices = Bank.getSubRegIndices();
|
||||||
|
if (!SubRegIndices.empty()) {
|
||||||
|
OS << "\n// Subregister indices\n";
|
||||||
|
std::string Namespace =
|
||||||
|
SubRegIndices[0]->getNamespace();
|
||||||
|
if (!Namespace.empty())
|
||||||
|
OS << "namespace " << Namespace << " {\n";
|
||||||
|
OS << "enum {\n NoSubRegister,\n";
|
||||||
|
for (unsigned i = 0, e = Bank.getNumNamedIndices(); i != e; ++i)
|
||||||
|
OS << " " << SubRegIndices[i]->getName() << ",\t// " << i+1 << "\n";
|
||||||
|
OS << " NUM_TARGET_NAMED_SUBREGS\n};\n";
|
||||||
|
if (!Namespace.empty())
|
||||||
|
OS << "}\n";
|
||||||
|
}
|
||||||
|
|
||||||
OS << "} // End llvm namespace \n";
|
OS << "} // End llvm namespace \n";
|
||||||
OS << "#endif // GET_REGINFO_ENUM\n\n";
|
OS << "#endif // GET_REGINFO_ENUM\n\n";
|
||||||
@ -446,21 +460,6 @@ RegisterInfoEmitter::runTargetHeader(raw_ostream &OS, CodeGenTarget &Target,
|
|||||||
"unsigned) const;\n"
|
"unsigned) const;\n"
|
||||||
<< "};\n\n";
|
<< "};\n\n";
|
||||||
|
|
||||||
ArrayRef<CodeGenSubRegIndex*> SubRegIndices = RegBank.getSubRegIndices();
|
|
||||||
if (!SubRegIndices.empty()) {
|
|
||||||
OS << "\n// Subregister indices\n";
|
|
||||||
std::string Namespace =
|
|
||||||
SubRegIndices[0]->getNamespace();
|
|
||||||
if (!Namespace.empty())
|
|
||||||
OS << "namespace " << Namespace << " {\n";
|
|
||||||
OS << "enum {\n NoSubRegister,\n";
|
|
||||||
for (unsigned i = 0, e = RegBank.getNumNamedIndices(); i != e; ++i)
|
|
||||||
OS << " " << SubRegIndices[i]->getName() << ",\t// " << i+1 << "\n";
|
|
||||||
OS << " NUM_TARGET_NAMED_SUBREGS\n};\n";
|
|
||||||
if (!Namespace.empty())
|
|
||||||
OS << "}\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayRef<CodeGenRegisterClass*> RegisterClasses = RegBank.getRegClasses();
|
ArrayRef<CodeGenRegisterClass*> RegisterClasses = RegBank.getRegClasses();
|
||||||
|
|
||||||
if (!RegisterClasses.empty()) {
|
if (!RegisterClasses.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user