Package: gmp
Version: 6.2.1+dfsg1-1.1
Severity: wishlist
Tags: patch
User: debian-de...@lists.debian.org
Usertags: loongarch64

   Hi gmp maintainers,

- update symbols for loongarch64.
gmp would fail to build from source on mips64r6el if we had bootstrapped this port due to symbol issues. Methods for updating symbol files:
   sed -i -e 's/!hppa/& !loongarch64/' libgmp10.symbols

- definition for mixed size 64 bit arithmetic.
I have added patch for loongarch64. The patch:
   gmp-6.2.1-add-loongarch64-definition.patch

Please update the symbol file and consider applying the attached patch.

thanks,
Dandan Zhang

diff --git a/longlong.h b/longlong.h
index edbaf56..fa9ea18 100644
--- a/longlong.h
+++ b/longlong.h
@@ -1162,6 +1162,15 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
 #endif /* i960mx */
 #endif /* i960 */
 
+#if defined (__loongarch64) && W_TYPE_SIZE == 64
+#define umul_ppmm(w1, w0, u, v) \
+  do {									\
+    UDItype __u = (u), __v = (v);					\
+    (w0) = __u * __v;							\
+    (w1) = (unsigned __int128__) __u * __v >> 64;			\
+  } while (0)
+#endif
+
 #if (defined (__mc68000__) || defined (__mc68020__) || defined(mc68020) \
      || defined (__m68k__) || defined (__mc5200__) || defined (__mc5206e__) \
      || defined (__mc5307__)) && W_TYPE_SIZE == 32

Reply via email to