diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-03-10 19:44:00 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-03-10 19:44:00 -0500 |
commit | 91c812c34d37dd195df3ecf185fe6938ac5629cf (patch) | |
tree | 4900c806e9d6c8f54d0fb595111a68318b3a312c | |
parent | e98265b7d610ee5c5c2a9b18a81e1ddd2bba3ea0 (diff) | |
parent | 7e363e14f7f348d8b10fa020e572867659f7e6c6 (diff) | |
download | gem5-91c812c34d37dd195df3ecf185fe6938ac5629cf.tar.xz |
Merge zower:/home/gblack/m5/newmem-statetrace
into zizzer.eecs.umich.edu:/.automount/zower/eecshome/m5/newmem-statetrace-test
--HG--
extra : convert_revision : c6a45d188b729176e196e19e2d75328da0414084
-rw-r--r-- | src/arch/sparc/miscregfile.cc | 7 |
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: |