forked from OSchip/llvm-project
Encode %fsr correctly; don't fail an assertion.
llvm-svn: 14103
This commit is contained in:
parent
87d8878f6d
commit
5b03a0628f
|
@ -527,6 +527,15 @@ SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg,
|
||||||
DEBUG(std::cerr << "FP CC reg: " << fakeReg << "\n");
|
DEBUG(std::cerr << "FP CC reg: " << fakeReg << "\n");
|
||||||
return fakeReg;
|
return fakeReg;
|
||||||
}
|
}
|
||||||
|
case SparcV9RegInfo::SpecialRegClassID: {
|
||||||
|
// Currently only "special" reg is %fsr, which is encoded as 1 in
|
||||||
|
// instructions and 0 in SparcV9SpecialRegClass.
|
||||||
|
static const unsigned SpecialReg[] = { 1 };
|
||||||
|
assert(fakeReg < sizeof(SpecialReg)/sizeof(SpecialReg[0])
|
||||||
|
&& "Special register out of bounds for SpecialReg map");
|
||||||
|
DEBUG(std::cerr << "Special reg: " << SpecialReg[fakeReg] << "\n");
|
||||||
|
return SpecialReg[fakeReg];
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
assert(0 && "Invalid unified register number in getRealRegNum");
|
assert(0 && "Invalid unified register number in getRealRegNum");
|
||||||
return fakeReg;
|
return fakeReg;
|
||||||
|
|
Loading…
Reference in New Issue