Mesa (master): intel/disasm: Change visibility of has_uip and has_jip

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 2 10:47:23 UTC 2020


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

Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date:   Mon Jun  3 11:58:58 2019 +0300

intel/disasm: Change visibility of has_uip and has_jip

Pre-work for shader disassembly label support.

From: "Lonnberg, Toni" <toni.lonnberg at intel.com>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245>

---

 src/intel/compiler/brw_disasm.c | 12 ++++++------
 src/intel/compiler/brw_eu.h     |  2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c
index 23c55fb65ea..e447087094b 100644
--- a/src/intel/compiler/brw_disasm.c
+++ b/src/intel/compiler/brw_disasm.c
@@ -32,8 +32,8 @@
 #include "brw_eu.h"
 #include "util/half_float.h"
 
-static bool
-has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
+bool
+brw_has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (devinfo->gen < 6)
       return false;
@@ -47,8 +47,8 @@ has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
           opcode == BRW_OPCODE_HALT;
 }
 
-static bool
-has_uip(const struct gen_device_info *devinfo, enum opcode opcode)
+bool
+brw_has_uip(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (devinfo->gen < 6)
       return false;
@@ -1733,13 +1733,13 @@ brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
    if (opcode == BRW_OPCODE_SEND && devinfo->gen < 6)
       format(file, " %"PRIu64, brw_inst_base_mrf(devinfo, inst));
 
-   if (has_uip(devinfo, opcode)) {
+   if (brw_has_uip(devinfo, opcode)) {
       /* Instructions that have UIP also have JIP. */
       pad(file, 16);
       format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
       pad(file, 32);
       format(file, "UIP: %d", brw_inst_uip(devinfo, inst));
-   } else if (has_jip(devinfo, opcode)) {
+   } else if (brw_has_jip(devinfo, opcode)) {
       pad(file, 16);
       if (devinfo->gen >= 7) {
          format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h
index 374ff75db45..18567155fd6 100644
--- a/src/intel/compiler/brw_eu.h
+++ b/src/intel/compiler/brw_eu.h
@@ -162,6 +162,8 @@ void brw_set_default_swsb(struct brw_codegen *p, struct tgl_swsb value);
 
 void brw_init_codegen(const struct gen_device_info *, struct brw_codegen *p,
 		      void *mem_ctx);
+bool brw_has_jip(const struct gen_device_info *devinfo, enum opcode opcode);
+bool brw_has_uip(const struct gen_device_info *devinfo, enum opcode opcode);
 int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
                          const struct brw_inst *inst, bool is_compacted);
 void brw_disassemble(const struct gen_device_info *devinfo,



More information about the mesa-commit mailing list