summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2005-06-02 12:38:15 +0200
committertege <tege@gmplib.org>2005-06-02 12:38:15 +0200
commitc0206c96fde998f25cbc2fb3952b6a030e21ec8f (patch)
tree2ea794877204ad6cb800c08edb510c8ead3832d2 /tests
parent873c49b3f9bcdfaf26ff9bef1644a43f52a1f7d0 (diff)
downloadgmp-c0206c96fde998f25cbc2fb3952b6a030e21ec8f.tar.gz
(refmpn_divmod_1c_workaround): Implement workaround
to gcc 3.4.x bug triggered on powerpc64 with 32-bit ABI.
Diffstat (limited to 'tests')
-rw-r--r--tests/refmpn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/refmpn.c b/tests/refmpn.c
index 0dbc9a58d..2abe0db63 100644
--- a/tests/refmpn.c
+++ b/tests/refmpn.c
@@ -1105,12 +1105,13 @@ refmpn_divmod_1c_workaround (mp_ptr rp, mp_srcptr sp, mp_size_t size,
mp_limb_t divisor, mp_limb_t carry)
{
mp_size_t i;
+ mp_limb_t rem[1];
for (i = size-1; i >= 0; i--)
{
- rp[i] = refmpn_udiv_qrnnd (&carry, carry,
+ rp[i] = refmpn_udiv_qrnnd (rem, carry,
sp[i] << GMP_NAIL_BITS,
divisor << GMP_NAIL_BITS);
- carry >>= GMP_NAIL_BITS;
+ carry = *rem >> GMP_NAIL_BITS;
}
return carry;
}
@@ -1734,6 +1735,7 @@ refmpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn,
}
}
+
size_t
refmpn_get_str (unsigned char *dst, int base, mp_ptr src, mp_size_t size)
{