From ffa9f6a7896cd1cfdfe0e8e880ab870f3da6033f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 13:14:05 -0400 Subject: [PATCH] pan/bi: Add bi_pack_fma_2src helper Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_pack.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 6539d23ee0e..043c8d57b93 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -642,6 +642,18 @@ bi_pack_fma_1src(bi_instruction *ins, struct bi_registers *regs, unsigned op) RETURN_PACKED(pack); } +static unsigned +bi_pack_fma_2src(bi_instruction *ins, struct bi_registers *regs, unsigned op) +{ + struct bifrost_fma_2src pack = { + .src0 = bi_get_src(ins, regs, 0, true), + .src1 = bi_get_src(ins, regs, 1, true), + .op = op + }; + + RETURN_PACKED(pack); +} + static unsigned bi_pack_add_1src(bi_instruction *ins, struct bi_registers *regs, unsigned op) { -- 2.30.2