Address.hh (11118:75c1e564a725) Address.hh (11168:f98eb2da15a4)
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;

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

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>
35
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;

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

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>
35
36#include "base/hashmap.hh"
37#include "base/types.hh"
38
39const uint32_t ADDRESS_WIDTH = 64; // address width in bytes
40
41// selects bits inclusive
42Addr bitSelect(Addr addr, unsigned int small, unsigned int big);
43Addr bitRemove(Addr addr, unsigned int small, unsigned int big);
44Addr maskLowOrderBits(Addr addr, unsigned int number);
45Addr maskHighOrderBits(Addr addr, unsigned int number);
46Addr shiftLowOrderBits(Addr addr, unsigned int number);
47Addr getOffset(Addr addr);
48Addr makeLineAddress(Addr addr);
49Addr makeNextStrideAddress(Addr addr, int stride);
50std::string printAddress(Addr addr);
51
52#endif // __MEM_RUBY_COMMON_ADDRESS_HH__
36#include "base/types.hh"
37
38const uint32_t ADDRESS_WIDTH = 64; // address width in bytes
39
40// selects bits inclusive
41Addr bitSelect(Addr addr, unsigned int small, unsigned int big);
42Addr bitRemove(Addr addr, unsigned int small, unsigned int big);
43Addr maskLowOrderBits(Addr addr, unsigned int number);
44Addr maskHighOrderBits(Addr addr, unsigned int number);
45Addr shiftLowOrderBits(Addr addr, unsigned int number);
46Addr getOffset(Addr addr);
47Addr makeLineAddress(Addr addr);
48Addr makeNextStrideAddress(Addr addr, int stride);
49std::string printAddress(Addr addr);
50
51#endif // __MEM_RUBY_COMMON_ADDRESS_HH__