From 0c215136931010e418a29f893efd98777b6ce931 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 16 Apr 2021 18:36:06 -0400 Subject: [PATCH] agx: Add bitwise operations This get translated to bitop with the corresponding truth table with some builder syntax sugar. Signed-off-by: Alyssa Rosenzweig Acked-by: Jason Ekstrand Acked-by: Bas Nieuwenhuizen Part-of: --- src/asahi/compiler/agx_compile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 978c6684cee..8395f1f7e3c 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -245,6 +245,14 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr) UNOP(fddy_coarse, dfdy); UNOP(fddy_fine, dfdy); + UNOP(mov, mov); + UNOP(u2u16, mov); + UNOP(u2u32, mov); + UNOP(inot, not); + BINOP(iand, and); + BINOP(ior, or); + BINOP(ixor, xor); + case nir_op_fsqrt: return agx_fmul_to(b, dst, s0, agx_srsqrt(b, s0)); case nir_op_fsub: return agx_fadd_to(b, dst, s0, agx_neg(s1)); case nir_op_fabs: return agx_fmov_to(b, dst, agx_abs(s0));