summaryrefslogtreecommitdiff
path: root/gmp/tests/mpn/t-aors_1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gmp/tests/mpn/t-aors_1.c')
-rw-r--r--gmp/tests/mpn/t-aors_1.c71
1 files changed, 14 insertions, 57 deletions
diff --git a/gmp/tests/mpn/t-aors_1.c b/gmp/tests/mpn/t-aors_1.c
index 6a946f2d57..a1878bb845 100644
--- a/gmp/tests/mpn/t-aors_1.c
+++ b/gmp/tests/mpn/t-aors_1.c
@@ -2,20 +2,20 @@
Copyright 2001, 2002 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>
@@ -48,8 +48,9 @@ the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
got, data[i].want, data[i].size); \
} while (0)
-typedef mp_limb_t (*mpn_aors_1_t) (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
-mpn_aors_1_t fudge (mpn_aors_1_t);
+typedef mp_limb_t (*mpn_aors_1_t)
+ __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t));
+mpn_aors_1_t fudge __GMP_PROTO ((mpn_aors_1_t));
void
@@ -133,8 +134,6 @@ check_add_1 (void)
mp_limb_t got[ASIZE];
mp_limb_t got_c;
- /* mpn_sec_add_a_itch(n) <= n */
- mp_limb_t scratch[ASIZE];
int i;
for (i = 0; i < numberof (data); i++)
@@ -147,16 +146,6 @@ check_add_1 (void)
got_c = mpn_add_1 (got, got, data[i].size, data[i].n);
VERIFY ("check_add_1 (in-place)");
- SETUP ();
- scratch [mpn_sec_add_1_itch(data[i].size)] = MAGIC;
- got_c = mpn_sec_add_1 (got, data[i].src, data[i].size, data[i].n, scratch);
- got_c ^= scratch [mpn_sec_add_1_itch(data[i].size)] ^ MAGIC;
- VERIFY ("check_sec_add_1 (separate)");
-
- SETUP_INPLACE ();
- got_c = mpn_sec_add_1 (got, got, data[i].size, data[i].n, scratch);
- VERIFY ("check_sec_add_1 (in-place)");
-
if (data[i].n == 1)
{
SETUP ();
@@ -166,16 +155,6 @@ check_add_1 (void)
SETUP_INPLACE ();
got_c = mpn_add_1 (got, got, data[i].size, CNST_LIMB(1));
VERIFY ("check_add_1 (in-place, const 1)");
-
- SETUP ();
- got_c = mpn_sec_add_1 (got, data[i].src, data[i].size,
- CNST_LIMB(1), scratch);
- VERIFY ("check_sec_add_1 (separate, const 1)");
-
- SETUP_INPLACE ();
- got_c = mpn_sec_add_1 (got, got, data[i].size,
- CNST_LIMB(1), scratch);
- VERIFY ("check_sec_add_1 (in-place, const 1)");
}
/* Same again on functions, not inlines. */
@@ -234,8 +213,6 @@ check_sub_1 (void)
mp_limb_t got[ASIZE];
mp_limb_t got_c;
- /* mpn_sec_sub_1_itch(n) <= n */
- mp_limb_t scratch[ASIZE];
int i;
for (i = 0; i < numberof (data); i++)
@@ -248,16 +225,6 @@ check_sub_1 (void)
got_c = mpn_sub_1 (got, got, data[i].size, data[i].n);
VERIFY ("check_sub_1 (in-place)");
- SETUP ();
- scratch [mpn_sec_sub_1_itch(data[i].size)] = MAGIC;
- got_c = mpn_sec_sub_1 (got, data[i].src, data[i].size, data[i].n, scratch);
- got_c ^= scratch [mpn_sec_sub_1_itch(data[i].size)] ^ MAGIC;
- VERIFY ("check_sec_sub_1 (separate)");
-
- SETUP_INPLACE ();
- got_c = mpn_sec_sub_1 (got, got, data[i].size, data[i].n, scratch);
- VERIFY ("check_sec_sub_1 (in-place)");
-
if (data[i].n == 1)
{
SETUP ();
@@ -267,16 +234,6 @@ check_sub_1 (void)
SETUP_INPLACE ();
got_c = mpn_sub_1 (got, got, data[i].size, CNST_LIMB(1));
VERIFY ("check_sub_1 (in-place, const 1)");
-
- SETUP ();
- got_c = mpn_sec_sub_1 (got, data[i].src, data[i].size,
- CNST_LIMB(1), scratch);
- VERIFY ("check_sec_sub_1 (separate, const 1)");
-
- SETUP_INPLACE ();
- got_c = mpn_sec_sub_1 (got, got, data[i].size,
- CNST_LIMB(1), scratch);
- VERIFY ("check_sec_sub_1 (in-place, const 1)");
}
/* Same again on functions, not inlines. */