diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-22 18:43:53 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-22 18:43:53 -0700 |
commit | 5ab13e2deb8f904ef2a233749193fa09ea7013c4 (patch) | |
tree | 07f5f02902f9e719fe58d1a9419b5a1d51f7a2ce /src/mem/ruby/common/SubBlock.cc | |
parent | 2620e08722b38660658d46cdb76c337db18e877c (diff) | |
download | gem5-5ab13e2deb8f904ef2a233749193fa09ea7013c4.tar.xz |
ruby: style pass
Diffstat (limited to 'src/mem/ruby/common/SubBlock.cc')
-rw-r--r-- | src/mem/ruby/common/SubBlock.cc | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/mem/ruby/common/SubBlock.cc b/src/mem/ruby/common/SubBlock.cc index de40e3f7d..533aefbe7 100644 --- a/src/mem/ruby/common/SubBlock.cc +++ b/src/mem/ruby/common/SubBlock.cc @@ -1,4 +1,3 @@ - /* * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood * All rights reserved. @@ -27,44 +26,44 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * $Id$ - */ - #include "mem/ruby/common/SubBlock.hh" SubBlock::SubBlock(const Address& addr, int size) { - m_address = addr; - setSize(size); - for(int i=0; i<size; i++) { - setByte(i, 0); - } + m_address = addr; + setSize(size); + for (int i = 0; i < size; i++) { + setByte(i, 0); + } } -void SubBlock::internalMergeFrom(const DataBlock& data) +void +SubBlock::internalMergeFrom(const DataBlock& data) { - int size = getSize(); - assert(size > 0); - int offset = m_address.getOffset(); - for(int i=0; i<size; i++) { - this->setByte(i, data.getByte(offset+i)); - } + int size = getSize(); + assert(size > 0); + int offset = m_address.getOffset(); + for (int i = 0; i < size; i++) { + this->setByte(i, data.getByte(offset + i)); + } } -void SubBlock::internalMergeTo(DataBlock& data) const +void +SubBlock::internalMergeTo(DataBlock& data) const { - int size = getSize(); - assert(size > 0); - int offset = m_address.getOffset(); - for(int i=0; i<size; i++) { - data.setByte(offset+i, this->getByte(i)); // This will detect crossing a cache line boundary - } + int size = getSize(); + assert(size > 0); + int offset = m_address.getOffset(); + for (int i = 0; i < size; i++) { + // This will detect crossing a cache line boundary + data.setByte(offset + i, this->getByte(i)); + } } -void SubBlock::print(ostream& out) const +void +SubBlock::print(ostream& out) const { - out << "[" << m_address << ", " << getSize() << ", " << m_data << "]"; + out << "[" << m_address << ", " << getSize() << ", " << m_data << "]"; } |