29#ifndef __ARCH_RISCV_INSTS_VECTOR_HH__
30#define __ARCH_RISCV_INSTS_VECTOR_HH__
74 uint32_t _elen, OpClass __opClass)
82 this->
flags[IsVector] =
true;
93 const uint8_t
vsew =
bits(vtype, 5, 3);
111 this->
flags[IsVector] =
true;
126 OpClass __opClass, uint32_t _vlen = 256)
132 this->
flags[IsVector] =
true;
144 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen = 256)
151 this->
flags[IsVector] =
true;
171 std::stringstream
ss;
181 OpClass __opClass, uint32_t _microVl,
194 OpClass __opClass, uint32_t _vlen = 256)
197 this->
flags[IsVector] =
true;
207 OpClass __opClass, uint32_t _microVl,
220 OpClass __opClass, uint32_t _vlen)
223 this->
flags[IsVector] =
true;
234 OpClass __opClass, uint32_t _vlen = 256)
237 this->
flags[IsVector] =
true;
250 OpClass __opClass, uint32_t _microVl,
251 uint32_t _microIdx, uint32_t _vdIdx, uint32_t _vs2Idx)
267 OpClass __opClass, uint32_t _microVl,
268 uint32_t _microIdx, uint32_t _offset)
279 OpClass __opClass, uint32_t _vlen = 256)
288 OpClass __opClass, uint32_t _vlen)
300 OpClass __opClass, uint32_t _vlen)
318 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
323 this->
flags[IsLoad] =
true;
336 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
340 this->
flags[IsStore] =
true;
351 OpClass __opClass, uint32_t _vlen)
365 OpClass __opClass, uint32_t _microVl, uint32_t _microIdx,
379 OpClass __opClass, uint32_t _vlen)
393 OpClass __opClass, uint32_t _microVl,
394 uint32_t _microIdx, uint32_t _vlen)
407 OpClass __opClass, uint32_t _vlen)
420 OpClass __opClass, uint32_t _regIdx,
421 uint32_t _microIdx, uint32_t _microVl)
435 OpClass __opClass, uint32_t _vlen)
448 OpClass __opClass, uint32_t _regIdx,
449 uint32_t _microIdx, uint32_t _microVl)
463 OpClass __opClass, uint32_t _vlen)
479 OpClass __opClass, uint32_t _vdRegIdx, uint32_t _vdElemIdx,
480 uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
495 OpClass __opClass, uint32_t _vlen)
511 OpClass __opClass, uint32_t _vs3RegIdx,
512 uint32_t _vs3ElemIdx, uint32_t _vs2RegIdx,
513 uint32_t _vs2ElemIdx)
539 OpClass __opClass, uint32_t _microVl,
559 uint8_t _dstReg, uint8_t _numSrcs, uint32_t _vlen,
size_t _elemSize);
590 uint32_t _microIdx, uint32_t _vlen,
603 OpClass __opClass, uint32_t _vlen)
618 OpClass __opClass, uint32_t _microVl,
619 uint32_t _microIdx, uint32_t _numMicroops,
620 uint32_t _field, uint32_t _numFields,
625 this->
flags[IsLoad] =
true;
647 uint32_t _dstReg, uint32_t _numSrcs,
648 uint32_t _microIdx, uint32_t _numMicroops,
649 uint32_t _field, uint32_t _vlen,
650 uint32_t _sizeOfElement);
662 OpClass __opClass, uint32_t _vlen)
677 OpClass __opClass, uint32_t _microVl,
678 uint32_t _microIdx, uint32_t _numMicroops,
679 uint32_t _field, uint32_t _numFields,
684 this->
flags[IsStore] =
true;
706 uint32_t _dstReg, uint32_t _numSrcs,
707 uint32_t _microIdx, uint32_t _numMicroops,
708 uint32_t _field, uint32_t _vlen,
709 uint32_t _sizeOfElement);
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Register ID: describe an architectural register with its class and index.
Base class for all RISC-V Macroops.
Base class for all RISC-V Microops.
Base class for all RISC-V static instructions.
Base class for Vector Config operations.
VConfOp(const char *mnem, ExtMachInst _extMachInst, uint32_t _elen, OpClass __opClass)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateZimmDisassembly() const
VMaskMergeMicroInst(ExtMachInst extMachInst, uint8_t _dstReg, uint8_t _numSrcs, uint32_t _vlen, size_t _elemSize)
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *, trace::InstRecord *) const override
RegId srcRegIdxArr[NumVecInternalRegs]
VMvWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VMvWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorArithMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
VectorArithMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
VectorMemMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
Request::Flags memAccessFlags
VectorMemMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _offset)
VectorMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen=256)
VectorNonSplitInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorNopMicroInst(ExtMachInst _machInst)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorSlideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorSlideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vdIdx, uint32_t _vs2Idx)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VectorVMUNARY0MacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
VectorVMUNARY0MicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
std::unique_ptr< PCStateBase > branchTarget(ThreadContext *) const override
Return the target address for an indirect branch (jump).
std::vector< StaticInstPtr > & microops
VlFFTrimVlMicroOp(ExtMachInst _machInst, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen, std::vector< StaticInstPtr > &_microops)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VlIndexMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VlIndexMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vdRegIdx, uint32_t _vdElemIdx, uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
VlSegDeIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl, uint32_t _dstReg, uint32_t _numSrcs, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _vlen, uint32_t _sizeOfElement)
Fault execute(ExecContext *, trace::InstRecord *) const override
RegId srcRegIdxArr[NumVecInternalRegs]
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
VlSegMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Request::Flags memAccessFlags
VlSegMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _numFields, uint32_t _vlen)
VlStrideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VlStrideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _regIdx, uint32_t _microIdx, uint32_t _microVl)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VlWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VlWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Request::Flags memAccessFlags
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VleMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
VleMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Request::Flags memAccessFlags
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsIndexMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsIndexMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vs3RegIdx, uint32_t _vs3ElemIdx, uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
VsSegIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl, uint32_t _dstReg, uint32_t _numSrcs, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _vlen, uint32_t _sizeOfElement)
RegId srcRegIdxArr[NumVecInternalRegs]
Fault execute(ExecContext *, trace::InstRecord *) const override
VsSegMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsSegMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _numFields, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Request::Flags memAccessFlags
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsStrideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsStrideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _regIdx, uint32_t _microIdx, uint32_t _microVl)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VsWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Request::Flags memAccessFlags
VsWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
VseMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Request::Flags memAccessFlags
VseMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *, trace::InstRecord *) const override
VxsatMicroInst(bool *Vxsat, ExtMachInst extMachInst)
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
const char * mnemonic
Base mnemonic (e.g., "add").
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.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
float getVflmul(uint32_t vlmul_encoding)
This function translates the 3-bit value of vlmul bits to the corresponding lmul value as specified i...
const int NumVecInternalRegs
uint8_t checked_vtype(bool vill, uint8_t vtype)
Bitfield< 29, 20 > zimm_vsetivli
uint32_t getVlmax(VTYPE vtype, uint32_t vlen)
Bitfield< 19, 15 > uimm_vsetivli
Bitfield< 30, 20 > zimm_vsetvli
uint32_t getSew(uint32_t vsew)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static const OpClass SimdMiscOp
constexpr decltype(nullptr) NoFault