intel/mi: use 64bit constant for bitshift

Coverity complains that we could end up rolling over on a 32bit
platform, which isn't really true because of the assertion, but there's
also no harm in ensuring that we have exactly the same behavior for both
32 bit and 64 bit platforms.

CID: 1515989
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21572>
This commit is contained in:
Dylan Baker
2023-02-27 12:18:14 -08:00
committed by Marge Bot
parent 054a83492d
commit a8691f916b
+1 -1
View File
@@ -980,7 +980,7 @@ mi_ushr_imm(struct mi_builder *b, struct mi_value src, uint32_t shift)
while (shift) {
int bit = u_bit_scan(&shift);
assert(bit <= 5);
res = mi_ushr(b, res, mi_imm(1 << bit));
res = mi_ushr(b, res, mi_imm(1ULL << bit));
}
return res;