Address.hh (8608:02d7ac5fb855) Address.hh (8946:fb6c89334b86)
1/*
2 * Copyright (c) 1999 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;

--- 17 unchanged lines hidden (view full) ---

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __MEM_RUBY_COMMON_ADDRESS_HH__
30#define __MEM_RUBY_COMMON_ADDRESS_HH__
31
32#include <cassert>
33#include <iomanip>
1/*
2 * Copyright (c) 1999 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;

--- 17 unchanged lines hidden (view full) ---

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __MEM_RUBY_COMMON_ADDRESS_HH__
30#define __MEM_RUBY_COMMON_ADDRESS_HH__
31
32#include <cassert>
33#include <iomanip>
34#include <iostream>
34
35#include "base/hashmap.hh"
36#include "mem/ruby/common/TypeDefines.hh"
37
38const int ADDRESS_WIDTH = 64; // address width in bytes
39
40class Address;
41typedef Address PhysAddress;

--- 154 unchanged lines hidden (view full) ---

196}
197
198inline physical_address_t
199Address::shiftLowOrderBits(int number) const
200{
201 return (m_address >> number);
202}
203
35
36#include "base/hashmap.hh"
37#include "mem/ruby/common/TypeDefines.hh"
38
39const int ADDRESS_WIDTH = 64; // address width in bytes
40
41class Address;
42typedef Address PhysAddress;

--- 154 unchanged lines hidden (view full) ---

197}
198
199inline physical_address_t
200Address::shiftLowOrderBits(int number) const
201{
202 return (m_address >> number);
203}
204
204class Address;
205namespace __hash_namespace {
205__hash_namespace_begin
206template <> struct hash<Address>
207{
208 size_t
209 operator()(const Address &s) const
210 {
211 return (size_t)s.getAddress();
212 }
213};
206template <> struct hash<Address>
207{
208 size_t
209 operator()(const Address &s) const
210 {
211 return (size_t)s.getAddress();
212 }
213};
214} // namespace __hash_namespace
214__hash_namespace_end
215
216namespace std {
217template <> struct equal_to<Address>
218{
219 bool
220 operator()(const Address& s1, const Address& s2) const
221 {
222 return s1 == s2;
223 }
224};
225} // namespace std
226
227#endif // __MEM_RUBY_COMMON_ADDRESS_HH__
215
216namespace std {
217template <> struct equal_to<Address>
218{
219 bool
220 operator()(const Address& s1, const Address& s2) const
221 {
222 return s1 == s2;
223 }
224};
225} // namespace std
226
227#endif // __MEM_RUBY_COMMON_ADDRESS_HH__