Address.cc (11108:6342ddf6d733) | Address.cc (11118:75c1e564a725) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 107 unchanged lines hidden (view full) --- 116 117// returns the next stride address based on line address 118Addr 119makeNextStrideAddress(Addr addr, int stride) 120{ 121 return maskLowOrderBits(addr, RubySystem::getBlockSizeBits()) 122 + RubySystem::getBlockSizeBytes() * stride; 123} | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 107 unchanged lines hidden (view full) --- 116 117// returns the next stride address based on line address 118Addr 119makeNextStrideAddress(Addr addr, int stride) 120{ 121 return maskLowOrderBits(addr, RubySystem::getBlockSizeBits()) 122 + RubySystem::getBlockSizeBytes() * stride; 123} |
124 125std::string 126printAddress(Addr addr) 127{ 128 std::stringstream out; 129 out << "[" << std::hex << "0x" << addr << "," << " line 0x" 130 << maskLowOrderBits(addr, RubySystem::getBlockSizeBits()) 131 << std::dec << "]"; 132 return out.str(); 133} |
|