diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-09-19 03:39:58 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-09-19 03:39:58 -0700 |
commit | 44659cb608bb46023be49c07ecf7ff0fb542b4ab (patch) | |
tree | bf79a8037190a2473e5004acdd594944c23c3817 /src/sim/pseudo_inst.hh | |
parent | 7701c5b1ecc128b97121f0cb99743983c9492115 (diff) | |
download | gem5-44659cb608bb46023be49c07ecf7ff0fb542b4ab.tar.xz |
PseudoInst: Make all the pseudo insts available in SE and FS.
Diffstat (limited to 'src/sim/pseudo_inst.hh')
-rw-r--r-- | src/sim/pseudo_inst.hh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh index 95ef0d187..673ec6170 100644 --- a/src/sim/pseudo_inst.hh +++ b/src/sim/pseudo_inst.hh @@ -46,6 +46,7 @@ extern bool doCheckpointInsts; extern bool doQuiesce; #if FULL_SYSTEM + void arm(ThreadContext *tc); void quiesce(ThreadContext *tc); void quiesceSkip(ThreadContext *tc); @@ -57,6 +58,69 @@ uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, void loadsymbol(ThreadContext *xc); void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr); uint64_t initParam(ThreadContext *xc); + +#else + +static inline void +panicFsOnlyPseudoInst(const char *name) +{ + panic("Pseudo inst \"%s\" is only available in Full System mode."); +} + +static inline void +arm(ThreadContext *tc) +{ + panicFsOnlyPseudoInst("arm"); +} +static inline void +quiesce(ThreadContext *tc) +{ + panicFsOnlyPseudoInst("quiesce"); +} +static inline void +quiesceSkip(ThreadContext *tc) +{ + panicFsOnlyPseudoInst("quiesceSkip"); +} +static inline void +quiesceNs(ThreadContext *tc, uint64_t ns) +{ + panicFsOnlyPseudoInst("quiesceNs"); +} +static inline void +quiesceCycles(ThreadContext *tc, uint64_t cycles) +{ + panicFsOnlyPseudoInst("quiesceCycles"); +} +static inline uint64_t +quiesceTime(ThreadContext *tc) +{ + panicFsOnlyPseudoInst("quiesceTime"); + return 0; +} +static inline uint64_t +readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset) +{ + panicFsOnlyPseudoInst("readFile"); + return 0; +} +static inline void +loadsymbol(ThreadContext *xc) +{ + panicFsOnlyPseudoInst("loadSymbol"); +} +static inline void +addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr) +{ + panicFsOnlyPseudoInst("addSymbol"); +} +static inline uint64_t +initParam(ThreadContext *tc) +{ + panicFsOnlyPseudoInst("initParam"); + return 0; +} + #endif uint64_t rpns(ThreadContext *tc); |