panfrost/midgard: Cleanup tag fetch in disassembler
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 6 Jun 2019 18:20:21 +0000 (11:20 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 7 Jun 2019 16:05:29 +0000 (09:05 -0700)
Trivial.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/disassemble.c

index dcab841b16491496206387d843fee4e7d49b1d77..a2a0b0dba376f258ad17f072f48ae20389407583 100644 (file)
@@ -1114,9 +1114,10 @@ disassemble_midgard(uint8_t *code, size_t size)
         unsigned i = 0;
 
         while (i < num_words) {
-                unsigned num_quad_words = midgard_word_size[words[i] & 0xF];
+                unsigned tag = words[i] & 0xF;
+                unsigned num_quad_words = midgard_word_size[tag];
 
-                switch (midgard_word_types[words[i] & 0xF]) {
+                switch (midgard_word_types[tag]) {
                 case midgard_word_type_texture:
                         print_texture_word(&words[i], tabs);
                         break;