tests, base: Removed ambiguity from base/intmath.hh
authorMahyar Samani <msamani@ucdavis.edu>
Tue, 5 Nov 2019 19:54:35 +0000 (11:54 -0800)
committerMahyar Samani <msamani@ucdavis.edu>
Thu, 14 Nov 2019 08:31:52 +0000 (08:31 +0000)
commit732c47ffd328feb71d14aaf6ae823f80167c47ff
tree56291105aa8c62b18561b0060b0d07101c72858e
parent7f25332af078d0843b8f9e343def59c22d12c6a0
tests, base: Removed ambiguity from base/intmath.hh

The function intmath.leastSigBit is ambiguous given
its name. It does not return the value of the least
significant bit, or the position of the least significant
set bit, but instead 2 to the power of the position of
the least significant set bit. It has thereby been removed
and the function intmath.isPowerOf2 has been refactored to
not require intmath.leastSigBit.

Change-Id: I22479c666cdd059865b8c73b70b5388f98a4584d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22583
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/intmath.hh