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 RegElemType,
typename MemElemType,
343 template <
typename,
typename>
class MicroopType,
344 template <
typename>
class FirstFaultWritebackMicroopType>
356 uint64_t _imm,
bool firstFault)
361 assert(!firstFault ||
isLoad);
363 int num_elems = ((
machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
384 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
389 for (
int i = 0;
i < num_elems;
i++, uop++) {
390 *uop =
new MicroopType<RegElemType, MemElemType>(
391 mnem,
machInst, __opClass, _dest, _gp,
393 num_elems, firstFault);
397 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
398 mnem,
machInst, __opClass, num_elems,
this);
407 (*uop)->setDelayedCommit();
414 panic(
"Execute method called when it shouldn't!");
423 std::stringstream
ss;
439template <
typename RegElemType,
typename MemElemType,
440 template <
typename,
typename>
class MicroopType,
441 template <
typename>
class FirstFaultWritebackMicroopType>
458 bool _offsetIsSigned,
bool _offsetIsScaled,
466 assert(!firstFault ||
isLoad);
468 int num_elems = ((
machInst.sveLen + 1) * 16) /
sizeof(RegElemType);
489 *uop =
new ArmISAInst::SveGatherLoadCpySrcVecMicroop(
494 for (
int i = 0;
i < num_elems;
i++, uop++) {
495 *uop =
new MicroopType<RegElemType, MemElemType>(
496 mnem,
machInst, __opClass, _dest, _gp, _base,
498 _offsetIsSigned, _offsetIsScaled,
i, num_elems, firstFault);
502 *uop =
new FirstFaultWritebackMicroopType<RegElemType>(
503 mnem,
machInst, __opClass, num_elems,
this);
512 (*uop)->setDelayedCommit();
519 panic(
"Execute method called when it shouldn't!");
528 std::stringstream
ss;
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) 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).
void printVecPredReg(std::ostream &os, RegIndex reg_idx) const
Base class for predicated macro-operations.
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
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.
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...
bool isLastMicroop() const
#define panic(...)
This implements a cprintf based panic() function.
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.
constexpr decltype(nullptr) NoFault
void ccprintf(cp::Print &print)
static const OpClass MemReadOp