mem-ruby: Remove maskHighOrderBits
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Sat, 7 Sep 2019 08:55:45 +0000 (10:55 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 30 Sep 2019 20:58:46 +0000 (20:58 +0000)
Function was not being used. If needed, src/base/bitfield.hh's
mbits can be used instead:

maskHighOrderBits(addr, pos) == mbits<Addr>(addr, 64-pos, 0)

Change-Id: I3abd041f8d256ec157ba7502182d8588721c2a05
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21082
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/common/Address.cc
src/mem/ruby/common/Address.hh

index edb41773870343566c4b4b8f93e3d1ce080437d8..af8ddb437253a780e41679f5a64af5ec0bc5bb1c 100644 (file)
@@ -58,19 +58,6 @@ maskLowOrderBits(Addr addr, unsigned int number)
   return (addr & mask);
 }
 
-Addr
-maskHighOrderBits(Addr addr, unsigned int number)
-{
-    Addr mask;
-
-    if (number >= ADDRESS_WIDTH - 1) {
-        mask = ~0;
-    } else {
-        mask = (Addr)~0 >> number;
-    }
-    return (addr & mask);
-}
-
 Addr
 shiftLowOrderBits(Addr addr, unsigned int number)
 {
index 17490c4489a160ace88d55fa18133a09752212ad..6aed96a1bb9089fed4f6c9a1757c3de75aed4319 100644 (file)
@@ -40,7 +40,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 maskLowOrderBits(Addr addr, unsigned int number);
-Addr maskHighOrderBits(Addr addr, unsigned int number);
 Addr shiftLowOrderBits(Addr addr, unsigned int number);
 Addr getOffset(Addr addr);
 Addr makeLineAddress(Addr addr);