Go to the documentation of this file.
41 #ifndef __SIM_PSEUDO_INST_HH__
42 #define __SIM_PSEUDO_INST_HH__
44 #include <gem5/asm/generic/m5ops.h>
53 #include "debug/PseudoInst.hh"
83 uint64_t
d, uint64_t
e, uint64_t
f);
109 template <
typename ABI,
bool store_ret>
119 invokeSimcall<ABI>(tc,
arm);
123 invokeSimcall<ABI>(tc,
quiesce);
126 case M5OP_QUIESCE_NS:
130 case M5OP_QUIESCE_CYCLE:
134 case M5OP_QUIESCE_TIME:
135 result = invokeSimcall<ABI, store_ret>(tc,
quiesceTime);
139 result = invokeSimcall<ABI, store_ret>(tc,
rpns);
143 invokeSimcall<ABI>(tc,
wakeCPU);
147 invokeSimcall<ABI>(tc,
m5exit);
151 invokeSimcall<ABI>(tc,
m5fail);
156 result = invokeSimcall<ABI, store_ret>(tc,
m5sum);
159 case M5OP_INIT_PARAM:
160 result = invokeSimcall<ABI, store_ret>(tc,
initParam);
163 case M5OP_LOAD_SYMBOL:
167 case M5OP_RESET_STATS:
171 case M5OP_DUMP_STATS:
175 case M5OP_DUMP_RESET_STATS:
179 case M5OP_CHECKPOINT:
183 case M5OP_WRITE_FILE:
184 result = invokeSimcall<ABI, store_ret>(tc,
writefile);
188 result = invokeSimcall<ABI, store_ret>(tc,
readfile);
191 case M5OP_DEBUG_BREAK:
195 case M5OP_SWITCH_CPU:
199 case M5OP_ADD_SYMBOL:
204 panic(
"M5 panic instruction called at %s\n", tc->
pcState());
206 case M5OP_WORK_BEGIN:
211 invokeSimcall<ABI>(tc,
workend);
219 warn(
"Unimplemented m5 op (%#x)\n", func);
223 case M5OP_DIST_TOGGLE_SYNC:
232 warn(
"Unhandled m5 op: %#x\n", func);
237 template <
typename ABI,
bool store_ret=false>
241 return pseudoInstWork<ABI, store_ret>(tc, func, result);
244 template <
typename ABI,
bool store_ret=true>
249 return pseudoInstWork<ABI, store_ret>(tc, func, result);
254 #endif // __SIM_PSEUDO_INST_HH__
void debugbreak(ThreadContext *tc)
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void m5Syscall(ThreadContext *tc)
void m5exit(ThreadContext *tc, Tick delay)
uint64_t Tick
Tick count type.
uint64_t rpns(ThreadContext *tc)
static void decodeAddrOffset(Addr offset, uint8_t &func)
uint64_t quiesceTime(ThreadContext *tc)
bool pseudoInst(ThreadContext *tc, uint8_t func, uint64_t &result)
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
void switchcpu(ThreadContext *tc)
void togglesync(ThreadContext *tc)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
void quiesceSkip(ThreadContext *tc)
void triggerWorkloadEvent(ThreadContext *tc)
uint64_t m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
virtual TheISA::PCState pcState() const =0
void quiesce(ThreadContext *tc)
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
void arm(ThreadContext *tc)
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
void quiesceNs(ThreadContext *tc, uint64_t ns)
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
void loadsymbol(ThreadContext *tc)
void resetstats(ThreadContext *tc, Tick delay, Tick period)
bool pseudoInstWork(ThreadContext *tc, uint8_t func, uint64_t &result)
Execute a decoded M5 pseudo instruction.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Mar 23 2021 19:41:28 for gem5 by doxygen 1.8.17