From 7ccf70a12196d7df31668166b0a3aa67a1106f61 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Sat, 7 Sep 2019 10:55:45 +0200 Subject: [PATCH] mem-ruby: Remove maskHighOrderBits Function was not being used. If needed, src/base/bitfield.hh's mbits can be used instead: maskHighOrderBits(addr, pos) == mbits(addr, 64-pos, 0) Change-Id: I3abd041f8d256ec157ba7502182d8588721c2a05 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21082 Reviewed-by: Nikos Nikoleris Reviewed-by: Jason Lowe-Power Reviewed-by: Anthony Gutierrez Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/ruby/common/Address.cc | 13 ------------- src/mem/ruby/common/Address.hh | 1 - 2 files changed, 14 deletions(-) diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc index edb417738..af8ddb437 100644 --- a/src/mem/ruby/common/Address.cc +++ b/src/mem/ruby/common/Address.cc @@ -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) { diff --git a/src/mem/ruby/common/Address.hh b/src/mem/ruby/common/Address.hh index 17490c448..6aed96a1b 100644 --- a/src/mem/ruby/common/Address.hh +++ b/src/mem/ruby/common/Address.hh @@ -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); -- 2.30.2