diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-22 22:15:22 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-22 22:15:22 -0400 |
commit | 387889526430e34a7da32741d39942b7f4771bf8 (patch) | |
tree | 3b0c1e4c99568a30150b8b30e7dfc97cee9c20e9 /src/arch/sparc/isa | |
parent | 2af0daa59fb7d801c82adba8fcb2c01b6c76a725 (diff) | |
download | gem5-387889526430e34a7da32741d39942b7f4771bf8.tar.xz |
Fix to SPARC Nop class for multiple CPU models.
src/arch/sparc/isa/formats/nop.isa:
Fix nop header so we can compile with multiple CPU models.
(Former code re-defined Nop object for each model.)
--HG--
extra : convert_revision : 04e92622edf4dfefd9e149a17f604e17a93707c9
Diffstat (limited to 'src/arch/sparc/isa')
-rw-r--r-- | src/arch/sparc/isa/formats/nop.isa | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/arch/sparc/isa/formats/nop.isa b/src/arch/sparc/isa/formats/nop.isa index 7fd1a3b21..37ef2e8d0 100644 --- a/src/arch/sparc/isa/formats/nop.isa +++ b/src/arch/sparc/isa/formats/nop.isa @@ -32,6 +32,16 @@ // Nop instruction // +// Per-cpu-model nop execute method. +def template NopExec {{ + + Fault execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const + { + // Nothing to see here, move along + return NoFault; + } +}}; + output header {{ /** * Nop class. @@ -46,14 +56,11 @@ output header {{ } // All Nop instructions do the same thing, so this can be - // defined here. Nops can be defined directly, so there needs - // to be a default implementation - Fault execute(%(CPU_exec_context)s *xc, - Trace::InstRecord *traceData) const - { - //Nothing to see here, move along - return NoFault; - } + // defined here. Nops can be defined directly, so there + // needs to be a default implementation. Interpolate via + // template so i gets expanded to a set of + // cpu-model-specific functions. + %(NopExec)s std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; |