Module: Mesa Branch: main Commit: 1d6f6f9102211931cdce50820e85b03f533f6515 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d6f6f9102211931cdce50820e85b03f533f6515
Author: Vinson Lee <[email protected]> Date: Sun Dec 19 15:41:51 2021 -0800 ir3: Make shift operand 64-bit. Fix defect reported by Coverity Scan. Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) overflow_before_widen: Potentially overflowing expression 2 << W with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type uint64_t (64 bits, unsigned). Signed-off-by: Vinson Lee <[email protected]> Acked-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14258> --- src/freedreno/isa/ir3-cat0.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/isa/ir3-cat0.xml b/src/freedreno/isa/ir3-cat0.xml index 5c0c0caa205..6c5609b64d8 100644 --- a/src/freedreno/isa/ir3-cat0.xml +++ b/src/freedreno/isa/ir3-cat0.xml @@ -187,7 +187,7 @@ SOFTWARE. </display> <derived name="CLUSTER_SIZE" type="uint"> <expr> - 2 << {W} + 2ULL << {W} </expr> </derived> <pattern low="32" high="36">xxxxx</pattern> <!-- INDEX -->
