summaryrefslogtreecommitdiff
path: root/src/arch/alpha/isa/decoder.isa
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha/isa/decoder.isa')
-rw-r--r--src/arch/alpha/isa/decoder.isa122
1 files changed, 102 insertions, 20 deletions
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index 2177e8c4f..0b2a31410 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -638,7 +638,7 @@ decode OPCODE default Unknown::unknown() {
/* Rb is a fake dependency so here is a fun way to get
* the parser to understand that.
*/
- Ra = xc->readMiscReg(AlphaISA::IPR_CC) + (Rb & 0);
+ Ra = xc->readMiscReg(IPR_CC) + (Rb & 0);
#else
Ra = curTick;
@@ -690,7 +690,7 @@ decode OPCODE default Unknown::unknown() {
0x00: CallPal::call_pal({{
if (!palValid ||
(palPriv
- && xc->readMiscReg(AlphaISA::IPR_ICM) != AlphaISA::mode_kernel)) {
+ && xc->readMiscReg(IPR_ICM) != mode_kernel)) {
// invalid pal function code, or attempt to do privileged
// PAL call in non-kernel mode
fault = new UnimplementedOpcodeFault;
@@ -701,8 +701,8 @@ decode OPCODE default Unknown::unknown() {
bool dopal = xc->simPalCheck(palFunc);
if (dopal) {
- xc->setMiscReg(AlphaISA::IPR_EXC_ADDR, NPC);
- NPC = xc->readMiscReg(AlphaISA::IPR_PAL_BASE) + palOffset;
+ xc->setMiscReg(IPR_EXC_ADDR, NPC);
+ NPC = xc->readMiscReg(IPR_PAL_BASE) + palOffset;
}
}
}}, IsNonSpeculative);
@@ -783,14 +783,19 @@ decode OPCODE default Unknown::unknown() {
}
}
- format BasicOperate {
- 0x1e: decode PALMODE {
- 0: OpcdecFault::hw_rei();
- 1:hw_rei({{ xc->hwrei(); }}, IsSerializing, IsSerializeBefore);
+ 0x1e: decode PALMODE {
+ 0: OpcdecFault::hw_rei();
+ format BasicOperate {
+ 1: hw_rei({{ xc->hwrei(); }}, IsSerializing, IsSerializeBefore);
}
+ }
+
+#endif
+ format BasicOperate {
// M5 special opcodes use the reserved 0x01 opcode space
0x01: decode M5FUNC {
+#if FULL_SYSTEM
0x00: arm({{
PseudoInst::arm(xc->tcBase());
}}, IsNonSpeculative);
@@ -806,22 +811,34 @@ decode OPCODE default Unknown::unknown() {
0x04: quiesceTime({{
R0 = PseudoInst::quiesceTime(xc->tcBase());
}}, IsNonSpeculative, IsUnverifiable);
- 0x10: ivlb({{
- warn_once("Obsolete M5 instruction ivlb encountered.\n");
+#endif
+ 0x07: rpns({{
+ R0 = PseudoInst::rpns(xc->tcBase());
+ }}, IsNonSpeculative, IsUnverifiable);
+ 0x09: wakeCPU({{
+ PseudoInst::wakeCPU(xc->tcBase(), R16);
+ }}, IsNonSpeculative, IsUnverifiable);
+ 0x10: deprecated_ivlb({{
+ warn_once("Obsolete M5 ivlb instruction encountered.\n");
}});
- 0x11: ivle({{
- warn_once("Obsolete M5 instruction ivlb encountered.\n");
+ 0x11: deprecated_ivle({{
+ warn_once("Obsolete M5 ivlb instruction encountered.\n");
}});
- 0x20: m5exit_old({{
- PseudoInst::m5exit_old(xc->tcBase());
+ 0x20: deprecated_exit ({{
+ warn_once("deprecated M5 exit instruction encountered.\n");
+ PseudoInst::m5exit(xc->tcBase(), 0);
}}, No_OpClass, IsNonSpeculative);
0x21: m5exit({{
PseudoInst::m5exit(xc->tcBase(), R16);
}}, No_OpClass, IsNonSpeculative);
+#if FULL_SYSTEM
0x31: loadsymbol({{
PseudoInst::loadsymbol(xc->tcBase());
}}, No_OpClass, IsNonSpeculative);
- 0x30: initparam({{ Ra = xc->tcBase()->getCpuPtr()->system->init_param; }});
+ 0x30: initparam({{
+ Ra = xc->tcBase()->getCpuPtr()->system->init_param;
+ }});
+#endif
0x40: resetstats({{
PseudoInst::resetstats(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
@@ -834,28 +851,93 @@ decode OPCODE default Unknown::unknown() {
0x43: m5checkpoint({{
PseudoInst::m5checkpoint(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
+#if FULL_SYSTEM
0x50: m5readfile({{
R0 = PseudoInst::readfile(xc->tcBase(), R16, R17, R18);
}}, IsNonSpeculative);
+#endif
0x51: m5break({{
PseudoInst::debugbreak(xc->tcBase());
}}, IsNonSpeculative);
0x52: m5switchcpu({{
PseudoInst::switchcpu(xc->tcBase());
}}, IsNonSpeculative);
+#if FULL_SYSTEM
0x53: m5addsymbol({{
PseudoInst::addsymbol(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
+#endif
0x54: m5panic({{
panic("M5 panic instruction called at pc=%#x.", xc->readPC());
}}, IsNonSpeculative);
- 0x55: m5anBegin({{
- PseudoInst::anBegin(xc->tcBase(), R16);
+#define CPANN(lbl) CPA::cpa()->lbl(xc->tcBase())
+ 0x55: decode RA {
+ 0x00: m5a_old({{
+ panic("Deprecated M5 annotate instruction executed at pc=%#x\n",
+ xc->readPC());
+ }}, IsNonSpeculative);
+ 0x01: m5a_bsm({{
+ CPANN(swSmBegin);
+ }}, IsNonSpeculative);
+ 0x02: m5a_esm({{
+ CPANN(swSmEnd);
+ }}, IsNonSpeculative);
+ 0x03: m5a_begin({{
+ CPANN(swExplictBegin);
+ }}, IsNonSpeculative);
+ 0x04: m5a_end({{
+ CPANN(swEnd);
+ }}, IsNonSpeculative);
+ 0x06: m5a_q({{
+ CPANN(swQ);
+ }}, IsNonSpeculative);
+ 0x07: m5a_dq({{
+ CPANN(swDq);
+ }}, IsNonSpeculative);
+ 0x08: m5a_wf({{
+ CPANN(swWf);
+ }}, IsNonSpeculative);
+ 0x09: m5a_we({{
+ CPANN(swWe);
+ }}, IsNonSpeculative);
+ 0x0C: m5a_sq({{
+ CPANN(swSq);
+ }}, IsNonSpeculative);
+ 0x0D: m5a_aq({{
+ CPANN(swAq);
+ }}, IsNonSpeculative);
+ 0x0E: m5a_pq({{
+ CPANN(swPq);
+ }}, IsNonSpeculative);
+ 0x0F: m5a_l({{
+ CPANN(swLink);
+ }}, IsNonSpeculative);
+ 0x10: m5a_identify({{
+ CPANN(swIdentify);
+ }}, IsNonSpeculative);
+ 0x11: m5a_getid({{
+ R0 = CPANN(swGetId);
+ }}, IsNonSpeculative);
+ 0x13: m5a_scl({{
+ CPANN(swSyscallLink);
+ }}, IsNonSpeculative);
+ 0x14: m5a_rq({{
+ CPANN(swRq);
+ }}, IsNonSpeculative);
+ } // M5 Annotate Operations
+#undef CPANN
+ 0x56: m5reserved2({{
+ warn("M5 reserved opcode ignored");
+ }}, IsNonSpeculative);
+ 0x57: m5reserved3({{
+ warn("M5 reserved opcode ignored");
}}, IsNonSpeculative);
- 0x56: m5anWait({{
- PseudoInst::anWait(xc->tcBase(), R16, R17);
+ 0x58: m5reserved4({{
+ warn("M5 reserved opcode ignored");
+ }}, IsNonSpeculative);
+ 0x59: m5reserved5({{
+ warn("M5 reserved opcode ignored");
}}, IsNonSpeculative);
}
}
-#endif
}