45 using namespace MipsISA;
54 if (base ==
ULL(0xfffffc0000000000))
75 pd = vp.readGtoH<uint16_t>(task +
pid_off);
137 const MachInst mem_mask = 0xffff0000;
138 const MachInst lda_pattern = 0x23de0000;
139 const MachInst lda_disp_mask = 0x0000ffff;
151 const MachInst intop_mask = 0xffe01fff;
152 const MachInst addq_pattern = 0x43c0141e;
153 const MachInst subq_pattern = 0x43c0153e;
154 const MachInst intop_disp_mask = 0x001fe000;
155 const int intop_disp_shift = 13;
157 if ((inst & mem_mask) == lda_pattern)
158 disp = -sext<16>(inst & lda_disp_mask);
159 else if ((inst & intop_mask) == addq_pattern)
160 disp = -
int((inst & intop_disp_mask) >> intop_disp_shift);
161 else if ((inst & intop_mask) == subq_pattern)
162 disp =
int((inst & intop_disp_mask) >> intop_disp_shift);
178 const MachInst stq_mask = 0xfc1f0000;
179 const MachInst stq_pattern = 0xb41e0000;
180 const MachInst stq_disp_mask = 0x0000ffff;
181 const MachInst reg_mask = 0x03e00000;
182 const int reg_shift = 21;
184 if ((inst & stq_mask) == stq_pattern) {
185 reg = (inst & reg_mask) >> reg_shift;
186 disp = sext<16>(inst & stq_disp_mask);
232 panic(
"Stack trace dump not implemented.\n");
A TranslatingPortProxy in FS mode translates a virtual address to a physical address and then calls t...
void trace(ThreadContext *tc, bool is_call)
void CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
MipsISA::MachInst MachInst
bool decodeSave(MachInst inst, int ®, int &disp)
std::vector< Addr > stack
bool decodePrologue(Addr sp, Addr callpc, Addr func, int &size, Addr &ra)
Addr task(Addr ksp) const
void CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
std::string name(Addr ksp) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
virtual FSTranslatingPortProxy & getVirtProxy()=0
const int ReturnAddressReg
TranslatingPortProxy Object Declaration for FS.
void dump()
Dump all statistics data to the registered outputs.
bool decodeStack(MachInst inst, int &disp)