summaryrefslogtreecommitdiff
path: root/src/arch/alpha/isa/decoder.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-31 16:02:28 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-10-31 16:02:28 -0500
commitece796ab8af23705f3f4d7bd12ee623f3961c99e (patch)
tree29f7e1786617c0eb5f57a59359c8cdb1d69743ba /src/arch/alpha/isa/decoder.isa
parent3c19c5f0f239b8d31a3a8acd03eff9923f19b6ee (diff)
downloadgem5-ece796ab8af23705f3f4d7bd12ee623f3961c99e.tar.xz
Make the IPRs use regular miscreg indexes, and make a table or two to find the miscreg index of a specific IPR.
--HG-- extra : convert_revision : dd235261e7086d6667b1b2bdc4a81b2573e21d53
Diffstat (limited to 'src/arch/alpha/isa/decoder.isa')
-rw-r--r--src/arch/alpha/isa/decoder.isa16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index 93b941d72..852f483e0 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -745,7 +745,13 @@ decode OPCODE default Unknown::unknown() {
0: OpcdecFault::hw_mfpr();
format HwMoveIPR {
1: hw_mfpr({{
- Ra = xc->readMiscRegWithEffect(ipr_index, fault);
+ int miscRegIndex = IprToMiscRegIndex[ipr_index];
+ if(miscRegIndex < 0 ||
+ (miscRegIndex >= MinWriteOnlyIpr &&
+ miscRegIndex <= MaxWriteOnlyIpr))
+ fault = new UnimplementedOpcodeFault;
+ else
+ Ra = xc->readMiscRegWithEffect(ipr_index, fault);
}}, IsIprAccess);
}
}
@@ -754,7 +760,13 @@ decode OPCODE default Unknown::unknown() {
0: OpcdecFault::hw_mtpr();
format HwMoveIPR {
1: hw_mtpr({{
- xc->setMiscRegWithEffect(ipr_index, Ra);
+ int miscRegIndex = IprToMiscRegIndex[ipr_index];
+ if(miscRegIndex < 0 ||
+ (miscRegIndex >= MinReadOnlyIpr &&
+ miscRegIndex <= MaxWriteOnlyIpr))
+ fault = new UnimplementedOpcodeFault;
+ else
+ xc->setMiscRegWithEffect(ipr_index, Ra);
if (traceData) { traceData->setData(Ra); }
}}, IsIprAccess);
}