From a8691f916be67a5fc4fd731ac032921ce9ebc3dd Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 27 Feb 2023 12:18:14 -0800 Subject: [PATCH] intel/mi: use 64bit constant for bitshift MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Part-of: --- src/intel/common/mi_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/common/mi_builder.h b/src/intel/common/mi_builder.h index 43b54e8..51ec3cb 100644 --- a/src/intel/common/mi_builder.h +++ b/src/intel/common/mi_builder.h @@ -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; -- 2.7.4