[SCM] libzn-poly: library for polynomial arithmetic in Z/nZ[x] branch, master, updated. debian/0.9-1-1-ge104ff5

Tobias Hansen tobias.han at gmx.de
Fri Jan 11 19:00:51 UTC 2013


The following commit has been merged in the master branch:
commit e104ff58e009a4f613c0c3ee2a52ea7ae204db61
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Fri Jan 11 20:00:07 2013 +0100

    Remove custom C implementation from gcc-4.5-mips.patch.

diff --git a/debian/patches/gcc-4.5-mips.patch b/debian/patches/gcc-4.5-mips.patch
index dd452af..63c2156 100644
--- a/debian/patches/gcc-4.5-mips.patch
+++ b/debian/patches/gcc-4.5-mips.patch
@@ -3,41 +3,37 @@ Description: Remove old MIPS inline assembly code
  MIPS inline assembly code when doing a multiplication. That's why
  libzn-poly fails to build from source on mips and mipsel.
  .
- That said GCC supports 32x32 => 64 multiplication on 32-bit architectures
- for a lot of time, so there is no need to use assembly code for that. 
- The patch below fixes the problem by using standard multiplication 
- instead of assembly code. I have also included the code for MIPS64 using
- 128-bit hints for reference, though it is not used in Debian.
-Author: Aurelien Jarno <aurel32 at debian.org>
+ The C version of this function is used instead.
+Author: Tobias Hansen <thansen at debian.org>
 Bug-Debian: http://bugs.debian.org/623598
 
 --- a/include/wide_arith.h
 +++ b/include/wide_arith.h
-@@ -247,14 +247,23 @@
- #if (UNSIGNED_LONG_BITS == 32)
+@@ -240,27 +240,6 @@
+ #endif
+ 
  
- #define ZNP_MUL_WIDE(hi, lo, a, b)                                            \
+-// ------ MIPS ------
+-
+-#if (defined (__mips))
+-
+-#if (UNSIGNED_LONG_BITS == 32)
+-
+-#define ZNP_MUL_WIDE(hi, lo, a, b)                                            \
 -   __asm__ ("multu %2,%3" : "=l" (lo), "=h" (hi) : "d" (a), "d" (b));
 -
-+   do {                                                                       \
-+       uint64_t result;                                                       \
-+       result = (uint64_t) a * b;                                             \
-+       hi = (uint32_t)(result >> 32);                                         \
-+       lo = (uint32_t) result;                                                \
-+   } while (0);
- 
- #elif (UNSIGNED_LONG_BITS == 64)
- 
- #define ZNP_MUL_WIDE(hi, lo, a, b)                                            \
+-
+-#elif (UNSIGNED_LONG_BITS == 64)
+-
+-#define ZNP_MUL_WIDE(hi, lo, a, b)                                            \
 -   __asm__ ("dmultu %2,%3" : "=l" (lo), "=h" (hi) : "d" (a), "d" (b));
 -
-+   do {                                                                       \
-+       typedef unsigned int uint128_t __attribute__((mode(TI)));              \
-+       uint128_t result;                                                      \
-+       result = (uint128_t) a * b;                                            \
-+       hi = (uint64_t)(result >> 64);                                         \
-+       lo = (uint64_t) result;                                                \
-+   } while (0);
+-
+-#endif
+-
+-#endif
+-
+-
+ //  -------- SPARC --------
  
- #endif
  

-- 
libzn-poly: library for polynomial arithmetic in Z/nZ[x]



More information about the debian-science-commits mailing list