From efbdc31ce55ea01c1443a9c244c372a648787b12 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 30 Jul 2023 22:44:28 -0400 Subject: [PATCH] agx: Use compressed fadd/fmul encodings See applegpu commit b9b3582 ("FBinaryInstructions have compressed encodings") total bytes in shared programs: 11717310 -> 11716524 (<.01%) bytes in affected programs: 317504 -> 316718 (-0.25%) helped: 196 HURT: 0 Bytes are helped. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_opcodes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index ae2cd34ae32..b8bb24b7ecf 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -197,8 +197,8 @@ iunop("popcount", 0b10) iunop("ffs", 0b11) op("fadd", - encoding_16 = (0x26 | L, 0x3F | L, 6, _), - encoding_32 = (0x2A | L, 0x3F | L, 6, _), + encoding_16 = (0x26, 0x3F, 4, 6), + encoding_32 = (0x2A, 0x3F, 4, 6), srcs = 2, is_float = True) op("fma", @@ -207,8 +207,8 @@ op("fma", srcs = 3, is_float = True) op("fmul", - encoding_16 = ((0x16 | L), (0x3F | L), 6, _), - encoding_32 = ((0x1A | L), (0x3F | L), 6, _), + encoding_16 = (0x16, 0x3F, 4, 6), + encoding_32 = (0x1A, 0x3F, 4, 6), srcs = 2, is_float = True) op("mov_imm",