38#ifndef __ARCH_ARM_SVE_MACROMEM_HH__
39#define __ARCH_ARM_SVE_MACROMEM_HH__
41#include "arch/arm/generated/decoder.hh"
49template <
typename Element,
50 template <
typename>
class MicroopLdMemType,
51 template <
typename>
class MicroopDeIntrlvType>
73 microOps[
i] =
new MicroopLdMemType<Element>(
75 _gp, _base, _offset, _numregs,
i);
87 (*uop)->setDelayedCommit();
94 panic(
"Execute method called when it shouldn't!");
102 std::stringstream
ss;
121template <
typename Element,
122 template <
typename>
class MicroopStMemType,
123 template <
typename>
class MicroopIntrlvType>
145 microOps[
i] =
new MicroopIntrlvType<Element>(
147 _dest, _numregs,
i,
this);
153 _gp, _base, _offset, _numregs,
i);
160 (*uop)->setDelayedCommit();
167 panic(
"Execute method called when it shouldn't!");
175 std::stringstream
ss;
195template <
typename Element,
196 template <
typename>
class MicroopLdMemType,
197 template <
typename>
class MicroopDeIntrlvType>
210 int64_t _imm, uint8_t _numregs)
219 microOps[
i] =
new MicroopLdMemType<Element>(
221 _gp, _base, _imm, _numregs,
i);
233 (*uop)->setDelayedCommit();
240 panic(
"Execute method called when it shouldn't!");
248 std::stringstream
ss;
268template <
typename Element,
269 template <
typename>
class MicroopStMemType,
270 template <
typename>
class MicroopIntrlvType>
283 int64_t _imm, uint8_t _numregs)
292 microOps[
i] =
new MicroopIntrlvType<Element>(
294 _dest, _numregs,
i,
this);
300 _gp, _base, _imm, _numregs,
i);
307 (*uop)->setDelayedCommit();
314 panic(
"Execute method called when it shouldn't!");
322 std::stringstream
ss;
342template <
typename Element,
template <
typename>
class MicroopLdMemType>
369 microOps[
i] =
new MicroopLdMemType<Element>(
370 mnem,
machInst, uop_dest, _gp, _base, _offset, _numregs,
i);
377 (*uop)->setDelayedCommit();
384 panic(
"Execute method called when it shouldn't!");
392 std::stringstream
ss;
412template <
typename Element,
template <
typename>
class MicroopStMemType>
439 microOps[
i] =
new MicroopStMemType<Element>(
440 mnem,
machInst, uop_dest, _gp, _base, _offset, _numregs,
i);
447 (*uop)->setDelayedCommit();
454 panic(
"Execute method called when it shouldn't!");
462 std::stringstream
ss;
482template <
typename Element,
template <
typename>
class MicroopLdMemType>
495 RegIndex _base, int64_t _imm, uint8_t _numregs)
509 microOps[
i] =
new MicroopLdMemType<Element>(
510 mnem,
machInst, uop_dest, _gp, _base, _imm, _numregs,
i);
517 (*uop)->setDelayedCommit();
524 panic(
"Execute method called when it shouldn't!");
532 std::stringstream
ss;
553template <
typename Element,
template <
typename>
class MicroopStMemType>
566 RegIndex _base, int64_t _imm, uint8_t _numregs)
580 microOps[
i] =
new MicroopStMemType<Element>(
581 mnem,
machInst, uop_dest, _gp, _base, _imm, _numregs,
i);
588 (*uop)->setDelayedCommit();
595 panic(
"Execute method called when it shouldn't!");
603 std::stringstream
ss;
624template <
typename RegElemType,
typename MemElemType,
625 template <
typename,
typename>
class MicroopType,
626 template <
typename>
class FirstFaultWritebackMicroopType>
638 uint64_t _imm,
bool firstFault)
643 assert(!firstFault ||
isLoad);
645 int num_elems = ((
machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
660 for (
int i = 0;
i < num_elems;
i++, uop++) {
661 *uop =
new MicroopType<RegElemType, MemElemType>(
664 num_elems, firstFault);
671 *uop =
new ArmISAInst::SveGatherLoadCpyDstVecMicroop(
677 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
678 mnem,
machInst, __opClass, num_elems,
this);
683 (*uop)->setLastMicroop();
687 (*uop)->setDelayedCommit();
694 panic(
"Execute method called when it shouldn't!");
703 std::stringstream
ss;
719template <
typename RegElemType,
typename MemElemType,
720 template <
typename,
typename>
class MicroopType,
721 template <
typename>
class FirstFaultWritebackMicroopType>
738 bool _offsetIsSigned,
bool _offsetIsScaled,
746 assert(!firstFault ||
isLoad);
748 int num_elems = ((
machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
763 for (
int i = 0;
i < num_elems;
i++, uop++) {
764 *uop =
new MicroopType<RegElemType, MemElemType>(
767 _offsetIs32, _offsetIsSigned, _offsetIsScaled,
i, num_elems,
775 *uop =
new ArmISAInst::SveGatherLoadCpyDstVecMicroop(
781 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
782 mnem,
machInst, __opClass, num_elems,
this);
787 (*uop)->setLastMicroop();
791 (*uop)->setDelayedCommit();
798 panic(
"Execute method called when it shouldn't!");
807 std::stringstream
ss;
822template <
typename RegElemType,
typename MemElemType,
823 template <
typename,
typename>
class MicroopType,
824 template <
typename>
class FirstFaultWritebackMicroopType>
848 int num_elems = ((
machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
859 for (
int i = 0;
i < num_elems;
i++, uop++) {
860 *uop =
new MicroopType<RegElemType, MemElemType>(
863 _offsetIs32,
i, num_elems);
870 *uop =
new ArmISAInst::SveGatherLoadCpyDstVecMicroop(
881 (*uop)->setDelayedCommit();
888 panic(
"Execute method called when it shouldn't!");
897 std::stringstream
ss;
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
void printVecPredReg(std::ostream &os, RegIndex reg_idx, bool is_png=false) const
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).
PredMacroOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveIndexedMemSV(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, bool _offsetIs32, bool _offsetIsSigned, bool _offsetIsScaled, bool firstFault)
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveIndexedMemVI(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, uint64_t _imm, bool firstFault)
Fault execute(ExecContext *, trace::InstRecord *) const override
SveIndexedMemVS(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, bool _offsetIs32)
Fault execute(ExecContext *, trace::InstRecord *) const override
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.
Fault execute(ExecContext *, trace::InstRecord *) const override
SveLdContigConseSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, int64_t _imm, uint8_t _numregs)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveLdContigConseSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, uint8_t _numregs)
Fault execute(ExecContext *, trace::InstRecord *) const override
SveLdStructSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, int64_t _imm, uint8_t _numregs)
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveLdStructSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, uint8_t _numregs)
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *, trace::InstRecord *) const override
SveStContigConseSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, int64_t _imm, uint8_t _numregs)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveStContigConseSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, uint8_t _numregs)
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
SveStStructSI(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, int64_t _imm, uint8_t _numregs)
Fault execute(ExecContext *, trace::InstRecord *) const override
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Fault execute(ExecContext *, trace::InstRecord *) const override
SveStStructSS(const char *mnem, ExtMachInst machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset, uint8_t _numregs)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RefCountingPtr< StaticInst > StaticInstPtr
constexpr decltype(nullptr) NoFault
void ccprintf(cp::Print &print)
static const OpClass MemReadOp