Mesa (master): i965: Don' t print source registers for Broadwell flow control.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Feb 8 03:35:07 UTC 2014


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Feb  5 01:32:39 2014 -0800

i965: Don't print source registers for Broadwell flow control.

The bits which normally contain the source register descriptions
actually contain the JIP/UIP jump targets, which we already printed.

Interpreting JIP/UIP as source registers results in some really creepy
looking output, like IF statements with acc14.4<0,1,0>UD sources.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/gen8_disasm.c |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen8_disasm.c b/src/mesa/drivers/dri/i965/gen8_disasm.c
index 387bb71..b2ab448 100644
--- a/src/mesa/drivers/dri/i965/gen8_disasm.c
+++ b/src/mesa/drivers/dri/i965/gen8_disasm.c
@@ -828,10 +828,7 @@ gen8_disassemble(FILE *file, struct gen8_instruction *inst, int gen)
       pad(file, 64);
       err |= src2_3src(file, inst);
    } else {
-      if (m_opcode[opcode].ndst > 0) {
-         pad(file, 16);
-         err |= dest(file, inst);
-      } else if (opcode == BRW_OPCODE_ENDIF) {
+      if (opcode == BRW_OPCODE_ENDIF) {
          format(file, " %d", gen8_jip(inst));
       } else if (opcode == BRW_OPCODE_IF ||
                  opcode == BRW_OPCODE_ELSE ||
@@ -840,15 +837,19 @@ gen8_disassemble(FILE *file, struct gen8_instruction *inst, int gen)
                  opcode == BRW_OPCODE_CONTINUE ||
                  opcode == BRW_OPCODE_HALT) {
          format(file, " %d %d", gen8_jip(inst), gen8_uip(inst));
-      }
-
-      if (m_opcode[opcode].nsrc > 0) {
-         pad(file, 32);
-         err |= src0(file, inst);
-      }
-      if (m_opcode[opcode].nsrc > 1) {
-         pad(file, 48);
-         err |= src1(file, inst);
+      } else {
+         if (m_opcode[opcode].ndst > 0) {
+            pad(file, 16);
+            err |= dest(file, inst);
+         }
+         if (m_opcode[opcode].nsrc > 0) {
+            pad(file, 32);
+            err |= src0(file, inst);
+         }
+         if (m_opcode[opcode].nsrc > 1) {
+            pad(file, 48);
+            err |= src1(file, inst);
+         }
       }
    }
 




More information about the mesa-commit mailing list