From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 20:13:53 +0000 (-0400) Subject: pan/bi: Add _MSCALE flag for FMA/ADD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4570c34fc76c16c149d6040883b92c30abe70531;p=mesa.git pan/bi: Add _MSCALE flag for FMA/ADD So we can bias by exponents. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 5dc5947882e..d6440a5765a 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -366,6 +366,9 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) else fprintf(fp, "%s", bi_class_name(ins->type)); + if ((ins->type == BI_ADD || ins->type == BI_FMA) && ins->op.mscale) + fprintf(fp, ".mscale"); + if (ins->type == BI_MINMAX) fprintf(fp, "%s", bi_minmax_mode_name(ins->minmax)); else if (ins->type == BI_LOAD_VAR) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index c1350f480c5..2d3f1a13588 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -275,6 +275,9 @@ typedef struct { enum bi_table_op table; enum bi_frexp_op frexp; enum bi_cond compare; + + /* For FMA/ADD, should we add a biased exponent? */ + bool mscale; } op; /* Union for class-specific information */