i965: Add support for disassembling 64-bit integer immediates
authorMatt Turner <mattst88@gmail.com>
Tue, 25 Jul 2017 21:25:27 +0000 (14:25 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 21 Aug 2017 21:05:23 +0000 (14:05 -0700)
After the last patch converted things into enums, I helpfully got a
compiler warning about these missing from the switch statement.

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/compiler/brw_disasm.c
src/intel/compiler/brw_inst.h

index b5c283058ab1946a35fe201be14863dce01d7e4f..6da70605174790069dce48169509cb81e2be3eca 100644 (file)
@@ -1029,6 +1029,12 @@ imm(FILE *file, const struct gen_device_info *devinfo, enum hw_imm_type type,
     const brw_inst *inst)
 {
    switch (type) {
+   case GEN8_HW_IMM_TYPE_UQ:
+      format(file, "0x%16lxUD", brw_inst_imm_uq(devinfo, inst));
+      break;
+   case GEN8_HW_IMM_TYPE_Q:
+      format(file, "%ldD", brw_inst_imm_uq(devinfo, inst));
+      break;
    case BRW_HW_IMM_TYPE_UD:
       format(file, "0x%08xUD", brw_inst_imm_ud(devinfo, inst));
       break;
index 5b2ce32ae4051eedb5ff5eb206fb2c5df35734c9..cd3b0e95ea0ed33d68797b9fd1ad12df10ce7e09 100644 (file)
@@ -569,6 +569,13 @@ brw_inst_imm_ud(const struct gen_device_info *devinfo, const brw_inst *insn)
    return brw_inst_bits(insn, 127, 96);
 }
 
+static inline uint64_t
+brw_inst_imm_uq(const struct gen_device_info *devinfo, const brw_inst *insn)
+{
+   assert(devinfo->gen >= 8);
+   return brw_inst_bits(insn, 127, 64);
+}
+
 static inline float
 brw_inst_imm_f(const struct gen_device_info *devinfo, const brw_inst *insn)
 {