Go to the documentation of this file.
46 #ifndef __ARCH_RISCV_REGISTERS_HH__
47 #define __ARCH_RISCV_REGISTERS_HH__
49 #include <softfloat.h>
50 #include <specialize.h>
66 #define isBoxedF32(r) ((uint32_t)((r.v >> 32) + 1) == 0)
67 #define unboxF32(r) (isBoxedF32(r) ? (uint32_t)r.v : defaultNaNF32UI)
68 #define unboxF64(r) (r.v)
73 inline float32_t
f32(uint32_t
v) {
return {
v }; }
74 inline float64_t
f64(uint64_t
v) {
return {
v }; }
77 inline freg_t freg(float32_t
f) {
return {((uint64_t)-1 << 32) |
f.v}; }
80 #define F32_SIGN ((uint32_t)1 << 31)
81 #define F64_SIGN ((uint64_t)1 << 63)
82 #define fsgnj32(a, b, n, x) \
83 f32((f32(a).v & ~F32_SIGN) | \
84 ((((x) ? f32(a).v : (n) ? F32_SIGN : 0) ^ f32(b).v) & F32_SIGN))
85 #define fsgnj64(a, b, n, x) \
86 f64((f64(a).v & ~F64_SIGN) | \
87 ((((x) ? f64(a).v : (n) ? F64_SIGN : 0) ^ f64(b).v) & F64_SIGN))
89 #define sext32(x) ((sreg_t)(int32_t)(x))
90 #define zext32(x) ((reg_t)(uint32_t)(x))
91 #define sext_xlen(x) (((sreg_t)(x) << (64-xlen)) >> (64-xlen))
92 #define zext_xlen(x) (((reg_t)(x) << (64-xlen)) >> (64-xlen))
133 "zero",
"ra",
"sp",
"gp",
134 "tp",
"t0",
"t1",
"t2",
135 "s0",
"s1",
"a0",
"a1",
136 "a2",
"a3",
"a4",
"a5",
137 "a6",
"a7",
"s2",
"s3",
138 "s4",
"s5",
"s6",
"s7",
139 "s8",
"s9",
"s10",
"s11",
140 "t3",
"t4",
"t5",
"t6"
143 "ft0",
"ft1",
"ft2",
"ft3",
144 "ft4",
"ft5",
"ft6",
"ft7",
145 "fs0",
"fs1",
"fa0",
"fa1",
146 "fa2",
"fa3",
"fa4",
"fa5",
147 "fa6",
"fa7",
"fs2",
"fs3",
148 "fs4",
"fs5",
"fs6",
"fs7",
149 "fs8",
"fs9",
"fs10",
"fs11",
150 "ft8",
"ft9",
"ft10",
"ft11"
666 const off_t MXL_OFFSET = (
sizeof(uint64_t) * 8 - 2);
754 #endif // __ARCH_RISCV_REGISTERS_HH__
float32_t f32(uint32_t v)
constexpr size_t DummyVecRegSizeBytes
const int NumMicroIntRegs
const std::vector< int > ArgumentRegs
constexpr size_t DummyVecPredRegSizeBits
Generic predicate register container.
const RegVal MSTATUS_MASK
constexpr unsigned NumVecElemPerVecReg
const RegVal ISA_EXT_MASK
const std::map< int, RegVal > CSRMasks
const RegVal STATUS_MPRV_MASK
const RegVal STATUS_MPIE_MASK
const RegVal STATUS_MXR_MASK
const RegVal STATUS_FS_MASK
constexpr bool DummyVecPredRegHasPackedRepr
Dummy type aliases and constants for architectures that do not implement vector predicate registers.
const std::vector< std::string > FloatRegNames
const RegVal STATUS_TVM_MASK
const RegVal STATUS_SPP_MASK
const RegVal ISA_MXL_MASK
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, false > DummyVecPredReg
const unsigned NumVecRegs
const RegVal STATUS_SPIE_MASK
DummyVecReg::Container DummyVecRegContainer
constexpr size_t VecPredRegSizeBits
float64_t f64(uint64_t v)
const std::vector< std::string > IntRegNames
BitUnion64(SATP) Bitfield< 63
const RegVal STATUS_SXL_MASK
VecRegT< DummyVecElem, DummyNumVecElemPerVecReg, true > DummyConstVecReg
const RegVal STATUS_SUM_MASK
const RegVal ISA_EXT_C_MASK
const int ThreadPointerReg
uint32_t DummyVecElem
Dummy type aliases and constants for architectures that do not implement vector registers.
const RegVal SSTATUS_MASK
const RegVal STATUS_MIE_MASK
VecRegT< DummyVecElem, DummyNumVecElemPerVecReg, false > DummyVecReg
DummyVecPredReg::Container DummyVecPredRegContainer
const RegVal STATUS_MPP_MASK
const RegVal STATUS_UIE_MASK
EndBitUnion(SATP) enum AddrXlateMode
const RegVal STATUS_SD_MASK
constexpr bool VecPredRegHasPackedRepr
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, true > DummyConstVecPredReg
const RegVal STATUS_XS_MASK
constexpr unsigned DummyNumVecElemPerVecReg
const RegVal STATUS_UPIE_MASK
const RegVal STATUS_TW_MASK
const std::map< int, CSRMetadata > CSRData
const RegVal STATUS_SIE_MASK
const RegVal USTATUS_MASK
#define ULL(N)
uint64_t constant
constexpr size_t VecRegSizeBytes
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
const RegVal STATUS_UXL_MASK
const RegVal STATUS_TSR_MASK
Vector Register Abstraction This generic class is a view in a particularization of MVC,...
const int StackPointerReg
Generated on Tue Mar 23 2021 19:41:20 for gem5 by doxygen 1.8.17