From 919cdf15b3a88cf745e3aed1a52ea45a44846b35 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 5 Mar 2020 07:57:49 -0500 Subject: [PATCH] pan/bi: Add bi_print_bundle for printing bi_bundle Post-schedule, nops are significnat here. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_print.c | 14 ++++++++++++++ src/panfrost/bifrost/bi_print.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index a445eb4c41a..69e6d5d9e12 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -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"); + } +} + diff --git a/src/panfrost/bifrost/bi_print.h b/src/panfrost/bifrost/bi_print.h index cc2689afae2..e9b301a39d3 100644 --- a/src/panfrost/bifrost/bi_print.h +++ b/src/panfrost/bifrost/bi_print.h @@ -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 -- 2.30.2