Address.hh (6712:b95abe00dd9d) | Address.hh (7002:48a19d52d939) |
---|---|
1 2/* 3 * Copyright (c) 1999 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30/* 31 * $Id$ 32 */ 33 34#ifndef ADDRESS_H 35#define ADDRESS_H 36 37#include <iomanip> | 1 2/* 3 * Copyright (c) 1999 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30/* 31 * $Id$ 32 */ 33 34#ifndef ADDRESS_H 35#define ADDRESS_H 36 37#include <iomanip> |
38 39#include "base/hashmap.hh" |
|
38#include "mem/ruby/common/Global.hh" 39#include "mem/ruby/system/System.hh" 40#include "mem/ruby/system/NodeID.hh" 41#include "mem/ruby/system/MachineID.hh" 42 43const int ADDRESS_WIDTH = 64; // address width in bytes 44 45class Address; --- 172 unchanged lines hidden (view full) --- 218 <-------> 219 NUMBER_OF_MEMORY_MODULE_BITS 220 */ 221} 222 223inline 224void Address::print(ostream& out) const 225{ | 40#include "mem/ruby/common/Global.hh" 41#include "mem/ruby/system/System.hh" 42#include "mem/ruby/system/NodeID.hh" 43#include "mem/ruby/system/MachineID.hh" 44 45const int ADDRESS_WIDTH = 64; // address width in bytes 46 47class Address; --- 172 unchanged lines hidden (view full) --- 220 <-------> 221 NUMBER_OF_MEMORY_MODULE_BITS 222 */ 223} 224 225inline 226void Address::print(ostream& out) const 227{ |
226 out << "[" << hex << "0x" << m_address << "," << " line 0x" << maskLowOrderBits(RubySystem::getBlockSizeBits()) << dec << "]" << flush; | 228 using namespace std; 229 out << "[" << hex << "0x" << m_address << "," << " line 0x" << maskLowOrderBits(RubySystem::getBlockSizeBits()) << dec << "]" << flush; |
227} 228 229class Address; | 230} 231 232class Address; |
230namespace __gnu_cxx { | 233namespace __hash_namespace { |
231 template <> struct hash<Address> 232 { 233 size_t operator()(const Address &s) const { return (size_t) s.getAddress(); } 234 }; 235} 236namespace std { 237 template <> struct equal_to<Address> 238 { 239 bool operator()(const Address& s1, const Address& s2) const { return s1 == s2; } 240 }; 241} 242 243#endif //ADDRESS_H 244 | 234 template <> struct hash<Address> 235 { 236 size_t operator()(const Address &s) const { return (size_t) s.getAddress(); } 237 }; 238} 239namespace std { 240 template <> struct equal_to<Address> 241 { 242 bool operator()(const Address& s1, const Address& s2) const { return s1 == s2; } 243 }; 244} 245 246#endif //ADDRESS_H 247 |