summaryrefslogtreecommitdiff
path: root/arch/mips/isa/formats
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2006-02-07 18:36:08 -0500
committerKorey Sewell <ksewell@umich.edu>2006-02-07 18:36:08 -0500
commitd30262d480b8a167470c17a35aecc727ea933a22 (patch)
tree2347e6aa83361205837d6595350c72faf08daffb /arch/mips/isa/formats
parent6d2807ded8660f241aaecd28ff716c1d91f8b5a0 (diff)
downloadgem5-d30262d480b8a167470c17a35aecc727ea933a22.tar.xz
name changes ... minor IntOP format change
arch/mips/isa/formats/int.format: Looks like Integer Ops with Immediates may not need their own separate class because all those instructions are distinct from their reg-reg counterparts --HG-- rename : arch/mips/isa/bitfields.def => arch/mips/isa/bitfields.isa rename : arch/mips/isa/decoder.def => arch/mips/isa/decoder.isa rename : arch/mips/isa/formats.def => arch/mips/isa/formats.isa rename : arch/mips/isa/includes.h => arch/mips/isa/includes.isa rename : arch/mips/isa/operands.def => arch/mips/isa/operands.isa extra : convert_revision : 8e354b4232b28c0264d98d333d55ef8b5a6589cc
Diffstat (limited to 'arch/mips/isa/formats')
-rw-r--r--arch/mips/isa/formats/int.format65
1 files changed, 3 insertions, 62 deletions
diff --git a/arch/mips/isa/formats/int.format b/arch/mips/isa/formats/int.format
index 9b2d8d38e..edfdddb18 100644
--- a/arch/mips/isa/formats/int.format
+++ b/arch/mips/isa/formats/int.format
@@ -19,20 +19,6 @@ output header {{
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
};
- /**
- * Derived class for integer immediate operations.
- */
- class IntImm : public IntOp
- {
- protected:
-
- /// Constructor
- IntegerImm(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
- {
- }
-
- std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
- };
}};
output decoder {{
@@ -41,7 +27,7 @@ output decoder {{
return "Disassembly of integer instruction\n";
}
- std::string IntImm::generateDisassembly(Addr pc, const SymbolTable *symtab) const
+ std::string IntImmOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
return "Disassembly of integer immediate instruction\n";
}
@@ -50,16 +36,9 @@ output decoder {{
def template IntExecute {{
Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
{
- //These are set to constants when the execute method
- //is generated
- bool useCc = ;
- bool checkPriv = ;
-
//Attempt to execute the instruction
try
{
- checkPriv;
-
%(op_decl)s;
%(op_rd)s;
%(code)s;
@@ -74,34 +53,15 @@ def template IntExecute {{
//Write the resulting state to the execution context
%(op_wb)s;
- if(useCc)
- {
- xc->regs.miscRegFile.ccrFields.iccFields.n = Rd & (1 << 63);
- xc->regs.miscRegFile.ccrFields.iccFields.z = (Rd == 0);
- xc->regs.miscRegFile.ccrFields.iccFields.v = ivValue;
- xc->regs.miscRegFile.ccrFields.iccFields.c = icValue;
- xc->regs.miscRegFile.ccrFields.xccFields.n = Rd & (1 << 31);
- xc->regs.miscRegFile.ccrFields.xccFields.z = ((Rd & 0xFFFFFFFF) == 0);
- xc->regs.miscRegFile.ccrFields.xccFields.v = xvValue;
- xc->regs.miscRegFile.ccrFields.xccFields.c = xcValue;
- }
+
return No_Fault;
}
}};
// Primary format for integer operate instructions:
-def format IntegerOp(code, *opt_flags) {{
+def format IntOp(code, *opt_flags) {{
orig_code = code
cblk = CodeBlock(code)
- checkPriv = (code.find('checkPriv') != -1)
- code.replace('checkPriv', '')
- if checkPriv:
- code.replace('checkPriv;', 'if(!xc->regs.miscRegFile.pstateFields.priv) throw privileged_opcode;')
- else:
- code.replace('checkPriv;', '')
- for (marker, value) in (('ivValue', '0'), ('icValue', '0'),
- ('xvValue', '0'), ('xcValue', '0')):
- code.replace(marker, value)
iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop)
@@ -109,22 +69,3 @@ def format IntegerOp(code, *opt_flags) {{
exec_output = IntegerExecute.subst(iop)
}};
-// Primary format for integer operate instructions:
-def format IntegerOpCc(code, icValue, ivValue, xcValue, xvValue, *opt_flags) {{
- orig_code = code
- cblk = CodeBlock(code)
- checkPriv = (code.find('checkPriv') != -1)
- code.replace('checkPriv', '')
- if checkPriv:
- code.replace('checkPriv;', 'if(!xc->regs.miscRegFile.pstateFields.priv) throw privileged_opcode;')
- else:
- code.replace('checkPriv;', '')
- for (marker, value) in (('ivValue', ivValue), ('icValue', icValue),
- ('xvValue', xvValue), ('xcValue', xcValue)):
- code.replace(marker, value)
- iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
- header_output = BasicDeclare.subst(iop)
- decoder_output = BasicConstructor.subst(iop)
- decode_block = BasicDecodeWithMnemonic.subst(iop)
- exec_output = IntegerExecute.subst(iop)
-}};