Module: Mesa
Branch: main
Commit: a129e136deae765efb511c8807a3fa2757cdf92a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a129e136deae765efb511c8807a3fa2757cdf92a

Author: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com>
Date:   Wed Oct 11 04:09:59 2023 +0300

intel/disasm: Print half-float values instead of placeholder

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.gh...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25657>

---

 src/intel/compiler/brw_disasm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c
index 49258f881a9..02a43817aa9 100644
--- a/src/intel/compiler/brw_disasm.c
+++ b/src/intel/compiler/brw_disasm.c
@@ -1672,7 +1672,11 @@ imm(FILE *file, const struct brw_isa_info *isa, enum 
brw_reg_type type,
       format(file, "/* %-gDF */", brw_inst_imm_df(devinfo, inst));
       break;
    case BRW_REGISTER_TYPE_HF:
-      string(file, "Half Float IMM");
+      format(file, "0x%04xHF",
+             (uint16_t) brw_inst_imm_ud(devinfo, inst));
+      pad(file, 48);
+      format(file, "/* %-gHF */",
+             _mesa_half_to_float((uint16_t) brw_inst_imm_ud(devinfo, inst)));
       break;
    case BRW_REGISTER_TYPE_NF:
    case BRW_REGISTER_TYPE_UB:

Reply via email to