40 #ifndef __ARCH_ARM_SVE_MACROMEM_HH__ 41 #define __ARCH_ARM_SVE_MACROMEM_HH__ 43 #include "arch/arm/generated/decoder.hh" 48 template <
typename Element,
49 template <
typename>
class MicroopLdMemType,
50 template <
typename>
class MicroopDeIntrlvType>
65 dest(_dest), gp(_gp), base(_base), offset(_offset), numregs(_numregs)
72 microOps[
i] =
new MicroopLdMemType<Element>(
74 _gp, _base, _offset, _numregs,
i);
86 (*uop)->setDelayedCommit();
93 panic(
"Execute method called when it shouldn't!");
100 std::stringstream
ss;
119 template <
typename Element,
120 template <
typename>
class MicroopStMemType,
121 template <
typename>
class MicroopIntrlvType>
136 dest(_dest), gp(_gp), base(_base), offset(_offset), numregs(_numregs)
143 microOps[
i] =
new MicroopIntrlvType<Element>(
145 _dest, _numregs,
i,
this);
151 _gp, _base, _offset, _numregs,
i);
158 (*uop)->setDelayedCommit();
165 panic(
"Execute method called when it shouldn't!");
172 std::stringstream
ss;
192 template <
typename Element,
193 template <
typename>
class MicroopLdMemType,
194 template <
typename>
class MicroopDeIntrlvType>
207 int64_t _imm, uint8_t _numregs)
209 dest(_dest), gp(_gp), base(_base), imm(_imm), numregs(_numregs)
216 microOps[
i] =
new MicroopLdMemType<Element>(
218 _gp, _base, _imm, _numregs,
i);
230 (*uop)->setDelayedCommit();
237 panic(
"Execute method called when it shouldn't!");
244 std::stringstream
ss;
264 template <
typename Element,
265 template <
typename>
class MicroopStMemType,
266 template <
typename>
class MicroopIntrlvType>
279 int64_t _imm, uint8_t _numregs)
281 dest(_dest), gp(_gp), base(_base), imm(_imm), numregs(_numregs)
288 microOps[
i] =
new MicroopIntrlvType<Element>(
290 _dest, _numregs,
i,
this);
296 _gp, _base, _imm, _numregs,
i);
303 (*uop)->setDelayedCommit();
310 panic(
"Execute method called when it shouldn't!");
317 std::stringstream
ss;
337 template <
typename RegElemType,
typename MemElemType,
338 template <
typename,
typename>
class MicroopType,
339 template <
typename>
class FirstFaultWritebackMicroopType>
351 uint64_t _imm,
bool firstFault)
353 dest(_dest), gp(_gp), base(_base), imm(_imm)
356 assert(!firstFault || isLoad);
358 int num_elems = ((machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
379 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
380 mnem, machInst, _base,
this);
384 for (
int i = 0;
i < num_elems;
i++, uop++) {
385 *uop =
new MicroopType<RegElemType, MemElemType>(
386 mnem,
machInst, __opClass, _dest, _gp,
388 num_elems, firstFault);
392 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
393 mnem,
machInst, __opClass, num_elems,
this);
402 (*uop)->setDelayedCommit();
409 panic(
"Execute method called when it shouldn't!");
417 std::stringstream
ss;
426 ccprintf(ss,
", #%d", imm *
sizeof(MemElemType));
433 template <
typename RegElemType,
typename MemElemType,
434 template <
typename,
typename>
class MicroopType,
435 template <
typename>
class FirstFaultWritebackMicroopType>
452 bool _offsetIsSigned,
bool _offsetIsScaled,
455 dest(_dest), gp(_gp), base(_base), offset(_offset),
456 offsetIs32(_offsetIs32), offsetIsSigned(_offsetIsSigned),
457 offsetIsScaled(_offsetIsScaled)
460 assert(!firstFault || isLoad);
462 int num_elems = ((machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
483 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
484 mnem, machInst, _offset,
this);
488 for (
int i = 0;
i < num_elems;
i++, uop++) {
489 *uop =
new MicroopType<RegElemType, MemElemType>(
490 mnem,
machInst, __opClass, _dest, _gp, _base,
492 _offsetIsSigned, _offsetIsScaled,
i, num_elems, firstFault);
496 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
497 mnem,
machInst, __opClass, num_elems,
this);
506 (*uop)->setDelayedCommit();
513 panic(
"Execute method called when it shouldn't!");
521 std::stringstream
ss;
538 #endif // __ARCH_ARM_SVE_MACROMEM_HH__ #define panic(...)
This implements a cprintf based panic() function.
void ccprintf(cp::Print &print)
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
decltype(nullptr) constexpr NoFault
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Fault execute(ExecContext *, Trace::InstRecord *) const
Fault execute(ExecContext *, Trace::InstRecord *) const
SveLdStructSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, IntRegIndex _offset, uint8_t _numregs)
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
SveStStructSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, int64_t _imm, uint8_t _numregs)
Fault execute(ExecContext *, Trace::InstRecord *) const
SveStStructSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, IntRegIndex _offset, uint8_t _numregs)
void printVecPredReg(std::ostream &os, RegIndex reg_idx) const
const ExtMachInst machInst
The binary machine instruction.
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
void printVecReg(std::ostream &os, RegIndex reg_idx, bool isSveVecReg=false) const
void printIntReg(std::ostream &os, RegIndex reg_idx, uint8_t opWidth=0) const
Print a register name for disassembly given the unique dependence tag number (FP or int)...
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Fault execute(ExecContext *, Trace::InstRecord *) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
SveIndexedMemVI(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, uint64_t _imm, bool firstFault)
static const OpClass MemReadOp
SveLdStructSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, int64_t _imm, uint8_t _numregs)
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Fault execute(ExecContext *, Trace::InstRecord *) const
Base class for predicated macro-operations.
Fault execute(ExecContext *, Trace::InstRecord *) const
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
std::shared_ptr< FaultBase > Fault
SveIndexedMemSV(const char *mnem, ExtMachInst machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base, IntRegIndex _offset, bool _offsetIs32, bool _offsetIsSigned, bool _offsetIsScaled, bool firstFault)
bool isLastMicroop() const