[commit: packages/integer-gmp] master: Drop redundant formal parameter from TAKE1_UL1_RET2 (13b4d0c)

git at git.haskell.org git at git.haskell.org
Sat Jan 11 00:05:57 UTC 2014


Repository : ssh://git@git.haskell.org/integer-gmp

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/13b4d0cdd18471de33ba89bda11a4b238507b7c7/integer-gmp

>---------------------------------------------------------------

commit 13b4d0cdd18471de33ba89bda11a4b238507b7c7
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Jan 11 00:51:29 2014 +0100

    Drop redundant formal parameter from TAKE1_UL1_RET2
    
    This fixes the actual cause for #8661, i.e. a mismatch between the
    actual arity of the Cmm implementation and the arity declared in the
    foreign import statement.
    
    This also reverts [a3878d17/integer-gmp] as the workaround isn't needed
    anymore.
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


>---------------------------------------------------------------

13b4d0cdd18471de33ba89bda11a4b238507b7c7
 GHC/Integer/Type.lhs   |   10 +---------
 cbits/gmp-wrappers.cmm |    2 +-
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/GHC/Integer/Type.lhs b/GHC/Integer/Type.lhs
index ee112c5..731c5fc 100644
--- a/GHC/Integer/Type.lhs
+++ b/GHC/Integer/Type.lhs
@@ -40,10 +40,7 @@ import GHC.Integer.GMP.Prim (
     cmpInteger#, cmpIntegerInt#,
     plusInteger#, plusIntegerInt#, minusInteger#, minusIntegerInt#,
     timesInteger#, timesIntegerInt#,
-    quotRemInteger#,
-#if SIZEOF_HSWORD == 8
-    quotRemIntegerWord#,
-#endif
+    quotRemInteger#, quotRemIntegerWord#,
     quotInteger#, quotIntegerWord#, remInteger#, remIntegerWord#,
     divModInteger#, divInteger#, modInteger#,
     gcdInteger#, gcdExtInteger#, gcdIntegerInt#, gcdInt#, divExactInteger#,
@@ -227,7 +224,6 @@ quotRemInteger :: Integer -> Integer -> (# Integer, Integer #)
 quotRemInteger a@(S# INT_MINBOUND) b = quotRemInteger (toBig a) b
 quotRemInteger (S# i) (S# j) = case quotRemInt# i j of
                                    (# q, r #) -> (# S# q, S# r #)
-#if SIZEOF_HSWORD == 8
 quotRemInteger (J# s1 d1) (S# b) | isTrue# (b <# 0#)
   = case quotRemIntegerWord# s1 d1 (int2Word# (negateInt# b)) of
           (# s3, d3, s4, d4 #) -> let !q = smartJ# (negateInt# s3) d3
@@ -238,10 +234,6 @@ quotRemInteger (J# s1 d1) (S# b)
           (# s3, d3, s4, d4 #) -> let !q = smartJ# s3 d3
                                       !r = smartJ# s4 d4
                                   in (# q, r #)
-#else
--- temporary workaround on 32bit due to #8661
-quotRemInteger i1@(J# _ _) i2@(S# _) = quotRemInteger i1 (toBig i2)
-#endif
 quotRemInteger i1@(S# _) i2@(J# _ _) = quotRemInteger (toBig i1) i2
 quotRemInteger (J# s1 d1) (J# s2 d2)
   = case (quotRemInteger# s1 d1 s2 d2) of
diff --git a/cbits/gmp-wrappers.cmm b/cbits/gmp-wrappers.cmm
index 47de995..2c9bbd2 100644
--- a/cbits/gmp-wrappers.cmm
+++ b/cbits/gmp-wrappers.cmm
@@ -492,7 +492,7 @@ again:                                                                  \
 }
 
 #define GMP_TAKE1_UL1_RET2(name,mp_fun)                                 \
-name (W_ ws1, P_ d1, W_ wul2, P_ d2)                                    \
+name (W_ ws1, P_ d1, W_ wul2)                                           \
 {                                                                       \
   W_ mp_tmp1;                                                           \
   W_ mp_result1;                                                        \



More information about the ghc-commits mailing list