Merge zower.eecs.umich.edu:/home/gblack/m5/newmem-statetrace

into  zower.eecs.umich.edu:/home/gblack/m5/newmem-statetrace-test

--HG--
extra : convert_revision : dc02bb6b4e5cc7f0260da80a71b9713f75566a29
This commit is contained in:
Gabe Black 2007-03-10 20:52:55 -05:00
commit 52ec0fe3d9

View file

@ -654,7 +654,12 @@ void MiscRegFile::setReg(int miscReg,
#endif
return;
case MISCREG_CWP:
new_val = val > NWindows ? NWindows - 1 : val;
new_val = val >= NWindows ? NWindows - 1 : val;
if (val >= NWindows) {
new_val = NWindows - 1;
warn("Attempted to set the CWP to %d with NWindows = %d\n",
val, NWindows);
}
tc->changeRegFileContext(CONTEXT_CWP, new_val);
break;
case MISCREG_GL: