diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2019-09-07 11:45:25 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2019-09-30 20:58:46 +0000 |
commit | 4a701c11e4c071ba0f196b376a73123a1ab952e7 (patch) | |
tree | ee162ac8a02082bee9ada7f1827ba3252326a6b1 /src/mem/ruby/structures/Prefetcher.cc | |
parent | a5408244d1fb6dcad6234b601b5aa8d439fd49cd (diff) | |
download | gem5-4a701c11e4c071ba0f196b376a73123a1ab952e7.tar.xz |
mem-ruby: Fix maskLowOrderBits
The function was wrong when number = 63. Also, use the more reliable
src/base/bitfield.hh's mbits when posible.
maskLowOrderBits has only been kept because SLICC does not accept
a templated function.
Change-Id: I8dd680da02ceb9e614e2f9cbf8f1ac52cead8d45
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21084
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>
Diffstat (limited to 'src/mem/ruby/structures/Prefetcher.cc')
-rw-r--r-- | src/mem/ruby/structures/Prefetcher.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/ruby/structures/Prefetcher.cc b/src/mem/ruby/structures/Prefetcher.cc index df8fdfcba..70b30352e 100644 --- a/src/mem/ruby/structures/Prefetcher.cc +++ b/src/mem/ruby/structures/Prefetcher.cc @@ -28,6 +28,7 @@ #include "mem/ruby/structures/Prefetcher.hh" +#include "base/bitfield.hh" #include "debug/RubyPrefetcher.hh" #include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh" #include "mem/ruby/system/RubySystem.hh" @@ -475,5 +476,5 @@ Prefetcher::print(std::ostream& out) const Addr Prefetcher::pageAddress(Addr addr) const { - return maskLowOrderBits(addr, m_page_shift); + return mbits<Addr>(addr, 63, m_page_shift); } |