Newer
Older
2017-07-23 Niels Möller <nisse@lysator.liu.se>
* longlong.h: Purge definitions of obsolete UMUL_TIME and
UDIV_TIME constants. Also mentioned (but unused) in
mpn/cray/gmp-mparam.h and tune/common.c.
2017-07-20 Torbjörn Granlund <tg@gmplib.org>
* gmp-impl.h (mpn_sbpi1_bdiv_r): Declare.
* mpn/asm-defs.m4 (define_mpn): Add sbpi1_bdiv_q, sbpi1_bdiv_qr,
sbpi1_bdiv_r.
* mpn/generic/sbpi1_bdiv_r.c: New file.
* mpn/x86_64/zen/sbpi1_bdiv_r.asm: New file.
2017-07-19 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86/p6/sse2/submul_1.asm: Get pentium4 code instead of k6 code
for better speed on modern Intel P6 cores.
2017-07-02 Torbjörn Granlund <tg@gmplib.org>
* tune/tuneup.c (tune_mullo): For MULLO_BASECASE_THRESHOLD start at 2.
(tune_sqrlo): Likewise.
2017-06-28 Torbjörn Granlund <tg@gmplib.org>
* tests/Makefile.am tests/*/Makefile.am tune/Makefile.am (AM_LDFLAGS):
Define. (Thanks to Emmanuel Thomé and Vincent Lefevre.)
2017-06-27 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/sqr_basecase.asm: Expand to use 4 addmul_1 loops.
* mpn/x86_64/x86_64-defs.m4 (sarx): New macro.
2017-06-26 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/coreibwl/sqr_basecase.asm: Rewrite to do 2x and limb
squaring in main loop.
2017-06-20 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/atom/cnd_add_n.asm: New grabber file.
* mpn/x86_64/atom/cnd_sub_n.asm: Likewise.
* mpn/x86_64/coreihwl/aorrlsh_n.asm: New grabber file.
2017-06-16 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/mul_basecase.asm: Do overlapped software pipelining.
* mpn/x86_64/silvermont/mul_basecase.asm: New grabber file.
* mpn/x86_64/silvermont/sqr_basecase.asm: Likewise.
* mpn/x86_64/silvermont/mullo_basecase.asm: Likewise.
2017-06-14 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/mullo_basecase.asm: New file.
* mpn/x86_64/coreibwl/mullo_basecase.asm: New file.
2017-06-11 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/popham.asm: Crossjump for code size and mix lead-in insns
for lower overhead.
2017-06-09 Torbjörn Granlund <tg@gmplib.org>
* configure.ac: Set GMP_NONSTD_ABI protecting against dots in the abi.
(hppa): Remove old GNU/Linux restriction to 32-bit ABI.
2017-06-07 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/bd1/addmul_2.asm: New file.
* mpn/x86_64/x86_64-defs.m4 (c4_helper): New macro.
(mulx, shlx, shrx): Use c4_helper.
* mpn/x86_64/zen/mul_basecase.asm: Use 8-bit imm operands for "test".
* mpn/x86_64/zen/aorrlsh1_n.asm: New grabber file.
* mpn/x86_64/zen/sublsh1_n.asm: Likewise.
* mpn/x86_64/zen/aorrlsh_n.asm: New file
2017-06-04 Torbjörn Granlund <tg@gmplib.org>
* configure.ac: Use bt1/bt2 for bobcat and jaguar dirs.
(fat_path): Add x86_64/bt2.
* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.
Make zen path correspond to non-fat path.
* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.
* mpn/x86_64/bt2/copyi.asm: New grabber file.
* mpn/x86_64/bt2/copyd.asm: New grabber file.
* mpn/x86_64/bt2/com.asm: New grabber file.
2017-06-03 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/bd1/popcount.asm: Expand some instructions as .byte
sequences.
* mpn/x86_64/bd1/hamdist.asm: Likewise.
2017-06-02 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Fix quoting (amends recent
change).
(JUMPTABSECT): Get rid of spurious "w".
2017-06-02 Marc Glisse <marc.glisse@inria.fr>
* gmpxx.h (mpf_class::operator bool): Use mpf_sgn to access _mp_size.
2017-06-02 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/bd1/popcount.asm: Use both SSE and XOP trickery, and
plain popcnt insn.
* mpn/x86_64/bd1/hamdist.asm: Likewise.
2017-06-01 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Allow 3rd argument defining
section, while making alignment argument non-optional.
* mpn/x86_64/core2/popcount.asm: Use 3-operand DEF_OBJECT.
* mpn/x86_64/core2/hamdist.asm: Likewise.
* mpn/x86_64/bd1/popcount.asm: Likewise.
* mpn/x86_64/bd1/hamdist.asm: Likewise.
* configure.ac (GMP_AVX_NOT_REALLY_AVAILABLE): New m4 define.
* mpn/x86_64/bd1/popcount.asm: Use GMP_AVX_NOT_REALLY_AVAILABLE.
* mpn/x86_64/bd1/hamdist.asm: Likewise.
* mpn/x86_64/silvermont/popcount.asm: Reinstate, grabbing nehalem code.
* mpn/x86_64/silvermont/hamdist.asm: Replace with grabber.
* mpn/x86_64/core2/logops_n.asm: New file.
2017-05-30 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/coreisbr/popcount.asm: Remove.
2017-05-29 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/coreinhm/popcount.asm: Replace grabber code with
implementation proper.
* mpn/x86_64/coreinhm/hamdist.asm: Likewise.
* mpn/x86_64/bd1/popcount.asm: Likewise.
* mpn/x86_64/bd1/hamdist.asm: Likewise.
* mpn/x86_64/core2/popcount.asm: Likewise.
* mpn/x86_64/core2/hamdist.asm: New file.
2017-05-22 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/core2/com.asm: New grabber file.
* mpn/x86_64/core2/lshift.asm: Rewrite.
* mpn/x86_64/core2/rshift.asm: Rewrite.
* mpn/x86_64/core2/lshiftc.asm: Rewrite.
2017-05-16 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/mul_1.asm: Port to DOS64.
* mpn/x86_64/zen/aorsmul_1.asm: Likewise.
* mpn/x86_64/coreibwl/addmul_1.asm: Likewise.
2017-05-16 Niels Möller <nisse@lysator.liu.se>
* mpn/generic/divis.c (mpn_divisible_p): Updated the divisibility
test; bdiv now returns R = D rather than R = 0 when D divides a
non-zero U.
* mpn/generic/binvert.c (mpn_binvert): Negate bdiv quotient.
* mpn/generic/divexact.c (mpn_divexact): Likewise.
* mpn/generic/remove.c (mpn_remove): Likewise.
* mpz/bin_uiui.c (mpz_bdiv_bin_uiui): Likewise.
* tests/mpn/t-bdiv.c (check_one): Updated to new convention,
B^{qn} R = U + QD.
* mpn/generic/sbpi1_bdiv_qr.c (mpn_sbpi1_bdiv_qr): Reimplemented,
for new bdiv convention.
* mpn/generic/sbpi1_bdiv_q.c (mpn_sbpi1_bdiv_q): Likewise.
* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n)
(mpn_dcpi1_bdiv_q): Adapted to new bdiv convention.
* mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n)
(mpn_dcpi1_bdiv_qr): Likewise.
* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr): Adapted to new bdiv
convention, using a wrapper calling the old function.
* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q): Likewise.
2017-05-03 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/coreisbr/cnd_aors_n.asm: New file.
* mpn/x86_64/coreisbr/cnd_add_n.asm: New file.
* mpn/x86_64/core2/aorsmul_1.asm: Tune.
* mpn/x86_64/silvermont/mul_1.asm: New file, grabbing another asm file.
* mpn/x86_64/silvermont/aorsmul_1.asm: Likewise.
* mpn/x86_64/silvermont/aorrlsh1_n.asm: Likewise.
* mpn/x86_64/silvermont/aorrlsh2_n.asm: Likewise.
* mpn/x86_64/silvermont/lshift.asm: Likewise.
* mpn/x86_64/silvermont/rshift.asm: Likewise.
* mpn/x86_64/silvermont/lshiftc.asm: Likewise.
* mpn/x86_64/zen/mul_basecase.asm: Split outer loop into 4 loops.
2017-05-02 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/sqr_basecase.asm: Use .byte for encoding all mulx.
Misc tuning.
2017-04-27 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/sqr_basecase.asm: Rewrite to do 2x and limb squaring
in main loop.
2017-04-25 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/fat/fat_entry.asm: Allocate correct DOS64 frame.
* mpn/x86_64/divrem_2.asm: Likewise.
* mpn/x86_64/mod_1_2.asm: Likewise.
* mpn/x86_64/mod_1_4.asm: Likewise.
* mpn/x86_64/mod_1_1.asm: Likewise.
2017-04-23 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/coreisbr/mul_1.asm: Rewrite feed-in code and add mul_1c
entry point.
* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Amend last change.
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
* mpn/x86_64/zen/mul_basecase.asm: New file.
* mpn/x86_64/zen/sqr_basecase.asm: New file.
2017-04-16 Torbjörn Granlund <tg@gmplib.org>
* mpn/generic/sqr_basecase.c (addmul_1 variant): Rewrite to compute
in-place and to avoid a re-computation.
* configure.ac: Remove k8, k10 from zen path.
2017-04-15 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/zen/gmp-mparam.h: New file.
* mpn/x86_64/zen/com.asm: New file, grabbing another asm file.
* mpn/x86_64/zen/copyd.asm: Likewise.
* mpn/x86_64/zen/copyi.asm: Likewise.
* mpn/x86_64/zen/gcd_1.asm: Likewise.
* mpn/x86_64/zen/hamdist.asm: Likewise.
* mpn/x86_64/zen/lshift.asm: Likewise.
* mpn/x86_64/zen/lshiftc.asm: Likewise.
* mpn/x86_64/zen/popcount.asm: Likewise.
* mpn/x86_64/zen/rshift.asm: Likewise.
* config.guess: Recognise AMD zen.
* acinclude.m4 (X86_64_PATTERN): Add zen.
* config.sub: Corresponding changes.
* configure.ac: Corresponding changes.
* mpn/x86_64/fat/fat.c: Corresponding changes.
2017-03-27 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/oddfac_1.c (limb_apprsqrt): Better approximation.
* mpz/bin_uiui.c (limb_apprsqrt): Likewise.
2017-03-12 Torbjörn Granlund <tg@gmplib.org>
* tests/mpf/t-get_d_2exp.c (check_data): Rewrite of check_onebit.
2017-03-08 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpn/generic/sqrtrem.c: Direct use of sqrtrem2 when n==2.
* mpn/generic/div_qr_2.c (udiv_qr_4by2): Replace add_csaac with add_sssaaaa.
2017-03-07 Torbjörn Granlund <tg@gmplib.org>
* mpf/get_d_2exp.c: Return negative value for negative input.
2017-03-06 Torbjörn Granlund <tg@gmplib.org>
* longlong.h (aarch64): Provide asm-free umul_ppmm.
* longlong.h (powerpc64): Enable asm-free umul_ppmm.
2017-03-04 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/sqr_diag_addlsh1.asm: Complete rewrite.
2017-02-27 Torbjörn Granlund <tg@gmplib.org>
* longlong.h (arm32/arm64): Remove useless comparison to 0 introduced
in last change (spotted by Marco).
2017-02-26 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpn/generic/pow_1.c: Use umul_ppmm for a single limb.
2017-02-25 Torbjörn Granlund <tg@gmplib.org>
* configure.ac: Allow MP_SIZE_T_MAX for threasholds exported to
config.m4.
* mpn/x86_64/gcd_1.asm: Handle BMOD_1_TO_MOD_1_THRESHOLD=MP_SIZE_T_MAX.
Streamline non-reduction path.
* mpn/x86_64/core2/gcd_1.asm: Streamline small operands cases similarly
to top-level code.
2017-02-24 Torbjörn Granlund <tg@gmplib.org>
* longlong.h (arm32/arm64 add_ssaaaa): Use "subs" for some immediates.
* longlong.h (arm32/arm64 sub_ssaaaa): Use "adds" for some immediates.
* mpn/arm64/copyi.asm: Avoid branching on flags.
* mpn/arm64/copyd.asm: Likewise.
* mpn/generic/div_qr_2.c (aarch64 add_sssaaaa): New.
* mpn/generic/div_qr_1n_pi2.c: Same.
* mpn/generic/div_qr_1u_pi2.c: Same.
* mpn/generic/div_qr_2.c (powerpc add_sssaaaa): Fix typo.
* mpn/generic/div_qr_1n_pi2.c: Same.
* mpn/generic/div_qr_1u_pi2.c: Same.
2017-02-23 Marco Bodrato <bodrato@mail.dm.unipi.it>
* tests/devel/sqrtrem_1_2.c: New exhaustive test for sqrtrem_[12].
* tests/devel/Makefile.am (EXTRA_PROGRAMS): add it.
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
2017-02-23 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/silvermont/gmp-mparam.h: New file.
2017-02-22 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/aorsmul_1.asm: Rewrite.
* mpn/arm64/lshiftc.asm: New file.
2017-02-21 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/lshift.asm: Rewrite.
* mpn/arm64/rshift.asm: Rewrite.
* mpn/arm64/rsh1aors_n.asm: New file.
2017-02-19 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/mul_1.asm: Rewrite.
* mpn/arm64/xgene1/mul_1.asm: Remove.
2017-02-17 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/cora53/cnd_aors_n.asm: Moved from "..".
* mpn/arm64/xgene1/cnd_aors_n.asm: Remove file since default code
performs better.
* mpn/arm64/cnd_aors_n.asm: Rewrite.
* mpn/arm64/logops_n.asm: Rewrite based on new aors_n.asm.
2017-02-16 Pedro Gimeno <pggimeno@wanadoo.es>
* rand/randmt.c (__gmp_randiset_mt): Set generator functions from
source.
2017-02-16 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm64/aorsorrlshC_n.asm: New file.
* mpn/arm64/aorsorrlsh2_n.asm: New file.
* mpn/arm64/aorsorrlsh1_n.asm: New file.
* mpn/arm64/xgene1/aors_n.asm: Remove file since default code now
performs similarly.
* mpn/arm64/aors_n.asm: Rewrite to use 4x unrolling.
2017-02-15 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/silvermont/hamdist.asm: New file, based on k10 code.
* mpn/x86_64/silvermont/popcount.asm: Grab coreisbr/popcount.asm.
2017-02-14 Torbjörn Granlund <tg@gmplib.org>
* mpn/x86_64/silvermont/aors_n.asm: New file, grabbing coreisbr code.
* mpn/x86_64/atom/aors_n.asm: Replace coreisbr grabbing code with
code based on Marco's x64/atom/aors_n.asm.
* mpn/powerpc64/aix.m4 (AIX): New define.
* mpn/powerpc64/mode64/bdiv_q_1.asm: For AIX, don't jump from
mpn_bdiv_q_1 to middle of mpn_pi1_bdiv_q_1. Streamline.
* mpn/powerpc64/darwin.m4 (LEA): Put code in lea_list instead of in
EPILOGUE_cpu.
(EPILOGUE_cpu): Output lea_list, the zap it.
* mpn/sparc64/ultrasparct3/bdiv_q_1.asm: New file, based on dive_1.asm.
* mpn/arm/v7a/cora8/bdiv_q_1.asm: New file, based on v6/dive_1.asm.
* mpn/arm/v7a/cora9/bdiv_q_1.asm: New file, grabbing cora8 code.
* mpn/arm/v7a/cora15/bdiv_q_1.asm: Likewise.
* mpn/arm64/aors_n.asm: (SETCY, RETVAL): Shorten insn sequences.
* mpn/arm64/cnd_aors_n.asm: Likewise.
* mpn/arm64/xgene1/aors_n.asm: Likewise.
* mpn/arm64/xgene1/cnd_aors_n.asm: Likewise.
* mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Remove odd d special case.
* mpn/powerpc64/mode64/bdiv_q_1.asm: New file.
* mpn/arm64/bdiv_q_1.asm: New file.
2017-02-10 Torbjörn Granlund <tg@gmplib.org>
* mpn/arm/arm-defs.m4 (EPILOGUE_cpu): Zap lea_list to avoid repetition.
* mpn/x86_64/bdiv_q_1.asm: Rewrite, base on atom/dive_1.asm.
2017-02-08 Torbjörn Granlund <tg@gmplib.org>
* mpn/generic/compute_powtab.c: Choose mpn_pi1_bdiv_q_1 vs
mpn_divexact_1 more wisely (spotted by Marco).
* tune/tuneup.c (relspeed_div_1_vs_mul_1): Prefer mpn_pi1_bdiv_q_1.
* mpn/generic/compute_powtab.c: Use mpn_pi1_bdiv_q_1/mpn_bdiv_q_1
instead of mpn_divexact_1.
* gen-bases.c (binvert): New function, computing modular inverse and
(header): Print MP_BASES_BIG_BASE_CTZ_10 and
MP_BASES_BIG_BASE_BINVERTED_10.
2017-02-06 Torbjörn Granlund <tg@gmplib.org>
* mpn/generic/bdiv_q_1.c: Make return value consistent.
* mpn/x86/p6/mmx/gmp-mparam.h (SQR_TOOM2_THRESHOLD): Revert to bogus
value to accomodate p6/sqr_basecase.asm fragility.
2017-01-29 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/and.c: Simplify branches.
* mpz/ior.c: Likewise.
* mpz/xor.c: Likewise.
* gen-bases.c: In generated file, include just gmp-impl.h, not gmp.h
2017-01-29 Torbjörn Granlund <tg@gmplib.org>
* configure.ac: Don't check if we got a C99 compiler for now (partially
revert 2017-01-24 change as C++ compilers become rejected).
Torbjorn Granlund
committed
* mpn/generic/compute_powtab.c: New file, providing mpn_compute_powtab
for both get_str and set_str.
* gmp-impl.h (mpn_str_powtab_alloc): New macro.
(mpn_dc_set_str_powtab_alloc, mpn_dc_get_str_powtab_alloc): Remove.
(mpn_compute_powtab): Declare.
* mpn/generic/set_str.c: Use mpn_compute_powtab.
(mpn_set_str_compute_powtab): Remove.
* mpn/generic/get_str.c: Use mpn_compute_powtab.
(mpn_get_str_compute_powtab): Remove.
(mpn_bc_get_str): New name for mpn_sb_get_str.
* configure.ac (gmp_mpn_functions): Add compute_powtab.
* tune/tuneup.c (speed_mpn_pre_set_str): Call mpn_compute_powtab.
* tune/set_strb.c: Remove mpn_set_str_compute_powtab name mangling.
* tune/set_strs.c: Likewise.
* configure.ac: Invoke AC_PROG_CC_C99 instead of AC_PROG_CC_STDC.
2017-01-03 Torbjörn Granlund <tg@gmplib.org>
* configure.ac (arm*-*-*): Properly point to cortex-a5 subdir.
2016-12-31 Torbjörn Granlund <tg@gmplib.org>
* tune/tuneup.c (relspeed_div_1_vs_mul_1): New function.
2016-12-28 Marco Bodrato <bodrato@mail.dm.unipi.it>
* tune/common.c (speed_mpz_mfac_uiui, speed_mpz_invert): New
functions.
* tune/speed.h: Declare them.
* tune/speed.c (routine): Add mpz_mfac_uiui, mpz_invert.
* tests/mpz/t-primorial_ui.c: Add randomization to the test.
* mpz/tdiv_r.c: Reduce allocation in some corner-case conditions.
* mpz/tdiv_r_2exp.c: Rearrange counting non-zero limbs.
* mpz/tdiv_q.c: Move common code out of some branches.
* mpz/and.c: Alloc only when needed.
* mpz/xor.c: Reorder branches.
* mpz/gcd.c: Reorder branches.
* mpz/pprime_p.c: Save the initial branch of a loop.
* mpn/generic/divrem.c: Save an allocation.
2016-12-26 Torbjörn Granlund <tg@gmplib.org>
* longlong.h (x86_64 umul_ppmm): Add mulx variant (not automatically
used).
2016-12-17 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/gcdext.c: Save an allocation if both cofactors are needed.
* mpz/oddfac_1.c: Revision of all ASSERTs.
* tests/mpz/t-invert.c: All elements are invertible in the zero ring.
2016-12-13 Torbjörn Granlund <tg@gmplib.org>
* longlong.h: Test LONGLONG_STANDALONE in two more places.
2016-12-07 Torbjörn Granlund <tg@gmplib.org>
* gmp-h.in: Check yet another symbol for FILE.
2016-12-04 Torbjörn Granlund <tg@gmplib.org>
* tests/mpz/reuse.c: Use mpz_clobber. Split mpz_gcdext macros to avoid
spurious res3 dependency.
* tests/misc.c (mpz_clobber): New function.
2016-12-03 Niels Möller <nisse@lysator.liu.se>
* doc/gmp.texi (Number Theoretic Functions): Tweak mpz_gcdext
documentation. The first and third argument may be NULL, but not
the second.
2016-12-02 Niels Möller <nisse@lysator.liu.se>
* tests/mpz/reuse.c (main): Test additional cases of reuse for
mpz_gcd and mpz_gcdext.
2016-12-01 Torbjörn Granlund <tg@gmplib.org>
* tests/misc.c (seed_from_tod): Make shift well-defined.
2016-11-29 Torbjörn Granlund <tg@gmplib.org>
* gmp-h.in (__GNU_MP__): Bump.
* mpz/inp_raw.c: Rewrite size computation to avoid overflow.
* mpz/kronsz.c: Use ABS_CAST to avoid undefined code.
2016-11-27 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/gcd.c, mpz/gcdext.c: Use NEWALLOC.
* mpz/oddfac_1.c: Disable an ASSERT that needs a revision.
2016-11-27 Torbjörn Granlund <tg@gmplib.org>
* tests/mpz/reuse.c: Rewrite operand randomisation to use fixed ranges.
* tune/time.c (cgt_works_p): Add a missing verbosity check.
* configure.ac: Make udiv_w_sdiv use conditional on enable_assembly.
2016-11-25 Marc Glisse <marc.glisse@inria.fr>
* mpz/gcdext.c (mpz_gcdext): Allow a first argument of NULL.
* doc/gmp.texi (Number Theoretic Functions): Document it.
* tests/mpz/t-gcd.c (main): Test it.
2016-11-25 Marc Glisse <marc.glisse@inria.fr>
* tests/cxx/t-ops2z.cc (checkz): Avoid left shift of negative number.
2016-11-22 Torbjörn Granlund <tg@gmplib.org>
* configure.ac (x86): Define LINUX for GNU/Linux systems.
* mpn/x86_64/fat/fat_entry.asm: Set PRETEND_PIC for GNU/Linux.
2016-11-21 Torbjörn Granlund <tg@gmplib.org>
* configure.ac (powerpc): Never use -O3.
* acinclude.m4 (mpn_lshift_com optimization 2): Make it well-defined
also for 32-bit systems.
(mpn_lshift_com optimization 2): Free allocated memory.
2016-11-19 Niels Möller <nisse@lysator.liu.se>
* Makefile.am (check-mini-gmp): Override CFLAGS and CPPFLAGS
instead of the deleted EXTRA_CFLAGS. Set TEST_LIBRARY_PATH,
instead of LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, to avoid getting
gcc linked with an unexpected version of gmp.
2016-11-18 Niels Möller <nisse@lysator.liu.se>
* Makefile.am (check-mini-gmp): Get CC and EXTRA_CFLAGS right.
2016-11-17 Torbjörn Granlund <tg@gmplib.org>
* asl.h: Initial support for artificially small limbs.
2016-11-09 Marco Bodrato <bodrato@mail.dm.unipi.it>
* pz/iset_str.c: Lazy allocation.
2016-11-01 Torbjörn Granlund <tg@gmplib.org>
* mpn/generic/dive_1.c: Remove a forgotten dummy while-loop. (Spotted
by Peter Barfuss.)
2016-10-31 Oleg Oshmyan <chortos@inbox.lv>
* gmp-impl.h (x86_64 MPN_IORD_U): Use proper asm constraint.
2016-10-30 Torbjörn Granlund <tg@gmplib.org>
* mpn/Makefile.am (TARG_DIST): Add riscv.
2016-10-28 Marc Glisse <marc.glisse@inria.fr>
* gmpxx.h (__gmp_binary_divides): Let 1/q call mpq_inv.
* tests/cxx/t-ops.cc (check_mpq): Test it.
2016-10-24 Torbjörn Granlund <tg@gmplib.org>
* config.guess: Recognise Itanium Poulson.
2016-10-15 Torbjörn Granlund <tg@gmplib.org>
* configure.ac (arm*-*-*): Amend last change.
2016-10-14 Torbjörn Granlund <tg@gmplib.org>
* longlong.h (riscv umul_ppmm): New.
* mpn/riscv/64/aors_n.asm: New file.
* mpn/riscv/64/mul_1.asm: New file.
* mpn/riscv/64/aorsmul_1.asm: New file.
* mpn/generic/addmul_1.c: Rewrite for shallower recurrency.
* mpn/generic/submul_1.c: Likewise.
* configure.ac (riscv-*-*): New.
(arm*-*-*): Rewrite arm support to handle armv8 CPUs in 32-bit mode.
2016-08-29 Torbjörn Granlund <tg@gmplib.org>
* All C files: Include just gmp-impl.h, make gmp-impl.h grab gmp.h.
* mpf/get_str.c: Use __GMP_ALLOCATE_FUNC_TYPE and friends.
* mpf/inp_str.c: Likewise.
* mpq/get_str.c: Likewise.
* mpz/get_str.c: Likewise.
* mpz/inp_str.c: Likewise.
* scanf/vsscanf.c: Likewise.
* tal-reent.c: Likewise.
2016-08-24 Vlad Zakharov <vzakhar@synopsys.com>
* longlong.h (arc add_ssaaaa, sub_ddmmss): Replace obsolete 'J'
constraint with 'Cal'.
2016-08-22 Marc Glisse <marc.glisse@inria.fr>
* longlong.h (umul_ppmm from __umulsidi3): Protect with do ...
while (0).
2016-06-02 Torbjörn Granlund <tg@gmplib.org>
Vincent Lefevre <vincent@vinc17.net>
* doc/gmp.texi: Various clarifications about variable conventions.
2016-04-07 Marc Glisse <marc.glisse@inria.fr>
* gmp-h.in (__GMP_NOTHROW): Prefer noexcept to throw().
(mpz_init, mpz_inits): Mark as __GMP_NOTHROW.
* mpz/init.c, mpz/inits.c: Likewise.
* gmpxx.h (mpz_class): Mark default and move constructors noexcept.
* tests/cxx/t-cxx11.cc: Check noexcept.
2016-03-29 Torbjörn Granlund <torbjorng@google.com>
* mpn/x86_64/fat/addmul_2.c: New file.
2016-03-28 Torbjörn Granlund <torbjorng@google.com>
* mpn/x86_64/addmul_2.asm: Move from here...
* mpn/x86_64/k8/addmul_2.asm: ...to here.
2016-03-26 Torbjörn Granlund <torbjorng@google.com>
* mpn/arm64/sqr_diag_addlsh1.asm: New file.
2016-03-25 Torbjörn Granlund <torbjorng@google.com>
* mpn/arm64/xgene1/aors_n.asm: New file.
* mpn/arm64/xgene1/aorsmul_1.asm: New file.
* mpn/arm64/xgene1/cnd_aors_n.asm: New file.
* mpn/arm64/xgene1/gmp-mparam.h: New file.
* mpn/arm64/xgene1/mul_1.asm: New file.
* config.guess: Prefix all arm CPUs with "arm" to accommodate our
matchers.
* configure.ac (arm): Match arm CPUs consistently.
2016-03-21 Torbjörn Granlund <torbjorng@google.com>
* configure.ac: Support many arm64 processors.
2016-03-20 Marc Glisse <marc.glisse@inria.fr>
* configure.ac (WANT_ASSEMBLY): Remove.
(NO_ASM): Remove from CFLAGS, add to AC_DEFINE.
* tests/misc.c: Test NO_ASM instead of WANT_ASSEMBLY.
* config.guess (arm*): Handle big.LITTLE CPUs by extracting the
lexically largest id.
* config.guess (arm*): Add many aarch64 CPUs.
* mpn/arm/v7a/cora5/gmp-mparam.h: New file.
* configure.ac (arm*): Support cortex-a5 better.
* acinclude.m4 (GMP_ASM_UNDERSCORE): Tighten gurkmacka detection.
2016-01-27 Niels Möller <nisse@lysator.liu.se>
* errno.c (__gmp_exception): Use raise(SIGFPE) when available.
2016-01-15 Torbjörn Granlund <torbjorng@google.com>
* config.guess (s390): Don't assume /proc/cpuinfo exists.
2016-01-13 Torbjörn Granlund <torbjorng@google.com>
* config.guess: Reorder and generalise ppc code.
2016-01-01 Marco Bodrato <bodrato@mail.dm.unipi.it>
* tests/cxx/clocale.c: Do not re-define localeconv for mingw.
* primesieve.c: Heal a speed regression on small values.
* mpz/bin_uiui.c (mpz_bdiv_bin_uiui): 2 factors all at once.
(mpz_goetgheluck_bin_uiui): Use STOP/CONT for loops on primesieve.
* mpz/oddfac_1.c: Likewise.
* mpz/primorial_ui.c (LOOP_ON_SIEVE_CONTINUE): Define prime locally.
* gen-fac.c: Use unsigned types for sizes.
* mpn/generic/invert.c: Use MPN_FILL macro.
* mpn/generic/invertappr.c: Likewise.
* mpn/generic/toom53_mul.c: Use _ip1 when available.
2015-12-28 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpq/set_str.c: Use __GMP_FREE_FUNC_TYPE.
* tests/mpz/t-nextprime.c: Speedup using swap, and correct type.
2015-12-26 Torbjörn Granlund <torbjorng@google.com>
* tests/misc.c (tests_start): Assert library version.
2015-12-19 Marc Glisse <marc.glisse@inria.fr>
* gmp-impl.h (fft_table_nk): Use gmp_uint_least32_t.
* mpn/generic/trialdiv.c (gmp_primes_ptab): Likewise.
2015-12-14 Torbjörn Granlund <torbjorng@google.com>
* mpn/x86_64/fat/fat.c (gmp_workaround_skylake_cpuid_bug):
New function.
(__gmpn_cpuvec_init): Handle more BMI2 crippled CPUs.
2015-12-13 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
* mpz/clears.c, mpz/inits.c: Stop supporting empty list.
* tests/arm32call.asm: bx->ret to support thumb-less chips
2015-12-13 Torbjörn Granlund <torbjorng@google.com>
* config.sub: Fix spelling of kabylake.
* acinclude.m4: Likewise.
* mpn/x86_64/fat/fat.c: Likewise.
* tests/misc/t-printf.c: Test a sequence of '%'.
* printf/doprnt.c: Avoid buffer overread with long long limbs.
* mpn/generic/toom_interpolate_7.c: Use the rsh1 functions,
when available, also for negatives (clearing the carry).
* mpn/generic/toom_interpolate_12.c: Likewise.
* mpn/generic/toom_interpolate_16.c: Likewise.
2015-12-06 Torbjörn Granlund <torbjorng@google.com>
* configure.ac (arm*): Conditionally define NOTHUMB.
Simplify and generalise.
* mpn/arm/arm-defs.m4 (ret): New macro, conditional on NOTHUMB.
* mpn/arm/*.asm: Use ret.
2015-12-03 Torbjörn Granlund <torbjorng@google.com>
* config.guess: Work around skylake cpuid bug.
Fix spelling of kabylake.
2015-12-01 Torbjörn Granlund <torbjorng@google.com>
* mpn/x86_64/coreibwl/mul_basecase.asm: Add FUNC_EXITs.
2015-11-21 Marco Bodrato <bodrato@mail.dm.unipi.it>
* gmp-impl.h (MPN_TOOM22_MUL_MINSIZE): Consider ToomX2 limits
(thanks Paul).
* tests/mpn/t-toom22.c: Keep on testing small sizes.
* tests/mpz/t-primorial_ui.c: Test a single "large" number.
* tune/speed.h: Declare it.
* tune/speed.c (routine): Add mpz_primorial_ui.
* primesieve.c: Use two presieved patterns on 64-bits CPUs.
* mpq/init.c: Remove conditional code for __CHECKER__.
* mpq/set.c: Shorten scope of local variables.
* mpq/set_den.c: Likewise.
* mpq/set_num.c: Likewise.
* mpq/set_z.c: Likewise.
2015-11-12 Marc Glisse <marc.glisse@inria.fr>
* gmpxx.h (__gmp_fibonacci_function): New class.
(fibonacci, mpz_class::fibonacci): New functions.
(__gmp_fac_function, __gmp_primorial_function): Add braces.
* tests/cxx/t-ops2z.cc: Test fibonacci.
* doc/gmp.texi (C++ Interface Integers): Document fibonacci.
Warn about factorial and primorial of negative numbers.
2015-11-10 Marc Glisse <marc.glisse@inria.fr>
* gmpxx.h (__gmp_primorial_function): Throw on negative operands.
* tests/cxx/t-ops2z.cc: Test it.
2015-11-09 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz: Experimental, lazy allocation.
2015-11-09 Marc Glisse <marc.glisse@inria.fr>
* tests/cxx/Makefile.am: Move EXTRA_DIST out of WANT_CXX.
2015-11-08 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/urandomm.c: Use mpn_zero_p to shorten code.
* gmpxx.h (__gmp_fac_function, __gmp_primorial_function): New classes.
(__GMPP_DECLARE_UNARY_STATIC_MEMFUN,
__GMPNN_DECLARE_UNARY_STATIC_MEMFUN,
__GMPNS_DECLARE_UNARY_STATIC_MEMFUN,
__GMPNU_DECLARE_UNARY_STATIC_MEMFUN,
__GMPND_DECLARE_UNARY_STATIC_MEMFUN,
__GMPN_DECLARE_UNARY_STATIC_MEMFUN,
__GMP_DECLARE_UNARY_STATIC_MEMFUN, __GMPP_DEFINE_UNARY_STATIC_MEMFUN,
__GMPNN_DEFINE_UNARY_STATIC_MEMFUN,
__GMPNS_DEFINE_UNARY_STATIC_MEMFUN,
__GMPNU_DEFINE_UNARY_STATIC_MEMFUN,
__GMPND_DEFINE_UNARY_STATIC_MEMFUN, __GMPN_DEFINE_UNARY_STATIC_MEMFUN,
__GMP_DEFINE_UNARY_STATIC_MEMFUN): New macros.
(factorial, mpz_class::factorial, primorial, mpz_class::primorial):
New functions.
* tests/cxx/t-ops2.cc: Test factorial and primorial.
* tests/cxx/Makefile.am: Move t-ops2 after
t-do-exceptions-work-at-all-with-this-compiler.
* doc/gmp.texi: Document factorial and primorial.
* tests/cxx/t-ops2.cc: Remove and split into ...
* tests/cxx/t-ops2z.cc, tests/cxx/t-ops2qf.cc, tests/cxx/t-ops2f.cc,
tests/cxx/t-ops2.h: New files.
* tests/cxx/Makefile.am: Update for the split.
2015-11-07 Marc Glisse <marc.glisse@inria.fr>
* gmpxx.h (__GMP_DEFINE_UNARY_FUNCTION_1,
__GMPP_DEFINE_BINARY_FUNCTION_1, __GMPNN_DEFINE_BINARY_FUNCTION_1,
__GMPNS_DEFINE_BINARY_FUNCTION_1, __GMPNU_DEFINE_BINARY_FUNCTION_1,
__GMPND_DEFINE_BINARY_FUNCTION_1, __GMPNLD_DEFINE_BINARY_FUNCTION_1,
__GMPN_DEFINE_BINARY_FUNCTION_1, __GMP_DEFINE_BINARY_FUNCTION_1):
New macros.
(operator~, trunc, floor, ceil, sqrt, operator%, operator&, operator|,
operator^, hypot, gcd, lcm): Use them.
2015-11-06 Marco Bodrato <bodrato@mail.dm.unipi.it>
* mpz/and.c: Use MPZ_NEWALLOC.
* mpz/ior.c: Remove duplicated branches, add branch hints.
* mpz/xor.c: Likewise, and use NORMALIZE_NOT_ZERO.
* mpz/init.c: Remove conditional code for __CHECKER__.
* mpz/init2.c: Likewise.
* mpz/inits.c: Likewise.
* mpz/iset.c: Likewise.
* mpz/iset_str.c: Likewise.
2015-11-04 Torbjörn Granlund <torbjorng@google.com>
* mpz/xor.c: Use MPZ_REALLOC.
* mpz/ior.c: Likewise
* mpz/xor.c: Use the return value of _mpz_realloc.
* mpz/ior.c: Likewise.
2015-11-01 Torbjörn Granlund <torbjorng@google.com>
* tests/misc.c (seed_from_tod, seed_from_urandom): New functions.
(tests_rand_start): Use them.
2015-11-01 Marco Bodrato <bodrato@mail.dm.unipi.it>
* Version 6.1.0 released.
* mpz/inits.c [__CHECKER__]: Init limb, not pointer.
* mpz/init.c [__CHECKER__]: Likewise (spotted by Vicente Benjumea).
2015-10-30 Torbjörn Granlund <torbjorng@google.com>
* mpf/pow_ui.c: Add log(e) precision bits.
* doc/gmp.texi (Floating-point): Rewrite mpf introduction.
2015-10-29 Marco Bodrato <bodrato@mail.dm.unipi.it>
* demos/factorize.c: mpz_div_2exp => mpz_tdiv_q_2exp.
* demos/perl/GMP.xs: Likewise.
* tests/mpf/t-pow_ui.c: Use reference value to check the size.
* doc/gmp.texi (Floating-point): Remove "infinite precision" claim.
2015-10-28 Torbjörn Granlund <torbjorng@google.com>
* tests/mpf/t-pow_ui.c: New file.
* tests/mpf/Makefile.am (check_PROGRAMS): Compile it.
* mpf/pow_ui.c: Rewrite for accuracy and performance.