diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-10 22:19:13 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-10 22:19:13 -0500 |
commit | 9d04510869fe66d59a168660925a8387c0fba1b8 (patch) | |
tree | 62625bd13f32c4107ed3f24df65421e5fe086232 /src/arch/sparc/intregfile.cc | |
parent | 28a83c6d1c2673448aaedfb0eb131d6c6604badf (diff) | |
download | gem5-9d04510869fe66d59a168660925a8387c0fba1b8.tar.xz |
bug fixes to get us to 145m instructions
src/arch/sparc/intregfile.cc:
some checks to make sure that the cwp and global register flattening stuff is working. These things have caught a couple of bugs so I think it would be good to keep them around at least for now
src/arch/sparc/isa/decoder.isa:
fix smul instruction to write Y correctly
src/arch/sparc/miscregfile.cc:
legion always returns du and dl set, so we need to emulate that for now at least
--HG--
extra : convert_revision : 82f9276340888f1e43071c69504486efdcfdb3a8
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) |