summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-06-29 21:38:16 -0400
committerKevin Lim <ktlim@umich.edu>2006-06-29 21:38:16 -0400
commit0fbecab797ffe7fc68e3a9af9fd0a21df37ec635 (patch)
tree4983720f62cd4fc1ee57690678228e5aca75d531 /src/sim
parentad6788493c09aec456a1136f126abde7000696ab (diff)
parentde90be348239a0a58ebb659dfc6a2f2fe5909292 (diff)
downloadgem5-0fbecab797ffe7fc68e3a9af9fd0a21df37ec635.tar.xz
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge --HG-- extra : convert_revision : 0756f7f1f63fae472e0ef1d20e9eb38e56de78c8
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/debug.cc4
-rw-r--r--src/sim/faults.hh4
-rw-r--r--src/sim/process.cc5
-rw-r--r--src/sim/sim_object.cc1
-rw-r--r--src/sim/stat_control.cc3
-rw-r--r--src/sim/system.cc1
6 files changed, 5 insertions, 13 deletions
diff --git a/src/sim/debug.cc b/src/sim/debug.cc
index b82219f7d..be9566836 100644
--- a/src/sim/debug.cc
+++ b/src/sim/debug.cc
@@ -127,12 +127,12 @@ DebugContext::checkParams()
// handy function to schedule DebugBreakEvent on main event queue
// (callable from debugger)
//
-extern "C" void sched_break_cycle(Tick when)
+void sched_break_cycle(Tick when)
{
new DebugBreakEvent(&mainEventQueue, when);
}
-extern "C" void eventq_dump()
+void eventq_dump()
{
mainEventQueue.dump();
}
diff --git a/src/sim/faults.hh b/src/sim/faults.hh
index 23385c649..00264d8fc 100644
--- a/src/sim/faults.hh
+++ b/src/sim/faults.hh
@@ -54,11 +54,7 @@ class FaultBase : public RefCounted
{
public:
virtual FaultName name() = 0;
-#if FULL_SYSTEM
virtual void invoke(ThreadContext * tc);
-#else
- virtual void invoke(ThreadContext * tc);
-#endif
// template<typename T>
// bool isA() {return dynamic_cast<T *>(this);}
virtual bool isMachineCheckFault() {return false;}
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 5080c3ac1..9cdc5b9f5 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -326,11 +326,10 @@ LiveProcess::argsInit(int intSize, int pageSize)
// set bottom of stack
stack_min = stack_base - space_needed;
// align it
- stack_min &= ~(intSize-1);
+ stack_min = roundDown(stack_min, pageSize);
stack_size = stack_base - stack_min;
// map memory
- pTable->allocate(roundDown(stack_min, pageSize),
- roundUp(stack_size, pageSize));
+ pTable->allocate(stack_min, roundUp(stack_size, pageSize));
// map out initial stack contents
Addr argv_array_base = stack_min + intSize; // room for argc
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc
index 5752e4ef1..551555b25 100644
--- a/src/sim/sim_object.cc
+++ b/src/sim/sim_object.cc
@@ -256,7 +256,6 @@ SimObject::debugObjectBreak(const string &objs)
}
}
-extern "C"
void
debugObjectBreak(const char *objs)
{
diff --git a/src/sim/stat_control.cc b/src/sim/stat_control.cc
index f7fc03d74..041830ab7 100644
--- a/src/sim/stat_control.cc
+++ b/src/sim/stat_control.cc
@@ -221,8 +221,7 @@ SetupEvent(int flags, Tick when, Tick repeat)
/* namespace Stats */ }
-extern "C" void
-debugDumpStats()
+void debugDumpStats()
{
Stats::DumpNow();
}
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 91bba85fe..89e7b8542 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -243,7 +243,6 @@ System::printSystems()
}
}
-extern "C"
void
printSystems()
{