From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 16:54:17 +0000 (-0400) Subject: pan/bi: Add frexp_log packing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9904ed170a121bb15350b0882ddc6e54d13a8a8f;p=mesa.git pan/bi: Add frexp_log packing Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 822d1ff10d9..6539d23ee0e 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -728,6 +728,13 @@ bi_pack_fma_csel(bi_instruction *ins, struct bi_registers *regs) RETURN_PACKED(pack); } +static unsigned +bi_pack_fma_frexp(bi_instruction *ins, struct bi_registers *regs) +{ + unsigned op = BIFROST_FMA_OP_FREXPE_LOG; + return bi_pack_fma_1src(ins, regs, op); +} + /* We have a single convert opcode in the IR but a number of opcodes that could * come out. In particular we have native opcodes for: * @@ -857,6 +864,7 @@ bi_pack_fma(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs) case BI_FMA: return bi_pack_fma_fma(bundle.fma, regs); case BI_FREXP: + return bi_pack_fma_frexp(bundle.fma, regs); case BI_ISUB: return BIFROST_FMA_NOP; case BI_MINMAX: diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 5552dd92585..91755375c3b 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -97,6 +97,7 @@ enum bifrost_packed_src { #define BIFROST_FMA_EXT (0xe0000) #define BIFROST_FMA_OP_MOV BIFROST_FMA_EXT | (0x32d) +#define BIFROST_FMA_OP_FREXPE_LOG BIFROST_FMA_EXT | 0x3c5 struct bifrost_fma_inst { unsigned src0 : 3;