From fc57ae640130c2d7610f4ff20a3d8816b88042bf Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 22 Jan 2013 00:10:10 -0600 Subject: x86, cpu: corrects 270c9a75e91f, take over decoder on cpu switch The changes made by the changeset 270c9a75e91f do not work well with switching of cpus. The problem is that decoder for the old thread context holds state that is not taken over by the new decoder. This patch adds a takeOverFrom() function to Decoder class in each ISA. Except for x86, functions in other ISAs are blank. For x86, the function copies state from the old decoder to the new decoder. --- src/arch/mips/decoder.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/arch/mips/decoder.hh') diff --git a/src/arch/mips/decoder.hh b/src/arch/mips/decoder.hh index 080614dee..a3a68ad07 100644 --- a/src/arch/mips/decoder.hh +++ b/src/arch/mips/decoder.hh @@ -83,6 +83,8 @@ class Decoder return instDone; } + void takeOverFrom(Decoder *old) {} + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; -- cgit v1.2.3