summaryrefslogtreecommitdiff
path: root/src/sim/pseudo_inst.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2008-12-17 09:51:18 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2008-12-17 09:51:18 -0800
commit1704ba2273d9623095ddcd269055aedb8e818e03 (patch)
treeb5ce140d4945bb793b60477b6f69fd7c1730c0d3 /src/sim/pseudo_inst.cc
parent02cd18f536544d4b5fa19681b4c9dbd5b2cb87ff (diff)
downloadgem5-1704ba2273d9623095ddcd269055aedb8e818e03.tar.xz
Make Alpha pseudo-insts available from SE mode.
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r--src/sim/pseudo_inst.cc39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index e43279376..130a2f0fe 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -50,7 +50,9 @@
#include "sim/stats.hh"
#include "sim/system.hh"
#include "sim/debug.hh"
+#if FULL_SYSTEM
#include "sim/vptr.hh"
+#endif
using namespace std;
@@ -59,6 +61,8 @@ using namespace TheISA;
namespace PseudoInst {
+#if FULL_SYSTEM
+
void
arm(ThreadContext *tc)
{
@@ -125,6 +129,8 @@ quiesceTime(ThreadContext *tc)
return (tc->readLastActivate() - tc->readLastSuspend()) / Clock::Int::ns;
}
+#endif
+
uint64_t
rpns(ThreadContext *tc)
{
@@ -139,6 +145,8 @@ m5exit(ThreadContext *tc, Tick delay)
mainEventQueue.schedule(event, when);
}
+#if FULL_SYSTEM
+
void
loadsymbol(ThreadContext *tc)
{
@@ -188,6 +196,21 @@ loadsymbol(ThreadContext *tc)
}
void
+addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
+{
+ char symb[100];
+ CopyStringOut(tc, symb, symbolAddr, 100);
+ std::string symbol(symb);
+
+ DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
+
+ tc->getSystemPtr()->kernelSymtab->insert(addr,symbol);
+}
+
+#endif
+
+
+void
resetstats(ThreadContext *tc, Tick delay, Tick period)
{
if (!tc->getCpuPtr()->params()->do_statistics_insts)
@@ -214,18 +237,6 @@ dumpstats(ThreadContext *tc, Tick delay, Tick period)
}
void
-addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
-{
- char symb[100];
- CopyStringOut(tc, symb, symbolAddr, 100);
- std::string symbol(symb);
-
- DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
-
- tc->getSystemPtr()->kernelSymtab->insert(addr,symbol);
-}
-
-void
dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
{
if (!tc->getCpuPtr()->params()->do_statistics_insts)
@@ -251,6 +262,8 @@ m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
mainEventQueue.schedule(event, when);
}
+#if FULL_SYSTEM
+
uint64_t
readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
{
@@ -286,6 +299,8 @@ readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
return result;
}
+#endif
+
void
debugbreak(ThreadContext *tc)
{