diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-07-13 02:17:51 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-07-13 02:17:51 +0200 |
commit | 66651969a5127854ba91204e827a0c8ecbb7e98e (patch) | |
tree | c97e0151557604e1266435eea5fefd66a8db9410 /tune | |
parent | 47cde6ba3e904f5c5c625d0c27be23c76b795e5c (diff) | |
download | gmp-66651969a5127854ba91204e827a0c8ecbb7e98e.tar.gz |
* tune/tuneup.c (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD):
Always zero for native mpn_divexact_1, mpn_modexact_1_odd.
Diffstat (limited to 'tune')
-rw-r--r-- | tune/tuneup.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tune/tuneup.c b/tune/tuneup.c index 4d8684bb9..8d07e82ce 100644 --- a/tune/tuneup.c +++ b/tune/tuneup.c @@ -204,6 +204,9 @@ struct param_t { #ifndef UDIV_PREINV_ALWAYS #define UDIV_PREINV_ALWAYS 0 #endif +#ifndef HAVE_NATIVE_mpn_divexact_1 +#define HAVE_NATIVE_mpn_divexact_1 0 +#endif #ifndef HAVE_NATIVE_mpn_divrem_1 #define HAVE_NATIVE_mpn_divrem_1 0 #endif @@ -213,6 +216,9 @@ struct param_t { #ifndef HAVE_NATIVE_mpn_mod_1 #define HAVE_NATIVE_mpn_mod_1 0 #endif +#ifndef HAVE_NATIVE_mpn_modexact_1_odd +#define HAVE_NATIVE_mpn_modexact_1_odd 0 +#endif #ifndef HAVE_NATIVE_mpn_preinv_divrem_1 #define HAVE_NATIVE_mpn_preinv_divrem_1 0 #endif @@ -843,7 +849,7 @@ tune_sqr (void) if (HAVE_NATIVE_mpn_sqr_basecase) { - print_define_remark ("SQR_BASECASE_THRESHOLD", 0, "native"); + print_define_remark ("SQR_BASECASE_THRESHOLD", 0, "always (native)"); sqr_basecase_threshold = 0; } else @@ -1325,6 +1331,14 @@ tune_divexact_1 (void) mp_size_t thresh[2], average; int low, i; + /* Any native mpn_divexact_1 is assumed to incorporate all the speed of a + full mpn_divrem_1. */ + if (HAVE_NATIVE_mpn_divexact_1) + { + print_define_remark ("DIVEXACT_1_THRESHOLD", 0, "always (native)"); + return; + } + ASSERT_ALWAYS (tuned_speed_mpn_divrem_1 != NULL); param.name = "DIVEXACT_1_THRESHOLD"; @@ -1394,6 +1408,14 @@ tune_modexact_1_odd (void) static struct param_t param; mp_size_t thresh_lt, thresh_ge, average; + /* Any native mpn_modexact_1_odd is assumed to incorporate all the speed + of a full mpn_mod_1. */ + if (HAVE_NATIVE_mpn_modexact_1_odd) + { + print_define_remark ("MODEXACT_1_ODD_THRESHOLD", 0, "always (native)"); + return; + } + ASSERT_ALWAYS (tuned_speed_mpn_mod_1 != NULL); param.name = "MODEXACT_1_ODD_THRESHOLD"; |