summaryrefslogtreecommitdiff
path: root/src/arch/alpha/isa/decoder.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-31 17:50:57 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-10-31 17:50:57 -0500
commitfb5ba85abbf3791498faab3328a73b3725dfc839 (patch)
tree130a82a434042a60ebbc65e260a90f7076fe4a2c /src/arch/alpha/isa/decoder.isa
parent312a4710d7b73ad7517965dd83f182d2a3a0b7f6 (diff)
downloadgem5-fb5ba85abbf3791498faab3328a73b3725dfc839.tar.xz
Make two simple utility functions to determine if a MiscReg index corresponding to an IPR is readable or writable.
--HG-- extra : convert_revision : 89eebba5eec01e629213997d24c734a6acad0ecb
Diffstat (limited to 'src/arch/alpha/isa/decoder.isa')
-rw-r--r--src/arch/alpha/isa/decoder.isa8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index 0cbe38ceb..550aa62a3 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -746,9 +746,7 @@ decode OPCODE default Unknown::unknown() {
format HwMoveIPR {
1: hw_mfpr({{
int miscRegIndex = IprToMiscRegIndex[ipr_index];
- if(miscRegIndex < 0 ||
- (miscRegIndex >= MinWriteOnlyIpr &&
- miscRegIndex <= MaxWriteOnlyIpr))
+ if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex))
fault = new UnimplementedOpcodeFault;
else
Ra = xc->readMiscRegWithEffect(miscRegIndex, fault);
@@ -761,9 +759,7 @@ decode OPCODE default Unknown::unknown() {
format HwMoveIPR {
1: hw_mtpr({{
int miscRegIndex = IprToMiscRegIndex[ipr_index];
- if(miscRegIndex < 0 ||
- (miscRegIndex >= MinReadOnlyIpr &&
- miscRegIndex <= MaxWriteOnlyIpr))
+ if(miscRegIndex < 0 || !IprIsWritable(miscRegIndex))
fault = new UnimplementedOpcodeFault;
else
xc->setMiscRegWithEffect(miscRegIndex, Ra);