From: Gabe Black Date: Mon, 19 Sep 2011 10:39:58 +0000 (-0700) Subject: PseudoInst: Make all the pseudo insts available in SE and FS. X-Git-Tag: stable_2012_02_02~76 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44659cb608bb46023be49c07ecf7ff0fb542b4ab;p=gem5.git PseudoInst: Make all the pseudo insts available in SE and FS. --- 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);