amd/common: Fix various non-critical integer overflows
authorTony Wasserka <tony.wasserka@gmx.de>
Wed, 2 Sep 2020 17:15:01 +0000 (19:15 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 20:20:24 +0000 (20:20 +0000)
commit93c8777ace8453f4cbc879d0829e582cf151066f
tree8bb42c2c926fc500a756b0fcc83deae1a4fc2068
parent2182bbf84f0f19846a47f0438ec702f4d862731e
amd/common: Fix various non-critical integer overflows

The result of 0xf << 28 is a signed integer and hence overflows into the sign
bit. In practice compilers did the right thing here, since the intent of the
code was unsigned arithmetic anyway.

Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6568>
src/amd/common/ac_shader_util.c