diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-05-27 17:39:31 +0100 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-05-27 17:53:32 +0100 |
commit | 26c75cf8267919f81a1759c9c965a52c660233f9 (patch) | |
tree | cf2a39cf56c2c8ac45760854413ab233e6263974 /gmp/tests/refmpf.c | |
parent | 56892c1d217baea02092b51a09bbc924130ca84c (diff) | |
download | gcc-tarball-baserock/pedroalvarez/gcc-5.3.0-gmp432.tar.gz |
go to gmp 4.3.2baserock/pedroalvarez/gcc-5.3.0-gmp432
Diffstat (limited to 'gmp/tests/refmpf.c')
-rw-r--r-- | gmp/tests/refmpf.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gmp/tests/refmpf.c b/gmp/tests/refmpf.c index 0ba9fbca3a..90ca598321 100644 --- a/gmp/tests/refmpf.c +++ b/gmp/tests/refmpf.c @@ -2,20 +2,20 @@ Copyright 1996, 2001, 2004, 2005 Free Software Foundation, Inc. -This file is part of the GNU MP Library test suite. +This file is part of the GNU MP Library. -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <stdio.h> #include <stdlib.h> @@ -40,7 +40,7 @@ refmpf_add (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) if (SIZ (u) == 0) { size = ABSIZ (v); - wt = TMP_ALLOC_LIMBS (size + 1); + wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); MPN_COPY (wt, PTR (v), size); exp = EXP (v); neg = SIZ (v) < 0; @@ -49,7 +49,7 @@ refmpf_add (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) if (SIZ (v) == 0) { size = ABSIZ (u); - wt = TMP_ALLOC_LIMBS (size + 1); + wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); MPN_COPY (wt, PTR (u), size); exp = EXP (u); neg = SIZ (u) < 0; @@ -70,9 +70,9 @@ refmpf_add (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) hi = MAX (EXP (u), EXP (v)); lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); size = hi - lo; - ut = TMP_ALLOC_LIMBS (size + 1); - vt = TMP_ALLOC_LIMBS (size + 1); - wt = TMP_ALLOC_LIMBS (size + 1); + ut = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + vt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + wt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); MPN_ZERO (ut, size); MPN_ZERO (vt, size); {int off; @@ -211,7 +211,7 @@ refmpf_sub (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) if (SIZ (u) == 0) { size = ABSIZ (v); - wt = TMP_ALLOC_LIMBS (size + 1); + wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); MPN_COPY (wt, PTR (v), size); exp = EXP (v); neg = SIZ (v) > 0; @@ -220,7 +220,7 @@ refmpf_sub (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) if (SIZ (v) == 0) { size = ABSIZ (u); - wt = TMP_ALLOC_LIMBS (size + 1); + wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); MPN_COPY (wt, PTR (u), size); exp = EXP (u); neg = SIZ (u) < 0; @@ -243,9 +243,9 @@ refmpf_sub (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) hi = MAX (EXP (u), EXP (v)); lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); size = hi - lo; - ut = TMP_ALLOC_LIMBS (size + 1); - vt = TMP_ALLOC_LIMBS (size + 1); - wt = TMP_ALLOC_LIMBS (size + 1); + ut = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + vt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + wt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); MPN_ZERO (ut, size); MPN_ZERO (vt, size); {int off; |