diff options
author | Derek Hower <drh5@cs.wisc.edu> | 2009-07-13 14:49:51 -0500 |
---|---|---|
committer | Derek Hower <drh5@cs.wisc.edu> | 2009-07-13 14:49:51 -0500 |
commit | 100da6b3267b4e3d6834cd872502b8303d289d17 (patch) | |
tree | 1a1427989468e5b6e5f8a1c1c7bb96b3bbdb6f2c /src/arch/x86/utility.cc | |
parent | d51445490d9f7ccd09d7003f4360044422bd7b57 (diff) | |
parent | 60577eb4caff66a756f260bff6bf3bf8cb7edcba (diff) | |
download | gem5-100da6b3267b4e3d6834cd872502b8303d289d17.tar.xz |
merge
Diffstat (limited to 'src/arch/x86/utility.cc')
-rw-r--r-- | src/arch/x86/utility.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/arch/x86/utility.cc b/src/arch/x86/utility.cc index 9e96b654d..802328db1 100644 --- a/src/arch/x86/utility.cc +++ b/src/arch/x86/utility.cc @@ -225,4 +225,30 @@ void startupCPU(ThreadContext *tc, int cpuId) #endif } +void +copyMiscRegs(ThreadContext *src, ThreadContext *dest) +{ + warn("copyMiscRegs is naively implemented for x86\n"); + for (int i = 0; i < NUM_MISCREGS; ++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 +copyRegs(ThreadContext *src, ThreadContext *dest) +{ + panic("copyRegs not implemented for x86!\n"); + //copy int regs + //copy float regs + copyMiscRegs(src, dest); + + dest->setPC(src->readPC()); + dest->setNextPC(src->readNextPC()); +} + } //namespace X86_ISA |