diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-03-16 13:58:50 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-03-16 13:58:50 -0500 |
commit | 558cc7f775dc404e4152212b5c6459ad9f4bb269 (patch) | |
tree | 5007156780781c8aee15344ea2348428733a5682 /arch/sparc/isa/formats/trap.isa | |
parent | 67a1b7a61b42abb9be2fb075ec0d4cc2f6414926 (diff) | |
download | gem5-558cc7f775dc404e4152212b5c6459ad9f4bb269.tar.xz |
Fixups towards compiling.
arch/alpha/types.hh:
Moved the DependenceTags enum from types to constants.
arch/sparc/faults.cc:
arch/sparc/faults.hh:
Corrected a misspelling of PriviledgeOpcode and PrivilegedAction.
arch/sparc/isa/formats.isa:
Fixups towards compiling. Added a few additional instruction formats.
--HG--
extra : convert_revision : 4c5506877b71b8a5c8c45db41192cf759cdac374
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) }}; |