summaryrefslogtreecommitdiff
path: root/src/arch/alpha
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-11 12:17:24 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-11 12:17:24 -0700
commitf621b7b81f0913612381d5dc4993f52bb2116902 (patch)
treea0438fb51a3721bf432da12b76c0b8b3160071ef /src/arch/alpha
parentda7209ec93f3cdad11c02906357f06fa29652996 (diff)
downloadgem5-f621b7b81f0913612381d5dc4993f52bb2116902.tar.xz
CPU: Eliminate the simPalCheck funciton.
Diffstat (limited to 'src/arch/alpha')
-rw-r--r--src/arch/alpha/ev5.cc33
-rw-r--r--src/arch/alpha/isa/decoder.isa23
-rw-r--r--src/arch/alpha/isa/main.isa1
3 files changed, 23 insertions, 34 deletions
diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc
index eefe86bff..c11b3632e 100644
--- a/src/arch/alpha/ev5.cc
+++ b/src/arch/alpha/ev5.cc
@@ -547,36 +547,3 @@ copyIprs(ThreadContext *src, ThreadContext *dest)
}
} // namespace AlphaISA
-
-#if FULL_SYSTEM
-
-using namespace AlphaISA;
-
-/**
- * Check for special simulator handling of specific PAL calls.
- * If return value is false, actual PAL call will be suppressed.
- */
-bool
-SimpleThread::simPalCheck(int palFunc)
-{
- if (kernelStats)
- kernelStats->callpal(palFunc, tc);
-
- switch (palFunc) {
- case PAL::halt:
- halt();
- if (--System::numSystemsRunning == 0)
- exitSimLoop("all cpus halted");
- break;
-
- case PAL::bpt:
- case PAL::bugchk:
- if (system->breakpoint())
- return false;
- break;
- }
-
- return true;
-}
-
-#endif // FULL_SYSTEM
diff --git a/src/arch/alpha/isa/decoder.isa b/src/arch/alpha/isa/decoder.isa
index 8025ba69f..06676ae87 100644
--- a/src/arch/alpha/isa/decoder.isa
+++ b/src/arch/alpha/isa/decoder.isa
@@ -698,7 +698,28 @@ decode OPCODE default Unknown::unknown() {
else {
// check to see if simulator wants to do something special
// on this PAL call (including maybe suppress it)
- bool dopal = xc->simPalCheck(palFunc);
+
+ bool dopal = true;
+
+ ThreadContext * tc = xc->tcBase();
+ AlphaISA::Kernel::Statistics * kernelStats = tc->getKernelStats();
+ System * system = tc->getSystemPtr();
+ if (kernelStats)
+ kernelStats->callpal(palFunc, tc);
+
+ switch (palFunc) {
+ case PAL::halt:
+ tc->halt();
+ if (--System::numSystemsRunning == 0)
+ exitSimLoop("all cpus halted");
+ break;
+
+ case PAL::bpt:
+ case PAL::bugchk:
+ if (system->breakpoint())
+ dopal = false;
+ break;
+ }
if (dopal) {
xc->setMiscReg(IPR_EXC_ADDR, NPC);
diff --git a/src/arch/alpha/isa/main.isa b/src/arch/alpha/isa/main.isa
index 078982697..0f7f74359 100644
--- a/src/arch/alpha/isa/main.isa
+++ b/src/arch/alpha/isa/main.isa
@@ -70,6 +70,7 @@ output exec {{
#if FULL_SYSTEM
#include "arch/alpha/kernel_stats.hh"
+#include "arch/alpha/osfpal.hh"
#include "sim/pseudo_inst.hh"
#endif
#include "arch/alpha/ipr.hh"