mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-19 19:30:10 +00:00
Tighten up SparcV9FloatCCRegClass::getRegName()'s assertion - if you ask it for
the name of %fsr (as the comment in SparcV9RegClassInfo.h used to suggest) you would walk off the end of the FloatCCRegName array. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
854db8a29a
commit
03b562aecb
@ -106,7 +106,6 @@ const char * const SparcV9FloatRegClass::getRegName(unsigned reg) const {
|
|||||||
return FloatRegNames[reg];
|
return FloatRegNames[reg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char * const IntCCRegNames[] = {
|
static const char * const IntCCRegNames[] = {
|
||||||
"xcc", "icc", "ccr"
|
"xcc", "icc", "ccr"
|
||||||
};
|
};
|
||||||
@ -121,7 +120,7 @@ static const char * const FloatCCRegNames[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const char * const SparcV9FloatCCRegClass::getRegName(unsigned reg) const {
|
const char * const SparcV9FloatCCRegClass::getRegName(unsigned reg) const {
|
||||||
assert (reg < 5);
|
assert (reg < 4);
|
||||||
return FloatCCRegNames[reg];
|
return FloatCCRegNames[reg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user