diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:44 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:44 -0500 |
commit | 4ae02295d59036fa2f9d272ee288e0321bb8257a (patch) | |
tree | be3223b70e1e94585e7c2d50ca29c2a32ae4645b /src/cpu/inorder | |
parent | 6daada2701c7ea361843a7c2a50cb616b56b1519 (diff) | |
download | gem5-4ae02295d59036fa2f9d272ee288e0321bb8257a.tar.xz |
cpu: Unify SimpleCPU and O3 CPU serialization code
The O3 CPU used to copy its thread context to a SimpleThread in order
to do serialization. This was a bit of a hack involving two static
SimpleThread instances and a magic constructor that was only used by
the O3 CPU.
This patch moves the ThreadContext serialization code into two global
procedures that, in addition to the normal serialization parameters,
take a ThreadContext reference as a parameter. This allows us to reuse
the serialization code in all ThreadContext implementations.
Diffstat (limited to 'src/cpu/inorder')
-rw-r--r-- | src/cpu/inorder/thread_context.cc | 15 | ||||
-rw-r--r-- | src/cpu/inorder/thread_context.hh | 6 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/cpu/inorder/thread_context.cc b/src/cpu/inorder/thread_context.cc index 4abfb6cca..2990430e1 100644 --- a/src/cpu/inorder/thread_context.cc +++ b/src/cpu/inorder/thread_context.cc @@ -160,21 +160,6 @@ InOrderThreadContext::regStats(const std::string &name) } } - -void -InOrderThreadContext::serialize(std::ostream &os) -{ - panic("serialize unimplemented"); -} - - -void -InOrderThreadContext::unserialize(Checkpoint *cp, const std::string §ion) -{ - panic("unserialize unimplemented"); -} - - void InOrderThreadContext::copyArchRegs(ThreadContext *src_tc) { diff --git a/src/cpu/inorder/thread_context.hh b/src/cpu/inorder/thread_context.hh index 2191ac238..f4847d0b4 100644 --- a/src/cpu/inorder/thread_context.hh +++ b/src/cpu/inorder/thread_context.hh @@ -191,12 +191,6 @@ class InOrderThreadContext : public ThreadContext /** Registers statistics associated with this TC. */ void regStats(const std::string &name); - /** Serializes state. */ - void serialize(std::ostream &os); - - /** Unserializes state. */ - void unserialize(Checkpoint *cp, const std::string §ion); - /** Returns this thread's ID number. */ int getThreadNum() { return thread->threadId(); } |