Go to the documentation of this file.
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");
141 if (
reg.isIntReg()) {
152 std::stringstream str;
153 str <<
"?? (x" <<
reg.index() <<
')';
159 std::stringstream str;
160 str <<
"?? (f" <<
reg.index() <<
')';
187 #endif // __ARCH_RISCV_UTILITY_HH__
const std::vector< int > ArgumentRegs
virtual void advancePC(TheISA::PCState &pcState) const =0
static bool inUserMode(ThreadContext *tc)
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
bool issignalingnan< float >(float val)
bool isquietnan< float >(float val)
const std::vector< std::string > FloatRegNames
void copyRegs(ThreadContext *src, ThreadContext *dest)
Register ID: describe an architectural register with its class and index.
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU.
uint64_t getExecutingAsid(ThreadContext *tc)
const std::vector< std::string > IntRegNames
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
bool issignalingnan(T val)
bool issignalingnan< double >(double val)
virtual TheISA::PCState pcState() const =0
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
virtual void setFloatReg(RegIndex reg_idx, RegVal val)=0
GenericISA::DelaySlotPCState< MachInst > PCState
bool isquietnan< double >(double val)
std::string registerName(RegId reg)
PCState buildRetPC(const PCState &curPC, const PCState &callPC)
virtual RegVal readIntReg(RegIndex reg_idx) const =0
void advancePC(PCState &pc, const StaticInstPtr &inst)
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17