diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2007-01-11 09:48:15 -0500 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2007-01-11 09:48:15 -0500 |
commit | 5c9cbdbb4597a3ba6908a41c1dc459c25626e514 (patch) | |
tree | 1bc33a9661ecc1dd4538ee10183ef809488830f2 /src/arch/sparc/intregfile.cc | |
parent | 9f75c1c58f8352a8625f035c151ebcf6ce95b908 (diff) | |
parent | 42535f5f53ad2515cd4b8e617e4a2322aecac547 (diff) | |
download | gem5-5c9cbdbb4597a3ba6908a41c1dc459c25626e514.tar.xz |
Merge zed.eecs.umich.edu:/z/hsul/work/sparc/ali.m5
into zed.eecs.umich.edu:/z/hsul/work/sparc/m5
src/arch/sparc/ua2005.cc:
hand merge between ali and me.
--HG--
extra : convert_revision : 810d63fb484ab26fc30f8130ef32390ba149b267
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 0a8ac055f..60856d3fa 100644 --- a/src/arch/sparc/intregfile.cc +++ b/src/arch/sparc/intregfile.cc @@ -111,6 +111,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 + @@ -128,6 +130,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) |