[PATCH v2 30/32] mpi: Remove the AArch64 add_ssaaaa, sub_ddmmss and umul_ppmm.

Matt Turner mattst88 at gmail.com
Wed Nov 25 21:20:07 CET 2026


* mpi/longlong.h [__aarch64__ && W_TYPE_SIZE == 64] (add_ssaaaa)
(sub_ddmmss, umul_ppmm): Remove.

--

These predate the generic versions using UDWtype, from which GCC and
Clang generate the same adds/adc, subs/sbc and mul/umulh.  GCC's
longlong.h has no AArch64 versions either.

Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 mpi/longlong.h | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/mpi/longlong.h b/mpi/longlong.h
index ea11e410..d7e17c47 100644
--- a/mpi/longlong.h
+++ b/mpi/longlong.h
@@ -276,36 +276,6 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
 #define COUNT_LEADING_ZEROS_0 32
 #endif
 
-#if defined(__aarch64__) && W_TYPE_SIZE == 64
-# define add_ssaaaa(sh, sl, ah, al, bh, bl) \
-  __asm__ ("adds %1, %4, %5\n"                                          \
-           "adc  %0, %2, %3\n"                                          \
-           : "=r" ((sh)),                                               \
-             "=&r" ((sl))                                               \
-           : "r" ((UDItype)(ah)),                                       \
-             "r" ((UDItype)(bh)),                                       \
-             "r" ((UDItype)(al)),                                       \
-             "r" ((UDItype)(bl)) __CLOBBER_CC)
-# define sub_ddmmss(sh, sl, ah, al, bh, bl) \
-  __asm__ ("subs %1, %4, %5\n"                                          \
-           "sbc  %0, %2, %3\n"                                          \
-           : "=r" ((sh)),                                               \
-             "=&r" ((sl))                                               \
-           : "r" ((UDItype)(ah)),                                       \
-             "r" ((UDItype)(bh)),                                       \
-             "r" ((UDItype)(al)),                                       \
-             "r" ((UDItype)(bl)) __CLOBBER_CC)
-# define umul_ppmm(ph, pl, m0, m1) \
-  do {                                                                  \
-    UDItype __m0 = (m0), __m1 = (m1), __ph;                             \
-    (pl) = __m0 * __m1;                                                 \
-    __asm__ ("umulh %0,%1,%2"                                           \
-             : "=r" (__ph)                                              \
-             : "r" (__m0),                                              \
-               "r" (__m1));                                             \
-    (ph) = __ph; \
-  } while (0)
-#endif /* __aarch64__ */
 
 #if defined (__hppa) && W_TYPE_SIZE == 32
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \

-- 
2.56.1



More information about the Gcrypt-devel mailing list