pan/midgard: Fix disassembly termination condition
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 14 Aug 2019 21:42:07 +0000 (14:42 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 14 Aug 2019 22:09:17 +0000 (15:09 -0700)
Fixes: 863bdd1f8dc ("pan/midgard: Break, not return, in disassembler")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/disassemble.c

index 3e18c19593b7b82fbd42abb18377ddc2e562fa3d..28f0b40e476e6a4405eba8a962955303381423aa 100644 (file)
@@ -1387,8 +1387,6 @@ disassemble_midgard(uint8_t *code, size_t size, bool stats, unsigned nr_register
 
                 unsigned next = (words[i] & 0xF0) >> 4;
 
-                i += 4 * num_quad_words;
-
                 /* We are parsing per bundle anyway */
                 nr_bundles++;
                 nr_quadwords += num_quad_words;
@@ -1401,6 +1399,8 @@ disassemble_midgard(uint8_t *code, size_t size, bool stats, unsigned nr_register
                         if (midgard_word_types[words[i] & 0xF] != midgard_word_type_alu)
                                 break;
                 }
+
+                i += 4 * num_quad_words;
         }
 
         if (stats) {