summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common/Address.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/common/Address.cc')
-rw-r--r--src/mem/ruby/common/Address.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc
index 5c89d31cc..40ce0feb0 100644
--- a/src/mem/ruby/common/Address.cc
+++ b/src/mem/ruby/common/Address.cc
@@ -35,15 +35,7 @@ Addr
bitSelect(Addr addr, unsigned int small, unsigned int big)
{
assert(big >= small);
-
- if (big >= ADDRESS_WIDTH - 1) {
- return (addr >> small);
- } else {
- Addr mask = ~((Addr)~0 << (big + 1));
- // FIXME - this is slow to manipulate a 64-bit number using 32-bits
- Addr partial = (addr & mask);
- return (partial >> small);
- }
+ return bits<Addr>(addr, big, small);
}
Addr