From f80f29dc4bd6477cd62a6d5153708b2334c06fd6 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 4 Jan 2023 12:52:45 -0800 Subject: [PATCH] intel/disasm/gfx12+: Fix print out of non-existing condmod field with 64-bit immediate. The conditional mode field doesn't exist for instructions with a 64-bit immediate, so this would currently print garbage. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_disasm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c index 4408a6b9ba5..1603919ece9 100644 --- a/src/intel/compiler/brw_disasm.c +++ b/src/intel/compiler/brw_disasm.c @@ -1964,7 +1964,10 @@ brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa, err |= control(file, "function", sync_function, brw_inst_cond_modifier(devinfo, inst), NULL); - } else if (!is_send(opcode)) { + } else if (!is_send(opcode) && + (devinfo->ver < 12 || + brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE || + type_sz(brw_inst_src0_type(devinfo, inst)) < 8)) { err |= control(file, "conditional modifier", conditional_modifier, brw_inst_cond_modifier(devinfo, inst), NULL);