Deleted Added
sdiff udiff text old ( 11118:75c1e564a725 ) new ( 11168:f98eb2da15a4 )
full compact
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__