[PATCH v2 20/32] mpi: Sync the IBM RT longlong.h with GCC.

Matt Turner mattst88 at gmail.com
Wed Nov 25 21:19:57 CET 2026


* mpi/longlong.h [__ibm032__]: Use GCC's text.

--

Take the IBM RT block from GCC's copy of longlong.h.  The only
changes are whitespace and the asm strings in add_ssaaaa and
sub_ddmmss, which become one string with "\n\t" instead of two.
The old add_ssaaaa also had a stray space before the newline.

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

diff --git a/mpi/longlong.h b/mpi/longlong.h
index c17ac622..c8514a2d 100644
--- a/mpi/longlong.h
+++ b/mpi/longlong.h
@@ -972,74 +972,72 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
 /***************************************
  **************  RT/ROMP  **************
  ***************************************/
-#if defined (__ibm032__) /* RT/ROMP */	&& W_TYPE_SIZE == 32
-# define add_ssaaaa(sh, sl, ah, al, bh, bl) \
-  __asm__ ("a %1,%5 \n" \
-	   "ae %0,%3"                                                   \
-	   : "=r" __ll_check_output (USItype, sh),                      \
-	     "=&r" __ll_check_output (USItype, sl)                      \
-	   : "%0" ((USItype)(ah)),                                      \
-	     "r" ((USItype)(bh)),                                       \
-	     "%1" ((USItype)(al)),                                      \
-	     "r" ((USItype)(bl)))
-# define sub_ddmmss(sh, sl, ah, al, bh, bl) \
-  __asm__ ("s %1,%5\n" \
-	   "se %0,%3"                                                   \
-	   : "=r" __ll_check_output (USItype, sh),                      \
-	     "=&r" __ll_check_output (USItype, sl)                      \
-	   : "0" ((USItype)(ah)),                                       \
-	     "r" ((USItype)(bh)),                                       \
-	     "1" ((USItype)(al)),                                       \
-	     "r" ((USItype)(bl)))
-# define umul_ppmm(ph, pl, m0, m1) \
+#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+  __asm__ ("a %1,%5\n\tae %0,%3"					\
+	   : "=r" __ll_check_output (USItype, sh),			\
+	     "=&r" __ll_check_output (USItype, sl)			\
+	   : "%0" ((USItype) (ah)),					\
+	     "r" ((USItype) (bh)),					\
+	     "%1" ((USItype) (al)),					\
+	     "r" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+  __asm__ ("s %1,%5\n\tse %0,%3"					\
+	   : "=r" __ll_check_output (USItype, sh),			\
+	     "=&r" __ll_check_output (USItype, sl)			\
+	   : "0" ((USItype) (ah)),					\
+	     "r" ((USItype) (bh)),					\
+	     "1" ((USItype) (al)),					\
+	     "r" ((USItype) (bl)))
+#define umul_ppmm(ph, pl, m0, m1) \
   do {									\
     USItype __m0 = (m0), __m1 = (m1);					\
     __asm__ (								\
-       "s       r2,r2    \n" \
-       "mts	r10,%2   \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "m	r2,%3    \n" \
-       "cas	%0,r2,r0 \n" \
-       "mfs	r10,%1"                                                 \
-	     : "=r" __ll_check_output (USItype, ph),                    \
-	       "=r" __ll_check_output (USItype, pl)                     \
-	     : "%r" (__m0),                                             \
-		"r" (__m1)                                              \
-	     : "r2");                                                   \
+       "s	r2,r2\n"						\
+"	mts	r10,%2\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	m	r2,%3\n"						\
+"	cas	%0,r2,r0\n"						\
+"	mfs	r10,%1"							\
+	     : "=r" __ll_check_output (USItype, ph),			\
+	       "=r" __ll_check_output (USItype, pl)			\
+	     : "%r" (__m0),						\
+		"r" (__m1)						\
+	     : "r2");							\
     (ph) += ((((SItype) __m0 >> 31) & __m1)				\
-	     + (((SItype) __m1 >> 31) & __m0)); 			\
+	     + (((SItype) __m1 >> 31) & __m0));				\
   } while (0)
-# define UMUL_TIME 20
-# define UDIV_TIME 200
-# define count_leading_zeros(count, x) \
+#define UMUL_TIME 20
+#define UDIV_TIME 200
+#define count_leading_zeros(count, x) \
   do {									\
-    if ((x) >= 0x10000) 						\
-      __asm__ ("clz     %0,%1"                                          \
-	       : "=r" __ll_check_output (USItype, count)                \
-	       : "r" ((USItype)(x) >> 16));                             \
+    if ((x) >= 0x10000)							\
+      __asm__ ("clz	%0,%1"						\
+	       : "=r" __ll_check_output (USItype, count)		\
+	       : "r" ((USItype) (x) >> 16));				\
     else								\
-      { 								\
-	__asm__ ("clz   %0,%1"                                          \
-		 : "=r" __ll_check_output (USItype, count)              \
-		 : "r" ((USItype)(x)));                                 \
+      {									\
+	__asm__ ("clz	%0,%1"						\
+		 : "=r" __ll_check_output (USItype, count)		\
+		 : "r" ((USItype) (x)));					\
 	(count) += 16;							\
-      } 								\
+      }									\
   } while (0)
-#endif /* RT/ROMP */
+#endif
 
 
 /***************************************

-- 
2.56.1



More information about the Gcrypt-devel mailing list