changeset 8652636856b3 in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=8652636856b3 description: SPARC: Tighten up the clone system call and SPARCs copyRegs.
diffstat: 2 files changed, 9 insertions(+), 12 deletions(-) src/arch/sparc/regfile.cc | 15 ++++++++------- src/sim/syscall_emul.cc | 6 +----- diffs (55 lines): diff -r 5af0a83d9021 -r 8652636856b3 src/arch/sparc/regfile.cc --- a/src/arch/sparc/regfile.cc Thu Apr 23 06:44:32 2009 -0700 +++ b/src/arch/sparc/regfile.cc Fri Apr 24 23:11:21 2009 -0700 @@ -359,19 +359,20 @@ for (int x = 0; x < MaxGL; ++x) { src->setMiscRegNoEffect(MISCREG_GL, x); dest->setMiscRegNoEffect(MISCREG_GL, x); - for (int y = 0; y < 8; y++) + // Skip %g0 which is always zero. + for (int y = 1; y < 8; y++) dest->setIntReg(y, src->readIntReg(y)); } - //Locals/Ins/Outs + //Locals and ins. Outs are all also ins. for (int x = 0; x < NWindows; ++x) { src->setMiscRegNoEffect(MISCREG_CWP, x); dest->setMiscRegNoEffect(MISCREG_CWP, x); - for (int y = 8; y < 32; y++) + for (int y = 16; y < 32; y++) dest->setIntReg(y, src->readIntReg(y)); } - //MicroIntRegs - for (int y = 0; y < NumMicroIntRegs; ++y) - dest->setIntReg(y+32, src->readIntReg(y+32)); + //Microcode reg and pseudo int regs (misc regs in the integer regfile). + for (int y = NumIntArchRegs; y < NumIntArchRegs + NumMicroIntRegs; ++y) + dest->setIntReg(y, src->readIntReg(y)); //Restore src's GL, CWP src->setMiscRegNoEffect(MISCREG_GL, old_gl); @@ -379,7 +380,7 @@ // Then loop through the floating point registers. - for (int i = 0; i < SparcISA::NumFloatRegs; ++i) { + for (int i = 0; i < SparcISA::NumFloatArchRegs; ++i) { dest->setFloatRegBits(i, src->readFloatRegBits(i)); } diff -r 5af0a83d9021 -r 8652636856b3 src/sim/syscall_emul.cc --- a/src/sim/syscall_emul.cc Thu Apr 23 06:44:32 2009 -0700 +++ b/src/sim/syscall_emul.cc Fri Apr 24 23:11:21 2009 -0700 @@ -723,11 +723,7 @@ ctc->setPC(tc->readNextPC()); ctc->setNextPC(tc->readNextPC() + sizeof(TheISA::MachInst)); - - // In SPARC, need NNPC too... - #if THE_ISA == SPARC_ISA - ctc->setNextNPC(tc->readNextNPC() + sizeof(TheISA::MachInst)); - #endif + ctc->setNextNPC(tc->readNextNPC() + sizeof(TheISA::MachInst)); ctc->activate(); _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev