Fixed to take into account the misc regs that became int regs.

--HG--
extra : convert_revision : b4f78f6e48fdd2f1774ba63b28615e0d2556b7b9
This commit is contained in:
Gabe Black 2006-12-07 19:00:46 -05:00
parent 97cdd5198b
commit 498e235ae0

View file

@ -141,13 +141,15 @@ Trace::InstRecord::dump(ostream &outs)
outs << hex; outs << hex;
outs << "PC = " << thread->readNextPC(); outs << "PC = " << thread->readNextPC();
outs << " NPC = " << thread->readNextNPC(); outs << " NPC = " << thread->readNextNPC();
newVal = thread->readMiscReg(SparcISA::MISCREG_CCR); newVal = thread->readIntReg(SparcISA::NumIntArchRegs + 2);
//newVal = thread->readMiscReg(SparcISA::MISCREG_CCR);
if(newVal != ccr) if(newVal != ccr)
{ {
outs << " CCR = " << newVal; outs << " CCR = " << newVal;
ccr = newVal; ccr = newVal;
} }
newVal = thread->readMiscReg(SparcISA::MISCREG_Y); newVal = thread->readIntReg(SparcISA::NumIntArchRegs + 1);
//newVal = thread->readMiscReg(SparcISA::MISCREG_Y);
if(newVal != y) if(newVal != y)
{ {
outs << " Y = " << newVal; outs << " Y = " << newVal;
@ -363,9 +365,13 @@ Trace::InstRecord::dump(ostream &outs)
diffHtba = true; diffHtba = true;
if(shared_data->pstate != thread->readMiscReg(MISCREG_PSTATE)) if(shared_data->pstate != thread->readMiscReg(MISCREG_PSTATE))
diffPstate = true; diffPstate = true;
if(shared_data->y != thread->readMiscReg(MISCREG_Y)) //if(shared_data->y != thread->readMiscReg(MISCREG_Y))
if(shared_data->y !=
thread->readIntReg(NumIntArchRegs + 1))
diffY = true; diffY = true;
if(shared_data->ccr != thread->readMiscReg(MISCREG_CCR)) //if(shared_data->ccr != thread->readMiscReg(MISCREG_CCR))
if(shared_data->ccr !=
thread->readIntReg(NumIntArchRegs + 2))
diffCcr = true; diffCcr = true;
if(shared_data->gl != thread->readMiscReg(MISCREG_GL)) if(shared_data->gl != thread->readMiscReg(MISCREG_GL))
diffGl = true; diffGl = true;
@ -375,14 +381,22 @@ Trace::InstRecord::dump(ostream &outs)
diffPil = true; diffPil = true;
if(shared_data->cwp != thread->readMiscReg(MISCREG_CWP)) if(shared_data->cwp != thread->readMiscReg(MISCREG_CWP))
diffCwp = true; diffCwp = true;
if(shared_data->cansave != thread->readMiscReg(MISCREG_CANSAVE)) //if(shared_data->cansave != thread->readMiscReg(MISCREG_CANSAVE))
if(shared_data->cansave !=
thread->readIntReg(NumIntArchRegs + 3))
diffCansave = true; diffCansave = true;
//if(shared_data->canrestore !=
// thread->readMiscReg(MISCREG_CANRESTORE))
if(shared_data->canrestore != if(shared_data->canrestore !=
thread->readMiscReg(MISCREG_CANRESTORE)) thread->readMiscReg(NumIntArchRegs + 4))
diffCanrestore = true; diffCanrestore = true;
if(shared_data->otherwin != thread->readMiscReg(MISCREG_OTHERWIN)) //if(shared_data->otherwin != thread->readMiscReg(MISCREG_OTHERWIN))
if(shared_data->otherwin !=
thread->readIntReg(NumIntArchRegs + 5))
diffOtherwin = true; diffOtherwin = true;
if(shared_data->cleanwin != thread->readMiscReg(MISCREG_CLEANWIN)) //if(shared_data->cleanwin != thread->readMiscReg(MISCREG_CLEANWIN))
if(shared_data->cleanwin !=
thread->readMiscReg(NumIntArchRegs + 6))
diffCleanwin = true; diffCleanwin = true;
if (diffPC || diffInst || diffRegs || diffTpc || diffTnpc || if (diffPC || diffInst || diffRegs || diffTpc || diffTnpc ||
@ -473,10 +487,12 @@ Trace::InstRecord::dump(ostream &outs)
thread->readMiscReg(MISCREG_PSTATE), thread->readMiscReg(MISCREG_PSTATE),
shared_data->pstate); shared_data->pstate);
printRegPair(outs, "Y", printRegPair(outs, "Y",
thread->readMiscReg(MISCREG_Y), //thread->readMiscReg(MISCREG_Y),
thread->readMiscReg(NumIntArchRegs + 1),
shared_data->y); shared_data->y);
printRegPair(outs, "Ccr", printRegPair(outs, "Ccr",
thread->readMiscReg(MISCREG_CCR), //thread->readMiscReg(MISCREG_CCR),
thread->readMiscReg(NumIntArchRegs + 2),
shared_data->ccr); shared_data->ccr);
printRegPair(outs, "Tl", printRegPair(outs, "Tl",
thread->readMiscReg(MISCREG_TL), thread->readMiscReg(MISCREG_TL),
@ -494,16 +510,20 @@ Trace::InstRecord::dump(ostream &outs)
thread->readMiscReg(MISCREG_CWP), thread->readMiscReg(MISCREG_CWP),
shared_data->cwp); shared_data->cwp);
printRegPair(outs, "Cansave", printRegPair(outs, "Cansave",
thread->readMiscReg(MISCREG_CANSAVE), //thread->readMiscReg(MISCREG_CANSAVE),
thread->readIntReg(NumIntArchRegs + 3),
shared_data->cansave); shared_data->cansave);
printRegPair(outs, "Canrestore", printRegPair(outs, "Canrestore",
thread->readMiscReg(MISCREG_CANRESTORE), //thread->readMiscReg(MISCREG_CANRESTORE),
thread->readIntReg(NumIntArchRegs + 4),
shared_data->canrestore); shared_data->canrestore);
printRegPair(outs, "Otherwin", printRegPair(outs, "Otherwin",
thread->readMiscReg(MISCREG_OTHERWIN), //thread->readMiscReg(MISCREG_OTHERWIN),
thread->readIntReg(NumIntArchRegs + 5),
shared_data->otherwin); shared_data->otherwin);
printRegPair(outs, "Cleanwin", printRegPair(outs, "Cleanwin",
thread->readMiscReg(MISCREG_CLEANWIN), //thread->readMiscReg(MISCREG_CLEANWIN),
thread->readIntReg(NumIntArchRegs + 6),
shared_data->cleanwin); shared_data->cleanwin);
outs << endl; outs << endl;
for (int i = 1; i <= MaxTL; i++) { for (int i = 1; i <= MaxTL; i++) {