i965/vec4: print predicate control at brw_vec4 dump_instruction
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 9 Oct 2015 16:39:42 +0000 (18:39 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 22 Oct 2015 19:58:03 +0000 (21:58 +0200)
v2: externalize pred_ctrl_align16 from brw_disasm.c instead of adding
    a copy on brw_vec4.c, as suggested by Matt Turner

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_vec4.cpp

index 4f503ae48693921b3d178e4302c9f5ab02161a9f..0fdc83ef7e1a438ebb4fa919a50dd35e58b55060 100644 (file)
@@ -1680,6 +1680,7 @@ struct opcode_desc {
 
 extern const struct opcode_desc opcode_descs[128];
 extern const char * const conditional_modifier[16];
+extern const char *const pred_ctrl_align16[16];
 
 void
 brw_emit_depthbuffer(struct brw_context *brw);
index db23a187a93a2f350a687c9850476aba0613e3a8..35cf99efc104e93fa357a01247c9a733562edeb8 100644 (file)
@@ -252,7 +252,7 @@ static const char *const pred_inv[2] = {
    [1] = "-"
 };
 
-static const char *const pred_ctrl_align16[16] = {
+const char *const pred_ctrl_align16[16] = {
    [1] = "",
    [2] = ".x",
    [3] = ".y",
index c8923ef016a164e3d5049d71deebd57f44f10bcc..71a5a4403f473d2f93074482d088a8cd6e5f0e35 100644 (file)
@@ -1370,9 +1370,10 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
    vec4_instruction *inst = (vec4_instruction *)be_inst;
 
    if (inst->predicate) {
-      fprintf(file, "(%cf0.%d) ",
+      fprintf(file, "(%cf0.%d%s) ",
               inst->predicate_inverse ? '-' : '+',
-              inst->flag_subreg);
+              inst->flag_subreg,
+              pred_ctrl_align16[inst->predicate]);
    }
 
    fprintf(file, "%s", brw_instruction_name(inst->opcode));