46 #ifndef __ARCH_RISCV_UTILITY_HH__
47 #define __ARCH_RISCV_UTILITY_HH__
59 template<
typename T>
inline bool
65 template<>
inline bool
68 return std::isnan(
val)
69 && (
reinterpret_cast<uint32_t&
>(
val)&0x00400000);
72 template<>
inline bool
75 return std::isnan(
val)
76 && (
reinterpret_cast<uint64_t&
>(
val)&0x0008000000000000ULL);
79 template<
typename T>
inline bool
85 template<>
inline bool
88 return std::isnan(
val)
89 && (
reinterpret_cast<uint32_t&
>(
val)&0x00200000);
92 template<>
inline bool
95 return std::isnan(
val)
96 && (
reinterpret_cast<uint64_t&
>(
val)&0x0004000000000000ULL);
104 retPC.
pc(curPC.
npc());
132 panic(
"Not Implemented for Riscv");
156 panic(
"initCPU not implemented for Riscv.\n");
161 #endif // __ARCH_RISCV_UTILITY_HH__
bool issignalingnan< double >(double val)
bool isquietnan< double >(double val)
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
virtual void setIntReg(int reg_idx, uint64_t val)=0
virtual TheISA::PCState pcState()=0
ThreadContext is the external interface to all thread state for anything outside of the CPU...
static bool inUserMode(ThreadContext *tc)
void startupCPU(ThreadContext *tc, int cpuId)
GenericISA::UPCState< MachInst > PCState
virtual uint64_t readIntReg(int reg_idx)=0
bool isquietnan< float >(float val)
bool issignalingnan(T val)
uint64_t getExecutingAsid(ThreadContext *tc)
PCState buildRetPC(const PCState &curPC, const PCState &callPC)
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
void skipFunction(ThreadContext *tc)
void initCPU(ThreadContext *, int cpuId)
void copyRegs(ThreadContext *src, ThreadContext *dest)
void advancePC(PCState &pc, const StaticInstPtr &inst)