48 #ifndef __ARCH_RISCV_UTILITY_HH__ 49 #define __ARCH_RISCV_UTILITY_HH__ 65 template<
typename T>
inline bool 71 template<>
inline bool 74 return std::isnan(
val)
75 && (
reinterpret_cast<uint32_t&
>(
val)&0x00400000);
78 template<>
inline bool 81 return std::isnan(
val)
82 && (
reinterpret_cast<uint64_t&
>(
val)&0x0008000000000000ULL);
85 template<
typename T>
inline bool 91 template<>
inline bool 94 return std::isnan(
val)
95 && (
reinterpret_cast<uint32_t&
>(
val)&0x00200000);
98 template<>
inline bool 101 return std::isnan(
val)
102 && (
reinterpret_cast<uint64_t&
>(
val)&0x0004000000000000ULL);
110 retPC.
pc(curPC.
npc());
145 std::stringstream str;
146 str <<
"?? (x" << reg.
index() <<
')';
152 std::stringstream str;
153 str <<
"?? (f" << reg.
index() <<
')';
163 panic(
"Not Implemented for Riscv");
186 #endif // __ARCH_RISCV_UTILITY_HH__ #define panic(...)
This implements a cprintf based panic() function.
const std::vector< std::string > IntRegNames
bool issignalingnan< double >(double val)
virtual TheISA::PCState pcState() const =0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
bool isquietnan< double >(double val)
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
static bool inUserMode(ThreadContext *tc)
const std::vector< std::string > FloatRegNames
std::string registerName(RegId reg)
bool isquietnan< float >(float val)
bool issignalingnan(T val)
uint64_t getExecutingAsid(ThreadContext *tc)
PCState buildRetPC(const PCState &curPC, const PCState &callPC)
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
bool issignalingnan< float >(float val)
virtual void advancePC(TheISA::PCState &pcState) const =0
const RegIndex & index() const
Index accessors.
Register ID: describe an architectural register with its class and index.
void skipFunction(ThreadContext *tc)
void copyRegs(ThreadContext *src, ThreadContext *dest)
void advancePC(PCState &pc, const StaticInstPtr &inst)