Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/42385 )
Change subject: base: Remove "inline" from bitfield.hh.
......................................................................
base: Remove "inline" from bitfield.hh.
Those functions are all constexpr which implies inline, so the inline is
redundant.
Change-Id: I7ddf13ddc833365f60f644c40c9fcb16a3e6285e
---
M src/base/bitfield.hh
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh
index b6e4edd..48f571e 100644
--- a/src/base/bitfield.hh
+++ b/src/base/bitfield.hh
@@ -56,7 +56,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
mask(unsigned nbits)
{
return (nbits >= 64) ? (uint64_t)-1LL : (1ULL << nbits) - 1;
@@ -69,7 +69,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
bits(T val, unsigned first, unsigned last)
{
assert(first >= last);
@@ -83,7 +83,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
bits(T val, unsigned bit)
{
return bits(val, bit, bit);
@@ -96,7 +96,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
mbits(T val, unsigned first, unsigned last)
{
return val & (mask(first + 1) & ~mask(last));
@@ -105,7 +105,7 @@
/**
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
mask(unsigned first, unsigned last)
{
return mbits((uint64_t)-1LL, first, last);
@@ -118,7 +118,7 @@
* @ingroup api_bitfield
*/
template <int N>
-constexpr inline uint64_t
+constexpr uint64_t
sext(uint64_t val)
{
bool sign_bit = bits(val, N - 1);
@@ -134,7 +134,7 @@
* @ingroup api_bitfield
*/
template <int N>
-constexpr inline uint64_t
+constexpr uint64_t
szext(uint64_t val)
{
bool sign_bit = bits(val, N - 1);
@@ -158,7 +158,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline T
+constexpr T
insertBits(T val, unsigned first, unsigned last, B bit_val)
{
assert(first >= last);
@@ -174,7 +174,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline T
+constexpr T
insertBits(T val, unsigned bit, B bit_val)
{
return insertBits(val, bit, bit, bit_val);
@@ -189,7 +189,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline void
+constexpr void
replaceBits(T& val, unsigned first, unsigned last, B bit_val)
{
val = insertBits(val, first, last, bit_val);
@@ -201,7 +201,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline void
+constexpr void
replaceBits(T& val, unsigned bit, B bit_val)
{
val = insertBits(val, bit, bit, bit_val);
@@ -255,7 +255,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
findMsbSet(uint64_t val)
{
int msb = 0;
@@ -291,7 +291,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
findLsbSet(uint64_t val)
{
int lsb = 0;
@@ -329,7 +329,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
popCount(uint64_t val)
{
#ifndef __has_builtin
@@ -364,7 +364,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
alignToPowerOfTwo(uint64_t val)
{
val--;
@@ -387,7 +387,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
ctz32(uint32_t value)
{
return value ? __builtin_ctzl(value) : 32;
@@ -401,7 +401,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
ctz64(uint64_t value)
{
return value ? __builtin_ctzll(value) : 64;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/42385
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I7ddf13ddc833365f60f644c40c9fcb16a3e6285e
Gerrit-Change-Number: 42385
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s