[Gmp-commit] /home/hgfiles/gmp: (mpn_pi1_bdiv_q_1): Renamed from mpn_bdiv_q_1...
mercurial at gmplib.org
mercurial at gmplib.org
Mon Dec 21 14:19:45 CET 2009
details: /home/hgfiles/gmp/rev/70e317dd1272
changeset: 13153:70e317dd1272
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Dec 21 14:19:38 2009 +0100
description:
(mpn_pi1_bdiv_q_1): Renamed from mpn_bdiv_q_1_pi1.
diffstat:
ChangeLog | 4 ++++
configure.in | 2 +-
gmp-impl.h | 4 ++--
mpn/asm-defs.m4 | 2 +-
mpn/generic/bdiv_q_1.c | 6 +++---
mpn/generic/perfpow.c | 2 +-
mpn/generic/toom_interpolate_6pts.c | 4 ++--
mpn/generic/toom_interpolate_7pts.c | 18 +++++++++---------
mpn/generic/toom_interpolate_8pts.c | 8 ++++----
mpn/x86_64/bdiv_q_1.asm | 8 ++++----
tune/common.c | 4 ++--
tune/speed.c | 2 +-
tune/speed.h | 8 ++++----
13 files changed, 38 insertions(+), 34 deletions(-)
diffs (259 lines):
diff -r eb3bb81bfd31 -r 70e317dd1272 ChangeLog
--- a/ChangeLog Mon Dec 21 11:32:13 2009 +0100
+++ b/ChangeLog Mon Dec 21 14:19:38 2009 +0100
@@ -1,5 +1,9 @@
2009-12-21 Torbjorn Granlund <tege at gmplib.org>
+ * mpn/generic/bdiv_q_1.c (mpn_pi1_bdiv_q_1): Renamed from
+ mpn_bdiv_q_1_pi1.
+ * All references changed.
+
* configure.in: Add --enable-old-fft-full.
* tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on
WANT_OLD_FFT_FULL.
diff -r eb3bb81bfd31 -r 70e317dd1272 configure.in
--- a/configure.in Mon Dec 21 11:32:13 2009 +0100
+++ b/configure.in Mon Dec 21 14:19:38 2009 +0100
@@ -2994,7 +2994,7 @@
#undef HAVE_NATIVE_mpn_andn_n
#undef HAVE_NATIVE_mpn_bdiv_dbm1c
#undef HAVE_NATIVE_mpn_bdiv_q_1
-#undef HAVE_NATIVE_mpn_bdiv_q_1_pi1
+#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1
#undef HAVE_NATIVE_mpn_com_n
#undef HAVE_NATIVE_mpn_copyd
#undef HAVE_NATIVE_mpn_copyi
diff -r eb3bb81bfd31 -r 70e317dd1272 gmp-impl.h
--- a/gmp-impl.h Mon Dec 21 11:32:13 2009 +0100
+++ b/gmp-impl.h Mon Dec 21 14:19:38 2009 +0100
@@ -1203,8 +1203,8 @@
#define mpn_bdiv_q_1 __MPN(bdiv_q_1)
__GMP_DECLSPEC mp_limb_t mpn_bdiv_q_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t));
-#define mpn_bdiv_q_1_pi1 __MPN(bdiv_q_1_pi1)
-__GMP_DECLSPEC mp_limb_t mpn_bdiv_q_1_pi1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int));
+#define mpn_pi1_bdiv_q_1 __MPN(pi1_bdiv_q_1)
+__GMP_DECLSPEC mp_limb_t mpn_pi1_bdiv_q_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int));
#define mpn_sbpi1_bdiv_qr __MPN(sbpi1_bdiv_qr)
__GMP_DECLSPEC mp_limb_t mpn_sbpi1_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t));
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/asm-defs.m4
--- a/mpn/asm-defs.m4 Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/asm-defs.m4 Mon Dec 21 14:19:38 2009 +0100
@@ -1322,7 +1322,7 @@
define_mpn(and_n)
define_mpn(andn_n)
define_mpn(bdiv_q_1)
-define_mpn(bdiv_q_1_pi1)
+define_mpn(pi1_bdiv_q_1)
define_mpn(bdiv_dbm1c)
define_mpn(bdivmod)
define_mpn(cmp)
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/generic/bdiv_q_1.c
--- a/mpn/generic/bdiv_q_1.c Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/generic/bdiv_q_1.c Mon Dec 21 14:19:38 2009 +0100
@@ -1,4 +1,4 @@
-/* mpn_bdiv_q_1, mpn_bdiv_q_1_pi1 -- schoolbook Hensel division by 1-limb
+/* mpn_bdiv_q_1, mpn_pi1_bdiv_q_1 -- schoolbook Hensel division by 1-limb
divisor, returning quotient only.
THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST
@@ -27,7 +27,7 @@
#include "longlong.h"
mp_limb_t
-mpn_bdiv_q_1_pi1 (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_limb_t d,
+mpn_pi1_bdiv_q_1 (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_limb_t d,
mp_limb_t di, int shift)
{
mp_size_t i;
@@ -111,5 +111,5 @@
shift = 0;
binvert_limb (di, d);
- return mpn_bdiv_q_1_pi1 (rp, up, n, d, di, shift);
+ return mpn_pi1_bdiv_q_1 (rp, up, n, d, di, shift);
}
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/generic/perfpow.c
--- a/mpn/generic/perfpow.c Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/generic/perfpow.c Mon Dec 21 14:19:38 2009 +0100
@@ -136,7 +136,7 @@
mpn_mullo_n (rp, yp, tp2, bn);
mpn_sub_n (tp2, tp, rp, bn);
- mpn_bdiv_q_1_pi1 (rp, tp2, bn, k, di, 0);
+ mpn_pi1_bdiv_q_1 (rp, tp2, bn, k, di, 0);
if ((b % GMP_LIMB_BITS) != 0)
rp[(b - 1) / GMP_LIMB_BITS] &= (((mp_limb_t) 1) << (b % GMP_LIMB_BITS)) - 1;
}
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/generic/toom_interpolate_6pts.c
--- a/mpn/generic/toom_interpolate_6pts.c Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/generic/toom_interpolate_6pts.c Mon Dec 21 14:19:38 2009 +0100
@@ -28,8 +28,8 @@
/* For odd divisors, mpn_divexact_1 works fine with two's complement. */
#ifndef mpn_divexact_by3
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1 && MODLIMB_INVERSE_3
-#define mpn_divexact_by3(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,3,MODLIMB_INVERSE_3,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && MODLIMB_INVERSE_3
+#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,MODLIMB_INVERSE_3,0)
#else
#define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3)
#endif
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/generic/toom_interpolate_7pts.c
--- a/mpn/generic/toom_interpolate_7pts.c Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/generic/toom_interpolate_7pts.c Mon Dec 21 14:19:38 2009 +0100
@@ -36,31 +36,31 @@
((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15))
/* For the various mpn_divexact_byN here, fall back to using either
- mpn_bdiv_q_1_pi1 or mpn_divexact_1. The former has less overhead and is
+ mpn_pi1_bdiv_q_1 or mpn_divexact_1. The former has less overhead and is
many faster if it is native. For now, since mpn_divexact_1 is native on
- several platforms where mpn_bdiv_q_1_pi1 does not yet exist, do not use
- mpn_bdiv_q_1_pi1 unconditionally. FIXME. */
+ several platforms where mpn_pi1_bdiv_q_1 does not yet exist, do not use
+ mpn_pi1_bdiv_q_1 unconditionally. FIXME. */
/* For odd divisors, mpn_divexact_1 works fine with two's complement. */
#ifndef mpn_divexact_by3
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1
-#define mpn_divexact_by3(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,3,BINVERT_3,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,BINVERT_3,0)
#else
#define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3)
#endif
#endif
#ifndef mpn_divexact_by9
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1
-#define mpn_divexact_by9(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,9,BINVERT_9,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#define mpn_divexact_by9(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,9,BINVERT_9,0)
#else
#define mpn_divexact_by9(dst,src,size) mpn_divexact_1(dst,src,size,9)
#endif
#endif
#ifndef mpn_divexact_by15
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1
-#define mpn_divexact_by15(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,15,BINVERT_15,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#define mpn_divexact_by15(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,15,BINVERT_15,0)
#else
#define mpn_divexact_by15(dst,src,size) mpn_divexact_1(dst,src,size,15)
#endif
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/generic/toom_interpolate_8pts.c
--- a/mpn/generic/toom_interpolate_8pts.c Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/generic/toom_interpolate_8pts.c Mon Dec 21 14:19:38 2009 +0100
@@ -34,8 +34,8 @@
#define BINVERT_45 ((BINVERT_15 * BINVERT_3) & GMP_NUMB_MASK)
#ifndef mpn_divexact_by3
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1
-#define mpn_divexact_by3(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,3,BINVERT_3,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,BINVERT_3,0)
#else
#define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3)
#endif
@@ -46,8 +46,8 @@
#define mpn_divexact_by45(dst,src,size) \
(63 & 19 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 45)))
#else
-#if HAVE_NATIVE_mpn_bdiv_q_1_pi1
-#define mpn_divexact_by45(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,45,BINVERT_45,0)
+#if HAVE_NATIVE_mpn_pi1_bdiv_q_1
+#define mpn_divexact_by45(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,45,BINVERT_45,0)
#else
#define mpn_divexact_by45(dst,src,size) mpn_divexact_1(dst,src,size,45)
#endif
diff -r eb3bb81bfd31 -r 70e317dd1272 mpn/x86_64/bdiv_q_1.asm
--- a/mpn/x86_64/bdiv_q_1.asm Mon Dec 21 11:32:13 2009 +0100
+++ b/mpn/x86_64/bdiv_q_1.asm Mon Dec 21 14:19:38 2009 +0100
@@ -1,4 +1,4 @@
-dnl AMD64 mpn_bdiv_q_1, mpn_bdiv_q_1_pi1 -- schoolbook Hensel division by
+dnl AMD64 mpn_bdiv_q_1, mpn_pi1_bdiv_q_1 -- schoolbook Hensel division by
dnl 1-limb divisor, returning quotient only.
dnl Copyright 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation,
@@ -36,8 +36,8 @@
C up rsi
C n rdx
C d rcx
-C di r8 just mpn_bdiv_q_1_pi1
-C shift r9 just mpn_bdiv_q_1_pi1
+C di r8 just mpn_pi1_bdiv_q_1
+C shift r9 just mpn_pi1_bdiv_q_1
ASM_START()
@@ -89,7 +89,7 @@
jmp L(odd)
EPILOGUE()
-PROLOGUE(mpn_bdiv_q_1_pi1)
+PROLOGUE(mpn_pi1_bdiv_q_1)
push %rbx
mov %rcx, %r11 C d
diff -r eb3bb81bfd31 -r 70e317dd1272 tune/common.c
--- a/tune/common.c Mon Dec 21 11:32:13 2009 +0100
+++ b/tune/common.c Mon Dec 21 14:19:38 2009 +0100
@@ -700,9 +700,9 @@
}
double
-speed_mpn_bdiv_q_1_pi1 (struct speed_params *s)
+speed_mpn_pi1_bdiv_q_1 (struct speed_params *s)
{
- SPEED_ROUTINE_MPN_BDIV_Q_1_PI1 (mpn_bdiv_q_1_pi1);
+ SPEED_ROUTINE_MPN_PI1_BDIV_Q_1 (mpn_pi1_bdiv_q_1);
}
#if HAVE_NATIVE_mpn_modexact_1_odd
diff -r eb3bb81bfd31 -r 70e317dd1272 tune/speed.c
--- a/tune/speed.c Mon Dec 21 11:32:13 2009 +0100
+++ b/tune/speed.c Mon Dec 21 14:19:38 2009 +0100
@@ -221,7 +221,7 @@
{ "mpn_divexact_by3", speed_mpn_divexact_by3 },
{ "mpn_bdiv_q_1", speed_mpn_bdiv_q_1, FLAG_R_OPTIONAL },
- { "mpn_bdiv_q_1_pi1", speed_mpn_bdiv_q_1_pi1, FLAG_R_OPTIONAL },
+ { "mpn_pi1_bdiv_q_1", speed_mpn_pi1_bdiv_q_1, FLAG_R_OPTIONAL },
{ "mpn_bdiv_dbm1c", speed_mpn_bdiv_dbm1c, FLAG_R_OPTIONAL },
#if HAVE_NATIVE_mpn_modexact_1_odd
diff -r eb3bb81bfd31 -r 70e317dd1272 tune/speed.h
--- a/tune/speed.h Mon Dec 21 11:32:13 2009 +0100
+++ b/tune/speed.h Mon Dec 21 14:19:38 2009 +0100
@@ -169,7 +169,7 @@
double speed_mpn_divexact_1 __GMP_PROTO ((struct speed_params *s));
double speed_mpn_divexact_by3 __GMP_PROTO ((struct speed_params *s));
double speed_mpn_bdiv_q_1 __GMP_PROTO ((struct speed_params *));
-double speed_mpn_bdiv_q_1_pi1 __GMP_PROTO ((struct speed_params *));
+double speed_mpn_pi1_bdiv_q_1 __GMP_PROTO ((struct speed_params *));
double speed_mpn_bdiv_dbm1c __GMP_PROTO ((struct speed_params *s));
double speed_mpn_divrem_1 __GMP_PROTO ((struct speed_params *s));
double speed_mpn_divrem_1f __GMP_PROTO ((struct speed_params *s));
@@ -774,7 +774,7 @@
#define SPEED_ROUTINE_MPN_BDIV_Q_1(function) \
SPEED_ROUTINE_MPN_UNARY_1_CALL ((*function) (wp, s->xp, s->size, s->r))
-#define SPEED_ROUTINE_MPN_BDIV_Q_1_PI1_CALL(call) \
+#define SPEED_ROUTINE_MPN_PI1_BDIV_Q_1_CALL(call) \
{ \
unsigned shift; \
mp_limb_t dinv; \
@@ -787,8 +787,8 @@
\
SPEED_ROUTINE_MPN_UNARY_1_CALL (call); \
}
-#define SPEED_ROUTINE_MPN_BDIV_Q_1_PI1(function) \
- SPEED_ROUTINE_MPN_BDIV_Q_1_PI1_CALL \
+#define SPEED_ROUTINE_MPN_PI1_BDIV_Q_1(function) \
+ SPEED_ROUTINE_MPN_PI1_BDIV_Q_1_CALL \
((*function) (wp, s->xp, s->size, s->r, dinv, shift))
#define SPEED_ROUTINE_MPN_BDIV_DBM1C(function) \
More information about the gmp-commit
mailing list