diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-01-22 22:31:48 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-01-22 22:31:48 -0800 |
commit | 1352e55ceb2d78a9a36451636b672cd6daf8550e (patch) | |
tree | d7c797f46cd00cc76628a4a65329f2f2dd966cbe /src/arch/sparc/intregfile.cc | |
parent | 45c3f1747c78aff3495edfe2cbe35fbb7a67f2a4 (diff) | |
parent | 60eaa03d72a13863596e64343d7407af1cab51c5 (diff) | |
download | gem5-1352e55ceb2d78a9a36451636b672cd6daf8550e.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmemo3
src/sim/byteswap.hh:
Hand Merge
--HG--
extra : convert_revision : 640d33ad0c416934e8a5107768e7f1dce6709ca8
Diffstat (limited to 'src/arch/sparc/intregfile.cc')
-rw-r--r-- | src/arch/sparc/intregfile.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/sparc/intregfile.cc b/src/arch/sparc/intregfile.cc index 594fe4bea..2c9d9b162 100644 --- a/src/arch/sparc/intregfile.cc +++ b/src/arch/sparc/intregfile.cc @@ -120,6 +120,8 @@ void IntRegFile::setReg(int intReg, const IntReg &val) void IntRegFile::setCWP(int cwp) { int index = ((NWindows - cwp) % NWindows) * 2; + if (index < 0) + panic("Index less than 0. cwp=%d nwin=%d\n", cwp, NWindows); offset[Outputs] = FrameOffset + (index * RegsPerFrame); offset[Locals] = FrameOffset + ((index+1) * RegsPerFrame); offset[Inputs] = FrameOffset + @@ -137,6 +139,11 @@ void IntRegFile::setGlobals(int gl) regView[Globals] = regGlobals[gl]; offset[Globals] = RegGlobalOffset + gl * RegsPerFrame; + + if (regView[Globals] == regView[Inputs] || + regView[Globals] == regView[Locals] || + regView[Globals] == regView[Outputs] ) + panic("Two register arrays set to the same thing!\n"); } void IntRegFile::serialize(std::ostream &os) |