From 173a991405bd1cf258a0f569c56b6c3070d033db Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Wed, 11 Oct 2023 11:32:28 +0300 Subject: [PATCH] intel/disasm: Print src1_len correctly depending on ExDesc type There are two "Src1.Length" with different formats in "send" description in the PRMs. One is part of ExMsgDesc, is relevant for LSC SFIDs, and exists if [ExDesc.IsReg]==false. The other is just a 5-bit immediate, is relevant for other SFIDs too, and exists if ([ExDesc.IsReg]==true) AND ([ExBSO]==true). Signed-off-by: Sviatoslav Peleshko Reviewed-by: Sagar Ghuge Part-of: --- src/intel/compiler/brw_disasm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c index 02a43817aa9..d8c0e97c967 100644 --- a/src/intel/compiler/brw_disasm.c +++ b/src/intel/compiler/brw_disasm.c @@ -2537,7 +2537,11 @@ brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa, } format(file, " dst_len = %u,", lsc_msg_desc_dest_len(devinfo, imm_desc)); format(file, " src0_len = %u,", lsc_msg_desc_src0_len(devinfo, imm_desc)); - format(file, " src1_len = %d", brw_message_ex_desc_ex_mlen(devinfo, imm_ex_desc)); + + if (!brw_inst_send_sel_reg32_ex_desc(devinfo, inst)) + format(file, " src1_len = %d", + brw_message_ex_desc_ex_mlen(devinfo, imm_ex_desc)); + err |= control(file, "address_type", lsc_addr_surface_type, lsc_msg_desc_addr_type(devinfo, imm_desc), &space); format(file, " )"); @@ -2672,8 +2676,14 @@ brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa, if (space) string(file, " "); } - if (devinfo->verx10 >= 125 && brw_inst_send_ex_bso(devinfo, inst)) + if (devinfo->verx10 >= 125 && + brw_inst_send_sel_reg32_ex_desc(devinfo, inst) && + brw_inst_send_ex_bso(devinfo, inst)) { + format(file, " src1_len = %u", + (unsigned) brw_inst_send_src1_len(devinfo, inst)); + format(file, " ex_bso"); + } if (brw_sfid_is_lsc(sfid)) { lsc_disassemble_ex_desc(devinfo, imm_desc, imm_ex_desc, file); } else {