44 #ifndef __ARCH_RISCV_UTILITY_HH__ 45 #define __ARCH_RISCV_UTILITY_HH__ 61 template<
typename T>
inline bool 67 template<>
inline bool 70 return std::isnan(
val)
71 && (
reinterpret_cast<uint32_t&
>(
val)&0x00400000);
74 template<>
inline bool 77 return std::isnan(
val)
78 && (
reinterpret_cast<uint64_t&
>(
val)&0x0008000000000000ULL);
81 template<
typename T>
inline bool 87 template<>
inline bool 90 return std::isnan(
val)
91 && (
reinterpret_cast<uint32_t&
>(
val)&0x00200000);
94 template<>
inline bool 97 return std::isnan(
val)
98 && (
reinterpret_cast<uint64_t&
>(
val)&0x0004000000000000ULL);
106 retPC.
pc(curPC.
npc());
113 panic_if(fp,
"getArgument(): Floating point arguments not implemented");
114 panic_if(size != 8,
"getArgument(): Can only handle 64-bit arguments.");
116 "getArgument(): Don't know how to handle stack arguments");
148 std::stringstream str;
149 str <<
"?? (x" << reg.
index() <<
')';
155 std::stringstream str;
156 str <<
"?? (f" << reg.
index() <<
')';
183 #endif // __ARCH_RISCV_UTILITY_HH__ const std::vector< std::string > IntRegNames
const std::vector< int > ArgumentRegs
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.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void copyRegs(ThreadContext *src, ThreadContext *dest)
void advancePC(PCState &pc, const StaticInstPtr &inst)