43 #ifndef __SIM_PSEUDO_INST_HH__ 44 #define __SIM_PSEUDO_INST_HH__ 46 #include <gem5/asm/generic/m5ops.h> 50 #include "arch/pseudo_inst.hh" 51 #include "arch/utility.hh" 53 #include "debug/PseudoInst.hh" 95 func =
bits(offset, 15, 8);
107 uint64_t offset,
Addr filenameAddr);
137 template <
typename ABI>
145 invokeSimcall<ABI>(tc,
arm);
149 invokeSimcall<ABI>(tc,
quiesce);
152 case M5OP_QUIESCE_NS:
156 case M5OP_QUIESCE_CYCLE:
160 case M5OP_QUIESCE_TIME:
164 return invokeSimcall<ABI>(tc,
rpns);
167 invokeSimcall<ABI>(tc,
wakeCPU);
171 invokeSimcall<ABI>(tc,
m5exit);
175 invokeSimcall<ABI>(tc,
m5fail);
178 case M5OP_INIT_PARAM:
179 return invokeSimcall<ABI>(tc,
initParam);
181 case M5OP_LOAD_SYMBOL:
185 case M5OP_RESET_STATS:
189 case M5OP_DUMP_STATS:
193 case M5OP_DUMP_RESET_STATS:
197 case M5OP_CHECKPOINT:
201 case M5OP_WRITE_FILE:
202 return invokeSimcall<ABI>(tc,
writefile);
205 return invokeSimcall<ABI>(tc,
readfile);
207 case M5OP_DEBUG_BREAK:
211 case M5OP_SWITCH_CPU:
215 case M5OP_ADD_SYMBOL:
220 panic(
"M5 panic instruction called at %s\n", tc->pcState());
222 case M5OP_WORK_BEGIN:
227 invokeSimcall<ABI>(tc,
workend);
235 warn(
"Unimplemented m5 op (%#x)\n", func);
239 case M5OP_SE_SYSCALL:
243 case M5OP_SE_PAGE_FAULT:
248 case M5OP_DIST_TOGGLE_SYNC:
253 warn(
"Unhandled m5 op: %#x\n", func);
262 #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 getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
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)
uint64_t Tick
Tick count type.
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.
uint64_t pseudoInst(ThreadContext *tc, uint8_t func)
Execute a decoded M5 pseudo instruction.
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)