// Basic instruction class declaration template.
def template BasicDeclare {{
- /**
- * Static instruction class for "%(mnemonic)s".
- */
- class %(class_name)s : public %(base_class)s
- {
- public:
- /// Constructor.
- %(class_name)s(ExtMachInst machInst);
- Fault execute(ExecContext *,
- Trace::InstRecord *) const override;
- };
+ /**
+ * Static instruction class for "%(mnemonic)s".
+ */
+ class %(class_name)s : public %(base_class)s
+ {
+ public:
+ /// Constructor.
+ %(class_name)s(ExtMachInst machInst);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ };
}};
// Basic instruction class constructor template.
def template BasicConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
- {
- %(constructor)s;
- if (!(condCode == COND_AL || condCode == COND_UC)) {
- for (int x = 0; x < _numDestRegs; x++) {
- setSrcRegIdx(_numSrcRegs++, destRegIdx(x));
- }
- }
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ {
+ %(constructor)s;
+ if (!(condCode == COND_AL || condCode == COND_UC)) {
+ for (int x = 0; x < _numDestRegs; x++) {
+ setSrcRegIdx(_numSrcRegs++, destRegIdx(x));
+ }
}
+ }
}};
def template BasicConstructor64 {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
- {
- %(constructor)s;
- }
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ {
+ %(constructor)s;
+ }
}};
// Basic instruction class execute method template.
def template BasicExecute {{
- Fault %(class_name)s::execute(
+ Fault
+ %(class_name)s::execute(
ExecContext *xc, Trace::InstRecord *traceData) const
- {
- Fault fault = NoFault;
+ {
+ Fault fault = NoFault;
- %(op_decl)s;
- %(op_rd)s;
- %(code)s;
+ %(op_decl)s;
+ %(op_rd)s;
+ %(code)s;
- if (fault == NoFault)
- {
- %(op_wb)s;
- }
- return fault;
+ if (fault == NoFault) {
+ %(op_wb)s;
}
+ return fault;
+ }
}};
// Basic decode template.
def template BasicDecode {{
- return new %(class_name)s(machInst);
+ return new %(class_name)s(machInst);
}};
// Basic decode template, passing mnemonic in as string arg to constructor.
def template BasicDecodeWithMnemonic {{
- return new %(class_name)s("%(mnemonic)s", machInst);
+ return new %(class_name)s("%(mnemonic)s", machInst);
}};
def template BranchImmCondDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, int32_t _imm,
- ConditionCode _condCode);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
- ArmISA::PCState branchTarget(
- const ArmISA::PCState &branchPC) const override;
-
- /// Explicitly import the otherwise hidden branchTarget
- using StaticInst::branchTarget;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int32_t _imm,
+ ConditionCode _condCode);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ ArmISA::PCState branchTarget(
+ const ArmISA::PCState &branchPC) const override;
+
+ /// Explicitly import the otherwise hidden branchTarget
+ using StaticInst::branchTarget;
};
}};
def template BranchImmCondConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- int32_t _imm,
- ConditionCode _condCode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _imm, _condCode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, int32_t _imm,
+ ConditionCode _condCode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _condCode)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template BranchRegCondDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- ConditionCode _condCode);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ ConditionCode _condCode);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchRegCondConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- ConditionCode _condCode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _op1, _condCode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ ConditionCode _condCode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _condCode)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template BranchTableDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1, IntRegIndex _op2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
- Fault initiateAcc(ExecContext *, Trace::InstRecord *) const override;
- Fault completeAcc(PacketPtr, ExecContext *,
- Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault initiateAcc(ExecContext *, Trace::InstRecord *) const override;
+ Fault completeAcc(PacketPtr, ExecContext *,
+ Trace::InstRecord *) const override;
};
}};
def template BranchRegRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
+ IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template BranchImmRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- int32_t imm, IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
- ArmISA::PCState branchTarget(
- const ArmISA::PCState &branchPC) const override;
-
- /// Explicitly import the otherwise hidden branchTarget
- using StaticInst::branchTarget;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int32_t imm, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ ArmISA::PCState branchTarget(
+ const ArmISA::PCState &branchPC) const override;
+
+ /// Explicitly import the otherwise hidden branchTarget
+ using StaticInst::branchTarget;
};
}};
// Only used by CBNZ, CBZ which is conditional based on
// a register value even though the instruction is always unconditional.
def template BranchImmRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- int32_t _imm,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _op1)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, int32_t _imm,
+ IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _op1)
{
%(constructor)s;
flags[IsCondControl] = true;
def template BranchImm64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, int64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchImm64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- int64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, int64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
{
%(constructor)s;
}
def template BranchImmCond64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, int64_t _imm,
- ConditionCode _condCode);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int64_t _imm,
+ ConditionCode _condCode);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchImmCond64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- int64_t _imm,
- ConditionCode _condCode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _imm, _condCode)
+ %(class_name)s::%(class_name)s(
+ ExtMachInst machInst, int64_t _imm, ConditionCode _condCode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _condCode)
{
%(constructor)s;
}
def template BranchReg64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchReg64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1)
{
%(constructor)s;
}
def template BranchRegReg64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- IntRegIndex _op2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchRegReg64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
+ IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
{
%(constructor)s;
}
def template BranchImmReg64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- int64_t imm, IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int64_t imm, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchImmReg64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- int64_t _imm,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _op1)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, int64_t _imm,
+ IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm, _op1)
{
%(constructor)s;
}
def template BranchImmImmReg64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, int64_t _imm1, int64_t _imm2,
- IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, int64_t _imm1, int64_t _imm2,
+ IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template BranchImmImmReg64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- int64_t _imm1, int64_t _imm2,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _imm1, _imm2, _op1)
+ int64_t _imm1, int64_t _imm2,
+ IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _imm1, _imm2, _op1)
{
%(constructor)s;
}
const unsigned rCount = %(r_count)d;
- union RegVect {
+ union RegVect
+ {
uint32_t regs[rCount];
};
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
def template DataXImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
}
def template DataXSRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2,
- int32_t _shiftAmt, ArmShiftType _shiftType);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ int32_t _shiftAmt, ArmShiftType _shiftType);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXSRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- int32_t _shiftAmt,
- ArmShiftType _shiftType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _shiftAmt, _shiftType)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ int32_t _shiftAmt,
+ ArmShiftType _shiftType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _shiftAmt, _shiftType)
{
%(constructor)s;
}
def template DataXERegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2,
- ArmExtendType _extendType, int32_t _shiftAmt);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ ArmExtendType _extendType, int32_t _shiftAmt);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXERegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- ArmExtendType _extendType,
- int32_t _shiftAmt)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _extendType, _shiftAmt)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ ArmExtendType _extendType,
+ int32_t _shiftAmt) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _extendType, _shiftAmt)
{
%(constructor)s;
}
def template DataX1RegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataX1RegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
+ IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
{
%(constructor)s;
}
def template DataX2RegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataX2RegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
}
def template DataX2RegImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataX2RegImmConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
}
def template DataX3RegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _op3);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _op3);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataX3RegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- IntRegIndex _op3)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _op3)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ IntRegIndex _op3) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _op3)
{
%(constructor)s;
}
def template DataXCondCompImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- uint64_t _imm, ConditionCode _condCode, uint8_t _defCc);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ uint64_t _imm, ConditionCode _condCode, uint8_t _defCc);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXCondCompImmConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- uint64_t _imm,
- ConditionCode _condCode,
- uint8_t _defCc)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _op1, _imm, _condCode, _defCc)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ uint64_t _imm, ConditionCode _condCode,
+ uint8_t _defCc) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _op1, _imm, _condCode, _defCc)
{
%(constructor)s;
}
def template DataXCondCompRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- IntRegIndex _op2, ConditionCode _condCode,
- uint8_t _defCc);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ IntRegIndex _op2, ConditionCode _condCode, uint8_t _defCc);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXCondCompRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- IntRegIndex _op2,
- ConditionCode _condCode,
- uint8_t _defCc)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _op1, _op2, _condCode, _defCc)
+ IntRegIndex _op1, IntRegIndex _op2,
+ ConditionCode _condCode, uint8_t _defCc) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _op1, _op2, _condCode, _defCc)
{
%(constructor)s;
}
def template DataXCondSelDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2,
- ConditionCode _condCode);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ ConditionCode _condCode);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataXCondSelConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- ConditionCode _condCode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _condCode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ ConditionCode _condCode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _condCode)
{
%(constructor)s;
}
RegIndex _ura,
RegIndex _urb,
bool _up,
- uint8_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint8_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_ura, _urb, _up, _imm)
{
%(constructor)s;
RegIndex _dreg2,
RegIndex _base,
bool _up,
- uint8_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dreg1, _dreg2, _base, _up, _imm)
+ uint8_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dreg1, _dreg2, _base, _up, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
public:
%(class_name)s(ExtMachInst machInst, RegIndex _dest,
- RegIndex _ura, uint32_t _imm, unsigned extraMemFlags)
- : %(base_class)s("%(mnemonic)s", machInst,
+ RegIndex _ura, uint32_t _imm, unsigned extraMemFlags) :
+ %(base_class)s("%(mnemonic)s", machInst,
%(op_class)s, _dest, _ura, _imm)
{
memAccessFlags |= extraMemFlags;
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _ura,
IntRegIndex _urb,
- IntRegIndex _urc)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _urc) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_ura, _urb, _urc)
{
%(constructor)s;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
%(class_name)s::%(class_name)s(ExtMachInst machInst,
RegIndex _ura,
RegIndex _urb,
- int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _ura, _urb, _imm)
+ int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _ura, _urb, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
%(class_name)s::%(class_name)s(ExtMachInst machInst,
RegIndex _ura,
RegIndex _urb,
- int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_ura, _urb, _imm)
{
%(constructor)s;
def template MicroIntXERegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
RegIndex _ura, RegIndex _urb, RegIndex _urc,
- ArmExtendType _type, uint32_t _shiftAmt)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _ura, _urb, _urc, _type, _shiftAmt)
+ ArmExtendType _type, uint32_t _shiftAmt) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _ura, _urb, _urc, _type, _shiftAmt)
{
%(constructor)s;
}
def template MicroIntRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
RegIndex _ura, RegIndex _urb, RegIndex _urc,
- int32_t _shiftAmt, ArmShiftType _shiftType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _ura, _urb, _urc, _shiftAmt, _shiftType)
+ int32_t _shiftAmt,
+ ArmShiftType _shiftType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _ura, _urb, _urc, _shiftAmt, _shiftType)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
*/
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex rn,
- bool index, bool up, bool user, bool writeback, bool load,
- uint32_t reglist);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex rn, bool index, bool up,
+ bool user, bool writeback, bool load, uint32_t reglist);
};
}};
def template MacroMemConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex rn,
bool index, bool up, bool user, bool writeback, bool load,
- uint32_t reglist)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, rn,
+ uint32_t reglist) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, rn,
index, up, user, writeback, load, reglist)
{
%(constructor)s;
def template BigFpMemImmConstructor {{
%(class_name)s::%(class_name)s(const char *mnemonic, ExtMachInst machInst,
- bool load, IntRegIndex dest, IntRegIndex base, int64_t imm)
- : %(base_class)s(mnemonic, machInst, %(op_class)s, load, dest, base, imm)
+ bool load, IntRegIndex dest, IntRegIndex base, int64_t imm) :
+ %(base_class)s(mnemonic, machInst, %(op_class)s, load, dest, base, imm)
{
%(constructor)s;
}
def template BigFpMemRegConstructor {{
%(class_name)s::%(class_name)s(const char *mnemonic, ExtMachInst machInst,
bool load, IntRegIndex dest, IntRegIndex base,
- IntRegIndex offset, ArmExtendType type, int64_t imm)
- : %(base_class)s(mnemonic, machInst, %(op_class)s, load, dest, base,
- offset, type, imm)
+ IntRegIndex offset, ArmExtendType type, int64_t imm) :
+ %(base_class)s(mnemonic, machInst, %(op_class)s, load, dest, base,
+ offset, type, imm)
{
%(constructor)s;
}
def template BigFpMemLitConstructor {{
%(class_name)s::%(class_name)s(const char *mnemonic, ExtMachInst machInst,
- IntRegIndex dest, int64_t imm)
- : %(base_class)s(mnemonic, machInst, %(op_class)s, dest, imm)
+ IntRegIndex dest, int64_t imm) :
+ %(base_class)s(mnemonic, machInst, %(op_class)s, dest, imm)
{
%(constructor)s;
}
def template PairMemDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(const char *mnemonic, ExtMachInst machInst,
- uint32_t size, bool fp, bool load, bool noAlloc, bool signExt,
- bool exclusive, bool acrel, uint32_t imm,
- AddrMode mode, IntRegIndex rn, IntRegIndex rt,
- IntRegIndex rt2);
+ public:
+ // Constructor
+ %(class_name)s(const char *mnemonic, ExtMachInst machInst,
+ uint32_t size, bool fp, bool load, bool noAlloc, bool signExt,
+ bool exclusive, bool acrel, uint32_t imm,
+ AddrMode mode, IntRegIndex rn, IntRegIndex rt,
+ IntRegIndex rt2);
};
}};
%(class_name)s::%(class_name)s(const char *mnemonic, ExtMachInst machInst,
uint32_t size, bool fp, bool load, bool noAlloc, bool signExt,
bool exclusive, bool acrel, uint32_t imm, AddrMode mode,
- IntRegIndex rn, IntRegIndex rt, IntRegIndex rt2)
- : %(base_class)s(mnemonic, machInst, %(op_class)s, size,
- fp, load, noAlloc, signExt, exclusive, acrel,
- imm, mode, rn, rt, rt2)
+ IntRegIndex rn, IntRegIndex rt, IntRegIndex rt2) :
+ %(base_class)s(mnemonic, machInst, %(op_class)s, size,
+ fp, load, noAlloc, signExt, exclusive, acrel,
+ imm, mode, rn, rt, rt2)
{
%(constructor)s;
}
def template VMemMultDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, unsigned width,
- RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
- uint32_t size, uint32_t align, RegIndex rm);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, unsigned width,
+ RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
+ uint32_t size, uint32_t align, RegIndex rm);
};
}};
def template VMemMultConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, unsigned width,
RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
- uint32_t size, uint32_t align, RegIndex rm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, width,
- rn, vd, regs, inc, size, align, rm)
+ uint32_t size, uint32_t align, RegIndex rm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, width,
+ rn, vd, regs, inc, size, align, rm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template VMemSingleDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, bool all, unsigned width,
- RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
- uint32_t size, uint32_t align, RegIndex rm, unsigned lane = 0);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, bool all, unsigned width,
+ RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
+ uint32_t size, uint32_t align, RegIndex rm, unsigned lane=0);
};
}};
def template VMemSingleConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, bool all, unsigned width,
RegIndex rn, RegIndex vd, unsigned regs, unsigned inc,
- uint32_t size, uint32_t align, RegIndex rm, unsigned lane)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, all, width,
- rn, vd, regs, inc, size, align, rm, lane)
+ uint32_t size, uint32_t align, RegIndex rm, unsigned lane) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, all, width,
+ rn, vd, regs, inc, size, align, rm, lane)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
*/
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex rn,
- RegIndex vd, bool single, bool up, bool writeback,
- bool load, uint32_t offset);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex rn,
+ RegIndex vd, bool single, bool up, bool writeback,
+ bool load, uint32_t offset);
};
}};
def template MacroVFPMemConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex rn,
RegIndex vd, bool single, bool up, bool writeback, bool load,
- uint32_t offset)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, rn,
- vd, single, up, writeback, load, offset)
+ uint32_t offset) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, rn,
+ vd, single, up, writeback, load, offset)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template PanicExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
panic("Execute function executed when it shouldn't be!\n");
return NoFault;
}};
def template PanicInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
panic("InitiateAcc function executed when it shouldn't be!\n");
return NoFault;
}};
def template PanicCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
panic("CompleteAcc function executed when it shouldn't be!\n");
return NoFault;
def template SwapExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(preacc_code)s;
if (fault == NoFault) {
}};
def template SwapInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(preacc_code)s;
if (fault == NoFault) {
}};
def template SwapCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
// ARM instructions will not have a pkt if the predicate is false
getMemLE(pkt, Mem, traceData);
uint64_t memData = Mem;
}};
def template LoadExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
fault = readMemAtomicLE(
xc, traceData, EA, Mem, memAccessFlags);
def template NeonLoadExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(
+ Fault
+ %(class_name)s<Element>::execute(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
MemUnion memUnion;
uint8_t *dataPtr = memUnion.bytes;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
const auto size = %(size)d;
fault = readMemAtomic(xc, EA, dataPtr,
}};
def template StoreExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
%(memacc_code)s;
}
def template NeonStoreExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(
+ Fault
+ %(class_name)s<Element>::execute(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
MemUnion memUnion;
uint8_t *dataPtr = memUnion.bytes;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
%(memacc_code)s;
}
}};
def template StoreExExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
%(memacc_code)s;
}
}};
def template StoreExInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
%(memacc_code)s;
}
}};
def template StoreInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
%(memacc_code)s;
}
def template NeonStoreInitiateAcc {{
template <class Element>
- Fault %(class_name)s<Element>::initiateAcc(
+ Fault
+ %(class_name)s<Element>::initiateAcc(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
MemUnion memUnion;
if (fault == NoFault) {
%(memacc_code)s;
}};
def template LoadInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
fault = initiateMemRead(xc, traceData, EA, Mem,
memAccessFlags);
def template NeonLoadInitiateAcc {{
template <class Element>
- Fault %(class_name)s<Element>::initiateAcc(
+ Fault
+ %(class_name)s<Element>::initiateAcc(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
%(op_rd)s;
%(ea_code)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
if (fault == NoFault) {
const auto size = %(size)d;
fault = initiateMemRead(xc, EA, size, memAccessFlags,
}};
def template LoadCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
// ARM instructions will not have a pkt if the predicate is false
getMemLE(pkt, Mem, traceData);
def template NeonLoadCompleteAcc {{
template <class Element>
- Fault %(class_name)s<Element>::completeAcc(
- PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::completeAcc(
+ PacketPtr pkt, ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
// ARM instructions will not have a pkt if the predicate is false
MemUnion &memUnion = *(MemUnion *)pkt->getPtr<uint8_t>();
}};
def template StoreCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
return NoFault;
}
def template NeonStoreCompleteAcc {{
template <class Element>
- Fault %(class_name)s<Element>::completeAcc(
+ Fault
+ %(class_name)s<Element>::completeAcc(
PacketPtr pkt, ExecContext *xc, Trace::InstRecord *traceData) const
{
return NoFault;
}};
def template StoreExCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
uint64_t writeResult = pkt->req->getExtraData();
%(postacc_code)s;
def template RfeConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t _base, int _mode, bool _wb)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- (IntRegIndex)_base, (AddrMode)_mode, _wb)
+ uint32_t _base, int _mode, bool _wb) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ (IntRegIndex)_base, (AddrMode)_mode, _wb)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template SrsConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t _regMode, int _mode, bool _wb)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint32_t _regMode, int _mode, bool _wb) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(OperatingMode)_regMode, (AddrMode)_mode, _wb)
{
%(constructor)s;
def template SwapConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t _dest, uint32_t _op1, uint32_t _base)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint32_t _dest, uint32_t _op1, uint32_t _base) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_op1, (IntRegIndex)_base)
{
%(constructor)s;
def template LoadStoreDImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _dest, uint32_t _dest2,
- uint32_t _base, bool _add, int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint32_t _base, bool _add, int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_dest2,
(IntRegIndex)_base, _add, _imm)
{
def template StoreExDImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _result, uint32_t _dest, uint32_t _dest2,
- uint32_t _base, bool _add, int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- (IntRegIndex)_result,
- (IntRegIndex)_dest, (IntRegIndex)_dest2,
+ uint32_t _base, bool _add, int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ (IntRegIndex)_result, (IntRegIndex)_dest, (IntRegIndex)_dest2,
(IntRegIndex)_base, _add, _imm)
{
%(constructor)s;
def template LoadStoreImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t _dest, uint32_t _base, bool _add, int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint32_t _dest, uint32_t _base, bool _add, int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_base, _add, _imm)
{
%(constructor)s;
def template StoreExImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _result, uint32_t _dest, uint32_t _base,
- bool _add, int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ bool _add, int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_result, (IntRegIndex)_dest,
(IntRegIndex)_base, _add, _imm)
{
def template StoreDRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _dest, uint32_t _dest2, uint32_t _base, bool _add,
- int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_dest2,
(IntRegIndex)_base, _add,
_shiftAmt, (ArmShiftType)_shiftType,
def template StoreRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _dest, uint32_t _base, bool _add,
- int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_base, _add,
_shiftAmt, (ArmShiftType)_shiftType,
(IntRegIndex)_index)
def template LoadDRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _dest, uint32_t _dest2, uint32_t _base, bool _add,
- int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_dest2,
(IntRegIndex)_base, _add,
_shiftAmt, (ArmShiftType)_shiftType,
def template LoadRegConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
uint32_t _dest, uint32_t _base, bool _add,
- int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ int32_t _shiftAmt, uint32_t _shiftType, uint32_t _index) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_base, _add,
_shiftAmt, (ArmShiftType)_shiftType,
(IntRegIndex)_index)
def template LoadImmConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t _dest, uint32_t _base, bool _add, int32_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ uint32_t _dest, uint32_t _base, bool _add, int32_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, (IntRegIndex)_base, _add, _imm)
{
%(constructor)s;
}};
def template Load64Execute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template Load64FpExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template Store64Execute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
if (fault == NoFault) {
fault = writeMemAtomicLE(xc, traceData, Mem, EA,
- memAccessFlags, NULL);
+ memAccessFlags, nullptr);
}
if (fault == NoFault) {
}};
def template Store64InitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
if (fault == NoFault) {
fault = writeMemTimingLE(xc, traceData, Mem, EA, memAccessFlags,
- NULL);
+ nullptr);
}
return fault;
}};
def template StoreEx64Execute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template StoreEx64InitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
if (fault == NoFault) {
fault = writeMemTimingLE(xc, traceData, Mem, EA, memAccessFlags,
- NULL);
+ nullptr);
}
return fault;
}};
def template Load64InitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template Load64CompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
}};
def template Store64CompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
return NoFault;
}
}};
def template StoreEx64CompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
def template DCStore64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _base,
- MiscRegIndex _dest, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _base, _dest, _imm)
+ MiscRegIndex _dest, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _base, _dest, _imm)
{
%(constructor)s;
assert(!%(use_uops)d);
}};
def template DCStore64Execute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}
if (fault == NoFault) {
- fault = writeMemAtomic(xc, NULL, EA,
- op_size, memAccessFlags, NULL,
+ fault = writeMemAtomic(xc, nullptr, EA,
+ op_size, memAccessFlags, nullptr,
std::vector<bool>(op_size, true));
}
}};
def template DCStore64InitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}
if (fault == NoFault) {
- fault = writeMemTiming(xc, NULL, EA, op_size,
- memAccessFlags, NULL,
+ fault = writeMemTiming(xc, nullptr, EA, op_size,
+ memAccessFlags, nullptr,
std::vector<bool>(op_size, true));
}
def template LoadStoreImm64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, int64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- (IntRegIndex)_dest, (IntRegIndex)_base, _imm)
+ IntRegIndex _dest, IntRegIndex _base, int64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ (IntRegIndex)_dest, (IntRegIndex)_base, _imm)
{
%(constructor)s;
#if %(use_uops)d
def template LoadStoreImmU64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _base, int64_t _imm,
- bool noAlloc, bool exclusive, bool acrel)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _imm)
+ bool noAlloc, bool exclusive, bool acrel) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _imm)
{
%(constructor)s;
assert(!%(use_uops)d);
def template LoadStoreImmDU64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _dest2, IntRegIndex _base,
- int64_t _imm, bool noAlloc, bool exclusive, bool acrel)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _dest2, _base, _imm)
+ int64_t _imm, bool noAlloc, bool exclusive, bool acrel) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _dest2, _base, _imm)
{
%(constructor)s;
assert(!%(use_uops)d);
def template StoreImmDEx64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _result, IntRegIndex _dest, IntRegIndex _dest2,
- IntRegIndex _base, int64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _result, _dest, _dest2, _base, _imm)
+ IntRegIndex _base, int64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _result, _dest, _dest2, _base, _imm)
{
%(constructor)s;
assert(!%(use_uops)d);
def template LoadStoreReg64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _base, IntRegIndex _offset,
- ArmExtendType _type, uint32_t _shiftAmt)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _offset, _type, _shiftAmt)
+ ArmExtendType _type, uint32_t _shiftAmt) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _offset, _type, _shiftAmt)
{
%(constructor)s;
#if %(use_uops)d
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _base, IntRegIndex _offset,
ArmExtendType _type, uint32_t _shiftAmt,
- bool noAlloc, bool exclusive, bool acrel)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _offset, _type, _shiftAmt)
+ bool noAlloc, bool exclusive, bool acrel) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _offset, _type, _shiftAmt)
{
%(constructor)s;
assert(!%(use_uops)d);
def template LoadStoreRaw64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _base)
+ IntRegIndex _dest, IntRegIndex _base) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _base)
{
%(constructor)s;
}
def template LoadStoreEx64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _result)
+ IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _result)
{
%(constructor)s;
}
def template LoadStoreLit64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, int64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _dest, int64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, _imm)
{
%(constructor)s;
def template LoadStoreLitU64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, int64_t _imm,
- bool noAlloc, bool exclusive, bool acrel)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ bool noAlloc, bool exclusive, bool acrel) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
(IntRegIndex)_dest, _imm)
{
%(constructor)s;
// Atomic operations in memory
def template AmoOpExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
}};
def template AmoOpInitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
}};
def template AmoOpCompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
%(op_decl)s;
%(op_rd)s;
def template AmoOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _result)
+ IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _result)
{
%(constructor)s;
flags[IsStore] = false;
def template AmoPairOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _result)
+ IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _result)
{
%(constructor)s;
def template AmoArithmeticOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _dest, IntRegIndex _base, IntRegIndex _result) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_dest, _base, _result)
{
%(constructor)s;
uint32_t r2 = RegId(IntRegClass, dest).index() ;
flags[IsStore] = false;
flags[IsLoad] = false;
- if (r2 == 31){
+ if (r2 == 31) {
isXZR = true;
}
}
def template MrsDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MrsConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
uint8_t byteMask;
- bool r;
+ bool r;
public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- uint8_t _sysM, bool _r);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint8_t _sysM, bool _r);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MrsBankedRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- uint8_t _sysM,
- bool _r)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest),
- byteMask(_sysM), r(_r)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint8_t _sysM, bool _r) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest),
+ byteMask(_sysM), r(_r)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
bool r;
public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
- uint8_t _sysM, bool _r);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ uint8_t _sysM, bool _r);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MsrBankedRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- uint8_t _sysM,
- bool _r)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _sysM),
- r(_r)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ uint8_t _sysM, bool _r) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _sysM),
+ r(_r)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template MsrRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, uint8_t mask);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, uint8_t mask);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MsrRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _op1,
- uint8_t mask)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, mask)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _op1,
+ uint8_t mask) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, mask)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template MsrImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, uint32_t imm, uint8_t mask);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, uint32_t imm, uint8_t mask);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MsrImmConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- uint32_t imm,
- uint8_t mask)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, imm, mask)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, uint32_t imm,
+ uint8_t mask) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, imm, mask)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template MrrcOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, MiscRegIndex _op1,
- IntRegIndex _dest, IntRegIndex _dest2, uint32_t imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, MiscRegIndex _op1,
+ IntRegIndex _dest, IntRegIndex _dest2, uint32_t imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MrrcOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- MiscRegIndex op1,
- IntRegIndex dest,
- IntRegIndex dest2,
- uint32_t imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, op1, dest,
- dest2, imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, MiscRegIndex op1,
+ IntRegIndex dest, IntRegIndex dest2,
+ uint32_t imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, op1, dest,
+ dest2, imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template McrrOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2,
- MiscRegIndex _dest, uint32_t imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2,
+ MiscRegIndex _dest, uint32_t imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template McrrOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex op1,
- IntRegIndex op2,
- MiscRegIndex dest,
- uint32_t imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, op1, op2,
- dest, imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex op1,
+ IntRegIndex op2, MiscRegIndex dest,
+ uint32_t imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, op1, op2,
+ dest, imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template ImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template ImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegImmOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
+ IntRegIndex _dest, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
+ IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegRegImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegRegImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegRegRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- IntRegIndex _op2, IntRegIndex _op3);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _op3);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegRegRegOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- IntRegIndex _op3)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _op3)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ IntRegIndex _op3) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _op3)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegRegOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template MiscRegRegImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- MiscRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MiscRegRegImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- MiscRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegMiscRegImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, MiscRegIndex _op1,
- uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, MiscRegIndex _op1,
+ uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegMiscRegImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- MiscRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ MiscRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegImmImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm1, uint64_t _imm2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint64_t _imm1, uint64_t _imm2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegImmImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- uint64_t _imm1,
- uint64_t _imm2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm1, _imm2)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint64_t _imm1, uint64_t _imm2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm1, _imm2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegRegImmImmOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm1, uint64_t _imm2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm1, uint64_t _imm2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegImmImmOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm1,
- uint64_t _imm2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm1, _imm2)
+ IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm1, uint64_t _imm2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm1, _imm2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegImmRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint64_t _imm, IntRegIndex _op1);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegImmRegOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- uint64_t _imm,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm, _op1)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint64_t _imm, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm, _op1)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template RegImmRegShiftOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1,
- int32_t _shiftAmt, ArmShiftType _shiftType);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm,
+ IntRegIndex _op1, int32_t _shiftAmt,
+ ArmShiftType _shiftType);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegImmRegShiftOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- uint64_t _imm,
- IntRegIndex _op1,
- int32_t _shiftAmt,
- ArmShiftType _shiftType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm, _op1, _shiftAmt, _shiftType)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ uint64_t _imm, IntRegIndex _op1,
+ int32_t _shiftAmt,
+ ArmShiftType _shiftType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm, _op1, _shiftAmt, _shiftType)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template MiscRegRegImmMemOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- MiscRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
- Fault initiateAcc(ExecContext *, Trace::InstRecord *) const override;
- Fault completeAcc(PacketPtr, ExecContext *,
- Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault initiateAcc(ExecContext *, Trace::InstRecord *) const override;
+ Fault completeAcc(PacketPtr, ExecContext *,
+ Trace::InstRecord *) const override;
};
}};
def template Mcr15Execute {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template Mcr15InitiateAcc {{
- Fault %(class_name)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template Mcr15CompleteAcc {{
- Fault %(class_name)s::completeAcc(PacketPtr pkt,
- ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
return NoFault;
}
def template ImmOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,uint64_t _imm);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst,uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template ImmOp64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
{
%(constructor)s;
}
def template RegRegImmImmOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm1, uint64_t _imm2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst,
+ IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm1, uint64_t _imm2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegImmImmOp64Constructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm1,
- uint64_t _imm2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm1, _imm2)
+ IntRegIndex _dest, IntRegIndex _op1,
+ uint64_t _imm1, uint64_t _imm2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm1, _imm2)
{
%(constructor)s;
}
def template RegRegRegImmOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- IntRegIndex _op2, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1,
+ IntRegIndex _op2, uint64_t _imm);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegRegRegImmOp64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
}
def template MiscRegOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
- uint64_t _imm);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MiscRegOp64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- MiscRegIndex _dest,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
}
def template MiscRegRegOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
- IntRegIndex _op1, uint64_t _imm);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template MiscRegRegOp64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- MiscRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
}
def template RegMiscRegOp64Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- MiscRegIndex _op1, uint64_t _imm);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ MiscRegIndex _op1, uint64_t _imm);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template RegMiscRegOp64Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- MiscRegIndex _op1,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ MiscRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
}
def template XPauthOpRegRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- private:
- bool data;
+ private:
+ bool data;
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template XPauthOpRegRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
{
-
data = bits(machInst, 10);
%(constructor)s;
}
def template RegNoneDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest);
- Fault execute(ExecContext *, Trace::InstRecord *) const;
+ Fault execute(ExecContext *, Trace::InstRecord *) const;
};
}};
def template RegNoneConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
{
%(constructor)s;
}
def template Mult3Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _reg0,
- IntRegIndex _reg1, IntRegIndex _reg2);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _reg0,
+ IntRegIndex _reg1, IntRegIndex _reg2);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template Mult3Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _reg0,
- IntRegIndex _reg1,
- IntRegIndex _reg2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _reg0, _reg1, _reg2)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _reg0,
+ IntRegIndex _reg1, IntRegIndex _reg2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _reg0, _reg1, _reg2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template Mult4Declare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _reg0, IntRegIndex _reg1,
- IntRegIndex _reg2, IntRegIndex _reg3);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst,
+ IntRegIndex _reg0, IntRegIndex _reg1,
+ IntRegIndex _reg2, IntRegIndex _reg3);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template Mult4Constructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _reg0,
- IntRegIndex _reg1,
- IntRegIndex _reg2,
- IntRegIndex _reg3)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _reg0, _reg1, _reg2, _reg3)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _reg0,
+ IntRegIndex _reg1, IntRegIndex _reg2,
+ IntRegIndex _reg3) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _reg0, _reg1, _reg2, _reg3)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
typedef _Element Element;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1)
+ IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template NeonEqualRegExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
const unsigned eCount = rCount * sizeof(uint32_t) / sizeof(Element);
const unsigned eCountFull = 4 * sizeof(uint32_t) / sizeof(Element);
- union RegVect {
+ union RegVect
+ {
uint32_t regs[rCount];
Element elements[eCount];
};
- union FullRegVect {
+ union FullRegVect
+ {
uint32_t regs[4];
Element elements[eCountFull];
};
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
output header {{
template <typename T>
- struct bigger_type_t;
+ struct bigger_type_t;
template<> struct bigger_type_t<uint8_t> { typedef uint16_t type; };
template<> struct bigger_type_t<uint16_t> { typedef uint32_t type; };
def template NeonUnequalRegExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
typedef typename bigger_type_t<Element>::type BigElement;
const unsigned rCount = %(r_count)d;
const unsigned eCount = rCount * sizeof(uint32_t) / sizeof(Element);
- union RegVect {
+ union RegVect
+ {
uint32_t regs[rCount];
Element elements[eCount];
BigElement bigElements[eCount / 2];
};
- union BigRegVect {
+ union BigRegVect
+ {
uint32_t regs[2 * rCount];
BigElement elements[eCount];
};
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
}
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
}
{
protected:
typedef _Element Element;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
{
%(constructor)s;
}
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
}
{
protected:
typedef _Element Element;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm1,
- uint64_t _imm2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm1, _imm2)
+ uint64_t _imm2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm1, _imm2)
{
%(constructor)s;
}
{
protected:
typedef _Element Element;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
}
def template NeonXEqualRegOpExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
const unsigned eCount = rCount * sizeof(uint32_t) / sizeof(Element);
const unsigned eCountFull = 4 * sizeof(uint32_t) / sizeof(Element);
- union RegVect {
+ union RegVect
+ {
uint32_t regs[rCount];
Element elements[eCount];
};
- union FullRegVect {
+ union FullRegVect
+ {
uint32_t regs[4];
Element elements[eCountFull];
};
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
def template NeonXUnequalRegOpExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
typedef typename bigger_type_t<Element>::type BigElement;
const unsigned eCount = rCount * sizeof(uint32_t) / sizeof(Element);
const unsigned eCountFull = 4 * sizeof(uint32_t) / sizeof(Element);
- union RegVect {
+ union RegVect
+ {
uint32_t regs[rCount];
Element elements[eCount];
BigElement bigElements[eCount / 2];
};
- union BigRegVect {
+ union BigRegVect
+ {
uint32_t regs[2 * rCount];
BigElement elements[eCount];
};
- union FullRegVect {
+ union FullRegVect
+ {
uint32_t regs[4];
Element elements[eCountFull];
};
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
public:
%(class_name)s(ExtMachInst machInst, RegIndex _dest, RegIndex _ura,
uint32_t _imm, unsigned extraMemFlags, bool _baseIsSP,
- uint8_t _accSize, uint8_t _eSize)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
+ uint8_t _accSize, uint8_t _eSize) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
_ura, _imm),
baseIsSP(_baseIsSP), accSize(_accSize), eSize(_eSize)
{
}};
def template NeonLoadExecute64 {{
- Fault %(class_name)s::execute(
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
}};
def template NeonLoadInitiateAcc64 {{
- Fault %(class_name)s::initiateAcc(
+ Fault
+ %(class_name)s::initiateAcc(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
%(ea_code)s;
if (fault == NoFault) {
- fault = initiateMemRead(xc, EA, accSize,
- memAccessFlags,
+ fault = initiateMemRead(xc, EA, accSize, memAccessFlags,
std::vector<bool>(accSize, true));
}
}};
def template NeonLoadCompleteAcc64 {{
- Fault %(class_name)s::completeAcc(
+ Fault
+ %(class_name)s::completeAcc(
PacketPtr pkt, ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
}};
def template NeonStoreExecute64 {{
- Fault %(class_name)s::execute(
+ Fault
+ %(class_name)s::execute(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
}};
def template NeonStoreInitiateAcc64 {{
- Fault %(class_name)s::initiateAcc(
+ Fault
+ %(class_name)s::initiateAcc(
ExecContext *xc, Trace::InstRecord *traceData) const
{
Addr EA;
}};
def template NeonStoreCompleteAcc64 {{
- Fault %(class_name)s::completeAcc(
+ Fault
+ %(class_name)s::completeAcc(
PacketPtr pkt, ExecContext *xc, Trace::InstRecord *traceData) const
{
return NoFault;
%(class_name)s(ExtMachInst machInst, RegIndex rn, RegIndex vd,
RegIndex rm, uint8_t eSize, uint8_t dataSize,
uint8_t numStructElems, uint8_t index, bool wb,
- bool replicate = false);
+ bool replicate=false);
};
}};
}};
def template MicroNeonMixExecute64 {{
- Fault %(class_name)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
uint64_t resTemp = 0;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
def template DataImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, uint32_t _imm, bool _rotC=true);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint32_t _imm, bool _rotC=true);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataImmConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint32_t _imm,
- bool _rotC)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm, _rotC)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint32_t _imm,
+ bool _rotC) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm, _rotC)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
def template DataRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2,
- int32_t _shiftAmt, ArmShiftType _shiftType);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ int32_t _shiftAmt, ArmShiftType _shiftType);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- int32_t _shiftAmt,
- ArmShiftType _shiftType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _shiftAmt, _shiftType)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ int32_t _shiftAmt,
+ ArmShiftType _shiftType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _shiftAmt, _shiftType)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
}
}
- if (%(is_branch)s && !isFloating() && !isVector()){
+ if (%(is_branch)s && !isFloating() && !isVector()) {
flags[IsControl] = true;
flags[IsIndirectControl] = true;
if (condCode == COND_AL || condCode == COND_UC)
def template DataRegRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- public:
- // Constructor
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _shift,
- ArmShiftType _shiftType);
- Fault execute(ExecContext *, Trace::InstRecord *) const override;
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _shift,
+ ArmShiftType _shiftType);
+ Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template DataRegRegConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- IntRegIndex _shift,
- ArmShiftType _shiftType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _shift, _shiftType)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ IntRegIndex _shift,
+ ArmShiftType _shiftType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _shift, _shiftType)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
}};
def template PredOpExecute {{
- Fault %(class_name)s::execute(
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
uint64_t resTemp = 0;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
}};
def template QuiescePredOpExecute {{
- Fault %(class_name)s::execute(
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
uint64_t resTemp = 0;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
}};
def template QuiescePredOpExecuteWithFixup {{
- Fault %(class_name)s::execute(
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s::execute(
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
uint64_t resTemp = 0;
%(op_decl)s;
%(op_rd)s;
- if (%(predicate_test)s)
- {
+ if (%(predicate_test)s) {
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
} else {
// when a semihosting immediate is recognized.
def template SemihostConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
{
%(constructor)s;
if (!(condCode == COND_AL || condCode == COND_UC)) {
}};
def template SemihostConstructor64 {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm)
{
%(constructor)s;
typedef _DElement DElement;
typedef _SElement TPSElem;
typedef _DElement TPDElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _gp)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _gp)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, %(isSimdFp)s)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, %(isSimdFp)s)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, uint64_t _imm, IntRegIndex _gp,
- bool _isMerging = true)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm, _gp, _isMerging)
+ bool _isMerging=true) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm, _gp, _isMerging)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm, _gp)
+ IntRegIndex _dest, uint64_t _imm, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op2, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op2, _gp)
+ IntRegIndex _dest, IntRegIndex _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op2, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp, SvePredType _predType)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp, _predType)
+ IntRegIndex _gp, SvePredType _predType) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp, _predType)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint8_t _index)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _index)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, uint8_t _index) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _index)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp, bool _isSel = false)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp, _isSel)
+ IntRegIndex _gp, bool _isSel=false) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp, _isSel)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp, %(op2IsWide)s)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp, %(op2IsWide)s)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm,
- IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _gp)
{
%(constructor)s;
}
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- SveIndexII(ExtMachInst machInst,
- IntRegIndex _dest, int8_t _imm1, int8_t _imm2)
- : SveIndexIIOp("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm1, _imm2)
+ SveIndexII(ExtMachInst machInst, IntRegIndex _dest,
+ int8_t _imm1, int8_t _imm2) :
+ SveIndexIIOp("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm1, _imm2)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- SveIndexIR(ExtMachInst machInst,
- IntRegIndex _dest, int8_t _imm, IntRegIndex _op)
- : SveIndexIROp("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm, _op)
+ SveIndexIR(ExtMachInst machInst, IntRegIndex _dest,
+ int8_t _imm, IntRegIndex _op) :
+ SveIndexIROp("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _imm, _op)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- SveIndexRI(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op, int8_t _imm)
- : SveIndexRIOp("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op, _imm)
+ SveIndexRI(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op, int8_t _imm) :
+ SveIndexRIOp("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op, _imm)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- SveIndexRR(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
- : SveIndexRROp("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ SveIndexRR(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2) :
+ SveIndexRROp("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, %(srcIs32b)s, %(destIsVec)s)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, %(srcIs32b)s, %(destIsVec)s)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _gp)
+ IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _gp)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint8_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint8_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _base, IntRegIndex _offset,
- uint8_t _mult, SveAdrOffsetFormat _offsetFormat)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _base, _offset, _mult, _offsetFormat)
+ uint8_t _mult, SveAdrOffsetFormat _offsetFormat) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _base, _offset, _mult, _offsetFormat)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, %(srcIs32b)s)
+ IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, %(srcIs32b)s)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _op2)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1,
- int64_t _op2, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1,
+ int64_t _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1,
_op2, _gp)
{
%(constructor)s;
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- uint8_t _pattern, uint8_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
+ uint8_t _pattern, uint8_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
_pattern, _imm, %(dstIsVec)s, %(dstIs32b)s)
{
%(constructor)s;
{
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _gp,
- IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
+ IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
_gp, _op1, %(isMerging)s)
{
%(constructor)s;
{
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
+ IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
_op1, _op2, _gp)
{
%(constructor)s;
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
- IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
+ IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest,
_op1, _gp, %(isCond)s, %(isScalar)s, %(isSimdFp)s)
{
%(constructor)s;
typedef _DElement DElement;
typedef _SElement TPSElem;
typedef _DElement TPDElem;
+
public:
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1)
{
%(constructor)s;
}
class %(class_name)s : public %(base_class)s
{
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, _gp)
{
%(constructor)s;
}
class %(class_name)s : public %(base_class)s
{
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest)
{
%(constructor)s;
}
class %(class_name)s : public %(base_class)s
{
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _gp)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _gp)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, IntRegIndex _gp) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _gp)
{
%(constructor)s;
}
class %(class_name)s : public %(base_class)s
{
public:
- %(class_name)s(ExtMachInst machInst, IntRegIndex _op1)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _op1) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1)
{
%(constructor)s;
}
class %(class_name)s : public %(base_class)s
{
public:
- %(class_name)s(ExtMachInst machInst)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ %(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
{
%(constructor)s;
}
typedef _DElement TPDElem;
public:
- %(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _imm)
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _imm)
{
%(constructor)s;
esize = sizeof(Element);
public:
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2)
+ IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2)
{
%(constructor)s;
esize = sizeof(Element);
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _gp, uint8_t _rot)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _gp, _rot)
+ IntRegIndex _gp, uint8_t _rot) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _gp, _rot)
{
%(constructor)s;
}
protected:
typedef _Element Element;
typedef _Element TPElem;
+
public:
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- uint8_t _rot, uint8_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _rot, _imm)
+ uint8_t _rot, uint8_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _rot, _imm)
{
%(constructor)s;
}
def template SveWideningOpExecute {{
template <class SElement, class DElement>
- Fault %(class_name)s<SElement, DElement>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<SElement, DElement>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
}};
def template SveNonTemplatedOpExecute {{
- Fault %(class_name)s::execute(ExecContext *xc,
+ Fault
+ %(class_name)s::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
def template SveOpExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
public:
%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _base, uint64_t _imm)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _dest, IntRegIndex _base, uint64_t _imm) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_dest, _base, _imm)
{
%(constructor)s;
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
- IntRegIndex _offset)
- : %(base_class)s(mnem, machInst, %(op_class)s,
- _dest, _gp, _base, _offset)
+ IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
+ IntRegIndex _offset) :
+ %(base_class)s(mnem, machInst, %(op_class)s,
+ _dest, _gp, _base, _offset)
{
%(constructor)s;
}
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
- annotateFault(ArmISA::ArmFault *fault) override {
+ void
+ annotateFault(ArmISA::ArmFault *fault) override
+ {
%(fa_code)s
}
};
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
- uint64_t _imm)
- : %(base_class)s(mnem, machInst, %(op_class)s,
- _dest, _gp, _base, _imm)
+ IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
+ uint64_t _imm) :
+ %(base_class)s(mnem, machInst, %(op_class)s,
+ _dest, _gp, _base, _imm)
{
%(constructor)s;
}
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
- annotateFault(ArmISA::ArmFault *fault) override {
+ void
+ annotateFault(ArmISA::ArmFault *fault) override
+ {
%(fa_code)s
}
};
def template SveContigLoadExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
def template SveContigLoadInitiateAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_src_decl)s;
%(op_rd)s;
def template SveContigLoadCompleteAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
def template SveContigStoreExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
if (fault == NoFault) {
fault = writeMemAtomic(xc, memData.raw_ptr<uint8_t>(),
- EA, memAccessSize, this->memAccessFlags, NULL, wrEn);
+ EA, memAccessSize, this->memAccessFlags, nullptr, wrEn);
}
if (fault == NoFault) {
def template SveContigStoreInitiateAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
if (fault == NoFault) {
fault = writeMemTiming(xc, memData.raw_ptr<uint8_t>(),
- EA, memAccessSize, this->memAccessFlags, NULL, wrEn);
+ EA, memAccessSize, this->memAccessFlags, nullptr, wrEn);
}
return fault;
def template SveContigStoreCompleteAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
return NoFault;
}
def template SveLoadAndReplExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
def template SveLoadAndReplInitiateAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
def template SveLoadAndReplCompleteAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<RegElemType>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<RegElemType>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp,
- IntRegIndex _base, uint64_t _imm, int _elemIndex, int _numElems,
- bool _firstFault)
- : %(base_class)s(mnem, machInst, %(op_class)s),
- dest(_dest), gp(_gp), base(_base), imm(_imm),
- elemIndex(_elemIndex), numElems(_numElems),
- firstFault(_firstFault),
- memAccessFlags(ArmISA::TLB::AllowUnaligned)
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp,
+ IntRegIndex _base, uint64_t _imm, int _elemIndex,
+ int _numElems, bool _firstFault) :
+ %(base_class)s(mnem, machInst, %(op_class)s),
+ dest(_dest), gp(_gp), base(_base), imm(_imm),
+ elemIndex(_elemIndex), numElems(_numElems),
+ firstFault(_firstFault),
+ memAccessFlags(ArmISA::TLB::AllowUnaligned)
{
%(constructor)s;
if (_opClass == MemReadOp && elemIndex == 0) {
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
+ void
annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp,
- IntRegIndex _base, IntRegIndex _offset, bool _offsetIs32,
- bool _offsetIsSigned, bool _offsetIsScaled, int _elemIndex,
- int _numElems, bool _firstFault)
- : %(base_class)s(mnem, machInst, %(op_class)s),
- dest(_dest), gp(_gp), base(_base), offset(_offset),
- offsetIs32(_offsetIs32), offsetIsSigned(_offsetIsSigned),
- offsetIsScaled(_offsetIsScaled), elemIndex(_elemIndex),
- numElems(_numElems), firstFault(_firstFault),
- memAccessFlags(ArmISA::TLB::AllowUnaligned)
+ OpClass __opClass, IntRegIndex _dest, IntRegIndex _gp,
+ IntRegIndex _base, IntRegIndex _offset, bool _offsetIs32,
+ bool _offsetIsSigned, bool _offsetIsScaled, int _elemIndex,
+ int _numElems, bool _firstFault) :
+ %(base_class)s(mnem, machInst, %(op_class)s),
+ dest(_dest), gp(_gp), base(_base), offset(_offset),
+ offsetIs32(_offsetIs32), offsetIsSigned(_offsetIsSigned),
+ offsetIsScaled(_offsetIsScaled), elemIndex(_elemIndex),
+ numElems(_numElems), firstFault(_firstFault),
+ memAccessFlags(ArmISA::TLB::AllowUnaligned)
{
%(constructor)s;
if (_opClass == MemReadOp && elemIndex == 0) {
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
+ void
annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
def template SveGatherLoadMicroopExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
def template SveGatherLoadMicroopInitiateAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
int index = elemIndex;
if (%(pred_check_code)s) {
fault = initiateMemRead(xc, traceData, EA, memData,
- this->memAccessFlags);
+ this->memAccessFlags);
if (fault != NoFault) {
%(fault_status_set_code)s;
if (firstFault) {
for (index = 0;
index < numElems && !(%(pred_check_code)s);
- index++);
+ index++) {}
if (index < elemIndex) {
fault = NoFault;
xc->setMemAccPredicate(false);
def template SveGatherLoadMicroopCompleteAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
M5_VAR_USED bool aarch64 = true;
def template SveScatterStoreMicroopExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
int index = elemIndex;
if (%(pred_check_code)s) {
fault = writeMemAtomicLE(xc, traceData, memData, EA,
- this->memAccessFlags, NULL);
+ this->memAccessFlags, nullptr);
}
if (fault == NoFault) {
def template SveScatterStoreMicroopInitiateAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
int index = elemIndex;
if (%(pred_check_code)s) {
fault = writeMemTimingLE(xc, traceData, memData, EA,
- this->memAccessFlags, NULL);
+ this->memAccessFlags, nullptr);
} else {
xc->setPredicate(false);
}
def template SveScatterStoreMicroopCompleteAcc {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
return NoFault;
}
public:
SveFirstFaultWritebackMicroop(const char* mnem, ExtMachInst machInst,
- OpClass __opClass, int _numElems, StaticInst *_macroOp)
- : MicroOp(mnem, machInst, __opClass),
- numElems(_numElems), macroOp(_macroOp)
+ OpClass __opClass, int _numElems, StaticInst *_macroOp) :
+ MicroOp(mnem, machInst, __opClass),
+ numElems(_numElems), macroOp(_macroOp)
{
%(constructor)s;
}
def template SveFirstFaultWritebackMicroopExecute {{
%(tpl_header)s
- Fault %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s%(tpl_args)s::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
M5_VAR_USED bool aarch64 = true;
int index, firstFaultIndex;
for (index = 0;
index < numElems && !%(fault_status_check_code)s;
- index++);
+ index++) {}
firstFaultIndex = index;
for (index = 0; index < numElems; index++) {
if (index < firstFaultIndex) {
public:
SveGatherLoadCpySrcVecMicroop(const char* mnem, ExtMachInst machInst,
- IntRegIndex _op1, StaticInst *_macroOp)
- : MicroOp(mnem, machInst, SimdAluOp), op1(_op1), macroOp(_macroOp)
+ IntRegIndex _op1, StaticInst *_macroOp) :
+ MicroOp(mnem, machInst, SimdAluOp), op1(_op1), macroOp(_macroOp)
{
%(constructor)s;
}
}};
def template SveGatherLoadCpySrcVecMicroopExecute {{
- Fault SveGatherLoadCpySrcVecMicroop::execute(ExecContext *xc,
+ Fault
+ SveGatherLoadCpySrcVecMicroop::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
- int64_t _imm, uint8_t _numRegs, int _regIndex)
- : %(base_class)s(mnem, machInst, %(op_class)s),
- dest(_dest), gp(_gp), base(_base), imm(_imm),
- numRegs(_numRegs), regIndex(_regIndex),
- memAccessFlags(ArmISA::TLB::AllowUnaligned)
+ IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
+ int64_t _imm, uint8_t _numRegs, int _regIndex) :
+ %(base_class)s(mnem, machInst, %(op_class)s),
+ dest(_dest), gp(_gp), base(_base), imm(_imm),
+ numRegs(_numRegs), regIndex(_regIndex),
+ memAccessFlags(ArmISA::TLB::AllowUnaligned)
{
%(constructor)s;
baseIsSP = isSP(_base);
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
+ void
annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
printMnemonic(ss, "", false);
ccprintf(ss, "{");
switch (dest) {
- case INTRLVREG0:
- ccprintf(ss, "INTRLV0");
- break;
- case INTRLVREG1:
- ccprintf(ss, "INTRLV1");
- break;
- case INTRLVREG2:
- ccprintf(ss, "INTRLV2");
- break;
- case INTRLVREG3:
- ccprintf(ss, "INTRLV3");
- break;
- default:
- printVecReg(ss, dest, true);
- break;
+ case INTRLVREG0:
+ ccprintf(ss, "INTRLV0");
+ break;
+ case INTRLVREG1:
+ ccprintf(ss, "INTRLV1");
+ break;
+ case INTRLVREG2:
+ ccprintf(ss, "INTRLV2");
+ break;
+ case INTRLVREG3:
+ ccprintf(ss, "INTRLV3");
+ break;
+ default:
+ printVecReg(ss, dest, true);
+ break;
}
ccprintf(ss, "}, ");
printVecPredReg(ss, gp);
def template SveStructLoadExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<Element>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<Element>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
def template SveStructLoadInitiateAcc {{
template <class Element>
- Fault %(class_name)s<Element>::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<Element>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<Element>(xc->tcBase());
%(op_src_decl)s;
%(op_rd)s;
def template SveStructLoadCompleteAcc {{
template <class Element>
- Fault %(class_name)s<Element>::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<Element>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<Element>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
auto memDataView = memData.as<Element>();
memcpy(memData.raw_ptr<uint8_t>(), pkt->getPtr<uint8_t>(),
- pkt->getSize());
+ pkt->getSize());
if (fault == NoFault) {
%(memacc_code)s;
def template SveStructStoreExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<Element>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<Element>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
if (fault == NoFault) {
fault = writeMemAtomic(xc, memData.raw_ptr<uint8_t>(),
- EA, memAccessSize, this->memAccessFlags, NULL, wrEn);
+ EA, memAccessSize, this->memAccessFlags, nullptr, wrEn);
}
if (fault == NoFault) {
def template SveStructStoreInitiateAcc {{
template <class Element>
- Fault %(class_name)s<Element>::initiateAcc(ExecContext *xc,
- Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::initiateAcc(ExecContext *xc,
+ Trace::InstRecord *traceData) const
{
Addr EA;
Fault fault = NoFault;
M5_VAR_USED bool aarch64 = true;
- unsigned eCount = ArmStaticInst::getCurSveVecLen<Element>(
- xc->tcBase());
+ unsigned eCount =
+ ArmStaticInst::getCurSveVecLen<Element>(xc->tcBase());
%(op_decl)s;
%(op_rd)s;
if (fault == NoFault) {
fault = writeMemTiming(xc, memData.raw_ptr<uint8_t>(),
- EA, memAccessSize, this->memAccessFlags, NULL, wrEn);
+ EA, memAccessSize, this->memAccessFlags, nullptr, wrEn);
}
return fault;
def template SveStructStoreCompleteAcc {{
template <class Element>
- Fault %(class_name)s<Element>::completeAcc(PacketPtr pkt,
- ExecContext *xc, Trace::InstRecord *traceData) const
+ Fault
+ %(class_name)s<Element>::completeAcc(PacketPtr pkt,
+ ExecContext *xc, Trace::InstRecord *traceData) const
{
return NoFault;
}
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
- IntRegIndex _offset, uint8_t _numRegs, int _regIndex)
- : %(base_class)s(mnem, machInst, %(op_class)s),
- dest(_dest), gp(_gp), base(_base), offset(_offset),
- numRegs(_numRegs), regIndex(_regIndex),
- memAccessFlags(ArmISA::TLB::AllowUnaligned)
+ IntRegIndex _dest, IntRegIndex _gp, IntRegIndex _base,
+ IntRegIndex _offset, uint8_t _numRegs, int _regIndex) :
+ %(base_class)s(mnem, machInst, %(op_class)s),
+ dest(_dest), gp(_gp), base(_base), offset(_offset),
+ numRegs(_numRegs), regIndex(_regIndex),
+ memAccessFlags(ArmISA::TLB::AllowUnaligned)
{
%(constructor)s;
baseIsSP = isSP(_base);
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
- virtual void
+ void
annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
printMnemonic(ss, "", false);
ccprintf(ss, "{");
switch (dest) {
- case INTRLVREG0:
- ccprintf(ss, "INTRLV0");
- break;
- case INTRLVREG1:
- ccprintf(ss, "INTRLV1");
- break;
- case INTRLVREG2:
- ccprintf(ss, "INTRLV2");
- break;
- case INTRLVREG3:
- ccprintf(ss, "INTRLV3");
- break;
- default:
- printVecReg(ss, dest, true);
- break;
+ case INTRLVREG0:
+ ccprintf(ss, "INTRLV0");
+ break;
+ case INTRLVREG1:
+ ccprintf(ss, "INTRLV1");
+ break;
+ case INTRLVREG2:
+ ccprintf(ss, "INTRLV2");
+ break;
+ case INTRLVREG3:
+ ccprintf(ss, "INTRLV3");
+ break;
+ default:
+ printVecReg(ss, dest, true);
+ break;
}
ccprintf(ss, "}, ");
printVecPredReg(ss, gp);
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- uint8_t _numRegs, int _regIndex, StaticInst *_macroOp)
- : MicroOp(mnem, machInst, SimdAluOp),
- dest(_dest), op1(_op1), numRegs(_numRegs), regIndex(_regIndex),
- macroOp(_macroOp)
+ IntRegIndex _dest, IntRegIndex _op1,
+ uint8_t _numRegs, int _regIndex, StaticInst *_macroOp) :
+ MicroOp(mnem, machInst, SimdAluOp), dest(_dest), op1(_op1),
+ numRegs(_numRegs), regIndex(_regIndex), macroOp(_macroOp)
{
%(constructor)s;
}
public:
%(class_name)s(const char* mnem, ExtMachInst machInst,
- IntRegIndex _dest, uint8_t _numRegs, int _regIndex,
- StaticInst *_macroOp)
- : MicroOp(mnem, machInst, SimdAluOp),
- dest(_dest), numRegs(_numRegs), regIndex(_regIndex),
- macroOp(_macroOp)
+ IntRegIndex _dest, uint8_t _numRegs, int _regIndex,
+ StaticInst *_macroOp) :
+ MicroOp(mnem, machInst, SimdAluOp), dest(_dest),
+ numRegs(_numRegs), regIndex(_regIndex), macroOp(_macroOp)
{
%(constructor)s;
}
def template SveIntrlvMicroopExecute {{
template <class Element>
- Fault %(class_name)s<Element>::execute(ExecContext *xc,
+ Fault
+ %(class_name)s<Element>::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
{
Fault fault = NoFault;
%(op_rd)s;
%(code)s;
- if (fault == NoFault)
- {
+ if (fault == NoFault) {
%(op_wb)s;
}
def template AA64FpRegRegOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, IntRegIndex _op1,
- VfpMicroMode mode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _dest, IntRegIndex _op1,
+ VfpMicroMode mode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_dest, _op1, mode)
{
%(constructor)s;
def template AA64FpRegImmOpConstructor {{
%(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest, uint64_t _imm, VfpMicroMode mode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ IntRegIndex _dest, uint64_t _imm, VfpMicroMode mode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
_dest, _imm, mode)
{
%(constructor)s;
}};
def template AA64FpRegRegImmOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- uint64_t _imm,
- VfpMicroMode mode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _imm, mode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, uint64_t _imm,
+ VfpMicroMode mode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _imm, mode)
{
%(constructor)s;
}
}};
def template AA64FpRegRegRegOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- VfpMicroMode mode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, mode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ VfpMicroMode mode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, mode)
{
%(constructor)s;
}
// Constructor
%(class_name)s(ExtMachInst machInst,
IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
- IntRegIndex _op3, VfpMicroMode mode = VfpNotAMicroop);
+ IntRegIndex _op3, VfpMicroMode mode=VfpNotAMicroop);
Fault execute(ExecContext *, Trace::InstRecord *) const override;
};
}};
def template AA64FpRegRegRegRegOpConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst,
- IntRegIndex _dest,
- IntRegIndex _op1,
- IntRegIndex _op2,
- IntRegIndex _op3,
- VfpMicroMode mode)
- : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
- _dest, _op1, _op2, _op3, mode)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
+ IntRegIndex _op1, IntRegIndex _op2,
+ IntRegIndex _op3, VfpMicroMode mode) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
+ _dest, _op1, _op2, _op3, mode)
{
%(constructor)s;
}