summaryrefslogtreecommitdiff
path: root/src/arch/alpha
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-01 18:46:18 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-01 18:46:18 -0500
commit6f78d494101e0ebd542d8fe836df21d104374c33 (patch)
treeb5500a0f323c8204c94ae538b6650bf3772d8a42 /src/arch/alpha
parent2b11b4735761cdb5fcf32bbe0fb1cd96b7498db0 (diff)
downloadgem5-6f78d494101e0ebd542d8fe836df21d104374c33.tar.xz
Fix a range check on the ipr_index.
--HG-- extra : convert_revision : 84e25abd4bb2de0c877c883804d39feb019c7030
Diffstat (limited to 'src/arch/alpha')
-rw-r--r--src/arch/alpha/isa/decoder.isa4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index fcf022ce1..be6f574a9 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -745,7 +745,7 @@ decode OPCODE default Unknown::unknown() {
0: OpcdecFault::hw_mfpr();
format HwMoveIPR {
1: hw_mfpr({{
- int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
+ int miscRegIndex = (ipr_index < MaxInternalProcRegs) ?
IprToMiscRegIndex[ipr_index] : -1;
if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
miscRegIndex >= NumInternalProcRegs)
@@ -760,7 +760,7 @@ decode OPCODE default Unknown::unknown() {
0: OpcdecFault::hw_mtpr();
format HwMoveIPR {
1: hw_mtpr({{
- int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
+ int miscRegIndex = (ipr_index < MaxInternalProcRegs) ?
IprToMiscRegIndex[ipr_index] : -1;
if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex) ||
miscRegIndex >= NumInternalProcRegs)