mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-03 08:11:52 +00:00
Change getSubReg semantics. It now returns zero if the specified register doesn't have a subreg of the specified index.
llvm-svn: 56099
This commit is contained in:
parent
9de997d5de
commit
aebadcd733
@ -457,7 +457,8 @@ public:
|
||||
virtual BitVector getReservedRegs(const MachineFunction &MF) const = 0;
|
||||
|
||||
/// getSubReg - Returns the physical register number of sub-register "Index"
|
||||
/// for physical register RegNo.
|
||||
/// for physical register RegNo. Return zero if the sub-register does not
|
||||
/// exist.
|
||||
virtual unsigned getSubReg(unsigned RegNo, unsigned Index) const = 0;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
@ -655,12 +655,12 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
|
||||
OS << "unsigned " << ClassName
|
||||
<< "::getSubReg(unsigned RegNo, unsigned Index) const {\n"
|
||||
<< " switch (RegNo) {\n"
|
||||
<< " default: abort(); break;\n";
|
||||
<< " default:\n return 0;\n";
|
||||
for (std::map<Record*, std::vector<std::pair<int, Record*> > >::iterator
|
||||
I = SubRegVectors.begin(), E = SubRegVectors.end(); I != E; ++I) {
|
||||
OS << " case " << getQualifiedName(I->first) << ":\n";
|
||||
OS << " switch (Index) {\n";
|
||||
OS << " default: abort(); break;\n";
|
||||
OS << " default:\n return 0;\n";
|
||||
for (unsigned i = 0, e = I->second.size(); i != e; ++i)
|
||||
OS << " case " << (I->second)[i].first << ": return "
|
||||
<< getQualifiedName((I->second)[i].second) << ";\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user