From 66f806d01d1efbc8133c0d970800d7a23b8ba0f3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 3 Mar 2023 16:18:52 -0500 Subject: [PATCH] agx: Assert that memory index is 32-bit reg Semantics will be wrong otherwise (reading garbage). Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/asahi/compiler/agx_pack.c b/src/asahi/compiler/agx_pack.c index 8a29e241e3d..6c7558a7e44 100644 --- a/src/asahi/compiler/agx_pack.c +++ b/src/asahi/compiler/agx_pack.c @@ -158,6 +158,7 @@ agx_pack_memory_index(agx_index index, bool *flag) return index.value; } else { assert(index.type == AGX_INDEX_REGISTER); + assert(index.size == AGX_SIZE_32); assert((index.value & 1) == 0); assert(index.value < 0x100);