summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-03-10 20:52:55 -0500
committerGabe Black <gblack@eecs.umich.edu>2007-03-10 20:52:55 -0500
commit52ec0fe3d9cc1de528afdefb10a6646551ac8d19 (patch)
tree0628c26182064864ec12c7f99e44e4c9d133a124 /src/arch
parent91e8729c282a18662ab1fd611b7719a9e876551c (diff)
parent780489d58bfd2d024b9a25398df156151099eb45 (diff)
downloadgem5-52ec0fe3d9cc1de528afdefb10a6646551ac8d19.tar.xz
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
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/sparc/miscregfile.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/sparc/miscregfile.cc b/src/arch/sparc/miscregfile.cc
index 20bc4ae5d..ac30afde9 100644
--- a/src/arch/sparc/miscregfile.cc
+++ b/src/arch/sparc/miscregfile.cc
@@ -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: