diff options
author | Kevin Lim <ktlim@umich.edu> | 2004-05-28 11:41:52 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2004-05-28 11:41:52 -0400 |
commit | 67b5f6afc10a87a5942d24ad503f3e6b9358580c (patch) | |
tree | 9cf28cf00687b98d3e818b4a72b8ed583d7061e2 /cpu/exec_context.hh | |
parent | 4f34dda81cf26340b9446e5a15bbbcd8840b92a2 (diff) | |
parent | a896960cbfce76a0e0c8cfb5cbdfc805ce72577b (diff) | |
download | gem5-67b5f6afc10a87a5942d24ad503f3e6b9358580c.tar.xz |
Merged in new FastCPU stuff with existing code.
arch/alpha/ev5.cc:
Added templatized processInterrupts() function that can be used by all of the CPU models.
arch/alpha/isa_desc:
Merged in changes to remove CPU dependence.
arch/isa_parser.py:
Merged in changes.
cpu/static_inst.hh:
Includes FastCPU execute methods.
--HG--
extra : convert_revision : fcaa1dca35a9b316c73982bec8680df564f50bd8
Diffstat (limited to 'cpu/exec_context.hh')
-rw-r--r-- | cpu/exec_context.hh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index 7be83539a..a62225f1b 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -31,6 +31,7 @@ #include "sim/host.hh" #include "mem/mem_req.hh" +#include "mem/functional_mem/functional_memory.hh" #include "sim/serialize.hh" // forward declaration: see functional_memory.hh @@ -114,6 +115,9 @@ class ExecContext // pointer to CPU associated with this context BaseCPU *cpu; + // Current instruction + MachInst inst; + // Index of hardware thread context on the CPU that this represents. int thread_num; @@ -311,6 +315,18 @@ class ExecContext virtual bool misspeculating(); + MachInst getInst() { return inst; } + + void setInst(MachInst new_inst) + { + inst = new_inst; + } + + Fault instRead(MemReqPtr &req) + { + return mem->read(req, inst); + } + // // New accessors for new decoder. // @@ -395,6 +411,14 @@ class ExecContext bool simPalCheck(int palFunc); #endif + /** Meant to be more generic trap function to be + * called when an instruction faults. + * @param fault The fault generated by executing the instruction. + * @todo How to do this properly so it's dependent upon ISA only? + */ + + void trap(Fault fault); + #ifndef FULL_SYSTEM IntReg getSyscallArg(int i) { |