summaryrefslogtreecommitdiff
path: root/cpu/simple_cpu/simple_cpu.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-02-03 20:47:11 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2005-02-03 20:47:11 -0500
commit0aaf8ec6b83c65a60932fd9f9f4b81eca1bcce74 (patch)
treef5f7f47f8283b96531776cf4b5eac93f8a7cd54d /cpu/simple_cpu/simple_cpu.hh
parent15e1ad8f6b0e0b45279c27ecc8f3c70854a4b0a4 (diff)
downloadgem5-0aaf8ec6b83c65a60932fd9f9f4b81eca1bcce74.tar.xz
Add support for CPU models to execute the effective
address calculation and memory access portions separately. Not currently used by any CPU models, but Kevin says he needs this. Also clean up handling of execution tracing for memory accesses (move it all into isa_desc and out of CPU models). Got rid of some ancient unused code too. arch/alpha/isa_desc: Add execute() methods to EAComp and MemAcc portions of memory access instructions, to allow CPU models to execute the effective address calculation and memory access portions separately. Requires the execution context to remember the effective address across the two invocations. Added setEA() and getEA() methods to execution context to support this. A model that does not use the split execution model can panic if these methods are called. Also added hook to call traceData->setAddr() after EA computation on any load or store operation. arch/isa_parser.py: Call traceData->setData() on memory writes (stores). cpu/simple_cpu/simple_cpu.cc: Get rid of unused code. cpu/simple_cpu/simple_cpu.hh: Add (non-functional) setEA() and getEA() methods for new split memory access execution support. --HG-- extra : convert_revision : bc2d2c758c4ca753812b9fa81f21038e55929ff0
Diffstat (limited to 'cpu/simple_cpu/simple_cpu.hh')
-rw-r--r--cpu/simple_cpu/simple_cpu.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index 9b6e2423b..a81d6365b 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -102,8 +102,7 @@ class SimpleCPU : public BaseCPU
private:
Trace::InstRecord *traceData;
- template<typename T>
- void trace_data(T data);
+
public:
//
enum Status {
@@ -244,6 +243,11 @@ class SimpleCPU : public BaseCPU
template <class T>
Fault write(T data, Addr addr, unsigned flags, uint64_t *res);
+ // These functions are only used in CPU models that split
+ // effective address computation from the actual memory access.
+ void setEA(Addr EA) { panic("SimpleCPU::setEA() not implemented\n"); }
+ Addr getEA() { panic("SimpleCPU::getEA() not implemented\n"); }
+
void prefetch(Addr addr, unsigned flags)
{
// need to do this...