summaryrefslogtreecommitdiff
path: root/arch/mips/isa/formats
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2006-02-03 23:04:06 -0500
committerKorey Sewell <ksewell@umich.edu>2006-02-03 23:04:06 -0500
commit035b443093cc969c79e67285b0f421a7f12edf33 (patch)
tree0651a09570db293ac6bb897fd104ea25ee229c36 /arch/mips/isa/formats
parent1e222c1502f8cf40535fed23b3f51c5f25a6c29f (diff)
downloadgem5-035b443093cc969c79e67285b0f421a7f12edf33.tar.xz
mainly added minor support for the basic arithmetic operations (add, mult, shift)
arch/mips/isa/bitfields.def: Add comment, move definition up in file arch/mips/isa/decoder.def: add basic arithmetic operations arch/mips/isa/formats/fp.format: change Integer -> FP words arch/mips/isa/formats/int.format: Add derived IntImm class arch/mips/isa/operands.def: change to MIPS sytle operands --HG-- rename : arch/mips/isa/formats/fpop.format => arch/mips/isa/formats/fp.format rename : arch/mips/isa/formats/integerop.format => arch/mips/isa/formats/int.format extra : convert_revision : a95da47bc981e56a9898421da4eeb9c442d1dc15
Diffstat (limited to 'arch/mips/isa/formats')
-rw-r--r--arch/mips/isa/formats/fp.format (renamed from arch/mips/isa/formats/fpop.format)2
-rw-r--r--arch/mips/isa/formats/int.format (renamed from arch/mips/isa/formats/integerop.format)26
2 files changed, 24 insertions, 4 deletions
diff --git a/arch/mips/isa/formats/fpop.format b/arch/mips/isa/formats/fp.format
index a058eea19..707109fc2 100644
--- a/arch/mips/isa/formats/fpop.format
+++ b/arch/mips/isa/formats/fp.format
@@ -27,7 +27,7 @@ output decoder {{
}
}};
-def template IntegerExecute {{
+def template FPExecute {{
Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
{
//These are set to constants when the execute method
diff --git a/arch/mips/isa/formats/integerop.format b/arch/mips/isa/formats/int.format
index 6fa7feed3..9b2d8d38e 100644
--- a/arch/mips/isa/formats/integerop.format
+++ b/arch/mips/isa/formats/int.format
@@ -7,7 +7,7 @@ output header {{
/**
* Base class for integer operations.
*/
- class IntegerOp : public MipsStaticInst
+ class IntOp : public MipsStaticInst
{
protected:
@@ -18,16 +18,36 @@ 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 {{
- std::string IntegerOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
+ std::string IntOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
return "Disassembly of integer instruction\n";
}
+
+ std::string IntImm::generateDisassembly(Addr pc, const SymbolTable *symtab) const
+ {
+ return "Disassembly of integer immediate instruction\n";
+ }
}};
-def template IntegerExecute {{
+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