int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
IprToMiscRegIndex[ipr_index] : -1;
if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
+ miscRegIndex >= NumInternalProcRegs)
fault = new UnimplementedOpcodeFault;
else
Ra = xc->readMiscRegWithEffect(miscRegIndex, fault);
1: hw_mtpr({{
int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
IprToMiscRegIndex[ipr_index] : -1;
- if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex))
+ if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex)
+ miscRegIndex >= NumInternalProcRegs)
fault = new UnimplementedOpcodeFault;
else
xc->setMiscRegWithEffect(miscRegIndex, Ra);