Fix signed-unsigned comparison.

Hex literals are interpreted as unsigned, leading to a comparison between
signed max supported function `abcd[0]`  (which was negative) to the unsigned
literal `0x80000006`.  Should not change result since signed is
implicitly converted to unsigned for the comparison, but eliminates the
warning.
This commit is contained in:
Antonio Sanchez 2021-01-20 08:34:00 -08:00
parent e409795d6b
commit d5b7981119

View File

@ -1061,7 +1061,7 @@ inline void queryCacheSizes_amd(int& l1, int& l2, int& l3)
// First query the max supported function.
EIGEN_CPUID(abcd,0x80000000,0);
if(abcd[0] >= 0x80000006)
if(static_cast<numext::uint32_t>(abcd[0]) >= static_cast<numext::uint32_t>(0x80000006))
{
EIGEN_CPUID(abcd,0x80000005,0);
l1 = (abcd[2] >> 24) * 1024; // C[31:24] = L1 size in KB