From 40f3ce141a846d13e99574abb51f282c57741c3f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 15 Jan 2021 16:35:07 -0500 Subject: [PATCH] pan/bi: Fix FLOG_TABLE modifier handling These should not be in a union together. [Note: this does not need to be backported, since the affected instruction is not emitted under any circumstances in the stable branches] Fixes: dd11e5076e6 ("pan/bi: Add new bi_instr data structure") Signed-off-by: Alyssa Rosenzweig Acked-by: Boris Brezillon Part-of: (cherry picked from commit 94fed29680c74f8857036ec97c3f762abfd6c014) --- .pick_status.json | 2 +- src/panfrost/bifrost/compiler.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3b30ea91f91..19a724aeae9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1687,7 +1687,7 @@ "description": "pan/bi: Fix FLOG_TABLE modifier handling", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "dd11e5076e6dda833b3e62551761aff9d2b01600" }, diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index d9853773801..4de64bd73de 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -294,14 +294,11 @@ typedef struct { enum bi_atom_opc atom_opc; /* atomics */ enum bi_func func; /* FPOW_SC_DET */ enum bi_function function; /* LD_VAR_FLAT */ - enum bi_mode mode; /* FLOG_TABLE */ enum bi_mux mux; /* MUX */ - enum bi_precision precision; /* FLOG_TABLE */ enum bi_sem sem; /* FMAX, FMIN */ enum bi_source source; /* LD_GCLK */ bool scale; /* VN_ASST2, FSINCOS_OFFSET */ bool offset; /* FSIN_TABLE, FOCS_TABLE */ - bool divzero; /* FRSQ_APPROX, FRSQ */ bool mask; /* CLZ */ bool threads; /* IMULD, IMOV_FMA */ bool combine; /* BRANCHC */ @@ -364,6 +361,12 @@ typedef struct { bool sqrt; /* FREXPM */ bool log; /* FREXPM */ }; + + struct { + enum bi_mode mode; /* FLOG_TABLE */ + enum bi_precision precision; /* FLOG_TABLE */ + bool divzero; /* FRSQ_APPROX, FRSQ */ + }; }; } bi_instr;