summaryrefslogtreecommitdiff
path: root/src/arch/alpha/isa
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha/isa')
-rw-r--r--src/arch/alpha/isa/decoder.isa4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index c5f47aaa2..584d64a3d 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -748,6 +748,7 @@ decode OPCODE default Unknown::unknown() {
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);
@@ -761,7 +762,8 @@ decode OPCODE default Unknown::unknown() {
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);