diff options
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/ruby/common/Address.cc | 25 | ||||
-rw-r--r-- | src/mem/ruby/common/Address.hh | 1 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc index f0aa71ac6..edb417738 100644 --- a/src/mem/ruby/common/Address.cc +++ b/src/mem/ruby/common/Address.cc @@ -46,31 +46,6 @@ bitSelect(Addr addr, unsigned int small, unsigned int big) } Addr -bitRemove(Addr addr, unsigned int small, unsigned int big) -{ - assert(big >= small); - - if (small >= ADDRESS_WIDTH - 1) { - return addr; - } else if (big >= ADDRESS_WIDTH - 1) { - Addr mask = (Addr)~0 >> small; - return (addr & mask); - } else if (small == 0) { - Addr mask = (Addr)~0 << big; - return (addr & mask); - } else { - Addr mask = ~((Addr)~0 << small); - Addr lower_bits = addr & mask; - mask = (Addr)~0 << (big + 1); - Addr higher_bits = addr & mask; - - // Shift the valid high bits over the removed section - higher_bits = higher_bits >> (big - small + 1); - return (higher_bits | lower_bits); - } -} - -Addr maskLowOrderBits(Addr addr, unsigned int number) { Addr mask; diff --git a/src/mem/ruby/common/Address.hh b/src/mem/ruby/common/Address.hh index ded6f6f12..17490c448 100644 --- a/src/mem/ruby/common/Address.hh +++ b/src/mem/ruby/common/Address.hh @@ -39,7 +39,6 @@ const uint32_t ADDRESS_WIDTH = 64; // address width in bytes // selects bits inclusive Addr bitSelect(Addr addr, unsigned int small, unsigned int big); -Addr bitRemove(Addr addr, unsigned int small, unsigned int big); Addr maskLowOrderBits(Addr addr, unsigned int number); Addr maskHighOrderBits(Addr addr, unsigned int number); Addr shiftLowOrderBits(Addr addr, unsigned int number); |