From 8b1e9c4dd1fd12e3b85750a5c0044b54ced216c7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 12 Feb 2026 13:45:48 +0100 Subject: Add subtraction and addition with carry/borrow and add abs_diff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libj2.7 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'libj2.7') diff --git a/libj2.7 b/libj2.7 index ae0cccc..2dfefee 100644 --- a/libj2.7 +++ b/libj2.7 @@ -817,6 +817,15 @@ Calculate the sum of two values, and detect overflow. .BR libj2_ju_add_j2u_overflow_p (3) Predict whether adding two values will result in an overflow. .TP +.BR libj2_j2i_add_j2i_carry (3), +.TQ +.BR libj2_j2i_add_j2i_to_j2i_carry (3), +.TQ +.BR libj2_j2u_add_j2u_carry (3), +.TQ +.BR libj2_j2u_add_j2u_to_j2u_carry (3) +Calculate the sum of two values; with overflow carray-over. +.TP .BR libj2_j2i_sat_add_j2i (3), .TQ .BR libj2_j2i_sat_add_j2i_to_j2i (3), @@ -932,6 +941,23 @@ Predict whether subtracting a value will result in an overflow. Predict whether subtracting a value will result in an overflow. These functions swap the position of the two operands. .TP +.BR libj2_j2i_sub_j2i_carry (3), +.TQ +.BR libj2_j2i_sub_j2i_to_j2i_carry (3), +.TQ +.BR libj2_j2u_sub_j2u_borrow (3), +.TQ +.BR libj2_j2u_sub_j2u_to_j2u_borrow (3) +Calculate the difference between two values; with +overflow carry-over. +.TP +.BR libj2_j2i_rsub_j2i_carry (3), +.TQ +.BR libj2_j2u_rsub_j2u_borrow (3) +Calculate the difference between two values; with +overflow carry-over. These functions swap the position +of the two operands. +.TP .BR libj2_j2i_sat_sub_j2i (3), .TQ .BR libj2_j2i_sat_sub_j2i_to_j2i (3), @@ -966,6 +992,17 @@ overflow. Calculate the difference between two values, but saturate on overflow. These functions swap the position of the two operands. .TP +.BR libj2_j2i_abs_diff_j2i_to_j2u (3), +.TQ +.BR libj2_j2u_abs_diff_j2u (3), +.TQ +.BR libj2_j2u_abs_diff_j2u_to_j2u (3), +.TQ +.BR libj2_ju_abs_diff_ji_to_j2u (3), +.TQ +.BR libj2_ji_abs_diff_ju_to_j2u (3) +Calculate the absolute difference between two values. +.TP .BR libj2_j2i_mul_j2i (3), .TQ .BR libj2_j2i_mul_j2i_to_j2i (3), -- cgit v1.2.3-70-g09d2