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/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__ |