53 if (base ==
ULL(0xfffffc0000000000))
136 const MachInst mem_mask = 0xffff0000;
137 const MachInst lda_pattern = 0x23de0000;
138 const MachInst lda_disp_mask = 0x0000ffff;
150 const MachInst intop_mask = 0xffe01fff;
151 const MachInst addq_pattern = 0x43c0141e;
152 const MachInst subq_pattern = 0x43c0153e;
153 const MachInst intop_disp_mask = 0x001fe000;
154 const int intop_disp_shift = 13;
156 if ((inst & mem_mask) == lda_pattern)
157 disp = -sext<16>(inst & lda_disp_mask);
158 else if ((inst & intop_mask) == addq_pattern)
159 disp = -
int((inst & intop_disp_mask) >> intop_disp_shift);
160 else if ((inst & intop_mask) == subq_pattern)
161 disp =
int((inst & intop_disp_mask) >> intop_disp_shift);
177 const MachInst stq_mask = 0xfc1f0000;
178 const MachInst stq_pattern = 0xb41e0000;
179 const MachInst stq_disp_mask = 0x0000ffff;
180 const MachInst reg_mask = 0x03e00000;
181 const int reg_shift = 21;
183 if ((inst & stq_mask) == stq_pattern) {
184 reg = (inst & reg_mask) >> reg_shift;
185 disp = sext<16>(inst & stq_disp_mask);
230 panic(
"Stack trace dump not implemented.\n");
#define panic(...)
This implements a cprintf based panic() function.
ProcessInfo(ThreadContext *_tc)
virtual PortProxy & getVirtProxy()=0
T read(Addr address) const
Read sizeof(T) bytes from address and return as object T.
std::string name(Addr ksp) const
void trace(ThreadContext *tc, bool is_call)
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
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
This object is a proxy for a port or other object which implements the functional response protocol...
void readString(std::string &str, Addr addr) const
Same as tryReadString, but insists on success.
const int ReturnAddressReg
TranslatingPortProxy Object Declaration for FS.
void dump()
Dump all statistics data to the registered outputs.
bool decodeStack(MachInst inst, int &disp)
const ByteOrder GuestByteOrder