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;
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
virtual PCStateBase * clone() const =0
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Base class for all RISC-V Macroops.
std::vector< StaticInstPtr > microops
Fault initiateAcc(ExecContext *xc, trace::InstRecord *traceData) const override
Fault completeAcc(PacketPtr pkt, ExecContext *xc, trace::InstRecord *traceData) const override
RiscvMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
StaticInstPtr fetchMicroop(MicroPC upc) const override
Return the microop that goes with a particular micropc.
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Base class for all RISC-V Microops.
RiscvMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
void advancePC(PCStateBase &pcState) const override
Base class for all RISC-V static instructions.
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...
bool alignmentOk(ExecContext *xc, Addr addr, Addr size) const
std::unique_ptr< PCStateBase > buildRetPC(const PCStateBase &cur_pc, const PCStateBase &call_pc) const override
void advancePC(ThreadContext *tc) const override
int64_t rvSext(int64_t x) const
T rvSelect(T v32, T v64) const
void advancePC(PCStateBase &pc) const override
uint64_t rvZext(uint64_t x) const
RiscvStaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
Base, ISA-independent static instruction class.
size_t simpleAsBytes(void *buf, size_t max_size, const T &t)
std::bitset< Num_Flags > flags
Flag values for this instruction.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual const PCStateBase & pcState() const =0
#define panic(...)
This implements a cprintf based panic() function.
constexpr enums::RiscvType RV32
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of the Packet class.