Go to the documentation of this file.
30 #ifndef __ARCH_RISCV_STATIC_INST_HH__
31 #define __ARCH_RISCV_STATIC_INST_HH__
68 template <
typename T32,
typename T64>
70 uint64_t
rvZext(uint64_t
x)
const {
return rvExt<uint32_t, uint64_t>(
x); }
71 int64_t
rvSext(int64_t
x)
const {
return rvExt<int32_t, int64_t>(
x); }
90 std::unique_ptr<PCStateBase>
97 return std::unique_ptr<PCStateBase>{ret_pc_ptr};
119 flags[IsMacroop] =
true;
133 panic(
"Tried to execute a macroop directly!\n");
140 panic(
"Tried to execute a macroop directly!\n");
146 panic(
"Tried to execute a macroop directly!\n");
160 flags[IsMicroop] =
true;
170 #endif // __ARCH_RISCV_STATIC_INST_HH__
std::unique_ptr< PCStateBase > buildRetPC(const PCStateBase &cur_pc, const PCStateBase &call_pc) const override
T rvSelect(T v32, T v64) const
RiscvMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Base class for all RISC-V static instructions.
StaticInstPtr fetchMicroop(MicroPC upc) const override
Return the microop that goes with a particular micropc.
virtual const PCStateBase & pcState() const =0
size_t simpleAsBytes(void *buf, size_t max_size, const T &t)
Base class for all RISC-V Macroops.
RiscvStaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
RiscvMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
constexpr enums::RiscvType RV32
void advancePC(PCStateBase &pcState) const override
If you want a reference counting pointer to a mutable object, create it like this:
uint64_t rvZext(uint64_t x) const
Base, ISA-independent static instruction class.
void advancePC(PCStateBase &pc) const override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
size_t asBytes(void *buf, size_t size) override
Instruction classes can override this function to return a a representation of themselves as a blob o...
std::bitset< Num_Flags > flags
Flag values for this instruction.
int64_t rvSext(int64_t x) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Base class for all RISC-V Microops.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Fault initiateAcc(ExecContext *xc, trace::InstRecord *traceData) const override
bool alignmentOk(ExecContext *xc, Addr addr, Addr size) const
void advancePC(ThreadContext *tc) const override
std::vector< StaticInstPtr > microops
virtual PCStateBase * clone() const =0
Fault completeAcc(PacketPtr pkt, ExecContext *xc, trace::InstRecord *traceData) const override
#define panic(...)
This implements a cprintf based panic() function.
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Generated on Sun Jul 30 2023 01:56:48 for gem5 by doxygen 1.8.17