diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-03-10 19:52:53 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-03-10 19:52:53 -0500 |
commit | 780489d58bfd2d024b9a25398df156151099eb45 (patch) | |
tree | 4900c806e9d6c8f54d0fb595111a68318b3a312c | |
parent | bf4dade64af6160422e42c0feb1a5c69236728ae (diff) | |
parent | 7e363e14f7f348d8b10fa020e572867659f7e6c6 (diff) | |
download | gem5-780489d58bfd2d024b9a25398df156151099eb45.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into zower.eecs.umich.edu:/home/gblack/m5/newmem-statetrace
--HG--
extra : convert_revision : 6a8749be327bf2be888850060ae0427f0c943439
-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: |