pan/bi: Add bi_print_bundle for printing bi_bundle
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 5 Mar 2020 12:57:49 +0000 (07:57 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 5 Mar 2020 14:35:38 +0000 (14:35 +0000)
Post-schedule, nops are significnat here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

src/panfrost/bifrost/bi_print.c
src/panfrost/bifrost/bi_print.h

index a445eb4c41aaf799e2579d981b67d348d762c884..69e6d5d9e122c6b5b13337d21744197779a268fa 100644 (file)
@@ -328,3 +328,17 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
 
         fprintf(fp, "\n");
 }
+
+void
+bi_print_bundle(bi_bundle *bundle, FILE *fp)
+{
+        bi_instruction *ins[2] = { bundle->fma, bundle->add };
+
+        for (unsigned i = 0; i < 2; ++i) {
+                if (ins[i])
+                        bi_print_instruction(ins[i], fp);
+                else
+                        fprintf(fp, "nop\n");
+        }
+}
+
index cc2689afae235fe294621f0617792165b1805240..e9b301a39d31259ad992c25a15838660c2d9f60a 100644 (file)
@@ -39,5 +39,6 @@ const char * bi_interp_mode_name(enum bifrost_interp_mode mode);
 const char * bi_ldst_type_name(enum bifrost_ldst_type type);
 
 void bi_print_instruction(bi_instruction *ins, FILE *fp);
+void bi_print_bundle(bi_bundle *bundle, FILE *fp);
 
 #endif