61 warn(
"Software breakpoint encountered at pc %#x.",
pc.pc());
64 warn(
"Software signaled a division by zero at pc %#x.",
pc.pc());
70 warn(
"Ignoring process request for clean register "
71 "windows at pc %#x.",
pc.pc());
74 warn(
"Software signaled a range check at pc %#x.",
pc.pc());
77 warn(
"Ignoring process request for os assisted unaligned accesses "
78 "at pc %#x.",
pc.pc());
81 warn(
"Software signaled an integer overflow at pc %#x.",
pc.pc());
84 warn(
"Ignoring process request to get the integer condition codes "
85 "at pc %#x.",
pc.pc());
88 warn(
"Ignoring process request to set the integer condition codes "
89 "at pc %#x.",
pc.pc());
92 panic(
"Unimplemented trap to operating system: trap number %#x.",
106 const bool is_64 =
is64(tc);
107 const size_t reg_bytes = is_64 ? 8 : 4;
124 uint64_t regVal = htobe<uint64_t>(tc->
getReg(
reg));
125 memcpy(bytes, ®Val, reg_bytes);
127 uint32_t regVal = htobe<uint32_t>(tc->
getReg(
reg));
128 memcpy(bytes, ®Val, reg_bytes);
131 warn(
"Failed to save register to the stack when "
132 "flushing windows.");
Register ID: describe an architectural register with its class and index.
virtual void handleTrap(ThreadContext *tc, int trapNum)
bool is64(ThreadContext *tc)
virtual void flushWindows(ThreadContext *tc)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual RegVal getReg(const RegId ®) const
virtual const PCStateBase & pcState() const =0
virtual void setReg(const RegId ®, RegVal val)
virtual Process * getProcessPtr()=0
bool tryWriteBlob(Addr addr, const void *p, int size) const override
Version of tryWriteBlob that translates virt->phys and deals with page boundries.
#define panic(...)
This implements a cprintf based panic() function.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
constexpr RegId Canrestore
constexpr RegClass intRegClass
constexpr auto & StackPointerReg
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static const std::vector< RegId > ArgumentRegs