diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-11-01 18:46:18 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-11-01 18:46:18 -0500 |
commit | 6f78d494101e0ebd542d8fe836df21d104374c33 (patch) | |
tree | b5500a0f323c8204c94ae538b6650bf3772d8a42 /src/arch/alpha | |
parent | 2b11b4735761cdb5fcf32bbe0fb1cd96b7498db0 (diff) | |
download | gem5-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.isa | 4 |
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) |