Module: Mesa
Branch: main
Commit: 5cb00f7e77de97f7695791444f5dcf73e55f5b76
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cb00f7e77de97f7695791444f5dcf73e55f5b76

Author: Alejandro PiƱeiro <apinhe...@igalia.com>
Date:   Wed Oct 18 10:12:23 2023 +0200

broadcom/qpu: use back BITFIELD64_RANGE for ANYOPMASK

This is the original definition for ANYOPMASK, until we found that
clang raised a warning using the option shift-count-overflow, so we
used an alternative.

That warning was fixed with commit 6e2bb716b0c7, so let's restore
previous version.

Note that other good thing of that warning being fixed is that now we
can use without warning OP_RANGE with bit 63 (in the case that any
broadcom opcode used that bit)

Reviewed-by: Eric Engestrom <e...@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25776>

---

 src/broadcom/qpu/qpu_pack.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c
index 08fce4af168..a08e0f40421 100644
--- a/src/broadcom/qpu/qpu_pack.c
+++ b/src/broadcom/qpu/qpu_pack.c
@@ -496,10 +496,7 @@ v3d_qpu_flags_pack(const struct v3d_device_info *devinfo,
 #define OP_MASK(val) BITFIELD64_BIT(val)
 #define OP_RANGE(bot, top) BITFIELD64_RANGE(bot, top - bot + 1)
 #define ANYMUX OP_RANGE(0, 7)
-/* FIXME: right now ussing BITFIELD64_RANGE to set the last bit raises a
- * warning when building with clang using the shift-count-overflow option
- */
-#define ANYOPMASK ~0ull
+#define ANYOPMASK OP_RANGE(0, 63)
 
 struct opcode_desc {
         uint8_t opcode_first;

Reply via email to