Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/21081 )

Change subject: mem-ruby: Remove bitRemove
......................................................................

mem-ruby: Remove bitRemove

bitRemove is not being used anywhere. If needed, can be used
as src/base/bitfield.hh's bits:

bitRemove(addr, small, big) ==
    ((bits<Addr>(addr, 63, big + 1) << small) |
    bits<Addr>(addr, small, 0))

Change-Id: I45fd3bc0271ccb659d6a94e3dd00ca095dfd6aa7
Signed-off-by: Daniel R. Carvalho <oda...@yahoo.com.br>
---
M src/mem/ruby/common/Address.cc
M src/mem/ruby/common/Address.hh
2 files changed, 0 insertions(+), 26 deletions(-)



diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc
index f0aa71a..edb4177 100644
--- a/src/mem/ruby/common/Address.cc
+++ b/src/mem/ruby/common/Address.cc
@@ -46,31 +46,6 @@
 }

 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 ded6f6f..17490c4 100644
--- a/src/mem/ruby/common/Address.hh
+++ b/src/mem/ruby/common/Address.hh
@@ -39,7 +39,6 @@

 // 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);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/21081
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I45fd3bc0271ccb659d6a94e3dd00ca095dfd6aa7
Gerrit-Change-Number: 21081
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to