summaryrefslogtreecommitdiff
path: root/arch/mips/isa/formats
diff options
context:
space:
mode:
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