pan/bi: Fix M1/M2 decoding in disassembler
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 9 Jan 2021 02:38:09 +0000 (21:38 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 Jan 2021 16:55:43 +0000 (16:55 +0000)
commita69c73988b26aaaa6bffde1b3fef5fdc4a7a90a7
tree72a4f958121e024764a44dd687202b61267ab26d
parent6f28a4449a82da7717b9c25d8e7ed74762e97f99
pan/bi: Fix M1/M2 decoding in disassembler

C's definition of the % operator has a footgun around sign conversion.
Avoid it and just use bitwise arithemtic instead like the hardware
would, fixing the disassembly and making buggy assembly more obvious.

Fixes: 08a9e5e3e89 ("pan/bi: Decode M values in disasm")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
src/panfrost/bifrost/disassemble.c