*/
class %(class_name)s : public %(base_class)s
{
+ private:
+ %(reg_idx_arr_decl)s;
+
public:
- /// Constructor.
- %(class_name)s(ExtMachInst machInst);
- Fault execute(ExecContext *,
- Trace::InstRecord *) const override;
+ /// 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)
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
{
- %(constructor)s;
+ %(set_reg_idx_arr)s;
+ %(constructor)s;
}
}};
// Instruction class constructor template when Rc is set.
def template IntRcConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
- {
- %(constructor)s;
- rcSet = true;
- }
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ {
+ %(set_reg_idx_arr)s;
+ %(constructor)s;
+ rcSet = true;
+ }
}};
// Instruction class constructor template when OE is set.
def template IntOeConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
- {
- %(constructor)s;
- oeSet = true;
- }
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ {
+ %(set_reg_idx_arr)s;
+ %(constructor)s;
+ oeSet = true;
+ }
}};
// Instruction class constructor template when both Rc and OE are set.
def template IntRcOeConstructor {{
- %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
- {
- %(constructor)s;
- rcSet = true;
- oeSet = true;
- }
+ %(class_name)s::%(class_name)s(ExtMachInst machInst) :
+ %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+ {
+ %(set_reg_idx_arr)s;
+ %(constructor)s;
+ rcSet = true;
+ oeSet = true;
+ }
}};
*/
class %(class_name)s : public %(base_class)s
{
- public:
+ private:
+ %(reg_idx_arr_decl)s;
+ public:
/// Constructor.
%(class_name)s(ExtMachInst machInst);
%(class_name)s::%(class_name)s(ExtMachInst machInst)
: %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
{
+ %(set_reg_idx_arr)s;
%(constructor)s;
}
}};