arch/sparc/isa/formats.isa: Changed the file extensions to .isa again. arch/sparc/isa/main.isa: Changed the file extensions to .isa again --HG-- rename : arch/sparc/isa_desc/base.h => arch/sparc/isa/base.isa rename : arch/sparc/isa_desc/bitfields.h => arch/sparc/isa/bitfields.isa rename : arch/sparc/isa_desc/decoder.h => arch/sparc/isa/decoder.isa rename : arch/sparc/isa_desc/formats.h => arch/sparc/isa/formats.isa rename : arch/sparc/isa_desc/formats/basic.format => arch/sparc/isa/formats/basic.isa rename : arch/sparc/isa_desc/formats/branch.format => arch/sparc/isa/formats/branch.isa rename : arch/sparc/isa_desc/formats/integerop.format => arch/sparc/isa/formats/integerop.isa rename : arch/sparc/isa_desc/formats/mem.format => arch/sparc/isa/formats/mem.isa rename : arch/sparc/isa_desc/formats/noop.format => arch/sparc/isa/formats/noop.isa rename : arch/sparc/isa_desc/formats/trap.format => arch/sparc/isa/formats/trap.isa rename : arch/sparc/isa_desc/includes.h => arch/sparc/isa/includes.isa rename : arch/sparc/isa_desc/isa_desc => arch/sparc/isa/main.isa rename : arch/sparc/isa_desc/operands.h => arch/sparc/isa/operands.isa extra : convert_revision : acb087e81d06ca5d67fe9b402423d7930f6ae798
65 lines
1.9 KiB
Text
65 lines
1.9 KiB
Text
|
|
// Declarations for execute() methods.
|
|
def template BasicExecDeclare {{
|
|
Fault execute(%(CPU_exec_context)s *, Trace::InstRecord *) const;
|
|
}};
|
|
|
|
// 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(MachInst machInst);
|
|
%(BasicExecDeclare)s
|
|
};
|
|
}};
|
|
|
|
// Basic instruction class constructor template.
|
|
def template BasicConstructor {{
|
|
inline %(class_name)s::%(class_name)s(MachInst 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(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
|
|
{
|
|
Fault fault = No_Fault;
|
|
|
|
%(fp_enable_check)s;
|
|
%(op_decl)s;
|
|
%(op_rd)s;
|
|
%(code)s;
|
|
|
|
if(fault == No_Fault)
|
|
{
|
|
%(op_wb)s;
|
|
}
|
|
return fault;
|
|
}
|
|
}};
|
|
|
|
// Basic decode template.
|
|
def template BasicDecode {{
|
|
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);
|
|
}};
|
|
|
|
// The most basic instruction format... used only for a few misc. insts
|
|
def format BasicOperate(code, *flags) {{
|
|
iop = InstObjParams(name, Name, 'SparcStaticInst', CodeBlock(code), flags)
|
|
header_output = BasicDeclare.subst(iop)
|
|
decoder_output = BasicConstructor.subst(iop)
|
|
decode_block = BasicDecode.subst(iop)
|
|
exec_output = BasicExecute.subst(iop)
|
|
}};
|