summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/SConscript2
-rw-r--r--src/sim/pseudo_inst.cc39
-rw-r--r--src/sim/pseudo_inst.hh13
3 files changed, 36 insertions, 18 deletions
diff --git a/src/sim/SConscript b/src/sim/SConscript
index 7acf4e9b6..48200161c 100644
--- a/src/sim/SConscript
+++ b/src/sim/SConscript
@@ -43,6 +43,7 @@ Source('eventq.cc')
Source('faults.cc')
Source('init.cc')
BinSource('main.cc')
+Source('pseudo_inst.cc')
Source('root.cc')
Source('serialize.cc')
Source('sim_events.cc')
@@ -54,7 +55,6 @@ Source('system.cc')
if env['FULL_SYSTEM']:
Source('arguments.cc')
- Source('pseudo_inst.cc')
else:
Source('tlb.cc')
SimObject('Process.py')
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)
{
diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh
index 80f58f80d..7d013eda7 100644
--- a/src/sim/pseudo_inst.hh
+++ b/src/sim/pseudo_inst.hh
@@ -42,22 +42,25 @@ extern bool doStatisticsInsts;
extern bool doCheckpointInsts;
extern bool doQuiesce;
+#if FULL_SYSTEM
void arm(ThreadContext *tc);
void quiesce(ThreadContext *tc);
void quiesceNs(ThreadContext *tc, uint64_t ns);
void quiesceCycles(ThreadContext *tc, uint64_t cycles);
uint64_t quiesceTime(ThreadContext *tc);
+uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
+ uint64_t offset);
+void loadsymbol(ThreadContext *xc);
+void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
+#endif
+
uint64_t rpns(ThreadContext *tc);
void m5exit(ThreadContext *tc, Tick delay);
-void loadsymbol(ThreadContext *xc);
void resetstats(ThreadContext *tc, Tick delay, Tick period);
void dumpstats(ThreadContext *tc, Tick delay, Tick period);
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period);
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period);
-uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
- uint64_t offset);
void debugbreak(ThreadContext *tc);
void switchcpu(ThreadContext *tc);
-void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
-/* namespace PsuedoInst */ }
+/* namespace PseudoInst */ }