Fix a range check on the ipr_index.
--HG-- extra : convert_revision : 84e25abd4bb2de0c877c883804d39feb019c7030
This commit is contained in:
parent
2b11b47357
commit
6f78d49410
|
@ -745,7 +745,7 @@ decode OPCODE default Unknown::unknown() {
|
||||||
0: OpcdecFault::hw_mfpr();
|
0: OpcdecFault::hw_mfpr();
|
||||||
format HwMoveIPR {
|
format HwMoveIPR {
|
||||||
1: hw_mfpr({{
|
1: hw_mfpr({{
|
||||||
int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
|
int miscRegIndex = (ipr_index < MaxInternalProcRegs) ?
|
||||||
IprToMiscRegIndex[ipr_index] : -1;
|
IprToMiscRegIndex[ipr_index] : -1;
|
||||||
if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
|
if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
|
||||||
miscRegIndex >= NumInternalProcRegs)
|
miscRegIndex >= NumInternalProcRegs)
|
||||||
|
@ -760,7 +760,7 @@ decode OPCODE default Unknown::unknown() {
|
||||||
0: OpcdecFault::hw_mtpr();
|
0: OpcdecFault::hw_mtpr();
|
||||||
format HwMoveIPR {
|
format HwMoveIPR {
|
||||||
1: hw_mtpr({{
|
1: hw_mtpr({{
|
||||||
int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
|
int miscRegIndex = (ipr_index < MaxInternalProcRegs) ?
|
||||||
IprToMiscRegIndex[ipr_index] : -1;
|
IprToMiscRegIndex[ipr_index] : -1;
|
||||||
if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex) ||
|
if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex) ||
|
||||||
miscRegIndex >= NumInternalProcRegs)
|
miscRegIndex >= NumInternalProcRegs)
|
||||||
|
|
Loading…
Reference in a new issue