freedreno/ir3: fix sam.s2en decoding
authorRob Clark <robdclark@gmail.com>
Sat, 16 Mar 2019 14:29:05 +0000 (10:29 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 21 Mar 2019 13:13:05 +0000 (09:13 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/disasm-a3xx.c

index 7b2a773df469eee352ea857a282844f0fdaccddb..956c168fa9424ff39c375607bf72d64468707797 100644 (file)
@@ -463,9 +463,11 @@ static void print_instr_cat5(struct disasm_ctx *ctx, instr_t *instr)
        }
 
        if (cat5->is_s2en) {
-               fprintf(ctx->out, ", ");
-               print_reg_src(ctx, (reg_t)(cat5->s2en.src2), cat5->full, false, false, false,
-                               false, false, false);
+               if (cat5->is_o || info[cat5->opc].src2) {
+                       fprintf(ctx->out, ", ");
+                       print_reg_src(ctx, (reg_t)(cat5->s2en.src2), cat5->full,
+                                       false, false, false, false, false, false);
+               }
                fprintf(ctx->out, ", ");
                print_reg_src(ctx, (reg_t)(cat5->s2en.src3), false, false, false, false,
                                false, false, false);