diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-08-21 15:09:18 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-08-21 15:09:18 -0400 |
commit | ad867018d0c2496003fef6a8f232241dd5bb0319 (patch) | |
tree | f5ad3bdff28ae1963e4e3df7854ead0ebc2fc066 /src/arch/sparc/intregfile.cc | |
parent | 4ea39733873272cf5336b275fddfc9d9c727c50e (diff) | |
parent | 0b0556a1da2aabe0868a768a3f3d1845331ee70b (diff) | |
download | gem5-ad867018d0c2496003fef6a8f232241dd5bb0319.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem
--HG--
extra : convert_revision : 15d8fd51f0c70da4d2e52c11864f3ab0f3f62811
Diffstat (limited to 'src/arch/sparc/intregfile.cc')
-rw-r--r-- | src/arch/sparc/intregfile.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/arch/sparc/intregfile.cc b/src/arch/sparc/intregfile.cc index 0cc0a886a..bef62f6ae 100644 --- a/src/arch/sparc/intregfile.cc +++ b/src/arch/sparc/intregfile.cc @@ -60,9 +60,9 @@ void IntRegFile::clear() { int x; for (x = 0; x < MaxGL; x++) - memset(regGlobals[x], 0, sizeof(regGlobals[x])); + memset(regGlobals[x], 0, sizeof(IntReg) * RegsPerFrame); for(int x = 0; x < 2 * NWindows; x++) - bzero(regSegments[x], sizeof(regSegments[x])); + bzero(regSegments[x], sizeof(IntReg) * RegsPerFrame); } IntRegFile::IntRegFile() @@ -84,8 +84,10 @@ IntReg IntRegFile::readReg(int intReg) Fault IntRegFile::setReg(int intReg, const IntReg &val) { if(intReg) + { DPRINTF(Sparc, "Wrote register %d = 0x%x\n", intReg, val); - regView[intReg >> FrameOffsetBits][intReg & FrameOffsetMask] = val; + regView[intReg >> FrameOffsetBits][intReg & FrameOffsetMask] = val; + } return NoFault; } |