diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-03-16 18:40:54 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-03-16 18:40:54 -0500 |
commit | 1db74514c23a09997d3f3eabca31a4dc94cec2f7 (patch) | |
tree | c28b33bbed1535a72503cdd5f52c39889dd0a449 /arch/sparc/isa/formats/trap.isa | |
parent | 805b9cf1d5ace9c02b7bd120ee1bc082f544699d (diff) | |
parent | 1d741c48af9f08718d359d9e3b7d3c0bf562a467 (diff) | |
download | gem5-1db74514c23a09997d3f3eabca31a4dc94cec2f7.tar.xz |
Merge zizzer:/bk/newmem
into zazzer.eecs.umich.edu:/.automount/zooks/y/ksewell/research/m5-sim/newmem-mips
--HG--
extra : convert_revision : 02fe0b0170348dc6f6a985c15123806088a8c23e
Diffstat (limited to 'arch/sparc/isa/formats/trap.isa')
-rw-r--r-- | arch/sparc/isa/formats/trap.isa | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/sparc/isa/formats/trap.isa b/arch/sparc/isa/formats/trap.isa index ff3aadf72..935fbfe6b 100644 --- a/arch/sparc/isa/formats/trap.isa +++ b/arch/sparc/isa/formats/trap.isa @@ -5,14 +5,15 @@ output header {{ /** - * Base class for integer operations. + * Base class for trap instructions, + * or instructions that always fault. */ class Trap : public SparcStaticInst { protected: // Constructor - Trap(const char *mnem, MachInst _machInst, OpClass __opClass) : + Trap(const char *mnem, ExtMachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) { } @@ -34,18 +35,18 @@ def template TrapExecute {{ Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const { - //TODO: set up a software fault and return it. - return NoFault; + Fault fault = NoFault; + %(code)s + return fault; } }}; -// Primary format for integer operate instructions: def format Trap(code, *opt_flags) {{ orig_code = code cblk = CodeBlock(code) iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) header_output = BasicDeclare.subst(iop) decoder_output = BasicConstructor.subst(iop) - decode_block = BasicDecodeWithMnemonic.subst(iop) + decode_block = BasicDecode.subst(iop) exec_output = TrapExecute.subst(iop) }}; |