A << operation would be undefined for a bit-selecting
function because of a '1u' making it a 32-bit value when it really needed to be a 64-bit value. Trivial to fix once I figured out what was going on. clang static analzyer fixit. llvm-svn: 220022
This commit is contained in:
parent
b66130209b
commit
84843ed536
|
@ -20,7 +20,7 @@ static inline uint64_t
|
|||
Bits64 (const uint64_t bits, const uint32_t msbit, const uint32_t lsbit)
|
||||
{
|
||||
assert(msbit < 64 && lsbit <= msbit);
|
||||
return (bits >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1);
|
||||
return (bits >> lsbit) & ((1ull << (msbit - lsbit + 1)) - 1);
|
||||
}
|
||||
|
||||
// Return the bit field(s) from the most significant bit (msbit) to the
|
||||
|
|
Loading…
Reference in New Issue