748,749c748,751
< int miscRegIndex = IprToMiscRegIndex[ipr_index];
< if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex))
---
> miscRegIndex >= NumInternalProcRegs)
> int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
> IprToMiscRegIndex[ipr_index] : -1;
> if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
761c763,764
< int miscRegIndex = IprToMiscRegIndex[ipr_index];
---
> int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
> IprToMiscRegIndex[ipr_index] : -1;