summaryrefslogtreecommitdiff
path: root/arch/sparc/isa/formats/trap.isa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/isa/formats/trap.isa')
-rw-r--r--arch/sparc/isa/formats/trap.isa32
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/sparc/isa/formats/trap.isa b/arch/sparc/isa/formats/trap.isa
index bee77fe69..ff3aadf72 100644
--- a/arch/sparc/isa/formats/trap.isa
+++ b/arch/sparc/isa/formats/trap.isa
@@ -9,35 +9,33 @@ output header {{
*/
class Trap : public SparcStaticInst
{
- protected:
+ protected:
- /// Constructor
- Trap(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass)
- {
- }
+ // Constructor
+ Trap(const char *mnem, MachInst _machInst, OpClass __opClass) :
+ SparcStaticInst(mnem, _machInst, __opClass)
+ {
+ }
- std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
+ std::string generateDisassembly(Addr pc,
+ const SymbolTable *symtab) const;
};
}};
output decoder {{
- std::string Trap::generateDisassembly(Addr pc, const SymbolTable *symtab) const
+ std::string Trap::generateDisassembly(Addr pc,
+ const SymbolTable *symtab) const
{
- return "Disassembly of integer instruction\n";
+ return "Trap instruction\n";
}
}};
def template TrapExecute {{
- Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
+ Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
+ Trace::InstRecord *traceData) const
{
- //Call into the trap handler with the appropriate fault
- return No_Fault;
- }
-
- //Write the resulting state to the execution context
- %(op_wb)s;
-
- return No_Fault;
+ //TODO: set up a software fault and return it.
+ return NoFault;
}
}};