From: Alyssa Rosenzweig Date: Sat, 17 Apr 2021 00:36:39 +0000 (-0400) Subject: agx: Add iadd/imad integer arithmetic X-Git-Tag: upstream/21.2.3~3997 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86ae965ea4c0928534947d56fa5fd72107edce72;p=platform%2Fupstream%2Fmesa.git agx: Add iadd/imad integer arithmetic Lots of optimizations will be possible later on. Signed-off-by: Alyssa Rosenzweig Acked-by: Jason Ekstrand Acked-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 8395f1f..d206856 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -258,6 +258,11 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr) case nir_op_fabs: return agx_fmov_to(b, dst, agx_abs(s0)); case nir_op_fneg: return agx_fmov_to(b, dst, agx_neg(s0)); + case nir_op_iadd: return agx_iadd_to(b, dst, s0, s1, 0); + case nir_op_isub: return agx_iadd_to(b, dst, s0, agx_neg(s1), 0); + case nir_op_ineg: return agx_iadd_to(b, dst, agx_zero(), agx_neg(s0), 0); + case nir_op_imul: return agx_imad_to(b, dst, s0, s1, agx_zero(), 0); + case nir_op_fsat: { agx_instr *I = agx_fadd_to(b, dst, s0, agx_negzero());