pvr: Add ADD64 support

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by Frank Binns <frank.binns@imgtec.comr>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21331>
This commit is contained in:
Simon Perretta
2023-02-07 10:53:13 +00:00
committed by Marge Bot
parent 7386342a19
commit 81f86a559c
8 changed files with 258 additions and 29 deletions

View File

@@ -115,6 +115,22 @@ static inline rogue_alu_instr *rogue_build_alu22(rogue_builder *b,
return rogue_build_alu(b, op, 2, dsts, 2, srcs);
}
static inline rogue_alu_instr *rogue_build_alu35(rogue_builder *b,
enum rogue_alu_op op,
rogue_ref dst0,
rogue_ref dst1,
rogue_ref dst2,
rogue_ref src0,
rogue_ref src1,
rogue_ref src2,
rogue_ref src3,
rogue_ref src4)
{
rogue_ref dsts[] = { dst0, dst1, dst2 };
rogue_ref srcs[] = { src0, src1, src2, src3, src4 };
return rogue_build_alu(b, op, 3, dsts, 5, srcs);
}
/* TODO: Static inline in rogue.h? */
#define ROGUE_BUILDER_DEFINE_ALU11(op) \
PUBLIC \
@@ -165,6 +181,32 @@ static inline rogue_alu_instr *rogue_build_alu22(rogue_builder *b,
return rogue_build_alu22(b, ROGUE_ALU_OP_##op, dst0, dst1, src0, src1); \
}
#define ROGUE_BUILDER_DEFINE_ALU35(op) \
PUBLIC \
rogue_alu_instr *rogue_##op(rogue_builder *b, \
rogue_ref dst0, \
rogue_ref dst1, \
rogue_ref dst2, \
rogue_ref src0, \
rogue_ref src1, \
rogue_ref src2, \
rogue_ref src3, \
rogue_ref src4) \
{ \
assert(rogue_alu_op_infos[ROGUE_ALU_OP_##op].num_dsts == 3); \
assert(rogue_alu_op_infos[ROGUE_ALU_OP_##op].num_srcs == 5); \
return rogue_build_alu35(b, \
ROGUE_ALU_OP_##op, \
dst0, \
dst1, \
dst2, \
src0, \
src1, \
src2, \
src3, \
src4); \
}
#include "rogue_alu_instrs.def"
static inline rogue_backend_instr *rogue_build_backend(rogue_builder *b,