38 #ifndef __ARCH_ARM_SVE_MACROMEM_HH__ 39 #define __ARCH_ARM_SVE_MACROMEM_HH__ 41 #include "arch/arm/generated/decoder.hh" 46 template <
typename Element,
47 template <
typename>
class MicroopLdMemType,
48 template <
typename>
class MicroopDeIntrlvType>
63 dest(_dest), gp(_gp), base(_base), offset(_offset), numregs(_numregs)
70 microOps[
i] =
new MicroopLdMemType<Element>(
72 _gp, _base, _offset, _numregs,
i);
84 (*uop)->setDelayedCommit();
91 panic(
"Execute method called when it shouldn't!");
117 template <
typename Element,
118 template <
typename>
class MicroopStMemType,
119 template <
typename>
class MicroopIntrlvType>
134 dest(_dest), gp(_gp), base(_base), offset(_offset), numregs(_numregs)
141 microOps[
i] =
new MicroopIntrlvType<Element>(
143 _dest, _numregs,
i,
this);
149 _gp, _base, _offset, _numregs,
i);
156 (*uop)->setDelayedCommit();
163 panic(
"Execute method called when it shouldn't!");
170 std::stringstream
ss;
190 template <
typename Element,
191 template <
typename>
class MicroopLdMemType,
192 template <
typename>
class MicroopDeIntrlvType>
205 int64_t _imm, uint8_t _numregs)
207 dest(_dest), gp(_gp), base(_base), imm(_imm), numregs(_numregs)
214 microOps[
i] =
new MicroopLdMemType<Element>(
216 _gp, _base, _imm, _numregs,
i);
228 (*uop)->setDelayedCommit();
235 panic(
"Execute method called when it shouldn't!");
242 std::stringstream
ss;
262 template <
typename Element,
263 template <
typename>
class MicroopStMemType,
264 template <
typename>
class MicroopIntrlvType>
277 int64_t _imm, uint8_t _numregs)
279 dest(_dest), gp(_gp), base(_base), imm(_imm), numregs(_numregs)
286 microOps[
i] =
new MicroopIntrlvType<Element>(
288 _dest, _numregs,
i,
this);
294 _gp, _base, _imm, _numregs,
i);
301 (*uop)->setDelayedCommit();
308 panic(
"Execute method called when it shouldn't!");
315 std::stringstream
ss;
335 template <
typename RegElemType,
typename MemElemType,
336 template <
typename,
typename>
class MicroopType,
337 template <
typename>
class FirstFaultWritebackMicroopType>
349 uint64_t _imm,
bool firstFault)
351 dest(_dest), gp(_gp), base(_base), imm(_imm)
354 assert(!firstFault || isLoad);
356 int num_elems = ((machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
377 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
378 mnem, machInst, _base,
this);
382 for (
int i = 0;
i < num_elems;
i++, uop++) {
383 *uop =
new MicroopType<RegElemType, MemElemType>(
384 mnem,
machInst, __opClass, _dest, _gp,
386 num_elems, firstFault);
390 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
391 mnem,
machInst, __opClass, num_elems,
this);
400 (*uop)->setDelayedCommit();
407 panic(
"Execute method called when it shouldn't!");
415 std::stringstream
ss;
424 ccprintf(ss,
", #%d", imm *
sizeof(MemElemType));
431 template <
typename RegElemType,
typename MemElemType,
432 template <
typename,
typename>
class MicroopType,
433 template <
typename>
class FirstFaultWritebackMicroopType>
450 bool _offsetIsSigned,
bool _offsetIsScaled,
453 dest(_dest), gp(_gp), base(_base), offset(_offset),
454 offsetIs32(_offsetIs32), offsetIsSigned(_offsetIsSigned),
455 offsetIsScaled(_offsetIsScaled)
458 assert(!firstFault || isLoad);
460 int num_elems = ((machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
481 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
482 mnem, machInst, _offset,
this);
486 for (
int i = 0;
i < num_elems;
i++, uop++) {
487 *uop =
new MicroopType<RegElemType, MemElemType>(
488 mnem,
machInst, __opClass, _dest, _gp, _base,
490 _offsetIsSigned, _offsetIsScaled,
i, num_elems, firstFault);
494 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
495 mnem,
machInst, __opClass, num_elems,
this);
504 (*uop)->setDelayedCommit();
511 panic(
"Execute method called when it shouldn't!");
519 std::stringstream
ss;
536 #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
decltype(nullptr) constexpr NoFault
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)
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)
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
Internal function to generate disassembly string.
void printVecPredReg(std::ostream &os, RegIndex reg_idx) const
const ExtMachInst machInst
The binary machine instruction.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
Internal function to generate disassembly string.
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 Loader::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 Loader::SymbolTable *symtab) const
Internal function to generate disassembly string.
Fault execute(ExecContext *, Trace::InstRecord *) const
Base class for predicated macro-operations.
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
Internal function to generate disassembly string.
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
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
Internal function to generate disassembly string.