diff options
author | Alexey Neyman <stilor@att.net> | 2017-07-13 07:38:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 07:38:03 (GMT) |
commit | 45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch) | |
tree | 8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/gmp/5.1.1/110-mpz_powm_ui.patch | |
parent | 8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff) | |
parent | b32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff) |
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/gmp/5.1.1/110-mpz_powm_ui.patch')
-rw-r--r-- | packages/gmp/5.1.1/110-mpz_powm_ui.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/gmp/5.1.1/110-mpz_powm_ui.patch b/packages/gmp/5.1.1/110-mpz_powm_ui.patch new file mode 100644 index 0000000..f0d240c --- /dev/null +++ b/packages/gmp/5.1.1/110-mpz_powm_ui.patch @@ -0,0 +1,39 @@ + +# HG changeset patch +# User Torbjorn Granlund <tege@gmplib.org> +# Date 1363174284 -3600 +# Node ID ec4d88674036804b26f22c6a2bfca6ae1e92d370 +# Parent e616ff715c34e112d0a5f7535d31ffe1194a5c7d +(mod): Adhere to mpn_mu_div_qr's overlap requirements. + +diff -r e616ff715c34 -r ec4d88674036 mpz/powm_ui.c +--- a/mpz/powm_ui.c Sun Feb 17 19:40:16 2013 +0100 ++++ b/mpz/powm_ui.c Wed Mar 13 12:31:24 2013 +0100 +@@ -2,8 +2,8 @@ + + Contributed to the GNU project by Torbjorn Granlund. + +-Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, +-2009, 2011, 2012 Free Software Foundation, Inc. ++Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009, ++2011, 2012, 2013 Free Software Foundation, Inc. + + This file is part of the GNU MP Library. + +@@ -70,9 +70,14 @@ + } + else + { ++ /* We need to allocate separate remainder area, since mpn_mu_div_qr does ++ not handle overlap between the numerator and remainder areas. ++ FIXME: Make it handle such overlap. */ ++ mp_ptr rp = TMP_ALLOC_LIMBS (dn); + mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); +- mpn_mu_div_qr (qp, np, np, nn, dp, dn, scratch); ++ mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch); ++ MPN_COPY (np, rp, dn); + } + + TMP_FREE; + |