[Gmp-commit] /var/hg/gmp: 9 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Mon Nov 28 23:13:42 CET 2011
details: /var/hg/gmp/rev/44f05d94560b
changeset: 14483:44f05d94560b
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 16:35:07 2011 +0100
description:
Use CNST_LIMB for some constants.
details: /var/hg/gmp/rev/b96cacfb5852
changeset: 14484:b96cacfb5852
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 18:53:54 2011 +0100
description:
Changes to support non-standard ABIs in a coherent way.
details: /var/hg/gmp/rev/0dcf85460baf
changeset: 14485:0dcf85460baf
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 18:54:52 2011 +0100
description:
(ABI_SUPPORT): New dummy macro.
details: /var/hg/gmp/rev/2fe2255bbb59
changeset: 14486:2fe2255bbb59
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:06:35 2011 +0100
description:
More DOS64 configure changes.
details: /var/hg/gmp/rev/9aa8cd13980f
changeset: 14487:9aa8cd13980f
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:06:51 2011 +0100
description:
New file.
details: /var/hg/gmp/rev/db721aaf36cd
changeset: 14488:db721aaf36cd
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:08:16 2011 +0100
description:
(DOS64_ENTRY, DOS64_EXIT): New, empty defs.
details: /var/hg/gmp/rev/732b3bfbe920
changeset: 14489:732b3bfbe920
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:09:54 2011 +0100
description:
Retune.
details: /var/hg/gmp/rev/5baa22a3f067
changeset: 14490:5baa22a3f067
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:11:55 2011 +0100
description:
Retune.
details: /var/hg/gmp/rev/65f1cca395a8
changeset: 14491:65f1cca395a8
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Nov 28 23:13:37 2011 +0100
description:
Support ABI DOS64.
diffstat:
configure.in | 21 ++++++-
mpn/asm-defs.m4 | 16 +++++
mpn/generic/udiv_w_sdiv.c | 6 +-
mpn/ia64/gmp-mparam.h | 16 +++--
mpn/s390_32/esame/gmp-mparam.h | 84 +++++++++++++++--------------
mpn/s390_64/gmp-mparam.h | 8 +-
mpn/x86/bobcat/gmp-mparam.h | 113 ++++++++++++++++++++--------------------
mpn/x86_64/aorsmul_1.asm | 51 +++++++++++++----
mpn/x86_64/dos64.m4 | 39 ++++++++++++++
mpn/x86_64/gmp-mparam.h | 2 +-
mpn/x86_64/mul_1.asm | 55 +++++++++++++++----
mpn/x86_64/mul_basecase.asm | 14 +++++
mpn/x86_64/sqr_basecase.asm | 17 +++++-
mpn/x86_64/x86_64-defs.m4 | 7 +-
14 files changed, 304 insertions(+), 145 deletions(-)
diffs (truncated from 830 to 300 lines):
diff -r 9f9c17ed7d40 -r 65f1cca395a8 configure.in
--- a/configure.in Sat Nov 26 10:57:47 2011 +0100
+++ b/configure.in Mon Nov 28 23:13:37 2011 +0100
@@ -1640,10 +1640,10 @@
;;
*-*-mingw* | *-*-cygwin)
limb_64=longlong
- path_64="" # Windows amd64 calling conventions are *different*
- extra_functions_64=""
- # Silence many pedantic warnings for w64. FIXME.
- gcc_64_cflags="$gcc_cflags -std=gnu99"
+ extra_functions_64="" # FIXME: remove when invert_limb is ported
+ CALLING_CONVENTIONS_OBJS_64=""
+ AC_DEFINE(HOST_DOS64,1,[Define to 1 for Windos/64])
+ AC_SUBST(GMP_NONSTD_ABI,DOS64)
;;
esac
;;
@@ -3061,6 +3061,17 @@
esac
fi
+ # If the host uses a non-standard ABI, check if tmp_file supports it
+ #
+ if test -n "$GMP_NONSTD_ABI" && test $tmp_dir != generic; then
+ abi=[`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file `]
+ if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then
+ true
+ else
+ continue
+ fi
+ fi
+
found=yes
eval found_$tmp_ext=yes
@@ -3344,6 +3355,8 @@
case $host in
*-*-darwin*)
GMP_INCLUDE_MPN(x86_64/darwin.m4) ;;
+ *-*-mingw* | *-*-cygwin)
+ GMP_INCLUDE_MPN(x86_64/dos64.m4) ;;
esac
;;
esac
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/asm-defs.m4
--- a/mpn/asm-defs.m4 Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/asm-defs.m4 Mon Nov 28 23:13:37 2011 +0100
@@ -1713,6 +1713,22 @@
)
+dnl Usage: ABI_SUPPORT(abi)
+dnl
+dnl A dummy macro which is grepped for by ./configure to know what ABIs
+dnl are supported in an asm file.
+dnl
+dnl If multiple non-standard ABIs are supported, several ABI_SUPPORT
+dnl declarations should be used:
+dnl
+dnl ABI_SUPPORT(FOOABI)
+dnl ABI_SUPPORT(BARABI)
+
+define(ABI_SUPPORT,
+m4_assert_numargs(1)
+)
+
+
dnl Usage: GMP_NUMB_MASK
dnl
dnl A bit mask for the number part of a limb. Eg. with 6 bit nails in a
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/generic/udiv_w_sdiv.c
--- a/mpn/generic/udiv_w_sdiv.c Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/generic/udiv_w_sdiv.c Mon Nov 28 23:13:37 2011 +0100
@@ -9,7 +9,7 @@
GNU MP RELEASE.
-Copyright 1992, 1994, 1996, 2000 Free Software Foundation, Inc.
+Copyright 1992, 1994, 1996, 2000, 2011 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -116,12 +116,12 @@
{ /* Hence a1 = d - 1 = 2*b1 - 1 */
if (a0 >= -d)
{
- q = -1;
+ q = -CNST_LIMB(1);
r = a0 + d;
}
else
{
- q = -2;
+ q = -CNST_LIMB(2);
r = a0 + 2*d;
}
}
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/ia64/gmp-mparam.h
--- a/mpn/ia64/gmp-mparam.h Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/ia64/gmp-mparam.h Mon Nov 28 23:13:37 2011 +0100
@@ -26,10 +26,10 @@
#define MOD_1_1P_METHOD 2
#define MOD_1_NORM_THRESHOLD 0 /* always */
#define MOD_1_UNNORM_THRESHOLD 0 /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD 3
-#define MOD_1U_TO_MOD_1_1_THRESHOLD 8
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */
-#define MOD_1_2_TO_MOD_1_4_THRESHOLD 21
+#define MOD_1N_TO_MOD_1_1_THRESHOLD 4
+#define MOD_1U_TO_MOD_1_1_THRESHOLD 5
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD 26
+#define MOD_1_2_TO_MOD_1_4_THRESHOLD 0 /* never mpn_mod_1s_2p */
#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 10
#define USE_PREINV_DIVREM_1 1 /* native */
#define DIV_QR_2_PI2_THRESHOLD 12
@@ -54,6 +54,8 @@
#define SQR_TOOM6_THRESHOLD 0 /* always */
#define SQR_TOOM8_THRESHOLD 0 /* always */
+#define MULMID_TOOM42_THRESHOLD 98
+
#define MULMOD_BNM1_THRESHOLD 23
#define SQRMOD_BNM1_THRESHOLD 28
@@ -171,9 +173,9 @@
#define MATRIX22_STRASSEN_THRESHOLD 23
#define HGCD_THRESHOLD 117
-#define HGCD_APPR_THRESHOLD 50
-#define HGCD_REDUCE_THRESHOLD 3389
-#define GCD_DC_THRESHOLD 496
+#define HGCD_APPR_THRESHOLD 111
+#define HGCD_REDUCE_THRESHOLD 3014
+#define GCD_DC_THRESHOLD 555
#define GCDEXT_DC_THRESHOLD 368
#define JACOBI_BASE_METHOD 4
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/s390_32/esame/gmp-mparam.h
--- a/mpn/s390_32/esame/gmp-mparam.h Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/s390_32/esame/gmp-mparam.h Mon Nov 28 23:13:37 2011 +0100
@@ -24,43 +24,45 @@
/* 1200 MHz IBM z990 running in 32-bit mode */
#define DIVREM_1_NORM_THRESHOLD 0 /* always */
-#define DIVREM_1_UNNORM_THRESHOLD 3
-#define MOD_1_1P_METHOD 1
+#define DIVREM_1_UNNORM_THRESHOLD 4
+#define MOD_1_1P_METHOD 2
#define MOD_1_NORM_THRESHOLD 0 /* always */
#define MOD_1_UNNORM_THRESHOLD 3
-#define MOD_1N_TO_MOD_1_1_THRESHOLD 12
-#define MOD_1U_TO_MOD_1_1_THRESHOLD 7
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD 15
-#define MOD_1_2_TO_MOD_1_4_THRESHOLD 0 /* never mpn_mod_1s_2p */
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 21
+#define MOD_1N_TO_MOD_1_1_THRESHOLD 17
+#define MOD_1U_TO_MOD_1_1_THRESHOLD 8
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */
+#define MOD_1_2_TO_MOD_1_4_THRESHOLD 34
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 42
#define USE_PREINV_DIVREM_1 1
#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */
#define DIVEXACT_1_THRESHOLD 0 /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD 50
+#define BMOD_1_TO_MOD_1_THRESHOLD 30
#define MUL_TOOM22_THRESHOLD 16
-#define MUL_TOOM33_THRESHOLD 66
-#define MUL_TOOM44_THRESHOLD 169
-#define MUL_TOOM6H_THRESHOLD 369
-#define MUL_TOOM8H_THRESHOLD 517
+#define MUL_TOOM33_THRESHOLD 57
+#define MUL_TOOM44_THRESHOLD 147
+#define MUL_TOOM6H_THRESHOLD 226
+#define MUL_TOOM8H_THRESHOLD 333
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD 106
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD 114
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114
-#define MUL_TOOM42_TO_TOOM63_THRESHOLD 187
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD 65
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD 100
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD 97
+#define MUL_TOOM42_TO_TOOM63_THRESHOLD 102
#define SQR_BASECASE_THRESHOLD 0 /* always (native) */
-#define SQR_TOOM2_THRESHOLD 28
-#define SQR_TOOM3_THRESHOLD 93
-#define SQR_TOOM4_THRESHOLD 387
-#define SQR_TOOM6_THRESHOLD 552
-#define SQR_TOOM8_THRESHOLD 0 /* always */
+#define SQR_TOOM2_THRESHOLD 26
+#define SQR_TOOM3_THRESHOLD 81
+#define SQR_TOOM4_THRESHOLD 154
+#define SQR_TOOM6_THRESHOLD 318
+#define SQR_TOOM8_THRESHOLD 478
#define MULMID_TOOM42_THRESHOLD 38
#define MULMOD_BNM1_THRESHOLD 13
#define SQRMOD_BNM1_THRESHOLD 15
+#define POWM_SEC_TABLE 4,23,262,892,2500
+
#define MUL_FFT_MODF_THRESHOLD 336 /* k = 5 */
#define MUL_FFT_TABLE3 \
{ { 336, 5}, { 19, 6}, { 11, 5}, { 23, 6}, \
@@ -91,37 +93,37 @@
#define SQR_FFT_TABLE3_SIZE 35
#define SQR_FFT_THRESHOLD 2368
-#define MULLO_BASECASE_THRESHOLD 6
-#define MULLO_DC_THRESHOLD 45
+#define MULLO_BASECASE_THRESHOLD 5
+#define MULLO_DC_THRESHOLD 49
#define MULLO_MUL_N_THRESHOLD 5397
-#define DC_DIV_QR_THRESHOLD 40
-#define DC_DIVAPPR_Q_THRESHOLD 152
+#define DC_DIV_QR_THRESHOLD 42
+#define DC_DIVAPPR_Q_THRESHOLD 146
#define DC_BDIV_QR_THRESHOLD 51
-#define DC_BDIV_Q_THRESHOLD 136
+#define DC_BDIV_Q_THRESHOLD 124
#define INV_MULMOD_BNM1_THRESHOLD 46
-#define INV_NEWTON_THRESHOLD 197
-#define INV_APPR_THRESHOLD 157
+#define INV_NEWTON_THRESHOLD 179
+#define INV_APPR_THRESHOLD 153
-#define BINV_NEWTON_THRESHOLD 114
+#define BINV_NEWTON_THRESHOLD 214
#define REDC_1_TO_REDC_N_THRESHOLD 55
-#define MU_DIV_QR_THRESHOLD 1210
-#define MU_DIVAPPR_Q_THRESHOLD 1334
-#define MUPI_DIV_QR_THRESHOLD 81
-#define MU_BDIV_QR_THRESHOLD 942
-#define MU_BDIV_Q_THRESHOLD 1258
+#define MU_DIV_QR_THRESHOLD 1078
+#define MU_DIVAPPR_Q_THRESHOLD 1078
+#define MUPI_DIV_QR_THRESHOLD 74
+#define MU_BDIV_QR_THRESHOLD 872
+#define MU_BDIV_Q_THRESHOLD 1078
-#define MATRIX22_STRASSEN_THRESHOLD 17
-#define HGCD_THRESHOLD 104
-#define GCD_DC_THRESHOLD 278
+#define MATRIX22_STRASSEN_THRESHOLD 14
+#define HGCD_THRESHOLD 90
+#define HGCD_APPR_THRESHOLD 111
+#define HGCD_REDUCE_THRESHOLD 1962
+#define GCD_DC_THRESHOLD 225
#define GCDEXT_DC_THRESHOLD 217
#define JACOBI_BASE_METHOD 2
-#define GET_STR_DC_THRESHOLD 16
-#define GET_STR_PRECOMPUTE_THRESHOLD 30
+#define GET_STR_DC_THRESHOLD 13
+#define GET_STR_PRECOMPUTE_THRESHOLD 27
#define SET_STR_DC_THRESHOLD 274
#define SET_STR_PRECOMPUTE_THRESHOLD 824
-
-/* Tuneup completed successfully, took 108 seconds */
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/s390_64/gmp-mparam.h
--- a/mpn/s390_64/gmp-mparam.h Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/s390_64/gmp-mparam.h Mon Nov 28 23:13:37 2011 +0100
@@ -28,19 +28,19 @@
#define MOD_1_1P_METHOD 2
#define MOD_1_NORM_THRESHOLD 0 /* always */
#define MOD_1_UNNORM_THRESHOLD 0 /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD 9
+#define MOD_1N_TO_MOD_1_1_THRESHOLD 8
#define MOD_1U_TO_MOD_1_1_THRESHOLD 5
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD 58
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD 38
#define MOD_1_2_TO_MOD_1_4_THRESHOLD 0
#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 19
#define USE_PREINV_DIVREM_1 1
#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */
#define DIVEXACT_1_THRESHOLD 0 /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD 47
+#define BMOD_1_TO_MOD_1_THRESHOLD 88
#define MUL_TOOM22_THRESHOLD 10
#define MUL_TOOM33_THRESHOLD 41
-#define MUL_TOOM44_THRESHOLD 99
+#define MUL_TOOM44_THRESHOLD 104
#define MUL_TOOM6H_THRESHOLD 149
#define MUL_TOOM8H_THRESHOLD 212
diff -r 9f9c17ed7d40 -r 65f1cca395a8 mpn/x86/bobcat/gmp-mparam.h
--- a/mpn/x86/bobcat/gmp-mparam.h Sat Nov 26 10:57:47 2011 +0100
+++ b/mpn/x86/bobcat/gmp-mparam.h Mon Nov 28 23:13:37 2011 +0100
@@ -25,30 +25,30 @@
#define MOD_1_NORM_THRESHOLD 0 /* always */
#define MOD_1_UNNORM_THRESHOLD 0 /* always */
More information about the gmp-commit
mailing list