41 #ifndef __SIM_PSEUDO_INST_HH__ 42 #define __SIM_PSEUDO_INST_HH__ 44 #include <gem5/asm/generic/m5ops.h> 48 #include "arch/pseudo_inst.hh" 49 #include "arch/utility.hh" 51 #include "debug/PseudoInst.hh" 93 func =
bits(offset, 15, 8);
105 uint64_t offset,
Addr filenameAddr);
137 template <
typename ABI>
147 invokeSimcall<ABI>(tc,
arm);
151 invokeSimcall<ABI>(tc,
quiesce);
154 case M5OP_QUIESCE_NS:
158 case M5OP_QUIESCE_CYCLE:
162 case M5OP_QUIESCE_TIME:
167 result = invokeSimcall<ABI>(tc,
rpns);
171 invokeSimcall<ABI>(tc,
wakeCPU);
175 invokeSimcall<ABI>(tc,
m5exit);
179 invokeSimcall<ABI>(tc,
m5fail);
182 case M5OP_INIT_PARAM:
183 result = invokeSimcall<ABI>(tc,
initParam);
186 case M5OP_LOAD_SYMBOL:
190 case M5OP_RESET_STATS:
194 case M5OP_DUMP_STATS:
198 case M5OP_DUMP_RESET_STATS:
202 case M5OP_CHECKPOINT:
206 case M5OP_WRITE_FILE:
207 result = invokeSimcall<ABI>(tc,
writefile);
211 result = invokeSimcall<ABI>(tc,
readfile);
214 case M5OP_DEBUG_BREAK:
218 case M5OP_SWITCH_CPU:
222 case M5OP_ADD_SYMBOL:
227 panic(
"M5 panic instruction called at %s\n", tc->pcState());
229 case M5OP_WORK_BEGIN:
234 invokeSimcall<ABI>(tc,
workend);
242 warn(
"Unimplemented m5 op (%#x)\n", func);
246 case M5OP_SE_SYSCALL:
250 case M5OP_SE_PAGE_FAULT:
255 case M5OP_DIST_TOGGLE_SYNC:
260 warn(
"Unhandled m5 op: %#x\n", func);
267 #endif // __SIM_PSEUDO_INST_HH__ #define panic(...)
This implements a cprintf based panic() function.
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
void m5PageFault(ThreadContext *tc)
void quiesceNs(ThreadContext *tc, uint64_t ns)
void arm(ThreadContext *tc)
static void decodeAddrOffset(Addr offset, uint8_t &func)
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
uint64_t quiesceTime(ThreadContext *tc)
void quiesceSkip(ThreadContext *tc)
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void togglesync(ThreadContext *tc)
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
void quiesce(ThreadContext *tc)
bool pseudoInst(ThreadContext *tc, uint8_t func, uint64_t &result)
Execute a decoded M5 pseudo instruction.
uint64_t Tick
Tick count type.
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
void switchcpu(ThreadContext *tc)
static void store(ThreadContext *tc, const T &ret)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void debugbreak(ThreadContext *tc)
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void resetstats(ThreadContext *tc, Tick delay, Tick period)
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
void m5exit(ThreadContext *tc, Tick delay)
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
void loadsymbol(ThreadContext *tc)
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void m5Syscall(ThreadContext *tc)
uint64_t rpns(ThreadContext *tc)