summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/async.hh12
-rw-r--r--src/sim/debug.cc2
-rw-r--r--src/sim/eventq.hh28
-rw-r--r--src/sim/host.hh4
-rw-r--r--src/sim/insttracer.hh4
-rw-r--r--src/sim/process.hh14
-rw-r--r--src/sim/serialize.cc32
-rw-r--r--src/sim/serialize.hh36
-rw-r--r--src/sim/sim_events.hh16
-rw-r--r--src/sim/syscall_emul.cc6
-rw-r--r--src/sim/syscall_emul.hh24
11 files changed, 89 insertions, 89 deletions
diff --git a/src/sim/async.hh b/src/sim/async.hh
index 932f975d2..6dd5b8a0d 100644
--- a/src/sim/async.hh
+++ b/src/sim/async.hh
@@ -42,12 +42,12 @@
/// then checked in the main event loop. Defined in main.cc.
/// @note See the PollQueue object (in pollevent.hh) for the use of async_io and async_alarm.
//@{
-extern volatile bool async_event; ///< Some asynchronous event has happened.
-extern volatile bool async_statdump; ///< Async request to dump stats.
-extern volatile bool async_statreset; ///< Async request to reset stats.
-extern volatile bool async_exit; ///< Async request to exit simulator.
-extern volatile bool async_io; ///< Async I/O request (SIGIO).
-extern volatile bool async_alarm; ///< Async alarm event (SIGALRM).
+extern volatile bool async_event; ///< Some asynchronous event has happened.
+extern volatile bool async_statdump; ///< Async request to dump stats.
+extern volatile bool async_statreset; ///< Async request to reset stats.
+extern volatile bool async_exit; ///< Async request to exit simulator.
+extern volatile bool async_io; ///< Async I/O request (SIGIO).
+extern volatile bool async_alarm; ///< Async alarm event (SIGALRM).
extern volatile bool async_exception; ///< Python exception.
//@}
diff --git a/src/sim/debug.cc b/src/sim/debug.cc
index 36ac4efac..5a65f096a 100644
--- a/src/sim/debug.cc
+++ b/src/sim/debug.cc
@@ -62,7 +62,7 @@ class DebugBreakEvent : public Event
DebugBreakEvent(EventQueue *q, Tick _when);
- void process(); // process event
+ void process(); // process event
virtual const char *description() const;
};
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index bc9b2353f..2003c64ee 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -48,7 +48,7 @@
#include "sim/serialize.hh"
#include "sim/host.hh"
-class EventQueue; // forward declaration
+class EventQueue; // forward declaration
//////////////////////
//
@@ -93,8 +93,8 @@ class Event : public Serializable, public FastAlloc
/// scheduled on this queue yet)
EventQueue *_queue;
- Tick _when; //!< timestamp when event should be processed
- short _priority; //!< event priority
+ Tick _when; //!< timestamp when event should be processed
+ short _priority; //!< event priority
short _flags;
#ifndef NDEBUG
@@ -141,7 +141,7 @@ class Event : public Serializable, public FastAlloc
EventQueue *queue() const { return _queue; }
// This function isn't really useful if TRACING_ON is not defined
- virtual void trace(const char *action); //!< trace event activity
+ virtual void trace(const char *action); //!< trace event activity
public:
/// Event priorities, to provide tie-breakers for events scheduled
@@ -150,7 +150,7 @@ class Event : public Serializable, public FastAlloc
/// be ordered within a cycle.
enum Priority {
/// Minimum priority
- Minimum_Pri = SHRT_MIN,
+ Minimum_Pri = SHRT_MIN,
/// If we enable tracing on a particular cycle, do that as the
/// very first thing so we don't miss any of the events on
@@ -160,44 +160,44 @@ class Event : public Serializable, public FastAlloc
/// Breakpoints should happen before anything else (except
/// enabling trace output), so we don't miss any action when
/// debugging.
- Debug_Break_Pri = -100,
+ Debug_Break_Pri = -100,
/// CPU switches schedule the new CPU's tick event for the
/// same cycle (after unscheduling the old CPU's tick event).
/// The switch needs to come before any tick events to make
/// sure we don't tick both CPUs in the same cycle.
- CPU_Switch_Pri = -31,
+ CPU_Switch_Pri = -31,
/// For some reason "delayed" inter-cluster writebacks are
/// scheduled before regular writebacks (which have default
/// priority). Steve?
- Delayed_Writeback_Pri = -1,
+ Delayed_Writeback_Pri = -1,
/// Default is zero for historical reasons.
- Default_Pri = 0,
+ Default_Pri = 0,
/// Serailization needs to occur before tick events also, so
/// that a serialize/unserialize is identical to an on-line
/// CPU switch.
- Serialize_Pri = 32,
+ Serialize_Pri = 32,
/// CPU ticks must come after other associated CPU events
/// (such as writebacks).
- CPU_Tick_Pri = 50,
+ CPU_Tick_Pri = 50,
/// Statistics events (dump, reset, etc.) come after
/// everything else, but before exit.
- Stat_Event_Pri = 90,
+ Stat_Event_Pri = 90,
/// Progress events come at the end.
Progress_Event_Pri = 95,
/// If we want to exit on this cycle, it's the very last thing
/// we do.
- Sim_Exit_Pri = 100,
+ Sim_Exit_Pri = 100,
/// Maximum priority
- Maximum_Pri = SHRT_MAX
+ Maximum_Pri = SHRT_MAX
};
/*
diff --git a/src/sim/host.hh b/src/sim/host.hh
index 93a5fe7f2..518873ab3 100644
--- a/src/sim/host.hh
+++ b/src/sim/host.hh
@@ -42,9 +42,9 @@
/** uint64_t constant */
-#define ULL(N) ((uint64_t)N##ULL)
+#define ULL(N) ((uint64_t)N##ULL)
/** int64_t constant */
-#define LL(N) ((int64_t)N##LL)
+#define LL(N) ((int64_t)N##LL)
/** Statistics counter type. Not much excuse for not using a 64-bit
* integer here, but if you're desperate and only run short
diff --git a/src/sim/insttracer.hh b/src/sim/insttracer.hh
index 9a20c7c56..39a5536b0 100644
--- a/src/sim/insttracer.hh
+++ b/src/sim/insttracer.hh
@@ -34,7 +34,7 @@
#include "base/bigint.hh"
#include "base/trace.hh"
-#include "cpu/inst_seq.hh" // for InstSeqNum
+#include "cpu/inst_seq.hh" // for InstSeqNum
#include "cpu/static_inst.hh"
#include "sim/host.hh"
#include "sim/sim_object.hh"
@@ -71,7 +71,7 @@ class InstRecord
} data;
enum {
DataInvalid = 0,
- DataInt8 = 1, // set to equal number of bytes
+ DataInt8 = 1, // set to equal number of bytes
DataInt16 = 2,
DataInt32 = 4,
DataInt64 = 8,
diff --git a/src/sim/process.hh b/src/sim/process.hh
index 55bae2542..cb59fed64 100644
--- a/src/sim/process.hh
+++ b/src/sim/process.hh
@@ -95,17 +95,17 @@ class Process : public SimObject
WaitRec(Addr chan, ThreadContext *ctx)
: waitChan(chan), waitingContext(ctx)
- { }
+ { }
};
// list of all blocked contexts
std::list<WaitRec> waitList;
- Addr brk_point; // top of the data segment
+ Addr brk_point; // top of the data segment
- Addr stack_base; // stack segment base (highest address)
- unsigned stack_size; // initial stack size
- Addr stack_min; // lowest address accessed on the stack
+ Addr stack_base; // stack segment base (highest address)
+ unsigned stack_size; // initial stack size
+ Addr stack_min; // lowest address accessed on the stack
// The maximum size allowed for the stack.
Addr max_stack_size;
@@ -121,9 +121,9 @@ class Process : public SimObject
Addr nxm_start;
Addr nxm_end;
- std::string prog_fname; // file name
+ std::string prog_fname; // file name
- Stats::Scalar<> num_syscalls; // number of syscalls executed
+ Stats::Scalar<> num_syscalls; // number of syscalls executed
protected:
diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc
index a0d17f489..7050779b2 100644
--- a/src/sim/serialize.cc
+++ b/src/sim/serialize.cc
@@ -321,23 +321,23 @@ objParamIn(Checkpoint *cp, const std::string &section,
}
-#define INSTANTIATE_PARAM_TEMPLATES(type) \
-template void \
-paramOut(ostream &os, const std::string &name, type const &param); \
-template void \
-paramIn(Checkpoint *cp, const std::string &section, \
- const std::string &name, type & param); \
-template void \
-arrayParamOut(ostream &os, const std::string &name, \
- type const *param, int size); \
-template void \
-arrayParamIn(Checkpoint *cp, const std::string &section, \
+#define INSTANTIATE_PARAM_TEMPLATES(type) \
+template void \
+paramOut(ostream &os, const std::string &name, type const &param); \
+template void \
+paramIn(Checkpoint *cp, const std::string &section, \
+ const std::string &name, type & param); \
+template void \
+arrayParamOut(ostream &os, const std::string &name, \
+ type const *param, int size); \
+template void \
+arrayParamIn(Checkpoint *cp, const std::string &section, \
const std::string &name, type *param, int size); \
-template void \
-arrayParamOut(ostream &os, const std::string &name, \
- const std::vector<type> &param); \
-template void \
-arrayParamIn(Checkpoint *cp, const std::string &section, \
+template void \
+arrayParamOut(ostream &os, const std::string &name, \
+ const std::vector<type> &param); \
+template void \
+arrayParamIn(Checkpoint *cp, const std::string &section, \
const std::string &name, std::vector<type> &param);
INSTANTIATE_PARAM_TEMPLATES(signed char)
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index e72eedb30..4c5f399e6 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -82,33 +82,33 @@ objParamIn(Checkpoint *cp, const std::string &section,
// These macros are streamlined to use in serialize/unserialize
// functions. It's assumed that serialize() has a parameter 'os' for
// the ostream, and unserialize() has parameters 'cp' and 'section'.
-#define SERIALIZE_SCALAR(scalar) paramOut(os, #scalar, scalar)
+#define SERIALIZE_SCALAR(scalar) paramOut(os, #scalar, scalar)
-#define UNSERIALIZE_SCALAR(scalar) paramIn(cp, section, #scalar, scalar)
+#define UNSERIALIZE_SCALAR(scalar) paramIn(cp, section, #scalar, scalar)
// ENUMs are like SCALARs, but we cast them to ints on the way out
-#define SERIALIZE_ENUM(scalar) paramOut(os, #scalar, (int)scalar)
+#define SERIALIZE_ENUM(scalar) paramOut(os, #scalar, (int)scalar)
-#define UNSERIALIZE_ENUM(scalar) \
- do { \
- int tmp; \
- paramIn(cp, section, #scalar, tmp); \
- scalar = (typeof(scalar))tmp; \
+#define UNSERIALIZE_ENUM(scalar) \
+ do { \
+ int tmp; \
+ paramIn(cp, section, #scalar, tmp); \
+ scalar = (typeof(scalar))tmp; \
} while (0)
-#define SERIALIZE_ARRAY(member, size) \
+#define SERIALIZE_ARRAY(member, size) \
arrayParamOut(os, #member, member, size)
-#define UNSERIALIZE_ARRAY(member, size) \
+#define UNSERIALIZE_ARRAY(member, size) \
arrayParamIn(cp, section, #member, member, size)
-#define SERIALIZE_OBJPTR(objptr) paramOut(os, #objptr, (objptr)->name())
+#define SERIALIZE_OBJPTR(objptr) paramOut(os, #objptr, (objptr)->name())
-#define UNSERIALIZE_OBJPTR(objptr) \
- do { \
- SimObject *sptr; \
- objParamIn(cp, section, #objptr, sptr); \
- objptr = dynamic_cast<typeof(objptr)>(sptr); \
+#define UNSERIALIZE_OBJPTR(objptr) \
+ do { \
+ SimObject *sptr; \
+ objParamIn(cp, section, #objptr, sptr); \
+ objptr = dynamic_cast<typeof(objptr)>(sptr); \
} while (0)
/*
@@ -211,8 +211,8 @@ class SerializableClass
// SerializableBuilder and SerializableClass objects
//
-#define REGISTER_SERIALIZEABLE(CLASS_NAME, OBJ_CLASS) \
-SerializableClass the##OBJ_CLASS##Class(CLASS_NAME, \
+#define REGISTER_SERIALIZEABLE(CLASS_NAME, OBJ_CLASS) \
+SerializableClass the##OBJ_CLASS##Class(CLASS_NAME, \
OBJ_CLASS::createForUnserialize);
void
diff --git a/src/sim/sim_events.hh b/src/sim/sim_events.hh
index 58ec963c0..6f9b7f612 100644
--- a/src/sim/sim_events.hh
+++ b/src/sim/sim_events.hh
@@ -58,15 +58,15 @@ class SimLoopExitEvent : public Event
{ setFlags(IsExitEvent); schedule(_when); }
// SimLoopExitEvent(EventQueue *q,
-// Tick _when, const std::string &_cause,
-// Tick _repeat = 0, int c = 0)
-// : Event(q, Sim_Exit_Pri), cause(_cause), code(c), repeat(_repeat)
+// Tick _when, const std::string &_cause,
+// Tick _repeat = 0, int c = 0)
+// : Event(q, Sim_Exit_Pri), cause(_cause), code(c), repeat(_repeat)
// { setFlags(IsExitEvent); schedule(_when); }
std::string getCause() { return cause; }
int getCode() { return code; }
- void process(); // process event
+ void process(); // process event
virtual const char *description() const;
};
@@ -95,14 +95,14 @@ class CountedDrainEvent : public SimLoopExitEvent
class CountedExitEvent : public Event
{
private:
- std::string cause; // string explaining why we're terminating
- int &downCounter; // decrement & terminate if zero
+ std::string cause; // string explaining why we're terminating
+ int &downCounter; // decrement & terminate if zero
public:
CountedExitEvent(EventQueue *q, const std::string &_cause,
Tick _when, int &_downCounter);
- void process(); // process event
+ void process(); // process event
virtual const char *description() const;
};
@@ -120,7 +120,7 @@ class CheckSwapEvent : public Event
: Event(q), interval(ival)
{ schedule(curTick + interval); }
- void process(); // process event
+ void process(); // process event
virtual const char *description() const;
};
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 3f6c56b5f..e0e703815 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -558,7 +558,7 @@ getuidPseudoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
// EUID goes in r20.
tc->setIntReg(SyscallPseudoReturnReg, process->euid()); //EUID
- return process->uid(); // UID
+ return process->uid(); // UID
}
@@ -604,14 +604,14 @@ SyscallReturn
getuidFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
- return process->uid(); // UID
+ return process->uid(); // UID
}
SyscallReturn
geteuidFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
- return process->euid(); // UID
+ return process->euid(); // UID
}
SyscallReturn
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index caf269918..2e8071196 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -44,15 +44,15 @@
#include <errno.h>
#include <string>
#ifdef __CYGWIN32__
-#include <sys/fcntl.h> // for O_BINARY
+#include <sys/fcntl.h> // for O_BINARY
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/uio.h>
-#include "sim/host.hh" // for Addr
+#include "sim/host.hh" // for Addr
#include "base/chunk_generator.hh"
-#include "base/intmath.hh" // for RoundUp
+#include "base/intmath.hh" // for RoundUp
#include "base/misc.hh"
#include "base/trace.hh"
#include "cpu/base.hh"
@@ -72,9 +72,9 @@ class SyscallDesc {
typedef SyscallReturn (*FuncPtr)(SyscallDesc *, int num,
LiveProcess *, ThreadContext *);
- const char *name; //!< Syscall name (e.g., "open").
- FuncPtr funcPtr; //!< Pointer to emulation function.
- int flags; //!< Flags (see Flags enum).
+ const char *name; //!< Syscall name (e.g., "open").
+ FuncPtr funcPtr; //!< Pointer to emulation function.
+ int flags; //!< Flags (see Flags enum).
/// Flag values for controlling syscall behavior.
enum Flags {
@@ -117,7 +117,7 @@ class BaseBufferArg {
virtual bool copyIn(TranslatingPort *memport)
{
memport->readBlob(addr, bufPtr, size);
- return true; // no EFAULT detection for now
+ return true; // no EFAULT detection for now
}
//
@@ -126,7 +126,7 @@ class BaseBufferArg {
virtual bool copyOut(TranslatingPort *memport)
{
memport->writeBlob(addr, bufPtr, size);
- return true; // no EFAULT detection for now
+ return true; // no EFAULT detection for now
}
protected:
@@ -140,7 +140,7 @@ class BufferArg : public BaseBufferArg
{
public:
BufferArg(Addr _addr, int _size) : BaseBufferArg(_addr, _size) { }
- void *bufferPtr() { return bufPtr; }
+ void *bufferPtr() { return bufPtr; }
};
template <class T>
@@ -158,8 +158,8 @@ class TypedBufferArg : public BaseBufferArg
operator T*() { return (T *)bufPtr; }
// dereference operators
- T &operator*() { return *((T *)bufPtr); }
- T* operator->() { return (T *)bufPtr; }
+ T &operator*() { return *((T *)bufPtr); }
+ T* operator->() { return (T *)bufPtr; }
T &operator[](int i) { return ((T *)bufPtr)[i]; }
};
@@ -994,7 +994,7 @@ SyscallReturn
getrusageFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
- int who = tc->getSyscallArg(0); // THREAD, SELF, or CHILDREN
+ int who = tc->getSyscallArg(0); // THREAD, SELF, or CHILDREN
TypedBufferArg<typename OS::rusage> rup(tc->getSyscallArg(1));
rup->ru_utime.tv_sec = 0;