agx: special case mov_imm

so we can rm a worse special case

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
This commit is contained in:
Alyssa Rosenzweig
2024-10-13 22:31:01 -04:00
parent 11f797d93a
commit ce02690902
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -247,7 +247,6 @@ op("hmul",
op("mov_imm",
encoding_32 = (0x62, 0xFF, 6, 8),
encoding_16 = (0x62, 0xFF, 4, 6),
imms = [IMM])
op("iadd",
+3
View File
@@ -513,6 +513,9 @@ agx_pack_alu(struct util_dynarray *emission, agx_instr *I)
/* Determine length bit */
unsigned length = encoding.length_short;
if (I->op == AGX_OPCODE_MOV_IMM && I->dest[0].size == AGX_SIZE_16)
length -= 2;
uint64_t short_mask = BITFIELD64_MASK(8 * length);
bool length_bit = (extend || (raw & ~short_mask));