summaryrefslogtreecommitdiff
path: root/src/arch/x86/regfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/regfile.cc')
-rw-r--r--src/arch/x86/regfile.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/x86/regfile.cc b/src/arch/x86/regfile.cc
index 7d01c4bb4..83279902e 100644
--- a/src/arch/x86/regfile.cc
+++ b/src/arch/x86/regfile.cc
@@ -250,7 +250,17 @@ RegFile::unserialize(EventManager *em, Checkpoint *cp, const string &section)
void X86ISA::copyMiscRegs(ThreadContext *src, ThreadContext *dest)
{
- panic("copyMiscRegs not implemented for x86!\n");
+ //panic("copyMiscRegs not implemented for x86!\n");
+ warn("copyMiscRegs is naively implemented for x86\n");
+ for (int i = 0; i < X86ISA::NumMiscRegs; ++i) {
+ if ( ( i != MISCREG_CR1 &&
+ !(i > MISCREG_CR4 && i < MISCREG_CR8) &&
+ !(i > MISCREG_CR8 && i <= MISCREG_CR15) ) == false) {
+ continue;
+ }
+ dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
+ }
+
}
void X86ISA::copyRegs(ThreadContext *src, ThreadContext *dest)