Deleted Added
sdiff udiff text old ( 6712:b95abe00dd9d ) new ( 7002:48a19d52d939 )
full compact
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"
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{
228 using namespace std;
229 out << "[" << hex << "0x" << m_address << "," << " line 0x" << maskLowOrderBits(RubySystem::getBlockSizeBits()) << dec << "]" << flush;
230}
231
232class Address;
233namespace __hash_namespace {
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