Debian Codegraph @

ChangeLog

raw
1 2023-07-29 Torbjörn Granlund <[email protected]>
2
3 * Version 6.3.0 released.
4
5 * mpn/s390_64/z13/mul_basecase.asm: Rewrite, using new addmul_1.asm.
6
7 * mpn/s390_64/z13/mul_1.asm: Rewrite.
8 * mpn/s390_64/z13/addmul_1.asm: Likewise.
9 * mpn/s390_64/z13/submul_1.asm: Likewise.
10
11 2023-07-27 Niels Möller <[email protected]>
12
13 Update DIV_QR_1N_PI1_METHOD to use method 3 or 4.
14 * mpn/arm64/applem1/gmp-mparam.h: Update DIV_QR_1N_PI1_METHOD.
15 * mpn/arm64/cora57/gmp-mparam.h: Likewise.
16 * mpn/arm64/xgene1/gmp-mparam.h: Likewise.
17 * mpn/powerpc64/mode64/p7/gmp-mparam.h: Likewise.
18 * mpn/powerpc64/mode64/p8/gmp-mparam.h: Likewise.
19 * mpn/powerpc64/mode64/p9/gmp-mparam.h: Likewise.
20 * mpn/sparc64/ultrasparct45/gmp-mparam.h: Likewise.
21 * mpn/x86/coreihwl/gmp-mparam.h: Likewise.
22 * mpn/x86/k7/gmp-mparam.h: Likewise.
23
24 2023-07-26 Niels Möller <[email protected]>
25
26 * tune/speed.h (mpn_hgcd_appr_lehmer): Fix declaration to use
27 correct return type.
28
29 2023-07-26 Torbjörn Granlund <[email protected]>
30
31 * mpn/s390_64/z13/submul_1.asm: New file.
32 * mpn/s390_64/z13/popcount.asm: New file.
33 * mpn/s390_64/z13/hamdist.asm: New file.
34
35 2023-07-25 Torbjörn Granlund <[email protected]>
36
37 * mpn/s390_64/z13/addmul_2.asm: New file.
38 * mpn/s390_64/z13/addmul_1.asm: New file.
39 * mpn/s390_64/z13/addmul_2.asm: New file.
40 * mpn/s390_64/z13/mul_1.asm: New file.
41 * mpn/s390_64/z13/mul_2.asm: New file.
42 * mpn/s390_64/z13/mul_basecase.asm: New file.
43 * mpn/s390_64/z13/sqr_basecase.c: New file.
44
45 2023-07-20 Torbjörn Granlund <[email protected]>
46
47 * config.guess: Generalise sparc patterns.
48
49 2023-07-19 Torbjörn Granlund <[email protected]>
50
51 * mpn/generic/div_qr_1n_pi2.c, mpn/generic/div_qr_1n_pi1.c,
52 mpn/generic/mod_1_1.c, mpn/generic/div_qr_1u_pi2.c,
53 mpn/generic/div_qr_2.c: Get arm64 asm contraints right for adcs.
54
55 2023-07-18 Torbjörn Granlund <[email protected]>
56
57 * configure.ac: Suppress any -flto flags for running GMP_ASM_*.
58
59 2023-07-15 Torbjörn Granlund <[email protected]>
60
61 * configure.ac: Pass -mcpu= instead of -mtune= consistently for ibm power.
62
63 * mpn/riscv/64: Improve Risc V asm support.
64 * mpn/loongarch/64: Provide basic Loongarch asm support.
65
66 2023-07-06 Marc Glisse <[email protected]>
67
68 * doc/gmp.texi: Mention snapshots in bug report instructions.
69
70 * configfsf.guess: Updated to version 2023-06-23, from gnulib.
71 * configfsf.sub: Updated to version 2023-06-26, from gnulib.
72
73 2023-06-29 Torbjörn Granlund <[email protected]>
74
75 * configure.ac: Make sparc -mptr64 argument optional.
76
77 * configure.ac, config.guess, config.sub, acinclude.m4: Handle power10.
78
79 2023-06-23 Marius Hillenbrand <[email protected]>
80 Stefan Liebler <[email protected]>
81
82 * mpn/s390_64/z13/addmul_1.c: New file.
83 * mpn/s390_64/z13/aormul_2.c: New file.
84 * mpn/s390_64/z13/common-vec.h: New file.
85 * mpn/s390_64/z13/gmp-mparam.h: New file.
86 * mpn/s390_64/z13/mul_1.c: New file.
87 * mpn/s390_64/z13/mul_basecase.c: New file.
88
89 2022-11-02 Torbjörn Granlund <[email protected]>
90
91 * mpn/x86_64/bd1/popcount.asm: Prefer movd to movq for register moves.
92 * mpn/x86_64/bd1/hamdist.asm: Likewise.
93 * mpn/x86_64/core2/hamdist.asm: Likewise.
94 * mpn/x86_64/core2/popcount.asm: Likewise.
95
96 2022-10-28 Marco Bodrato <[email protected]>
97
98 * mpz/nextprime.c (findnext): Use TMP_ALLOC_TYPE to allocate
99 composite array (tx: Jiayi Lin)
100
101 2022-09-30 Marc Glisse <[email protected]>
102
103 * doc/projects.html: Update URL for MPFR.
104 * doc/gmp.texi: Likewise.
105
106 2022-08-11 Marco Bodrato <[email protected]>
107
108 * mpz/primorial_ui.c: Rename some variables and add comments.
109
110 2022-06-19 Marco Bodrato <[email protected]>
111
112 * mpz/millerrabin.c: Use mp_bitcnt_t.
113 * mpz/stronglucas.c: Skip some impossible values searching for D.
114
115 2022-05-14 Marco Bodrato <[email protected]>
116
117 * mpz/nextprime.c: Smaller operand for mpz_sqrt.
118 * tests/mpz/t-nextprime.c: Exit on error.
119 * tests/mpz/t-pprime_p.c: More cases to trigger unlikely branches.
120
121 * tests/mpz/t-aorsmul.c: Test the (r,x,x) case.
122 * mpz/aorsmul.c: Speed-up the (r,x,x) case (tx:Fredrik Johansson).
123
124 2022-04-24 Torbjörn Granlund <[email protected]>
125
126 * mpn/arm/v5/gcd_22.asm: New file.
127
128 2022-04-18 Marc Glisse <[email protected]>
129
130 * gmpxx.h (mpz_class): Do not use mp directly.
131
132 2022-03-30 Torbjörn Granlund <[email protected]>
133
134 * configure.ac, config.guess, config.sub, acinclude.m4: Handle Intel
135 tremont separately.
136
137 * longlong.h (loongarch64 umul_ppmm): New #define.
138
139 2022-03-18 Marco Bodrato <[email protected]>
140
141 * tests/mpz/t-lucm.c: Remove an unused var.
142 * tests/mpq/io.c: Use a random size.
143 * tests/mpz/t-gcd.c: Do not assume a limb fits for _ui functions.
144
145 2022-03-15 Marco Bodrato <[email protected]>
146
147 * mpn/generic/mul_fft.c: Use _bknp1. Not when tuning, to avoid "noise".
148
149 2022-03-09 Torbjörn Granlund <[email protected]>
150
151 * mpn/x86_64/alderlake/submul_1.asm: New file.
152
153 2022-03-08 Marco Bodrato <[email protected]>
154
155 * mpn/generic/mulmod_bnm1.c: Use mulmod_bknp1, on the bnp1 side.
156 * mpn/generic/sqrmod_bnm1.c: Likewise.
157
158 * mpn/generic/mul_fft.c: Remove a branch and improve carry propagation.
159
160 2022-03-03 Torbjörn Granlund <[email protected]>
161
162 * mpn/x86_64/alderlake/mul_basecase.asm: New file.
163 * mpn/x86_64/alderlake/addmul_1.asm: New file.
164
165 2022-02-21 Torbjörn Granlund <[email protected]>
166
167 * configure.ac: Handle alderlake specifically, as it lacks avx512.
168
169 2022-02-15 Marco Bodrato <[email protected]>
170
171 * mpn/generic/strongfibo.c: Correct condition in #if.
172
173 * mpn/generic/mulmod_bknp1.c: New file, with mpn_{mul,sqr}mod_bknp1.
174 * configure.ac (gmp_mpn_functions): Add new file.
175 * gmp-impl.h: Declare new functions.
176 * gmp-impl.h (MPN_{MUL,SQR}MOD_BKNP1_USABLE): Support new functions.
177
178 * tests/mpn/t-{mul,sqr}mod_bknp1.c: New tests for mpn_{mul,sqr}mod_bknp1.
179 * tests/mpn/Makefile.am: Add new tests.
180
181 * tune/speed.c: Recognise new functions: mpn_{mul,sqr}mod_bknp1.
182 * tune/speed.h: Declare new speed_ functions to measure them.
183 * tune/common.c: Implement speed_ functions.
184
185 2022-02-14 Torbjörn Granlund <[email protected]>
186
187 * config.guess: Recognize Tremont CPU variants.
188
189 2022-02-01 Marco Bodrato <[email protected]>
190
191 * mpz/aorsmul_i.c: Use MPZ_NEWALLOC when the operand is overwritten.
192 * mpz/import.c: Reorder branches.
193 * mpz/{init2.c,realloc.c,realloc2.c}: Remove unneeded #includes.
194
195 2022-01-20 Marc Glisse <[email protected]>
196
197 * doc/gmp.texi: Clarify C++ includes and library.
198
199 2022-01-05 Marco Bodrato <[email protected]>
200
201 * gen-sieve.c: Generate masks depending on bit size.
202 * primesieve.c: Remove fixed size (32 and 64 only) masks.
203
204 * tune/speed.c: Add FLAG_NODATA for gmp_primesieve.
205
206 2021-12-11 Marco Bodrato <[email protected]>
207
208 * mpn/generic/toom3_sqr.c: Use a shorter mul when it's simple.
209 * mpn/generic/toom4_sqr.c: Likewise.
210 * mpn/generic/toom33_mul.c: Likewise.
211 * mpn/generic/toom44_mul.c: Likewise.
212
213 * gmp-h.in (GMP_ERROR_MPZ_OVERFLOW): New enum value.
214 * errno.c (__gmp_overflow_in_mpz): New function.
215 * gmp-impl.h (MPZ_OVERFLOW): New macro calling it.
216 * mpz/init2.c: Use the new macro to rise the overflow error.
217 * mpz/realloc.c: Likewise.
218 * mpz/realloc2.c: Likewise.
219
220 * mpz/tdiv_r.c: Special code for divisor with low zero limbs.
221 * mpz/tdiv_qr.c: Likewise.
222
223 2021-11-14 Torbjörn Granlund <[email protected]>
224
225 * configure.ac: Adapt to acinclude.m4 change.
226
227 * mpn/riscv/64/aors_n.asm: Accept 4th CMPCY operand, allowing for
228 2 c/l mpn_sub_n (mpn_add_n cannot beat 3 c/l with RISC V's ISA).
229
230 * configure.ac (S390_PATTERN): Rewrite to handle path inheritance.
231
232 * acinclude.m4 (GMP_ASM_SPARC_GDOP): Renamed GMP_ASM_SPARC_GOTDATA.
233
234 * mpn/sparc32/sparc-defs.m4 (LEA64): Remove misguided assert.
235 * mpn/sparc32/sparc-defs.m4 (LEA64): Allow PIC withot gdop_*.
236
237 * mpn/sparc64/gcd_11.asm: Optimise out annulled shift insn in loop.
238
239 2021-11-07 Torbjörn Granlund <[email protected]>
240
241 * mpn/generic/sec_tabselect.c: Make recently added code actually work.
242 (Thanks Marco!)
243
244 * mpn/s390_32/sec_tabselect.asm: New file.
245
246 * mpn/s390_64/sec_tabselect.asm: Avoid "slfi" for portability.
247
248 2021-11-02 Torbjörn Granlund <[email protected]>
249
250 * mpn/s390_64/sec_tabselect.asm: Rewrite.
251
252 * mpn/generic/sec_tabselect.c: Provide alternative function.
253
254 2021-10-31 Torbjörn Granlund <[email protected]>
255
256 * mpn/riscv/64/sec_tabselect.asm: New file.
257 * mpn/s390_64/sec_tabselect.asm: New file.
258 * mpn/x86/sec_tabselect.asm: Streamline.
259
260 2021-10-31 Marco Bodrato <[email protected]>
261
262 * mpz/fac_ui.c: Save half the products for small values.
263
264 2021-10-29 Torbjörn Granlund <[email protected]>
265
266 * mpn/generic/sec_tabselect.c: Rewrite.
267
268 2021-10-16 Torbjörn Granlund <[email protected]>
269
270 * configure.ac, config.guess, config.sub, acinclude.m4: Recognise more
271 icelake CPUs, and initial alderlake CPUs.
272
273 * mpn/powerpc64/mode64/p9/addaddmul_1msb0.asm: New file.
274
275 * mpn/arm64/applem1/addaddmul_1msb0.asm: New file.
276
277 2021-10-10 Torbjörn Granlund <[email protected]>
278
279 * mpn/x86_64/k8/addaddmul_1msb0.asm: Moved from "..".
280
281 2021-10-08 Niels Möller <[email protected]>
282
283 * tests/mpn/t-addaddmul.c: Unit test for mpn_addaddmul_1msb0.
284
285 2021-10-07 Niels Möller <[email protected]>
286
287 * tune/speed.h (SPEED_ROUTINE_MPN_ADDADDMUL1_MSB0): New macro.
288 * tune/common.c (speed_mpn_addaddmul_1msb0): New function.
289 * tune/speed.c (routine): Add mpn_addaddmul_1msb0 to list.
290
291 2021-10-01 Marco Bodrato <[email protected]>
292
293 * gen-sieve.c: New file to generate a small presieved array.
294 * primesieve.c (first_block_primesieve): Use the presieved array.
295 * gmp-impl.h: #include output of gen-sieve.
296 * Makefile.am: Add rules for gen-sieve and sieve_table.h.
297
298 * mpn/x86_64/addaddmul_1msb0.asm: Support DOS ABI, reorder branches.
299
300 2021-09-26 Torbjörn Granlund <[email protected]>
301
302 * configure.ac (s390): Make sure to always include main asm directory.
303
304 * longlong.h (umul_ppmm): Correct Risc V operand order.
305
306 2021-09-25 Marco Bodrato <[email protected]>
307
308 * mpz/import.c: Use MPN_BSWAP_REVERSE, reorder branches.
309 * mpz/inp_raw.c: Avoid bit size overflows.
310
311 2021-09-22 Torbjörn Granlund <[email protected]>
312
313 * config.sub: Update powerpc pattern.
314
315 * longlong.h: Change tested predef for Risc V.
316
317 2021-08-21 Marco Bodrato <[email protected]>
318
319 * mpz/primorial_ui.c: Simpler loop on sieved primes.
320 * mpz/nextprime.c: Likewise.
321
322 2021-09-14 Torbjörn Granlund <[email protected]>
323
324 * mpn/asm-defs.m4: Remove quotes around PIC_ALWAYS. Reported by
325 George Koehler.
326
327 2021-07-01 Niels Möller <[email protected]>
328
329 * mpn/generic/div_qr_1n_pi1.c (mpn_div_qr_1n_pi1): New variants,
330 DIV_QR_1N_METHOD 3 and 4.
331
332 * tune/div_qr_1n_pi1_3.c: New file.
333 * tune/div_qr_1n_pi1_4.c: New file.
334 * tune/Makefile.am (libspeed_la_SOURCES): Add new files.
335 * tune/div_qr_1_tune.c (__gmpn_div_qr_1n_pi1): Handle new values
336 of div_qr_1n_pi1_method.
337 * tune/common.c (speed_mpn_div_qr_1n_pi1_3)
338 (speed_mpn_div_qr_1n_pi1_4): New functions.
339 * tune/speed.c (routine): Add mpn_div_qr_1n_pi1_3 and
340 mpn_div_qr_1n_pi1_3 to list.
341 * tune/speed.h: Declare new functions.
342 * tune/tuneup.c (tune_div_qr_1): Extend tuning of
343 DIV_QR_1N_PI1_METHOD.
344
345 2021-06-20 Marc Glisse <[email protected]>
346
347 * gmpxx.h (mpq_class(mpz_class&&)): New constructor.
348
349 2021-06-20 Niels Möller <[email protected]>
350
351 * doc/gmp.texi: Document foo_ptr and foo_srcptr.
352
353 2021-06-06 Paul Eggert <[email protected]>
354
355 * configure.ac (AC_INIT): Avoid comma in BUG-REPORT field.
356
357 2021-06-06 Marc Glisse <[email protected]>
358
359 * gmp-h.in (gmp_randstate_ptr, gmp_randstate_srcptr): Move declaration
360 from gmp-impl.h.
361 (gmp_randinit, gmp_randinit_default, gmp_randinit_lc_2exp,
362 gmp_randinit_lc_2exp_size, gmp_randinit_mt, gmp_randinit_set,
363 gmp_randseed, gmp_randseed_ui, gmp_randclear, gmp_urandomb_ui,
364 gmp_urandomm_ui, mpz_rrandomb, mpz_urandomb, mpz_urandomm,
365 mpf_urandomb): Replace gmp_randstate_t with gmp_randstate_ptr.
366 * gmp-impl.h (gmp_randstate_ptr, gmp_randstate_srcptr): Move
367 declaration to gmp-h.in.
368 (gmp_randfnptr_t, __gmp_randinit_mt_noseed): Replace gmp_randstate_t
369 with gmp_randstate_ptr.
370 * mpf/reldiff.c: Replace mpf_t with mpf_ptr.
371 * mpf/set_q.c: Likewise.
372 * mpf/urandomb.c: Likewise.
373 * mpq/canonicalize.c: Replace mpq_t with mpq_ptr.
374 * mpq/clear.c: Likewise.
375 * mpq/init.c: Likewise.
376 * mpq/set_si.c: Likewise.
377 * mpq/set_ui.c: Likewise.
378 * mpz/rrandomb.c: Replace gmp_randstate_t with gmp_randstate_ptr.
379 * mpz/urandomb.c: Likewise.
380 * mpz/urandomm.c: Likewise.
381 * rand/rand.c: Likewise.
382 * rand/randclr.c: Likewise.
383 * rand/randdef.c: Likewise.
384 * rand/randlc2s.c: Likewise.
385 * rand/randlc2x.c: Likewise.
386 * rand/randmt.c: Likewise.
387 * rand/randmt.h: Likewise.
388 * rand/randmts.c: Likewise.
389 * rand/randsd.c: Likewise.
390 * rand/randsdui.c: Likewise.
391
392 * gmp-impl.h: Include stdint.h even if we have inttypes.h.
393 * printf/doprnt.c: Likewise.
394 * printf/repl-vsnprintf.c: Likewise.
395 * scanf/doscan.c: Likewise.
396 * tests/misc/t-printf.c: Likewise.
397 * tests/misc/t-scanf.c: Likewise.
398
399 2021-06-03 Niels Möller <[email protected]>
400
401 * mpn/generic/div_qr_1n_pi1.c (mpn_div_qr_1n_pi1): Micro-optimize
402 method 2, and document the main idea of the algorithm.
403
404 2021-05-25 Marco Bodrato <[email protected]>
405
406 * mpn/generic/sec_powm.c (sec_binvert_limb): New static function.
407
408 * mpn/generic/powm.c (win_size): Remove the unused value from array.
409 * mpn/generic/sec_powm.c (win_size): Likewise.
410
411 2021-05-08 Marc Glisse <[email protected]>
412
413 * doc/gmp.texi: Mention shifts in bit manipulation.
414
415 2021-05-02 Torbjörn Granlund <[email protected]>
416
417 * configure.ac, config.guess, config.sub: Recognise CPUs icelake,
418 tigerlake, and rocketlake.
419
420 * configure.ac: Clean up handling of several Intel CPUs.
421
422 2021-03-11 Torbjörn Granlund <[email protected]>
423
424 * longlong.h: Disable s390 patterns which makes clang barf.
425
426 2021-03-09 Torbjörn Granlund <[email protected]>
427
428 With Marius Hillenbrand:
429 * configure.ac, config.guess, config.sub, acinclude.m4:
430 Recognise CPUs z13-z15.
431
432 2021-03-08 Torbjörn Granlund <[email protected]>
433
434 * longlong.h (68000 umul_ppmm): Add an early-clobber &.
435
436 2021-01-18 Torbjörn Granlund <[email protected]>
437
438 * mpn/x86_64/zen3/sbpi1_bdiv_r.asm: New grabber file.
439
440 2021-01-17 Torbjörn Granlund <[email protected]>
441
442 * mpn/x86_64/coreibwl/sbpi1_bdiv_r.asm: New file.
443
444 2021-01-01 Torbjörn Granlund <[email protected]>
445
446 * configure.ac: Handle zen3 different from zen2.
447
448 * mpn/x86_64/zen3/addmul_1.asm: New grabber file.
449 * mpn/x86_64/zen3/mul_basecase.asm: Likewise.
450 * mpn/x86_64/zen3/sqr_basecase.asm: Likewise.
451
452 * mpn/x86_64/zen3/mul_1.asm: New file.
453
454 2020-12-25 Torbjörn Granlund <[email protected]>
455
456 * mpn/arm64/applem1/sqr_basecase.asm: New file, do 2x and limb squaring
457 in main loop.
458
459 2020-12-21 Torbjörn Granlund <[email protected]>
460
461 * mpn/arm64/applem1/aorsmul_1.asm: Provide addmul_1c entry point.
462
463 2020-12-20 Torbjörn Granlund <[email protected]>
464
465 * mpn/arm64/copyi.asm: Rewrite to use scalar regs.
466 * mpn/arm64/copyd.asm: Likewise.
467
468 2020-12-12 Marc Glisse <[email protected]>
469
470 * gmp-h.in (_GMP_H_HAVE_FILE): Test also _STDIO (for HPE NonStop).
471
472 2020-12-04 Torbjörn Granlund <[email protected]>
473
474 * mpn/arm64/applem1/gmp-mparam.h: New file.
475
476 * mpn/generic/mod_1_1.c: Provide add_mssaaaa for arm64.
477 * mpn/generic/div_qr_1n_pi1.c: Likewise.
478
479 * mpn/arm64/divrem_1.asm: Use sub insn for subtracting constants.
480
481 2020-11-29 Torbjörn Granlund <[email protected]>
482
483 * mpn/arm64/divrem_1.asm: New file.
484 * mpn/arm64/applem1/aorsmul_1.asm: New file.
485
486 * configure.ac, config.guess, config.sub: Recognise CPU "applem1".
487
488 * mpn/arm64: Avoid the x18 register since it is reserved on Darwin.
489
490 2020-11-28 Marco Bodrato <[email protected]>
491
492 * tests/mpz/t-pprime_p.c (check_fermat_mersenne): Check return
493 value.
494
495 * tests/devel/primes.c: Correctly use n_cto_bit or n_fto_bit.
496 * primesieve.c: Differentiate n_to_bit into floor and ceil.
497
498 2020-11-23 Seth Troisi <[email protected]>
499
500 * mpz/nextprime.c (mpz_prevprime): New function.
501 * gmp-h.in: Declare it.
502 * doc/gmp.texi: Document it.
503 * tests/mpz/t-nextprime.c: Test it.
504
505 * tests/mpz/t-pprime_p.c (check_small): Check return value.
506
507 * tune/common.c (speed_mpz_prevprime{,_1}): New functions.
508 * tune/speed.h: Declare them.
509 * tune/speed.c (routine): Add mpz_nextprime{,_1}.
510
511 2020-11-10 Marco Bodrato <[email protected]>
512
513 * configure.ac (fat_path): Add bd1, goldmont,silvermont for CPUVEC.
514 * mpn/x86_64/fat/fat.c: Add more CPUs.
515 * mpn/x86/fat/fat.c: Add more CPUs.
516
517 2020-11-01 Marco Bodrato <[email protected]>
518
519 * configure.ac: X86_{,64_}PATTERN: GMP_ASM_COFF_TYPE for all ABIs;
520 * mpn/x86_64/x86_64-defs.m4 (COFF_TYPE): Copy from mpn/x86/x86-defs.m4
521 as suggested by Jeremy Drake.
522
523 * tests/misc/t-locale.c (nl_langinfo): No redefine on __TERMUX__,
524 spotted by Sanselme and Glisse.
525 * configure.ac: Consider *-*-msys as *-*-mingw* (except on arm* |
526 aarch64*), as suggested by Ralph Peterson.
527 * Makefile.am (EXTRA_DIST): Add mini-gmp/ChangeLog.
528
529 2020-10-30 Marco Bodrato <[email protected]>
530
531 * tests/mpf/t-get_d_2exp.c: Test also the case zero.
532 * tests/mpz/t-get_d.c: Likewise.
533 * tests/mpf/t-trunc.c: Use mpf_size.
534
535 * tests/mpf/t-conv.c: Some more tests on zero.
536 * mpn/generic/mod_1.c (mpn_mod_1_unnorm): Compare r<d before shifting.
537 * mpf/mul.c: Use macros.
538
539 2020-10-29 Marco Bodrato <[email protected]>
540
541 * mpz/aors_ui.h: REALLOC with extra limb only when needed.
542
543 * mpz/bin_uiui.c (limb_apprsqrt): Slightly faster formula.
544 * mpz/oddfac_1.c (limb_apprsqrt): Likewise.
545 * mpz/stronglucas.c (limb_apprsqrt): Likewise.
546
547 2020-10-25 Marco Bodrato <[email protected]>
548
549 * configfsf.guess: Updated to version 2020-10-22, from gnulib.
550 * configfsf.sub: Updated to version 2020-10-13, from gnulib.
551
552 2020-10-17 Marco Bodrato <[email protected]>
553
554 * bootstrap.c (mpz_invert_2exp): Simplify.
555 * mpz/stronglucas.c (mpz_oddjacobi_ui): New helper function.
556
557 * tests/devel/Makefile.am: Remove redundancies.
558
559 * tests/mpz/io.c: Test out-of-range bases for mpz_out_str.
560
561 2020-10-15 Torbjörn Granlund <[email protected]>
562
563 * configure.ac: Recognise zen3.
564 * config.guess: Recognise zen3.
565
566 2020-10-14 Marco Bodrato <[email protected]>
567
568 * doc/gmp.texi (Number sequences): Remove redundancy. (spotted: TonyMcC)
569
570 2020-10-06 Niels Möller <[email protected]>
571
572 * Makefile.am: Better support for make check-mini-gmp on wine or cygwin.
573
574 2020-09-22 Torbjörn Granlund <[email protected]>
575
576 * tests/mpz/t-mul.c: Print GMP_CHECK_FFT.
577
578 * longlong.h (x86 umul_ppmm): Fix typo.
579
580 2020-07-04 Torbjörn Granlund <[email protected]>
581
582 * mpn/arm64/bdiv_q_1.asm: Use LEA_HI/LEA_LO
583 * mpn/arm64/invert_limb.asm: Likewise.
584
585 * mpn/arm64/arm64-defs.m4: New file.
586 * mpn/arm64/darwin.m4: New file.
587 * configure.ac: Use arm64/arm64-defs.m4 and arm64/darwin.m4.
588
589 2020-06-11 Torbjörn Granlund <[email protected]>
590
591 * mpn/powerpc32/powerpc-defs.m4 (aese,aeselst): New macros.
592
593 2020-06-10 Torbjörn Granlund <[email protected]>
594
595 * configure.ac: Recognise armcortexa55.
596
597 2020-05-25 Torbjörn Granlund <[email protected]>
598
599 * tests/cxx/t-assign.cc: Use reference parameter for 'catch'.
600 * tests/cxx/t-constr.cc: Likewise.
601 * tests/cxx/t-ops2z.cc: Likewise.
602 * tests/cxx/t-rand.cc: Likewise.
603 * tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc: Likewise.
604
605 2020-05-21 Torbjörn Granlund <[email protected]>
606
607 * tune/time.c (speed_endtime): Cast printf args to right type.
608
609 * tune/speed.c (main): Cast printf args to right type.
610
611 * tests/mpz/reuse.c: Avoid using non-standard function fileno().
612 * tests/spinner.c: Likewise.
613
614 * tests/mpz/convert.c (str_casecmp): New function.
615 (main): Use it instead of non-standard strcasecmp.
616
617 * mpn/generic/get_d.c: Add clarifying parens.
618
619 2020-05-17 Marco Bodrato <[email protected]>
620
621 * mpq/cmp.c: Avoid overflow on int even for huge sizes.
622
623 2020-05-12 Torbjörn Granlund <[email protected]>
624
625 * mpn/generic/hgcd2-div.h (tabp): Combine several undefined tabp
626 variable definitions with a macro.
627
628 * mpn/generic/strongfibo.c: Avoid defining helper function when unused.
629
630 * mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n_itch): Disable unused
631 static function.
632
633 * mpz/mul.c: Add some {} to suppress warning.
634
635 * tests/mpn/t-gcd_11.c: Exit main() properly.
636 * tests/mpn/t-gcd_22.c: Likewise.
637 * tests/mpn/t-gcdext_1.c: Likewise.
638
639 2020-04-28 Torbjörn Granlund <[email protected]>
640
641 * tests/mpz/reuse.c (realloc_if_reducing): New function.
642 (INVOKE_RRS, etc): Use realloc_if_reducing.
643
644 2020-03-10 Marco Bodrato <[email protected]>
645
646 * mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnp1):
647 Simplify special cases.
648 * mpz/bin_ui.c (rek_raising_fac4): Reduce allocations.
649 (mpz_bin_ui): Siplify special cases.
650 * tests/mpz/t-bin.c: Use divexact.
651
652 * mpn/generic/mul_fft.c (mpn_fft_mul_modF_K):
653 Fully handle carry propagation in basecase multiplication.
654
655 2020-02-12 Marco Bodrato <[email protected]>
656
657 * mpz/cmp.c: Avoid overflow on int even for huge sizes.
658 * mpz/cmpabs.c: Likewise.
659
660 2020-02-09 Marco Bodrato <[email protected]>
661
662 * mpn/generic/sqrmod_bnm1.c (mpn_bc_sqrmod_bnp1):
663 Shorter mpn_sqr.
664 * mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnp1):
665 Shorter mpn_mul_n.
666
667 * tests/mpn/t-mulmod_bnm1.c: Trigger special cases more often.
668 * tests/mpn/t-sqrmod_bnm1.c: Likewise.
669
670 2020-02-09 Seth Troisi <[email protected]>
671
672 * tests/mpz/t-nextprime.c: Split into sub-tests.
673
674 2020-02-02 Marco Bodrato <[email protected]>
675
676 * mpn/generic/powm.c: Better handling of current window-size.
677 * mpn/generic/powlo.c: Likewise.
678
679 * mpn/generic/jacbase.c (mpn_jacobi_base): Optimise _METHOD 4.
680 * mpz/aors.h: Branches optimisation.
681
682 2020-01-31 Marco Bodrato <[email protected]>
683
684 * mpn/generic/powm.c (MPN_REDC_0): Subtractive redc
685 (mpn_2powm): New, static, function
686 * tests/mpz/t-powm.c: More tests for the base=2 case.
687
688 2020-01-24 Niels Möller <[email protected]>
689
690 * mpn/generic/hgcd2_jacobi.c (div1, div2): Deleted. Instead,
691 include hgcd2-div.h, to reuse the tuned implementations for hgcd2.
692 (mpn_hgcd2_jacobi): Adapt to different return value for div1. Also
693 other small changes to make it identical to mpn_hgcd2, except for
694 the updates of the jacobi-related state.
695
696 * mpn/generic/hgcd2.c (div1, div2): Move inline functions...
697 * mpn/generic/hgcd2-div.h: ... to a separate file.
698
699 2020-01-17 Torbjörn Granlund <[email protected]>
700
701 * Version 6.2.0 released.
702
703 * gmp-h.in (__GNU_MP__): Bump.
704 (__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL):
705 Bump version info.
706 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
707 Bump version info.
708
709 2020-01-15 Torbjörn Granlund <[email protected]>
710
711 * mpn/x86_64/bt1/gcd_11.asm: Add missing FUNC_EXIT.
712
713 2020-01-10 Torbjörn Granlund <[email protected]>
714
715 * longlong.h (powerpc): Add clobbers, make formatting cleanups.
716
717 * configure.ac (HAVE_NATIVE): Add mpn_sbpi1_bdiv_r.
718
719 * tune/tune-gcd-p.c (main): Use %zu for size_t printing.
720
721 * configfsf.guess: Update from upstream.
722
723 * mpn/x86/pentium4/sse2/popcount.asm: For simplicity and correctness
724 use LEAL directly.
725
726 2020-01-03 Niels Möller <[email protected]>
727
728 * configure.ac: Delete suggestion to use TESTS_ENVIRONMENT to run
729 wine. It worked only with older versions of automake.
730
731 2019-12-23 Torbjörn Granlund <[email protected]>
732
733 * mpf/mul.c: Rewrite to invoke mpn_sqr when appropriate.
734
735 2019-12-08 Marco Bodrato <[email protected]>
736
737 * mpz/powm.c: Full normalisation when e=1 & b<0.
738 * tests/mpz/t-powm.c: More tests for the e=1 case.
739
740 2019-12-02 Torbjörn Granlund <[email protected]>
741
742 * mpn/generic/gcd_11.c: Remove check for NATIVE_ implementation.
743
744 2019-11-24 Niels Möller <[email protected]>
745
746 * mpn/generic/gcdext_1.c [USE_ZEROTAB]: Delete code variant for
747 USE_ZEROTAB != 0. Was used in the currently disabled binary
748 gcdext.
749
750 2019-11-20 Torbjörn Granlund <[email protected]>
751
752 * mpn/generic/powm.c (MPN_REDC_1): Prefer mpn_sbpi1_bdiv_r when it is
753 provided.
754 * mpn/generic/sec_powm.c (MPN_REDC_1_SEC): Likewise.
755
756 2019-11-17 Torbjörn Granlund <[email protected]>
757
758 * config.guess: Recognise zen2.
759 * configure.ac: Likewise.
760
761 * mpn/x86_64/bt1/aorsmul_1.asm: Rewrite.
762 * mpn/x86_64/bt1/mul_1.asm: Rewrite.
763
764 * mpn/arm/v6t2/gcd_11.asm: Increase alignment; update x/l table.
765
766 2019-11-16 Seth Troisi <[email protected]>
767
768 * tune/common.c (speed_mpn_perfect_power_p): New function.
769 (speed_mpn_perfect_power_p): New function.
770 * tune/speed.h: Declare both.
771 * tune/speed.c (routine): Add mpn_perfect_{power,square}_p.
772
773 * tune/common.c (speed_mpz_nextprime): New function.
774 * tune/speed.h: Declare it.
775 * tune/speed.c (routine): Add mpz_nextprime.
776
777 2019-11-09 Marco Bodrato <[email protected]>
778
779 * tune/speed.c (routine_t): Add R flag to mpz_powm
780 * tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Use R flag as the base.
781
782 2019-10-02 Torbjörn Granlund <[email protected]>
783
784 * configure.ac: Make more path distinctions for the benefit of
785 gmp-mparam.h.
786
787 2019-10-01 Torbjörn Granlund <[email protected]>
788
789 * configure.ac (arm64): Let cortex-a7x look in a57 folder.
790
791 2019-10-01 Niels Möller <[email protected]>
792
793 * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Fix
794 canonicalization condition.
795
796 2019-09-30 Niels Möller <[email protected]>
797
798 * tests/mpn/t-gcdext_1.c: New test.
799
800 2019-09-23 Torbjörn Granlund <[email protected]>
801
802 * mpn/generic/hgcd2.c: Mark added div1 variants as static.
803
804 * tune/tuneup.c, tune/speed.c, tune/speed.h, tune/common.c,
805 tune/Makefile.am: Add measuring of mpn_hgcd2 method 4 and 5.
806 * tune/hgcd2-4.c, tune/hgcd2-5.c: New files.
807
808 2019-09-23 Niels Möller <[email protected]>
809
810 * gmp-impl.h (hgcd2_func_t) [TUNE_PROGRAM_BUILD]: New typedef.
811 (hgcd2_func) [TUNE_PROGRAM_BUILD]: New function pointer.
812
813 * tune/hgcd2.c (mpn_hgcd2): New file, with a redefined function to
814 invoke an implementation via the hgcd2_func function pointer.
815 Initially points to the default implementation in
816 mpn/generic/hgcd2.c.
817 * tune/Makefile.am (tuneup_SOURCES): Add hgcd2.c.
818
819 * tune/tuneup.c (one_method): Return index of selected function.
820 (tune_hgcd2): Set hgcd2_func to point to selected function. So
821 that the later tuning of mpn_hgcd and mpn_gcd uses the right
822 implementation of hgcd2.
823
824 2019-09-23 Torbjörn Granlund <[email protected]>
825
826 * mpn/generic/hgcd2.c: Improve method 4 and 5 by using the division
827 free methods optimistically, detecting errors. Tweak table values.
828
829 2019-09-22 Torbjörn Granlund <[email protected]>
830
831 * mpn/generic/hgcd2.c: Add a 4th and 5th div1 method.
832
833 2019-09-18 Torbjörn Granlund <[email protected]>
834
835 * mpn/generic/hgcd2.c (div1, div2): Rearrange things to allow for asm.
836 (div2): Avoid out-of-specs shift.
837 (div2): Use same variable naming in all variants.
838
839 2019-09-16 Niels Möller <[email protected]>
840
841 * mpn/generic/hgcd2.c (HGCD2_DIV2_METHOD): New define.
842 (div2): Replaced, since the old implementation had lots of poorly
843 predicted and expensive branches. Two new implementaions, selected
844 by HGCD2_DIV2_METHOD.
845 (div2) [HGCD2_DIV2_METHOD == 1]: Calls div1 on the high limbs,
846 with unlikely case handling large quotients.
847 (div2) [HGCD2_DIV2_METHOD == 2]: The previously #if:ed out
848 version. A bitwise division, relying on fast count_leading_zeros,
849 and with fewer branches than the previous code.
850
851 2019-09-15 Torbjörn Granlund <[email protected]>
852
853 * acinclude.m4 (GMP_ASM_X86_ADX): Remove unused.
854
855 * configure.ac (x86): Amend last change.
856
857 2019-09-14 Niels Möller <[email protected]>
858
859 * mpn/generic/hgcd2.c (HGCD2_DIV1_METHOD): Rename, and change
860 default to 3. Updated all usage.
861 (HGCD2_METHOD): ... the old name, deleted.
862
863 2019-09-14 Torbjörn Granlund <[email protected]>
864
865 * configure.ac: Remove obsolete path-triggered invocation of
866 GMP_ASM_X86_ADX and GMP_ASM_X86_MULX.
867
868 * acinclude.m4 (GMP_ASM_X86_MULX): Set X86_ASM_MULX to config.h.
869 * configure.ac (x86): Set x86_have_mulx for relevant CPUs.
870 Use if to conditionally invoke GMP_ASM_X86_MULX.
871 * longlong.h (x86 umul_ppmm): Test also X86_ASM_MULX for when to use
872 mulx variant.
873
874 2019-09-13 Niels Möller <[email protected]>
875
876 * tune/tuneup.c (one_method): New helper function, to measure
877 several functions for a fix size.
878 (tune_hgcd2, tune_div_qr_1, tune_mod_1, tune_jacobi_base): Use it.
879
880 2019-09-13 Torbjörn Granlund <[email protected]>
881
882 * configure.ac (HAVE_HOST_CPU_1): Add many x86_64 CPU types.
883 * longlong.h (x86 umul_ppmm): Fix criterion for when to use mulx.
884 (count_leading_zeros): Use lzcnt for appropriate CPUs.
885 (count_trailing_zeros): Use tzcnt for appropriate CPUs.
886
887 * mpn/generic/hgcd2.c (HGCD2_METHOD=2 div1): Rewrite.
888
889 2019-09-09 Torbjörn Granlund <[email protected]>
890
891 * mpn/generic/mul.c: Call mpn_mul_basecase early when in range. Never
892 call mpn_sqr.
893
894 * mpn/generic/gcd.c: Rewrite tail of function, for n <= 2.
895
896 2019-09-08 Torbjörn Granlund <[email protected]>
897
898 * configure.ac (arm): Select arch armv7ve for a7, a12, a15, and a17,
899 this enables the use of the udiv instruction.
900
901 * mpn/generic/hgcd2.c (disabled div2): Micro-optimise.
902
903 2019-09-07 Torbjörn Granlund <[email protected]>
904
905 * mpn/generic/hgcd2.c (HGCD2_METHOD=3 div1): Micro-optimise.
906
907 2019-09-07 Vincent Lefevre <[email protected]>
908
909 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Append EXEEXT for executable.
910
911 2019-09-05 Torbjörn Granlund <[email protected]>
912
913 * mpn/arm64/gcd_22.asm: Rewrite to make better use of Arm conditional
914 execution.
915 * mpn/arm32/gcd_22.asm: Likewise.
916
917 2019-09-05 Niels Möller <[email protected]>
918
919 * mpn/generic/hgcd2.c (div1): Return both r and q as a
920 mp_double_limb_t, replacing the DIV1 macro.
921 (div1) [HGCD2_METHOD == 3]: New implementation handling q <= 7
922 specially and without branches. Based on Torbjörn's mail to the
923 gmp-devel list.
924 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
925 corresponding speed support.
926 * tune/hgcd2-3.c: New file.
927 * tune/tuneup.c (print_define_with_speedup): New function, to
928 output a comment with speedup compared to next-best method.
929 (tune_hgcd2): Update tuning.
930
931 2019-09-04 Niels Möller <[email protected]>
932
933 * mpn/generic/hgcd2.c (HGCD2_METHOD): New parameter.
934 (DIV1): New macro, using either the div1 function or plain
935 division, depending on the value of HGCD2_METHOD.
936 (mpn_hgcd2): Use DIV1.
937 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
938 measuring of mpn_hgcd2 methods.
939 * tune/hgcd2-1.c, tune/hgcd2-2.c: New files.
940 * tune/tuneup.c: Tune HGCD2_METHOD.
941
942 * tune/speed.h (SPEED_ROUTINE_MPN_HGCD2): New macro.
943 * tune/common.c (speed_mpn_hgcd2): New function.
944 * tune/speed.c (routine): Add mpn_hgcd2.
945
946 2019-09-04 Torbjörn Granlund <[email protected]>
947
948 * mpn/arm/v6t2/gcd_22.asm: New file.
949 * mpn/arm64/gcd_22.asm: New file.
950 * mpn/ia64/gcd_11.asm: New file.
951
952 2019-09-01 Torbjörn Granlund <[email protected]>
953
954 * mpn/x86_64/bt1/gcd_11.asm: Replace grabber with bt1 optimised code.
955
956 2019-08-30 Torbjörn Granlund <[email protected]>
957
958 * mpn/x86_64/bd4/gcd_22.asm: New grabber file.
959
960 * mpn/x86_64/zen/gcd_22.asm: Use coreihwl instead of bd2 gcd_22.
961
962 * mpn/x86_64/bd2/gcd_22.asm: Fix typo in FUNC_ENTRY (currently unused).
963 Avoid a register copy before return.
964 * mpn/x86_64/core2/gcd_22.asm: Likewise.
965 * mpn/x86_64/k10/gcd_22.asm: Likewise.
966 * mpn/x86_64/gcd_22.asm: Likewise.
967
968 * mpn/x86_64/coreihwl/gcd_22.asm: Optimise, now runs well on more CPUs.
969
970 * mpn/x86_64/gcd_11.asm: Remove PROTECT from symbols as they are
971 actually local.
972 * mpn/x86_64/gcd_22.asm: Likewise.
973
974 2019-08-25 Torbjörn Granlund <[email protected]>
975
976 * mpn/x86_64/bd2/gcd_22.asm: Repeat tzcnt for exceptional lowz case.
977 Remove dead code.
978
979 * mpn/powerpc64/mode64/p7/gcd_22.asm: Make logic for determining ABI
980 wrt struct return more robust.
981 * mpn/powerpc64/mode64/p9/gcd_22.asm: Likewise.
982
983 2019-08-24 Torbjörn Granlund <[email protected]>
984
985 * mpn/x86_64/bt1/gcd_11.asm: New grabber.
986 * mpn/x86_64/bt1/gcd_22.asm: New grabber.
987 * mpn/x86_64/bt2/gcd_22.asm: New grabber.
988
989 * mpn/x86_64/atom/gcd_22.asm: Remove stale grabber file.
990 * mpn/x86_64/zen/gcd_22.asm: Grab bd2 instead of hwl code.
991 * mpn/x86_64/bd2/gcd_22.asm: New file.
992 * mpn/x86_64/k8/gcd_22.asm: Remove, rely on top-level code instead.
993 * mpn/x86_64/bt1/gcd_22.asm: Remove.
994 * x86_64/gcd_22.asm: New file, improved version of removed bt1 code.
995
996 2019-08-22 Torbjörn Granlund <[email protected]>
997
998 * mpn/x86_64/coreihwl/gcd_11.asm: Remove as it was never beneficial.
999
1000 * mpn/x86_64/bd2/gcd_11.asm: Make sure rdx is zero on return to benefit
1001 gcd_22's private calls. Make gcd_11 files more similar in register use.
1002 * mpn/x86_64/bd4/gcd_11.asm: Likewise.
1003 * mpn/x86_64/core2/gcd_11.asm: Likewise.
1004 * mpn/x86_64/gcd_11.asm:: Likewise.
1005
1006 2019-08-22 Niels Möller <[email protected]>
1007
1008 From Hugh McMaster:
1009 * gmp.pc.in, gmpxx.pc.in: New files.
1010 * configure.ac: New output files gmp.pc and gmpxx.pc.
1011 * Makefile.am (pkgconfigdir, pkgconfig_DATA): New automake
1012 settings, to install gmp.pc and optionally gmpxx.pc for use with
1013 pkg-config.
1014
1015 2019-08-21 Torbjörn Granlund <[email protected]>
1016
1017 * mpn/x86_64/core2/gcd_22.asm: New file.
1018 * mpn/x86_64/k8/gcd_22.asm: New file.
1019 * mpn/x86_64/k10/gcd_22.asm: New file.
1020 * mpn/x86_64/coreihwl/gcd_22.asm: New file.
1021 * mpn/x86_64/bt1/gcd_22.asm: New file.
1022 * mpn/x86_64/bd4/gcd_22.asm: New grabber.
1023 * mpn/x86_64/zen/gcd_22.asm: New grabber.
1024 * mpn/x86_64/atom/gcd_22.asm: New grabber.
1025
1026 2019-08-19 Torbjörn Granlund <[email protected]>
1027
1028 * configure.ac: Check for ELFv1 ABI on PowerPC.
1029
1030 2019-08-18 Torbjörn Granlund <[email protected]>
1031
1032 * longlong.h (arm32 sub_ddmmss): Define separately for thumb and
1033 non-thumb as rsc instruction is missing for thumb.
1034
1035 * mpn/powerpc64/mode64/p7/gcd_22.asm: New file.
1036 * mpn/powerpc64/mode64/p9/gcd_22.asm: New file.
1037
1038 2019-08-17 Torbjörn Granlund <[email protected]>
1039
1040 * demos/expr/t-expr.c: #include gmp-impl.h as it includes tests.h.
1041
1042 * mpn/asm-defs.m4: Add gcd_22.
1043
1044 * tests/refmpn.c (refmpn_gcd_22): New function.
1045 * tests/tests.h: Declare it.
1046
1047 * tests/t-constants.c: #include gmp-impl.h.
1048 * tests/mpf/t-get_d.c: Likewise.
1049
1050 2019-08-17 Niels Möller <[email protected]>
1051
1052 * mpn/generic/gcd_22.c (mpn_gcd_22): New implementation with less
1053 branches.
1054
1055 2019-08-16 Marco Bodrato <[email protected]>
1056
1057 * mpn/generic/brootinv.c: Shorten computations, using even exponent.
1058 * mpn/generic/powlo.c: Avoid copies with a flipflop.
1059
1060 2019-08-16 Niels Möller <[email protected]>
1061
1062 Speed support for gcd_22. Calls mpn_gcd_22(al, al, bl, bl), so
1063 that B+1 is a common factor.
1064 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_22): New macro.
1065 * tune/speed.c (routine): Add mpn_gcd_22.
1066 * tune/common.c (speed_mpn_gcd_22): New function.
1067
1068 * mpn/generic/gcd.c (gcd_2): Moved to gcd_22.c below.
1069 (mpn_gcd): Adapt for calling gcd_22.
1070 * mpn/generic/gcd_22.c (mpn_gcd_22): New file and function.
1071 * gmp-impl.h (mp_double_limb_t): New (typedef) struct.
1072 * configure.ac (gmp_mpn_functions): Added gcd_22.
1073
1074 * tests/mpn/t-gcd_22.c: New test.
1075 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-gcd_22.
1076 * tests/refmpz.c (refmpz_gcd): New function (plain binary gcd).
1077
1078 2019-08-15 Torbjörn Granlund <[email protected]>
1079
1080 * mpn/x86_64/zen/gcd_11.asm: Use bd2 instead of bd4 code.
1081
1082 2019-08-13 Torbjörn Granlund <[email protected]>
1083
1084 * mpn/x86_64: Add more gcd_11 variants of of x86_64 gcd_11.asm and
1085 tweak existing ones.
1086
1087 2019-08-13 Marco Bodrato <[email protected]>
1088
1089 From Seth Troisi:
1090 * doc/gmp.texi: Update mpz_millerrabin documentation.
1091
1092 * mpn/x86_64/bd2/gcd_11.asm: Micro-optimisation.
1093 * doc/gmp.texi: Further update in mpz_millerrabin.
1094 * tests/misc.c: Silence a warning.
1095 * tests/mpz/t-pprime_p.c (const primes): One more prime in the list.
1096 * mpz/millerrabin.c: Return 2 for surely prime numbers (BPSW checked).
1097
1098 2019-08-08 Torbjörn Granlund <[email protected]>
1099
1100 * mpn/x86/gcd_11.asm: New file.
1101
1102 * config.sub: Make arm cpu types match what config.guess returns.
1103
1104 2019-08-08 Niels Möller <[email protected]>
1105
1106 * tests/refmpn.c (refmpn_gcd_11): New function, based on refmpn_gcd_1.
1107 (refmpn_gcd_1): Use it.
1108 * tests/mpn/t-gcd_11.c: New file, test mpn_gcd_11.
1109 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-gcd_11.
1110
1111 2019-08-07 Torbjörn Granlund <[email protected]>
1112
1113 * mpn/alpha/ev67/gcd_11.asm: New file, mostly extracted from gcd_1.asm.
1114 * mpn/arm/v5/gcd_11.asm: Likewise.
1115 * mpn/arm/v6t2/gcd_11.asm: Likewise.
1116 * mpn/arm64/gcd_11.asm: Likewise.
1117 * mpn/powerpc64/mode64/gcd_11.asm: Likewise.
1118 * mpn/powerpc64/mode64/p7/gcd_11.asm: Likewise.
1119 * mpn/powerpc64/mode64/p9/gcd_11.asm: Likewise.
1120 * mpn/sparc64/gcd_11.asm: Likewise.
1121 * mpn/x86/k7/gcd_11.asm: Likewise.
1122 * mpn/x86/p6/gcd_11.asm: Likewise.
1123 * mpn/x86_64/bd2/gcd_11.asm: Likewise.
1124 * mpn/x86_64/core2/gcd_11.asm: Likewise.
1125 * mpn/x86_64/gcd_11.asm: Likewise.
1126 * mpn/asm-defs.m4: Add gcd_11.
1127
1128 2019-08-06 Niels Möller <[email protected]>
1129
1130 * tune/common.c (speed_mpn_gcd_11): New function.
1131 * tune/speed.h (speed_mpn_gcd_11): Declare it.
1132 (SPEED_ROUTINE_MPN_GCD_11): New macro.
1133 * tune/speed.c (routine): Add mpn_gcd_11.
1134
1135 * configure.ac (gmp_mpn_functions): Added gcd_11. Also add
1136 HAVE_NATIVE_mpn_gcd_11.
1137 * mpn/generic/gcd_11.c (mpn_gcd_11): New file and function,
1138 extracted from mpn_gcd_1.
1139 * gmp-h.in (mpn_gcd_11): Declare it.
1140 * mpn/generic/gcd_1.c (mpn_gcd_1): Adapted to call mpn_gcd_11.
1141
1142 2019-08-04 Torbjörn Granlund <[email protected]>
1143
1144 * mpn/x86_64/bt2/gcd_1.asm: New grabber file.
1145 * mpn/x86_64/zen/gcd_1.asm: Grab from "bd2" directory, was "core2".
1146
1147 2019-08-02 Torbjörn Granlund <[email protected]>
1148
1149 * mpn/x86_64/bd2/gcd_1.asm: New file.
1150
1151 2019-08-01 Torbjörn Granlund <[email protected]>
1152
1153 * tests/mpf/t-conv.c: Add several more fixed test cases.
1154
1155 * mpf/set_str.c: Ignore leading zeros including ones after radix point
1156 to avoid invalid output formats.
1157
1158 2019-07-30 Torbjörn Granlund <[email protected]>
1159
1160 * mpn/powerpc64/mode64/p9/gcd_1.asm: New file.
1161
1162 2019-07-30 Niels Möller <[email protected]>
1163
1164 From Seth Troisi:
1165 * doc/gmp.texi (Jacobi Symbol): Update algorithm documentation.
1166 * tests/mpz/t-jac.c: Comment update.
1167
1168 2019-07-13 Torbjörn Granlund <[email protected]>
1169
1170 * configure.ac (arm): Generalise arm a72 pattern to match a73...a79.
1171
1172 2019-07-08 Torbjörn Granlund <[email protected]>
1173
1174 * mpn/arm/arm-defs.m4 (ASM_START): Rewrite (fix broken error handling).
1175
1176 2019-07-02 Torbjörn Granlund <[email protected]>
1177
1178 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Compile conftest.c to executable
1179 in order to trigger final compile in case of LTO.
1180
1181 2019-06-17 Torbjörn Granlund <[email protected]>
1182
1183 * config.guess: Work around upstream configfsf.guess's regression wrt
1184 mips vs mips64.
1185
1186 2019-06-14 Torbjörn Granlund <[email protected]>
1187
1188 * longlong.h (mips64): Provide r6 asm code as default expression yields
1189 libcall.
1190
1191 * configure.ac (mips64): Use separate paths for r6 and non-r6 as these
1192 architectures are mutually incompatible.
1193
1194 * mpn/mips64/{addmul_1,mul_1,sqr_diagonal,submul_1,umul}.asm:
1195 Move into hilo subdir.
1196
1197 2019-05-28 Torbjörn Granlund <[email protected]>
1198
1199 * config.sub: Fixes to which cpu types end with a "*".
1200
1201 2019-04-20 Niels Möller <[email protected]>
1202
1203 * doc/gmp.texi (References): Link to paper on subquadratic GCD.
1204
1205 2019-04-19 Torbjörn Granlund <[email protected]>
1206
1207 * mpn/x86_64/bd1/hamdist.asm: Really make 2017-06-01 change: Use
1208 3-operand DEF_OBJECT.
1209
1210 * mpn/x86_64/invert_limb.asm: Simplify mpn_invert_limb_table ref.
1211
1212 * mpn/x86_64/x86_64-defs.m4 (LEA): Use rip addressing for non-PIC.
1213
1214 2019-04-17 Niels Möller <[email protected]>
1215
1216 * mpn/generic/jacobi.c (mpn_jacobi_n): Use JACOBI_DC_THRESHOLD,
1217 not GCD_DC_THRESHOLD. Inconsistency spotted by Seth Troisi.
1218
1219 2019-04-02 Torbjörn Granlund <[email protected]>
1220
1221 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init):
1222 Split out silvermont handling, add handling of goldmont.
1223
1224 * configure.ac: Setup distinct paths for silvermont and goldmont.
1225 (fat_path): Add missing x86_64/goldmont.
1226
1227 * config.guess: Recognise "Goldmont Plus".
1228
1229 2018-12-09 Torbjörn Granlund <[email protected]>
1230
1231 * mpn/generic/mul_fft.c (mpn_fft_add_sub_modF): New function.
1232 (mpn_fft_fft, mpn_fft_fftinv): Use it.
1233
1234 2018-11-30 Torbjörn Granlund <[email protected]>
1235
1236 * mpn/powerpc64/mode64/p9/gmp-mparam.h: New file.
1237
1238 * mpn/powerpc64/mode64/p9/add_n_sub_n.asm: New file.
1239
1240 2018-11-28 Torbjörn Granlund <[email protected]>
1241
1242 * mpn/powerpc64/mode64/p9/sqr_basecase.asm: New file.
1243 * mpn/powerpc64/mode64/p9/mul_1.asm: New file.
1244
1245 2018-11-18 Torbjörn Granlund <[email protected]>
1246
1247 * mpn/powerpc64/mode64/p9/mul_basecase.asm: New file.
1248
1249 * mpn/powerpc64/mode64/p9/addmul_1.asm: Optimise.
1250
1251 2018-11-12 Torbjörn Granlund <[email protected]>
1252
1253 * mpn/powerpc64/mode64/p9/aorsmul_1.asm: New file, providing fast
1254 submul_1 (and redundant addmul_1).
1255
1256 2018-11-11 Torbjörn Granlund <[email protected]>
1257
1258 * mpn/powerpc64/mode64/p9/addmul_1.asm: Tweak for slightly better
1259 speed.
1260
1261 * mpn/powerpc32/powerpc-defs.m4: Define addex.
1262 * mpn/powerpc64/mode64/p9/mul_2.asm: Use it.
1263 * mpn/powerpc64/mode64/p9/addmul_2.asm: Likewise.
1264
1265 2018-11-08 Torbjörn Granlund <[email protected]>
1266
1267 * tests/devel/cnd_aors_n.c: New file.
1268
1269 * mpn/arm/neon/lorrshift.asm: Declare use of neon insns.
1270 * mpn/arm/neon/lshiftc.asm: Likewise + cleanup.
1271
1272 * tests/devel/Makefile.am (EXTRA_PROGRAMS): Add missing files.
1273
1274 * mpn/powerpc64/mode64/p9/mul_2.asm: New file.
1275 * mpn/powerpc64/mode64/p9/addmul_2.asm: New file.
1276
1277 2018-11-07 Marco Bodrato <[email protected]>
1278
1279 * mpz/lucnum2_ui.c: Use mpn_rsblsh1_n if available.
1280 * tests/mpz/t-nextprime.c: Add one more interval.
1281 * tests/mpz/t-pprime_p.c (check_fermat_mersenne): New tests.
1282 * mpn/generic/mod_1_3.c: typo in a comment.
1283 * mpz/nextprime.c: Use tdiv instead of fdiv.
1284
1285 * mpn/generic/fib2m.c: New file, Fibonacci numbers modulo.
1286 * configure.ac (gmp_mpn_functions): Add it.
1287 * gmp-impl.h: Declare mpn_fib2m.
1288 * tests/mpn/t-fib2m.c: New file, tests for mpn_fib2m.
1289 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-fib2m.
1290
1291 * mpn/generic/mod_34lsub1.c: Initialise c[012] once.
1292 * tests/mpz/t-pprime_p.c (check_primes): Two more primes.
1293 * tests/mp?: Use TESTS_REPS in many files.
1294
1295 * mpn/generic/strongfibo.c: New file, Fibonacci primality test.
1296 * configure.ac (gmp_mpn_functions): Add it.
1297 * gmp-impl.h: Declare mpn_strongfibo.
1298
1299 * mpz/stronglucas.c: New file, strong Lucas primality test.
1300 * Makefile.am (MPZ_OBJECTS): Add it.
1301 * mpz/Makefile.am (libmpz_la_SOURCES): Add it.
1302 * gmp-impl.h: Declare mpz_stronglucas.
1303
1304 * mpz/millerrabin.c: Implement BPSW test for primality.
1305
1306 2018-11-07 Torbjörn Granlund <[email protected]>
1307
1308 * configure.ac (arm): Support a12 and a17.
1309 * config.sub: Generalise arm matching.
1310 * config.guess: Recognise additional arm CPUs.
1311
1312 * mpn/arm/arm-defs.m4 (ASM_START): Provide local definition.
1313
1314 2018-10-30 Torbjörn Granlund <[email protected]>
1315
1316 * mpn/arm/v7a/cora17/mod_34lsub1.asm: New file.
1317 * mpn/arm/v7a/cora17/gmp-mparam.h: New file.
1318 * mpn/arm/v7a/cora17/mul_1.asm: New grabber file.
1319 * mpn/arm/v7a/cora17/addmul_1.asm: Likewise.
1320 * mpn/arm/v7a/cora17/submul_1.asm: Likewise.
1321
1322 2018-10-18 Marco Bodrato <[email protected]>
1323
1324 * mpn/generic/fib2_ui.c: Simplify the possible -2 case.
1325
1326 2018-07-19 Marco Bodrato <[email protected]>
1327
1328 * mpz/millerrabin.c (mod_eq_m1): New function, equality with -1.
1329 * mpz/powm_ui.c: Small optimisations.
1330
1331 2018-07-03 Torbjörn Granlund <[email protected]>
1332
1333 * mpn/x86_64/lshift.asm: Remove cnt = 1 special code.
1334
1335 * mpn/x86_64/silvermont/popcount.asm: Add missing ABI_SUPPORT decls.
1336 * mpn/x86_64/silvermont/hamdist.asm: Likewise.
1337 * mpn/x86_64/zen/mul_1.asm: Likewise.
1338
1339 * mpn/x86_64/fastsse/lshift.asm: Support DOS64.
1340 * mpn/x86_64/fastsse/lshiftc.asm: Likewise.
1341
1342 * mpn/x86_64/pentium4/gmp-mparam.h: Retune.
1343
1344 2018-07-01 Torbjörn Granlund <[email protected]>
1345
1346 * lshift.asm: Replace with grabber file.
1347 * lshiftc.asm: Replace with grabber file.
1348 * x86_64/pentium4/addmul_2.asm: New grabber file.
1349 * x86_64/pentium4/aorsmul_1.asm: New grabber file.
1350 * x86_64/pentium4/mul_1.asm: New grabber file.
1351 * x86_64/pentium4/mul_2.asm: New grabber file.
1352 * x86_64/pentium4/mul_basecase.asm: New grabber file.
1353 * x86_64/pentium4/mullo_basecase.asm: New grabber file.
1354 * x86_64/pentium4/redc_1.asm: New grabber file.
1355 * x86_64/pentium4/sqr_basecase.asm: New grabber file.
1356
1357 2018-06-13 Niels Möller <[email protected]>
1358
1359 * mpn/generic/gcd_1.c (mpn_gcd_1): Delete unused code variant for
1360 GCD_1_METHOD == 1, and delete GCD_1_METHOD macro. Simplify the
1361 structure of the remaining code variant, without gotos to the
1362 mid-loop strip_u_maybe label.
1363
1364 2018-05-30 Torbjörn Granlund <[email protected]>
1365
1366 * configure.ac (x86): Provide goldmont specific path.
1367
1368 * mpn/x86_64/goldmont/gmp-mparam.h: New file.
1369
1370 2018-05-29 Torbjörn Granlund <[email protected]>
1371
1372 * configure.ac (x86): Pass more exact arch/tune options for nehalem.
1373
1374 2018-05-28 Niels Möller <[email protected]>
1375
1376 * mpn/generic/gcd_1.c (mpn_gcd_1) [USE_ZEROTAB]: Delete unused code
1377 variant for USE_ZEROTAB != 0.
1378
1379 2018-05-20 Marco Bodrato <[email protected]>
1380
1381 * bootstrap.c: Define DONT_USE_FLOAT_H before including mini-gmp.
1382
1383 2018-05-14 Marco Bodrato <[email protected]>
1384
1385 * mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n): Decl. static.
1386 (mpn_dcpi1_bdiv_q_n_itch): Declare static.
1387 * mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q_n): static.
1388 * mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): static.
1389 * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_choose_in): static.
1390 * mpn/generic/mu_divappr_q.c (mpn_preinv_mu_divappr_q): static.
1391 (mpn_mu_divappr_q_choose_in): static.
1392 * gmp-impl.h: Remove declaration of previous functions.
1393
1394 * mpn/generic/get_d.c: Enhance generic code using DBL_MANT_DIG.
1395
1396 * printf/repl-vsnprintf.c: Better handling floating-point
1397 specifiers "EeGgFf" (Thanks Vincent Lefevre).
1398
1399 2018-05-04 Marco Bodrato <[email protected]>
1400
1401 * doc/gmp.texi (mpq_*_str): Document the full base allowed range.
1402 * mpq/get_str.c: Make all bases either work or return an error.
1403
1404 * doc/gmp.texi (Integer Internals): Lazy allocation and read-only.
1405
1406 2018-04-27 Niels Möller <[email protected]>
1407
1408 * mpn/generic/div_q.c (mpn_div_q): Replace dead code with ASSERT.
1409 Spotted by Paul Zimmermann and Raphaël Rieu-Hleft.
1410
1411 * tests/mpn/t-div.c (main): Fill quotient area with junk before
1412 calling mpn_div_q.
1413
1414 2018-04-26 Marco Bodrato <[email protected]>
1415
1416 * Makefile.am (EXTRA_DIST): Add mini-gmp/mini-mpq.[ch].
1417
1418 2018-04-23 Marco Bodrato <[email protected]>
1419
1420 * mpn/generic/toom2_sqr.c: Handle the cy=-1 branch slightly faster.
1421 * mpn/generic/toom22_mul.c: Likewise. (Thanks Paul and Raphaël!)
1422
1423 2018-04-22 Niels Möller <[email protected]>
1424
1425 From Martin Storsjö:
1426 * configure.ac (aarch64): Just as on windows/x86_64, "long" still
1427 is 32 bit on aarch64. To distinguish between 32-bit and 64-bit
1428 ABI, test sizeof(void*) instead of sizeof(long). Use long long for
1429 mp_limb_t for mingw targets.
1430 * acinclude.m4 (GMP_C_TEST_SIZEOF): Allow '*' in the type name,
1431 e.g., void*.
1432
1433 2018-04-18 Marc Glisse <[email protected]>
1434
1435 * mpq/clear.c: Handle lazy numerator.
1436 * mpq/clears.c: Likewise.
1437 * mpq/init.c: Likewise.
1438 * mpq/set_si.c: Likewise.
1439 * mpq/set_ui.c: Likewise.
1440
1441 * tests/cxx/t-ops2z.cc: Add parentheses to quiet a warning.
1442
1443 2018-03-28 Torbjörn Granlund <[email protected]>
1444
1445 * configure.ac (mips): Recognise "mipsisa64*".
1446
1447 2018-03-23 Torbjörn Granlund <[email protected]>
1448
1449 * mpn/generic/sec_powm.c: Remove unused macros.
1450 Simplify code for choosing between redc_1 and redc_2.
1451 Compute power table with squaring for even powers.
1452
1453 2018-02-28 Marco Bodrato <[email protected]>
1454
1455 * gmpxx.h (__gmp_binary_plus): Special case for mpq + 1.
1456 (__gmp_binary_minus): Special case for mpq - 1.
1457 (__gmp_binary_equal): Optimised comparison mpq == integer.
1458 * tests/cxx/t-ops2qf.cc (checkqf): Some check for +/- 1, +/- 0.
1459
1460 2018-02-18 Marco Bodrato <[email protected]>
1461
1462 * tune/Makefile.am: Disallow parallel make (thanks Vincent Lefevre).
1463 * mpq/swap.c: Use *_SWAP_* macros.
1464 * mpq/cmp_ui.c: One more little shortcut, comparing fractions to 1.
1465 * mpq/get_d.c: Compare (zeros > 0) once, replace tdiv_qr with div_q.
1466 * mpq/equal.c: Check size early.
1467
1468 * printf/obprintf.c: Adda dummy typedef to avoid empty unit.
1469 * printf/obvprintf.c: Likewise.
1470 * printf/obprntffuns.c: Likewise.
1471 * printf/repl-vsnprintf.c: Move #ifdef after #include gmp-impl.h .
1472
1473 2018-02-09 Torbjörn Granlund <[email protected]>
1474
1475 * mpn/arm: Really revert 2018-01-04 changes.
1476
1477 2018-02-08 Marco Bodrato <[email protected]>
1478
1479 * printf/snprntffuns.c: Report -1 as an error.
1480 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Refuse -1 as return value.
1481
1482 * mpz/bin_uiui.c (mpz_smallk_bin_uiui): One more shortcut for small k.
1483 * gmp-impl.h (popc_limb): Use fewer constants (GMP_LIMB_BITS == 16).
1484 * mpz/divegcd.c (mpz_divexact_limb): Use MPN_DIVREM_OR_DIVEXACT_1.
1485 * primesieve.c (fill_bitpattern): Use MPN_FILL.
1486
1487 2018-02-01 Marc Glisse <[email protected]>
1488
1489 * longlong.h (i586): Remove assert.
1490
1491 2018-01-30 Marco Bodrato <[email protected]>
1492
1493 * mpz/and.c: Rearrange the 3 cases, both <0, both >=0, one and one.
1494 * mpz/ior.c: Likewise.
1495 * mpz/xor.c: Likewise.
1496
1497 * mpz/bin_uiui.c (mul[4-8]): Reduce the number of multiplications.
1498
1499 * printf/doprnt.c: Use __GMP_FREE_FUNC_TYPE.
1500 * printf/doprntf.c: Likewise.
1501 * printf/snprntffuns.c: Likewise, and use size_t instead of int.
1502
1503 2018-01-15 Marco Bodrato <[email protected]>
1504
1505 * tests/mpz/t-bin.c: Extended tests for bin_ui and uint border cases.
1506
1507 2018-01-10 Torbjörn Granlund <[email protected]>
1508
1509 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Fix old pentium recog.
1510 * config.guess: Likewise.
1511
1512 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Add many 64-bit CPUs.
1513
1514 2018-01-07 Torbjörn Granlund <[email protected]>
1515
1516 * mpn/arm: Revert last change, it hides a symbol needed for testing.
1517
1518 2018-01-04 Torbjörn Granlund <[email protected]>
1519
1520 * bdiv_q_1.asm (binvert_limb_table): Declare as ".hidden".
1521 * v7a/cora8/bdiv_q_1.asm: Likewise.
1522 * dive_1.asm: Likewise.
1523 * v6/dive_1.asm: Likewise.
1524
1525 * mode1o.asm (binvert_limb_table): Remove ".protected", add ".hidden".
1526 * v6/mode1o.asm: Likewise.
1527
1528 2018-01-02 Torbjörn Granlund <[email protected]>
1529
1530 * mpn/powerpc64/mode64/divrem_2.asm: Use different rlwinm variant (to
1531 appease clang).
1532
1533 2018-01-01 Torbjörn Granlund <[email protected]>
1534
1535 * mpn/powerpc32/powerpc-defs.m4: Define maddld, maddhdu, popcntd, and
1536 divdeu.
1537 * mpn/powerpc64/mode64/p8/invert_limb.asm: Use new insn defs.
1538 * mpn/powerpc64/mode64/p9/addmul_1.asm: Use new insn defs.
1539 * mpn/powerpc64/p7/hamdist.asm: Use new insn defs.
1540 * mpn/powerpc64/p7/popcount.asm: Use new insn defs.
1541
1542 2017-12-31 Torbjörn Granlund <[email protected]>
1543
1544 * mpn/powerpc64/mode64/p9/addmul_1.asm: Moved from
1545 mpn/powerpc64/p9/addmul_1.asm.
1546
1547 2017-12-30 Marco Bodrato <[email protected]>
1548
1549 * mpz/bin_ui.c: Rewrite, using Fredrik Johansson's suggestions.
1550
1551 2017-12-27 Niels Möller <[email protected]>
1552
1553 * longlong.h (arm32/arm64): Leave COUNT_LEADING_ZEROS_0 undefined,
1554 since we use gcc's __builtin_clzl, which doesn't allow zero inputs.
1555
1556 2017-12-27 Torbjörn Granlund <[email protected]>
1557
1558 * mpn/powerpc64/mode64/bdiv_q_1.asm: Use 64-bit cmp for sizes.
1559
1560 * mpn/powerpc64/p9/addmul_1.asm: New file.
1561
1562 * configure.ac: Separate handling of POWER8 and POWER9.
1563
1564 * config.guess: Recognise POWER9 and more variants of POWER8.
1565 Reorder recog code to favour PVR over proc/cpuinfo.
1566
1567 2017-12-14 Torbjörn Granlund <[email protected]>
1568
1569 * mpn/x86_64/fastsse/com.asm: Adhere to DOS64 xmm callee-saves rules.
1570 * mpn/x86_64/fastsse/com-palignr.asm: Likewise.
1571 * mpn/x86_64/fastsse/copyd.asm: Likewise.
1572 * mpn/x86_64/fastsse/copyi.asm: Likewise.
1573 * mpn/x86_64/fastsse/lshiftc.asm: Likewise.
1574 * mpn/x86_64/fastsse/sec_tabselect.asm: Likewise.
1575
1576 2017-12-11 Torbjörn Granlund <[email protected]>
1577
1578 * mpn/x86_64/bd1/aorrlsh_n.asm: New grabber file.
1579
1580 2017-12-10 Torbjörn Granlund <[email protected]>
1581
1582 * mpn/x86_64/bd1/aors_n.asm: New grabber file.
1583
1584 * mpn/x86_64/bd4/aorrlsh_n.asm: New grabber file.
1585
1586 2017-08-31 Torbjörn Granlund <[email protected]>
1587
1588 * mpn/sparc32/sparc-defs.m4 (LEA64): Rewrite for both PIC and non-PIC.
1589
1590 * mpn/sparc64/ultrasparct3/cnd_aors_n.asm: Allow arbitrary cnd arg.
1591
1592 2017-08-29 Torbjörn Granlund <[email protected]>
1593
1594 * mpn/x86_64/silvermont/gmp-mparam.h: Disable mul_2 and addmul_2.
1595
1596 2017-08-28 Torbjörn Granlund <[email protected]>
1597
1598 * mpn/sparc64: Revert 2017-07-23 PIC changes.
1599
1600 * mpn/powerpc32/divrem_2.asm: Avoid bc+ insn form to accommodate clang.
1601
1602 * mpn/generic/sbpi1_bdiv_qr.c: Correct ASSERT.
1603 * mpn/generic/sbpi1_bdiv_q.c: Likewise.
1604 * mpn/generic/sbpi1_bdiv_r.c: Likewise.
1605
1606 2017-08-18 Torbjörn Granlund <[email protected]>
1607
1608 * acinclude.m4 (X86_64_PATTERN): Match zen*.
1609
1610 * configure.ac (x86): Support AVX challenged systems for Zen.
1611
1612 2017-07-24 Torbjörn Granlund <[email protected]>
1613
1614 * mpn/generic/sbpi1_bdiv_q.c: Add ASSERT for inverse correctness.
1615 * mpn/generic/sbpi1_bdiv_qr.c: Likewise.
1616
1617 * tests/mpn/t-bdiv.c (main): Amend last change.
1618
1619 * tests/devel/try.c (choice_array): Amend 2013-05-03 change to include
1620 more functions.
1621
1622 2017-07-23 Torbjörn Granlund <[email protected]>
1623
1624 * mpn/sparc64/gcd_1.asm: Enforce PIC as GNU/Linux toolchain workaround.
1625 * mpn/sparc64/ultrasparct3/bdiv_q_1.asm: Likewise.
1626 * mpn/sparc64/ultrasparct3/dive_1.asm: Likewise.
1627 * mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
1628 * mpn/sparc64/ultrasparct3/mode1o.asm: Likewise.
1629
1630 * gmp-impl.h: Reorganise foolshC_ip1 -> foolshC -> foolsh chain to make
1631 it transitive.
1632
1633 2017-07-23 Niels Möller <[email protected]>
1634
1635 * longlong.h: Purge definitions of obsolete UMUL_TIME and
1636 UDIV_TIME constants. Also mentioned (but unused) in
1637 mpn/cray/gmp-mparam.h and tune/common.c.
1638
1639 2017-07-21 Torbjörn Granlund <[email protected]>
1640
1641 * tests/mpn/t-bdiv.c (main): Test mpn_sbpi1_bdiv_r.
1642
1643 * tune/common.c (speed_mpn_sbpi1_bdiv_r): New function.
1644 * tune/speed.h: Declare it.
1645 (SPEED_ROUTINE_MPN_PI1_BDIV_R): New macro.
1646 * tune/speed.c (routine): Add mpn_sbpi1_bdiv_r.
1647
1648 2017-07-20 Torbjörn Granlund <[email protected]>
1649
1650 * configure.ac (gmp_mpn_functions): Add sbpi1_bdiv_r.
1651
1652 * gmp-impl.h (mpn_sbpi1_bdiv_r): Declare.
1653
1654 * mpn/asm-defs.m4 (define_mpn): Add sbpi1_bdiv_q, sbpi1_bdiv_qr,
1655 sbpi1_bdiv_r.
1656
1657 * mpn/generic/sbpi1_bdiv_r.c: New file.
1658 * mpn/x86_64/zen/sbpi1_bdiv_r.asm: New file.
1659
1660 2017-07-19 Torbjörn Granlund <[email protected]>
1661
1662 * mpn/x86/p6/sse2/submul_1.asm: Get pentium4 code instead of k6 code
1663 for better speed on modern Intel P6 cores.
1664
1665 2017-07-02 Torbjörn Granlund <[email protected]>
1666
1667 * tune/tuneup.c (tune_mullo): For MULLO_BASECASE_THRESHOLD start at 2.
1668 (tune_sqrlo): Likewise.
1669
1670 2017-06-28 Torbjörn Granlund <[email protected]>
1671
1672 * tests/Makefile.am tests/*/Makefile.am tune/Makefile.am (AM_LDFLAGS):
1673 Define. (Thanks to Emmanuel Thomé and Vincent Lefevre.)
1674
1675 2017-06-27 Torbjörn Granlund <[email protected]>
1676
1677 * mpn/x86_64/zen/sqr_basecase.asm: Expand to use 4 addmul_1 loops.
1678
1679 * mpn/x86_64/x86_64-defs.m4 (sarx): New macro.
1680
1681 2017-06-26 Torbjörn Granlund <[email protected]>
1682
1683 * mpn/x86_64/coreibwl/sqr_basecase.asm: Rewrite to do 2x and limb
1684 squaring in main loop.
1685
1686 2017-06-20 Torbjörn Granlund <[email protected]>
1687
1688 * mpn/x86_64/atom/cnd_add_n.asm: New grabber file.
1689 * mpn/x86_64/atom/cnd_sub_n.asm: Likewise.
1690
1691 * mpn/x86_64/coreihwl/aorrlsh_n.asm: New grabber file.
1692
1693 2017-06-16 Torbjörn Granlund <[email protected]>
1694
1695 * mpn/x86_64/zen/mul_basecase.asm: Do overlapped software pipelining.
1696
1697 * mpn/x86_64/silvermont/mul_basecase.asm: New grabber file.
1698 * mpn/x86_64/silvermont/sqr_basecase.asm: Likewise.
1699 * mpn/x86_64/silvermont/mullo_basecase.asm: Likewise.
1700
1701 2017-06-14 Torbjörn Granlund <[email protected]>
1702
1703 * mpn/x86_64/zen/mullo_basecase.asm: New file.
1704 * mpn/x86_64/coreibwl/mullo_basecase.asm: New file.
1705
1706 2017-06-11 Torbjörn Granlund <[email protected]>
1707
1708 * mpn/x86_64/popham.asm: Crossjump for code size and mix lead-in insns
1709 for lower overhead.
1710
1711 2017-06-09 Torbjörn Granlund <[email protected]>
1712
1713 * configure.ac: Set GMP_NONSTD_ABI protecting against dots in the abi.
1714 (hppa): Remove old GNU/Linux restriction to 32-bit ABI.
1715
1716 2017-06-07 Torbjörn Granlund <[email protected]>
1717
1718 * mpn/x86_64/bd1/addmul_2.asm: New file.
1719
1720 2017-06-06 Torbjörn Granlund <[email protected]>
1721
1722 * mpn/x86_64/coreihwl/aors_n.asm: New file.
1723
1724 * mpn/x86_64/x86_64-defs.m4 (c4_helper): New macro.
1725 (mulx, shlx, shrx): Use c4_helper.
1726
1727 * mpn/x86_64/zen/mul_basecase.asm: Use 8-bit imm operands for "test".
1728
1729 * mpn/x86_64/zen/aorrlsh1_n.asm: New grabber file.
1730 * mpn/x86_64/zen/sublsh1_n.asm: Likewise.
1731 * mpn/x86_64/zen/aorrlsh_n.asm: New file
1732
1733 2017-06-04 Torbjörn Granlund <[email protected]>
1734
1735 * configure.ac: Use bt1/bt2 for bobcat and jaguar dirs.
1736 (fat_path): Add x86_64/bt2.
1737
1738 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.
1739 Make zen path correspond to non-fat path.
1740 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.
1741
1742 * mpn/x86_64/bt2/copyi.asm: New grabber file.
1743 * mpn/x86_64/bt2/copyd.asm: New grabber file.
1744 * mpn/x86_64/bt2/com.asm: New grabber file.
1745
1746 2017-06-03 Torbjörn Granlund <[email protected]>
1747
1748 * mpn/x86_64/bd1/popcount.asm: Expand some instructions as .byte
1749 sequences.
1750 * mpn/x86_64/bd1/hamdist.asm: Likewise.
1751
1752 2017-06-02 Torbjörn Granlund <[email protected]>
1753
1754 * mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Fix quoting (amends recent
1755 change).
1756 (JUMPTABSECT): Get rid of spurious "w".
1757
1758 2017-06-02 Marc Glisse <[email protected]>
1759
1760 * gmpxx.h (mpf_class::operator bool): Use mpf_sgn to access _mp_size.
1761
1762 2017-06-02 Torbjörn Granlund <[email protected]>
1763
1764 * mpn/x86_64/bd1/popcount.asm: Use both SSE and XOP trickery, and
1765 plain popcnt insn.
1766 * mpn/x86_64/bd1/hamdist.asm: Likewise.
1767
1768 2017-06-01 Torbjörn Granlund <[email protected]>
1769
1770 * mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Allow 3rd argument defining
1771 section, while making alignment argument non-optional.
1772
1773 * mpn/x86_64/core2/popcount.asm: Use 3-operand DEF_OBJECT.
1774 * mpn/x86_64/core2/hamdist.asm: Likewise.
1775 * mpn/x86_64/bd1/popcount.asm: Likewise.
1776 * mpn/x86_64/bd1/hamdist.asm: Likewise.
1777
1778 * configure.ac (GMP_AVX_NOT_REALLY_AVAILABLE): New m4 define.
1779 * mpn/x86_64/bd1/popcount.asm: Use GMP_AVX_NOT_REALLY_AVAILABLE.
1780 * mpn/x86_64/bd1/hamdist.asm: Likewise.
1781
1782 * mpn/x86_64/silvermont/popcount.asm: Reinstate, grabbing nehalem code.
1783 * mpn/x86_64/silvermont/hamdist.asm: Replace with grabber.
1784
1785 2017-05-31 Torbjörn Granlund <[email protected]>
1786
1787 * mpn/x86_64/silvermont/popcount.asm: Remove.
1788
1789 * mpn/x86_64/core2/logops_n.asm: New file.
1790
1791 2017-05-30 Torbjörn Granlund <[email protected]>
1792
1793 * mpn/x86_64/coreisbr/popcount.asm: Remove.
1794
1795 2017-05-29 Torbjörn Granlund <[email protected]>
1796
1797 * mpn/x86_64/coreinhm/popcount.asm: Replace grabber code with
1798 implementation proper.
1799 * mpn/x86_64/coreinhm/hamdist.asm: Likewise.
1800 * mpn/x86_64/bd1/popcount.asm: Likewise.
1801 * mpn/x86_64/bd1/hamdist.asm: Likewise.
1802 * mpn/x86_64/core2/popcount.asm: Likewise.
1803 * mpn/x86_64/core2/hamdist.asm: New file.
1804
1805 2017-05-22 Torbjörn Granlund <[email protected]>
1806
1807 * mpn/x86_64/core2/com.asm: New grabber file.
1808
1809 * mpn/x86_64/core2/lshift.asm: Rewrite.
1810 * mpn/x86_64/core2/rshift.asm: Rewrite.
1811 * mpn/x86_64/core2/lshiftc.asm: Rewrite.
1812
1813 2017-05-16 Torbjörn Granlund <[email protected]>
1814
1815 * mpn/x86_64/zen/mul_1.asm: Port to DOS64.
1816 * mpn/x86_64/zen/aorsmul_1.asm: Likewise.
1817 * mpn/x86_64/coreibwl/addmul_1.asm: Likewise.
1818
1819 2017-05-16 Niels Möller <[email protected]>
1820
1821 * mpn/generic/divis.c (mpn_divisible_p): Updated the divisibility
1822 test; bdiv now returns R = D rather than R = 0 when D divides a
1823 non-zero U.
1824
1825 * mpn/generic/binvert.c (mpn_binvert): Negate bdiv quotient.
1826 * mpn/generic/divexact.c (mpn_divexact): Likewise.
1827 * mpn/generic/remove.c (mpn_remove): Likewise.
1828 * mpz/bin_uiui.c (mpz_bdiv_bin_uiui): Likewise.
1829
1830 * tests/mpn/t-bdiv.c (check_one): Updated to new convention,
1831 B^{qn} R = U + QD.
1832
1833 * mpn/generic/sbpi1_bdiv_qr.c (mpn_sbpi1_bdiv_qr): Reimplemented,
1834 for new bdiv convention.
1835 * mpn/generic/sbpi1_bdiv_q.c (mpn_sbpi1_bdiv_q): Likewise.
1836 * mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n)
1837 (mpn_dcpi1_bdiv_q): Adapted to new bdiv convention.
1838 * mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n)
1839 (mpn_dcpi1_bdiv_qr): Likewise.
1840 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr): Adapted to new bdiv
1841 convention, using a wrapper calling the old function.
1842 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q): Likewise.
1843
1844 2017-05-03 Torbjörn Granlund <[email protected]>
1845
1846 * mpn/x86_64/coreisbr/cnd_aors_n.asm: New file.
1847 * mpn/x86_64/coreisbr/cnd_add_n.asm: New file.
1848
1849 * mpn/x86_64/core2/aorsmul_1.asm: Tune.
1850
1851 * mpn/x86_64/silvermont/mul_1.asm: New file, grabbing another asm file.
1852 * mpn/x86_64/silvermont/aorsmul_1.asm: Likewise.
1853 * mpn/x86_64/silvermont/aorrlsh1_n.asm: Likewise.
1854 * mpn/x86_64/silvermont/aorrlsh2_n.asm: Likewise.
1855 * mpn/x86_64/silvermont/lshift.asm: Likewise.
1856 * mpn/x86_64/silvermont/rshift.asm: Likewise.
1857 * mpn/x86_64/silvermont/lshiftc.asm: Likewise.
1858
1859 * mpn/x86_64/zen/mul_basecase.asm: Split outer loop into 4 loops.
1860
1861 2017-05-02 Torbjörn Granlund <[email protected]>
1862
1863 * mpn/x86_64/zen/sqr_basecase.asm: Use .byte for encoding all mulx.
1864 Misc tuning.
1865
1866 2017-04-27 Torbjörn Granlund <[email protected]>
1867
1868 * mpn/x86_64/zen/sqr_basecase.asm: Rewrite to do 2x and limb squaring
1869 in main loop.
1870
1871 2017-04-25 Torbjörn Granlund <[email protected]>
1872
1873 * mpn/x86_64/fat/fat_entry.asm: Allocate correct DOS64 frame.
1874 * mpn/x86_64/divrem_2.asm: Likewise.
1875 * mpn/x86_64/mod_1_2.asm: Likewise.
1876 * mpn/x86_64/mod_1_4.asm: Likewise.
1877 * mpn/x86_64/mod_1_1.asm: Likewise.
1878
1879 2017-04-23 Torbjörn Granlund <[email protected]>
1880
1881 * mpn/x86_64/coreisbr/mul_1.asm: Rewrite feed-in code and add mul_1c
1882 entry point.
1883
1884 2017-04-17 Torbjörn Granlund <[email protected]>
1885
1886 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Amend last change.
1887
1888 * mpn/x86_64/zen/mul_basecase.asm: New file.
1889 * mpn/x86_64/zen/sqr_basecase.asm: New file.
1890
1891 2017-04-16 Torbjörn Granlund <[email protected]>
1892
1893 * mpn/generic/sqr_basecase.c (addmul_1 variant): Rewrite to compute
1894 in-place and to avoid a re-computation.
1895
1896 * configure.ac: Remove k8, k10 from zen path.
1897
1898 2017-04-15 Torbjörn Granlund <[email protected]>
1899
1900 * mpn/x86_64/zen/gmp-mparam.h: New file.
1901
1902 * mpn/x86_64/zen/com.asm: New file, grabbing another asm file.
1903 * mpn/x86_64/zen/copyd.asm: Likewise.
1904 * mpn/x86_64/zen/copyi.asm: Likewise.
1905 * mpn/x86_64/zen/gcd_1.asm: Likewise.
1906 * mpn/x86_64/zen/hamdist.asm: Likewise.
1907 * mpn/x86_64/zen/lshift.asm: Likewise.
1908 * mpn/x86_64/zen/lshiftc.asm: Likewise.
1909 * mpn/x86_64/zen/popcount.asm: Likewise.
1910 * mpn/x86_64/zen/rshift.asm: Likewise.
1911
1912 * config.guess: Recognise AMD zen.
1913 * acinclude.m4 (X86_64_PATTERN): Add zen.
1914 * config.sub: Corresponding changes.
1915 * configure.ac: Corresponding changes.
1916 * mpn/x86_64/fat/fat.c: Corresponding changes.
1917
1918 2017-03-27 Marco Bodrato <[email protected]>
1919
1920 * mpz/oddfac_1.c (limb_apprsqrt): Better approximation.
1921 * mpz/bin_uiui.c (limb_apprsqrt): Likewise.
1922
1923 2017-03-12 Torbjörn Granlund <[email protected]>
1924
1925 * tests/mpf/t-get_d_2exp.c (check_data): Rewrite of check_onebit.
1926
1927 2017-03-08 Marco Bodrato <[email protected]>
1928
1929 * mpn/generic/sqrtrem.c: Direct use of sqrtrem2 when n==2.
1930 * mpn/generic/div_qr_2.c (udiv_qr_4by2): Replace add_csaac with add_sssaaaa.
1931
1932 2017-03-07 Torbjörn Granlund <[email protected]>
1933
1934 * mpf/get_d_2exp.c: Return negative value for negative input.
1935
1936 2017-03-06 Torbjörn Granlund <[email protected]>
1937
1938 * longlong.h (aarch64): Provide asm-free umul_ppmm.
1939 * longlong.h (powerpc64): Enable asm-free umul_ppmm.
1940
1941 2017-03-04 Torbjörn Granlund <[email protected]>
1942
1943 * mpn/arm64/sqr_diag_addlsh1.asm: Complete rewrite.
1944
1945 2017-02-27 Torbjörn Granlund <[email protected]>
1946
1947 * longlong.h (arm32/arm64): Remove useless comparison to 0 introduced
1948 in last change (spotted by Marco).
1949
1950 2017-02-26 Marco Bodrato <[email protected]>
1951
1952 * mpn/generic/pow_1.c: Use umul_ppmm for a single limb.
1953
1954 2017-02-25 Torbjörn Granlund <[email protected]>
1955
1956 * configure.ac: Allow MP_SIZE_T_MAX for thresholds exported to
1957 config.m4.
1958
1959 * mpn/x86_64/gcd_1.asm: Handle BMOD_1_TO_MOD_1_THRESHOLD=MP_SIZE_T_MAX.
1960 Streamline non-reduction path.
1961 * mpn/x86_64/core2/gcd_1.asm: Streamline small operands cases similarly
1962 to top-level code.
1963
1964 2017-02-24 Torbjörn Granlund <[email protected]>
1965
1966 * longlong.h (arm32/arm64 add_ssaaaa): Use "subs" for some immediates.
1967 * longlong.h (arm32/arm64 sub_ddmmss): Use "adds" for some immediates.
1968
1969 * mpn/arm64/copyi.asm: Avoid branching on flags.
1970 * mpn/arm64/copyd.asm: Likewise.
1971
1972 * mpn/generic/div_qr_2.c (aarch64 add_sssaaaa): New.
1973 * mpn/generic/div_qr_1n_pi2.c: Same.
1974 * mpn/generic/div_qr_1u_pi2.c: Same.
1975
1976 * mpn/generic/div_qr_2.c (powerpc add_sssaaaa): Fix typo.
1977 * mpn/generic/div_qr_1n_pi2.c: Same.
1978 * mpn/generic/div_qr_1u_pi2.c: Same.
1979
1980 2017-02-23 Marco Bodrato <[email protected]>
1981
1982 * tests/devel/sqrtrem_1_2.c: New exhaustive test for sqrtrem_[12].
1983 * tests/devel/Makefile.am (EXTRA_PROGRAMS): add it.
1984
1985 2017-02-23 Torbjörn Granlund <[email protected]>
1986
1987 * mpn/x86_64/silvermont/gmp-mparam.h: New file.
1988
1989 2017-02-22 Torbjörn Granlund <[email protected]>
1990
1991 * mpn/arm64/aorsmul_1.asm: Rewrite.
1992
1993 * mpn/arm64/lshiftc.asm: New file.
1994
1995 2017-02-21 Torbjörn Granlund <[email protected]>
1996
1997 * mpn/arm64/lshift.asm: Rewrite.
1998 * mpn/arm64/rshift.asm: Rewrite.
1999
2000 * mpn/arm64/rsh1aors_n.asm: New file.
2001
2002 2017-02-19 Torbjörn Granlund <[email protected]>
2003
2004 * mpn/arm64/mul_1.asm: Rewrite.
2005 * mpn/arm64/xgene1/mul_1.asm: Remove.
2006
2007 2017-02-17 Torbjörn Granlund <[email protected]>
2008
2009 * mpn/arm64/cora53/cnd_aors_n.asm: Moved from "..".
2010
2011 * mpn/arm64/xgene1/cnd_aors_n.asm: Remove file since default code
2012 performs better.
2013
2014 * mpn/arm64/cnd_aors_n.asm: Rewrite.
2015
2016 * mpn/arm64/logops_n.asm: Rewrite based on new aors_n.asm.
2017
2018 2017-02-16 Pedro Gimeno <[email protected]>
2019
2020 * rand/randmt.c (__gmp_randiset_mt): Set generator functions from
2021 source.
2022
2023 2017-02-16 Torbjörn Granlund <[email protected]>
2024
2025 * mpn/arm64/aorsorrlshC_n.asm: New file.
2026 * mpn/arm64/aorsorrlsh2_n.asm: New file.
2027 * mpn/arm64/aorsorrlsh1_n.asm: New file.
2028
2029 * mpn/arm64/xgene1/aors_n.asm: Remove file since default code now
2030 performs similarly.
2031
2032 * mpn/arm64/aors_n.asm: Rewrite to use 4x unrolling.
2033
2034 2017-02-15 Torbjörn Granlund <[email protected]>
2035
2036 * mpn/x86_64/silvermont/hamdist.asm: New file, based on k10 code.
2037
2038 * mpn/x86_64/silvermont/popcount.asm: Grab coreisbr/popcount.asm.
2039
2040 2017-02-14 Torbjörn Granlund <[email protected]>
2041
2042 * mpn/x86_64/silvermont/aors_n.asm: New file, grabbing coreisbr code.
2043
2044 * mpn/x86_64/atom/aors_n.asm: Replace coreisbr grabbing code with
2045 code based on Marco's x64/atom/aors_n.asm.
2046
2047 2017-02-12 Torbjörn Granlund <[email protected]>
2048
2049 * mpn/powerpc64/aix.m4 (AIX): New define.
2050
2051 * mpn/powerpc64/mode64/bdiv_q_1.asm: For AIX, don't jump from
2052 mpn_bdiv_q_1 to middle of mpn_pi1_bdiv_q_1. Streamline.
2053
2054 * mpn/powerpc64/darwin.m4 (LEA): Put code in lea_list instead of in
2055 EPILOGUE_cpu.
2056 (EPILOGUE_cpu): Output lea_list, the zap it.
2057
2058 * mpn/sparc64/ultrasparct3/bdiv_q_1.asm: New file, based on dive_1.asm.
2059
2060 2017-02-11 Torbjörn Granlund <[email protected]>
2061
2062 * mpn/arm/v7a/cora8/bdiv_q_1.asm: New file, based on v6/dive_1.asm.
2063 * mpn/arm/v7a/cora9/bdiv_q_1.asm: New file, grabbing cora8 code.
2064 * mpn/arm/v7a/cora15/bdiv_q_1.asm: Likewise.
2065
2066 * mpn/arm64/aors_n.asm: (SETCY, RETVAL): Shorten insn sequences.
2067 * mpn/arm64/cnd_aors_n.asm: Likewise.
2068 * mpn/arm64/xgene1/aors_n.asm: Likewise.
2069 * mpn/arm64/xgene1/cnd_aors_n.asm: Likewise.
2070
2071 * mpn/arm/bdiv_q_1.asm: New file, based on dive_1.asm.
2072
2073 * mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Remove odd d special case.
2074
2075 * mpn/powerpc64/mode64/bdiv_q_1.asm: New file.
2076
2077 * mpn/arm64/bdiv_q_1.asm: New file.
2078
2079 2017-02-10 Torbjörn Granlund <[email protected]>
2080
2081 * mpn/arm/arm-defs.m4 (EPILOGUE_cpu): Zap lea_list to avoid repetition.
2082
2083 * mpn/x86_64/bdiv_q_1.asm: Rewrite, base on atom/dive_1.asm.
2084
2085 2017-02-08 Torbjörn Granlund <[email protected]>
2086
2087 * mpn/generic/compute_powtab.c: Choose mpn_pi1_bdiv_q_1 vs
2088 mpn_divexact_1 more wisely (spotted by Marco).
2089
2090 2017-02-07 Torbjörn Granlund <[email protected]>
2091
2092 * tune/tuneup.c (relspeed_div_1_vs_mul_1): Prefer mpn_pi1_bdiv_q_1.
2093
2094 * mpn/generic/compute_powtab.c: Use mpn_pi1_bdiv_q_1/mpn_bdiv_q_1
2095 instead of mpn_divexact_1.
2096
2097 * gen-bases.c (binvert): New function, computing modular inverse and
2098 low zero count.
2099 (header): Print MP_BASES_BIG_BASE_CTZ_10 and
2100 MP_BASES_BIG_BASE_BINVERTED_10.
2101
2102 2017-02-06 Torbjörn Granlund <[email protected]>
2103
2104 * mpn/generic/bdiv_q_1.c: Make return value consistent.
2105
2106 * mpn/x86/p6/mmx/gmp-mparam.h (SQR_TOOM2_THRESHOLD): Revert to bogus
2107 value to accommodate p6/sqr_basecase.asm fragility.
2108
2109 2017-01-29 Marco Bodrato <[email protected]>
2110
2111 * mpz/and.c: Simplify branches.
2112 * mpz/ior.c: Likewise.
2113 * mpz/xor.c: Likewise.
2114
2115 * gen-bases.c: In generated file, include just gmp-impl.h, not gmp.h
2116
2117 2017-01-29 Torbjörn Granlund <[email protected]>
2118
2119 * configure.ac: Don't check if we got a C99 compiler for now (partially
2120 revert 2017-01-24 change as C++ compilers become rejected).
2121
2122 2017-01-24 Torbjörn Granlund <[email protected]>
2123
2124 * mpn/generic/compute_powtab.c: New file, providing mpn_compute_powtab
2125 for both get_str and set_str.
2126
2127 * gmp-impl.h (mpn_str_powtab_alloc): New macro.
2128 (mpn_dc_set_str_powtab_alloc, mpn_dc_get_str_powtab_alloc): Remove.
2129 (mpn_compute_powtab): Declare.
2130
2131 * mpn/generic/set_str.c: Use mpn_compute_powtab.
2132 (mpn_set_str_compute_powtab): Remove.
2133
2134 * mpn/generic/get_str.c: Use mpn_compute_powtab.
2135 (mpn_get_str_compute_powtab): Remove.
2136 (mpn_bc_get_str): New name for mpn_sb_get_str.
2137
2138 * configure.ac (gmp_mpn_functions): Add compute_powtab.
2139
2140 * tune/tuneup.c (speed_mpn_pre_set_str): Call mpn_compute_powtab.
2141 * tune/set_strb.c: Remove mpn_set_str_compute_powtab name mangling.
2142 * tune/set_strs.c: Likewise.
2143
2144 * configure.ac: Invoke AC_PROG_CC_C99 instead of AC_PROG_CC_STDC.
2145
2146 2017-01-03 Torbjörn Granlund <[email protected]>
2147
2148 * configure.ac (arm*-*-*): Properly point to cortex-a5 subdir.
2149
2150 2016-12-31 Torbjörn Granlund <[email protected]>
2151
2152 * tune/tuneup.c (relspeed_div_1_vs_mul_1): New function.
2153
2154 2016-12-28 Marco Bodrato <[email protected]>
2155
2156 * tune/common.c (speed_mpz_mfac_uiui, speed_mpz_invert): New
2157 functions.
2158 * tune/speed.h: Declare them.
2159 * tune/speed.c (routine): Add mpz_mfac_uiui, mpz_invert.
2160
2161 * tests/mpz/t-primorial_ui.c: Add randomization to the test.
2162 * mpz/tdiv_r.c: Reduce allocation in some corner-case conditions.
2163 * mpz/tdiv_r_2exp.c: Rearrange counting non-zero limbs.
2164 * mpz/tdiv_q.c: Move common code out of some branches.
2165 * mpz/and.c: Alloc only when needed.
2166 * mpz/xor.c: Reorder branches.
2167 * mpz/gcd.c: Reorder branches.
2168 * mpz/pprime_p.c: Save the initial branch of a loop.
2169 * mpn/generic/divrem.c: Save an allocation.
2170
2171 2016-12-26 Torbjörn Granlund <[email protected]>
2172
2173 * longlong.h (x86_64 umul_ppmm): Add mulx variant (not automatically
2174 used).
2175
2176 2016-12-17 Marco Bodrato <[email protected]>
2177
2178 * mpz/gcdext.c: Save an allocation if both cofactors are needed.
2179 * mpz/oddfac_1.c: Revision of all ASSERTs.
2180 * tests/mpz/t-invert.c: All elements are invertible in the zero ring.
2181
2182 2016-12-13 Torbjörn Granlund <[email protected]>
2183
2184 * longlong.h: Test LONGLONG_STANDALONE in two more places.
2185
2186 2016-12-07 Torbjörn Granlund <[email protected]>
2187
2188 * gmp-h.in: Check yet another symbol for FILE.
2189
2190 2016-12-04 Torbjörn Granlund <[email protected]>
2191
2192 * tests/mpz/reuse.c: Use mpz_clobber. Split mpz_gcdext macros to avoid
2193 spurious res3 dependency.
2194
2195 * tests/misc.c (mpz_clobber): New function.
2196
2197 2016-12-03 Niels Möller <[email protected]>
2198
2199 * doc/gmp.texi (Number Theoretic Functions): Tweak mpz_gcdext
2200 documentation. The first and third argument may be NULL, but not
2201 the second.
2202
2203 2016-12-02 Niels Möller <[email protected]>
2204
2205 * tests/mpz/reuse.c (main): Test additional cases of reuse for
2206 mpz_gcd and mpz_gcdext.
2207
2208 2016-12-01 Torbjörn Granlund <[email protected]>
2209
2210 * tests/misc.c (seed_from_tod): Make shift well-defined.
2211
2212 2016-11-29 Torbjörn Granlund <[email protected]>
2213
2214 * gmp-h.in (__GNU_MP__): Bump.
2215
2216 * mpz/inp_raw.c: Rewrite size computation to avoid overflow.
2217
2218 * mpz/kronsz.c: Use ABS_CAST to avoid undefined code.
2219
2220 2016-11-27 Marco Bodrato <[email protected]>
2221
2222 * mpz/gcd.c, mpz/gcdext.c: Use NEWALLOC.
2223 * mpz/oddfac_1.c: Disable an ASSERT that needs a revision.
2224
2225 2016-11-27 Torbjörn Granlund <[email protected]>
2226
2227 * tests/mpz/reuse.c: Rewrite operand randomisation to use fixed ranges.
2228
2229 * tune/time.c (cgt_works_p): Add a missing verbosity check.
2230
2231 * configure.ac: Make udiv_w_sdiv use conditional on enable_assembly.
2232
2233 2016-11-25 Marc Glisse <[email protected]>
2234
2235 * mpz/gcdext.c (mpz_gcdext): Allow a first argument of NULL.
2236 * doc/gmp.texi (Number Theoretic Functions): Document it.
2237 * tests/mpz/t-gcd.c (main): Test it.
2238
2239 2016-11-25 Marc Glisse <[email protected]>
2240
2241 * tests/cxx/t-ops2z.cc (checkz): Avoid left shift of negative number.
2242
2243 2016-11-22 Torbjörn Granlund <[email protected]>
2244
2245 * configure.ac (x86): Define LINUX for GNU/Linux systems.
2246 * mpn/x86_64/fat/fat_entry.asm: Set PRETEND_PIC for GNU/Linux.
2247
2248 2016-11-21 Torbjörn Granlund <[email protected]>
2249
2250 * configure.ac (powerpc): Never use -O3.
2251
2252 * acinclude.m4 (mpn_lshift_com optimization 2): Make it well-defined
2253 also for 32-bit systems.
2254 (mpn_lshift_com optimization 2): Free allocated memory.
2255
2256 2016-11-19 Niels Möller <[email protected]>
2257
2258 * Makefile.am (check-mini-gmp): Override CFLAGS and CPPFLAGS
2259 instead of the deleted EXTRA_CFLAGS. Set TEST_LIBRARY_PATH,
2260 instead of LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, to avoid getting
2261 gcc linked with an unexpected version of gmp.
2262
2263 2016-11-18 Niels Möller <[email protected]>
2264
2265 * Makefile.am (check-mini-gmp): Get CC and EXTRA_CFLAGS right.
2266
2267 2016-11-17 Torbjörn Granlund <[email protected]>
2268
2269 * asl.h: Initial support for artificially small limbs.
2270
2271 2016-11-09 Marco Bodrato <[email protected]>
2272
2273 * pz/iset_str.c: Lazy allocation.
2274
2275 2016-11-01 Torbjörn Granlund <[email protected]>
2276
2277 * mpn/generic/dive_1.c: Remove a forgotten dummy while-loop. (Spotted
2278 by Peter Barfuss.)
2279
2280 2016-10-31 Oleg Oshmyan <[email protected]>
2281
2282 * gmp-impl.h (x86_64 MPN_IORD_U): Use proper asm constraint.
2283
2284 2016-10-30 Torbjörn Granlund <[email protected]>
2285
2286 * mpn/Makefile.am (TARG_DIST): Add riscv.
2287
2288 2016-10-28 Marc Glisse <[email protected]>
2289
2290 * gmpxx.h (__gmp_binary_divides): Let 1/q call mpq_inv.
2291 * tests/cxx/t-ops.cc (check_mpq): Test it.
2292
2293 2016-10-24 Torbjörn Granlund <[email protected]>
2294
2295 * config.guess: Recognise Itanium Poulson.
2296
2297 2016-10-15 Torbjörn Granlund <[email protected]>
2298
2299 * configure.ac (arm*-*-*): Amend last change.
2300
2301 2016-10-14 Torbjörn Granlund <[email protected]>
2302
2303 * longlong.h (riscv umul_ppmm): New.
2304
2305 * mpn/riscv/64/aors_n.asm: New file.
2306 * mpn/riscv/64/mul_1.asm: New file.
2307 * mpn/riscv/64/aorsmul_1.asm: New file.
2308
2309 * mpn/generic/addmul_1.c: Rewrite for shallower recurrency.
2310 * mpn/generic/submul_1.c: Likewise.
2311
2312 * configure.ac (riscv-*-*): New.
2313 (arm*-*-*): Rewrite arm support to handle armv8 CPUs in 32-bit mode.
2314
2315 2016-08-29 Torbjörn Granlund <[email protected]>
2316
2317 * All C files: Include just gmp-impl.h, make gmp-impl.h grab gmp.h.
2318
2319 * mpf/get_str.c: Use __GMP_ALLOCATE_FUNC_TYPE and friends.
2320 * mpf/inp_str.c: Likewise.
2321 * mpq/get_str.c: Likewise.
2322 * mpz/get_str.c: Likewise.
2323 * mpz/inp_str.c: Likewise.
2324 * scanf/vsscanf.c: Likewise.
2325 * tal-reent.c: Likewise.
2326
2327 2016-08-24 Vlad Zakharov <[email protected]>
2328
2329 * longlong.h (arc add_ssaaaa, sub_ddmmss): Replace obsolete 'J'
2330 constraint with 'Cal'.
2331
2332 2016-08-22 Marc Glisse <[email protected]>
2333
2334 * longlong.h (umul_ppmm from __umulsidi3): Protect with do ...
2335 while (0).
2336
2337 2016-06-02 Torbjörn Granlund <[email protected]>
2338 Vincent Lefevre <[email protected]>
2339
2340 * doc/gmp.texi: Various clarifications about variable conventions.
2341
2342 2016-04-07 Marc Glisse <[email protected]>
2343
2344 * gmp-h.in (__GMP_NOTHROW): Prefer noexcept to throw().
2345 (mpz_init, mpz_inits): Mark as __GMP_NOTHROW.
2346 * mpz/init.c, mpz/inits.c: Likewise.
2347 * gmpxx.h (mpz_class): Mark default and move constructors noexcept.
2348 * tests/cxx/t-cxx11.cc: Check noexcept.
2349
2350 2016-04-02 Torbjörn Granlund <[email protected]>
2351
2352 * mpf/set_q.c: Rewrite, mainly to use mpn_div_q.
2353
2354 2016-03-29 Torbjörn Granlund <[email protected]>
2355
2356 * mpn/x86_64/fat/addmul_2.c: New file.
2357
2358 2016-03-28 Torbjörn Granlund <[email protected]>
2359
2360 * mpn/x86_64/addmul_2.asm: Move from here...
2361 * mpn/x86_64/k8/addmul_2.asm: ...to here.
2362
2363 2016-03-26 Torbjörn Granlund <[email protected]>
2364
2365 * mpn/arm64/sqr_diag_addlsh1.asm: New file.
2366
2367 2016-03-25 Torbjörn Granlund <[email protected]>
2368
2369 * mpn/arm64/xgene1/aors_n.asm: New file.
2370 * mpn/arm64/xgene1/aorsmul_1.asm: New file.
2371 * mpn/arm64/xgene1/cnd_aors_n.asm: New file.
2372 * mpn/arm64/xgene1/gmp-mparam.h: New file.
2373 * mpn/arm64/xgene1/mul_1.asm: New file.
2374
2375 * config.guess: Prefix all arm CPUs with "arm" to accommodate our
2376 matchers.
2377 * configure.ac (arm): Match arm CPUs consistently.
2378
2379 2016-03-21 Torbjörn Granlund <[email protected]>
2380
2381 * configure.ac: Support many arm64 processors.
2382
2383 2016-03-20 Marc Glisse <[email protected]>
2384
2385 * configure.ac (WANT_ASSEMBLY): Remove.
2386 (NO_ASM): Remove from CFLAGS, add to AC_DEFINE.
2387 * tests/misc.c: Test NO_ASM instead of WANT_ASSEMBLY.
2388
2389 2016-03-20 Torbjörn Granlund <[email protected]>
2390
2391 * config.guess (arm*): Handle big.LITTLE CPUs by extracting the
2392 lexically largest id.
2393 * config.guess (arm*): Add many aarch64 CPUs.
2394 * config.guess (main): Corresponding changes.
2395
2396 * mpn/arm/v7a/cora5/gmp-mparam.h: New file.
2397
2398 * configure.ac (arm*): Support cortex-a5 better.
2399
2400 2016-02-25 Pavel Kopyl <[email protected]>
2401
2402 * acinclude.m4 (GMP_ASM_UNDERSCORE): Tighten gurkmacka detection.
2403
2404 2016-01-27 Niels Möller <[email protected]>
2405
2406 * errno.c (__gmp_exception): Use raise(SIGFPE) when available.
2407
2408 2016-01-15 Torbjörn Granlund <[email protected]>
2409
2410 * config.guess (s390): Don't assume /proc/cpuinfo exists.
2411
2412 2016-01-13 Torbjörn Granlund <[email protected]>
2413
2414 * config.guess: Reorder and generalise ppc code.
2415
2416 2016-01-01 Marco Bodrato <[email protected]>
2417
2418 * tests/cxx/clocale.c: Do not re-define localeconv for mingw.
2419 * tests/misc/t-locale.c: Likewise (Thanks Alexander).
2420
2421 * primesieve.c: Heal a speed regression on small values.
2422 * mpz/bin_uiui.c (mpz_bdiv_bin_uiui): 2 factors all at once.
2423 (mpz_goetgheluck_bin_uiui): Use STOP/CONT for loops on primesieve.
2424 * mpz/oddfac_1.c: Likewise.
2425 * mpz/primorial_ui.c (LOOP_ON_SIEVE_CONTINUE): Define prime locally.
2426
2427 * gen-fac.c: Use unsigned types for sizes.
2428
2429 * mpn/generic/invert.c: Use MPN_FILL macro.
2430 * mpn/generic/invertappr.c: Likewise.
2431 * mpn/generic/toom53_mul.c: Use _ip1 when available.
2432
2433 2015-12-28 Marco Bodrato <[email protected]>
2434
2435 * mpq/set_str.c: Use __GMP_FREE_FUNC_TYPE.
2436 * tests/mpz/t-nextprime.c: Speedup using swap, and correct type.
2437
2438 2015-12-26 Torbjörn Granlund <[email protected]>
2439
2440 * tests/misc.c (tests_start): Assert library version.
2441
2442 2015-12-19 Marc Glisse <[email protected]>
2443
2444 * gmp-impl.h (fft_table_nk): Use gmp_uint_least32_t.
2445 * mpn/generic/trialdiv.c (gmp_primes_ptab): Likewise.
2446
2447 2015-12-14 Torbjörn Granlund <[email protected]>
2448
2449 * mpn/x86_64/fat/fat.c (gmp_workaround_skylake_cpuid_bug):
2450 New function.
2451 (__gmpn_cpuvec_init): Handle more BMI2 crippled CPUs.
2452
2453 2015-12-13 Marco Bodrato <[email protected]>
2454
2455 * mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
2456 * mpz/clears.c, mpz/inits.c: Stop supporting empty list.
2457 * tests/arm32call.asm: bx->ret to support thumb-less chips
2458 (thanks Martin Husemann).
2459
2460 2015-12-13 Torbjörn Granlund <[email protected]>
2461
2462 * config.sub: Fix spelling of kabylake.
2463 * acinclude.m4: Likewise.
2464 * mpn/x86_64/fat/fat.c: Likewise.
2465
2466 2015-12-10 Marco Bodrato <[email protected]>
2467
2468 * tests/misc/t-printf.c: Test a sequence of '%'.
2469 * printf/doprnt.c: Avoid buffer overread with long long limbs.
2470
2471 * mpn/generic/toom_interpolate_7.c: Use the rsh1 functions,
2472 when available, also for negatives (clearing the carry).
2473 * mpn/generic/toom_interpolate_12.c: Likewise.
2474 * mpn/generic/toom_interpolate_16.c: Likewise.
2475
2476 2015-12-06 Torbjörn Granlund <[email protected]>
2477
2478 * configure.ac (arm*): Conditionally define NOTHUMB.
2479 Simplify and generalise.
2480 * mpn/arm/arm-defs.m4 (ret): New macro, conditional on NOTHUMB.
2481 * mpn/arm/*.asm: Use ret.
2482
2483 2015-12-03 Torbjörn Granlund <[email protected]>
2484
2485 * config.guess: Work around skylake cpuid bug.
2486 Fix spelling of kabylake.
2487
2488 2015-12-01 Torbjörn Granlund <[email protected]>
2489
2490 * mpn/x86_64/coreibwl/mul_basecase.asm: Add FUNC_EXITs.
2491
2492 2015-11-21 Marco Bodrato <[email protected]>
2493
2494 * gmp-impl.h (MPN_TOOM22_MUL_MINSIZE): Consider ToomX2 limits
2495 (thanks Paul).
2496 * tests/mpn/t-toom22.c: Keep on testing small sizes.
2497 * tests/mpz/t-primorial_ui.c: Test a single "large" number.
2498
2499 * tune/common.c (speed_mpz_primorial_ui): New function.
2500 * tune/speed.h: Declare it.
2501 * tune/speed.c (routine): Add mpz_primorial_ui.
2502
2503 * primesieve.c: Use two presieved patterns on 64-bits CPUs.
2504
2505 2015-11-13 Marco Bodrato <[email protected]>
2506
2507 * mpq/init.c: Remove conditional code for __CHECKER__.
2508 * mpq/set.c: Shorten scope of local variables.
2509 * mpq/set_den.c: Likewise.
2510 * mpq/set_num.c: Likewise.
2511 * mpq/set_z.c: Likewise.
2512
2513 * primesieve.c: Fill sieve with a presieved 70bits pattern.
2514
2515 2015-11-12 Marc Glisse <[email protected]>
2516
2517 * gmpxx.h (__gmp_fibonacci_function): New class.
2518 (fibonacci, mpz_class::fibonacci): New functions.
2519 (__gmp_fac_function, __gmp_primorial_function): Add braces.
2520 * tests/cxx/t-ops2z.cc: Test fibonacci.
2521 * doc/gmp.texi (C++ Interface Integers): Document fibonacci.
2522 Warn about factorial and primorial of negative numbers.
2523
2524 2015-11-10 Marc Glisse <[email protected]>
2525
2526 * gmpxx.h (__gmp_primorial_function): Throw on negative operands.
2527 * tests/cxx/t-ops2z.cc: Test it.
2528
2529 2015-11-09 Marco Bodrato <[email protected]>
2530
2531 * mpz: Experimental, lazy allocation.
2532
2533 2015-11-09 Marc Glisse <[email protected]>
2534
2535 * tests/cxx/Makefile.am: Move EXTRA_DIST out of WANT_CXX.
2536
2537 2015-11-08 Marco Bodrato <[email protected]>
2538
2539 * mpz/urandomm.c: Use mpn_zero_p to shorten code.
2540
2541 2015-11-08 Marc Glisse <[email protected]>
2542
2543 * gmpxx.h (__gmp_fac_function, __gmp_primorial_function): New classes.
2544 (__GMPP_DECLARE_UNARY_STATIC_MEMFUN,
2545 __GMPNN_DECLARE_UNARY_STATIC_MEMFUN,
2546 __GMPNS_DECLARE_UNARY_STATIC_MEMFUN,
2547 __GMPNU_DECLARE_UNARY_STATIC_MEMFUN,
2548 __GMPND_DECLARE_UNARY_STATIC_MEMFUN,
2549 __GMPN_DECLARE_UNARY_STATIC_MEMFUN,
2550 __GMP_DECLARE_UNARY_STATIC_MEMFUN, __GMPP_DEFINE_UNARY_STATIC_MEMFUN,
2551 __GMPNN_DEFINE_UNARY_STATIC_MEMFUN,
2552 __GMPNS_DEFINE_UNARY_STATIC_MEMFUN,
2553 __GMPNU_DEFINE_UNARY_STATIC_MEMFUN,
2554 __GMPND_DEFINE_UNARY_STATIC_MEMFUN, __GMPN_DEFINE_UNARY_STATIC_MEMFUN,
2555 __GMP_DEFINE_UNARY_STATIC_MEMFUN): New macros.
2556 (factorial, mpz_class::factorial, primorial, mpz_class::primorial):
2557 New functions.
2558 * tests/cxx/t-ops2.cc: Test factorial and primorial.
2559 * tests/cxx/Makefile.am: Move t-ops2 after
2560 t-do-exceptions-work-at-all-with-this-compiler.
2561 * doc/gmp.texi: Document factorial and primorial.
2562 * NEWS: Likewise.
2563
2564 * tests/cxx/t-ops2.cc: Remove and split into ...
2565 * tests/cxx/t-ops2z.cc, tests/cxx/t-ops2qf.cc, tests/cxx/t-ops2f.cc,
2566 tests/cxx/t-ops2.h: New files.
2567 * tests/cxx/Makefile.am: Update for the split.
2568
2569 2015-11-07 Marc Glisse <[email protected]>
2570
2571 * gmpxx.h (__GMP_DEFINE_UNARY_FUNCTION_1,
2572 __GMPP_DEFINE_BINARY_FUNCTION_1, __GMPNN_DEFINE_BINARY_FUNCTION_1,
2573 __GMPNS_DEFINE_BINARY_FUNCTION_1, __GMPNU_DEFINE_BINARY_FUNCTION_1,
2574 __GMPND_DEFINE_BINARY_FUNCTION_1, __GMPNLD_DEFINE_BINARY_FUNCTION_1,
2575 __GMPN_DEFINE_BINARY_FUNCTION_1, __GMP_DEFINE_BINARY_FUNCTION_1):
2576 New macros.
2577 (operator~, trunc, floor, ceil, sqrt, operator%, operator&, operator|,
2578 operator^, hypot, gcd, lcm): Use them.
2579
2580 2015-11-06 Marco Bodrato <[email protected]>
2581
2582 * mpz/and.c: Use MPZ_NEWALLOC.
2583 * mpz/ior.c: Remove duplicated branches, add branch hints.
2584 * mpz/xor.c: Likewise, and use NORMALIZE_NOT_ZERO.
2585
2586 * mpz/init.c: Remove conditional code for __CHECKER__.
2587 * mpz/init2.c: Likewise.
2588 * mpz/inits.c: Likewise.
2589 * mpz/iset.c: Likewise.
2590 * mpz/iset_str.c: Likewise.
2591
2592 2015-11-04 Torbjörn Granlund <[email protected]>
2593
2594 * mpz/xor.c: Use MPZ_REALLOC.
2595 * mpz/ior.c: Likewise
2596
2597 2015-11-03 Marco Bodrato <[email protected]>
2598
2599 * mpz/xor.c: Use the return value of _mpz_realloc.
2600 * mpz/ior.c: Likewise.
2601 * mpn/generic/sec_div.c: Remove unused var.
2602
2603 2015-11-01 Torbjörn Granlund <[email protected]>
2604
2605 * tests/misc.c (seed_from_tod, seed_from_urandom): New functions.
2606 (tests_rand_start): Use them.
2607
2608 2015-11-01 Marco Bodrato <[email protected]>
2609
2610 * Version 6.1.0 released.
2611
2612 * mpz/inits.c [__CHECKER__]: Init limb, not pointer.
2613 * mpz/init.c [__CHECKER__]: Likewise (spotted by Vicente Benjumea).
2614 * tests/mpf/t-pow_ui.c: Use another mpf for the size limit.
2615
2616 2015-10-30 Torbjörn Granlund <[email protected]>
2617
2618 * mpf/pow_ui.c: Add log(e) precision bits.
2619
2620 * doc/gmp.texi (Floating-point): Rewrite mpf introduction.
2621
2622 2015-10-29 Marco Bodrato <[email protected]>
2623
2624 * demos/factorize.c: mpz_div_2exp => mpz_tdiv_q_2exp.
2625 * demos/perl/GMP.xs: Likewise.
2626 * tests/mpf/t-pow_ui.c: Use reference value to check the size.
2627
2628 * doc/gmp.texi (Floating-point): Remove "infinite precision" claim.
2629
2630 * gmp-h.in: Update version.
2631
2632 2015-10-28 Torbjörn Granlund <[email protected]>
2633
2634 * tests/mpf/t-pow_ui.c: New file.
2635 * tests/mpf/Makefile.am (check_PROGRAMS): Compile it.
2636
2637 * mpf/pow_ui.c: Rewrite for accuracy and performance.
2638
2639 2015-10-26 Marco Bodrato <[email protected]>
2640
2641 * configfsf.guess: Updated to version 2015-10-21, for a typo.
2642
2643 * tests/cxx/t-ops.cc (check_mpq): Compare also with mpz.
2644 (check_mpf): Compare also with mpz and mpq.
2645
2646 2015-10-25 Torbjörn Granlund <[email protected]>
2647
2648 * configure.ac: Avoid passing ambiguous -march=skylake.
2649
2650 2015-10-21 Marco Bodrato <[email protected]>
2651
2652 * Version 6.1.0-rc1 published.
2653
2654 * gmp-h.in: Revert version for RC.
2655
2656 2015-10-20 Torbjörn Granlund <[email protected]>
2657
2658 * mpn/x86/pentium4/sse2/popcount.asm: Use LEAL.
2659 * mpn/x86/k7/invert_limb.asm: Likewise.
2660
2661 2015-10-18 Torbjörn Granlund <[email protected]>
2662
2663 * mpn/arm64/gmp-mparam.h: New file.
2664
2665 2015-10-18 Marco Bodrato <[email protected]>
2666
2667 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
2668 * gmp-h.in: Bump version.
2669
2670 2015-10-17 Marco Bodrato <[email protected]>
2671
2672 * tests/mpf/t-cmp_si.c: Initialise a variable (only when error arise)
2673 * mpn/generic/toom43_mul.c: Insert parentheses around & expressions.
2674 * mpn/generic/toom52_mul.c: Likewise.
2675 * tests/mpn/t-minvert.c: Remove an unused var.
2676 * tests/mpz/t-cong_2exp.c: Likewise.
2677
2678 2015-10-16 Hans Wennborg <hwennborg at google.com>
2679
2680 * mpn/generic/div_qr_2.c: Insert parentheses around & expressions.
2681 * mpn/generic/toom44_mul.c: Likewise.
2682 * mpn/generic/toom53_mul.c: Likewise.
2683 * mpn/generic/toom62_mul.c: Likewise.
2684 * tests/mpn/t-bdiv.c: Simplify conditional printing of whitespace.
2685 * tests/mpn/t-div.c: Likewise.
2686
2687 2015-10-15 Marco Bodrato <[email protected]>
2688
2689 * configfsf.sub: Updated to version 2015-08-20, from gnulib.
2690 * configfsf.guess: Updated to version 2015-09-14, from gnulib.
2691
2692 2015-10-14 Torbjörn Granlund <[email protected]>
2693
2694 * demos/pexpr.c (main): Clear out a variable.
2695
2696 * mpn/generic/sqrlo_basecase.c: Move things before addmul_1 to reduce
2697 register pressure.
2698
2699 * .hgignore: Add 'compile' and 'test-driver'.
2700
2701 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify, add ASSERT.
2702 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
2703
2704 * tune/tuneup.c (tune_mu_bdiv): Start at measured BDIV_DC_ thresholds.
2705
2706 2015-10-13 Marco Bodrato <[email protected]>
2707
2708 * mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
2709 * mpz/clears.c, mpz/inits.c: Keep on supporting empty list.
2710
2711 2015-10-13 Marc Glisse <[email protected]>
2712
2713 * gmpxx.h (__GMPP_DEFINE_BINARY_TYPE_FUNCTION): Allow mixed operations.
2714 (__gmp_cmp_function, __gmp_binary_equal, __gmp_binary_less):
2715 Handle mixed operations.
2716 (__gmp_cmp_function): Move before __gmp_binary_equal.
2717
2718 2015-10-13 Marco Bodrato <[email protected]>
2719
2720 * mpf/pow_ui.c: Increased precision of partial results.
2721
2722 2015-10-12 Torbjörn Granlund <[email protected]>
2723
2724 * configure.ac: Reject AVX for NetBSD.
2725
2726 2015-10-11 Torbjörn Granlund <[email protected]>
2727
2728 * configure.ac (fat_path): Add skylake.
2729
2730 2015-10-10 Marco Bodrato <[email protected]>
2731
2732 * gen-fib.c: Correct the name of the program in error message.
2733 * gen-fac.c: Likewise.
2734
2735 * mpf/get_str.c: Increase precision of base^e computation.
2736
2737 2015-10-09 Torbjörn Granlund <[email protected]>
2738
2739 * config.guess: Recognise cabylake and goldmont and more versions of
2740 skylake and silvermont.
2741 * acinclude.m4 (X86_64_PATTERN): Add cabylake and goldmont.
2742 * config.sub: Corresponding changes.
2743 * configure.ac: Corresponding changes.
2744 * mpn/x86_64/fat/fat.c: Corresponding changes.
2745
2746 2015-09-12 Torbjörn Granlund <[email protected]>
2747
2748 * mpf/clear.c, mpf/clears.c, mpf/inits.c, mpq/clear.c, mpq/clears.c
2749 * mpq/inits.c, mpz/clear.c, mpz/clears.c, mpz/inits.c:
2750 Streamline, use macros.
2751
2752 2015-09-27 Marco Bodrato <[email protected]>
2753
2754 * mpz/cfdiv_r_2exp.c: Use mpn_neg and MPZ_NEWALLOC.
2755 * mpz/cfdiv_q_2exp.c: Use MPZ_REALLOC return value.
2756
2757 2015-09-12 Torbjörn Granlund <[email protected]>
2758
2759 * tests/mpf/t-cmp_si.c (check_data): Set precision reflecting data.
2760
2761 2015-09-11 Marco Bodrato <[email protected]>
2762
2763 * mpf/cmp_z.c: New file implementing mpf_cmp_z.
2764 * mpf/Makefile.am (libmpf_la_SOURCES): Add it.
2765 * Makefile.am (MPF_OBJECTS): Add generate object to libs.
2766 * gmp-h.in: Declare new function.
2767 * tests/mpf/t-cmp_si.c: Test also the new function.
2768 * doc/gmp.texi: Document it.
2769
2770 2015-09-06 Torbjörn Granlund <[email protected]>
2771
2772 * Wrap remaining limb allocations in __GMP_ALLOCATE_FUNC_LIMBS.
2773
2774 * mpn/x86/fat/fat.c (fake_cpuid_table): Add missing commas.
2775 * mpn/x86_64/fat/fat.c: Likewise.
2776
2777 * mpn/x86/fat/fat.c (fake_cpuid_table): Improve struct type.
2778 * mpn/x86/fat/fat.c: Likewise.
2779
2780 2015-09-03 Marco Bodrato <[email protected]>
2781
2782 * tests/mpq/t-cmp_z.c (sizes_test): New function, tests sizes.
2783
2784 2015-09-03 Torbjörn Granlund <[email protected]>
2785
2786 * acinclude.m4 (GMP_C_HIDDEN_ALIAS): New.
2787 * configure.ac (GMP_C_HIDDEN_ALIAS): Invoke.
2788
2789 2015-09-01 Marco Bodrato <[email protected]>
2790
2791 * mpq/cmp.c (mpq_cmp_numden): Cast to avoid over/underflow.
2792 * tests/mpn/t-toom22.c (MIN_AN): Use defined value.
2793 * tests/mpz/t-fac_ui.c: Check big factorial modulo a larger prime.
2794 * mpn/generic/bsqrtinv.c: Use sqrlo+mullo_n instead of powlo(,,3,,).
2795 * mpq/div.c: Move a branch out of the normal flow.
2796
2797 2015-08-31 Torbjörn Granlund <[email protected]>
2798
2799 * mpn/x86/fat/fat.c (fake_cpuid_table): Update similarly to
2800 corresponding x86_64 code.
2801
2802 2015-08-31 Marco Bodrato <[email protected]>
2803
2804 * mpq/cmp.c (mpq_cmp_z): New function to compare mpq with mpz,
2805 asked by Vincent Delecroix for the SageMath project.
2806 * gmp-h.in: Declare it.
2807 * doc/gmp.texi: Document it.
2808 * tests/mpq/t-cmp_z.c: New file to test mpq_cmp_z (from t-cmp.c).
2809 * tests/mpq/Makefile.am (check_PROGRAMS): Add t-cmp_z.
2810
2811 * mpn/generic/powlo.c: Use mpn_sqrlo.
2812
2813 2015-08-29 Torbjörn Granlund <[email protected]>
2814
2815 * mpn/x86_64/fat/fat.c (fake_cpuid_table): Add CPU aliases.
2816
2817 2015-08-25 Marco Bodrato <[email protected]>
2818
2819 * configure.ac (AH_VERBATIM): Add HAVE_NATIVE_mpn_mullo_basecase.
2820 * mpn/generic/sqrlo.c (mpn_sqrlo): Use mullo_basecase when faster.
2821 * mpn/generic/sqrlo_basecase.c: More readable #defines.
2822
2823 * tune/tuneup.c (tune_sqrlo): New function to tune sqrlo thresholds.
2824 (all): Call it, after multiplication and FFT.
2825 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrlo{,_basecase}.c .
2826 * gmp-impl.h: Add all SQRLO_*_THRESHOLD* defs, for tuning and default.
2827 * mpn/generic/sqrlo.c: Remove default threshold definitions.
2828 * mpn/generic/sqrlo_basecase.c: Use SQRLO_DC_THRESHOLD_LIMIT.
2829 * mpn/minithres/gmp-mparam.h: New SQRLO_*_THRESHOLDs.
2830
2831 * tune/tuneup.c (tune_mullo): Set MULLO_MUL_N_THRESHOLD to never
2832 whenever the FFT threshold does not exist.
2833
2834 * mpf/cmp.c: Remove some branches.
2835
2836 2015-08-25 Torbjörn Granlund <[email protected]>
2837
2838 * mpn/x86_64/x86_64-defs.m4: Output computed numbers in base-10 instead
2839 of base-16 to avoid bugs on Solaris, FreeBSD, and old NetBSD.
2840
2841 2015-08-23 Torbjörn Granlund <[email protected]>
2842
2843 * mpn/x86_64/fat/fat.c (fake_cpuid_table): Add more entries, handle
2844 Broadwell separately.
2845
2846 * configure.ac (fat_path): Add coreibwl.
2847
2848 2015-08-18 Marco Bodrato <[email protected]>
2849
2850 * mpn/generic/rootrem.c (logbased_root): New function.
2851 (mpn_rootrem_internal): Use it to estimate highest 9 bits of the root.
2852
2853 * gmp-impl.h (MPQ_PTR_SWAP, MPQ_SRCPTR_SWAP): New macros.
2854
2855 2015-08-17 Torbjörn Granlund <[email protected]>
2856
2857 * acinclude.m4 (X86_64_PATTERN): Add skylake.
2858 * config.guess: Corresponding changes.
2859 * config.sub: Corresponding changes.
2860 * configure.ac: Corresponding changes.
2861 * mpn/x86_64/skylake/gmp-mparam.h: New file.
2862
2863 2015-08-15 Torbjörn Granlund <[email protected]>
2864
2865 * mpn/generic/mullo_basecase.c: Provide alternative code, make default.
2866
2867 2015-08-04 Marco Bodrato <[email protected]>
2868
2869 * tests/refmpn.c (refmpn_sqrlo): New function.
2870 * tests/tests.h: Define it.
2871
2872 * mpn/generic/sqrlo.c: New file, new function.
2873 * mpn/generic/sqrlo_basecase.c: New file, new function.
2874 * gmp-impl.h (mpn_sqrlo, mpn_sqrlo_basecase): Declare them.
2875 * configure.ac (gmp_mpn_functions): Add new files.
2876
2877 * tests/mpn/t-sqrlo.c: New file, new test.
2878 * tests/mpn/Makefile.am (check_PROGRAMS): Add new test.
2879 * tests/devel/try.c: Support mpn_sqrlo and mpn_sqrlo_basecase.
2880
2881 * tune/common.c (speed_mpn_sqrlo{,_basecase}): New functions.
2882 * tune/speed.c: Support new functions.
2883 * tune/speed.h (SPEED_ROUTINE_MPN_MULLO_BASECASE): Update.
2884 (SPEED_ROUTINE_MPN_SQRLO): New macro.
2885
2886 * mpn/generic/rootrem.c: Avoid divisions if not needed.
2887
2888 * tests/mpn/t-broot.c: Test also k=1.
2889 * mpz/aorsmul_i.c: Move branches out of main line.
2890
2891 2015-07-28 Marco Bodrato <[email protected]>
2892
2893 * mpn/generic/sqrtrem.c (mpn_dc_sqrt): Support odd sizes.
2894
2895 2015-07-16 Torbjörn Granlund <[email protected]>
2896
2897 * tune/speed.c: Remove now redundant MPN_FILL.
2898
2899 * configure.ac (hppa-hpux): Never use O3 optimisation.
2900
2901 2015-07-09 Torbjörn Granlund <[email protected]>
2902
2903 * mpn/ia64/add_n_sub_n.asm: Make it work for HP-UX.
2904 * mpn/ia64/addmul_2.asm: Likewise.
2905 * mpn/ia64/aors_n.asm: Likewise.
2906 * mpn/ia64/aorsorrlshC_n.asm: Likewise.
2907 * mpn/ia64/cnd_aors_n.asm: Likewise.
2908 * mpn/ia64/gcd_1.asm: Likewise.
2909 * mpn/ia64/lshiftc.asm: Likewise.
2910 * mpn/ia64/mod_34lsub1.asm: Likewise.
2911 * mpn/ia64/mul_2.asm: Likewise.
2912 * mpn/ia64/sec_tabselect.asm: Likewise.
2913 * mpn/ia64/sqr_diag_addlsh1.asm: Likewise.
2914
2915 2015-07-01 Marco Bodrato <[email protected]>
2916
2917 * gmp-impl.h (MPN_FILL): New macro, generalise MPN_ZERO.
2918
2919 * mpn/generic/sqrtrem.c (mpn_dc_sqrt): New function not computing remainder.
2920 (mpn_dc_sqrtrem): Use tdiv_q instead of divrem, use given scratch space.
2921 (mpn_sqrtrem): Use mpn_dc_sqrt for both even and odd sizes.
2922
2923 2015-06-24 Torbjörn Granlund <[email protected]>
2924
2925 * mpn/x86_64/fastsse/com.asm: Disallow zero size operands.
2926
2927 * mpn/x86_64/fastsse/copyi.asm: Suppress looping in basecase code.
2928
2929 2015-06-23 Marco Bodrato <[email protected]>
2930
2931 * mpn/generic/sqrtrem.c (mpn_sqrtrem2): Simplify branches.
2932 (mpn_dc_sqrtrem): Don't compute remainder if not needed.
2933
2934 2015-06-23 Torbjörn Granlund <[email protected]>
2935
2936 * gmp-impl.h: Remove K&R stringize support.
2937 * tests/devel/try.c: Likewise.
2938 * tests/t-constants.c: Likewise.
2939 * tests/mpf/t-fits.c: Likewise.
2940 * tests/mpz/t-fits.c: Likewise.
2941
2942 * configure.ac (AC_C_STRINGIZE): Remove.
2943
2944 2015-06-15 Marco Bodrato <[email protected]>
2945
2946 * tests/devel/try.c: Support mpn_sqrt (sqrtrem with remainder = NULL).
2947 * mpn/generic/sqrtrem.c: Reorder branches for single limb operands.
2948
2949 2015-06-15 Torbjörn Granlund <[email protected]>
2950
2951 * config.guess: Rewrite code for AVX handling to deal with broken cpuid
2952 states.
2953
2954 2015-06-11 Torbjörn Granlund <[email protected]>
2955
2956 * mpn/x86/k7/gcd_1.asm: Align stack for calls.
2957 * mpn/x86/p6/gcd_1.asm: Amend last change: align for PIC and non-PIC.
2958
2959 2015-06-10 Marco Bodrato <[email protected]>
2960
2961 * mpn/generic/sqrtrem.c: Use sqrtrem1 for single limb operands.
2962
2963 * tests/mpz/t-root.c: Check also mpz_root return value.
2964 * mpn/generic/rootrem.c: Shorten first and last loop.
2965
2966 * mpn/generic/toom2_sqr.c: Add some ASSERTs.
2967 * mpn/generic/toom22_mul.c: Likewise.
2968 * tests/mpn/t-toom22.c: stop testing some unsafe (unused) corner cases.
2969
2970 2015-06-08 Torbjörn Granlund <[email protected]>
2971
2972 * mpn/x86/p6/gcd_1.asm: Align stack for calls.
2973
2974 2015-06-06 Torbjörn Granlund <[email protected]>
2975
2976 * config.sub: Recognise any arm*neon CPU.
2977 * configure.ac (powerpc): Add p8 directory for power8 and later.
2978 * mpn/powerpc64/mode64/p8/invert_limb.asm: New file.
2979
2980 2015-06-01 Torbjörn Granlund <[email protected]>
2981
2982 * tune/speed.c (routine): Measure "mpn_sqrt" and "mpn_root", which are
2983 really the corresponding "rem" functions with NULL remainder argument.
2984
2985 * tune/speed.h (SPEED_ROUTINE_MPN_SQRTROOT_CALL): New.
2986 (SPEED_ROUTINE_MPN_SQRTREM, SPEED_ROUTINE_MPN_ROOTREM): Remove.
2987
2988 * tune/common.c (speed_mpn_sqrt, speed_mpn_root): New functions.
2989 (speed_mpn_sqrtrem): Use SPEED_ROUTINE_MPN_SQRTROOT_CALL
2990 (speed_mpn_rootrem): Likewise.
2991
2992 2015-05-30 Marco Bodrato <[email protected]>
2993
2994 * mpf/cmp_ui.c: Use macros, remove branches, correct nails.
2995 * mpf/cmp_si.c: Likewise.
2996 * mpf/int_p.c: Use a simpler loop to ignore zero limbs.
2997
2998 * mpf/sqrt_ui.c: Special case for sqrt(1).
2999 * tests/mpf/t-sqrt_ui.c: Test special cases.
3000
3001 * gmp-h.in: Declare (and inline) mpn_zero_p.
3002 * gmp-impl.h: Remove mpn_zero_p.
3003 * mpn/generic/zero_p: New file to include the function in the library.
3004 * configure.ac (gmp_mpn_functions): Add it.
3005 * doc/gmp.texi: Document it.
3006
3007 * mpz/combit.c: Call mpn_zero_p only if size is not zero.
3008 * mpz/scan1.c: Likewise.
3009 * tests/mpn/t-brootinv.c: Likewise.
3010 * tests/mpn/t-div.c: Likewise.
3011 * tests/mpn/t-minvert.c: Likewise.
3012
3013 2015-05-28 Niels Möller <[email protected]>
3014
3015 * doc/gmp.texi (Low-level Functions): Document mpn_divexact_1 and
3016 mpn_cnd_swap (the latter was forgotten for the 2015-02-08 change).
3017
3018 2015-05-28 Linus Nordberg <[email protected]>
3019
3020 * configure.ac: Remove double quotes in help strings, make some
3021 clarifications.
3022
3023 2015-05-24 Marco Bodrato <[email protected]>
3024
3025 * mpq/div.c: Reduce memory use.
3026 * tests/mpq/reuse.c: Test also mpq_FUNCTION (x,x,x).
3027 * mpz/swap.c: Use _SWAP macros.
3028
3029 2015-05-18 Torbjörn Granlund <[email protected]>
3030
3031 * configure.ac (arm): Let compiler decide about arm vs thumb encoding.
3032
3033 2015-05-18 Marco Bodrato <[email protected]>
3034
3035 * gmp-h.in (mpn_neg): Niels' code using mpn_neg.
3036 * gmp-h.in (mpn_com): Unconditionally declare prototype.
3037
3038 2015-05-17 Torbjörn Granlund <[email protected]>
3039
3040 * mpn/arm/v6/sqr_basecase.asm: Rewrite for speed.
3041
3042 2015-05-16 Torbjörn Granlund <[email protected]>
3043
3044 * mpn/arm/v6/addmul_2.asm: Rewrite for speed and size.
3045
3046 2015-05-15 Torbjörn Granlund <[email protected]>
3047
3048 * mpn/arm/v7a/cora7/gmp-mparam.h: New file.
3049 * mpn/arm/v7a/cora8/gmp-mparam.h: New file.
3050 * configure.ac (arm): Point to new directories.
3051
3052 2015-05-15 Marco Bodrato <[email protected]>
3053
3054 * mpn/generic/invertappr.c: Reduce memory usage.
3055 * gmp-impl.h (mpn_invertappr_itch): Update accordingly.
3056 * tune/tuneup.c (tune_invertappr, tune_invert): Update min_size.
3057
3058 * mpn/generic/mu_div_qr.c: Pass scratch memory to mpn_invertappr.
3059 * mpn/generic/mu_divappr_q.c: Likewise.
3060
3061 2015-05-12 Felix Janda <[email protected]>
3062
3063 * mpn/powerpc32/elf.m4 (LEA): Adopt to new ABI.
3064
3065 2015-05-09 Marco Bodrato <[email protected]>
3066
3067 * mpn/generic/invertappr.c: Reduce memory usage.
3068 * gmp-impl.h (mpn_invertappr_itch): Update accordingly.
3069
3070 2015-05-01 Torbjörn Granlund <[email protected]>
3071
3072 * tune/tuneup.c (all): Make GCD tuning last since it is not robust.
3073
3074 2015-04-27 Torbjörn Granlund <[email protected]>
3075
3076 * mpn/x86_64/coreibwl/gmp-mparam.h: New file.
3077
3078 2015-04-26 Torbjörn Granlund <[email protected]>
3079
3080 * mpn/x86_64/coreibwl/mul_basecase.asm: New file.
3081 * mpn/x86_64/coreibwl/sqr_basecase.asm: New file.
3082
3083 2015-04-26 Marco Bodrato <[email protected]>
3084
3085 * tune/common.c (speed_mpn_neg, speed_mpz_2fac_ui): New functions.
3086 (speed_mpn_add_1, speed_mpn_add_1_inplace): New functions.
3087 (speed_mpn_sub_1, speed_mpn_sub_1_inplace): New functions.
3088 * tune/speed.h: Declare them all.
3089 * tune/speed.c (routine): Added mpn_neg, mpn_add_1, mpn_sub_1,
3090 mpn_add_1_inplace, mpn_sub_1_inplace, and mpz_2fac_ui.
3091
3092 2015-04-25 Marco Bodrato <[email protected]>
3093
3094 * mpn/generic/invert.c: Split add in the correction test.
3095 * mpn/generic/invertappr.c: Cleanup of loops and branches.
3096
3097 * mpn/generic/hgcd_reduce.c: Use TMP_ALLOC_LIMBS_3.
3098 * mpn/generic/powm.c: Use TMP_ALLOC_LIMBS_2.
3099 * mpn/generic/rootrem.c: Likewise.
3100 * mpn/generic/remove.c: Remove redundant #ifdef.
3101 * mpn/generic/perfpow.c: Likewise.
3102
3103 2015-04-21 Torbjörn Granlund <[email protected]>
3104
3105 * printf/sprintffuns.c (gmp_sprintf_final): Remove extra parameters.
3106
3107 * mpn/arm/v6/popham.asm: Add MULFUNC_PROLOGUE.
3108 * mpn/powerpc64/mode64/rsh1aors_n.asm: Likewise.
3109 * mpn/powerpc64/mode64/p6/aorsmul_1.asm: Likewise.
3110
3111 2015-04-19 Torbjörn Granlund <[email protected]>
3112
3113 * mpn/x86_64/x86_64-defs.m4 (oplist): Fix typo.
3114 (mulx): Simplify.
3115 (adcx, adox): New defines, using helper function adx.
3116 * mpn/x86_64/coreibwl/mul_1.asm: New file.
3117 * mpn/x86_64/coreibwl/addmul_1.asm: New file.
3118 * configure.ac (x86_64): Put coreibwl in appropriate code path.
3119
3120 * configure.ac (x86_64): Pass more exact Intel CPU options.
3121
3122 2015-04-13 Torbjörn Granlund <[email protected]>
3123
3124 * longlong.h (arm): Rewrite. Support thumb2; use gcc builtins for
3125 count_leading_zeros, use accurate code selection critera.
3126
3127 2015-04-13 Marc Glisse <[email protected]>
3128
3129 * configure.ac (x86_64): Extend noavx to ABI=64.
3130
3131 2015-04-10 Torbjörn Granlund <[email protected]>
3132
3133 * mpn/alpha/ev6/mod_1_4.asm: Use LDGP.
3134
3135 2015-04-01 Torbjörn Granlund <[email protected]>
3136
3137 * configure.ac (sparc): Don't use use -xO4, it miscompiles by design.
3138
3139 2015-03-24 Torbjörn Granlund <[email protected]>
3140
3141 * mpn/generic/mul_fft.c (mpn_fft_best_k): Don't make pointers `static'
3142 just because they point to static (i.e., file-local) data.
3143
3144 2015-03-15 Torbjörn Granlund <[email protected]>
3145
3146 * acinclude.m4 (X86_64_PATTERN): Add CPU code names.
3147
3148 * config.guess: Add more CPUs, use CPU code names.
3149 * config.sub: Corresponding changes.
3150 * configure.ac: Corresponding changes.
3151
3152 2015-02-21 Niels Möller <[email protected]>
3153
3154 * gmp-h.in (mpn_divexact_1): New public declaration.
3155 * gmp-impl.h: Moved from here.
3156
3157 2015-02-08 Niels Möller <[email protected]>
3158
3159 * doc/gmp.texi (Low-level Functions): Document mpn_cnd_swap.
3160
3161 * mpn/generic/cnd_swap.c (mpn_cnd_swap): New file, moved function
3162 here. Also changed cnd argument type from int to mp_limb_t.
3163 * mpn/generic/sec_invert.c (mpn_cnd_swap): Old location.
3164 * configure.ac: Added cnd_swap.
3165 * gmp-h.in (mpn_cnd_swap): Added prototype.
3166
3167 2015-01-19 Torbjörn Granlund <[email protected]>
3168
3169 * configure.ac (arm): Provide architecture specific configs in addition
3170 to implementation specific configs.
3171
3172 * config.guess (arm): Use configfsf.guess's guess as default before
3173 conditionally appending "neon".
3174
3175 2015-01-08 Torbjörn Granlund <[email protected]>
3176
3177 * config.guess: Match POWER8 for AIX.
3178
3179 * longlong.h: Add many casts inside assembly input operands, this
3180 insures proper zero extension.
3181
3182 2014-12-27 Marc Glisse <[email protected]>
3183
3184 * gmpxx.h (__gmp_unary_expr): Use __gmp_resolve_ref.
3185 (__gmp_expr): New specialization for unary expressions with
3186 a builtin argument.
3187
3188 2014-12-26 Marc Glisse <[email protected]>
3189
3190 * gmp-impl.h (tmp_debug_entry_t): Change block to type void*.
3191
3192 2014-12-22 Torbjörn Granlund <[email protected]>
3193
3194 * longlong.h (mips64, mips32): Work around one clang bug.
3195
3196 2014-12-18 Torbjörn Granlund <[email protected]>
3197
3198 * longlong.h (umul_ppmm): Use input temps in more places.
3199
3200 2014-12-10 Marc Glisse <[email protected]>
3201
3202 * tests/cxx/clocale.c (localeconv, nl_langinfo): Match glibc's
3203 prototype in C++.
3204
3205 2014-12-09 Torbjörn Granlund <[email protected]>
3206
3207 * configure.ac (powerpc): Remove hardwired -mpowerpc, causes clang
3208 problems. Optionally pass -m32.
3209
3210 2014-12-08 Marc Glisse <[email protected]>
3211
3212 * config.guess (ultrasparc*-*-*): Update for T4 and T5.
3213 * config.sub (ultrasparc*-*-*): Update for T5.
3214 * configure.ac (ultrasparc*-*-*): Update for T5.
3215
3216 * longlong.h (sparc64): Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
3217 with VIS3.
3218
3219 * tests/misc/t-locale.c (localeconv, nl_langinfo): Match glibc's
3220 prototype in C++.
3221 * tests/mpf/t-get_si.c (check_limbdata): Avoid narrowing conversion
3222 from -1 to unsigned inside {}.
3223
3224 2014-12-02 Torbjörn Granlund <[email protected]>
3225
3226 * config.guess (arm*-*-*): Redirect stderr.
3227
3228 2014-11-26 Torbjörn Granlund <[email protected]>
3229
3230 * configure.ac (arm*-*-*): Optionally pass redundant fpu mode options
3231 in order to placate clang.
3232
3233 * mpn/arm/neon/lshiftc.asm: Avoid insn form missing from clang.
3234
3235 2014-11-24 Torbjörn Granlund <[email protected]>
3236
3237 * configure.ac (mips*-*-*): Provide ABI synonyms (for clang pretending
3238 to be gcc).
3239
3240 2014-11-18 Torbjörn Granlund <[email protected]>
3241
3242 From Hannes Mehnert:
3243 * config.guess (arm*-*-*): Base guesses on first matching /proc/cpuinfo
3244 line.
3245
3246 2014-11-17 Torbjörn Granlund <[email protected]>
3247
3248 * longlong.h (__longlong_h_C): New macro.
3249 (mpn_umul_ppmm, etc): Use it for C++ support.
3250
3251 2014-11-15 Torbjörn Granlund <[email protected]>
3252
3253 * tests/mpz/reuse.c: Make function vectors 'static'.
3254
3255 * tests/mpn/logic.c (check_one): Make string variable 'const'.
3256
3257 * tests/mpz/t-perfpow.c (tests): Make 'static'.
3258
3259 * tune/tuneup.c (fftmes): Remove an unused variable.
3260
3261 2014-11-15 Marc Glisse <[email protected]>
3262
3263 * tests/amd64check.c (calling_conventions_fenv): Mark as extern "C".
3264 * tests/x86check.c (calling_conventions_fenv): Likewise.
3265
3266 2014-11-13 Hans Wennborg <[email protected]>
3267
3268 * mpn/generic/toom_interpolate_8pts.c: Fix operator precedence in
3269 ASSERT.
3270
3271 2014-11-13 Torbjörn Granlund <[email protected]>
3272
3273 * tune/speed.h: Add casts for C++ compatibility.
3274 (speed_cyclecounter): Mark as extern "C".
3275 (mpn_mod_1_1p_1, mpn_mod_1_1p_2): Correct prototype.
3276
3277 * tune/tune-gcd-p.c: Add casts for C++ compatibility.
3278
3279 * tune/tuneup.c: Add casts for C++ compatibility.
3280 (mpn_divrem_1_tune, mpn_mod_1_tune): Mark as extern "C".
3281 (INSERT_FFTTAB): Produce sentinels differently to silence compiler.
3282
3283 2014-11-12 Torbjörn Granlund <[email protected]>
3284
3285 * gen-psqr.c: Add casts for C++ compatibility.
3286
3287 * tests/misc/t-scanf.c: Include config.h early for HAVE_xxx.
3288
3289 2014-11-08 Torbjörn Granlund <[email protected]>
3290
3291 * mpn/x86/x86-defs.m4 (LEA, LEAL): Make sure to put eip stub code in
3292 text segment.
3293 * mpn/x86/darwin.m4: Likewise.
3294
3295 * tune/speed.h (i386 speed_cyclecounter): Remove inline asm code, rely
3296 on external version.
3297
3298 2014-11-06 Torbjörn Granlund <[email protected]>
3299
3300 * config.guess: Ignore appended letters such E in POWER8E.
3301 * configure.ac: Supply cflags for power8, power9.
3302
3303 2014-11-03 Torbjörn Granlund <[email protected]>
3304
3305 * mpn/powerpc32/addmul_1.asm: Avoid negative stack pointer references.
3306 * mpn/powerpc32/lshift.asm: Likewise.
3307 * mpn/powerpc32/lshiftc.asm: Likewise.
3308 * mpn/powerpc32/p3-p7/aors_n.asm: Likewise.
3309 * mpn/powerpc32/rshift.asm: Likewise.
3310 * mpn/powerpc32/sec_tabselect.asm: Likewise.
3311 * mpn/powerpc32/submul_1.asm: Likewise.
3312 * mpn/powerpc32/vmx/mod_34lsub1.asm: Likewise.
3313
3314 2014-10-13 Torbjörn Granlund <[email protected]>
3315
3316 * acinclude.m4 (freebsd hacked gcc): Test for crash-prone FreeBSD gcc.
3317
3318 2014-10-03 Peter Breitenlohner <[email protected]>
3319
3320 * mpn/generic/sec_tabselect.c: Adjust type to silence compiler.
3321
3322 2014-10-01 Torbjörn Granlund <[email protected]>
3323
3324 * All Makefile.am: INCLUDES => AM_CPPFLAGS.
3325
3326 * configure.ac (arm64): Set gcc_cflags_maybe to enable Neon (for clang
3327 pretending to be gcc).
3328
3329 2014-09-24 Marc Glisse <[email protected]>
3330
3331 * longlong.h (arm64 count_trailing_zeros, count_leading_zeros): Use
3332 gcc's builtins.
3333 (arm64 umul_ppmm): Use macro arguments only once.
3334
3335 2014-09-22 Marc Glisse <[email protected]>
3336
3337 * mpn/arm64/lshift.asm: Avoid negative immediates.
3338 * mpn/arm64/rshift.asm: Likewise.
3339
3340 2014-09-13 Marc Glisse <[email protected]>
3341
3342 * mpn/generic/div_qr_1n_pi1.c: Honor NO_ASM.
3343 * mpn/generic/div_qr_1n_pi2.c: Likewise.
3344 * mpn/generic/div_qr_1u_pi2.c: Likewise.
3345 * mpn/generic/div_qr_2.c: Likewise.
3346 * mpn/generic/mod_1_1.c: Likewise.
3347 * mpn/generic/redc_2.c: Likewise.
3348
3349 2014-08-31 Torbjörn Granlund <[email protected]>
3350
3351 * mpn/arm64/lshift.asm: New file.
3352 * mpn/arm64/rshift.asm: New file.
3353
3354 2014-09-01 Marco Bodrato <[email protected]>
3355
3356 * gmp-impl.h (TMP_ALLOC_LIMBS_3): New macro to allocate 3 blocks.
3357 (mpn_remove): Update declaration with mp_srcptr arguments.
3358 * mpn/generic/remove.c: Use TMP_ALLOC_LIMBS_3. mp_srcptr for args.
3359
3360 * mpn/generic/perfpow.c (pow_equals): TMP_DECL only where needed.
3361 (perfpow): Use TMP_ALLOC_LIMBS_3.
3362 (mpn_perfect_power_p): Skip useless allocations. Use mpn_remove.
3363 * tests/mpz/t-perfpow.c (check_random): Check more perfect powers.
3364
3365 * mpn/generic/divis.c: Use TMP_ALLOC_LIMBS_2. Share a count.
3366
3367 2014-08-30 Torbjörn Granlund <[email protected]>
3368
3369 * mpn/arm64/mod_34lsub1.asm: New file.
3370
3371 2014-08-23 Torbjörn Granlund <[email protected]>
3372
3373 * mpn/arm64/bdiv_dbm1c.asm: New file.
3374
3375 * mpn/arm64/com.asm: New file.
3376
3377 * mpn/arm64/sec_tabselect.asm: New file.
3378
3379 * mpn/arm64/popcount.asm: New file.
3380 * mpn/arm64/hamdist.asm: New file.
3381
3382 * configure.ac: Put generic arm/neon earlier in path.
3383
3384 2014-08-14 Marco Bodrato <[email protected]>
3385
3386 * mpq/canonicalize.c: Earlier check for negative denominator.
3387 * mpq/set_d.c: Stricter allocation.
3388
3389 2014-08-03 Torbjörn Granlund <[email protected]>
3390
3391 * mpn/x86_64/bobcat/mul_1.asm: Fix typo in offset affecting DOS64.
3392
3393 2014-07-28 Marco Bodrato <[email protected]>
3394
3395 * mpn/generic/fib2_ui.c: remove #if HAVE_NATIVE_mpn_rsblsh_n.
3396 * mpz/fib2_ui.c: Use tabulated values, when available.
3397 * mpz/fib_ui.c: #if HAVE_NATIVE_mpn_addlsh1_n, use it.
3398
3399 * mpq/cmp_ui.c: Remove a branch.
3400 * mpq/cmp_si.c: Likewise.
3401
3402 * mpn/generic/toom_interpolate_7pts.c: Replace an in-place add
3403 with add_n + INCR_U.
3404
3405 * tests/mpf/t-fits.c: use ui_sub instead of sub_ui+neg.
3406
3407 2014-07-27 Torbjörn Granlund <[email protected]>
3408
3409 * mpn/x86/k7/gcd_1.asm: Use LEAL.
3410
3411 * mpn/x86/x86-defs.m4 (LEAL): New.
3412 (LEA): Append to `load_eip' instead of ASM_END, like darwin.m4.
3413 * mpn/x86/darwin.m4 (LEAL): New.
3414
3415 2014-07-26 Torbjörn Granlund <[email protected]>
3416
3417 * mpn/x86/pentium/mode1o.asm: Add Darwin PIC code.
3418 * mpn/x86/pentium/bdiv_q_1.asm: Likewise.
3419 * mpn/x86/pentium/dive_1.asm: Likewise.
3420 * mpn/x86/pentium/popcount.asm: Likewise.
3421 * mpn/x86/pentium/hamdist.asm: Likewise.
3422 * mpn/x86/k6/gcd_1.asm: Likewise.
3423
3424 * mpn/x86: Append ASM_END to many files.
3425 * tests/x86call.asm: Append ASM_END.
3426
3427 * mpn/x86/fat/fat_entry.asm (FAT_ENTRY, FAT_INIT):
3428 Support Darwin.
3429
3430 * mpn/x86/darwin.m4 (ASM_END): New, body from EPILOGUE_cpu.
3431 (EPILOGUE_cpu): Remove.
3432
3433 * mpn/x86/x86-defs.m4 (LEA): Put `mov_eip_' thunks in ASM_END instead
3434 of EPILOGUE_cpu.
3435
3436 2014-07-05 Niels Möller <[email protected]>
3437
3438 * doc/gmp.texi (Low-level Functions): Document that scratch need
3439 for mpn_sec_add_1 and mpn_sec_sub_1 are at most n limbs.
3440 (Low-level Functions): Document allowed overlap for mpn_addmul_1
3441 and mpn_submul_1.
3442
3443 2014-07-02 Torbjörn Granlund <[email protected]>
3444
3445 * mpn/x86_64/x86_64-defs.m4: Fix quoting.
3446
3447 * mpn/x86_64/atom/redc_1.asm: Enforce proper stack allocation.
3448 * mpn/x86_64/bobcat/redc_1.asm: Likewise.
3449 * mpn/x86_64/core2/divrem_1.asm: Likewise.
3450 * mpn/x86_64/core2/gcd_1.asm: Likewise.
3451 * mpn/x86_64/core2/redc_1.asm: Likewise.
3452 * mpn/x86_64/coreihwl/redc_1.asm: Likewise.
3453 * mpn/x86_64/coreinhm/redc_1.asm: Likewise.
3454 * mpn/x86_64/coreisbr/redc_1.asm: Likewise.
3455 * mpn/x86_64/divrem_1.asm: Likewise.
3456 * mpn/x86_64/divrem_2.asm: Likewise.
3457 * mpn/x86_64/gcd_1.asm: Likewise.
3458 * mpn/x86_64/mod_1_1.asm: Likewise.
3459 * mpn/x86_64/mod_1_2.asm: Likewise.
3460 * mpn/x86_64/mod_1_4.asm: Likewise.
3461
3462 2014-06-30 Torbjörn Granlund <[email protected]>
3463
3464 * config.sub: Generalise x86 patterns.
3465
3466 2014-06-17 Marc Glisse <[email protected]>
3467
3468 * gmpxx.h (__gmp_gcd_function, __gmp_lcm_function): New classes.
3469 (gcd, lcm): New functions.
3470 * doc/gmp.texi (C++ Interface Integers): Document them.
3471 * tests/cxx/t-ops2.cc (checkz): Test them.
3472
3473 2014-06-16 Torbjörn Granlund <[email protected]>
3474
3475 * mpf/mul.c: Postpone TMP_MARK.
3476
3477 * mpn/generic/perfpow.c (perfpow): Combine TMP_ALLOCs.
3478
3479 2014-06-15 Torbjörn Granlund <[email protected]>
3480
3481 * tests/refmpn.c (refmpn_mul): Rewrite to avoid O(n) recursion depth.
3482
3483 2014-06-09 Torbjörn Granlund <[email protected]>
3484
3485 * mpn/generic/mullo_n.c: Remove default THRESHOLDs.
3486 * gmp-impl.h: Put MULLO THRESHOLDs here. Improve various THRESHOLD
3487 defaults.
3488
3489 2014-06-08 Torbjörn Granlund <[email protected]>
3490
3491 * gmp-impl.h (TMP_ALLOC): Decrease limit to about half.
3492
3493 * mpn/generic/toom53_mul.c: Replace many TMP_SALLOC invocations
3494 by a single TMP_ALLOC.
3495 * mpn/generic/toom42_mul.c: Likewise.
3496
3497 * mpn/generic/sec_sqr.c: Don't unconditionally call mpn_sqr_basecase
3498 since it fails for non-cryptographic sizes for some obsolete CPUs.
3499
3500 * mpn/generic/sec_powm.c: Remove own squaring code, instead use
3501 mpn_mul_basecase.
3502
3503 * tests/mpn/logic.c (main): Don't use TMP_SALLOC_LIMBS.
3504
3505 * mpn/generic/dcpi1_div_q.c: Avoid TMP_SALLOC_LIMBS.
3506 * mpn/generic/dcpi1_div_qr.c: Likewise.
3507
3508 2014-06-08 Marco Bodrato <[email protected]>
3509
3510 * mpn/generic/mul.c: Tighter allocation in Toom{2,3}X branches.
3511
3512 2014-06-06 Torbjörn Granlund <[email protected]>
3513
3514 * mpn/generic/mul.c: Swap some TMP_SALLOC_LIMBS for TMP_ALLOC_LIMBS
3515 and some TMP_ALLOC_LIMBS for TMP_SALLOC_LIMBS.
3516
3517 2014-05-31 Marco Bodrato <[email protected]>
3518
3519 * mpf/ui_sub.c: Remove buggy code, use a wrapper to mpf_sub.
3520 * tests/mpf/t-sub.c: More corner cases and strict checking.
3521 * mpf/sub.c: Use more mpn_ primitives and macros.
3522
3523 * tests/mpf/t-int_p.c: Test numbers with both integer and
3524 fractionary parts.
3525
3526 * mpf/int_p.c: Delay zero branch and use mpn_zero_p.
3527 * mpf/fits_s.h: No special case for SIZ == 0.
3528 * mpf/fits_u.h: Likewise.
3529
3530 2014-05-29 Marc Glisse <[email protected]>
3531
3532 * gmp-h.in: Include <limits.h>.
3533 (__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): Remove.
3534 * gmp-impl.h (ULONG_MAX, UINT_MAX, USHRT_MAX, LONG_MAX, INT_MAX,
3535 SHRT_MAX): Remove unnecessary redefinition.
3536 * tests/t-gmpmax.c: Remove file.
3537 * tests/Makefile.am: Remove t-gmpmax.
3538
3539 2014-05-22 Marco Bodrato <[email protected]>
3540
3541 * tests/mpf/t-sub.c (check_data): Test also ui_sub and sub_ui.
3542
3543 2014-05-20 Marco Bodrato <[email protected]>
3544
3545 * gen-fac.c: +1 in the init2 argument before setbit.
3546 * gen-fib.c: Likewise. (Thanks Niels)
3547 * rand/randmts.c: Likewise.
3548
3549 * mpn/generic/invert.c: Remove unused TMP_MARK.
3550 * mpn/generic/invertappr.c: Avoid a branch.
3551 * mpz/millerrabin.c (millerrabin): Consider the rare case n is a power.
3552
3553 2014-05-15 Marco Bodrato <[email protected]>
3554
3555 * gen-fib.c: Use mpz_setbit.
3556 * gen-psqr.c: Skip even numbers when looking for primes.
3557
3558 * mpn/generic/invert.c: Avoid a branch.
3559 * mpn/generic/toom2_sqr.c: Avoid a few branches in the odd case.
3560 * mpn/generic/toom22_mul.c: Likewise.
3561
3562 2014-05-08 Marc Glisse <[email protected]>
3563
3564 * gmpxx.h (std::common_type): Remove partial specialization for two
3565 identical expressions. New partial specialization for a single type.
3566 * tests/cxx/t-cxx11.cc: Test it.
3567
3568 2014-04-14 Niels Möller <[email protected]>
3569
3570 * doc/gmp.texi (mpz_invert): Clarify behavior in the zero ring.
3571
3572 2014-04-04 Marc Glisse <[email protected]>
3573
3574 * longlong.h (i386): Add comment about "cc" clobber.
3575
3576 2014-04-04 Torbjorn Granlund <[email protected]>
3577
3578 * acinclude.m4 (X86_64_PATTERN): Generalise patterns to allow "noavx"
3579 suffix.
3580
3581 * mpn/generic/div_qr_1n_pi1.c: Conditionalise ARM asm on !__thumb__.
3582
3583 2014-04-03 Marc Glisse <[email protected]>
3584
3585 * mpn/arm64/mul_1.asm, mpn/arm64/gcd_1.asm: Use official b.cond syntax.
3586 * mpn/arm64/invert_limb.asm, mpn/arm64/aorsmul_1.asm: Prefix
3587 immediates with #.
3588
3589 2014-04-03 Torbjorn Granlund <[email protected]>
3590
3591 * config.guess: Append "noavx" for CPUs which have AVX but where the
3592 kernel does not support it.
3593 * configure.ac: Accept "noavx" cpu name suffixes. Conditionally pass
3594 -mno-avx.
3595
3596 2014-04-02 Torbjorn Granlund <[email protected]>
3597
3598 * mpn/x86_64/k8/redc_1.asm: Workaround for Darwin assembler quirk.
3599
3600 2014-03-28 Torbjorn Granlund <[email protected]>
3601
3602 * mpn/generic/mod_1_1.c: Conditionalise ARM asm on !__thumb__.
3603
3604 2014-03-31 Marc Glisse <[email protected]>
3605
3606 * mpn/arm/dive_1.asm, mpn/arm/invert_limb.asm: Use RODATA.
3607 * acinclude.m4 ([long long reliability tests]): Declare functions.
3608 (GMP_PROG_CC_FOR_BUILD_WORKS, GMP_PROG_EXEEXT_FOR_BUILD,
3609 GMP_C_FOR_BUILD_ANSI, GMP_CHECK_LIBM_FOR_BUILD): Replace exit(0) with
3610 return 0, no declaration needed.
3611 (GMP_CHECK_LIBM_FOR_BUILD): Include <math.h> to declare log.
3612
3613 2014-03-30 Marc Glisse <[email protected]>
3614
3615 * README: Remove mention to Berkeley MP compatibility.
3616
3617 2014-03-26 Torbjorn Granlund <[email protected]>
3618
3619 * mpn/powerpc64/mode64/gcd_1.asm: Provide default for
3620 BMOD_1_TO_MOD_1_THRESHOLD.
3621
3622 2014-03-24 Torbjorn Granlund <[email protected]>
3623
3624 * Version 6.0.0 released.
3625
3626 * mpn: Update countless gmp-mparam.h files.
3627
3628 2014-03-22 Torbjorn Granlund <[email protected]>
3629
3630 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
3631 * gmp-h.in: Bump version.
3632
3633 2014-03-17 Torbjorn Granlund <[email protected]>
3634
3635 * configure.ac: Remove clipper, i960, ns32k, pyr, a29k, z8000.
3636 * mpn/clipper: Remove directory and all its files.
3637 * mpn/i960: Likewise.
3638 * mpn/ns32k: Likewise.
3639 * mpn/pyr: Likewise.
3640 * mpn/a29k: Likewise.
3641 * mpn/z8000: Likewise.
3642 * mpn/Makefile.am (TARG_DIST): Purge removed directories.
3643 * doc/gmp.texi: Remove special mentions of removed architectures.
3644
3645 2014-03-12 Torbjorn Granlund <[email protected]>
3646
3647 * mpn/x86/bd2/gmp-mparam.h: New file.
3648 * mpn/x86_64/bd2/gmp-mparam.h: New file.
3649
3650 2014-03-06 Niels Möller <[email protected]>
3651
3652 * tests/mpz/t-pprime_p.c (check_composites): New function.
3653 (check_primes): New function.
3654 (main): Call them. Also use TESTS_REPS.
3655
3656 2014-03-01 Niels Möller <[email protected]>
3657
3658 * mpn/generic/sec_powm.c (mpn_sec_powm): Clarify comment and
3659 asserts.
3660
3661 2014-02-28 Torbjorn Granlund <[email protected]>
3662
3663 * mpn/x86_64/fat/fat.c (fake_cpuid): Handle id 7, make bold claims.
3664
3665 2014-02-27 Torbjorn Granlund <[email protected]>
3666
3667 * mpn/x86_64/fat/fat_entry.asm: Zero ecx for the benefit of new BMI2
3668 feature test.
3669
3670 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Run CPUVEC_SETUP_coreihwl
3671 conditionally on BMI2 availability.
3672
3673 * config.guess: Revert "coreihwl" to "coreisbr" if cpuid indicates that
3674 BMI2 is missing.
3675 (x86 cpuid, 2 variants): Zero ecx for the benefit of new BMI2 feature
3676 test.
3677
3678 2014-02-17 Niels Möller <[email protected]>
3679
3680 * mpn/generic/div_qr_1.c (mpn_div_qr_1): Revert yesterday's fix.
3681 Hopefully no longer needed.
3682
3683 * mpn/s390_64/gmp-mparam.h (DIV_QR_1_NORM_THRESHOLD): Up to 1.
3684 * mpn/s390_64/z10/gmp-mparam.h (DIV_QR_1_NORM_THRESHOLD): Up to 1.
3685
3686 * tune/tuneup.c (tune_div_qr_1): Ensure DIV_QR_1_NORM_THRESHOLD,
3687 DIV_QR_1_UNNORM_THRESHOLD >= 1.
3688
3689 2014-02-16 Marco Bodrato <[email protected]>
3690
3691 * mpn/generic/div_qr_1.c: Disallow DIV_QR_1_NORM_THRESHOLD==0.
3692
3693 2014-02-15 Torbjorn Granlund <[email protected]>
3694
3695 * tests/mpn/t-div.c: Fix typo.
3696
3697 2014-02-15 Marco Bodrato <[email protected]>
3698
3699 * doc/gmp.texi (mpz_roinit_n, MPZ_ROINIT_N): Document that
3700 at least a readable limb is required.
3701
3702 2014-02-14 Niels Möller <[email protected]>
3703
3704 * doc/gmp.texi (Low-level Functions): Update docs for
3705 mpn_sec_powm, to specify that left-over exponent bits must be
3706 zero.
3707
3708 2014-02-11 Niels Möller <[email protected]>
3709
3710 * Makefile.am (EXTRA_DIST): Distribute COPYING.LESSERv3,
3711 COPYINGv2, and COPYINGv3.
3712
3713 * doc/gmp.texi (Low-level Functions): Updated mpn_sec_powm docs.
3714
3715 * mpn/generic/sec_powm.c (mpn_sec_powm): Replaced exponent limb
3716 count argument by bit count. Don't leak high exponent bits, and
3717 drop the requirement that the most significant exponent limb is
3718 non-zero.
3719 (mpn_sec_powm_itch): Analogous interface change.
3720 * gmp-h.in: Updated prototypes.
3721 * mpz/powm_sec.c (mpz_powm_sec): Update mpn_sec_powm* calls.
3722 * tune/tuneup.c (tune_powm_sec): Likewise. Also deleted code
3723 fiddling with the high exponent bits.
3724
3725 2014-02-09 Niels Möller <[email protected]>
3726
3727 * tune/tuneup.c (tune_powm_sec): Avoid timing of the nonsensical
3728 parameters nbits = 1, winsize = 2. Decrement tabulated values, to
3729 better match the > comparison when the table is used.
3730
3731 * mpn/generic/sec_powm.c (win_size): Comment why we always get
3732 win_size(eb) <= eb. Make the table const.
3733 (mpn_sec_powm): Deleted handling of winsize > initial ebi. For
3734 now, replaced with an ASSERT_ALWAYS.
3735
3736 2014-02-08 Niels Möller <[email protected]>
3737
3738 * mpn/generic/sec_invert.c (mpn_cnd_neg_itch): #if:ed out unused
3739 function.
3740
3741 * mpn/generic/sec_div.c: Simplified code for the normalized case.
3742
3743 * tests/mpn/t-div.c (main): Test mpn_sec_div_qr and mpn_sec_div_r
3744 with normalized d.
3745
3746 2014-02-04 Niels Möller <[email protected]>
3747
3748 * doc/gmp.texi (Low-level Functions): Document mpn_sec_add_1 and
3749 mpn_sec_sub_1.
3750
3751 2014-01-29 Torbjorn Granlund <[email protected]>
3752
3753 * doc/gmp.texi (Floating-point Functions): Revise.
3754
3755 2014-01-29 Niels Möller <[email protected]>
3756
3757 * README: Don't refer to specific COPYING* files, instead refer to
3758 manual for details.
3759
3760 * COPYING.LIB: Renamed, to...
3761 * COPYING.LESSERv3: ... new name.
3762 * COPYING: Renamed, to...
3763 * COPYINGv3: ... new name.
3764 * COPYINGv2: New file, GPLv2.
3765
3766 * doc/gmp.texi (Copying): Document dual licensing.
3767
3768 2014-01-27 Torbjorn Granlund <[email protected]>
3769
3770 * Update library files license to use LGPL3+ and GPL2+.
3771
3772 2014-01-27 Marco Bodrato <[email protected]>
3773
3774 * tests/mpn/t-aors_1.c: Check sec_aors_1 red zones (not smart).
3775
3776 * mpn/generic/sec_aors_1.c: Mark the 2nd argument as const.
3777 * gmp-h.in (mpn_sec_add_1, mpn_sec_sub_1): Likewise.
3778
3779 2014-01-24 Torbjorn Granlund <[email protected]>
3780
3781 * mpn/x86_64/fat/fat.c (fake_cpuid_table): Use proper steamroller and
3782 excavator values.
3783
3784 * config.guess: Amend last AMD change.
3785
3786 * mpn/s390_64/lshift.asm: Align loop.
3787 * mpn/s390_64/rshift.asm: Likewise.
3788 * mpn/s390_64/lshiftc.asm: Likewise.
3789 * mpn/s390_64: Add z10 cycle numbers.
3790
3791 2014-01-23 Marco Bodrato <[email protected]>
3792
3793 * printf/repl-vsnprintf.c: Feed case 'z' in switch (type) with case 'z'
3794 in switch (fchar).
3795
3796 2014-01-21 Marco Bodrato <[email protected]>
3797
3798 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Get rid of varargs.
3799
3800 2014-01-20 Torbjorn Granlund <[email protected]>
3801
3802 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Fix duplicate entries for
3803 AMD "jaguar".
3804
3805 * demos/expr: Get rid of varargs code and references.
3806
3807 2014-01-19 Torbjorn Granlund <[email protected]>
3808
3809 * config.guess: Add new AMD CPUs (piledriver, steamroller, excavator,
3810 jaguar).
3811 * config.sub: Corresponding updates.
3812 * configure.ac: Likewise.
3813 * acinclude.m4 (X86_64_PATTERN): Likewise.
3814 * mpn/x86_64/fat/fat.c: Likewise.
3815
3816 * Rename mpn_sec_minvert => mpn_sec_invert, many files affected.
3817 * mpn/generic/sec_invert.c: New name for sec_minvert.c.
3818
3819 * doc/gmp.texi: Undocument mpz_array_init.
3820
3821 * acinclude.m4 (GMP_C_STDARG): Comment out.
3822 * configure.ac: Suppress GMP_C_STDARG invocation.
3823
3824 * Get rid of varargs code and references, many file affected.
3825
3826 * Use mpq_t in favour of MP_RAT, many mpq files affected.
3827
3828 * Get rid of BYTES_PER_MP_LIMB, most files affected.
3829
3830 * mpz/iset.c: Avoid overflow in allocation computation.
3831 * mpz/mul.c: Likewise.
3832 * mpf/init.c: Likewise.
3833 * mpf/init2.c: Likewise.
3834 * mpf/iset.c: Likewise.
3835 * mpf/iset_d.c: Likewise.
3836 * mpf/iset_si.c: Likewise.
3837 * mpf/iset_str.c: Likewise.
3838 * mpf/iset_ui.c: Likewise.
3839
3840 * mpz/array_init.c: Avoid two overflow scenarios in allocation
3841 computation.
3842
3843 * mpn/s390_64/z10/gmp-mparam.h: New file.
3844
3845 * mpz/clears.c: Call __gmp_free_func ourselves instead of via
3846 mpz_clears.
3847 * mpf/clears.c: Analogous change.
3848 * mpq/clears.c: Analogous change.
3849
3850 * mpz/clear.c: Add cast to avoid overflow of (later ignored) argument.
3851 * mpf/clear.c: Likewise.
3852
3853 2014-01-18 Niels Möller <[email protected]>
3854
3855 * tests/mpn/t-aors_1.c: Test also mpn_sec_add_1 and mpn_sec_sub_1.
3856
3857 * tests/mpn/t-minvert.c (main): Pass smallest allowed bit_size
3858 argument to mpn_sec_minvert.
3859
3860 2014-01-18 Marc Glisse <[email protected]>
3861
3862 * doc/gmp.texi (C++ Interface Limitations): Warn against C++11 auto.
3863
3864 2014-01-18 Marco Bodrato <[email protected]>
3865
3866 * tests/t-parity.c: Use 1UL to generate unsigned constants.
3867 * tests/t-constants.c: Disable a non portable (unneeded) check.
3868
3869 2014-01-18 Niels Möller <[email protected]>
3870
3871 * mpn/generic/sec_aors_1.c (mpn_sec_add_1, mpn_sec_sub_1): New
3872 file.
3873
3874 * mpn/generic/sec_minvert.c (mpn_sec_add_1_itch, mpn_sec_add_1):
3875 Deleted static definitions.
3876 (mpn_cnd_swap): Use volatile.
3877
3878 * configure.ac (gmp_mpn_functions): sec_add_1 and sec_sub_1.
3879 (GMP_MULFUNC_CHOICES): Set up for sec_aors_1.
3880
3881 2014-01-16 Niels Möller <[email protected]>
3882
3883 * tune/common.c (speed_mpn_sec_minvert): New function.
3884 * tune/speed.h: Declare it.
3885 (SPEED_ROUTINE_MPN_SEC_MINVERT): New macro.
3886 * tune/speed.c (routine): Added mpn_sec_minvert.
3887
3888 2014-01-12 Marc Glisse <[email protected]>
3889
3890 * demos/expr/expr.h: Add extern "C" for C++.
3891
3892 2014-01-11 Torbjorn Granlund <[email protected]>
3893
3894 * doc/gmp.texi (Notes for Particular Systems): Add items about old
3895 NetBSD and current FreeBSD m4 problems. Add item about FreeBSD's
3896 broken limits.h.
3897
3898 2014-01-05 Marco Bodrato <[email protected]>
3899
3900 * gmp-impl.h: Declare all _itch functions using ATTRIBUTE_CONST.
3901
3902 2014-01-05 Torbjorn Granlund <[email protected]>
3903
3904 * configure.ac (alpha): Set extra_functions conditionally.
3905
3906 * gmp-h.in (mpn_sec_minvert): Remove formal parameters.
3907
3908 * doc/gmp.texi: Improve doc for several functions.
3909
3910 * mpn/generic/sec_tabselect.c: Declare input arg using 'const'.
3911 * gmp-h.in: Analogous change.
3912
3913 * gmp-h.in: Declare all itch functions using __GMP_ATTRIBUTE_PURE.
3914 * gmp-impl.h: Likewise.
3915
3916 2014-01-05 Marco Bodrato <[email protected]>
3917
3918 * tests/mpn/t-minvert.c: Always compare with mpz_invert results,
3919 add red zone to scratch.
3920 * tests/mpn/t-sizeinbase.c: New test.
3921 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-sizeinbase.c .
3922 * tests/mpn/t-div.c: Use mpn_sec_div_*_itch().
3923
3924 * mpn/generic/pow_1.c: Micro-optimisation.
3925
3926 2014-01-04 Torbjorn Granlund <[email protected]>
3927
3928 * acinclude.m4 (GMP_PROG_M4): Avoid hex output, since case varies.
3929
3930 2014-01-03 Torbjorn Granlund <[email protected]>
3931
3932 * config.guess: Support newer haswell, broadwell, silvermont.
3933 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Likewise.
3934
3935 * acinclude.m4 (GMP_PROG_M4): Check that eval's radix argument work.
3936
3937 * mpz/invert.c: Rely on gcdext for all operands, removing faulty
3938 special case.
3939 * tests/mpz/t-invert.c: Enforce correct behaviour for |mod| = 1.
3940
3941 2014-01-02 Niels Möller <[email protected]>
3942
3943 * doc/gmp.texi (Low-level Functions): Document mpn_sizeinbase.
3944
3945 Enable previously unused mpn_sizeinbase function.
3946 * configure.ac (gmp_mpn_functions): Added sizeinbase.
3947 * gmp-h.in (mpn_sizeinbase): New prototype.
3948
3949 2014-01-02 Marc Glisse <[email protected]>
3950
3951 * gmp-impl.h: Always include <limits.h>.
3952 * tests/mpn/t-get_d.c: Remove comment about <limits.h>
3953
3954 * gmp-h.in (__GMP_USHRT_MAX): Use the promoted type.
3955 * gmp-impl.h (USHRT_HIGHBIT, SHRT_MIN, SHRT_MAX): Likewise.
3956 * tests/t-constants.c: Adapt printf strings.
3957 * tests/t-gmpmax.c: Likewise.
3958
3959 * tests/mpn/t-hgcd_appr.c (hgcd_appr_valid_p): Add parentheses.
3960
3961 2014-01-01 Torbjorn Granlund <[email protected]>
3962
3963 * doc/gmp.texi (Low-level Functions for cryptography): Update interface
3964 for mpn_sec_div_qr and fix typos in mpn_sec_minvert text.
3965
3966 * mpn/generic/sec_div.c: Rewrite to make mpn_sec_div_qr return high
3967 quotient limb.
3968 * gmp-h.in (mpn_sec_div_qr): Update declaration.
3969 * tests/mpn/t-div.c: Adapt.
3970
3971 2013-12-31 Niels Möller <[email protected]>
3972
3973 * doc/gmp.texi (Low-level Functions for cryptography): Document
3974 mpn_sec_minvert.
3975
3976 2013-12-30 Marc Glisse <[email protected]>
3977
3978 * doc/gmp.texi (C++ interface internals): Break long line.
3979
3980 2013-12-30 Torbjorn Granlund <[email protected]>
3981
3982 * doc/gmp.texi (Low-level Functions for cryptography): New section.
3983
3984 2013-12-29 Niels Möller <[email protected]>
3985
3986 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-minvert.
3987 * tests/mpn/t-minvert.c: New file.
3988
3989 * configure.ac (gmp_mpn_functions): Added sec_minvert.
3990 * gmp-h.in (mpn_sec_minvert, mpn_sec_minvert_itch): New
3991 declarations.
3992 * mpn/generic/sec_minvert.c (mpn_sec_minvert)
3993 (mpn_sec_minvert_itch): New functions.
3994 (mpn_sec_add_1, mpn_cnd_neg, mpn_cnd_swap, mpn_sec_eq_ui): New
3995 helper functions.
3996
3997 2013-12-28 Torbjorn Granlund <[email protected]>
3998
3999 * mpn/generic/sec_powm.c: Fix an ASSERT.
4000
4001 * gmp-h.in (mpn_sec_mul, mpn_sec_mul_itch): New declarations.
4002 * gmp-h.in (mpn_sec_sqr, mpn_sec_sqr_itch): Likewise.
4003 * mpn/generic/sec_mul.c: New file.
4004 * mpn/generic/sec_sqr.c: New file.
4005
4006 * gmp-h.in (mpn_sec_powm, mpn_sec_powm_itch): New declarations.
4007 * gmp-h.in (mpn_sec_div_qr, mpn_sec_div_qr_itch): Likewise.
4008 * gmp-h.in (mpn_sec_div_r, mpn_sec_div_r_itch): Likewise.
4009 * gmp-impl: Remove declarations of above functions.
4010
4011 * configure.ac (gmp_mpn_functions): Add sec_mul and sec_sqr.
4012
4013 2013-12-26 Marco Bodrato <[email protected]>
4014
4015 * Update many file's encoding to UTF-8.
4016 * doc/tasks.html: Update <meta content> accordingly.
4017 * doc/projects.html: Likewise.
4018
4019 2013-12-26 Torbjorn Granlund <[email protected]>
4020
4021 * configure.ac: Rename mpn_blah_sec to mpn_sec_blah.
4022 * gmp-impl.h: Corresponding changes.
4023 * mpn/asm-defs.m4: Corresponding changes.
4024 * tune/Makefile.am: Corresponding changes.
4025 * tune/common.c: Corresponding changes.
4026 * tune/speed.c: Corresponding changes.
4027 * tune/speed.h: Corresponding changes.
4028 * tune/tuneup.c: Corresponding changes.
4029 * mpz/powm_sec.c: Update calls.
4030 * tests/mpn/t-div.c: Likewise.
4031
4032 * mpn/generic/sec_powm.c: New name for mpn/generic/powm_sec.c.
4033 * mpn/generic/sec_div.c: New name for mpn/generic/sb_div_sec.c.
4034 * mpn/generic/sec_pi1_div.c: New name for mpn/generic/sbpi1_div_sec.c.
4035 * mpn/generic/sec_tabselect.c: New name for mpn/generic/tabselect.c.
4036
4037 * mpn/alpha/sec_tabselect.asm: New name for tabselect.asm.
4038 * mpn/arm/neon/sec_tabselect.asm: New name for tabselect.asm.
4039 * mpn/arm/sec_tabselect.asm: New name for tabselect.asm.
4040 * mpn/ia64/sec_tabselect.asm: New name for tabselect.asm
4041 * mpn/powerpc32/sec_tabselect.asm: New name for tabselect.asm
4042 * mpn/powerpc64/sec_tabselect.asm: New name for tabselect.asm
4043 * mpn/sparc64/sec_tabselect.asm: New name for tabselect.asm
4044 * mpn/x86/mmx/sec_tabselect.asm: New name for tabselect.asm
4045 * mpn/x86/sec_tabselect.asm: New name for tabselect.asm
4046 * mpn/x86_64/bd1/sec_tabselect.asm: New name for tabselect.asm
4047 * mpn/x86_64/core2/sec_tabselect.asm: New name for tabselect.asm
4048 * mpn/x86_64/coreinhm/sec_tabselect.asm: New name for tabselect.asm
4049 * mpn/x86_64/coreisbr/sec_tabselect.asm: New name for tabselect.asm
4050 * mpn/x86_64/fastsse/sec_tabselect.asm: New name for tabselect.asm
4051 * mpn/x86_64/k10/sec_tabselect.asm: New name for tabselect.asm
4052 * mpn/x86_64/pentium4/sec_tabselect.asm: New name for tabselect.asm
4053 * mpn/x86_64/sec_tabselect.asm: New name for tabselect.asm
4054
4055 2013-12-25 Torbjorn Granlund <[email protected]>
4056
4057 * mpz/powm_sec.c: Handle 0^e mod m specially.
4058 * mpn/generic/powm_sec.c: ASSERT that the base is non-zero.
4059
4060 2013-12-23 Torbjorn Granlund <[email protected]>
4061
4062 * mpn/generic/powm_sec.c (redcify): Use passed scratch instead of
4063 locally allocated.
4064 (mpn_powm_sec_itch): Accommodate mpn_sb_div_r_sec's scratch needs.
4065
4066 2013-12-20 Mark Sofroniou <[email protected]>
4067
4068 * mpn/generic/mul_fft.c: Major overhaul of types.
4069
4070 2013-12-18 Torbjorn Granlund <[email protected]>
4071
4072 * doc/gmp.texi (Low-level Functions): Rewrite mpn_set_str docs.
4073
4074 2013-12-14 Ulrich Weigand <[email protected]>
4075
4076 * mpn/powerpc32/darwin.m4: Allow (and ignore) optional
4077 'toc' parameter to PROLOGUE_cpu.
4078 * mpn/powerpc32/elf.m4: Likewise.
4079
4080 2013-12-09 Ulrich Weigand <[email protected]>
4081
4082 * configure.ac: Check for ELFv2 ABI on PowerPC.
4083 * mpn/powerpc64/elf.m4: Set assembler ABI version for ELFv2
4084 and use appropriate PROLOGUE_cpu/EPILOGUE_cpu sequences.
4085 Support optional 'toc' parameter to PROLOGUE_cpu.
4086 * mpn/powerpc64/aix.m4: Allow (and ignore) optional
4087 'toc' parameter to PROLOGUE_cpu.
4088 * mpn/powerpc64/darwin.m4: Likewise.
4089
4090 * mpn/powerpc64/mode64/dive_1.asm (mpn_divexact_1): Add 'toc'
4091 parameter to PROLOGUE.
4092 * mpn/powerpc64/mode64/divrem_1.asm (mpn_divrem_1): Likewise.
4093 * mpn/powerpc64/mode64/divrem_2.asm (mpn_divrem_2): Likewise.
4094 * mpn/powerpc64/mode64/gcd_1.asm (mpn_gcd_1): Likewise.
4095 * mpn/powerpc64/mode64/invert_limb.asm (mpn_invert_limb): Likewise.
4096 * mpn/powerpc64/mode64/mod_1_1.asm (mpn_mod_1_1p_cps): Likewise.
4097 * mpn/powerpc64/mode64/mod_1_4.asm (mpn_mod_1s_4p_cps): Likewise.
4098 * mpn/powerpc64/mode64/mode1o.asm (mpn_modexact_1c_odd): Likewise.
4099 * mpn/powerpc64/mode64/p7/gcd_1.asm (mpn_gcd_1): Likewise.
4100 * mpn/powerpc64/p6/lshift.asm (mpn_lshift): Likewise.
4101 * mpn/powerpc64/p6/lshiftc.asm (mpn_lshiftc): Likewise.
4102 * mpn/powerpc64/p6/rshift.asm (mpn_rshift): Likewise.
4103 * mpn/powerpc64/vmx/popcount.asm (mpn_popcount): Likewise.
4104
4105 2013-12-07 Niels Möller <[email protected]>
4106
4107 * configfsf.sub: Updated to version 2013-10-01, from gnulib.
4108 * configfsf.guess: Updated to version 2013-11-29, from gnulib.
4109
4110 2013-12-03 Torbjorn Granlund <[email protected]>
4111
4112 * mpn/generic/div_qr_1.c: Make constant args asm inlines become limbs.
4113 * mpn/generic/div_qr_1n_pi1.c: Likewise.
4114 * mpn/generic/div_qr_2.c: Likewise.
4115 * mpn/generic/div_qr_2.c: Likewise.
4116 * mpn/generic/mod_1_1.c: Likewise.
4117 * mpn/generic/mod_1_2.c: Likewise.
4118 * mpn/generic/mod_1_3.c: Likewise.
4119 * mpn/generic/mod_1_4.c: Likewise.
4120 * mpn/generic/mulmid_basecase.c: Likewise.
4121 * mpn/generic/mulmod_bnm1.c: Likewise.
4122 * mpn/generic/sqrmod_bnm1.c: Likewise.
4123 * mpn/sparc64/divrem_1.c: Likewise.
4124 * mpn/sparc64/mod_1_4.c: Likewise.
4125
4126 * mpn/generic/toom_interpolate_7pts.c (BINVERT_15): Fix typo.
4127
4128 2013-11-11 Torbjorn Granlund <[email protected]>
4129
4130 * mpn/x86_64/dos64.m4 (CALL): Provide to override default.
4131
4132 2013-11-08 Torbjorn Granlund <[email protected]>
4133
4134 * mpn/x86_64/x86_64-defs.m4 (CALL): Swap PIC test and macro defn.
4135
4136 * mpn/generic/div_qr_2.c: Test HAVE_HOST_CPU_FAMILY_x86, not i386.
4137
4138 * doc/gmp.texi: Update many URLs.
4139
4140 2013-11-04 Torbjorn Granlund <[email protected]>
4141
4142 * configure.ac: Set symbol OPENBSD for x86-openbsd hosts.
4143 * mpn/x86_64/fat/fat_entry.asm (PRETEND_PIC): New name for
4144 PIC_OR_DARWIN.
4145 (PRETEND_PIC): Set also for OPENBSD.
4146
4147 2013-10-29 Torbjorn Granlund <[email protected]>
4148
4149 * printf/doprnt.c (__gmp_doprnt): Use memcpy instead of strcpy.
4150
4151 2013-10-24 Torbjorn Granlund <[email protected]>
4152
4153 * mpn/generic/div_qr_1u_pi2.c: New file.
4154 * mpn/generic/div_qr_1n_pi2.c: New file.
4155
4156 2013-10-24 Niels Möller <[email protected]>
4157
4158 * mpn/x86_64/div_qr_1n_pi1.asm: Bugfixes, for case n == 1 and
4159 in-place operation.
4160 * mpn/x86_64/k8/div_qr_1n_pi1.asm: Likewise.
4161
4162 * mpn/generic/div_qr_1n_pi1.c (mpn_div_qr_1n_pi1): Bug fixes,
4163 off-by-one MPN_INCR_U, and support for in-place operation.
4164
4165 2013-10-24 Torbjorn Granlund <[email protected]>
4166
4167 * mpn/x86/fat/fat.c (fake_cpuid_table): Add Haswell.
4168
4169 2013-10-23 Torbjorn Granlund <[email protected]>
4170
4171 * mpn/x86_64/x86_64-defs.m4 (oplist): New define, data from `regnum'.
4172 (regnum): Use x86_lookup, feed oplist.
4173
4174 2013-10-22 Niels Möller <[email protected]>
4175
4176 * tests/devel/try.c: Support mpn_div_qr_1n_pi1.
4177
4178 * mpn/x86_64/k8/div_qr_1n_pi1.asm: Moved the below k10 file here.
4179 Applied tweak from Torbjörn to get it to run well on k8.
4180
4181 * mpn/x86_64/k10/div_qr_1n_pi1.asm: New file (renamed above).
4182 Differs from generic x86_64 version by using cmov.
4183
4184 * mpn/x86_64/div_qr_1n_pi1.asm: Reordered arguments to second mul.
4185 Deleted misleading cycle annotations.
4186
4187 2013-10-21 Niels Möller <[email protected]>
4188
4189 * configure.ac: Add HAVE_NATIVE_mpn_div_qr_1n_pi1 to config.in.
4190
4191 * mpn/generic/div_qr_1n_pi1.c (mpn_div_qr_1n_pi1): Fix typos
4192 affecting ASSERT.
4193
4194 2013-10-20 Niels Möller <[email protected]>
4195
4196 * mpn/x86_64/div_qr_1n_pi1.asm: New file.
4197
4198 * tune/div_qr_1_tune.c (__gmpn_div_qr_1n_pi1): Check
4199 div_qr_1n_pi1_method only when !HAVE_NATIVE_mpn_div_qr_1n_pi1.
4200
4201 * mpn/asm-defs.m4 (define_mpn): Add div_qr_1n_pi1.
4202
4203 * tune/common.c (speed_mpn_div_qr_1): New function, replacing...
4204 (speed_mpn_div_qr_1n, speed_mpn_div_qr_1u): ... deleted functions
4205 (speed_mpn_div_qr_1n_pi1, speed_mpn_div_qr_1n_pi1_1)
4206 (speed_mpn_div_qr_1n_pi1_2): New functions.
4207 * gmp-impl.h [TUNE_PROGRAM_BUILD]: Declare div_qr_1-related tuning
4208 variables.
4209 * tune/tuneup.c (speed_mpn_div_qr_1_tune, tune_div_qr_1): New
4210 functions.
4211 (div_qr_1n_pi1_method, div_qr_1_norm_threshold)
4212 (div_qr_1_unnorm_threshold): New globals.
4213 * tune/speed.c (routine): Replaced mpn_div_qr_1n and mpn_div_qr_1u
4214 by mpn_div_qr_1, requiring ".r" parameter. Added mpn_div_qr_1n_pi1
4215 and variants.
4216 * tune/speed.h (SPEED_ROUTINE_MPN_DIV_QR_1): Use the "r" parameter
4217 as divisor.
4218 * tune/div_qr_1n_pi1_2.c: New file.
4219 * tune/div_qr_1n_pi1_1.c: New file.
4220 * tune/div_qr_1_tune.c: New file.
4221 * tune/Makefile.am (libspeed_la_SOURCES): Added div_qr_1n_pi1_1.c,
4222 div_qr_1n_pi1_2.c, and div_qr_1_tune.c.
4223
4224 * tune/speed.c (routine): Added mpn_div_qr_1n and mpn_div_qr_1u.
4225 * tune/speed.h (SPEED_ROUTINE_MPN_DIV_QR_1): New macro.
4226 (speed_mpn_div_qr_1n, speed_mpn_div_qr_1u): Declare.
4227 * tune/common.c (speed_mpn_div_qr_1n, speed_mpn_div_qr_1u): New
4228 functions.
4229
4230 * gmp-impl.h (mpn_div_qr_1n_pi1): Declare function.
4231 * gmp-h.in (mpn_div_qr_1): Declare function.
4232 * configure.ac (gmp_mpn_functions): Added div_qr_1 and
4233 div_qr_1n_pi1.
4234 * mpn/generic/div_qr_1.c (mpn_div_qr_1): New file and function.
4235 * mpn/generic/div_qr_1n_pi1.c (mpn_div_qr_1n_pi1): New file and
4236 function.
4237 * tests/mpn/t-div.c (main): Test mpn_div_qr_1.
4238
4239 2013-10-17 Torbjorn Granlund <[email protected]>
4240
4241 * configure.ac (alpha): Pass -mieee via gcc_cflags_maybe.
4242
4243 2013-10-16 Torbjorn Granlund <[email protected]>
4244
4245 * config.guess: Let AMD64 cpuid bit override pessimistic cpu guesses.
4246
4247 * mpn/alpha/unicos.m4 (DATASTART): Accept optional align parameter.
4248 * mpn/alpha/divrem_2.asm: Use provided gp mechanisms.
4249 * mpn/alpha/default.m4 (PROLOGUE): Provide "..ng" post-gp label.
4250 * mpn/alpha/invert_limb.asm: Align table to 8-byte boundary. Make code
4251 work if table is not fully aligned. Properly test for BWX.
4252
4253 2013-10-15 Torbjorn Granlund <[email protected]>
4254
4255 * mpn/alpha/default.m4 (DATASTART): Use RODATA instead of DATA;
4256 accept optional align parameter.
4257 * mpn/alpha/invert_limb.asm: Align table.
4258 * mpn/alpha/ev5/diveby3.asm: Likewise.
4259
4260 2013-10-11 Torbjorn Granlund <[email protected]>
4261
4262 * mpn/x86/k7/mod_1_1.asm: Use 'subl' form to avoid ambiguity.
4263 * mpn/x86/k7/mod_1_4.asm: Likewise.
4264
4265 * configure.ac (X86_64_PATTERN): Append "cc" to cclist_64 and
4266 cclist_x32.
4267
4268 2013-10-08 Torbjorn Granlund <[email protected]>
4269 Marc Glisse <[email protected]>
4270
4271 * tests/mpf/reuse.c (main): Compare addresses instead of names.
4272 Use larger numbers for exponents.
4273
4274 2013-10-08 Marc Glisse <[email protected]>
4275
4276 * doc/mdate-sh, doc/texinfo.tex, install-sh, missing, ylwrap: Remove.
4277 * .bootstrap: Use autoreconf (and in particular automake -a).
4278
4279 * gmp-h.in: Remove __need_size_t. Include <stddef.h>, not <cstddef>.
4280
4281 * tests/mpf/reuse.c (main): Use small numbers as exponents.
4282
4283 2013-10-05 Torbjorn Granlund <[email protected]>
4284
4285 * mpn/x86_64/atom/aorsmul_1.asm: Slight tweak.
4286
4287 * doc/gmp.texi (ABI and ISA): Document x32.
4288
4289 * mpn/sparc64/ultrasparct3/dive_1.asm: Use our register names.
4290
4291 2013-09-24 Torbjorn Granlund <[email protected]>
4292
4293 * mpn/x86_64/atom/redc_1.asm: New file.
4294
4295 2013-09-23 Torbjorn Granlund <[email protected]>
4296
4297 * mpn/x86_64/bobcat/redc_1.asm: Make the code for 1 <= n <= 3 work.
4298
4299 2013-09-22 Torbjorn Granlund <[email protected]>
4300
4301 * mpn/x86_64/coreisbr/redc_1.asm: Slightly tweak basecase code.
4302
4303 * mpn/x86_64/core2/redc_1.asm: New file.
4304
4305 * mpn/x86_64/bobcat/redc_1.asm: New file.
4306
4307 2013-09-21 Torbjorn Granlund <[email protected]>
4308
4309 * mpn/x86_64/coreinhm/redc_1.asm: New file.
4310
4311 2013-09-21 Marc Glisse <[email protected]>
4312
4313 * tests/mpn/t-mulmid.c: Cast arguments of printf to int to match %d.
4314 * tests/rand/t-urbui.c: Use 1UL for unsigned constant.
4315 * mpn/generic/get_str.c: Avoid temporarily pointing outside an array.
4316
4317 2013-09-20 Torbjorn Granlund <[email protected]>
4318
4319 * mpn/x86_64/coreisbr/redc_1.asm: New file.
4320
4321 * mpn/x86_64/k8/redc_1.asm: Complete rewrite.
4322
4323 * mpn/x86_64/coreisbr/mullo_basecase.asm: Postpone pushes, short-
4324 circuit a branch.
4325 * mpn/x86_64/coreihwl/mullo_basecase.asm: Short-circuit a branch.
4326
4327 * mpn/x86_64/core2/mullo_basecase.asm: New file.
4328
4329 2013-09-19 Torbjorn Granlund <[email protected]>
4330
4331 * mpn/x86_64/fastsse/copyi-palignr.asm: Allocate more stack under DOS.
4332
4333 2013-09-18 Torbjorn Granlund <[email protected]>
4334
4335 * mpn/x86_64/core2/mul_basecase.asm: New file.
4336 * mpn/x86_64/core2/sqr_basecase.asm: New file.
4337
4338 * mpn/x86_64/coreihwl/mullo_basecase.asm: New file.
4339 * mpn/x86_64/coreisbr/mullo_basecase.asm: New file.
4340
4341 2013-09-16 Torbjorn Granlund <[email protected]>
4342
4343 * mpn/x86_64/fastsse/copyi-palignr.asm: Preserve xmm6-xmm8 under DOS.
4344
4345 2013-09-15 Torbjorn Granlund <[email protected]>
4346
4347 * mpn/x86_64/tabselect.asm: Use R8 for bit testing.
4348
4349 * mpn/x86_64/coreihwl/mul_basecase.asm: Replace mul_1 code.
4350
4351 * mpn/x86_64/coreisbr/aorsmul_1.asm: Rewrite.
4352
4353 2013-09-12 Torbjorn Granlund <[email protected]>
4354
4355 * mpn/ia64/gcd_1.asm: Use dep for combining table base and low bits.
4356
4357 * mpn/x86_64/fastsse/com-palignr.asm: Implement temp fix to properly
4358 handle overlap.
4359
4360 2013-09-10 Torbjorn Granlund <[email protected]>
4361
4362 * mpn/x86_64/fastsse/copyi-palignr.asm: Rewrite rp != up (mod 16) code
4363 to make it handle any allowed overlap.
4364
4365 2013-09-09 Torbjorn Granlund <[email protected]>
4366
4367 * mpn/x86_64/atom/com.asm: New file, grabbing fastsse code.
4368
4369 * mpn/x86_64/bd1/copyi.asm: New file, grabbing fastsse code.
4370 * mpn/x86_64/bd1/copyd.asm: Likewise.
4371 * mpn/x86_64/bd1/com.asm: Likewise.
4372
4373 * mpn/x86_64/fastavx/copyi.asm: New file.
4374 * mpn/x86_64/fastavx/copyd.asm: New file.
4375
4376 2013-09-05 Torbjorn Granlund <[email protected]>
4377
4378 * mpn/x86_64/coreihwl/aorsmul_1.asm: Streamline.
4379
4380 2013-09-04 Torbjorn Granlund <[email protected]>
4381
4382 * mpn/x86_64/coreihwl/sqr_basecase.asm: Implement larger "corner".
4383 Misc tuning.
4384
4385 2013-09-03 Torbjorn Granlund <[email protected]>
4386
4387 * mpn/x86_64/coreihwl/redc_1.asm: New file.
4388
4389 * mpn/x86_64/x86_64-defs.m4 (mulx): Handle negative offsets.
4390
4391 2013-08-31 Torbjorn Granlund <[email protected]>
4392
4393 * mpn/x86_64/coreisbr/sqr_basecase.asm: New file.
4394
4395 * mpn/x86_64/sqr_diag_addlsh1.asm: New file.
4396
4397 2013-08-30 Torbjorn Granlund <[email protected]>
4398
4399 * mpn/x86_64/fat/mul_basecase.c: New file.
4400 * mpn/x86_64/fat/sqr_basecase.c: New file.
4401 * mpn/x86_64/fat/mullo_basecase.c: New file.
4402 * mpn/x86_64/fat/redc_1.c: New file.
4403
4404 2013-08-29 Torbjorn Granlund <[email protected]>
4405
4406 * mpn/x86_64/k8/mul_basecase.asm: Move top-level basecase file to k8
4407 subdir.
4408 * mpn/x86_64/k8/sqr_basecase.asm: Likewise.
4409 * mpn/x86_64/k8/redc_1.asm: Likewise.
4410 * mpn/x86_64/k8/mullo_basecase.asm: Likewise.
4411 * mpn/x86_64/k8/mulmid_basecase.asm: Likewise.
4412
4413 * mpn/ia64/aors_n.asm: Clean up some bundlings.
4414
4415 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Support Haswell.
4416 (fake_cpuid_table): Likewise.
4417
4418 * configure.ac (x86): Remove any mulx paths. Let bwl path = hwl path.
4419 (fat_path): Add coreihwl.
4420
4421 * mpn/x86_64/coreihwl/aorsmul_1.asm: Move from `mulx' directory, use
4422 mulx() macro.
4423 * mpn/x86_64/coreihwl/mul_1.asm: Likewise.
4424 * mpn/x86_64/coreihwl/mul_2.asm: Likewise.
4425 * mpn/x86_64/coreihwl/mul_basecase.asm: Likewise.
4426 * mpn/x86_64/coreihwl/sqr_basecase.asm: Likewise.
4427
4428 * mpn/x86_64/x86_64-defs.m4 (mulx): New macro.
4429 (regnum, regnumh, ix): Supporting macros.
4430
4431 2013-08-28 Torbjorn Granlund <[email protected]>
4432
4433 * mpn/x86_64/coreisbr/divrem_1.asm: New file.
4434
4435 2013-08-23 Torbjorn Granlund <[email protected]>
4436
4437 * mpn/x86_64/fastsse/com-palignr.asm: New file, closely based on
4438 copyi-palignr.asm.
4439
4440 * mpn/x86_64/fastsse/copyi.asm Use "test R8(reg)" instead of "bt".
4441 * mpn/x86_64/fastsse/copyd-palignr.asm: Likewise.
4442 * mpn/x86_64/fastsse/copyi-palignr.asm: Likewise.
4443 * mpn/x86_64/fastsse/lshift-movdqu2.asm: Likewise.
4444 * mpn/x86_64/fastsse/lshiftc-movdqu2.asm: Likewise.
4445 * mpn/x86_64/fastsse/rshift-movdqu2.asm: Likewise.
4446 * mpn/x86_64/fastsse/tabselect.asm: Likewise.
4447
4448 * mpn/sparc64/ultrasparct3/sqr_diag_addlsh1.asm: New file.
4449
4450 * mpn/alpha/aorslsh2_n.asm: New file.
4451 * mpn/alpha/aorslsh1_n.asm: Rewrite.
4452 * mpn/alpha/ev6/aorslsh1_n.asm: New file.
4453
4454 2013-08-21 Torbjorn Granlund <[email protected]>
4455
4456 * mpn/alpha/sqr_diag_addlsh1.asm: New file.
4457 * mpn/alpha/sqr_diagonal.asm: Remove.
4458 * mpn/alpha/ev6/sqr_diagonal.asm: Remove.
4459
4460 2013-08-20 Torbjorn Granlund <[email protected]>
4461
4462 * mpn/powerpc32/sqr_diag_addlsh1.asm: New file.
4463 * mpn/powerpc32/sqr_diagonal.asm: Remove.
4464
4465 2013-08-15 Torbjorn Granlund <[email protected]>
4466
4467 * mpn/x86_64/coreihwl/mulx/sqr_basecase.asm: New file.
4468
4469 2013-08-05 Torbjorn Granlund <[email protected]>
4470
4471 * mpn/x86_64/coreisbr/aors_n.asm: Complete rewrite.
4472
4473 2013-08-04 Torbjorn Granlund <[email protected]>
4474
4475 * mpn/x86_64/coreihwl/mulx/mul_basecase.asm: New file.
4476
4477 * mpn/x86_64/bd1/mul_2.asm: New file.
4478
4479 * mpn/x86_64/coreihwl/gmp-mparam.h: New file.
4480
4481 2013-08-03 Torbjorn Granlund <[email protected]>
4482
4483 * mpn/x86_64/coreihwl/mulx/mul_2.asm: New file.
4484 * mpn/x86_64/coreihwl/mulx/addmul_2.asm: New file.
4485
4486 * mpn/x86_64/coreinhm/aorsmul_1.asm: New file.
4487
4488 * mpn/x86_64/coreisbr/mul_basecase.asm: Save some O(n) and O(1) cycles.
4489
4490 * mpn/x86_64/coreisbr/mul_2.asm: New file.
4491
4492 2013-08-02 Torbjorn Granlund <[email protected]>
4493
4494 * mpn/x86_64/coreisbr/addmul_2.asm: Complete rewrite.
4495
4496 2013-08-01 Torbjorn Granlund <[email protected]>
4497
4498 * mpn/x86_64/bd1/mul_basecase.asm: New file.
4499
4500 * mpn/x86_64/coreisbr/mul_basecase.asm: New file.
4501
4502 * mpn/x86_64/coreihwl/aorsmul_1.asm: New file.
4503
4504 2013-07-31 Torbjorn Granlund <[email protected]>
4505
4506 * mpn/x86_64/atom/mul_2.asm: New file.
4507 * mpn/x86_64/atom/addmul_2.asm: New file.
4508 * mpn/x86_64/atom/mul_1.asm: New file.
4509 * mpn/x86_64/atom/aorsmul_1.asm: New file.
4510
4511 * mpn/x86_64/coreihwl/mul_1.asm: New file.
4512
4513 * configure.ac (x86): Add Haswell-specific path.
4514
4515 * configure.in (fat_functions): Add cnd_add_n, cnd_sub_n..
4516 * gmp-impl.h (struct cpuvec_t): Add fields for new fat functions.
4517 * gmp-impl.h: Adjust corresponding declarations.
4518
4519 * mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): Add new fat functions.
4520 * mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): Likewise.
4521 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec): Likewise.
4522 * mpn/x86/fat/fat.c (__gmpn_cpuvec): Likewise.
4523
4524 2013-07-30 Torbjorn Granlund <[email protected]>
4525
4526 * mpn/x86_64/coreisbr/popcount.asm: New file.
4527
4528 2013-07-23 Torbjorn Granlund <[email protected]>
4529
4530 * mpn/x86_64/bobcat/aors_n.asm: New file.
4531
4532 * mpn/x86_64/pentium4/aorslshC_n.asm: Remove a spurious emms insn.
4533
4534 * mpn/x86_64/bd1/aorrlsh1_n.asm: New file.
4535 * mpn/x86_64/bd1/sublsh1_n.asm: New file.
4536
4537 2013-07-22 Torbjorn Granlund <[email protected]>
4538
4539 * mpn/powerpc64/mode64/mod_1_1.asm: Handle little-endian mode.
4540 * mpn/powerpc64/mode64/mod_1_4.asm: Likewise.
4541
4542 2013-07-16 Torbjorn Granlund <[email protected]>
4543
4544 * doc/gmp.texi: Declare countless of function arguments as 'const'.
4545
4546 2013-07-15 Torbjorn Granlund <[email protected]>
4547
4548 * mpn/x86_64/core2/aors_n.asm: Rewrite.
4549
4550 * mpn/generic/sb_div_sec.c: Compute inverse as floor(B^2/(dh+1)), per
4551 Niels' suggestion.
4552 * mpn/generic/sbpi1_div_sec.c: Remove inverse rounding-up code.
4553
4554 2013-07-14 Torbjorn Granlund <[email protected]>
4555
4556 * mpn/powerpc64/mode64/divrem_1.asm: Remove explicit nop after CALL.
4557 * mpn/powerpc64/mode64/divrem_2.asm: Likewise.
4558 * mpn/powerpc64/mode64/mod_1_1.asm: Likewise.
4559 * mpn/powerpc64/mode64/mod_1_4.asm: Likewise.
4560
4561 2013-07-13 Torbjorn Granlund <[email protected]>
4562
4563 * mpn/x86/atom/cnd_add_n.asm: New file.
4564 * mpn/x86/atom/cnd_sub_n.asm: New file.o
4565
4566 2013-07-12 Torbjorn Granlund <[email protected]>
4567
4568 * mpn/generic/sbpi1_div_sec.c: Partial rewrite.
4569
4570 2013-07-11 Torbjorn Granlund <[email protected]>
4571
4572 * mpn/x86_64/cnd_aors_n.asm: Tweak for better speed on K8, bobcat, bd1,
4573 NHM, Atom.
4574
4575 2013-07-05 Torbjorn Granlund <[email protected]>
4576
4577 * mpn/powerpc64/p7/copyi.asm: Handle n = 0.
4578 * mpn/powerpc64/p7/copyd.asm: Likewise.
4579
4580 2013-07-04 Torbjorn Granlund <[email protected]>
4581
4582 * mpn/powerpc64/mode64/p7/aormul_2.asm: New file.
4583
4584 * mpn/powerpc64/darwin.m4 (EXTRA_REGISTER): New define.
4585 * mpn/powerpc64/aix.m4: New define (actually undefine).
4586 * mpn/powerpc64/elf.m4: Likewise.
4587
4588 2013-07-03 Torbjorn Granlund <[email protected]>
4589
4590 * mpn/powerpc64/com.asm: Rewrite.
4591
4592 * mpn/powerpc64/p7/copyi.asm: New file.
4593 * mpn/powerpc64/p7/copyd.asm: New file.
4594
4595 2013-07-02 Torbjorn Granlund <[email protected]>
4596
4597 * mpn/powerpc64/mode64/gcd_1.asm: New file.
4598 * mpn/powerpc64/mode64/p7/gcd_1.asm: New file.
4599
4600 2013-07-01 Torbjorn Granlund <[email protected]>
4601
4602 * configure.ac: Comment out AC_PROG_F77.
4603
4604 * mpn/powerpc64/mode64/rsh1add_n.asm: Remove.
4605 * mpn/powerpc64/mode64/rsh1sub_n.asm: Remove.
4606 * mpn/powerpc64/mode64/rsh1aors_n.asm: New file, code not based on
4607 removed files.
4608
4609 2013-06-28 Marc Glisse <[email protected]>
4610
4611 * cxx/ismpf.cc: Use GMP_DECIMAL_POINT.
4612 * cxx/osmpf.cc: Likewise.
4613 * tests/cxx/t-locale.cc: Likewise.
4614
4615 2013-06-28 Torbjorn Granlund <[email protected]>
4616
4617 * mpn/powerpc64/mode64/p7/aorsorrlshC_n.asm: New file.
4618 * mpn/powerpc64/mode64/p7/aorsorrlsh1_n.asm: New file.
4619 * mpn/powerpc64/mode64/p7/aorsorrlsh2_n.asm: New file.
4620
4621 * mpn/powerpc64/mode64/aorsorrlshC_n.asm: Use alias regname.
4622
4623 2013-06-27 Torbjorn Granlund <[email protected]>
4624
4625 * mpn/powerpc64/mode64/p7/aors_n.asm: New file.
4626
4627 2013-06-22 Torbjorn Granlund <[email protected]>
4628
4629 * aorslshC_n.asm, aorslsh2_n.asm, aorslsh1_n.asm: Remove.
4630 * aorsorrlshC_n.asm, aorsorrlsh1_n.asm, aorsorrlsh2_n.asm: New files.
4631
4632 2013-06-19 Torbjorn Granlund <[email protected]>
4633
4634 * mpn/powerpc64/p6/lshift.asm: Rewrite switching-into-loop code.
4635 * mpn/powerpc64/p6/rshift.asm: Likewise.
4636 * mpn/powerpc64/p6/lshiftc.asm: Likewise.
4637
4638 2013-06-17 Torbjorn Granlund <[email protected]>
4639
4640 * mpn/powerpc64/p6/lshift.asm: Fix typo in label reference.
4641 For 32-bit mode, zero extend `n' argument and split retval.
4642 * mpn/powerpc64/p6/rshift.asm: Likewise.
4643 * mpn/powerpc64/p6/lshiftc.asm: Likewise.
4644
4645 2013-06-10 Torbjorn Granlund <[email protected]>
4646
4647 * mpn/generic/mu_div_q.c: Remove obsolete comment.
4648
4649 2013-06-09 Marc Glisse <[email protected]>
4650
4651 * mpn/generic/get_d.c (mpn_get_d): Avoid signed overflow.
4652 * mpz/kronzs.c (mpz_kronecker_si): Use ABS_CAST.
4653
4654 2013-05-31 Torbjorn Granlund <[email protected]>
4655
4656 * mpn/generic/mu_div_q.c: Call mpn_mu_divappr_q for entire division,
4657 never just for tail. (This fixes performance issues at the expense of
4658 memory needs.)
4659
4660 2013-05-26 Torbjorn Granlund <[email protected]>
4661
4662 * configure.ac (*sparc*-*-*): Major overhaul.
4663
4664 2013-05-22 Torbjorn Granlund <[email protected]>
4665
4666 * doc/gmp.texi (Reporting Bugs): Ask for configure's output.
4667
4668 * mpn/ia64/divrem_2.asm: Don't clobber f16-f18.
4669
4670 2013-05-20 Torbjorn Granlund <[email protected]>
4671
4672 * mpn/arm/udiv.asm: Change spacing to work around binutils bug.
4673
4674 2013-05-16 Torbjorn Granlund <[email protected]>
4675
4676 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
4677
4678 * tests/misc.c (tests_hardware_getround, tests_hardware_setround):
4679 Avoid assembly dependency unless WANT_ASSEMBLY.
4680
4681 * configure.ac (WANT_ASSEMBLY): Conditionally define.
4682
4683 2013-05-14 Torbjorn Granlund <[email protected]>
4684
4685 * configure.ac (arm1156): Don't fall back to plain v6 compiler option.
4686
4687 2013-05-11 Torbjorn Granlund <[email protected]>
4688
4689 * mpn/x86_64/coreisbr/mul_1.asm: Handle n = 1 for DOS64. Streamline.
4690 * mpn/x86_64/coreisbr/aorsmul_1.asm: Streamline.
4691
4692 2013-05-10 Torbjorn Granlund <[email protected]>
4693
4694 * mpn/x86_64/coreisbr/aorsmul_1.asm: Fix, then enable DOS64 support.
4695 * mpn/x86_64/coreisbr/mul_1.asm: Enable DOS64 support.
4696
4697 * mpn/x86/p6/mmx/gmp-mparam.h: Set down SQR_TOOM2_THRESHOLD to parent
4698 directory value.
4699
4700 2013-05-09 Torbjorn Granlund <[email protected]>
4701
4702 * configure.ac (--enable-fake-cpuid): New option.
4703 * mpn/x86_64/fat/fat.c (WANT_FAKE_CPUID): Remove defaulting.
4704 * mpn/x86/fat/fat.c (WANT_FAKE_CPUID): Likewise.
4705
4706 * mpn/x86_64/bd1/mul_1.asm: Fix typo.
4707
4708 2013-05-07 Torbjorn Granlund <[email protected]>
4709
4710 * mpn/x86_64/fat/fat.c (fake_cpuid): Handle 0x80000001 request.
4711 (fake_cpuid_available): Remove unused function.
4712
4713 * mpn/generic/mod_1_1.c: Cast constant udiv_rnnd_preinv arguments.
4714 * mpn/generic/mod_1_2.c: Likewise.
4715 * mpn/generic/mod_1_3.c: Likewise.
4716 * mpn/generic/mod_1_4.c: Likewise.
4717 * mpn/generic/divrem_2.c: Likewise.
4718
4719 2013-05-06 Torbjorn Granlund <[email protected]>
4720
4721 * config.guess (power*): Handle all ppc970 variants.
4722
4723 2013-05-03 David S. Miller <[email protected]>
4724
4725 * tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
4726 speed_mpn_rsblsh1_n, speed_mpn_addlsh2_n, speed_mpn_sublsh2_n,
4727 speed_mpn_rsblsh2_n): Don't define if these routines are macros.
4728 * tune/speed.c (routine): Likewise don't table if they are macros.
4729
4730 * mpn/sparc64/ultrasparct3/addmul_1.asm: Add T4 and T3 timings.
4731 * mpn/sparc64/ultrasparct3/aormul_4.asm: Likewise.
4732 * mpn/sparc64/ultrasparct3/aorslsh_n.asm: Likewise.
4733 * mpn/sparc64/ultrasparct3/cnd_aors_n.asm: Likewise.
4734 * mpn/sparc64/ultrasparct3/submul_1.asm: Likewise.
4735
4736 2013-05-03 Torbjorn Granlund <[email protected]>
4737
4738 * mpn/sparc64/ultrasparct3/aorslsh_n.asm: Invoke INITCY where it has
4739 effect.
4740
4741 * gmp-impl.h: Amend last change.
4742 * tests/devel/try.c (choice_array): Don't try to table addlsh1_n etc if
4743 a macro.
4744
4745 2013-05-02 Torbjorn Granlund <[email protected]>
4746
4747 * mpn/arm/copyd.asm: Suppress dead pointer update.
4748 * mpn/arm/copyi.asm: Likewise.
4749 * mpn/arm/neon/logops_n.asm: Likewise.
4750 * mpn/arm/neon/tabselect.asm: Likewise.
4751 * mpn/arm/rshift.asm: Likewise.
4752 * mpn/arm/tabselect.asm: Likewise.
4753 * mpn/arm/v6/dive_1.asm: Likewise
4754 * mpn/arm/v7a/cora15/neon/copyi.asm: Likewise.
4755
4756 * mpn/arm/v7a/cora15/neon/com.asm: New file.
4757
4758 2013-05-01 Torbjorn Granlund <[email protected]>
4759
4760 * mpn/sparc64/ultrasparct3/aormul_4.asm: New file.
4761
4762 * configure.ac (GMP_MULFUNC_CHOICES): Support mul_3 + addmul_3 and
4763 mul_4 + addmul_4.
4764
4765 * mpn/sparc64/ultrasparct3/aormul_2.asm: Optimise lead-in code.
4766
4767 * mpn/sparc64/ultrasparct3/missing.m4 (addxccc): Allow g2 as input.
4768 (umulxhi): Save and restore o7 to allow it as in/out parameter.
4769
4770 2013-04-29 Torbjorn Granlund <[email protected]>
4771
4772 * mpn/arm/v7a/cora15/cnd_aors_n.asm: New file, was mis-named.
4773
4774 * mpn/sparc64/ultrasparct3/addmul_1.asm: Rewrite.
4775
4776 * mpn/sparc64/ultrasparct3/submul_1.asm: Rewrite.
4777
4778 * mpn/sparc64/ultrasparct3/cnd_aors_n.asm: New file.
4779
4780 * gmp-impl.h: Override mpn_addlsh1_n, mpn_addlsh2_n, mpn_sublsh1_n, etc
4781 with mpn_addlsh_n, etc when !HAVE_NATIVE the former but HAVE_NATIVE the
4782 latter.
4783
4784 * mpn/sparc64/ultrasparct3/aorslsh_n.asm: New file.
4785
4786 * configure.ac (sparc-*-*): Recognise t5 along with t3 and t4.
4787 Remove sparc64/ultrasparct1 from path_64 for T3, T3, and T5.
4788
4789 2013-04-27 Mike Frysinger <[email protected]>
4790
4791 * configure.ac (arm*-*-*): Set up path also for plainest CPU variants.
4792
4793 2013-04-27 Torbjorn Granlund <[email protected]>
4794
4795 * mpn/arm/v6/popham.asm: New file.
4796
4797 * mpn/arm/v7a/cora15/cnd-aors_n.asm: New file.
4798
4799 2013-04-25 Torbjorn Granlund <[email protected]>
4800
4801 * mpn/arm/mod_34lsub1.asm: Clear carry smarter.
4802
4803 * mpn/arm/v7a/cora15/logops_n.asm: Conditionally suppress conditionally
4804 used code.
4805
4806 * mpn/arm/v7a/cora15/submul_1.asm: New file.
4807
4808 2013-04-24 Torbjorn Granlund <[email protected]>
4809
4810 * mpn/arm/v7a/cora15/com.asm: New file.
4811
4812 * mpn/arm/v7a/cora15/logops_n.asm: New file.
4813
4814 2013-04-19 Torbjorn Granlund <[email protected]>
4815
4816 * mpn/arm/v7a/cora15/aors_n.asm: New file.
4817
4818 * mpn/arm/v7a/cora15/addmul_1.asm: Rewrite.
4819
4820 2013-04-18 Torbjorn Granlund <[email protected]>
4821
4822 * mpn/alpha/tabselect.asm: New file.
4823
4824 2013-04-17 Torbjorn Granlund <[email protected]>
4825
4826 * mpn/powerpc32/tabselect.asm: New file.
4827
4828 * longlong.h (arm64 count_trailing_zeros): New.
4829
4830 * mpn/arm64/invert_limb.asm: New file.
4831
4832 * mpn/generic/dive_1.c: Rewrite to use Hensel division also for
4833 size = 1.
4834
4835 * mpn/generic/mod_1_1.c (add_mssaaaa): Provide VIS3 variant.
4836
4837 * configure.ac: Remove "missing" from extra_functions_64 for coreibwl.
4838
4839 * mpn/sparc64/ultrasparct3/mul_1.asm: Decrease loop alignment.
4840 * mpn/sparc64/ultrasparct3/aormul_2.asm: Likewise.
4841
4842 2013-04-16 Torbjorn Granlund <[email protected]>
4843
4844 * mpn/alpha/invert_limb.asm: Generate table.
4845 * mpn/powerpc64/mode64/invert_limb.asm: Likewise.
4846 * mpn/s390_64/invert_limb.asm: Likewise.
4847 * mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
4848 * mpn/x86_64/invert_limb_table.asm: Likewise.
4849
4850 2013-04-15 David S. Miller <[email protected]>
4851
4852 * mpn/sparc32/sparc-defs.m4 (LEA64): New macro.
4853 * mpn/sparc64/gcd_1.asm: Use it.
4854 * mpn/sparc64/ultrasparct3/dive_1.asm: Likewise.
4855 * mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
4856 * mpn/sparc64/ultrasparct3/mode1o.asm: Likewise.
4857
4858 * mpn/sparc64/gcd_1.asm: Use RODATA, TYPE, and SIZE.
4859
4860 2013-04-15 Torbjorn Granlund <[email protected]>
4861
4862 * mpn/sparc64/ultrasparct3/invert_limb.asm: Avoid addend for GOT entry,
4863 it is not portable.
4864
4865 * mpn/sparc64/tabselect.asm: New file.
4866
4867 * mpn/x86/mmx/tabselect.asm: New file.
4868 * configure.ac (x86): Add x86/mmx to path for relevant CPUs.
4869
4870 * mpn/sparc64/gcd_1.asm: Use rdpc for PIC.
4871 * mpn/sparc64/ultrasparct3/mode1o.asm: Use rdpc for PIC.
4872 * mpn/sparc64/ultrasparct3/dive_1.asm: Use rdpc for PIC.
4873 * mpn/sparc64/ultrasparct3/invert_limb.asm: Handle PIC, use rdpc.
4874
4875 * Revert remaining parts of recent sparc LEA changes.
4876
4877 2013-04-14 David S. Miller <[email protected]>
4878
4879 * mpn/sparc32/v9/sqr_diagonal.asm: Revert LEA and INT32 changes.
4880 * mpn/sparc64/gcd_1.asm: Likewise.
4881
4882 2013-04-13 Torbjorn Granlund <[email protected]>
4883
4884 * mpn/x86_64/bd1/tabselect.asm: New file.
4885 * mpn/x86_64/coreisbr/tabselect.asm: New file.
4886 * mpn/x86_64/k10/tabselect.asm: New file.
4887 * mpn/x86_64/coreinhm/tabselect.asm: New file.
4888 * mpn/x86_64/core2/tabselect.asm: New file.
4889 * mpn/x86_64/pentium4/tabselect.asm: New file.
4890
4891 * mpn/x86_64/fastsse/tabselect.asm: New file.
4892 * mpn/arm/neon/tabselect.asm: Rewrite.
4893 * mpn/arm/tabselect.asm: Rewrite.
4894 * mpn/powerpc64/tabselect.asm: Rewrite.
4895 * mpn/x86_64/tabselect.asm: Rewrite.
4896
4897 * tune/speed.h (SPEED_ROUTINE_MPN_TABSELECT): Implement special code,
4898 making .r argument be table width.
4899
4900 2013-04-11 David S. Miller <[email protected]>
4901
4902 * mpn/sparc32/sparc-defs.m4 (LEA): Remove unused local label.
4903 (LEA_LEAF): Likewise.
4904
4905 2013-04-11 Niels Möller <[email protected]>
4906
4907 * mpn/arm/v6/submul_1.asm: New file, using the corresponding
4908 addmul_1 loop + complement trick.
4909
4910 2013-04-10 David S. Miller <[email protected]>
4911
4912 * acinclude.m4 (GMP_ASM_SPARC_GOTDATA,
4913 GMP_ASM_SPARC_SHARED_THUNKS): New feature tests.
4914 * configure.ac: Call GMP_ASM_SPARC_GOTDATA and
4915 GMP_ASM_SPARC_SHARED_THUNKS on sparc.
4916 * mpn/sparc32/sparc-defs.m4 (LEA, LEA_LEAF, LEA_THUNK): New macros.
4917 * mpn/sparc32/udiv.asm: Convert over to LEA, LEA_LEAF, and LEA_THUNK.
4918 * mpn/sparc32/v8/addmul_1.asm: Likewise.
4919 * mpn/sparc32/v8/mul_1.asm: Likewise.
4920 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
4921 * mpn/sparc32/v8/udiv.asm: Likewise.
4922 * mpn/sparc64/gcd_1.asm: Likewise.
4923 * mpn/sparc64/ultrasparct3/dive_1.asm: Likewise.
4924 * mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
4925 * mpn/sparc64/ultrasparct3/mode1o.asm: Likewise.
4926 * mpn/sparc32/v9/sqr_diagonal.asm: Likewise and use INT32.
4927
4928 2013-04-09 Torbjorn Granlund <[email protected]>
4929
4930 * longlong.h (sparc64): Test __VIS__ instead of __sparc_vis3.
4931
4932 * config.guess (sparc*): Invoke set_cc_for_build to get $dummy.
4933
4934 2013-04-08 Torbjorn Granlund <[email protected]>
4935
4936 * config.guess: Rework tmp file names, make sure to remove tmp files.
4937
4938 * mpn/arm/dive_1.asm: Rewrite count-trailing-zeros code, using private
4939 table.
4940
4941 * mpn/arm: Canonicalise arm assembly to use old style "mov ... lsl" for
4942 shift ops.
4943
4944 2013-04-07 Torbjorn Granlund <[email protected]>
4945
4946 * mpn/sparc64/ultrasparct3/mod_34lsub1.asm: New file.
4947
4948 * longlong.h (sparc64): Define umul_ppmm, add_ssaaaa, and
4949 count_leading_zeros conditionally under the symbol __sparc_vis3.
4950
4951 * mpn/arm/dive_1.asm: New file.
4952 * mpn/arm/v6/dive_1.asm: New file.
4953
4954 * mpn/arm/v6t2/mode1o.asm: Make trivial change to avoid v6t2...
4955 * mpn/arm/v6/mode1o.asm: ...instruction, move file accordingly.
4956
4957 * mpn/powerpc64/mode64/invert_limb.asm: Put all multiplies low-limb first.
4958
4959 2013-04-04 David S. Miller <[email protected]>
4960
4961 * mpn/sparc64/ultrasparct3/add_n.asm: Rewrite.
4962 * mpn/sparc64/ultrasparct3/sub_n.asm: Rewrite.
4963
4964 * mpn/sparc64/ultrasparct3/invert_limb.asm: Align table.
4965
4966 2013-04-04 Torbjorn Granlund <[email protected]>
4967
4968 * mpn/sparc32/sparc-defs.m4: Provide dummy lzcnt.
4969
4970 * tests/mpn/logic.c: Seed using RANDS, then use mpz_rrandomb.
4971
4972 * tests/mpn/t-div.c (random_word): Remove. Let callers invoke urandom.
4973
4974 * mpn/sparc64/ultrasparct3/mul_1.asm: Rewrite.
4975
4976 * mpn/sparc64/ultrasparct3/bdiv_dbm1c.asm: New file.
4977 * mpn/sparc64/ultrasparct3/dive_1.asm: New file.
4978 * mpn/sparc64/ultrasparct3/invert_limb.asm: New file.
4979 * mpn/sparc64/ultrasparct3/mod_1_4.asm: New file.
4980 * mpn/sparc64/ultrasparct3/mode1o.asm: New file.
4981
4982 2013-04-03 Torbjorn Granlund <[email protected]>
4983
4984 * mpn/sparc64/ultrasparct3/aormul_2.asm: Reschedule for better speed.
4985
4986 2013-04-02 Torbjorn Granlund <[email protected]>
4987
4988 * mpn/sparc64/ultrasparct3/missing.m4: Misc tweaks.
4989 (lzcnt): New.
4990 * mpn/sparc64/ultrasparct3/missing.asm (__gmpn_lzcnt): New function.
4991
4992 * mpn/sparc32/sparc-defs.m4: Put FAKE_T3 stuff here...
4993 * mpn/sparc64/ultrasparct3/aormul_2.asm: ...moved from here.
4994
4995 * mpn/sparc64/ultrasparc1234/lshift.asm: Remove.
4996 * mpn/sparc64/ultrasparc1234/rshift.asm: Remove.
4997
4998 2013-04-01 Torbjorn Granlund <[email protected]>
4999
5000 * mpn/sparc64/ultrasparct3/missing.m4 (umulxhi): Don't clobber retaddr,
5001 allowing use in functions that does not do save/restore.
5002
5003 * mpn/sparc64/gcd_1.asm: Tweak for tighter loop.
5004
5005 2013-03-31 David S. Miller <[email protected]>
5006
5007 * mpn/sparc64/lshift.asm: New file.
5008 * mpn/sparc64/rshift.asm: New file.
5009 * mpn/sparc64/lshiftc.asm: New file.
5010
5011 2013-03-31 Torbjorn Granlund <[email protected]>
5012
5013 * mpn/sparc64/ultrasparct1/lshift.asm: Remove.
5014 * mpn/sparc64/ultrasparct1/rshift.asm: Remove.
5015 * mpn/sparc64/ultrasparct1/lshiftc.asm: Remove.
5016
5017 2013-03-29 Torbjorn Granlund <[email protected]>
5018
5019 * mpn/sparc64/ultrasparct3/aormul_2.asm: Always do mulx before umulxhi.
5020
5021 2013-03-28 Torbjorn Granlund <[email protected]>
5022
5023 * mpn/sparc64/mod_1_4.c (mpn_mod_1s_4p): Make precomputed arg 'const'.
5024 (mpn_mod_1s_4p_cps): Update from generic code.
5025
5026 2013-03-27 Torbjorn Granlund <[email protected]>
5027
5028 * mpn/generic/trialdiv.c: Make variables 'const' to match tables.
5029
5030 * mpn/generic/mod_1_1.c (mpn_mod_1_1p): Make precomputed arg 'const'.
5031 * mpn/generic/mod_1_2.c (mpn_mod_1s_2p): Likewise.
5032 * mpn/generic/mod_1_3.c (mpn_mod_1s_3p): Likewise.
5033 * mpn/generic/mod_1_4.c (mpn_mod_1s_4p): Likewise.
5034 * gmp-impl.h: Update prototypes.
5035
5036 * mpn/x86_64/mulx/aorsmul_1.asm: New file.
5037 * mpn/x86_64/mulx/addmul_1.asm: Remove.
5038
5039 2013-03-26 Niels Möller <[email protected]>
5040
5041 Make mpn_cnd_add_n and mpn_cnd_sub_n public.
5042 * doc/gmp.texi (Low-level Functions): Document mpn_cnd_add_n and
5043 mpn_cnd_sub_n.
5044 * gmp-h.in (mpn_cnd_add_n, mpn_cnd_sub_n): Moved prototypes
5045 here...
5046 * gmp-impl.h: ... from here.
5047
5048 2013-03-26 Torbjorn Granlund <[email protected]>
5049
5050 * mpn/x86/pentium4/sse2/cnd_add_n.asm: New file.
5051 * mpn/x86/pentium4/sse2/cnd_sub_n.asm: New file.
5052 * mpn/x86/cnd_aors_n.asm: New file.
5053
5054 2013-03-25 David S. Miller <[email protected]>
5055
5056 * mpn/sparc64/ultrasparct3/hamdist.asm: New file.
5057 * mpn/sparc64/ultrasparct3/popcount.asm: New file.
5058
5059 2013-03-25 Torbjorn Granlund <[email protected]>
5060
5061 * mpn/ia64/aorsorrlshC_n.asm: Generalised from aorslshC_n.asm.
5062 * mpn/ia64/aorsorrlsh1_n.asm: Generalised from aorslsh1_n.asm.
5063 * mpn/ia64/aorsorrlsh2_n.asm: Generalised from aorslsh2_n.asm.
5064
5065 2013-03-24 Torbjorn Granlund <[email protected]>
5066
5067 * mpn/arm/v7a/cora15/neon/aorsorrlshC_n.asm: New file.
5068 * mpn/arm/v7a/cora15/neon/aorsorrlsh2_n.asm: New file.
5069 * mpn/arm/v7a/cora15/neon/aorsorrlsh1_n.asm: New file.
5070 * mpn/arm/v7a/cora15/neon/rsh1aors_n.asm: New file.
5071
5072 * configure.ac (GMP_MULFUNC_CHOICES): Support add+sub+rsb lsh files.
5073
5074 * tests/refmpn.c (refmpn_addlsh_nc, refmpn_sublsh_nc): Remove silly
5075 assert of mp_limb being non-negative.
5076
5077 2013-03-21 Torbjorn Granlund <[email protected]>
5078
5079 * mpn/arm/neon/lshiftc.asm: New file.
5080
5081 * mpn/arm/v6/sqr_basecase.asm: Trim 'sqr_diag_addlsh1' loop.
5082
5083 * gen-trialdivtab.c: Output just raw data, remove actual variables.
5084 * mpn/generic/trialdiv.c: Put variables from gen-trialdivtab.c here,
5085 and make them 'const'.
5086
5087 2013-03-20 Torbjorn Granlund <[email protected]>
5088
5089 * config.guess: Rework arm CPU recognition.
5090 * config.sub: Corresponding updates.
5091 * configure.ac: Likewise.
5092
5093 * mpn/x86_64/mulx/adx/addmul_1.asm: Let FAKE_MULXADX be off by default.
5094
5095 * mpn/arm/v7a/cora15/neon/copyi.asm: Move from "..".
5096 * mpn/arm/v7a/cora15/neon/copyd.asm: Likewise.
5097
5098 * config.guess: Tack on "neon" for appropriate arm CPUs.
5099 * configure.ac (arm*-*-*): Recognise neon suffix for a8, a9, and a15.
5100
5101 2013-03-19 Marco Bodrato <[email protected]>
5102
5103 * mpf/fits_u.h: Accept numbers truncating to zero before checking the
5104 sign.
5105 * tests/mpf/t-fits.c: Check new edges.
5106
5107 2013-03-19 Torbjorn Granlund <[email protected]>
5108
5109 * tests/arm32check.c: Get printing of clobbered register right.
5110
5111 * mpn/arm/neon/popcount.asm: New file.
5112 * mpn/arm/neon/hamdist.asm: New file.
5113
5114 * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add arm32call.asm and
5115 arm32check.c.
5116
5117 2013-03-18 Torbjorn Granlund <[email protected]>
5118
5119 * configure.ac (arm*-*-*): Define CALLING_CONVENTIONS_OBJS.
5120
5121 * tests/arm32call.asm: New file.
5122 * tests/arm32check.c: New file.
5123
5124 * mpn/arm/arm-defs.m4 (LEA): Rewrite to properly handle repeated use.
5125 (EPILOGUE_cpu): Define.
5126
5127 * mpn/arm/v6/addmul_3.asm: Make code work for PIC.
5128
5129 * tests/x86call.asm: Modernise asm syntax.
5130 * tests/amd64call.asm: Likewise.
5131
5132 * mpn/x86/darwin.m4 (m4append): Move definition from here...
5133 * mpn/asm-defs.m4: ...to here.
5134
5135 2013-03-18 Marco Bodrato <[email protected]>
5136
5137 * doc/gmp.texi (--enable-fat): No quote in concept index.
5138
5139 * mpf/swap.c: Reduce the number of variables.
5140
5141 2012-03-17 Marc Glisse <[email protected]>
5142
5143 * tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc: New file.
5144 * tests/cxx/Makefile.am: Add new file. Reorder the tests.
5145
5146 2013-03-17 Torbjorn Granlund <[email protected]>
5147
5148 * mpn/generic/mul_fft.c: Use TMP_BALLOC*, but combine several areas.
5149
5150 * mpz/powm_ui.c (mod): Use TMP_BALLOC in mu code.
5151
5152 * mpn/arm/v6/addmul_3.asm: New file.
5153
5154 * mpn/arm/v7a/cora15/copyd.asm: Tweak.
5155
5156 * mpn/arm64/copyi.asm: New file.
5157 * mpn/arm64/copyd.asm: New file.
5158
5159 2013-03-16 Torbjorn Granlund <[email protected]>
5160
5161 * mpn/arm/v6/addmul_2.asm: Tweak for better A9 performance.
5162
5163 2013-03-14 Torbjorn Granlund <[email protected]>
5164
5165 * mpn/ia64/cnd_aors_n.asm: New file.
5166
5167 * mpn/arm64/cnd_aors_n.asm: New file.
5168
5169 * mpn/arm64/aors_n.asm (ADDSUB): Remove unused definition.
5170
5171 * mpn/ia64/aors_n.asm: Remove a redundant ASM_START.
5172
5173 * mpn/arm/cnd_aors_n.asm: Avoid ARM conditional insn execution.
5174
5175 * mpn/x86_64/missing.asm: Move from mulx/adx since we cannot currently
5176 prune missing.asm from path.
5177 * mpn/x86_64/mulx/adx/missing-call.m4: Likewise.
5178 * mpn/x86_64/mulx/adx/missing-inline.m4: Likewise.
5179 * mpn/x86_64/mulx/adx/addmul_1.asm: Update hardwired path.
5180
5181 2013-03-13 Marco Bodrato <[email protected]>
5182
5183 * mpz/cong_2exp.c: Write loops in a cleaner way.
5184 * gmp-impl.h (mpz_zero_p): Likewise.
5185
5186 2013-03-12 Niels Möller <[email protected]>
5187
5188 New names mpn_cnd_add_n and mpn_cnd_sub_n.
5189 * mpn/generic/cnd_add_n.c (mpn_cnd_add_n): Renamed file and
5190 function, from addcnd.c:mpn_addcnd_n.
5191 * mpn/generic/cnd_sub_n.c (mpn_cnd_sub_n): Renamed, from
5192 subcnd.c:mpn_subcnd_n.
5193 * mpn/arm/cnd_aors_n.asm: Renamed file, from aorscnd.asm, and
5194 renamed functions.
5195 * mpn/x86_64/cnd_aors_n.asm: Analogous renaming.
5196 * mpn/powerpc64/mode64/cnd_aors_n.asm: Analogous renaming.
5197 * gmp-impl.h (mpn_cnd_add_n, mpn_cnd_add_n): Updated prototypes
5198 with new names.
5199 * configure.ac: Updated for new names.
5200 * tests/refmpn.c (refmpn_cnd_add_n): Renamed, from refmpn_addcnd_n.
5201 (refmpn_cnd_sub_n): Renamed, from refmpn_subcnd_n.
5202 * tests/tests.h (refmpn_cnd_add_n, refmpn_cnd_sub_n): Updated
5203 prototypes with new names.
5204 * tune/common.c (speed_mpn_cnd_add_n): Renamed, from
5205 speed_mpn_addcnd_n, call mpn_cnd_add_n.
5206 (speed_mpn_cnd_sub_n): Renamed, from speed_mpn_subcnd_n, call
5207 mpn_cnd_sub_n.
5208 * tune/speed.h (speed_mpn_cnd_add_n, speed_mpn_cnd_sub_n): Updated
5209 prototypes with new names.
5210 * tune/speed.c (routine): Updated list with new names.
5211 * tests/devel/try.c: Updated for new mpn_cnd_* names.
5212 * mpn/generic/sbpi1_div_sec.c: Likewise.
5213 * mpn/generic/powm_sec.c: Likewise.
5214
5215 2013-03-12 Torbjorn Granlund <[email protected]>
5216
5217 * configure.ac: Add "missing" to extra_functions_64 for coreibwl.
5218
5219 * mpn/x86_64/mulx/adx/addmul_1.asm: Simplify. Make FAKE_MULXADX the
5220 default awaiting proper qemu behaviour.
5221
5222 2013-03-11 Torbjorn Granlund <[email protected]>
5223
5224 * mpn/x86_64/aorscnd_n.asm: Read 32 bits for 'n' arguments on DOS64.
5225
5226 * tests/mpz/t-powm_ui.c: Test larger arguments. General cleanup.
5227
5228 * mpz/powm_ui.c (mod): Adhere to mpn_mu_div_qr's overlap requirements.
5229
5230 2013-03-10 Niels Möller <[email protected]>
5231
5232 * mpn/generic/sbpi1_div_sec.c: Update calls of mpn_addcnd_n and
5233 mpn_subcnd_n.
5234 * mpn/generic/powm_sec.c (MPN_REDC_1_SEC, MPN_REDC_2_SEC)
5235 (mpn_powm_sec): Update calls of mpn_subcnd_n.
5236
5237 * tests/tests.h (refmpn_addcnd_n, refmpn_subcnd_n): Update
5238 declarations.
5239 * tests/refmpn.c (refmpn_addcnd_n, refmpn_subcnd_n): Similar
5240 reorder of arguments.
5241 * tests/devel/try.c (call): Pass condition first, for
5242 TYPE_ADDCND_N and TYPE_SUBCND_N.
5243
5244 * tune/common.c (speed_mpn_addcnd_n, speed_mpn_subcnd_n): Update
5245 to pass condition as first argument.
5246
5247 * gmp-impl.h (mpn_addcnd_n, mpn_subcnd_n): Updated declarations.
5248
5249 * mpn/generic/addcnd_n.c (mpn_addcnd_n): Reordered arguments, make
5250 condition the first argument.
5251 * mpn/generic/subcnd_n.c (mpn_subcnd_n): Likewise.
5252 * mpn/arm/aorscnd_n.asm: Likewise.
5253 * mpn/x86_64/aorscnd_n.asm: Likewise.
5254 * mpn/powerpc64/mode64/aorscnd_n.asm: Likewise.
5255
5256 2013-03-10 Torbjorn Granlund <[email protected]>
5257
5258 * mpn/x86_64/mulx/adx/missing.asm: Simulate some mulx/adx insns.
5259 * mpn/x86_64/mulx/adx/missing-call.m4: Call variant.
5260 * mpn/x86_64/mulx/adx/missing-inline.m4: Inline variant.
5261
5262 * mpn/sparc64/ultrasparct3/missing.asm: Simulate some v9-2011 insns.
5263 * mpn/sparc64/ultrasparct3/missing.m4: Inline or invoke missing.asm for
5264 v9-2011 insn.
5265
5266 * configure.ac: Strip `haswell' from paths for now.
5267
5268 * mpn/x86_64/mulx/addmul_1.asm: New.
5269 * mpn/x86_64/mulx/mul_1.asm: Rewrite file from `haswell' subdir.
5270 * mpn/x86_64/mulx/adx/addmul_1.asm: Likewise.
5271 * mpn/x86_64/haswell: Remove.
5272
5273 * mpn/arm/v7a/cora15/mul_1.asm: New file.
5274 * mpn/arm/v7a/cora15/addmul_1.asm: New file.
5275
5276 2013-03-09 Marco Bodrato <[email protected]>
5277
5278 * tests/mpz/t-cong_2exp.c: Improve coverage.
5279
5280 2013-03-09 Torbjorn Granlund <[email protected]>
5281
5282 * mpn/sparc64/ultrasparc1234/add_n.asm: Use g5 instead of g4.
5283 * mpn/sparc64/ultrasparc1234/sub_n.asm: Likewise.
5284
5285 * mpn/sparc64/ultrasparct3/aormul_2.asm: Fix a typo.
5286
5287 2013-03-07 Torbjorn Granlund <[email protected]>
5288
5289 * mpn/arm/v7a/cora9/gmp-mparam.h: New file.
5290
5291 * configure.ac (GMP_MULFUNC_CHOICES): Support mul_2 + addmul_2.
5292
5293 * mpn/sparc64/ultrasparct3/aormul_2.asm: New file.
5294
5295 * mpn/sparc64/ultrasparct3/submul_1.asm: Optimise out two carry
5296 propagating adds.
5297
5298 2013-03-06 David Miller <[email protected]>
5299
5300 * config.guess: Recognize UltraSparc T4 under Linux.
5301 * configure.ac: Add sparc64/ultrasparct3 to path_64 when T3 or T4.
5302 Append -xarch=v8plusd or -xarch=v9d to command line, as needed.
5303 * mpn/sparc64/ultrasparct3/mul_1.asm: New file.
5304 * mpn/sparc64/ultrasparct3/addmul_1.asm: New file.
5305 * mpn/sparc64/ultrasparct3/submul_1.asm: New file.
5306 * mpn/sparc64/ultrasparct3/add_n.asm: New file.
5307 * mpn/sparc64/ultrasparct3/sub_n.asm: New file.
5308
5309 * mpn/sparc32/ultrasparct1/mul_1.asm: Unroll main loop one time, add
5310 T2/T3/T4 timings.
5311 * mpn/sparc32/ultrasparct1/addmul_1.asm: Likewise.
5312 * mpn/sparc32/ultrasparct1/submul_1.asm: Likewise.
5313
5314 2013-03-04 Torbjorn Granlund <[email protected]>
5315
5316 * mpn/arm/neon/lorrshift.asm: New file.
5317
5318 2013-03-03 Torbjorn Granlund <[email protected]>
5319
5320 * mpn/arm/v7a/cora15/copyd.asm: New file.
5321 * mpn/arm/v7a/cora15/copyi.asm: New file.
5322
5323 * mpn/arm64/logops_n.asm: New file.
5324 * mpn/arm64/gcd_1.asm: New file.
5325 * mpn/arm64/aorsmul_1.asm: New file.
5326 * mpn/arm64/addmul_1.asm: Remove.
5327 * mpn/arm64/aors_n.asm: Complete rewrite.
5328
5329 * mpn/arm/tabselect.asm: New file.
5330 * mpn/arm/neon/tabselect.asm: New file.
5331
5332 * mpn/arm/copyi.asm: Software pipeline.
5333 * mpn/arm/copyd.asm: Likewise.
5334
5335 * config.guess: Rework tmp file handling to resemble configfsf.guess's.
5336
5337 2013-03-03 Niels Möller <[email protected]>
5338
5339 * doc/gmp.texi (Integer Special Functions): Document
5340 mpz_limbs_read, mpz_limbs_write, mpz_limbs_modify,
5341 mpz_limbs_finish, mpz_roinit_n and MPZ_ROINIT_N.
5342
5343 * mpz/roinit_n.c (mpz_roinit_n): Normalize the input.
5344
5345 2013-02-27 Niels Möller <[email protected]>
5346
5347 * tune/common.c (speed_measure): Increase repetition count if we
5348 get a zero measurement.
5349
5350 2013-02-26 Niels Möller <[email protected]>
5351
5352 * tests/mpz/t-limbs.c (check_roinit): Test MPZ_ROINIT_N only if
5353 compiler supports c99.
5354
5355 2013-02-25 Niels Möller <[email protected]>
5356
5357 * mpz/limbs_finish.c (mpz_limbs_finish): New file and function.
5358 * mpz/limbs_modify.c (mpz_limbs_modify): New file and function.
5359 * mpz/limbs_read.c (mpz_limbs_read): New file and function.
5360 * mpz/limbs_write.c (mpz_limbs_write): New file and function.
5361 * mpz/roinit_n.c (mpz_roinit_n): New file and function.
5362 * gmp-h.in: Declare new functions.
5363 (MPZ_ROINIT_N): New macro.
5364 * mpz/Makefile.am (libmpz_la_SOURCES): Added new files.
5365 * Makefile.am (MPZ_OBJECTS): Added new object files.
5366
5367 * tests/mpz/t-limbs.c: New testcase.
5368 * tests/mpz/Makefile.am (check_PROGRAMS): Added t-limbs.
5369
5370 2013-02-22 Torbjorn Granlund <[email protected]>
5371
5372 * configure.ac: Fix typo in adx/mulx path stripping code.
5373 * config.sub: Match coreibwl.
5374
5375 2013-02-20 Niels Möller <[email protected]>
5376
5377 * tests/mpq/t-get_d.c (check_random): Rewrote to make test less
5378 dependent on float operations. Fixes problem with m68k-linux and
5379 extended float precision.
5380
5381 2013-02-20 Torbjorn Granlund <[email protected]>
5382
5383 * mpn/x86_64/haswell/mulx/adx/addmul_1.asm: New file.
5384
5385 * configure.ac: Support coreibwl. Use proper name for ADX extension.
5386 * acinclude.m4 (GMP_ASM_X86_ADX): Rename from GMP_ASM_X86_ADOX.
5387
5388 * tests/tests.h (TESTS_REPS): Keep count >= 1.
5389
5390 2013-02-17 Marco Bodrato <[email protected]>
5391
5392 * gmpxx.h (mpq_class, mpf_class) [init_ui, init_si, assign_si]:
5393 Optimise _si using _ui for positive arguments.
5394 (__gmp_hypot_function): Use _mul_ui to square an ui, abs for si.
5395
5396 * mpz/remove.c: Delay allocation in the generic case; use swap
5397 instead of set.
5398 * mpn/generic/remove.c: Delay (possibly smaller) allocation.
5399
5400 2013-02-17 Marc Glisse <[email protected]>
5401
5402 * cxx/osdoprnti.cc: Use <stdarg.h> and <string.h> rather than <cstdarg>
5403 and <cstring> (revert 2002-12-21).
5404
5405 * tests/cxx/Makefile.am: Link with libm.
5406 * tests/cxx/t-ops2.cc: Comment about more tests. Use <math.h> rather
5407 than <cmath> and using namespace. Don't include <iostream>.
5408
5409 * gmpxx.h (__GMPXX_BITS_TO_LIMBS, __GMPQ_NUM_DBL_LIMBS,
5410 __GMPQ_DEN_DBL_LIMBS, __GMPXX_TMPQ_D): New macros.
5411 (__gmp_binary_plus, __gmp_binary_minus, __gmp_binary_multiplies,
5412 __gmp_binary_divides, __gmp_binary_equal, __gmp_binary_less,
5413 __gmp_cmp_function): Use __GMPXX_TMPQ_D.
5414 * tests/cxx/t-ops2.cc: Test __GMPXX_TMPQ_D on DBL_MIN, DBL_MAX.
5415
5416 * gmpxx.h (__gmp_binary_multiplies, __gmp_binary_divides): Use
5417 __GMPXX_CONSTANT_TRUE.
5418
5419 2013-02-16 Marc Glisse <[email protected]>
5420
5421 * gmpxx.h: Include <algorithm>.
5422
5423 2013-02-16 Torbjorn Granlund <[email protected]>
5424
5425 * mpn/Makefile.am (TARG_DIST): Add arm64.
5426
5427 * mpn/x86_64/x86_64-defs.m4 (PROTECT): Emit '.hidden' instead of
5428 '.protected" to please Sun's assembler, but also for semantic reasons.
5429
5430 2013-02-15 Torbjorn Granlund <[email protected]>
5431
5432 * configure.ac (arm64*-*-*): Match this.
5433
5434 * mpn/arm64/aors_n.asm: New file.
5435 * mpn/arm64/addmul_1.asm: New file.
5436 * mpn/arm64/mul_1.asm: New file.
5437
5438 2013-02-15 Marc Glisse <[email protected]>
5439
5440 * gmpxx.h (__GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS,
5441 __GMPXX_DEFINE_ARITHMETIC_ASSIGNMENTS): New macros.
5442 (mpz_class, mpq_class, mpf_class) [init_ui, init_si, init_d,
5443 assign_ui, assign_si, assign_d]: New functions.
5444 (__gmp_expr::__gmp_expr, __gmp_expr::operator=): Replace with macros.
5445 (__GMPXX_CONSTANT_TRUE): New macro.
5446
5447 2013-02-15 Marco Bodrato <[email protected]>
5448
5449 * gmp-impl.h (NEG_CAST, ABS_CAST): Use __GMP_CAST.
5450 * mpz/fits_s.h: Use NEG_CAST.
5451
5452 2013-02-14 Marc Glisse <[email protected]>
5453
5454 * gmpxx.h (__gmp_binary_greater): Forward to __gmp_binary_less.
5455 (__gmp_binary_equal): Forward to itself after swapping operands.
5456
5457 2013-02-14 Marco Bodrato <[email protected]>
5458
5459 * mp_dv_tab.c (__gmp_digit_value_tab): Remove a line of unused values.
5460 * mpf/set_str.c: Update offset accordingly.
5461 * mpz/inp_str.c: Likewise.
5462 * mpz/set_str.c: Likewise.
5463
5464 * gmp-h.in (mpq_cmp_ui): Optimise comparison with 1/1.
5465 * tests/mpq/t-cmp_ui.c: Test special comparisons: 0/1, 1/1.
5466
5467 * mpz/clrbit.c: Reorganise branches.
5468 * mpz/setbit.c: Likewise.
5469 * mpz/combit.c: Same micro-optimisations as in set/clr.
5470
5471 * mpz/aors_ui.h: No realloc if size was zero.
5472 * mpz/ior.c: Use macros: MPZ_REALLOC and MPN_INCR_U.
5473
5474 * gmp-impl.h (NEG_CAST): New macro, used by ABS_CAST.
5475 * mpq/cmp_si.c: Use NEG_CAST.
5476 * mpz/cmp_si.c: Reorganise branches.
5477
5478 2013-02-13 Torbjorn Granlund <[email protected]>
5479
5480 * acinclude.m4 (GMP_ASM_X86_MULX, GMP_ASM_X86_ADOX): New feature tests.
5481 * configure.ac: Use new feature tests.
5482
5483 * mpn/x86_64/haswell/mulx/mul_1.asm: File moved to cope with older
5484 assemblers.
5485 * configure.ac: Update haswell path to include "mulx".
5486
5487 2013-02-12 Torbjorn Granlund <[email protected]>
5488
5489 * configure.ac: Recognise haswell.
5490 * config.guess: Recognise haswell.
5491 * config.sub: Match haswell.
5492
5493 * mpn/x86_64/haswell/mul_1.asm: New file, mainly for testing HNI.
5494
5495 2013-02-12 Marco Bodrato <[email protected]>
5496
5497 * gmp-impl.h (MPZ_PROVOKE_REALLOC): Remove unused macro.
5498 * gen-fac.c (gen_consts): Remove obsolete code, use swap instead of set.
5499
5500 * mpn/generic/mulmod_bnm1.c: Reorganise branches.
5501
5502 * mpz/bin_ui.c: Avoid a copy when n < 0.
5503 * mpz/mfac_uiui.c: Reduce memory usage.
5504 * mpz/primorial_ui.c: Use MPZ_NEWALLOC.
5505
5506 * mpz/import.c: Use BITS_TO_LIMBS and MPZ_NEWALLOC.
5507 * mpz/inp_raw.c: Likewise.
5508 * mpz/rrandomb.c: Likewise.
5509 * mpz/urandomb.c: Likewise.
5510 * mpn/generic/random2.c: Likewise.
5511
5512 * mpn/generic/brootinv.c: Micro-optimisation.
5513
5514 * mpf/set_str.c: Don't chech base==0 when base is strictly positive.
5515
5516 2013-02-10 Torbjorn Granlund <[email protected]>
5517
5518 * Version 5.1.1 released.
5519
5520 2013-02-07 Marco Bodrato <[email protected]>
5521
5522 * tune/speed.h (SPEED_ROUTINE_MPN_MUL): Use operands from struct s.
5523 * tune/README: Document new parameter syntax mpn_mul.<#> .
5524
5525 2013-02-06 Niels Möller <[email protected]>
5526
5527 * tests/mpz/t-jac.c (check_large_quotients): Rewrote. Now uses a
5528 more efficient method for generating the test inputs.
5529
5530 2013-02-05 Torbjorn Granlund <[email protected]>
5531
5532 * tests/mpn/t-div.c: Limit random dbits to avoid an infinite loop.
5533
5534 2013-02-03 Torbjorn Granlund <[email protected]>
5535
5536 * tests/mpz/reuse.c: Fix typo causing the same negation condition to be
5537 applied to all operands. Fix condition for when to invoke mpz_remove.
5538 Make different-size random operands.
5539
5540 2013-02-02 Marco Bodrato <[email protected]>
5541
5542 * mpz/remove.c: Correct the sign in case of reuse.
5543
5544 2013-02-01 Torbjorn Granlund <[email protected]>
5545
5546 * gmp-impl.h (DIGITS_IN_BASE_PER_LIMB): Add a cast.
5547 (LIMBS_PER_DIGIT_IN_BASE): Likewise.
5548
5549 * tests/refmpn.c (refmpn_mul): Use toom6h instead of toom44 for the
5550 largest operands.
5551
5552 2013-01-31 Torbjorn Granlund <[email protected]>
5553
5554 * mpn/generic/toom44_mul.c: Revert last change in favour of a simple
5555 change (thanks Marco!).
5556 * mpn/generic/toom4_sqr.c: Likewise.
5557
5558 2013-01-30 Torbjorn Granlund <[email protected]>
5559
5560 * mpn/generic/toom44_mul.c (MAYBE_mul_toom44): Take toom6h and toom8h
5561 into account, using new macro MUL_NEXTALG_THRESHOLD.
5562 * mpn/generic/toom4_sqr.c (MAYBE_sqr_toom4): Likewise.
5563
5564 2013-01-26 Marco Bodrato <[email protected]>
5565
5566 * mpz/remove.c: init+set=init_set, cast before shifting.
5567
5568 * mpz/cmp_si.c: Use ABS_CAST.
5569
5570 2013-01-26 Torbjorn Granlund <[email protected]>
5571
5572 * tests/mpn/logic.c: Set things up to always test library logops, not
5573 gmp-impl.h's inlined variants. Test also mpn_com.
5574
5575 * tests/mpn/t-mod_1.c: Test also mpn_mod_1s_3p.
5576
5577 * mpn/generic/mod_1_3.c: Swap some lines to make it similar to mod_4.c.
5578
5579 * tests/mpz/reuse.c: Fix typo in last change.
5580
5581 2013-01-22 Torbjorn Granlund <[email protected]>
5582
5583 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
5584 * gmp-h.in: Bump version.
5585
5586 * tests/mpz/reuse.c: Delete always zero 'failures' and code depending
5587 on it. Replace rotating progress with real measure.
5588
5589 * Makefile.am (check-mini-gmp): Fix typo in last change.
5590
5591 2013-01-20 Torbjorn Granlund <[email protected]>
5592
5593 * Makefile.am (check-mini-gmp): Set also DYLD_LIBRARY_PATH for the
5594 benefit of Darwin.
5595
5596 * tests/mpn/t-div.c: Test mpn_sb_div_qr_sec and mpn_sb_div_r_sec.
5597 (main): Separate divisor into normalised (dnp) and unnormalised (dup),
5598 pass appropriate variant to each function.
5599 (main): Make negative `test' index value mean divisor bits, for better
5600 small operands coverage.
5601 (main): Put random junk at qp[] instead of zeroing.
5602
5603 * tests/mpz/t-remove.c: Back out last change which left `divisor_size'
5604 uninitialised; achieve change's aim with a parameter tweak.
5605
5606 2013-01-20 Torbjorn Granlund <[email protected]>
5607
5608 * tests/memory.c (PTRLIMB): New macro, used for conformant casting.
5609
5610 2013-01-19 Marco Bodrato <[email protected]>
5611
5612 * tests/mpz/t-set_str.c: Check also failing conditions.
5613
5614 * tests/mpz/t-remove.c: Test removal of 1.
5615
5616 2013-01-18 Torbjorn Granlund <[email protected]>
5617
5618 * mpn/generic/set_str.c (normalization_steps): Eliminate set-but-unused
5619 variable.
5620
5621 * tests/tests.h (TESTS_REPS): Fix printf argument type clashes.
5622
5623 2013-01-15 Torbjorn Granlund <[email protected]>
5624
5625 From Mike Frysinger:
5626 * configure.ac: Add x32 ABI for x86_64.
5627
5628 2013-01-14 Marco Bodrato <[email protected]>
5629
5630 * doc/gmp.texi (gmp_version): Remove "was used" repetition.
5631 (Upward compatibility): Mention mpn_bdivmod, GMP 4 -> GMP 5.
5632
5633 2013-01-13 Marc Glisse <[email protected]>
5634
5635 * doc/gmp.texi: Let mpn_sqrtrem reference mpn_perfect_square_p instead
5636 of mpz_perfect_square_p.
5637
5638 2013-01-10 Marco Bodrato <[email protected]>
5639
5640 * mpz/export.c: Less restrictive ASSERTs.
5641
5642 2013-01-10 Torbjorn Granlund <[email protected]>
5643
5644 * Makefile.am (check-mini-gmp): Set LD_LIBRARY_PATH to allow testing
5645 with dynamic main GMP build.
5646
5647 2013-01-05 Torbjorn Granlund <[email protected]>
5648
5649 * longlong.h (aarch64): Make add_ssaaaa and sub_ddmmss actually work.
5650
5651 2013-01-04 Torbjorn Granlund <[email protected]>
5652
5653 From Marko Lindqvist:
5654 * configure.ac: Use AC_CONFIG_HEADERS instead of the obsolete
5655 AM_CONFIG_HEADER.
5656
5657 2013-01-02 Marco Bodrato <[email protected]>
5658
5659 * tests/mpz/bit.c: Wider testing for mpz_combit.
5660 * tests/mpz/logic.c: Check the -2^n case.
5661
5662 * mpz/ior.c: Fixed an allocation bug in the -2^n case.
5663
5664 2012-12-31 Torbjorn Granlund <[email protected]>
5665
5666 * mpn/generic/get_d.c: Minor reorg, add vax D code.
5667
5668 * gmp-impl.h (double_extract): New union type for vax D floats.
5669
5670 * tests/mpq/t-get_d.c (check_random): Limit exponents on vax.
5671
5672 2012-12-30 Marco Bodrato <[email protected]>
5673
5674 * tests/mpz/bit.c (check_clr_extend): Check _set shrink.
5675
5676 2012-12-29 Torbjorn Granlund <[email protected]>
5677
5678 * demos/calc/calc.c: Remove generated file from repo.
5679 * demos/calc/calc.h: Likewise.
5680 * demos/calc/calclex.c: Likewise.
5681
5682 2012-12-27 Torbjorn Granlund <[email protected]>
5683
5684 * mpn/generic/get_d.c: Complete rewrite of non-IEEE code.
5685
5686 * tests/mpq/t-get_d.c (main): Suppress check_random for vax.
5687
5688 2012-12-25 Torbjorn Granlund <[email protected]>
5689
5690 * mpn/x86_64/bdiv_q_1.asm: Use LEA for binvert_limb_table.
5691
5692 2012-12-23 Torbjorn Granlund <[email protected]>
5693
5694 * tests/mpz/t-get_d.c (check_onebit): Decrease vax limit to avoid
5695 overflow in last, unused 'want' value.
5696
5697 * config.guess: Recognise AMD family 22 as a future bobcat.
5698
5699 2012-12-21 Torbjorn Granlund <[email protected]>
5700
5701 * configure.ac: Rename configure.in.
5702
5703 2012-12-17 Torbjorn Granlund <[email protected]>
5704
5705 * Version 5.1.0 released.
5706
5707 * configure.in (none-*-*): Allow this again, but print a warning.
5708
5709 2012-12-17 Marco Bodrato <[email protected]>
5710
5711 * mpz/n_pow_ui.c: Fix typos in an ASSERT.
5712
5713 2012-12-16 Torbjorn Granlund <[email protected]>
5714
5715 * mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr): Explicitly use
5716 MPN_COPY_INCR for slightly overlapping copy.
5717
5718 2012-12-15 Marco Bodrato <[email protected]>
5719
5720 * tests/mpn/toom-sqr-shared.h: Skip ALLOCs if the test is skipped.
5721
5722 2012-12-13 Torbjorn Granlund <[email protected]>
5723
5724 * mpn/x86_64/dos64.m4 (PIC): Move definition early.
5725 (JMPENT): Remove PIC variant.
5726
5727 * mpn/x86_64/darwin.m4 (JUMPTABSECT): Define to .text, instead of
5728 something sensible.
5729
5730 2012-12-12 Torbjorn Granlund <[email protected]>
5731
5732 * mpn/x86_64/x86_64-defs.m4 (JMPENT): New macro.
5733 * mpn/x86_64/dos64.m4: Likewise.
5734 * mpn/x86_64/darwin.m4: Likewise.
5735 * mpn/x86_64/mod_34lsub1.asm: Use JMPENT to properly support PIC.
5736 * mpn/x86_64/mullo_basecase.asm: Likewise.
5737 * mpn/x86_64/sqr_basecase.asm: Likewise.
5738
5739 2012-12-11 Torbjorn Granlund <[email protected]>
5740
5741 * mpn/x86_64/mod_34lsub1.asm: Try different jump table for the benefit
5742 of broken Apple linkers.
5743
5744 2012-12-09 Torbjorn Granlund <[email protected]>
5745
5746 * configure.in: Make GMP_NONSTD_ABI ABI specific.
5747
5748 2012-12-08 Torbjorn Granlund <[email protected]>
5749
5750 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
5751 * gmp-h.in: Bump version.
5752
5753 2012-12-06 Marco Bodrato <[email protected]>
5754
5755 * tests/mpq/reuse.c: New test (adapted from mpf/reuse.c).
5756 * tests/mpq/Makefile.am (check_PROGRAMS): Add reuse.
5757
5758 * mpz/abs.c: Use NEWALLOC.
5759 * mpz/neg.c: Likewise.
5760 * mpz/com.c: Reduce branches.
5761
5762 2012-12-05 Niels Möller <[email protected]>
5763
5764 * mpn/generic/brootinv.c (mpn_brootinv): Make valgrind happier, at
5765 the cost of a redundant MPN_ZERO.
5766
5767 * mpz/jacobi.c (mpz_jacobi): Check for asize == 0 or bsize == 0
5768 before using the low limbs.
5769
5770 2012-12-05 Torbjorn Granlund <[email protected]>
5771
5772 * mpn/generic/set_str.c (mpn_dc_set_str): Work around a valgrind issue.
5773
5774 * mpz/powm_ui.c: Don't assume >= 2 limbs in mod argument.
5775
5776 * tests/tests.h (TESTS_REPS): Handle float GMP_CHECK_REPFACTOR.
5777
5778 * longlong.h: Refine cpp test for vax.
5779 * tests/mpn/t-get_d.c: Likewise.
5780 * tests/mpz/t-get_d.c: Likewise.
5781 * tests/mpz/t-cmp_d.c: Likewise.
5782 * tests/mpz/t-get_d.c: Likewise.
5783 * tests/mpq/t-get_d.c: Likewise.
5784 * tests/mpf/t-get_d.c: Likewise.
5785
5786 2012-11-30 Torbjorn Granlund <[email protected]>
5787
5788 * gen-fac.c (gen_consts): Correct printf types.
5789
5790 * mpn/arm/v7a/cora15/gmp-mparam.h: New file.
5791
5792 * configure.in (arm*-*-*): New compiler optional "tune". Pass value for
5793 selected processors. Add more specific path components.
5794
5795 2012-11-29 Torbjorn Granlund <[email protected]>
5796
5797 From Andoni Morales Alastruey:
5798 * longlong.h: Conditionalise ARM asm on !__thumb__.
5799
5800 2012-11-28 Torbjorn Granlund <[email protected]>
5801
5802 * config.guess (arm*-*-*): Support specific ARM processors.
5803 * config.sub: Match arm CPUs.
5804 * configure.in (arm*-*-*): Likewise.
5805
5806 * mpz/powm.c: Move new_b out since it lives on through b.
5807
5808 * configure.in (arm*-*-*): Pass -marm to deal with compilers defaulting
5809 to thumb code.
5810
5811 2012-11-26 Torbjorn Granlund <[email protected]>
5812
5813 * tests/cxx/t-ops2.cc (checkz): Reduce huge numbers to avoid vax
5814 overflow.
5815
5816 2012-11-25 Torbjorn Granlund <[email protected]>
5817
5818 * mpn/generic/get_d.c: Reinsert non-IEEE code.
5819
5820 * mpn/vax/add_n.asm: New file.
5821 * mpn/vax/add_n.s: Remove.
5822 * mpn/vax/addmul_1.asm: New file.
5823 * mpn/vax/addmul_1.s: Remove.
5824 * mpn/vax/lshift.asm: New file.
5825 * mpn/vax/lshift.s: Remove.
5826 * mpn/vax/mul_1.asm: New file.
5827 * mpn/vax/mul_1.s: Remove.
5828 * mpn/vax/rshift.asm: New file.
5829 * mpn/vax/rshift.s: Remove.
5830 * mpn/vax/sub_n.asm: New file.
5831 * mpn/vax/sub_n.s: Remove.
5832 * mpn/vax/submul_1.asm: New file.
5833 * mpn/vax/submul_1.s: Remove.
5834
5835 * mpn/vax/elf.m4: New file.
5836 * configure.in (vax*-*-*elf*): New case, grabbing vax/elf.m4.
5837
5838 * tests/mpn/t-get_d.c (check_onebit): Get vax bounds right.
5839 (main): Switch off check_rand for vax.
5840
5841 2012-11-16 Torbjorn Granlund <[email protected]>
5842
5843 * mpn/generic/powm_sec.c (redcify): Use mpn_sb_div_r_sec.
5844
5845 * mpn/generic/sb_div_sec.c: New file.
5846 * mpn/generic/sbpi1_div_sec.c: New file.
5847 * configure.in (gmp_mpn_functions): Add new files.
5848 * gmp-impl.h: Declare new functions.
5849
5850 2012-11-12 Torbjorn Granlund <[email protected]>
5851
5852 * longlong.h: Add ARM64 support.
5853 * longlong.h: Add AVR support.
5854
5855 * mpn/powerpc64/mode64/divrem_1.asm: Tune, simplify.
5856
5857 * mpq/md_2exp.c: Use MPN_COPY_INCR, not MPN_COPY_DECR.
5858 * tests/mpq/t-md_2exp.c (check_random): New function.
5859
5860 2012-11-10 Torbjorn Granlund <[email protected]>
5861
5862 * mpn/generic/remove.c (mpn_bdiv_qr_wrap): Make static.
5863
5864 2012-11-04 Torbjorn Granlund <[email protected]>
5865
5866 * mpz/powm_ui.c: Rewrite.
5867
5868 2012-11-01 Niels Möller <[email protected]>
5869
5870 * mpn/generic/brootinv.c (mpn_brootinv): Input size in limbs
5871 rather than bits. Use single-precision iterations for the first
5872 limb.
5873 * mpn/generic/perfpow.c (is_kth_power): Update mpn_brootinv call.
5874 * tests/mpn/t-brootinv.c (main): Likewise.
5875 * tune/speed.h (SPEED_ROUTINE_MPN_BROOTINV): Likewise.
5876 * gmp-impl.h (mpn_brootinv): Updated prototype.
5877
5878 * mpn/generic/hgcd2.c (mpn_hgcd2): Removed redundant loop exit
5879 tests in the single-precision loop.
5880
5881 * mpz/combit.c (mpz_combit): Rewrite, optimizing for the common
5882 case.
5883
5884 2012-10-31 Niels Möller <[email protected]>
5885
5886 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-brootinv.
5887 * tests/mpn/t-brootinv.c: New file
5888
5889 * mpn/generic/broot.c (mpn_broot_invm1): Avoid a mullo_n in the
5890 loop, and do powering as a plain mpn_sqr followed by mpn_powlo.
5891
5892 * tune/speed.c (routine): Added mpn_broot, mpn_broot_invm1,
5893 mpn_brootinv.
5894
5895 * tune/common.c (speed_mpn_broot, speed_mpn_broot_invm1)
5896 (speed_mpn_brootinv): New functions.
5897 * tune/speed.h (SPEED_ROUTINE_MPN_BROOT)
5898 (SPEED_ROUTINE_MPN_BROOTINV): New macros.
5899
5900 * mpn/generic/broot.c (mpn_broot_invm1): Made non-static (mainly
5901 for benchmarking).
5902 * gmp-impl.h (mpn_broot_invm1): Declare it.
5903
5904 2012-10-28 Torbjorn Granlund <[email protected]>
5905
5906 * configure.in (gmp_mpn_functions): Add new files.
5907 * gmp-impl.h: Declare new functions.
5908 * mpn/generic/perfpow.c: Overhaul.
5909 (binv_root, binv_sqroot): Remove.
5910 * mpn/generic/brootinv.c: New file, code from overhauled binv_root.
5911 * mpn/generic/bsqrtinv.c: New file, code from overhauled binv_sqroot.
5912 * mpn/generic/bsqrt.c: New file.
5913
5914 * tests/mpn/t-broot.c: Add a forgotten TMP_MARK.
5915
5916 2012-10-28 Niels Möller <[email protected]>
5917
5918 * mpn/generic/broot.c (mpn_broot): New file and function.
5919 * configure.in (gmp_mpn_functions): Add broot.
5920 * gmp-impl.h (mpn_broot): Declare.
5921 * tests/mpn/t-broot.c: New testcase.
5922 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-broot.
5923
5924 2012-10-27 Torbjorn Granlund <[email protected]>
5925
5926 * mpn/generic/remove.c: Get remainder allocation right.
5927
5928 2012-10-25 Torbjorn Granlund <[email protected]>
5929
5930 * longlong.h: De-support old POWER asm syntax.
5931
5932 * tests/mpz/t-remove.c: Run more tests, but use a tad smaller operands.
5933
5934 * mpn/generic/remove.c (mpn_bdiv_qr_wrap): New function.
5935 (mpn_remove): Call mpn_bdiv_qr_wrap.
5936 * mpz/remove.c: Enable suppressed mpn_remove call.
5937
5938 2012-10-17 Torbjorn Granlund <[email protected]>
5939
5940 * mpz/powm_ui.c (mpz_powm_ui): Deflect to mpz_powm for large exponent.
5941
5942 2012-09-10 Torbjorn Granlund <[email protected]>
5943
5944 * demos/factorize.c: Rewrite no more current form. Implement Lucas
5945 prime proving, and make its use the default.
5946 * demos/primes.h: New file.
5947
5948 2012-08-24 Torbjorn Granlund <[email protected]>
5949
5950 * demos/factorize.c: Overhaul.
5951
5952 2012-08-06 Marco Bodrato <[email protected]>
5953
5954 * doc/gmp.texi (mpn_neg): Correctly document returned type.
5955
5956 * gmp-impl.h (_mpz_newalloc, log_n_max): mark with inline (spotted by Niels).
5957
5958 2012-07-28 Marc Glisse <[email protected]>
5959
5960 * gmpxx.h (std::common_type): New partial specializations with builtin
5961 types.
5962 * tests/cxx/t-cxx11.cc: Test it.
5963
5964 2012-07-21 Torbjorn Granlund <[email protected]>
5965
5966 * mpn/powerpc32/vmx/mod_34lsub1.asm: Fix r0 clobbering issue with
5967 "large" code affecting elf+darwin PIC.
5968
5969 2012-07-21 Marc Glisse <[email protected]>
5970
5971 * gmpxx.h (__GMPXX_CONSTANT): Disable for g++-3.4.
5972
5973 2012-06-26 Torbjorn Granlund <[email protected]>
5974
5975 * Makefile.am (LIBMP_LT_*): Remove these.
5976
5977 2012-06-26 Marc Glisse <[email protected]>
5978
5979 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Update comment for 5.1.0.
5980
5981 2012-06-24 Marco Bodrato <[email protected]>
5982
5983 * configure.in (CALLING_CONVENTIONS_OBJS): Disable any use of
5984 assembly code with the --disable-assembly option.
5985 * mpz/oddfac_1.c: Use the ASSERT_CODE macro.
5986 * gen-trialdivtab.c (mpz_log2): Use mpz_sizeinbase (., 2).
5987
5988 * gmp-impl.h (MPN_SIZEINBASE_16): Replace with MPN_SIZEINBASE_2EXP
5989 from mpz/export.c .
5990 * mpz/export.c (MPN_SIZEINBASE_2EXP): Removed.
5991 * mpn/generic/sizeinbase.c: Use MPN_SIZEINBASE.
5992
5993 * mpz/nextprime.c: Use MPN_SIZEINBASE_2EXP to count bits.
5994 * mpn/generic/perfpow.c: Likewise.
5995 * mpn/generic/rootrem.c: Likewise.
5996 * mpz/get_d_2exp.c: Likewise.
5997 * mpn/generic/powm_sec.c: Likewise, nailify.
5998 * mpn/generic/powlo.c: Likewise.
5999 * mpn/generic/powm.c: Likewise.
6000
6001 2012-06-23 Marc Glisse <[email protected]>
6002
6003 * gmpxx.h (numeric_limits): Make content public.
6004 * cxx/limits.cc: New file, proper declarations.
6005 * Makefile.am: List new file.
6006 * cxx/Makefile.am: Likewise.
6007 * cxx/t-misc.cc: Add minimal test for numeric_limits.
6008
6009 2012-06-09 Marc Glisse <[email protected]>
6010
6011 * gmpxx.h (__gmp_resolve_expr::srcptr_type): New typedef.
6012 (__gmp_temp): Wrapper for mp*_class, the constructor copies the
6013 precision of its second argument for mpf_t.
6014 (__gmp_expr::eval(p, prec)): Remove.
6015 (__gmp_expr::eval(p)): Use __gmp_temp.
6016 (__gmp_set_expr): Never pass prec to eval().
6017
6018 2012-06-08 Marco Bodrato <[email protected]>
6019
6020 * gmp-impl.h (__GMP_WITHIN_CONFIGURE): Use the same #if as in gmp-h.in.
6021 (MPN_NORMALIZE_NOT_ZERO): Tighter ASSERT.
6022 (MPZ_NEWALLOC): New macro.
6023 * mpq: Use the new macro when possible.
6024 * mpz/bin_uiui.c: Likewise.
6025 * mpz/oddfac_1.c: Likewise.
6026 * mpz/prodlimbs.c: Likewise.
6027
6028 2012-06-04 Torbjorn Granlund <[email protected]>
6029
6030 * mpn/powerpc64/aix.m4 (ASM_START): Claim machine type "any".
6031
6032 2012-06-03 Niels Möller <[email protected]>
6033
6034 * mpn/generic/gcdext.c (mpn_gcdext): Deleted code for handling
6035 impossible case u1 == 0, Simplified test for unlikely case u0 == 0.
6036
6037 2012-06-02 Torbjorn Granlund <[email protected]>
6038
6039 * mpn/arm/lshiftc.asm: New file.
6040
6041 2012-06-01 Torbjorn Granlund <[email protected]>
6042
6043 * mpn/arm/aorslsh1_n.asm: Use cmp/cmn instead of subs/adds in more
6044 places.
6045
6046 * mpz/get_str.c: Don't strip leading zeros since current mpn_get_str
6047 won't generate any. Misc streamlining.
6048 * mpz/out_str.c: Analogous changes.
6049
6050 * tests/mpz/io.c: Use a wider range of bases.
6051
6052 * tests/mpz/t-cong.c (check_random): Rewrite random generation for
6053 exponentially distributed operand sizes.
6054
6055 2012-06-01 Marco Bodrato <[email protected]>
6056
6057 * mpq: Use more macros and MPZ_REALLOC return value when possible.
6058
6059 * gmp-impl.h (LIMBS): Removed, was an alias for PTR.
6060 * mpz/combit.c: Use PTR and CNST_LIMB.
6061
6062 * tests/mpn/t-bdiv.c: Test also mpn_bdiv_qr.
6063 * mpn/generic/bdiv_qr.c: Add an ASSERT.
6064
6065 * mpn/generic/remove.c: Add a zero limb to use bdiv_qr...
6066
6067 2012-05-31 Marc Glisse <[email protected]>
6068
6069 * gmpxx.h (mpq_class::mpq_class): Handle mpq_class(0,1).
6070 * tests/cxx/t-constr.cc: Test it.
6071
6072 2012-05-30 Torbjorn Granlund <[email protected]>
6073
6074 * mpn/x86_64 (FUNC_ENTRY): New name for DOS64_ENTRY.
6075 * mpn/x86_64 (FUNC_EXIT): New name for DOS64_EXIT.
6076
6077 2012-05-29 Marco Bodrato <[email protected]>
6078
6079 * mpz/remove.c: Optimise branches.
6080
6081 * mpn/generic/toom6h_mul.c: less branches in the LIKELY balanced path.
6082 * mpn/generic/toom8h_mul.c: Likewise.
6083
6084 2012-05-29 Torbjorn Granlund <[email protected]>
6085
6086 * mpn/arm/v5/mod_1_1.asm: New file.
6087
6088 2012-05-28 Niels Möller <[email protected]>
6089
6090 * mpn/generic/gcdext.c (compute_v): Simplified carry handling a
6091 bit, reduced stated scratch need from 2n+1 to 2n. Also comment and
6092 ASSERT improvements.
6093
6094 2012-05-27 Torbjorn Granlund <[email protected]>
6095
6096 * config.guess: Add new x86 CPUs.
6097 * mpn/x86/fat/fat.c: Likewise.
6098 * mpn/x86_64/fat/fat.c: Likewise.
6099
6100 2012-05-27 Marco Bodrato <[email protected]>
6101
6102 * mpn/x86_64/fat/fat.c: abort iff longmode-capable-bit is turned off.
6103
6104 * mpn/generic/toom8h_mul.c: mark UNLIKELY branches.
6105
6106 2012-05-26 Torbjorn Granlund <[email protected]>
6107
6108 * mpz: Use MPZ_REALLOC return value when possible.
6109
6110 2012-05-25 Marco Bodrato <[email protected]>
6111
6112 * mpz/scan1.c: Simplify, and add a shortcut for scan1(z, 0).
6113
6114 2012-05-24 Torbjorn Granlund <[email protected]>
6115
6116 * mpz/n_pow_ui.c: Cast non-limb count_leading_zeros argument.
6117
6118 2012-05-24 Marco Bodrato <[email protected]>
6119
6120 * mpz/remove.c: Support negative divisor.
6121 * tests/mpz/t-remove.c: Test negative divisor.
6122
6123 2012-05-23 Torbjorn Granlund <[email protected]>
6124
6125 * tests/mpz/reuse.c: Major rewrite.
6126
6127 2012-05-23 Marco Bodrato <[email protected]>
6128
6129 * mpz/sqrt.c: Further simplify.
6130 * mpz/sqrtrem.c: Likewise.
6131
6132 * Mark failing branches with UNLIKELY. Many files affected.
6133
6134 2012-05-22 Torbjorn Granlund <[email protected]>
6135
6136 * mpz/sqrt.c: Allocate less for overlapping operands, simplify.
6137 * mpz/sqrtrem.c: Likewise.
6138
6139 2012-05-21 Marco Bodrato <[email protected]>
6140
6141 * mpn/generic/toom8_sqr.c: Reduce branches for recursion.
6142 * mpn/generic/toom8h_mul.c: Likewise.
6143
6144 * tests/mpn/t-toom8h.c: Don't use GMP_NUMB_BITS when not yet defined.
6145
6146 2012-05-20 Torbjorn Granlund <[email protected]>
6147
6148 * tests/mpz/t-gcd.c: Rewrite.
6149
6150 2012-05-19 Torbjorn Granlund <[email protected]>
6151
6152 * tests/mpz/t-gcd.c: Generate larger operands for better gcd code
6153 coverage; distribute size exponentially.
6154
6155 2012-05-17 Marco Bodrato <[email protected]>
6156
6157 * mpf/pow_ui.c: Simplify.
6158 * tests/mpf/reuse.c (dsi_func): Exercise pow_ui.
6159
6160 * tests/mpf/t-set_ui.c (check_data): LONG_HIGHBIT -> ULONG_HIGHBIT.
6161 * tests/mpf/t-set.c (check_random): New check, both set and init_set.
6162
6163 * tests/cxx/t-ops.cc (check_mpq): Check squaring.
6164 * tests/mpq/t-equal.c (check_various): Check different den-size.
6165
6166 * mpn/generic/mullo_n.c: Disable MAYBE_ if WANT_FAT_BINARY.
6167 * mpz/cmpabs_d.c: Remove an unused branch.
6168
6169 * tests/mpz/t-get_d_2exp.c (check_zero): New check.
6170 * tests/mpz/t-inp_str.c: A few more cases.
6171 * tests/mpz/t-cmp_d.c: More bases and symbols, a few cases.
6172
6173 * mpz/rootrem.c: Correctly handle odd roots of negatives.
6174 * tests/mpz/t-root.c: Test it.
6175
6176 2012-05-16 Torbjorn Granlund <[email protected]>
6177
6178 * tests/mpf/t-eq.c (check_random): New function, meat from old main().
6179 (check_data): New function.
6180
6181 2012-05-13 Torbjorn Granlund <[email protected]>
6182
6183 * mpn/arm/rsh1aors_n.asm: New file.
6184 * mpn/arm/v5/mod_1_2.asm: New file.
6185
6186 2012-05-11 Marc Glisse <[email protected]>
6187
6188 * gmpxx.h (explicit operator bool): New functions.
6189 * tests/cxx/t-cxx11.cc: Test the above.
6190
6191 2012-05-10 Marco Bodrato <[email protected]>
6192
6193 * gmp-impl.h (__gmpn_cpuvec_initialized): Was __gmpn_cpuvec.initialized
6194 * mpn/x86/fat/fat.c: Use separated _initialized variable.
6195 * mpn/x86_64/fat/fat.c: Likewise.
6196 * tests/mpn/t-fat.c: Likewise.
6197
6198 * mpn/generic/toom2_sqr.c: Override global __gmpn_cpuvec_initialized.
6199 * mpn/generic/toom22_mul.c: Likewise.
6200 * mpn/generic/toom3_sqr.c: Likewise.
6201 * mpn/generic/toom33_mul.c: Likewise.
6202
6203 2012-05-09 Marco Bodrato <[email protected]>
6204
6205 * mpn/generic/sqrtrem.c (invsqrttab): Reduce size removing common byte.
6206
6207 * mpz/bin_uiui.c (mul3, mul4, mul8): Remove unneeded shifts.
6208 (MAXFACS): Redefine, using the shared (safer) log_n_max.
6209
6210 2012-05-08 Torbjorn Granlund <[email protected]>
6211
6212 * mpn/minithres/gmp-mparam.h (REDC_1_TO_REDC_N_THRESHOLD): Up to 9, for
6213 coherency with ASSERT in mpn/generic/redc_n.c.
6214
6215 2012-05-07 Marco Bodrato <[email protected]>
6216
6217 * mpn/minithres/gmp-mparam.h: Updated TOOM6 and FAC_DSC.
6218 * tests/mpn/toom-sqr-shared.h: Don't test if no range.
6219
6220 * mpz/oddfac_1.c: Add ASSERTs to warn about small threshold.
6221 * tune/tuneup.c: Update minimal threshold for FAC_DSC.
6222
6223 2012-05-06 Torbjorn Granlund <[email protected]>
6224
6225 * mpn/arm/v6/sqr_basecase.asm: Simplify n=4 code.
6226
6227 2012-05-05 Marco Bodrato <[email protected]>
6228
6229 * mpn/generic/invert.c: Mark a branch UNLIKELY.
6230 * tune/tuneup.c (tune_fac_u): Update DSC_THRESHOLD minimum.
6231 * gmp-impl.h (FAC_???_THRESHOLD): Update default values.
6232 (ABOVE_THRESHOLD): New definition with __builtin_constant_p.
6233
6234 * mpn/generic/toom22_mul.c: Disable MAYBE_ if WANT_FAT_BINARY.
6235 * mpn/generic/toom33_mul.c: Likewise.
6236 * mpn/generic/toom2_sqr.c: Likewise.
6237 * mpn/generic/toom3_sqr.c: Likewise.
6238
6239 2012-05-04 Torbjorn Granlund <[email protected]>
6240
6241 * tune/tuneup.c: Measure POWM_SEC_TABLE after the REDC thresholds.
6242
6243 2012-05-03 Torbjorn Granlund <[email protected]>
6244
6245 * mpn/generic/powm_sec.c: Use redc_2.
6246 (INNERLOOP): Use this mechanism, like plain powm.c.
6247 (WANT_CACHE_SECURITY): Remove, feature now unconditional.
6248
6249 2012-05-02 Torbjorn Granlund <[email protected]>
6250
6251 * mpz/bin_uiui.c: Make use of CNST_LIMB.
6252
6253 2012-05-02 Marco Bodrato <[email protected]>
6254
6255 * mpz/mfac_uiui.c: Support limb != ui.
6256
6257 2012-05-02 Torbjorn Granlund <[email protected]>
6258
6259 * mpn/arm/logops_n.asm: Work around register clobbering issue.
6260
6261 * mpn/arm/aorscnd_n.asm: New file.
6262
6263 2012-05-01 Torbjorn Granlund <[email protected]>
6264
6265 * configure.in: Put arm dirs in path in proper prio order.
6266
6267 * mpn/arm/logops_n.asm: New file.
6268
6269 * mpz/2fac_ui.c: Fix assumed typo.
6270
6271 * mpn/arm/v6/gmp-mparam.h: New file.
6272
6273 * mpn/arm/v5/gcd_1.asm: Hack for undefined BMOD_1_TO_MOD_1_THRESHOLD.
6274 * mpn/arm/v6t2/gcd_1.asm: Likewise.
6275
6276 2012-04-30 Torbjorn Granlund <[email protected]>
6277
6278 * mpn/arm/v6/sqr_basecase.asm: New file.
6279
6280 2012-04-30 Marco Bodrato <[email protected]>
6281
6282 * mpn/generic/comb_tables.c: New file.
6283 * configure.in: Add it.
6284 * gen-fac.c: Define table limits.
6285 * gmp-impl.h: Declare tables.
6286 (log_n_max): New static function.
6287 * mpz/2fac_ui.c: Use shared tables.
6288 * mpz/bin_uiui.c: Likewise.
6289 * mpz/oddfac_1.c: Likewise.
6290 * mpz/primorial_ui.c: Likewise.
6291
6292 * mpz/mfac_uiui.c: New file.
6293 * Makefile.am: Compile it.
6294 * mpz/Makefile.am (libmpz_la_SOURCES): Add mpz_mfac_uiui.c
6295 * gmp-h.in (mpz_mfac_uiui): Declare.
6296
6297 * tests/mpz/t-mfac_uiui.c: New file.
6298 * tests/mpz/Makefile.am: Run it.
6299
6300 * doc/gmp.texi: Document mpz_mfac_uiui, collapsing with other factorial functions.
6301
6302 * tests/mpz/t-lcm.c: Test zero too.
6303
6304 * mpz/prodlimbs.c: Simplify threshold (should be tuned, not guessed).
6305
6306 2012-04-29 Torbjorn Granlund <[email protected]>
6307
6308 * mpn/arm/aors_n.asm: Tune for more stable performance.
6309
6310 * mpn/arm/aorslsh1_n.asm: New file.
6311
6312 * mpn/arm/mod_34lsub1.asm: New file.
6313
6314 * mpn/arm/v6t2/divrem_1.asm: New file.
6315
6316 2012-04-28 Torbjorn Granlund <[email protected]>
6317
6318 * mpn/thumb/add_n.asm: New file.
6319 * mpn/thumb/sub_n.asm: New file.
6320 * mpn/thumb/add_n.s: Remove broken code.
6321 * mpn/thumb/sub_n.s: Likewise.
6322
6323 * mpn/arm/v6/addmul_1.asm: Rewrite for stable speed, smaller size.
6324 * mpn/arm/v6/mul_1.asm: Likewise.
6325
6326 2012-04-27 Torbjorn Granlund <[email protected]>
6327
6328 * configure.in: Search arm/v6t2 for arm7.
6329
6330 * mpn/arm/v5/gcd_1.asm: New file.
6331 * mpn/arm/v6t2/gcd_1.asm: New file.
6332
6333 * mpn/arm/mode1o.asm: New file.
6334 * mpn/arm/v6t2/mode1o.asm: New file.
6335
6336 * mpn/arm/arm-defs.m4 (LEA): New define.
6337 * mpn/arm/invert_limb.asm: Use LEA.
6338
6339 2012-04-26 Marco Bodrato <[email protected]>
6340
6341 * mpz/bin_uiui.c (bc_bin_uiui): Nail support.
6342 * tests/cxx/t-ops2.cc: Test 0/3.
6343 * oddfac_1.c: assume n > 26.
6344 * tests/mpz/t-jac.c (mpn_jacobi_n): Enlarge tested sizes.
6345
6346 2012-04-24 Torbjorn Granlund <[email protected]>
6347
6348 * mpn/arm/v6/addmul_2.asm: New file.
6349 * mpn/arm/v6/mul_2.asm: New file.
6350
6351 2012-04-23 Torbjorn Granlund <[email protected]>
6352
6353 * mpn/arm/aorsmul_1.asm: Tweak loop control for a 6% speed increase.
6354
6355 2012-04-22 Torbjorn Granlund <[email protected]>
6356
6357 * configure.in: Recognise ARM sub-architectures.
6358
6359 * configfsf.guess: Update to current FSF version.
6360 * configfsf.sub: Likewise.
6361
6362 * mpn/arm/bdiv_dbm1c.asm: New file.
6363
6364 * mpn/arm/v6/mul_1.asm: New file.
6365 * mpn/arm/v6/addmul_1.asm: New file.
6366
6367 2012-04-22 Marco Bodrato <[email protected]>
6368
6369 * gen-fac.c: Renamed, was gen-fac_ui.c .
6370 * Makefile.am: Renamed gen-fac.c and fac_table.h .
6371 * gmp-impl.h: #include "fac_table.h".
6372 * mpz/oddfac_1.c: Use generated constant.
6373 * mpz/bin_ui.c: Small optimisations.
6374
6375 * tune/common.c (speed_mpz_bin_ui): New function.
6376 * tune/speed.h: Declare it.
6377 * tune/speed.c: Use it.
6378
6379 2012-04-21 Torbjorn Granlund <[email protected]>
6380
6381 * mpn/arm/mul_1.asm: Cleanup.
6382 * mpn/arm/copyi.asm: Cleanup, assume allocate-on-write cache.
6383 * mpn/arm/copyd.asm: Likewise.
6384
6385 * mpn/arm/add_n.asm: Delete.
6386 * mpn/arm/sub_n.asm: Delete.
6387 * mpn/arm/aors_n.asm: New file, made from old files.
6388
6389 * mpn/arm/addmul_1.asm: Delete.
6390 * mpn/arm/submul_1.asm: Delete.
6391 * mpn/arm/aorsmul_1.asm: New file, made from old files.
6392
6393 * mpn/arm/com.asm: New file.
6394 * mpn/arm/lshift.asm: New file.
6395 * mpn/arm/rshift.asm: New file.
6396
6397 2012-04-20 Torbjorn Granlund <[email protected]>
6398
6399 * tests/mpq/io.c: New file.
6400 * tests/mpq/Makefile.am: Run it.
6401
6402 * mpz/clrbit.c: Simplify along the lines of setbit.c.
6403
6404 2012-04-20 Marco Bodrato <[email protected]>
6405
6406 * mpz/setbit.c: Simplify.
6407
6408 * gmp-impl.h (LOG2C): Define.
6409 * mpz/fac_ui.c (LOG2C): Remove.
6410 * mpz/2fac_ui.c (LOG2C): Remove.
6411 * mpz/oddfac_1.c (LOG2C): Remove.
6412 * mpn/generic/binvert.c (LOG2C): Remove.
6413 * mpn/generic/invertappr.c (LOG2C): Remove.
6414
6415 * mpz/bin_uiui.c (mpz_goetgheluck_bin_uiui): Move declarations,
6416 and assume that n and k are not small.
6417
6418 2012-04-19 Torbjorn Granlund <[email protected]>
6419
6420 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-remove.
6421
6422 * tests/mpz/t-remove.c: Clear out mpz variables.
6423
6424 * tests/mpz/t-cong.c (check_random): Use much larger numbers.
6425 (check_data): Check congruences mod 0.
6426
6427 * tests/mpz/t-divis.c: Test divisibility by zero.
6428
6429 * tests/mpz/reuse.c: Test mpz_mod.
6430
6431 * mpz/setbit.c: Remove dead code. Use CNST_LIMB.
6432 * mpz/clrbit.c: Use CNST_LIMB.
6433
6434 2012-04-19 Marco Bodrato <[email protected]>
6435
6436 * primesieve.c: New file, with functions from mpz/oddfac_1.c .
6437 * mpz/oddfac_1.c (bitwise_primesieve): Re-moved.
6438 * Makefile.am (libgmp_la_SOURCES): Add primesieve.c .
6439 * gmp-impl.h (gmp_primesieve): Declare.
6440
6441 * mpz/bin_uiui.c (mpz_goetgheluck_bin_uiui): New, factor-based
6442 implementation.
6443 * tests/mpz/t-bin.c: Extend tests, to cover _goetgheluck.
6444
6445 * mpz/primorial_ui.c: New file.
6446 * mpz/Makefile.am (libmpz_la_SOURCES): Add mpz/primorial_ui.c
6447 * Makefile.am (MPZ_OBJECTS): Add mpz/primorial_ui$U.lo
6448 * gmp-h.in (mpz_primorial_ui): Declare.
6449 * tests/mpz/t-primorial_ui.c: New test for the new function.
6450 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-primorial_ui.
6451 * doc/gmp.texi: Short documentation for the new function.
6452
6453 2012-04-17 Torbjorn Granlund <[email protected]>
6454
6455 * mpn/x86_64/coreisbr/aorsmul_1.asm: Fix some DOS64 issues.
6456 * mpn/x86_64/coreisbr/mul_1.asm: Likewise.
6457
6458 * mpn/x86_64/fastsse/lshiftc-movdqu2.asm: Adhere to DOS64 register
6459 partitioning rules.
6460
6461 * mpn/x86_64/fastsse/copyi-palignr.asm: Implement temporary workaround
6462 to overlap issue.
6463
6464 2012-04-17 Marco Bodrato <[email protected]>
6465
6466 * mpz/bin_uiui.c: Support small limbs (fallback on bin_ui).
6467
6468 * tests/mpn/toom-sqr-shared.h: Use a restricted range.
6469 * tests/mpn/t-toom2-sqr.c: Specify correct range.
6470 * tests/mpn/t-toom3-sqr.c: Likewise.
6471 * tests/mpn/t-toom4-sqr.c: Likewise.
6472 * tests/mpn/t-toom6-sqr.c: Likewise.
6473 * tests/mpn/t-toom8-sqr.c: Likewise, but extended.
6474 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-toom?-sqr tests.
6475
6476 * mpn/generic/sbpi1_bdiv_q.c: Move ASSERTs, to support qp = np.
6477
6478 2012-04-17 Torbjorn Granlund <[email protected]>
6479
6480 * mpn/x86_64/copyd.asm: Rewrite.
6481 * mpn/x86_64/copyi.asm: Rewrite.
6482
6483 2012-04-16 Torbjorn Granlund <[email protected]>
6484
6485 * mpn/x86_64/fastsse/lshift-movdqu2.asm: Add DOS entry/exit sequences.
6486 * mpn/x86_64/fastsse/rshift-movdqu2.asm: Likewise.
6487 * mpn/x86_64/fastsse/lshiftc-movdqu2.asm: Likewise.
6488
6489 * mpn/x86_64/x86_64-defs.m4 (palignr): New macro.
6490 (x86_opcode_regxmm, x86_opcode_regxmm_list): New, made from x86 mmx
6491 counterparts.
6492 (x86_lookup): Copy from x86/x86-defs.m4.
6493 * mpn/x86_64/fastsse/copyd-palignr.asm: Use palignr macro.
6494 * mpn/x86_64/fastsse/copyi-palignr.asm: Likewise.
6495
6496 2012-04-15 Marco Bodrato <[email protected]>
6497
6498 * tests/mpz/t-bin.c: Add more tests on small values.
6499 * mpz/bin_uiui.c (mpz_bdiv_bin_uiui): Smaller temporary areas.
6500
6501 2012-04-15 Torbjorn Granlund <[email protected]>
6502
6503 * mpn/x86_64/fastsse/copyd-palignr.asm: New file.
6504 * mpn/x86_64/fastsse/copyi-palignr.asm: New file.
6505 * mpn/x86_64/core2/copyd.asm: New file.
6506 * mpn/x86_64/core2/copyi.asm: New file.
6507 * mpn/x86_64/nano/copyd.asm: New file.
6508 * mpn/x86_64/nano/copyi.asm: New file.
6509 * mpn/x86_64/atom/copyd.asm: New file.
6510 * mpn/x86_64/atom/copyi.asm: New file.
6511
6512 2012-04-13 Marco Bodrato <[email protected]>
6513
6514 * mpz/bin_uiui.c: Rewrite (some parts are Torbjorn's).
6515 * gen-fac_ui.c: Generate new constants for bin_uiui.
6516
6517 * tests/mpz/t-fac_ui.c: Check Wilson's theorem on a big value.
6518
6519 * mpn/generic/invert.c: Remove support for scratch == NULL.
6520 * tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Allocate scratch
6521 space for mpn_invert.
6522
6523 * mpz/mul_i.h: Small clean-up.
6524
6525 * tests/mpn/toom-sqr-shared.h: New file.
6526 * tests/mpn/t-toom2-sqr.c: New file.
6527 * tests/mpn/t-toom3-sqr.c: New file.
6528 * tests/mpn/t-toom4-sqr.c: New file.
6529 * tests/mpn/t-toom6-sqr.c: New file.
6530 * tests/mpn/t-toom8-sqr.c: New file.
6531 * tests/mpn/Makefile.am (EXTRA_DIST): Add toom-sqr-shared.h .
6532
6533 * mpn/generic/toom62_mul.c: Use add_n, sub_n, when possible.
6534
6535 2012-04-12 Torbjorn Granlund <[email protected]>
6536
6537 * mpn/x86_64/fastsse/lshift-movdqu2.asm: New file.
6538 * mpn/x86_64/fastsse/rshift-movdqu2.asm: New file.
6539 * mpn/x86_64/fastsse/lshiftc-movdqu2.asm: New file.
6540 * mpn/x86_64/coreisbr/lshift.asm: New file.
6541 * mpn/x86_64/coreisbr/rshift.asm: New file.
6542 * mpn/x86_64/coreisbr/lshiftc.asm: New file.
6543 * mpn/x86_64/k10/lshift.asm: New file.
6544 * mpn/x86_64/k10/rshift.asm: New file.
6545 * mpn/x86_64/k10/lshiftc.asm: New file.
6546
6547 * mpn/x86_64/fastsse/lshift.asm: Simplify to very basic form.
6548
6549 2012-04-11 Niels Möller <[email protected]>
6550
6551 * Makefile.am (check-mini-gmp): Pass -I../.. in EXTRA_CFLAGS, to
6552 locate gmp.h.
6553
6554 2012-04-10 Marco Bodrato <[email protected]>
6555
6556 * Makefile.am (check-mini-gmp): Use $(MAKE).
6557 (clean-mini-gmp): New target.
6558 (clean-local, distclean-local): New automake targets. Depend on
6559 clean-mini-gmp.
6560
6561 * gen-fac_ui.c (mpz_root): Remove.
6562
6563 2012-04-07 Torbjorn Granlund <[email protected]>
6564
6565 * mpn/ia64/gcd_1.asm: Rewrite inner loop to use ctz table.
6566
6567 2012-04-05 Torbjorn Granlund <[email protected]>
6568
6569 * mpn/powerpc64/p7/popcount.asm: Properly extend arg n for mode32.
6570 * mpn/powerpc64/p7/hamdist.asm: Likewise.
6571
6572 2012-04-04 Torbjorn Granlund <[email protected]>
6573
6574 * mpn/powerpc64/p7/popcount.asm: New file.
6575 * mpn/powerpc64/p7/hamdist.asm: New file.
6576
6577 * longlong.h (ARM count_leading_zeros): Enable for more arch versions.
6578
6579 * mpn/x86_64/gcd_1.asm: Make room for DOS64 regparm shadow area.
6580 * mpn/x86_64/core2/gcd_1.asm: Likewise.
6581
6582 2012-04-03 Torbjorn Granlund <[email protected]>
6583
6584 * mpn/x86_64/coreisbr/aorrlsh_n.asm: Make it actually work for DOS64.
6585
6586 2012-04-02 Marco Bodrato <[email protected]>
6587
6588 * mpz/oddfac_1.c: Initialize size for ASSERT.
6589
6590 2012-04-02 Torbjorn Granlund <[email protected]>
6591
6592 * gmp-h.in (_GMP_H_HAVE_FILE): Test also __STDIO_LOADED (for VMS).
6593
6594 * gmp-impl.h (doprnt_format_t, etc): Remove bogus __GMP_DECLSPECs.
6595
6596 2012-03-30 Marco Bodrato <[email protected]>
6597
6598 * mpn/x86_64/sqr_basecase.asm: Speed-up for small cases.
6599
6600 2012-03-29 Torbjorn Granlund <[email protected]>
6601
6602 * mpn/sparc64/gcd_1.asm: New file.
6603
6604 2012-03-27 Torbjorn Granlund <[email protected]>
6605
6606 * config.guess: Fix typo in coreisbr recognition.
6607
6608 2012-03-26 Marco Bodrato <[email protected]>
6609
6610 * mpn/x86_64/gcd_1.asm: Reduce latency.
6611 * mpn/x86_64/mul_basecase.asm: Save one jump.
6612
6613 * mpz/iset_ui.c: Don't realloc.
6614
6615 2012-03-20 Marco Bodrato <[email protected]>
6616
6617 * mp_clz_tab.c: Add __clz_tab[128].
6618 * longlong.h (count_trailing_zeros): Use it in pure C variant.
6619
6620 2012-03-20 Torbjorn Granlund <[email protected]>
6621
6622 * configure.in (x86 fat_path): Add many missing directories.
6623 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Rewrite.
6624 (fake_cpuid_table): Add many more CPUs.
6625
6626 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Minor spacing cleanup.
6627
6628 2012-03-19 Torbjorn Granlund <[email protected]>
6629
6630 * mpn/x86/x86-defs.m4 (CALL, PIC_WITH_EBX): New macros.
6631 * mpn/x86/darwin.m4: Likewise.
6632 * mpn/x86/k7/gcd_1.asm: Use new macros to support PIC.
6633 * mpn/x86/p6/gcd_1.asm: Likewise.
6634
6635 2012-03-19 Marco Bodrato <[email protected]>
6636
6637 * gen-fac_ui.c: Generate more constants (possible mini-mpz_root).
6638 * mpz/oddfac_1.c: Improve ASSERTs.
6639 (log_n_max): Use precomputed table.
6640
6641 * longlong.h (_PROTO): Remove.
6642
6643 2012-03-18 Torbjorn Granlund <[email protected]>
6644
6645 * longlong.h (count_trailing_zeros): Write better pure C default
6646 variant.
6647
6648 * mpn/x86/p6/gcd_1.asm: Remove forgotten x86_64 reference.
6649
6650 * mpn/x86/p6/gmp-mparam.h: Update, to get BMOD_1_TO_MOD_1_THRESHOLD
6651 defined for fat binaries.
6652
6653 2012-03-17 Torbjorn Granlund <[email protected]>
6654
6655 * mpn/x86/k7/gcd_1.asm: Rewrite.
6656 * mpn/x86/p6/gcd_1.asm: New file.
6657
6658 * mpn/x86_64/core2/gcd_1.asm: Conditionally suppress reduction calls.
6659 * mpn/x86_64/gcd_1.asm: Rewrite.
6660
6661 2012-03-15 Torbjorn Granlund <[email protected]>
6662
6663 * mpn/generic/gcd_1.c: Parameterise zerotab code.
6664
6665 * mpn/x86_64/nano/gcd_1.asm: New file, grabbing core2 asm file.
6666
6667 * mpn/x86_64/core2/gcd_1.asm: Speed up loop code, simplify non-loop
6668 code.
6669
6670 2012-03-13 Torbjorn Granlund <[email protected]>
6671
6672 * mpn/x86_64/core2/gcd_1.asm: Add hack to support fat builds.
6673
6674 * mpn/x86_64/core2/gcd_1.asm: Shorten critical path.
6675
6676 2012-03-12 Torbjorn Granlund <[email protected]>
6677
6678 * mpn/x86_64/core2/gcd_1.asm: New file.
6679 * mpn/x86_64/k10/gcd_1.asm: New file, grabbing core2 asm file.
6680 * mpn/x86_64/bd1/gcd_1.asm: Likewise.
6681
6682 * mpn/x86_64/bobcat/sqr_basecase.asm: New file.
6683 * mpn/x86_64/bobcat/mul_basecase.asm: Minor tuning.
6684
6685 2012-03-10 Torbjorn Granlund <[email protected]>
6686
6687 * configure.in (fat_functions): Add addlsh1_n, addlsh2_n, addmul_2,
6688 mullo_basecase, redc_1, redc_2, sublsh1_n.
6689
6690 * gmp-impl.h (struct cpuvec_t): Add fields for new fat functions.
6691 * gmp-impl.h: Adjust corresponding declarations.
6692
6693 * mpn/generic/redc_2.c (mpn_addmul_2): Make static.
6694
6695 * mpn/x86_64/fat/fat_entry.asm (FAT_INIT): Expand before fat_init to
6696 reduce branch offsets. Pass plain 0,1,3... in %al since we'd else run
6697 out of 8-bit range.
6698
6699 * mpn/x86_64/fat/fat_entry.asm (fat_init): Scale passed index value.
6700 * mpn/x86/fat/fat_entry.asm (fat_init): Use movzbl for expanding index
6701 value.
6702
6703 * mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): Add new fat functions.
6704 * mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): Likewise.
6705 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec): Likewise.
6706 * mpn/x86/fat/fat.c (__gmpn_cpuvec): Likewise.
6707
6708 * mpn/x86_64/fat/redc_2.c: New file.
6709 * mpn/x86/fat/mullo_basecase.c: New file.
6710 * mpn/x86/fat/redc_1.c: New file.
6711 * mpn/x86/fat/redc_2.c: New file.
6712
6713 * tests/mpn/t-fat.c: Test mullo_basecase.
6714
6715 2012-03-08 Torbjorn Granlund <[email protected]>
6716
6717 * mpn/x86_64/coreisbr/addmul_2.asm: Port to DOS64.
6718
6719 2012-02-29 Marc Glisse <[email protected]>
6720
6721 * gmpxx.h: Ignore partial C++11 support in g++-4.6.
6722 * tests/cxx/t-cxx11.cc: Likewise.
6723
6724 * gmpxx.h (operator""): New functions.
6725 * tests/cxx/t-cxx11.cc: Test the above.
6726 * doc/gmp.texi: Document the above.
6727
6728 2012-03-08 Marco Bodrato <[email protected]>
6729
6730 * acinclude.m4 (GMP_H_ANSI): Remove.
6731 * configure.in: Don't use GMP_H_ANSI.
6732 * gmp-h.in (__GMP_HAVE_PROTOTYPES): Remove.
6733
6734 2012-03-08 Torbjorn Granlund <[email protected]>
6735
6736 * mpn/x86_64/fat/fat.c (fake_cpuid_table): Recognise "bulldozer".
6737 (__gmpn_cpuvec_init): Overhaul to match configure.in.
6738
6739 * configure.in: Adjust bulldozer path_64.
6740
6741 2012-03-07 Torbjorn Granlund <[email protected]>
6742
6743 * configure.in (x86_64 fat_path): List recently added AMD directories.
6744
6745 * mpn/x86_64/bobcat/copyi.asm: New file.
6746 * mpn/x86_64/bobcat/copyd.asm: New file.
6747
6748 * config.guess: Handle AMD 11h correctly.
6749
6750 * tune/tuneup.c (tune_redc): Better handle situation where redc_2 is
6751 never faster.
6752
6753 2012-03-06 Torbjorn Granlund <[email protected]>
6754
6755 * mpn/x86_64/bobcat/mul_basecase.asm: New file.
6756
6757 2012-03-04 Torbjorn Granlund <[email protected]>
6758
6759 * mpn/x86_64/bobcat/mul_1.asm: New file.
6760 * mpn/x86_64/bobcat/aorsmul_1.asm: New file.
6761
6762 2012-03-04 Marco Bodrato <[email protected]>
6763
6764 * mpz/invert.c: Remove mod 0 branch.
6765 * tests/mpz/t-invert.c: Avoid testing mod 0.
6766 * doc/gmp.texi (mpz_invert): Specify mod 0 is not handled.
6767
6768 * gmp-h.in (__gmp_signed, __gmp_const): Remove.
6769 (__GMP_HAVE_TOKEN_PASTE, __GMP_HAVE_CONST): Remove.
6770 * gmp-impl.h: Strip __GMP_HAVE_TOKEN_PASTE and __GMP_HAVE_CONST.
6771 * demos/expr/: Strip __gmp_const usage from all files.
6772
6773 * tests/mpz/t-powm.c (allsizes_seen): Require unsigned*.
6774
6775 2012-03-03 Torbjorn Granlund <[email protected]>
6776
6777 * mpn/x86_64/k8/gmp-mparam.h: New file.
6778 * mpn/x86_64/k10/gmp-mparam.h: New file.
6779
6780 * mpn/generic/hgcd_step.c (mpn_hgcd_step): Remove unused variables.
6781 * mpn/generic/hgcd_jacobi.c (hgcd_jacobi_step): Likewise.
6782 * mpn/generic/hgcd_reduce.c (hgcd_matrix_apply): Likewise.
6783 * mpn/generic/mu_bdiv_qr.c: Likewise.
6784 * mpz/jacobi.c: Likewise.
6785 * mpz/mod.c: Likewise.
6786
6787 * mpn/generic/toom42_mul.c: Remove unread variable.
6788 * mpn/generic/set_str.c (mpn_set_str_compute_powtab): Likewise.
6789 * mpn/generic/rootrem.c (mpn_rootrem_internal): Likewise.
6790 * tests/refmpn.c (refmpn_mul): Likewise.
6791 * mpn/generic/hgcd_appr.c (mpn_hgcd_appr): Propagate mask computation
6792 into ASSERT, remove variable.
6793
6794 * gmp-h.in (__GMP_PROTO): Remove.
6795 * Strip __GMP_PROTO usage from all files.
6796 * Strip prototype parameter names from all files.
6797
6798 2012-03-01 Marco Bodrato <[email protected]>
6799
6800 * doc/gmp.texi (mpz_invert): Correctly document result range.
6801 * tests/mpz/t-invert.c: Small range correction.
6802
6803 2012-03-01 Torbjorn Granlund <[email protected]>
6804
6805 * mpn/x86_64/mullo_basecase.asm: New file.
6806
6807 2012-02-29 Marc Glisse <[email protected]>
6808
6809 * gmpxx.h (std::numeric_limits): New partial specialization.
6810
6811 2012-02-29 Niels Möller <[email protected]>
6812
6813 * Makefile.am (check-mini-gmp): Use $(MAKE).
6814 (clean-mini-gmp): New target.
6815 (clean-local, distclean-local): New automake targets. Depend on
6816 clean-mini-gmp.
6817
6818 2012-02-28 Niels Möller <[email protected]>
6819
6820 * Makefile.am (check-mini-gmp): New target, for running the
6821 mini-gmp testsuite.
6822
6823 2012-02-27 Torbjorn Granlund <[email protected]>
6824
6825 * mpn/x86_64/fastsse/lshiftc.asm: New file.
6826 * mpn/x86_64/fastsse/com.asm: New file.
6827
6828 * mpn/x86_64/bd1/popcount.asm: New file.
6829 * mpn/x86_64/bd1/hamdist.asm: New file.
6830
6831 * mpn/x86_64/fastsse/copyi.asm: New file.
6832 * mpn/x86_64/fastsse/copyd.asm: New file.
6833 * mpn/x86_64/fastsse/lshift.asm: New file.
6834
6835 2012-02-26 Torbjorn Granlund <[email protected]>
6836
6837 * mpn/x86_64/coreisbr/addmul_2.asm: New file.
6838
6839 * tests/devel/try.c (param_init): Don't require addmul_N to handle
6840 overlap.
6841
6842 * mpn/x86_64/bd1/mul_1.asm: New file.
6843 * mpn/x86_64/bd1/aorsmul_1.asm: New file.
6844
6845 2012-02-26 Marco Bodrato <[email protected]>
6846
6847 * mpz/2fac_ui.c: New file: implements n!!.
6848 * Makefile.am (MPZ_OBJECTS): Add mpz/2fac_ui.
6849 * gmp-h.in: Declare mpz_2fac_ui.
6850 * tests/mpz/t-fac.c: Test mpz_2fac_ui.
6851 * doc/gmp.texi: Document mpz_2fac_ui.
6852 * mpz/Makefile.am (libmpz_la_SOURCES): Add 2fac_ui.c.
6853
6854 * mpz/oddfac_1.c (mpz_oddfac_1): Use umul_ppmm when size = 2.
6855
6856 2012-02-26 Niels Möller <[email protected]>
6857
6858 * bootstrap.c: New file, replacing dumbmp.c. Uses mini-gmp for the
6859 standard GMP functions, and then defines the few functions
6860 particular for the bootstrap.
6861 * dumbmp.c: Deleted file. A few functions moved to bootstrap.c.
6862
6863 * gen-bases.c: Include bootstrap.c, not dumbmp.c.
6864 * gen-fac_ui.c: Likewise.
6865 * gen-trialdivtab.c: Likewise.
6866 * gen-fib.c: Include bootstrap.c, not dumbmp.c. Use assert rather
6867 than ASSERT. Deleted casts of xmalloc return value.
6868 * gen-psqr.c: Likewise.
6869 (COLLAPSE_ELEMENT): Use memmove rather than mem_copyi.
6870
6871 * Makefile.am: Replaced all uses of dumbmp.c by bootstrap.c.
6872 (EXTRA_DIST, dist-hook): Arrange for distribution of the mini-gmp
6873 files.
6874
6875 2012-02-24 Marco Bodrato <[email protected]>
6876
6877 * mpz/invert.c: Use ABSIZ, MPZ_EQUAL_1_P.
6878 * mpz/abs.c: Collapse MPZ_REALLOC(x,.) and PTR(x).
6879 * mpz/aors_ui.h: Likewise.
6880 * mpz/com.c: Likewise.
6881 * mpz/neg.c: Likewise.
6882
6883 * mpz/invert.c: Reply "no-inverse" when modulus is zero.
6884 * tests/mpz/t-invert.c: Add more checks.
6885 * doc/gmp.texi (mpz_invert): Inverse can not be zero.
6886
6887 2012-02-24 Torbjorn Granlund <[email protected]>
6888
6889 * tests/mpn/logic.c: New file.
6890 * tests/mpn/Makefile.am (check_PROGRAMS): Add logic.
6891
6892 * tests/mpz/t-invert.c: New file.
6893 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-invert.
6894
6895 2012-02-24 Marc Glisse <[email protected]>
6896
6897 * tests/mpq/t-cmp.c: Move NUM and DEN macros...
6898 * tests/mpq/t-cmp_ui.c: Likewise...
6899 * gmp-impl.h: ... to here.
6900
6901 * mpq/abs.c: Use NUM, DEN, SIZ, ALLOC, PTR, MPZ_REALLOC.
6902 * mpq/aors.c: Likewise.
6903 * mpq/canonicalize.c: Likewise.
6904 * mpq/clear.c: Likewise.
6905 * mpq/cmp.c: Likewise.
6906 * mpq/cmp_si.c: Likewise.
6907 * mpq/cmp_ui.c: Likewise.
6908 * mpq/div.c: Likewise.
6909 * mpq/equal.c: Likewise.
6910 * mpq/get_d.c: Likewise.
6911 * mpq/get_den.c: Likewise.
6912 * mpq/get_num.c: Likewise.
6913 * mpq/get_str.c: Likewise.
6914 * mpq/init.c: Likewise.
6915 * mpq/inp_str.c: Likewise.
6916 * mpq/inv.c: Likewise.
6917 * mpq/md_2exp.c: Likewise.
6918 * mpq/mul.c: Likewise.
6919 * mpq/neg.c: Likewise.
6920 * mpq/set.c: Likewise.
6921 * mpq/set_d.c: Likewise.
6922 * mpq/set_den.c: Likewise.
6923 * mpq/set_f.c: Likewise.
6924 * mpq/set_num.c: Likewise.
6925 * mpq/set_si.c: Likewise.
6926 * mpq/set_str.c: Likewise.
6927 * mpq/set_ui.c: Likewise.
6928 * mpq/set_z.c: Likewise.
6929 * mpq/swap.c: Likewise.
6930
6931 * tests/mpq/t-inv.c: New test file.
6932 * tests/mpq/Makefile.am: Add the above.
6933
6934 * gmpxx.h (__gmp_set_expr): Use mpq_set_z.
6935
6936 * mpq/md_2exp.c: Collapse MPZ_REALLOC(x,.) and PTR(x).
6937 * mpq/set_d.c: Likewise.
6938 * mpq/set_f.c: Likewise.
6939
6940 2012-02-24 Niels Möller <[email protected]>
6941
6942 * mpn/x86_64/core2/aorsmul_1.asm: Added mpn_addmul_1c and
6943 mpn_submul_1c entry points.
6944
6945 2012-02-23 Marc Glisse <[email protected]>
6946
6947 * mpz/abs.c: Use ALLOC, SIZ, ABSIZ, PTR, MPZ_REALLOC.
6948 * mpz/aors_ui.h: Likewise.
6949 * mpz/array_init.c: Likewise.
6950 * mpz/cdiv_q.c: Likewise.
6951 * mpz/cdiv_qr.c: Likewise.
6952 * mpz/cdiv_r.c: Likewise.
6953 * mpz/clear.c: Likewise.
6954 * mpz/clrbit.c: Likewise.
6955 * mpz/cmp_si.c: Likewise.
6956 * mpz/com.c: Likewise.
6957 * mpz/fdiv_q.c: Likewise.
6958 * mpz/fdiv_qr.c: Likewise.
6959 * mpz/fdiv_r.c: Likewise.
6960 * mpz/get_si.c: Likewise.
6961 * mpz/get_str.c: Likewise.
6962 * mpz/init.c: Likewise.
6963 * mpz/inp_str.c: Likewise.
6964 * mpz/iset.c: Likewise.
6965 * mpz/iset_d.c: Likewise.
6966 * mpz/iset_si.c: Likewise.
6967 * mpz/iset_str.c: Likewise.
6968 * mpz/iset_ui.c: Likewise.
6969 * mpz/mod.c: Likewise.
6970 * mpz/neg.c: Likewise.
6971 * mpz/out_str.c: Likewise.
6972 * mpz/random2.c: Likewise.
6973 * mpz/set_si.c: Likewise.
6974 * mpz/set_str.c: Likewise.
6975 * mpz/set_ui.c: Likewise.
6976 * mpz/setbit.c: Likewise.
6977 * mpz/sqrt.c: Likewise.
6978 * mpz/swap.c: Likewise.
6979 * mpz/tdiv_r_2exp.c: Likewise.
6980
6981 * tests/cxx/t-ops.cc: Test mpz_abs reallocation.
6982
6983 2012-02-23 Torbjorn Granlund <[email protected]>
6984
6985 * mpn/x86_64/core2/rsh1aors_n.asm: Complete rewrite.
6986 * mpn/x86_64/coreisbr/rsh1aors_n.asm: Move old core2 code here.
6987
6988 * mpn/x86_64/redc_1.asm: Make it work for DOS64 (broken in last edit).
6989
6990 2012-02-20 Marco Bodrato <[email protected]>
6991
6992 * mpn/generic/toom_interpolate_8pts.c: Compute carry iif non-trivial.
6993
6994 * mpz/gcdext.c: Adapt to relaxed mpn_gcdext's input requirements.
6995
6996 * mpz/and.c: Use mpn_ logic everywhere. Reduce branches.
6997 * mpz/ior.c: Likewise.
6998 * mpz/xor.c: Likewise.
6999
7000 2012-02-20 Torbjorn Granlund <[email protected]>
7001
7002 * mpn/x86_64/coreisbr/mul_1.asm: New file.
7003
7004 * mpn/x86_64/coreisbr/aorsmul_1.asm: New file.
7005
7006 * mpn/x86_64/mod_34lsub1.asm: Avoid ",pt" branch hint since many
7007 assemblers don't support it.
7008
7009 2012-02-19 Torbjorn Granlund <[email protected]>
7010
7011 * mpn/generic/redc_1.c: Put back mpn_add_n call, return its carry.
7012 Reintroduce previously removed RP argument.
7013 * mpn/x86_64/redc_1.asm: Likewise.
7014
7015 * mpn/generic/redc_2.c: Remove mpn_sub_n call, return carry from
7016 mpn_add_n call.
7017
7018 * gmp-impl.h (mpn_redc_1, mpn_redc_2): Now return an mp_limb_t.
7019
7020 * tune/speed.h (SPEED_ROUTINE_REDC_1): Adopt to pass RP argument.
7021
7022 * tests/refmpn.c (refmpn_redc_1): Adopt to new redc_1 interface.
7023
7024 * mpn/generic/powm.c (MPN_REDC_1): Pass rp parameter to mpn_redc_1.
7025 * mpn/generic/powm_sec.c (MPN_REDC_1_SEC): Likewise.
7026 * mpn/generic/powm.c (MPN_REDC_2): New macro, use for mpn_redc_2.
7027
7028 2012-02-18 Marc Glisse <[email protected]>
7029
7030 * gmpxx.h (std::common_type): New partial specialization in C++11.
7031 * tests/cxx/t-cxx11.cc: Test it.
7032
7033 * gmpxx.h: Don't declare long double functions that are never defined.
7034
7035 * gmpxx.h (__gmp_binary_expr): Let things happen in place: q=q*q+z*z
7036 becomes tmp=z*z, q=q*q, q+=tmp.
7037 * tests/cxx/t-binary.cc: More variable reuse tests.
7038
7039 2012-02-17 Marc Glisse <[email protected]>
7040
7041 * gmp-h.in (__GMP_WITHIN_GMP): Test with #ifdef instead of #if, for
7042 the benefit of applications using gcc -Wundef.
7043 (__GMP_WITHIN_GMPXX): Likewise.
7044
7045 2012-02-16 Marc Glisse <[email protected]>
7046
7047 * gmpxx.h (__gmp_binary_expr): Let things happen in place: e=a*b-c*d
7048 becomes tmp=c*d, e=a*b, e-=tmp.
7049 * tests/cxx/t-binary.cc: More variable reuse tests.
7050
7051 2012-02-15 Niels Möller <[email protected]>
7052
7053 * tune/tuneup.c (mul_toom43_to_toom54_threshold): New global.
7054 (tune_mul): Added tuning of MUL_TOOM43_TO_TOOM54_THRESHOLD.
7055 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM54_MUL): New macro.
7056 (SPEED_ROUTINE_MPN_TOOM54_FOR_TOOM43_MUL): New macro.
7057 Prototypes for corresponding functions.
7058 * tune/common.c (speed_mpn_toom43_for_toom54_mul): New function.
7059 (speed_mpn_toom54_for_toom43_mul): New function.
7060
7061 * gmp-impl.h (MPN_TOOM43_MUL_MINSIZE): Corrected constant.
7062 (MPN_TOOM53_MUL_MINSIZE): Likewise.
7063 (MPN_TOOM54_MUL_MINSIZE): New constant.
7064 (mpn_toom54_mul): Added prototype.
7065 (MUL_TOOM43_TO_TOOM54_THRESHOLD): New threshold. Default value and
7066 tuning setup.
7067
7068 2012-02-14 Niels Möller <[email protected]>
7069
7070 * mpn/generic/toom54_mul.c: New file, originally contributed by
7071 Marco.
7072 * gmp-impl.h (mpn_toom54_mul_itch): New function.
7073 * configure.in (gmp_mpn_functions): Added toom54_mul.
7074 * tests/mpn/t-toom54.c: New file.
7075 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom54.
7076
7077 2012-02-13 Niels Möller <[email protected]>
7078
7079 * configure.in: Display summary of options.
7080
7081 2012-02-11 Torbjorn Granlund <[email protected]>
7082
7083 * tests/tests.h (TESTS_REPS): Print any non-standard repetitions.
7084
7085 2012-02-11 Marco Bodrato <[email protected]>
7086
7087 * doc/gmp.texi (Factorial): Shortly describe current algorithm.
7088 (Multiplication Algorithms): Add Toom[68]'n'half, (too) shortly.
7089 * gmp-impl.h (ASSERT_ALWAYS): Consider failures UNLIKELY.
7090
7091 2012-02-10 Niels Möller <[email protected]>
7092
7093 * tests/mpz/t-gcd.c (gcdext_valid_p): Enforce slightly stricter
7094 bound for cofactors.
7095
7096 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_hook): Corrected
7097 handling of unlikely (maybe impossible?) case u1n < un. Related to
7098 the 2012-02-05 bugfix of gcdext_subdiv_step.c in the gmp-5.0 repo.
7099
7100 2012-02-09 Marco Bodrato <[email protected]>
7101
7102 * gmp-impl.h (mpn_toom3*_itch): Support any recursion depth.
7103 * tests/refmpn.c (refmpn_mul): Restore tight allocations.
7104
7105 * mpz/oddfac_1.c (mpz_oddfac_1): Get ready for n!!
7106 * gmp-impl.h (mpz_oddfac_1): Update signature.
7107 * mpz/fac_ui.c (mpz_fac_ui): Update call to mpz_oddfac_1.
7108
7109 2012-02-09 Marc Glisse <[email protected]>
7110
7111 * gmp-impl.h (ABS_CAST): New macro.
7112 * mpf/cmp_si.c: Use ABS_CAST.
7113 * mpf/get_si.c: Use ABS_CAST.
7114 * mpf/iset_si.c: Use ABS_CAST.
7115 * mpf/set_si.c: Use ABS_CAST.
7116 * mpq/set_si.c: Use ABS_CAST.
7117 * mpz/cmp_si.c: Use ABS_CAST.
7118 * mpz/get_si.c: Use ABS_CAST.
7119 * mpz/iset_si.c: Use ABS_CAST.
7120 * mpz/mul_i.h: Use ABS_CAST.
7121 * mpz/set_si.c: Use ABS_CAST.
7122
7123 2012-02-08 Torbjorn Granlund <[email protected]>
7124
7125 * mpn/powerpc32/divrem_2.asm: Fix off-by-one condition in invert_limb
7126 code.
7127
7128 2012-02-08 Niels Möller <[email protected]>
7129
7130 * doc/gmp.texi (mpz_gcdext): Clarified corner cases in cofactor
7131 canonicalization.
7132
7133 2012-02-07 Niels Möller <[email protected]>
7134
7135 * mpn/generic/gcdext.c (mpn_gcdext): Fixed assert, related to the
7136 special case A = (2k+1) G, B = 2 G. Fix copied from gmp-5.0 repo.
7137
7138 2012-02-06 Niels Möller <[email protected]>
7139
7140 * mpn/generic/hgcd_matrix.c (hgcd_matrix_update_q): Fixed carry
7141 handling bug. Fix copied from gmp-5.0 repo, where the function is
7142 found in hgcd.c.
7143
7144 * tests/mpz/t-gcd.c (main): Use mpz_rrandomb for test operands,
7145 not mpz_urandomb. Change copied from gmp-5.0 repo.
7146 * tests/mpn/t-hgcd.c (main): Likewise.
7147
7148 2012-02-04 Marco Bodrato <[email protected]>
7149
7150 * tests/refmpn.c (refmpn_mul): More conservative allocations.
7151
7152 2012-02-03 Torbjorn Granlund <[email protected]>
7153
7154 * mpn/x86_64/bd1/gmp-mparam.h: New file.
7155
7156 * longlong.h (udiv_qrnnd from sdiv_qrnnd): Declare udiv_w_sdiv.
7157
7158 * mpn/generic/udiv_w_sdiv.c: Use c89 function header.
7159
7160 2012-02-03 Marco Bodrato <[email protected]>
7161
7162 * mpz/fac_ui.c: mpz_oddfac_1 removed, with many related functions.
7163 * mpz/oddfac_1.c: New file, mpz_oddfac_1 implementation.
7164 * gmp-impl.h: mpz_oddfac_1 declaration.
7165 * Makefile.am (MPZ_OBJECTS): add mpz/oddfac_1$U.lo .
7166 * mpz/Makefile.am (libmpz_la_SOURCES): add oddfac_1.c .
7167 * tune/Makefile.am (fac_ui.c): include mpz/oddfac_1.c .
7168
7169 2012-02-02 Marco Bodrato <[email protected]>
7170
7171 * mpn/generic/toom_interpolate_16pts.c: Correct an unlikely 32-bit bug.
7172
7173 2012-02-02 Torbjorn Granlund <[email protected]>
7174
7175 * mpn/generic/toom63_mul.c: Allow s+t==n by adjusting an ASSERT.
7176 * mpn/generic/toom_interpolate_8pts.c: Perform final incr iff s+t!=n.
7177
7178 * tests/mpn/t-toom6h.c (MIN_BN): Make more consistent with ASSERT in
7179 tested function.
7180
7181 2012-02-01 Torbjorn Granlund <[email protected]>
7182
7183 * tests/mpn/t-mul.c: New file.
7184 * tests/mpn/Makefile.am: Compile it.
7185
7186 2012-02-01 Marc Glisse <[email protected]>
7187
7188 * gmpxx.h: Remove check for g++ older than 2.91.
7189
7190 2012-02-01 Niels Möller <[email protected]>
7191
7192 * mpn/generic/mul.c: Added diagram on where toom functions can be
7193 called.
7194
7195 2012-02-01 Marc Glisse <[email protected]>
7196
7197 * gmpxx.h (__gmp_unary_expr): Make the constructor explicit.
7198 (__gmp_expr(__gmp_expr&&)): New move constructors.
7199 (__gmp_expr::operator=(__gmp_expr&&)): New move assignments.
7200 (swap): Mark as noexcept.
7201 (__GMPXX_USE_CXX11): New macro.
7202 (__GMPXX_NOEXCEPT): New macro.
7203 * tests/cxx/t-cxx11.cc: New file.
7204 * tests/cxx/Makefile.am: Added t-cxx11.
7205
7206 2012-01-31 Torbjorn Granlund <[email protected]>
7207
7208 * mpn/generic/powm_sec.c (SQR_BASECASE_LIM): New name for
7209 SQR_BASECASE_MAX.
7210 (SQR_BASECASE_LIM, fat variant): Define to read __gmpn_cpuvec.
7211 (SQR_BASECASE_LIM, native variant): Define to SQR_TOOM2_THRESHOLD
7212 straight, without arithmetic.
7213 (mpn_local_sqr): Use BELOW_THRESHOLD as per Marco's suggestion.
7214
7215 2012-01-30 Torbjorn Granlund <[email protected]>
7216
7217 * tests/mpz/t-powm.c: Ensure all sizes are seen.
7218
7219 2012-01-30 Marc Glisse <[email protected]>
7220
7221 * gmpxx.h (__gmp_binary_expr): Let things happen in place: d=a+b+c
7222 when d != c.
7223 * tests/cxx/t-binary.cc: Test variable reuse: c=a+b+c.
7224
7225 2012-01-28 Marc Glisse <[email protected]>
7226
7227 * gmpxx.h: Don't compute -LONG_MIN.
7228
7229 * doc/gmp.texi (gmp_randclass::get_z_bits): Use mp_bitcnt_t.
7230 * gmpxx.h: Replace unsigned long with mp_bitcnt_t.
7231
7232 2012-01-27 Torbjorn Granlund <[email protected]>
7233
7234 * Upgrade to libtool 2.4.2.
7235
7236 2012-01-26 Marco Bodrato <[email protected]>
7237
7238 * tests/mpz/t-fac_ui.c: Increase default test cases.
7239
7240 * mpz/prodlimbs.c: New file, mpz_prodlimbs implementation.
7241 * gmp-impl.h: mpz_prodlimbs declaration.
7242 * Makefile.am (MPZ_OBJECTS): add mpz/prodlimbs$U.lo .
7243 * mpz/Makefile.am (libmpz_la_SOURCES): add prodlimbs.c .
7244 (fac_ui.h): remove target (moved up one directory).
7245 * mpz/fac_ui.c: mpz_prodlimbs removed, micro-optimisations.
7246
7247 2012-01-25 Torbjorn Granlund <[email protected]>
7248
7249 * tune/tuneup.c: Remove unused tuneup variables.
7250
7251 2012-01-20 Marco Bodrato <[email protected]>
7252
7253 * mpz/fac_ui.c: Reduce branches in basecases.
7254
7255 2012-01-18 Marc Glisse <[email protected]>
7256
7257 * doc/gmp.texi (mpf_class::mpf_class): Use mp_bitcnt_t.
7258
7259 2012-01-17 Torbjorn Granlund <[email protected]>
7260
7261 * configure.in: Add ultrasparc T4 support.
7262
7263 * demos/isprime.c (main): Run 25 millerrabin tests.
7264
7265 2012-01-16 Marco Bodrato <[email protected]>
7266
7267 * mpz/fac_ui.c (SIEVE_SEED): Define value for small limb size.
7268 (mpz_oddswing_1): Reduce the number of divisions.
7269 (mpz_oddfac_1): Reduce memory usage.
7270 * mpn/minithres/gmp-mparam.h: Correct minimum for FAC_DSC_.
7271 * tune/tuneup.c (tune_fac_ui): Likewise.
7272
7273 2012-01-15 Niels Möller <[email protected]>
7274
7275 * mpz/scan0.c (mpz_scan0): Use ~(mp_bitcnt_t) 0, rather than
7276 ULONG_MAX, when returning "infinity".
7277 * mpz/scan1.c (mpz_scan1): Likewise.
7278
7279 2012-01-12 Torbjorn Granlund <[email protected]>
7280
7281 * tests/t-popc.c: Test longer bit strings.
7282
7283 2012-01-12 Marco Bodrato <[email protected]>
7284
7285 * mpz/divexact.c: Tight realloc, delayed if variables are reused.
7286 * mpz/lcm.c: Smaller temp space, avoid goto.
7287 * gmp-impl.h (popc_limb): avoid double & (for 8-bits limb).
7288
7289 2012-01-10 Marco Bodrato <[email protected]>
7290
7291 * mpn/minithres/gmp-mparam.h: New FAC_ODD_ and FAC_DSC_ thresholds.
7292 * tune/tuneup.c (tune_fac_ui): Correct minimum for FAC_DSC_.
7293
7294 2012-01-07 Torbjorn Granlund <[email protected]>
7295
7296 * mpz/mul_2exp.c: Rewrite.
7297 * mpz/tdiv_q_2exp.c: Rewrite.
7298
7299 2012-01-05 Marco Bodrato <[email protected]>
7300
7301 * gen-fac_ui.c: Remove currently unused constants; add new odd
7302 double factorial table.
7303 * mpz/fac_ui.c (RECURSIVE_PROD_THRESHOLD): Increase default.
7304 (mpz_oddfac_1): New function: a merge of _bc_odd and _dsc_odd.
7305 (mpz_prodlimbs): More in-place computations.
7306
7307 * tune/tuneup.c (tune_fac_ui): min_is_always for FAC_ODD_.
7308
7309 2012-01-02 Marco Bodrato <[email protected]>
7310
7311 * tune/tuneup.c (tune_fac_ui): Compute FAC_DSC before FAC_ODD.
7312
7313 2011-12-31 Torbjorn Granlund <[email protected]>
7314
7315 * Makefile.am (fac_ui.h): Put file in top-level dir, not in mpz.
7316
7317 2011-12-31 Marco Bodrato <[email protected]>
7318
7319 * tune/Makefile.am (fac_ui.c): New target.
7320 (nodist_tuneup_SOURCES,CLEANFILES): Add fac_ui.c.
7321 * tune/tuneup.c (mpz_fac_ui_tune): Declare prototype.
7322 (fac_odd_threshold,fac_dsc_threshold): New global variables.
7323 (speed_mpz_fac_ui_tune,tune_fac_ui): New functions.
7324 (all): Call tune_fac_ui.
7325 * gmp-impl.h (FAC_ODD_THRESHOLD,FAC_DSC_THRESHOLD):
7326 New thresholds: default values, and setup for tuning.
7327 (FAC_DSC_THRESHOLD_LIMIT): Define (when tuning).
7328 * mpz/fac_ui.c (FAC_ODD_THRESHOLD,FAC_DSC_THRESHOLD):
7329 Default values removed.
7330
7331 2011-12-30 Torbjorn Granlund <[email protected]>
7332
7333 * mpz/hamdist.c: Fix typo in a return statement.
7334
7335 * mpn/generic/powm_sec.c (SQR_BASECASE_MAX): Set safely from
7336 SQR_TOOM2_THRESHOLD.
7337
7338 2011-12-17 Torbjorn Granlund <[email protected]>
7339
7340 * tests/mpz/t-perfpow.c: Decrease default # of tests.
7341
7342 2011-12-16 Torbjorn Granlund <[email protected]>
7343
7344 * tests/refmpn.c (AORS_1): Fix typo in variable type.
7345
7346 2011-12-10 Torbjorn Granlund <[email protected]>
7347
7348 * mpn/generic/sbpi1_bdiv_q.c: Delay quotient limb stores in order to
7349 allow quotient and dividend to completely overlap.
7350 * mpn/generic/sbpi1_bdiv_qr.c: Likewise.
7351
7352 2011-12-10 Marco Bodrato <[email protected]>
7353
7354 * mpz/fac_ui.c: fac_bc_ui inlined in fac_ui.
7355
7356 2011-12-08 Torbjorn Granlund <[email protected]>
7357
7358 * mpn/generic/powm_sec.c: Handle fat binaries better.
7359
7360 * mpz/fac_ui.c (mpz_bc_fac_1): Fix typo in allocation size.
7361
7362 * mpn/x86/fat/com.c: New file.
7363
7364 * mpn/x86_64/pentium4/aors_n.asm: Make it actually work for DOS64.
7365 * mpn/x86_64/pentium4/rsh1aors_n.asm: Conditionalise jump on DOS64
7366 to avoid overhead for standard ABIs.
7367
7368 * mpn/x86_64/gcd_1.asm: Support DOS64.
7369
7370 2011-12-07 Torbjorn Granlund <[email protected]>
7371
7372 * configure.in: Fix typo making HAVE_NATIVE_mpn_X fail for fat
7373 functions.
7374
7375 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Add a missing break.
7376
7377 2011-12-07 Marco Bodrato <[email protected]>
7378
7379 * gen-fac_ui.c: Generate two more tables: odd factorial, swing.
7380
7381 * mpz/fac_ui.c: Rewrite.
7382
7383 2011-12-06 Niels Möller <[email protected]>
7384
7385 * mpn/generic/hgcd.c (mpn_hgcd): Use hgcd_reduce for first
7386 recursive call.
7387
7388 2011-12-06 Torbjorn Granlund <[email protected]>
7389
7390 * tune/mod_1_1-1.c: Redefine the mpn_ functions, not __gmpn_ (for the
7391 benefit of fat builds).
7392 * tune/mod_1_1-2.c: Likewise.
7393
7394 2011-12-05 Torbjorn Granlund <[email protected]>
7395
7396 * mpn/x86/fat/lshiftc.c: New file.
7397 * mpn/x86/fat/mod_1_1.c: New file.
7398 * mpn/x86/fat/mod_1_2.c: New file.
7399 * mpn/x86/fat/mod_1_4.c: New file.
7400
7401 * mpn/x86/fat/diveby3.c: Remove no longer fat function.
7402 * mpn/x86_64/fat/diveby3.c: Likewise.
7403
7404 * mpn/x86_64/fat/gcd_1.c: Remove since always provided as asm.
7405 * mpn/x86_64/fat/mode1o.c: Likewise.
7406
7407 * configure.in (fat_functions): Update to more relevant function set.
7408 Add special handling for mod_1_N_cps functions.
7409 * gmp-impl.h (struct cpuvec_t) : Corresponding changes. Also add
7410 vrious declarations for new functions.
7411 * mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): Corresponding changes.
7412 * mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): Corresponding changes.
7413 * mpn/x86/fat/fat.c (__gmpn_cpuvec): Corresponding changes.
7414 * mpn/x86_64/fat/fat.c (__gmpn_cpuvec): Corresponding changes.
7415
7416 * mpn/x86_64: Port most remaining x86_64 files to DOS64.
7417
7418 * mpn/x86_64/coreisbr/aors_n.asm: Add forgotten DOS64_EXIT.
7419
7420 * mpn/x86_64/x86_64-defs.m4 (LEA): Handle non-PIC code.
7421 * mpn/x86_64/darwin.m4 (LEA): Likewise.
7422
7423 2011-12-04 Torbjorn Granlund <[email protected]>
7424
7425 * mpn/x86_64/fat/fat.c (MAKE_FMS): Rewrite to handle modern CPUs.
7426 * mpn/x86/fat/fat.c (MAKE_FMS): Likewise.
7427
7428 * mpn/x86_64/darwin.m4 (PROTECT): Define to potentially useful value.
7429
7430 2011-12-02 Torbjorn Granlund <[email protected]>
7431
7432 * mpn/x86_64/invert_limb_table.asm: Use PROTECT.
7433 * mpn/x86_64/invert_limb.asm: Likewise.
7434
7435 * mpn/x86_64/darwin.m4 (PROTECT, IFELF): New defines.
7436 * mpn/x86_64/dos64.m4 (PROTECT, IFELF): New defines.
7437 * mpn/x86_64/x86_64-defs.m4 (PROTECT, IFELF): New defines.
7438
7439 2011-12-01 Torbjorn Granlund <[email protected]>
7440
7441 * mpn/x86_64/fat/fat.c: Copy fake cpuid code from x86/fat/fat.c.
7442
7443 * mpn/x86_64 (STD64, IFSTD): New names for ELF64, IFELF (since these
7444 denote all standard calling conventions).
7445
7446 * mpn/x86_64: Add DOS64 ABI support to more files.
7447
7448 * mpn/x86_64/mod_1_1.asm: Finish DOS64 support.
7449 * mpn/x86_64/mod_1_2.asm: Likewise.
7450 * mpn/x86_64/mod_1_4.asm: Likewise.
7451
7452 * configure.in: Add GMP_NONSTD_ABI also for fat builds.
7453
7454 * mpn/x86_64/fat/fat_entry.asm: Rewrite to support DOS64.
7455
7456 * mpn/x86_64/dos64.m4 (IFDOS, IFSTD): New defines.
7457 * mpn/x86_64/x86_64-defs (IFDOS, IFSTD): New defines.
7458
7459 * mpn/x86_64/dive_1.asm: Add DOS64 ABI support.
7460 * mpn/x86_64/mode1o.asm: Likewise.
7461
7462 * mpn/x86_64/mod_34lsub1.asm: Enable for DOS64.
7463
7464 * mpn/x86_64/invert_limb.asm: Wrap .protected decl.
7465
7466 * gmp-impl.h (DECL_divexact_1): Fix typo in return type.
7467
7468 * mpn/x86_64/dos64.m4 (LEA): New define.
7469 (PIC): Define.
7470
7471 2011-11-29 Torbjorn Granlund <[email protected]>
7472
7473 * mpn/x86_64: Add DOS64 ABI support to most files.
7474
7475 2011-11-28 Torbjorn Granlund <[email protected]>
7476
7477 * mpn/x86_64/mul_basecase.asm: Support ABI DOS64.
7478 * mpn/x86_64/sqr_basecase.asm: Support ABI DOS64.
7479 * mpn/x86_64/aorsmul_1.asm: Support ABI DOS64.
7480 * mpn/x86_64/mul_1.asm: Support ABI DOS64.
7481
7482 * mpn/x86_64/x86_64-defs.m4 (DOS64_ENTRY, DOS64_EXIT): New, empty defs.
7483
7484 * mpn/x86_64/dos64.m4: New file.
7485
7486 * mpn/asm-defs.m4 (ABI_SUPPORT): New dummy macro.
7487
7488 * configure.in (64-bit mingw/cygwin): Define HOST_DOS64,GMP_NONSTD_ABI.
7489 No longer clear out path_64.
7490 (mpn code selection loop): Handle GMP_NONSTD_ABI.
7491
7492 * mpn/generic/udiv_w_sdiv.c: Use CNST_LIMB for some constants.
7493
7494 2011-11-25 Torbjorn Granlund <[email protected]>
7495
7496 * x86/*: Many new gmp-mparam.h file for 64-bit CPUs in 32-bit mode.
7497
7498 * configure.in: Overhaul x86/x86_64 support, merging three case
7499 statements into one.
7500
7501 2011-11-24 Torbjorn Granlund <[email protected]>
7502
7503 * doc/gmp.texi (Formatted Output Strings): Clarify rules for mpf_t
7504 precision.
7505
7506 * mpn/powerpc32/p7/gmp-mparam.h: New file.
7507
7508 * tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Up min_size to karatsuba's
7509 threshold.
7510
7511 2011-11-22 Torbjorn Granlund <[email protected]>
7512
7513 * mpn/powerpc64/mode64/p6/aorsmul_1.asm: New file.
7514
7515 * configure.in: Don't fail fat builds under 64-bit DOS.
7516
7517 * mpn/powerpc64/mode64/aors_n.asm: Align loop for slightly better
7518 power5 performance.
7519
7520 2011-11-21 Torbjorn Granlund <[email protected]>
7521
7522 * gmp-h.in (__GNU_MP_RELEASE): Renamed from typo name.
7523
7524 2011-11-20 Torbjorn Granlund <[email protected]>
7525
7526 * configure.in: Split x86 CPUs into more subtypes for more accurate
7527 passing of gcc flags.
7528
7529 * mpn/powerpc32/p3-p7/aors_n.asm: New file.
7530
7531 * configure.in: Pass -m32 for powerpc64 with abi=32, using via _maybe
7532 mechanism.
7533
7534 * configure.in: Support powerpc32/p3-p7 directory for affected CPUs.
7535
7536 2011-11-17 Torbjorn Granlund <[email protected]>
7537
7538 * tune/speed.c (routine): Add mpn_tabselect.
7539 * tune/common.c (speed_mpn_tabselect): New function.
7540 * tune/speed.h (SPEED_ROUTINE_MPN_COPY_CALL): New macro, made from
7541 old SPEED_ROUTINE_MPN_COPY.
7542 (SPEED_ROUTINE_MPN_COPY): Just invoke SPEED_ROUTINE_MPN_COPY_CALL.
7543 (SPEED_ROUTINE_MPN_TABSELECT): New macro.
7544
7545 2011-11-17 Niels Möller <[email protected]>
7546
7547 * tune/tuneup.c (tune_hgcd_appr): Increase stop_since_change.
7548
7549 2011-11-16 Torbjorn Granlund <[email protected]>
7550
7551 * mpn/powerpc32/tabselect.asm: New file.
7552
7553 * mpn/powerpc64/mode64/aorscnd_n.asm: New file.
7554
7555 2011-11-15 Niels Möller <[email protected]>
7556
7557 * tune/speed.h (speed_mpn_hgcd_appr_lehmer): New prototype.
7558 (mpn_hgcd_lehmer_itch): Likewise.
7559 (mpn_hgcd_appr_lehmer): Likewise.
7560 (mpn_hgcd_appr_lehmer_itch): Likewise.
7561 (MPN_HGCD_LEHMER_ITCH): Deleted macro.
7562
7563 * tune/speed.c (routine): Added mpn_hgcd_appr_lehmer.
7564
7565 * tune/common.c (speed_mpn_hgcd_lehmer): Use mpn_hgcd_lehmer_itch
7566 rather than similarly named macro.
7567 (speed_mpn_hgcd_appr_lehmer): New function.
7568
7569 * tune/Makefile.am (libspeed_la_SOURCES): Added
7570 hgcd_appr_lehmer.c.
7571
7572 * tune/hgcd_appr_lehmer.c: New file.
7573
7574 * tune/tuneup.c (tune_hgcd_appr): Increased min_size to 50; some
7575 machines got small thresholds which appear to be bogus.
7576
7577 2011-11-15 Torbjorn Granlund <[email protected]>
7578
7579 * mpn/generic/powm_sec.c (mpn_local_sqr): Remove forgotten TMP_* calls.
7580 (redcify): Likewise.
7581 (mpn_powm_sec): Likewise.
7582
7583 * mpn/generic/powm_sec.c (mpn_powm_sec): Rework scratch usage
7584 (mpn_powm_sec_itch): Rewrite.
7585
7586 * mpn/generic/powm_sec.c (mpn_powm_sec): Use mpn_tabselect also in
7587 initialisation.
7588
7589 * configure.in: Amend 2011-11-03 gcc_cflags change.
7590
7591 * mpn/powerpc64/tabselect.asm: New file.
7592 * mpn/x86_64/tabselect.asm: New file.
7593 * mpn/x86/tabselect.asm: New file.
7594 * mpn/ia64/tabselect.asm: New file.
7595
7596 * mpn/asm-defs.m4 (define_mpn): Add tabselect.
7597
7598 * configure.in (gmp_mpn_functions): Add tabselect.
7599 (HAVE_NATIVE): Add entries for addncd_n, subcnd_n, tabselect.
7600
7601 * mpn/generic/powm_sec.c: Remove mpn_tabselect implementation.
7602 * mpn/generic/tabselect.c: New file with removed code.
7603
7604 2011-11-13 Torbjorn Granlund <[email protected]>
7605
7606 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add powm_sec.c.
7607
7608 * mpn/generic/powm_sec.c (win_size): Use POWM_SEC_TABLE
7609 (POWM_SEC_TABLE): Define default.
7610
7611 * tune/tuneup.c (tune_powm_sec): New function computing POWM_SEC_TABLE.
7612 (all): Call new function.
7613
7614 * mpn/generic/powm_sec.c (win_size): Define only when
7615 TUNE_PROGRAM_BUILD is not set.
7616
7617 2011-11-13 Niels Möller <[email protected]>
7618
7619 * tune/tuneup.c (tune_hgcd_appr): Use default min_size.
7620 (tune_hgcd_reduce): Increase max_size and step_factor, to 7000
7621 and 0.04, respectively.
7622
7623 2011-11-11 Torbjorn Granlund <[email protected]>
7624
7625 * mpn/powerpc64/mode64/sqr_diag_addlsh1.asm: Remove.
7626
7627 2011-11-11 Niels Möller <[email protected]>
7628
7629 * tune/hgcd_reduce_2.c: New file.
7630 * tune/hgcd_reduce_1.c: New file.
7631
7632 * tune/tuneup.c (hgcd_appr_threshold): New threshold variable.
7633 (hgcd_reduce_threshold): Likewise.
7634 (tune_hgcd_appr): New function.
7635 (tune_hgcd_reduce): New function.
7636 (all): Call tune_hgcd_appr and tune_hgcd_reduce.
7637
7638 * tune/speed.h (speed_mpn_hgcd_reduce): Declaration.
7639 (speed_mpn_hgcd_reduce_[12]): Likewise.
7640 (mpn_hgcd_reduce_[12]): Likewise.
7641 (SPEED_ROUTINE_MPN_HGCD_REDUCE_CALL): New macro.
7642
7643 * tune/speed.c (routine): Added mpn_hgcd_reduce,
7644 mpn_hgcd_reduce_1, and mpn_hgcd_reduce_2.
7645
7646 * tune/common.c (speed_mpn_hgcd_reduce): New function.
7647 (speed_mpn_hgcd_reduce_[12]): Likewise.
7648
7649 * tune/Makefile.am (libspeed_la_SOURCES): Added hgcd_reduce_1.c
7650 hgcd_reduce_2.c.
7651 (TUNE_MPN_SRCS_BASIC): Added hgcd_appr.c and hgcd_reduce.c.
7652
7653 * mpn/generic/hgcd_appr.c (submul, hgcd_matrix_apply): Deleted
7654 functions, earlier copied to hgcd_reduce.c.
7655 (mpn_hgcd_appr): Use hgcd_reduce.
7656
7657 2011-11-09 Torbjorn Granlund <[email protected]>
7658
7659 * mpn/powerpc64/mode64/sqr_basecase.asm: New file.
7660
7661 * mpn/x86_64/aorscnd_n.asm: New file.
7662
7663 * tune/speed.c (routine): Add measuring of mpn_addcnd_n, mpn_subcnd_n.
7664 * tune/common.c (speed_mpn_addcnd_n,speed_mpn_subcnd_n): New functions.
7665 * tune/speed.h: Declare them.
7666
7667 * tests/devel/try.c: Add tests for mpn_addcnd_n and mpn_subcnd_n.
7668 * tests/refmpn.c (refmpn_addcnd_n, refmpn_subcnd_n): New functions.
7669 * tests/tests.h: Declare them.
7670
7671 * configure.in (gmp_mpn_functions): Add addcnd_n and subcnd_n.
7672
7673 2011-11-07 Torbjorn Granlund <[email protected]>
7674
7675 * mpn/generic/redc_1.c: Just reduce U operand using Hensel norm, but
7676 not fully canonically; leave add_n and conditional sub_n to caller.
7677 Therefore omit R argument.
7678
7679 * mpn/generic/redc_1_sec.c: Remove.
7680
7681 * gmp-impl.h (mpn_redc_1): Update declaration.
7682 (mpn_redc_1_sec): Remove declaration.
7683
7684 * configure.in (gmp_mpn_functions): Remove redc_1.
7685
7686 * mpn/x86_64/redc_1.asm: Adopt to new defined functionality/interface.
7687 * tune/speed.h (SPEED_ROUTINE_REDC_1): Likewise.
7688
7689 * tests/refmpn.c (refmpn_redc_1): Likewise; also call refmpn_addmul_1
7690 instead of mpn_addmul_1.
7691
7692 * mpn/generic/powm.c (MPN_REDC_1): New macro, use for mpn_redc_1.
7693 * mpn/generic/powm_sec.c (MPN_REDC_1_SEC): New macro, use for
7694 mpn_redc_1_sec.
7695
7696 2011-11-03 Torbjorn Granlund <[email protected]>
7697
7698 * dumbmp.c (mpz_sub): Abort for non-handled case.
7699
7700 * mpn/powerpc64/mode64/lshiftc.asm: Move file from here...
7701 * mpn/powerpc64/lshiftc.asm: ...to here, with trivial modifications.
7702
7703 * configure.in: Pass -m32 in more cases, using _maybe mechanism.
7704 Inherit default gcc_cflags in more places.
7705
7706 * mpn/powerpc64/mode64/p7/gmp-mparam.h: New file.
7707
7708 2011-11-02 Torbjorn Granlund <[email protected]>
7709
7710 * mpn/s390_64/invert_limb.asm: Slight optimisation.
7711
7712 * configure.in (s390): Set gcc_32_cflags_maybe.
7713
7714 * mpn/s390_32/gmp-mparam.h: Put in proper data.
7715 * mpn/s390_32/esame/gmp-mparam.h: New file.
7716
7717 * mpn/x86_64/bobcat/gmp-mparam.h: New file.
7718
7719 * mpn/s390_32/lshift.asm: New file.
7720 * mpn/s390_32/rshift.asm: New file.
7721 * mpn/s390_32/lshiftc.asm: New file.
7722
7723 2011-10-31 Torbjorn Granlund <[email protected]>
7724
7725 * mpn/powerpc64/sqr_diagonal.asm: Move from here...
7726 * mpn/powerpc64/mode32/sqr_diagonal.asm: ...to here.
7727
7728 * mpn/powerpc64/mode64/sqr_diag_addlsh1.asm: New file.
7729
7730 * mpn/s390_64/sqr_basecase.asm: Rewrite sqr_diag_addlsh1 code.
7731 * mpn/s390_32/esame/sqr_basecase.asm: Likewise.
7732
7733 2011-10-29 Torbjorn Granlund <[email protected]>
7734
7735 * mpn/s390_64/lshift.asm: Complete rewrite.
7736 * mpn/s390_64/rshift.asm: Likewise.
7737
7738 * mpn/s390_64/lshiftc.asm: New file.
7739
7740 2011-10-28 Torbjorn Granlund <[email protected]>
7741
7742 * mpn/s390_32/esame/aors_n.asm: New file, with rewritten add/sub code.
7743
7744 2011-10-27 Torbjorn Granlund <[email protected]>
7745
7746 From Per Olofsson:
7747 * gmp-impl.h (BSWAP_LIMB): Rename variable to avoid BSWAP_LIMB_FETCH
7748 clash.
7749
7750 * mpn/s390_32/esame/mul_basecase.asm: New file.
7751
7752 * mpn/s390_32/esame/sqr_basecase.asm: New file.
7753
7754 * mpn/s390_32/logops_n.asm: New file.
7755
7756 * mpn/s390_64/logops_n.asm: Fix rp=up code. Remove a leftover insn.
7757
7758 2011-10-26 Niels Möller <[email protected]>
7759
7760 * gmp-impl.h (mpn_hgcd_reduce, mpn_hgcd_reduce_itch): Added
7761 prototypes.
7762 (HGCD_APPR_THRESHOLD): Set up threshold for tuning.
7763 (HGCD_REDUCE_THRESHOLD): Likewise.
7764
7765 * configure.in (gmp_mpn_functions): Added hgcd_reduce.
7766
7767 * mpn/generic/hgcd_reduce.c: New file.
7768
7769 2011-10-24 Torbjorn Granlund <[email protected]>
7770
7771 * mpn/x86_64/sqr_basecase.asm: Put intermediate result into R, don't
7772 allocate any stack space.
7773
7774 2011-10-23 Torbjorn Granlund <[email protected]>
7775
7776 * mpn/s390_64/logops_n.asm: Use nc, oc, xc when possible.
7777
7778 * tune/common.c (speed_mpn_and_n, speed_mpn_andn_n, etc):
7779 Pass correct input args.
7780
7781 * mpn/s390_64/mod_34lsub1.asm: Use llgfr for zero extensions.
7782
7783 * mpn/s390_64/mul_basecase.asm: New file.
7784
7785 * mpn/s390_64/sqr_basecase.asm: New file.
7786 * mpn/s390_64/sqr_diag_addlsh1.asm: Removed, lives on in sqr_basecase.
7787
7788 * mpn/s390_64/bdiv_dbm1c.asm: Shave off 1 c/l.
7789
7790 * mpn/s390_64/aorrlsh1_n.asm: New file, developed from aorslsh1_n.asm.
7791 * mpn/s390_64/sublsh1_n.asm: New file.
7792 * mpn/s390_64/aorslsh1_n.asm: Remove file.
7793
7794 2011-10-22 Torbjorn Granlund <[email protected]>
7795
7796 * mpn/s390_64/logops_n.asm: New file.
7797
7798 * mpn/s390_64/aors_n.asm: New file, with rewritten add/sub code.
7799
7800 2011-10-20 Torbjorn Granlund <[email protected]>
7801
7802 * tune/speed.h (SPEED_ROUTINE_MPN_SQR_DIAL_ADDLSH1_CALL): New macro.
7803 * tune/common.c (speed_mpn_sqr_diag_addlsh1): New function.
7804 * tune/speed.c (routine): Measure mpn_sqr_diag_addlsh1.
7805
7806 * mpn/s390_64/sqr_diag_addlsh1.asm: Rewrite like s390_32/esame code.
7807
7808 * mpn/s390_32/esame/sqr_diag_addlsh1.asm: Save just needed registers.
7809
7810 2011-10-19 Torbjorn Granlund <[email protected]>
7811
7812 * mpn/s390_32/esame/add_n.asm: Rewrite, similar to s390_64 code.
7813 * mpn/s390_32/esame/add_n.asm: Likewise.
7814
7815 2011-10-17 Torbjorn Granlund <[email protected]>
7816
7817 * mpn/s390_32/esame/aorslsh1_n.asm: New file.
7818
7819 2011-10-16 Torbjorn Granlund <[email protected]>
7820
7821 * mpn/s390_32/esame/sqr_diag_addlsh1.asm: New file.
7822
7823 * mpn/s390_32/copyi.asm: New file.
7824 * mpn/s390_32/copyd.asm: New file.
7825
7826 * mpn/s390_64/copyd.asm: Optimise.
7827
7828 * mpn/s390_64/copyi.asm: Rewrite along the lines of glibc memcpy.
7829
7830 * mpn/s390_64/aorslsh1_n.asm: New file.
7831
7832 * mpn/s390_64/mod_34lsub1.asm: New file.
7833
7834 * mpn/s390_64/sqr_diag_addlsh1.asm: New file.
7835
7836 2011-10-15 Torbjorn Granlund <[email protected]>
7837
7838 * configure.in (s390): Rewrite support to handle known CPUs.
7839 * config.guess: Recognise s390 CPUs.
7840 * config.sub: Match s390 CPUs.
7841 * acinclude.m4 (S390_PATTERN, S390X_PATTERN): New defines.
7842
7843 2011-10-14 Torbjorn Granlund <[email protected]>
7844
7845 From Per Olofsson:
7846 * mpn/generic/popham.c: Add __GMP_NOTHROW to make it match gmp.h.
7847 * mpn/generic/gcd_1.c: Separate declarations and initialisers for the
7848 benefit of C++.
7849
7850 * configure.in: AC_DEFINE HAVE_HOST_CPU_s390_zarch.
7851 * longlong.h (s390): Use it.
7852 (s390 umul_ppmm): Fix typo in pure C variant.
7853
7854 2011-10-13 Torbjorn Granlund <[email protected]>
7855
7856 * longlong.h (s390): Put back an accidentally deleted #else.
7857
7858 * configure.in (s390): Unset extra_functions for s390x.
7859
7860 2011-10-12 Torbjorn Granlund <[email protected]>
7861
7862 * mpn/s390_64/lshift.asm: Reduce register usage.
7863 * mpn/s390_64/rshift.asm: Likewise.
7864
7865 * longlong.h (s390 umul_ppmm): With new-enough gcc, avoid asm.
7866
7867 From Andreas Krebbel:
7868 * longlong.h (s390 umul_ppmm): Support 32-bit limbs with gcc using
7869 64-bit registers.
7870 (s390 udiv_qrnnd): Likewise.
7871
7872 2011-10-11 Torbjorn Granlund <[email protected]>
7873
7874 * configure.in (s390x): Pass -mzarch to gcc in 32-bit mode.
7875
7876 * longlong.h (s390x): Add __CLOBBER_CC for relevant asm patterns.
7877 * mpn/generic/mod_1_1.c (s390x add_mssaaaa): Likewise.
7878
7879 * mpn/s390_64/copyd.asm: New file.
7880
7881 2011-10-10 Niels Möller <[email protected]>
7882
7883 * mpn/generic/hgcd_appr.c: Deleted debugging code.
7884
7885 * tests/mpn/t-hgcd_appr.c (main): Added -v flag.
7886 (hgcd_appr_valid_p): Increased margin of non-minimality for
7887 divide-and-conquer algorithm. Display bit counts only if
7888 -v is used.
7889
7890 * mpn/generic/hgcd_appr.c (submul): New (static) function.
7891 (hgcd_matrix_apply): New function.
7892 (mpn_hgcd_appr_itch): Account for divide-and-conquer algorithm.
7893 (mpn_hgcd_appr): Implemented divide-and-conquer.
7894
7895 2011-10-10 Torbjorn Granlund <[email protected]>
7896
7897 * mpn/generic/mod_1_1.c (add_mssaaaa): Add s390x variant. Put arm code
7898 inside __GNUC__.
7899
7900 * tune/time.c (STCK): Use proper memory constraint.
7901
7902 From Marco Trudel:
7903 * tests/mpz/t-scan.c (check_ref): Fix loop end bound.
7904
7905 2011-10-10 Niels Möller <[email protected]>
7906
7907 * gmp-impl.h: (HGCD_APPR_THRESHOLD): New threshold.
7908
7909 * mpn/generic/hgcd_appr.c (mpn_hgcd_appr): Interface change.
7910 Destroy inputs, let caller make working copies if needed.
7911 (mpn_hgcd_appr_itch): Reduced scratch need.
7912 * gmp-impl.h: Updated mpn_hgcd_appr prototype.
7913 * tests/mpn/t-hgcd_appr.c (one_test): Make working copies for
7914 hgcd_appr.
7915 * tune/common.c (speed_mpn_hgcd_appr): Use SPEED_ROUTINE_MPN_HGCD_CALL.
7916 * tune/speed.h (SPEED_ROUTINE_MPN_HGCD_APPR_CALL): Deleted.
7917
7918 2011-10-09 Torbjorn Granlund <[email protected]>
7919
7920 * mpn/s390_64/copyi.asm: New file.
7921 * mpn/s390_64/lshift.asm: New file.
7922 * mpn/s390_64/rshift.asm: New file.
7923
7924 * mpn/s390_64/add_n.asm: Rewrite using lmg/stmg.
7925 * mpn/s390_64/sub_n.asm: Likewise.
7926
7927 * mpn/s390_64/invert_limb.asm: Save a callee-saves register less.
7928
7929 * tune/time.c (getrusage_backwards_p): Properly cast printed values.
7930
7931 * longlong.h (s390x): Put back UDItype casts to make gcc reloading use
7932 right more for constants.
7933 (s390x count_leading_zeros): Disable until we support z10 specifically.
7934 (s390x add_ssaaaa): Remove algsi/slgsi until we support z10.
7935
7936 2011-10-09 Niels Möller <[email protected]>
7937
7938 * mpn/generic/hgcd_matrix.c (mpn_hgcd_matrix_adjust): Declare
7939 matrix argument const.
7940
7941 2011-10-08 Niels Möller <[email protected]>
7942
7943 * tests/mpn/t-hgcd_appr.c (hgcd_appr_valid_p): Adjusted the
7944 allowed margin of non-minimality for hgcd_appr.
7945
7946 * mpn/generic/hgcd_appr.c (mpn_hgcd_appr): Fixed handling of
7947 extra_bits, starting at zero, to ensure that we don't produce too
7948 small remainders. Added a final reduction loop when we we
7949 otherwise terminate with extra_bits > 0, to make the returned
7950 remainders closer to minimal.
7951
7952 2011-10-07 Torbjorn Granlund <[email protected]>
7953
7954 * longlong.h (s390): Add 32-bit zarch umul_ppmm and udiv_qrnnd.
7955 (s390): Overhaul 32-bit and 64-bit code.
7956
7957 2011-10-07 Niels Möller <[email protected]>
7958
7959 * tune/speed.h (speed_mpn_hgcd_appr): New prototype.
7960 (SPEED_ROUTINE_MPN_HGCD_APPR_CALL): New macro.
7961 * tune/common.c (speed_mpn_hgcd_appr): New function.
7962 * tune/speed.c (routine): Added mpn_hgcd_appr.
7963
7964 * tests/mpn/t-hgcd_appr.c: New file.
7965 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-hgcd_appr.
7966
7967 * configure.in (gmp_mpn_functions): Added hgcd_step and hgcd_appr.
7968
7969 * gmp-impl.h: Added prototypes for mpn_hgcd_step,
7970 mpn_hgcd_appr_itch and mpn_hgcd_appr.
7971
7972 * mpn/generic/hgcd_appr.c: New file.
7973
7974 * mpn/generic/hgcd_step.c: New file, extracted from hgcd.c.
7975 (mpn_hgcd_step): Renamed, from...
7976 * mpn/generic/hgcd.c (hgcd_step): ...old name. Renamed and moved
7977 to hgcd_step.c.
7978 (hgcd_hook): Also moved to hgcd_step.c.
7979 (mpn_hgcd): Updated for hgcd_step renaming.
7980
7981 2011-10-06 Torbjorn Granlund <[email protected]>
7982
7983 * mpn/s390_64/invert_limb.asm: New file.
7984
7985 2011-10-04 Torbjorn Granlund <[email protected]>
7986
7987 * mpn/s390_64/submul_1.asm: New file.
7988 * mpn/s390_32/esame/submul_1.asm: New file.
7989
7990 * mpn/generic/mulmid.c (mpn_mulmid): Move a TMP_DECL to block start.
7991
7992 * mpn/Makefile.am (TARG_DIST): Add s390_32 and s390_64, remove s390 and
7993 z8000x.
7994
7995 * doc/gmp.texi (Custom Allocation): Rephrase a paragraph.
7996
7997 * demos/factorize.c: Run 25 Miller-Rabin tests.
7998
7999 * mpz/nextprime.c: Run 25 mpz_millerrabin tests (was 10).
8000
8001 2011-10-03 Torbjorn Granlund <[email protected]>
8002
8003 * configure.in: Support s390x.
8004
8005 * longlong.h: Add support for 64-bit s390x.
8006
8007 * mpn/s390_64: New directory.
8008 * mpn/s390_64/add_n.asm: New file.
8009 * mpn/s390_64/sub_n.asm: New file.
8010 * mpn/s390_64/mul_1.asm: New file.
8011 * mpn/s390_64/addmul_1.asm: New file.
8012 * mpn/s390_64/bdiv_dbm1c.asm: New file.
8013 * mpn/s390_64/gmp-mparam.h: New file, taken from x86_64.
8014
8015 * mpn/s390_32: Directory renamed from mpn/s390.
8016 * mpn/s390_32/gmp-mparam.h: New file, taken from x86_64.
8017 * mpn/s390_32/esame/add_n.asm: New file.
8018 * mpn/s390_32/esame/sub_n.asm: New file.
8019 * mpn/s390_32/esame/mul_1.asm: New file.
8020 * mpn/s390_32/esame/addmul_1.asm: New file.
8021 * mpn/s390_32/esame/bdiv_dbm1c.asm: New file.
8022
8023 2011-10-03 Niels Möller <[email protected]>
8024
8025 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-mulmid.
8026 * tests/mpn/t-mulmid.c: New file.
8027
8028 mulmid-related assembly for x86_64, from David Harvey:
8029 * mpn/asm-defs.m4 (define_mpn): Added [add,sub]_err[1,2,3]_n and
8030 mulmid_basecase. Also use m4_not_for_expansion on the
8031 corresponding OPERATION_* symbols.
8032 * mpn/x86_64/aors_err1_n.asm: New file.
8033 * mpn/x86_64/aors_err2_n.asm: Likewise.
8034 * mpn/x86_64/aors_err3_n.asm: Likewise.
8035 * mpn/x86_64/mulmid_basecase.asm: Likewise.
8036 * mpn/x86_64/core2/aors_err1_n.asm: Likewise.
8037 * mpn/x86_64/gmp-mparam.h (MULMID_TOOM42_THRESHOLD): New value.
8038 * mpn/x86_64/core2/gmp-mparam.h (MULMID_TOOM42_THRESHOLD): Likewise.
8039
8040 Tuning of mulmid, from David Harvey:
8041 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Added mulmid.c
8042 mulmid_n.c toom42_mulmid.c.
8043 * tune/speed.h: Prototypes for mulmid-related functions.
8044 (struct speed_params): Increased max number of sources to 5.
8045 (SPEED_ROUTINE_MPN_BINARY_ERR_N_CALL): New macro.
8046 (SPEED_ROUTINE_MPN_BINARY_ERR1_N): Likewise.
8047 (SPEED_ROUTINE_MPN_BINARY_ERR2_N): Likewise.
8048 (SPEED_ROUTINE_MPN_BINARY_ERR3_N): Likewise.
8049 (SPEED_ROUTINE_MPN_MULMID): Likewise.
8050 (SPEED_ROUTINE_MPN_MULMID_N): Likewise.
8051 (SPEED_ROUTINE_MPN_TOOM42_MULMID): Likewise.
8052 * tune/common.c (mpn_[add,sub]_err[1,2,3]_n): New functions.
8053 (speed_mpn_mulmid_basecase): New function.
8054 (speed_mpn_mulmid): New function.
8055 (speed_mpn_mulmid_n): New function.
8056 (speed_mpn_toom42_mulmid): New function.
8057 * tune/speed.c (routine): Added mpn_[add,sub]_err[1,2,3]_n,
8058 mpn_mulmid_basecase, mpn_toom42_mulmid, mpn_mulmid_n, and
8059 mpn_mulmid.
8060 * tune/tuneup.c (mulmid_toom42_threshold): New threshold variable.
8061 (tune_mulmid): New function.
8062 (all): Call tune_mulmid.
8063
8064 Testing of mulmid, from David Harvey:
8065 * tests/refmpn.c (AORS_ERR1_N): New macro.
8066 (refmpn_add_err1_n, refmpn_sub_err1_n): New functions.
8067 (AORS_ERR2_N): New macro.
8068 (refmpn_add_err2_n, refmpn_sub_err2_n): New functions.
8069 (AORS_ERR3_N): New macro.
8070 (refmpn_add_err3_n, refmpn_sub_err3_n): New functions.
8071 (refmpn_mulmid_basecase): New function.
8072 (refmpn_toom42_mulmid): New function, wrapper for
8073 refmpn_mulmid_basecase.
8074 (refmpn_mulmid_n): Likewise.
8075 (refmpn_mulmid): Likewise.
8076 * tests/tests.h: Prototypes for new functions.
8077 * tests/devel/try.c (NUM_SOURCES): Increased to 5.
8078 (struct try_t): Use NUM_SOURCES and NUM_DESTS constants.
8079 (SIZE_4, SIZE_6, SIZE_DIFF_PLUS_3, SIZE_ODD): New constants.
8080 (OVERLAP_NOT_DST2): New flag.
8081 (param_init): New mulmid-related operation types.
8082 (mpn_toom42_mulmid_fun): New function.
8083 (choice_array): Added mulmid-related entries.
8084 (overlap_array): Extended for larger NUM_SOURCES.
8085 (OVERLAP_COUNT): Handle OVERLAP_NOT_DST2.
8086 (call): Support mulmid-related functions.
8087 (pointer_setup): Handle SIZE_4, SIZE_6, and SIZE_DIFF_PLUS_3.
8088 (SIZE_ITERATION): Handle SIZE_ODD.
8089 (SIZE2_FIRST): Handle SIZE_CEIL_HALF.
8090 (SIZE2_LAST): Likewise.
8091
8092 Implementation of mulmid, from David Harvey:
8093 * mpn/generic/add_err1_n.c (mpn_add_err1_n): New file and function.
8094 * mpn/generic/add_err2_n.c (mpn_add_err2_n): Likewise.
8095 * mpn/generic/add_err3_n.c (mpn_add_err3_n): Likewise.
8096 * mpn/generic/sub_err1_n.c (mpn_sub_err1_n): Likewise.
8097 * mpn/generic/sub_err2_n.c (mpn_sub_err2_n): Likewise.
8098 * mpn/generic/sub_err3_n.c (mpn_sub_err3_n): Likewise.
8099 * mpn/generic/mulmid_basecase.c (mpn_mulmid_basecase): Likewise.
8100 * mpn/generic/mulmid_n.c (mpn_mulmid_n): Likewise.
8101 * mpn/generic/toom42_mulmid.c (mpn_toom42_mulmid): Likewise.
8102 * configure.in (gmp_mpn_functions): Added mulmid-related
8103 functions.
8104 (GMP_MULFUNC_CHOICES): Handle aors_err1_n, aors_err2_n, and
8105 aors_err3_n.
8106 * gmp-impl.h: Added prototypes for mulmid functions.
8107 (MPN_TOOM42_MULMID_MINSIZE): New constant.
8108 (MULMID_TOOM42_THRESHOLD): New threshold.
8109 (mpn_toom42_mulmid_itch): New macro.
8110
8111 2011-10-03 Niels Möller <[email protected]>
8112
8113 * tune/tune-gcd-p.c (main): Fixed broken loop conditions.
8114
8115 2011-09-26 Torbjorn Granlund <[email protected]>
8116
8117 * mpn/sh/sh2/submul_1.asm: Make this old submul_1 implementation
8118 actually compute intended function.
8119
8120 * longlong.h (SH): Recognise predefs for all SH processors as defined
8121 by current gcc versions.
8122
8123 2011-09-25 Torbjorn Granlund <[email protected]>
8124
8125 * mpn/sh: Migrate files to '.asm'.
8126 * configure.in: Recognise sh3 and sh4.
8127
8128 2011-09-21 Marc Glisse <[email protected]>
8129
8130 * gmpxx.h (mpz_class::swap): New function.
8131 (mpq_class::swap): Likewise.
8132 (mpf_class::swap): Likewise.
8133 (swap): New function.
8134 * tests/cxx/t-assign.cc: Test the above.
8135 * doc/gmp.texi (swap): Document the above.
8136
8137 2011-08-21 Marc Glisse <[email protected]>
8138
8139 * tests/cxx/t-ops2.cc: check mul-div by 2.
8140
8141 * gmpxx.h (__GMPXX_CONSTANT): New macro (__builtin_constant_p).
8142 (__gmp_binary_lshift): Move before multiplication. Optimize x << 0.
8143 (__gmp_binary_rshift): Move before division. Optimize x >> 0.
8144 (__gmp_binary_plus): Optimize x + 0. Rewrite rational + integer.
8145 (__gmp_binary_minus): Optimize x - 0 and 0 - x.
8146 Rewrite rational - integer.
8147 (__gmp_binary_multiplies): Optimize x * 2^n.
8148 (__gmp_binary_divides): Optimize x / 2^n.
8149 (__gmp_binary_*): Deduplicate code for symmetric operations.
8150
8151 2011-08-18 Torbjorn Granlund <[email protected]>
8152
8153 * printf/doprntf.c (__gmp_doprnt_mpf): For DOPRNT_CONV_FIXED, ask for
8154 one more digit.
8155
8156 2011-08-17 Torbjorn Granlund <[email protected]>
8157
8158 * mpf/sub.c: Fix typo in copy condition. Delay an allocation.
8159
8160 2011-08-12 Torbjorn Granlund <[email protected]>
8161
8162 * gmp-impl.h (LIMBS_PER_DIGIT_IN_BASE): Fix typo.
8163
8164 2011-08-10 Torbjorn Granlund <[email protected]>
8165
8166 * gmp-impl.h (DIGITS_IN_BASEGT2_FROM_BITS): New.
8167 (DIGITS_IN_BASE_FROM_BITS): Compute more accurate result.
8168 (MPN_SIZEINBASE): Use DIGITS_IN_BASEGT2_FROM_BITS.
8169
8170 * tests/rand/t-lc2exp.c (check_bigc): Call abort after reporting error.
8171
8172 2011-08-09 Torbjorn Granlund <[email protected]>
8173
8174 * mpz/out_str.c (mpz_out_str): Reinsert accidentally deleted str_size
8175 adjustment.
8176
8177 * gmp-impl.h (DIGITS_IN_BASE_FROM_BITS): Simplify, also avoiding
8178 overflow for base 2.
8179
8180 2011-08-07 Torbjorn Granlund <[email protected]>
8181
8182 * gmp-impl.h (struct bases): Add log2b and logb2 field, remove
8183 chars_per_limb_exactly field.
8184 (DIGITS_IN_BASE_FROM_BITS): New.
8185 (DIGITS_IN_BASE_PER_LIMB): New.
8186 (LIMBS_PER_DIGIT_IN_BASE): New.
8187 * gen-bases.c: Generate log2b and logb2 fields; do not generate
8188 chars_per_limb_exactly field.
8189 * mpf/get_str.c mpf/out_str.c mpf/set_str.c mpn/generic/get_str.c
8190 mpn/generic/sizeinbase.c mpq/get_str.c mpz/inp_str.c mpz/out_str.c
8191 mpz/set_str.c printf/doprntf.c tune/speed.h tune/tuneup.c:
8192 Use new macros.
8193
8194 2011-08-04 Torbjorn Granlund <[email protected]>
8195
8196 * dumbmp.c (mpz_root): Reinsert accidentally removed line.
8197
8198 2011-08-03 Torbjorn Granlund <[email protected]>
8199
8200 * dumbmp.c (mpz_tdiv_qr): Correctly handle dividend value being equal
8201 to divisor value.
8202 (mpz_root): Create reasonable starting approximation.
8203 (mpz_sqrt): New function.
8204 (mpz_mul_2exp): Add faster block shifting code, disabled for now.
8205
8206 2011-07-15 Torbjorn Granlund <[email protected]>
8207
8208 * mpn/arm/invert_limb.asm: Swap around some registers to silence 'as'
8209 warnings.
8210
8211 2011-07-14 Torbjorn Granlund <[email protected]>
8212
8213 * mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q): Get mpn_sub_1 size
8214 argument right.
8215
8216 2011-07-04 Torbjorn Granlund <[email protected]>
8217
8218 * tests/misc/t-locale.c: Disable test for mingw.
8219
8220 * configure.in (x86_64 *-*-mingw*): Handle also cygwin here; clear out
8221 extra_functions_64.
8222
8223 2011-07-02 Torbjorn Granlund <[email protected]>
8224
8225 * config.guess: Don't print newline in x86 cpuid function.
8226 Rewrite x86-64 cpu recognition asm code to work under Windoze.
8227
8228 2011-06-16 Torbjorn Granlund <[email protected]>
8229
8230 * acinclude.m4 (GMP_ASM_RODATA): Fix typo in 2011-04-20 change.
8231
8232 * configure.in: Surround tr ranges with [] for portability.
8233
8234 2011-05-25 Niels Möller <[email protected]>
8235
8236 * tune/tune-gcd-p.c (search): New function to search for minimum.
8237 (main): Replaced slow linear search.
8238
8239 2011-05-24 Niels Möller <[email protected]>
8240
8241 * tune/Makefile.am (EXTRA_PROGRAMS): Added tune-gcd-p. Also added
8242 related automake variables.
8243
8244 * mpn/Makefile.am (tune-gcd-p): Deleted target.
8245
8246 * tune/tune-gcd-p.c: New file, extracted from mpn/generic/gcd.c
8247 and updated.
8248 * mpn/generic/gcd.c: Deleted the corresponding code, including
8249 main function.
8250
8251 2011-05-23 Niels Möller <[email protected]>
8252
8253 * mpz/jacobi.c (mpz_jacobi): Simplified by swapping operands when
8254 needed, to get asize >= bsize. Use the reciprocity law generalized
8255 to work when one operand is even.
8256
8257 2011-05-22 Niels Möller <[email protected]>
8258
8259 * mpz/jacobi.c (mpz_jacobi): Another bugfix for the asize == 1
8260 case. Sometimes, powers of two in b were taken into account twice.
8261
8262 2011-05-21 Niels Möller <[email protected]>
8263
8264 * mpz/jacobi.c (mpz_jacobi): The handling of asize == 1 was
8265 broken. Rewrote it.
8266
8267 * tests/mpz/t-jac.c (mpz_nextprime_step): Sanity check that prime
8268 candidate and step has no common factor.
8269 (check_data): Added some test cases related to the asize == 1 case
8270 in mpz_jacobi.
8271
8272 2011-05-20 Niels Möller <[email protected]>
8273
8274 * gmp-impl.h: Jacobi-related prototypes.
8275
8276 * configure.in (gmp_mpn_functions): Added jacobi_2, jacobi,
8277 hgcd2_jacobi, hgcd_jacobi, and removed jacobi_lehmer.
8278
8279 * mpz/jacobi.c (STRIP_TWOS): Deleted macro.
8280 (mpz_jacobi): Partially rewritten, to no longer makes the A
8281 operand odd. Use new mpn_jacobi_n.
8282
8283 * mpn/generic/jacobi_lehmer.c: Deleted file.
8284
8285 * mpn/generic/jacobi.c (mpn_jacobi_n): New subquadratic jacobi
8286 implementation. Supersedes jacobi_lehmer.c.
8287
8288 * mpn/generic/hgcd_jacobi.c (mpn_hgcd_jacobi): New file and
8289 function. A copy of mpn_hgcd, using mpn_hgcd2_jacobi, and with calls to
8290 mpn_jacobi_update when appropriate.
8291
8292 * mpn/generic/jacobi_2.c (mpn_jacobi_2): New file. Extracted from
8293 jacobi_lehmer.c.
8294 * mpn/generic/hgcd2_jacobi.c (mpn_hgcd2_jacobi): Likewise.
8295
8296 * mpn/generic/hgcd.c (hgcd_hook): Avoid using NULL.
8297
8298 2011-05-19 Niels Möller <[email protected]>
8299
8300 * tune/hgcd_lehmer.c (__gmpn_hgcd_itch): Don't rename symbols for
8301 the functions moved to hgcd_matrix.c.
8302
8303 * configure.in (gmp_mpn_functions): Added hgcd_matrix.
8304
8305 * mpn/generic/hgcd.c (hgcd_matrix_update_1): Deleted. Several other
8306 helper functions moved to hgcd_matrix.c, see below.
8307 (hgcd_hook): New function.
8308 (hgcd_step): Simplified, using mpn_gcd_subdiv_step and hgcd_hook.
8309
8310 * mpn/generic/hgcd_matrix.c: New file.
8311 (mpn_hgcd_matrix_init): Moved here, from hgcd.c.
8312 (mpn_hgcd_matrix_update_q): Likewise.
8313 (mpn_hgcd_matrix_mul_1): Likewise.
8314 (mpn_hgcd_matrix_mul): Likewise.
8315 (mpn_hgcd_matrix_adjust): Likewise.
8316
8317 * mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): New
8318 argument s, for use by hgcd.
8319 * gmp-impl.h (mpn_gcd_subdiv_step): Update declaration.
8320
8321 * mpn/generic/gcd.c (mpn_gcd): Pass s = 0 to mpn_gcd_subdiv_step.
8322 * mpn/generic/gcdext.c (mpn_gcdext): Likewise. Also added an ASSERT.
8323 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Likewise.
8324 (mpn_gcdext_hook): Added some ASSERTs.
8325 * mpn/generic/jacobi_lehmer.c (mpn_jacobi_lehmer): Likewise.
8326
8327 2011-05-17 Niels Möller <[email protected]>
8328
8329 * doc/gmp.texi (mpn_gcd, mpn_gcdext): Document input requirements:
8330 Must have un >= vn > 0, and V normalized.
8331 * mpn/generic/gcdext.c (mpn_gcdext): Added ASSERT for input
8332 normalization.
8333 * mpn/generic/gcd.c (mpn_gcd): Added ASSERTs for input
8334 requirements.
8335
8336 2011-05-15 Marc Glisse <[email protected]>
8337
8338 * gmpxx.h (operator<<): Dedup.
8339 * tests/cxx/t-iostream.cc: Test on compound types.
8340
8341 * gmpxx.h (__gmp_binary_expr): Let things happen in place: c=(a+b)/2.
8342
8343 2011-05-10 Marc Glisse <[email protected]>
8344
8345 * gmpxx.h (__gmp_unary_expr): Let things happen in place: c=-(a+b).
8346 (operator>>): Clean the commenting out.
8347 * tests/cxx/t-iostream.cc: New file.
8348 * tests/cxx/Makefile.am: Added t-iostream.
8349
8350 2011-05-10 Niels Möller <[email protected]>
8351
8352 * doc/gmp.texi (mpz_gcd): Document that gcd(0,0) = 0.
8353 (mpz_gcdext): Document range for cofactors.
8354
8355 2011-05-09 Niels Möller <[email protected]>
8356
8357 * mpz/gcdext.c (mpz_gcdext): Increased sp allocation to bsize+1 limbs.
8358 * doc/gmp.texi (mpn_gcdext): Fixed documentation of allocation
8359 requirements; one extra limb is still needed for S.
8360
8361 2011-05-09 Torbjorn Granlund <[email protected]>
8362
8363 * mpn/x86/fat/gmp-mparam.h (BMOD_1_TO_MOD_1_THRESHOLD): Define.
8364 * mpn/x86_64/fat/gmp-mparam.h (BMOD_1_TO_MOD_1_THRESHOLD): Define.
8365
8366 2011-05-08 Marc Glisse <[email protected]>
8367
8368 * gmpxx.h: Replace unsigned long with mp_bitcnt_t in many places.
8369 * doc/gmp.texi: Likewise.
8370
8371 2011-05-06 Marc Glisse <[email protected]>
8372
8373 * gmpxx.h (mpz_class): Make constructor from mp[qf]_class explicit.
8374 (mpq_class): Make constructor from mpf_class explicit.
8375 * doc/gmp.texi: Document the above.
8376 * NEWS: Likewise, and mention the EOF istream fix.
8377 * tests/cxx/t-mix.cc: New file.
8378 * tests/cxx/Makefile.am: Added t-mix.
8379
8380 * tests/cxx/t-assign.cc: Minor tweak.
8381 * tests/cxx/t-misc.cc: Likewise.
8382
8383 * gmpxx.h (__gmp_resolve_temp): Remove.
8384 (__gmp_set_expr): Remove some overloads.
8385 (mpq_class): mpz_init_set the numerator and denominator instead of
8386 mpq_init + mpq_set.
8387 (mpz_class): Dedup the string constructors.
8388 (mpq_class): Likewise.
8389
8390 * tests/cxx/t-ops3.cc: New file.
8391 * tests/cxx/Makefile.am: Added t-ops3.
8392
8393 2011-05-05 Torbjorn Granlund <[email protected]>
8394
8395 * mpz/gcdext.c: Correct sgn computation.
8396 Use MPZ_REALLOC.
8397
8398 2011-05-05 Marc Glisse <[email protected]>
8399
8400 * mpn/x86_64/fat/fat.c: Update for Sandy Bridge.
8401 * config.guess: warning to keep it in sync with fat.c.
8402
8403 2011-05-05 Torbjorn Granlund <[email protected]>
8404
8405 * mpn/x86_64/fat/fat_entry.asm (PIC_OR_DARWIN): New symbol. Use it to
8406 work around Darwin problems.
8407
8408 2011-05-04 Niels Möller <[email protected]>
8409
8410 * mpz/gcdext.c (mpz_gcdext): Reduced temporary allocations. Use
8411 mpz_divexact when computing the second cofactor.
8412
8413 2011-05-03 David Harvey <[email protected]>
8414
8415 * configure.in: make invert_limb_table work correctly with
8416 --disable-assembly (from Niels Möller)
8417
8418 2011-05-02 Marc Glisse <[email protected]>
8419
8420 * .bootstrap: libtoolize doesn't need -c.
8421
8422 * configfsf.guess: Update to version of 2011-02-02.
8423 * configfsf.sub: Update to version of 2011-03-23.
8424
8425 2011-05-02 Niels Möller <[email protected]>
8426
8427 * mpz/gcdext.c (mpz_gcdext): Don't allocate extra limbs at the end
8428 of mpn_gcdext parameters.
8429
8430 * doc/gmp.texi (mpn_gcdext): Updated doc.
8431
8432 2011-05-01 Niels Möller <[email protected]>
8433
8434 * mpn/generic/div_qr_2u_pi1.c (mpn_div_qr_2u_pi1): Fixed ASSERT.
8435
8436 2011-04-30 Marc Glisse <[email protected]>
8437
8438 * gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition
8439 and the documentation.
8440 (mpz_remove): Likewise.
8441 (mpf_eq): Likewise.
8442
8443 * ltmain.sh: Remove.
8444 * .bootstrap: Let libtoolize generate ltmain.sh.
8445
8446 * tests/cxx/t-ops2.cc: Add a couple tests.
8447 * tests/cxx/t-rand.cc: Likewise.
8448
8449 * doc/gmp.texi (mpf_urandomb): Explicit the fact that it does not
8450 change the precision.
8451
8452 * gmp-h.in (__GMP_EXTERN_INLINE): Recent g++ uses gnu_inline.
8453
8454 2011-04-28 Torbjorn Granlund <[email protected]>
8455
8456 * configure.in (x86_64): Support bobcat specifically.
8457 (x86): Match bobcat and bulldozer, handle like k10.
8458
8459 2011-04-28 David Harvey <[email protected]>
8460
8461 * README.HG: update autotools version numbers.
8462
8463 2011-04-27 Torbjorn Granlund <[email protected]>
8464
8465 * tune/speed.h (speed_cyclecounter): Always use PIC variant when
8466 compiled with Apple's GCC.
8467
8468 * mpn/x86/darwin.m4 (LEA): Complete rewrite.
8469 (m4append): New macro.
8470
8471 2011-04-26 Torbjorn Granlund <[email protected]>
8472
8473 * mpn/sparc32/sparc-defs.m4 (changecom): Don't redefine '!' as it
8474 interferes with expressions.
8475
8476 2011-04-20 Torbjorn Granlund <[email protected]>
8477
8478 * acinclude.m4 (GMP_ASM_RODATA): Make 'foo' larger to avoid clang
8479 problems.
8480
8481 2011-04-12 Niels Möller <[email protected]>
8482
8483 * mpn/x86_64/invert_limb.asm [PIC]: Declare mpn_invert_limb_table
8484 as .protected.
8485
8486 2011-04-11 Torbjorn Granlund <[email protected]>
8487
8488 * mpn/x86/k7/invert_limb.asm: Use deflit for Darwin bug workaround.
8489 Undo 2011-03-28 change.
8490
8491 * mpn/asm-defs.m4 (define_mpn): Use deflit.
8492
8493 2011-04-10 Niels Möller <[email protected]>
8494
8495 * mpn/asm-defs.m4 (define_mpn): Added invert_limb_table.
8496
8497 * configure.in: Add invert_limb_table to extra_functions_64 on
8498 x86_64.
8499
8500 * mpn/x86_64/invert_limb.asm: Changed references from approx_tab
8501 mpn_invert_limb_table.
8502
8503 * mpn/x86_64/invert_limb_table.asm (mpn_invert_limb_table): New
8504 file. Extracted approximation table from invert_limb.asm, renamed
8505 and made global.
8506
8507 2011-03-30 Niels Möller <[email protected]>
8508
8509 * mpn/x86_64/div_qr_2u_pi1.asm: New file.
8510
8511 * configure.in (gmp_mpn_functions): Add div_qr_2u_pi1.
8512
8513 * gmp-impl.h (mpn_div_qr_2u_pi1): Declare.
8514
8515 * mpn/generic/div_qr_2u_pi1.c (mpn_div_qr_2u_pi1): Moved to
8516 separate file, from...
8517 * mpn/generic/div_qr_2.c: ... old location.
8518
8519 * mpn/generic/div_qr_2n_pi1.c: Renamed file, from...
8520 * mpn/generic/div_qr_2_pi1_norm.c: ...old name.
8521 * mpn/x86_64/div_qr_2n_pi1.asm: Renamed file, from...
8522 * mpn/x86_64/div_qr_2_pi1_norm.asm: ...old name.
8523
8524 * gmp-impl.h (mpn_div_qr_2n_pi1): Use new name in declaration.
8525 * tune/speed.h (speed_mpn_div_qr_2n): Likewise.
8526 (speed_mpn_div_qr_2u): Likewise.
8527
8528 * tune/tuneup.c (tune_div_qr_2): Use new name speed_mpn_div_qr_2n.
8529
8530 * tune/speed.c (routine): Use new names mpn_div_qr_2n and
8531 mpn_div_qr_2u, also on the command line.
8532
8533 * tune/common.c (speed_mpn_div_qr_2n): Renamed, from...
8534 (speed_mpn_div_qr_2_norm): ... old name.
8535 (speed_mpn_div_qr_2u): Renamed, from...
8536 (speed_mpn_div_qr_2_unnorm): ... old name.
8537
8538 * mpn/generic/div_qr_2_pi1_norm.c (mpn_div_qr_2n_pi1): Renamed,
8539 from...
8540 (mpn_div_qr_2_pi1_norm): ...old name.
8541 * mpn/x86_64/div_qr_2_pi1_norm.asm: Likewise.
8542
8543 * mpn/generic/div_qr_2.c (mpn_div_qr_2n_pi2): Renamed, from...
8544 (mpn_div_qr_2_pi2_norm): ... old name.
8545 (mpn_div_qr_2u_pi1): Renamed, from...
8546 (mpn_div_qr_2_pi1_unnorm): ... old name.
8547 (mpn_div_qr_2): Call functions using new names.
8548
8549 * mpn/asm-defs.m4: Renamed div_qr_2-functions to new names.
8550
8551 2011-03-29 Niels Möller <[email protected]>
8552
8553 * mpn/x86_64/div_qr_2_pi1_norm.asm: Updated to use a separate rp
8554 argument.
8555
8556 * gmp-impl.h (mpn_div_qr_2_pi1_norm): Updated declaration.
8557 * gmp-h.in (mpn_div_qr_2): Likewise.
8558
8559 * tests/mpn/t-div.c (main): Adapted to new mpn_div_qr2 interface.
8560 * tune/speed.h (SPEED_ROUTINE_MPN_DIV_QR_2): Likewise.
8561
8562 * mpn/generic/div_qr_2.c (mpn_div_qr_2_pi2_norm): Added rp
8563 argument. Don't clobber the input dividend.
8564 (mpn_div_qr_2_pi1_unnorm): Likewise.
8565 (mpn_div_qr_2): Likewise.
8566 * mpn/generic/div_qr_2_pi1_norm.c (mpn_div_qr_2_pi1_norm): Likewise.
8567
8568 2011-03-29 Niels Möller <[email protected]>
8569
8570 * mpn/x86/k7/invert_limb.asm: Use mov rather than push and pop.
8571 Earlier load of divisor from stack.
8572
8573 2011-03-28 Torbjorn Granlund <[email protected]>
8574
8575 * mpn/x86/k7/invert_limb.asm: Protect movzwl register parameters from
8576 being interpreted as m4 macro parameters.
8577
8578 2011-03-22 Niels Möller <[email protected]>
8579
8580 * mpn/x86_64/div_qr_2_pi1_norm.asm: Copied optimized inner loop
8581 from divrem_2.asm.
8582
8583 * mpn/x86_64/div_qr_2_pi1_norm.asm: First working, but poorly
8584 optimized, implementation.
8585
8586 * mpn/asm-defs.m4 (define_mpn): Added div_qr_2_pi[12]_*norm.
8587
8588 * mpn/generic/div_qr_2_pi1_norm.c (mpn_div_qr_2_pi1_norm): Moved
8589 to separate file, from...
8590 * mpn/generic/div_qr_2.c: ... old location.
8591
8592 * gmp-impl.h (mpn_div_qr_2_pi1_norm): Declare.
8593
8594 * configure.in (gmp_mpn_functions): Added div_qr_2_pi1_norm.
8595
8596 2011-03-22 Torbjorn Granlund <[email protected]>
8597
8598 * configure.in (powerpc): Reinsert lost AIX cpu_path 32-bit handling.
8599 Reinsert lost linux/bsd cpu_path handling.
8600
8601 * mpn/generic/mod_1_1.c: Disable powerpc asm for _LONG_LONG_LIMB.
8602 * mpn/generic/div_qr_2.c: Likewise.
8603
8604 * mpn/generic/div_qr_2.c: Use asm just for gcc.
8605 Make powerpc add_sssaaaa work for 32-bit case, and use less strict
8606 constraints.
8607
8608 2011-03-21 Niels Möller <[email protected]>
8609
8610 * tune/tuneup.c (div_qr_2_pi2_threshold): New global variable.
8611 (tune_div_qr_2): New function.
8612 (all): Call tune_div_qr_2.
8613
8614 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Added div_qr_2.c.
8615
8616 * gmp-impl.h (DIV_QR_2_PI2_THRESHOLD): Setup for tuning.
8617
8618 New 4/2 division loop, based on Torbjörn's work:
8619 * mpn/generic/div_qr_2.c (add_sssaaaa, add_csaac): New macros.
8620 (udiv_qr_4by2): New macro.
8621 (invert_4by2): New function.
8622 (mpn_div_qr_2_pi2_norm): New function.
8623 (DIV_QR_2_PI2_THRESHOLD): New threshold.
8624 (mpn_div_qr_2_pi1_norm): Renamed, from...
8625 (mpn_div_qr_2_norm): ... old name.
8626 (mpn_div_qr_2_pi1_unnorm): Renamed, from...
8627 (mpn_div_qr_2_unnorm): ... old name.
8628 (mpn_div_qr_2): Use mpn_div_qr_2_pi2_norm for large enough
8629 normalized divisors.
8630
8631 * gmp-impl.h (udiv_qr_3by2): Avoid a copy.
8632
8633 2011-03-21 Torbjorn Granlund <[email protected]>
8634
8635 * configure.in (hppa): Under linux, treat 64-bit processors as if they
8636 were 32-bit processors.
8637
8638 * mpn/generic/addcnd_n.c: New file.
8639 * mpn/asm-defs.m4 (define_mpn): Add addcnd_n and subcnd_n.
8640 * configure.in (gmp_mpn_functions): Add addcnd_n.
8641 * gmp-impl.h (mpn_addcnd_n): Declare.
8642
8643 * mpn/generic/subcnd_n.c: Combine nails and non-nails functions.
8644
8645 * gmp-impl.h (invert_pi1): Prepend _ to local variables, protect
8646 parameters within () where necessary.
8647
8648 * mpn/asm-defs.m4 (define_mpn): Add div_qr_2.
8649 * configure.in (gmp_mpn_functions): Reinsert mercurial-bug-removed
8650 line.
8651
8652 2011-03-20 Torbjorn Granlund <[email protected]>
8653
8654 * configure.in (powerpc): Add cpu_path for all three ABIs.
8655 Rename "aix64" to "mode64" for consistency.
8656
8657 2011-03-16 Marc Glisse <[email protected]>
8658
8659 * gmpxx.h (__gmp_binary_not_equal): Remove, use !__gmp_binary_equal.
8660 (__gmp_binary_less_equal): Remove, use !__gmp_binary_greater.
8661 (__gmp_binary_greater_equal): Remove, use !__gmp_binary_less.
8662 * tests/cxx/t-ops2.cc: Typo.
8663
8664 2011-03-20 Niels Möller <[email protected]>
8665
8666 * tune/common.c (speed_mpn_div_qr_2_norm): New function.
8667 (speed_mpn_div_qr_2_unnorm): New function.
8668 * tune/speed.c (routine): Recognize above functions.
8669 * tune/speed.h: Declarations for above functions.
8670 (SPEED_ROUTINE_MPN_DIV_QR_2): New macro.
8671
8672 * tests/mpn/t-div.c (main): Added tests for mpn_divrem_2 and
8673 mpn_div_qr_2.
8674
8675 * mpn/generic/div_qr_2.c (mpn_div_qr_2): New file and function.
8676 Intended to eventually replace divrem_2.
8677 * configure.in (gmp_mpn_functions): Add div_qr_2.
8678
8679 2011-03-16 Marc Glisse <[email protected]>
8680
8681 * gmpxx.h (__gmp_set_expr): Remove broken declarations.
8682
8683 2011-03-19 Torbjorn Granlund <[email protected]>
8684
8685 * mpz/fac_ui.c (mpz_fac_ui): Use MPZ_REALLOC for standard, conditional
8686 reallocation.
8687
8688 2011-03-19 Niels Möller <[email protected]>
8689
8690 * mpn/generic/divrem_2.c (mpn_divrem_2): Fixed comment and assert
8691 regarding q and n overlap.
8692
8693 2011-03-16 Marc Glisse <[email protected]>
8694
8695 * gmpxx.h (__mpz_set_ui_safe): New inline function.
8696 (__mpz_set_si_safe): Likewise.
8697 (__GMPXX_TMPZ_UI): Use the new function.
8698 (__GMPXX_TMPZ_SI): Likewise.
8699 (__GMPXX_TMPQ_UI): Likewise.
8700 (__GMPXX_TMPQ_SI): Likewise.
8701 * tests/cxx/t-ops2.cc: test converting 0 to stack mpq_t.
8702
8703 2011-03-15 Marc Glisse <[email protected]>
8704
8705 * gmpxx.h (__GMPXX_TMPQ_UI): New macro.
8706 (__GMPXX_TMPQ_SI): New macro.
8707 (struct __gmp_binary_multiplies): Rewrite, using the new macros.
8708 (struct __gmp_binary_divides): Likewise.
8709
8710 * gmpxx.h (__GMPZ_ULI_LIMBS): Rewrite.
8711 * tests/cxx/t-ops2.cc: test converting ULONG_MIN to stack mpq_t.
8712
8713 2011-03-15 Marco Bodrato <[email protected]>
8714
8715 * mpn/generic/toom_interpolate_16pts.c: Remove ambiguity.
8716
8717 2011-03-14 Torbjorn Granlund <[email protected]>
8718
8719 * tune/tuneup.c (tune_mul): Set tuning min size considering print skew.
8720
8721 * doc/gmp.texi: Make reference to "Formatted I/O" chapters from type
8722 specific I/O sections.
8723
8724 * mpn/alpha/add_n.asm: Add _nc entry point.
8725 * mpn/alpha/sub_n.asm: Likewise.
8726 * mpn/mips64/add_n.asm: Likewise.
8727 * mpn/mips64/sub_n.asm: Likewise.
8728 * mpn/sparc64/ultrasparc1234/add_n.asm: Likewise.
8729 * mpn/sparc64/ultrasparc1234/sub_n: Likewise.
8730
8731 2011-03-13 Marc Glisse <[email protected]>
8732
8733 * tests/cxx/t-ops2.cc: New file.
8734 * tests/cxx/Makefile.am: Added t-ops2.
8735
8736 2011-03-13 Torbjorn Granlund <[email protected]>
8737
8738 * mpn/generic/toom32_mul.c (mpn_toom32_mul): Make 'hi' be limb-sized
8739 for better code.
8740
8741 * gmp-impl.h (MPN_IORD_U): Handle x86_64 as well as x86_32. Generate
8742 no code for incrementing by constant 0.
8743
8744 2011-03-12 Marc Glisse <[email protected]>
8745
8746 * gmpxx.h: Rename __GMPXX_TMP_* to __GMPXX_TMPZ_*. Use in more places.
8747
8748 2011-03-12 Torbjorn Granlund <[email protected]>
8749
8750 * mpn/powerpc64/rshift.asm: Accept/return values correctly also for
8751 32-bit ABI.
8752 * mpn/powerpc64/lshift.asm: Likewise.
8753
8754 * tune/powerpc.asm: Use powerpc syntax, not power syntax.
8755
8756 * tune/common.c (speed_udiv_qrnnd_preinv1, etc): Remove.
8757 * tune/speed.c (routine): Remove udiv_qrnnd_preinv1, etc.
8758
8759 2011-03-12 Marc Glisse <[email protected]>
8760
8761 * tests/cxx/t-istream.cc: Restrict mpq test in t-istream -s.
8762
8763 * gmpxx.h: Remove leftover #undefs.
8764
8765 2011-03-11 Torbjorn Granlund <[email protected]>
8766
8767 * gmp-impl.h (udiv_qrnnd_preinv1, udiv_qrnnd_preinv2,
8768 udiv_qrnnd_preinv2gen): Remove obsolete macros.
8769 (udiv_qrnnd_preinv): New name for udiv_qrnnd_preinv3.
8770
8771 2011-03-11 Marco Bodrato <[email protected]>
8772
8773 * gmp-impl.h: Declare many mpn_{sub,add}lsh*_n_ip[12] functions/macros.
8774 * mpn/generic/toom_interpolate_5pts.c: Use mpn_sublsh1_n_ip1.
8775
8776 * tests/devel/try.c: Tests for {add,sub}lsh*_n_ip[12].
8777 * tests/refmpn.c: New reference for mpn_{add,sub}lsh*_n_ip[12].
8778 * tests/tests.h: Declarations for reference functions above.
8779
8780 * tune/common.c: New speed_mpn_{add,sub}lsh*_n_ip[12] functions.
8781 * tune/speed.h: Prototypes for functions above.
8782 * tune/speed.c: Support for mpn_{add,sub}lsh*_n_ip[12].
8783
8784 * mpn/x86/k7/sublsh1_n.asm: Replaced generic sublsh1 code with faster _ip1.
8785 * mpn/x86/atom/sublsh1_n.asm: Changed PROLOGUE accordingly.
8786
8787 * configure.in: Define HAVE_NATIVE_mpn_addlsh*_n*_ip[12].
8788 * mpn/asm-defs.m4: Declare mpn_addlsh*_n*_ip[12].
8789
8790 2011-03-10 Marc Glisse <[email protected]>
8791
8792 * tests/cxx/t-istream.cc: Explicit conversion to streampos.
8793
8794 2011-03-10 Torbjorn Granlund <[email protected]>
8795
8796 * mpn/x86/atom/sse2/mul_basecase.asm: Suppress wind-down rp updates.
8797
8798 * Move new aorrlsh_n.asm to new k8 dir. Revert
8799 mpn/x86_64/aorrlsh_n.asm.
8800 * configure.in: Setup path for new k8 directory.
8801
8802 2011-03-10 Marco Bodrato <[email protected]>
8803
8804 * mpn/x86/pentium4/sse2/bdiv_dbm1c.asm: New file, was in atom.
8805 * mpn/x86/atom/sse2/bdiv_dbm1c.asm: Grab file above.
8806
8807 2011-03-09 Torbjorn Granlund <[email protected]>
8808
8809 * mpn/x86_64/aorrlsh_n.asm: Complete rewrite.
8810
8811 * mpn/x86_64/core2/aorrlsh_n.asm: New file, grabbing another asm file.
8812
8813 2011-03-09 Marc Glisse <[email protected]>
8814
8815 * tests/cxx/t-ostream.cc: Use bool instead of int.
8816 * tests/cxx/t-istream.cc: Likewise.
8817 * tests/cxx/t-misc.cc: Likewise.
8818
8819 * cxx/ismpznw.cc: Don't clear eofbit.
8820 * cxx/ismpq.cc: Likewise.
8821 * cxx/ismpf.cc: Likewise.
8822 * tests/cxx/t-istream.cc: Test accordingly.
8823
8824 2011-03-09 Marco Bodrato <[email protected]>
8825
8826 * mpn/x86/atom/sse2/bdiv_dbm1c.asm: New file.
8827
8828 2011-03-09 Marc Glisse <[email protected]>
8829
8830 * doc/gmp.texi: Remove void return type from constructors. Document
8831 explicit constructors. Document mpf_class::mpf_class(mpf_t).
8832
8833 2011-03-07 Marco Bodrato <[email protected]>
8834
8835 * mpn/x86/atom/sse2/sqr_basecase.asm: Postponed pushes. Cleaned
8836 outer loop exit.
8837
8838 2011-03-07 Torbjorn Granlund <[email protected]>
8839
8840 * mpn/x86_64/gcd_1.asm: Workaround Oracle assembler bug.
8841
8842 * mpn/x86/atom/sse2/mul_basecase.asm: Replace addmul_1 loops.
8843 Tweak outer loop rp updates.
8844
8845 2011-03-06 Torbjorn Granlund <[email protected]>
8846
8847 * mpn/x86/atom/sse2/sqr_basecase.asm: New file.
8848
8849 2011-03-05 Torbjorn Granlund <[email protected]>
8850
8851 * mpn/x86_64/bdiv_dbm1c.asm: Write proper feed-in code.
8852
8853 2011-03-04 Torbjorn Granlund <[email protected]>
8854
8855 * mpn/x86_64/addmul_2.asm: Rewrite for linear performance.
8856
8857 2011-03-03 Torbjorn Granlund <[email protected]>
8858
8859 * mpn/generic/mod_1_1.c (add_mssaaaa): Canonicalise layout. Add arm
8860 variant. Enable sparc64 code and powerpc code (the latter for 32-bit
8861 and 64-bit).
8862
8863 * mpn/generic/sqrtrem.c (mpn_dc_sqrtrem): Use mpn_addlsh1_n.
8864
8865 * gmp-impl.h (mpn_addlsh_nc, mpn_rsblsh_nc): Declare.
8866 * mpn/asm-defs.m4: Likewise.
8867
8868 * mpn/x86_64/coreisbr/aorrlsh_n.asm: Disable mpn_rsblsh_n due to
8869 carry-in issues.
8870 * mpn/x86_64/coreinhm/aorrlsh_n.asm: Likewise.
8871 * mpn/x86_64/coreisbr/aorrlsh2_n.asm: Likewise.
8872
8873 2011-03-03 Niels Möller <[email protected]>
8874
8875 * mpn/generic/mod_1_1.c (add_mssaaaa): For x86 and x86_64, treat m
8876 as in output operand only. Added sparc32 implementation. Also
8877 added #if:ed out attempts at sparc64 and powerpc64.
8878
8879 * tune/tuneup.c (tune_mod_1): Record result of MOD_1_1P_METHOD
8880 measurement for use by mpn_mod_1_tune. And omit measurement if
8881 mpn_mod_1_1p is native assembly code.
8882
8883 * mpn/generic/mod_1.c (mpn_mod_1_1p) [TUNE_PROGRAM_BUILD]: Macro
8884 to check mod_1_1p_method and call the right function.
8885 (mpn_mod_1_1p_cps) [TUNE_PROGRAM_BUILD]: Likewise.
8886
8887 * gmp-impl.h (MOD_1_1P_METHOD) [TUNE_PROGRAM_BUILD]: Define macro.
8888 (mod_1_1p_method) [TUNE_PROGRAM_BUILD]: Declare variable.
8889
8890 2011-03-02 Torbjorn Granlund <[email protected]>
8891
8892 * mpn/x86_64/coreinhm/aorrlsh_n.asm: New file.
8893 * mpn/x86_64/coreisbr/aorrlsh_n.asm: New file.
8894
8895 2011-03-01 Niels Möller <[email protected]>
8896
8897 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p_cps): Eliminated a neg and
8898 two mov instructions.
8899
8900 * mpn/x86/k7/mod_1_1.asm (mpn_mod_1_1p_cps): Simplified
8901 computation, analogous to recent x86_64/mod_1_1.asm changes.
8902 (mpn_mod_1_1p): Corresponding changes. Don't shift b.
8903
8904 * mpn/sparc64/mod_1_4.c (mpn_mod_1s_4p_cps): Use udiv_rnnd_preinv
8905 rather than udiv_rnd_preinv.
8906 (mpn_mod_1s_4p): Likewise.
8907
8908 2011-03-01 Torbjorn Granlund <[email protected]>
8909
8910 * mpn/x86/pentium4/sse2/mul_1.asm: Swap entry insns to share more code
8911 between entry points.
8912 * mpn/x86/pentium4/sse2/addmul_1.asm: Likewise.
8913
8914 * mpz/divegcd.c: Rewrite, as per Marc Glisse's suggestion. Also fix
8915 problem with passing a longlong limb to a _ui function.
8916
8917 * gmp-impl.h (udiv_qrnnd_preinv3): Cast truth value to mask's type.
8918 (udiv_rnnd_preinv): Likewise.
8919 * mpn/generic/mod_1_1.c (mpn_mod_1_1p): Likewise.
8920
8921 2011-02-28 Niels Möller <[email protected]>
8922
8923 * mpn/generic/mod_1_1.c (add_mssaaaa): Typo fix, define
8924 add_mssaaaa, not add_sssaaaa.
8925
8926 * tune/tuneup.c (tune_mod_1): Measure mpn_mod_1_1_1 and
8927 mpn_mod_1_1_2, to set MOD_1_1P_METHOD.
8928
8929 * tune/speed.c (routine): Added mpn_mod_1_1_1 and mpn_mod_1_1_2.
8930
8931 * tune/speed.h: Declare speed_mpn_mod_1_1_1, speed_mpn_mod_1_1_2,
8932 mpn_mod_1_1p_1, mpn_mod_1_1p_2, mpn_mod_1_1p_cps_1, and
8933 mpn_mod_1_1p_cps_2.
8934
8935 * tune/common.c (speed_mpn_mod_1_1_1): New function.
8936 (speed_mpn_mod_1_1_2): New function.
8937
8938 * tune/Makefile.am (libspeed_la_SOURCES): Added mod_1_1-1.c
8939 mod_1_1-2.c.
8940
8941 * tune/mod_1_1-1.c: New file.
8942 * tune/mod_1_1-2.c: New file.
8943
8944 * mpn/generic/mod_1_1.c: Implemented an algorithm with fewer
8945 multiplications, configured via MOD_1_1P_METHOD.
8946
8947 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p_cps): Simplified
8948 computation of B2modb, use B^2 mod (normalized b).
8949 (mpn_mod_1_1p): Corresponding changes. Don't shift b.
8950
8951 * mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Use udiv_rnnd_preinv rather
8952 than udiv_rnd_preinv.
8953 (mpn_mod_1_1p): Likewise.
8954 * mpn/generic/mod_1_4.c: Analogous changes.
8955 * mpn/generic/mod_1_3.c: Analogous changes.
8956 * mpn/generic/mod_1_2.c: Analogous changes.
8957 * mpn/generic/mod_1.c: Analogous changes.
8958 * mpn/generic/pre_mod_1.c: Analogous changes.
8959
8960 * gmp-impl.h (udiv_qrnnd_preinv3): Eliminated unpredictable branch
8961 using masking logic. Further optimization of the nl == constant 0
8962 case, similar to udiv_rnd_preinv.
8963 (udiv_rnnd_preinv): Likewise.
8964 (udiv_rnd_preinv): Deleted, use udiv_rnnd_preinv with nl == 0
8965 instead.
8966
8967 * tests/mpn/t-divrem_1.c (check_data): Added testcase to exercise
8968 the nl == constant 0 special case in udiv_qrnnd_preinv3.
8969
8970 2011-02-28 Torbjorn Granlund <[email protected]>
8971
8972 * mpn/generic/rootrem.c (mpn_rootrem): Combine two similar scalar
8973 divisions. Misc minor cleanup.
8974
8975 * mpn/x86/atom/sse2/aorsmul_1.asm: Shorten software pipeline.
8976
8977 * mpn/x86/atom/mul_basecase.asm: Remove file no longer used.
8978
8979 * mpn/generic/rootrem.c (mpn_rootrem_internal): Delay O(log(U))
8980 allocations until they are known to be needed.
8981
8982 2011-02-27 Marco Bodrato <[email protected]>
8983
8984 * mpn/x86/atom/sse2/mul_1.asm: New code.
8985
8986 2011-02-27 Niels Möller <[email protected]>
8987
8988 * gmp-impl.h (udiv_rnnd_preinv): New macro.
8989
8990 2011-02-27 Torbjorn Granlund <[email protected]>
8991
8992 * mpn/x86/atom/sse2/mul_basecase.asm: New file.
8993
8994 2011-02-26 Marco Bodrato <[email protected]>
8995
8996 * mpn/x86/atom/sse2/aorsmul_1.asm: Optimise non-loop code.
8997
8998 2011-02-26 Torbjorn Granlund <[email protected]>
8999
9000 * mpn/powerpc64/mode64/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
9001 * mpn/m68k/mc68020/aorsmul_1.asm: Likewise.
9002
9003 2011-02-25 Torbjorn Granlund <[email protected]>
9004
9005 * mpn/x86/atom/sse2/aorsmul_1.asm: New file.
9006 * mpn/x86/atom/aorsmul_1.asm: File removed.
9007
9008 2011-02-25 Marco Bodrato <[email protected]>
9009
9010 * mpn/x86/atom/sse2/divrem_1.asm: New file (was in x86/atom).
9011 * mpn/x86/atom/sse2/mul_1.asm: Likewise.
9012 * mpn/x86/atom/sse2/popcount.asm: Likewise.
9013 * mpn/x86/atom/divrem_1.asm: ReMoved (in sse2/ now).
9014 * mpn/x86/atom/mul_1.asm: Likewise.
9015 * mpn/x86/atom/popcount.asm: Likewise.
9016
9017 * configure.in: Set up mmx path for atom.
9018 * mpn/x86/atom/mmx/copyd.asm: New file (was in x86/atom).
9019 * mpn/x86/atom/mmx/copyi.asm: Likewise.
9020 * mpn/x86/atom/mmx/hamdist.asm: Likewise.
9021 * mpn/x86/atom/copyd.asm: ReMoved (in mmx/ now).
9022 * mpn/x86/atom/copyi.asm: Likewise.
9023 * mpn/x86/atom/hamdist.asm: Likewise.
9024
9025 2011-02-24 Torbjorn Granlund <[email protected]>
9026
9027 * mpn/x86/atom/sse2/mod_1_1.asm: New file.
9028 * mpn/x86/atom/sse2/mod_1_4.asm: New file.
9029 * configure.in: Set up sse2 path for atom.
9030
9031 * mpn/x86/p6/sse2/mod_1_1.asm: New file.
9032 * mpn/x86/p6/sse2/mod_1_4.asm: Fix typo in MULFUNC_PROLOGUE.
9033
9034 2011-02-24 Niels Möller <[email protected]>
9035
9036 * mpn/x86/k7/mod_1_1.asm (mpn_mod_1_1p): Rewrite using the same
9037 algorithm as the x86_64 version.
9038
9039 2011-02-23 Marco Bodrato <[email protected]>
9040
9041 * mpn/x86/atom/logops_n.asm: New file (same loop as aors_n).
9042
9043 2011-02-23 Niels Möller <[email protected]>
9044
9045 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p): Shaved off one
9046 instruction and one register in the inner loop. Rearranged
9047 registers slightly, and no longer needs the callee-save register
9048 %r12.
9049
9050 2011-02-22 Torbjorn Granlund <[email protected]>
9051
9052 * configure.in: Export SHLD_SLOW and SHRD_SLOW to config.m4, also
9053 fixing typo in exporting code.
9054
9055 * mpn/x86_64/nano/gmp-mparam.h (SHLD_SLOW, SHRD_SLOW): Define.
9056 * mpn/x86_64/atom/gmp-mparam.h (SHLD_SLOW, SHRD_SLOW): Define.
9057
9058 2011-02-22 Niels Möller <[email protected]>
9059
9060 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p): Rewrite.
9061
9062 2011-02-22 Marco Bodrato <[email protected]>
9063
9064 * mpn/x86/atom/lshiftc.asm: New file (a copy of lshift.asm with a handful of neg added).
9065
9066 2011-02-21 Torbjorn Granlund <[email protected]>
9067
9068 * mpn/x86/aors_n.asm: Move _nc entry to after main code. Align loop
9069 and _n entry for claimed performance. Normalise mnemonic usage.
9070
9071 * mpn/x86/atom/aorrlsh1_n.asm: New file (code from rsblsh_1, slightly
9072 slower for addlsh_1 for large operands, but much faster for small).
9073 * mpn/x86/atom/addlsh1_n.asm: Remove.
9074 * mpn/x86/atom/rsblsh1_n.asm: Remove.
9075
9076 2011-02-20 Marc Glisse <[email protected]>
9077
9078 * mpq/aors.c: Rewrite to remove redundant division.
9079
9080 2011-02-20 Torbjorn Granlund <[email protected]>
9081
9082 * mpn/x86/atom/lshift.asm: New file.
9083 * mpn/x86/atom/rshift.asm: Normalise mnemonic usage.
9084
9085 * gmp-impl.h (mpn_divexact_by7): Relax inclusion condition.
9086
9087 * mpz/divegcd.c (mpz_divexact_by5): New conditionally enabled function.
9088 (mpz_divexact_by3): Wrap inside appropriate conditions.
9089 (mpz_divexact_gcd): Rewrite.
9090
9091 * mpn/x86/bdiv_dbm1c.asm: Save a jump.
9092
9093 2011-02-20 Marco Bodrato <[email protected]>
9094
9095 * mpn/x86/atom/aorslshC_n.asm: New file.
9096 * mpn/x86/atom/sublsh2_n.asm: New file.
9097
9098 * mpn/x86/atom/aors_n.asm: New code.
9099 * mpn/x86/atom/rshift.asm: Atom64 code adapted to 32-bit.
9100 * mpn/x86/atom/lshift.asm: Likewise.
9101
9102 2011-02-19 Torbjorn Granlund <[email protected]>
9103
9104 * mpn/x86_64/atom/rsh1aors_n.asm: New file.
9105
9106 * mpn/x86_64/atom/lshift.asm: New file.
9107 * mpn/x86_64/atom/rshift.asm: New file.
9108 * mpn/x86_64/atom/lshiftc.asm: New file.
9109
9110 2011-02-17 Marco Bodrato <[email protected]>
9111
9112 * mpn/x86/atom/aorsmul_1.asm: Small improvements for small sizes.
9113 * mpn/x86/atom/aorrlshC_n.asm: Tiny size improvements.
9114
9115 2011-02-16 Torbjorn Granlund <[email protected]>
9116
9117 * configure.in: Fix k8/k10 32-bit path setup problem.
9118
9119 2011-02-16 Marco Bodrato <[email protected]>
9120
9121 * mpn/x86/atom/aorsmul_1.asm: Revive an old k7/aorsmul.
9122
9123 2011-02-14 Marco Bodrato <[email protected]>
9124
9125 * gmp-impl.h (mpn_sublsh_n): Declare.
9126 * mpn/asm-defs.m4: Likewise.
9127
9128 * mpn/x86/atom/aorrlshC_n.asm: New file (was k7).
9129 * mpn/x86/k7/aorrlshC_n.asm: ReMoved.
9130 * mpn/x86/atom/aorrlsh2_n.asm: Grab atom/aorrlshC_n.asm.
9131 * mpn/x86/atom/rsblsh1_n.asm: Grab atom/aorrlshC_n.asm.
9132
9133 2011-02-13 Torbjorn Granlund <[email protected]>
9134
9135 * mpn/x86_64/atom/aorrlsh2_n.asm: New file.
9136
9137 2011-02-12 Torbjorn Granlund <[email protected]>
9138
9139 * mpn/x86_64/aorrlsh_n.asm: Minor tweaks, update c/l numbers.
9140
9141 * mpn/x86_64/atom/sublsh1_n.asm: New file.
9142
9143 * mpn/x86_64/atom/aorrlsh1_n.asm: New file.
9144
9145 2011-02-11 Torbjorn Granlund <[email protected]>
9146
9147 * mpn/powerpc64/mode64/mod_1_1.asm: Fix Darwin syntax issues.
9148
9149 2011-02-10 Torbjorn Granlund <[email protected]>
9150
9151 * mpn/powerpc64/mode64/mod_1_4.asm: Tune away a cycle for 970.
9152
9153 2011-02-11 Marco Bodrato <[email protected]>
9154
9155 * mpn/x86/k7/addlsh1_n.asm: Faster core loop (Torbjorn's).
9156
9157 * configure.in: Add HAVE_NATIVE_{add,sub,rsb}lsh{,1,2}_nc.
9158 * tests/tests.h: refmpn_{add,sub,rsb}lsh{,1,2}_nc prototypes.
9159 * tests/refmpn.c: New refmpn_{add,sub,rsb}lsh{,1,2}_nc.
9160 * tests/devel/try.c: Tests for mpn_{add,sub,rsb}lsh{,1,2}_nc.
9161
9162 * mpn/x86/k7/aorrlshC_n.asm: New file.
9163 * mpn/x86/atom/aorrlsh2_n.asm: Grab k7/aorrlshC_n.asm.
9164 * mpn/x86/atom/rsblsh1_n.asm: Grab k7/aorrlshC_n.asm.
9165
9166 2011-02-06 Marco Bodrato <[email protected]>
9167
9168 * mpn/x86/k7/addlsh1_n.asm: New file.
9169 * mpn/x86/k7/sublsh1_n.asm: New file.
9170 * mpn/x86/atom/addlsh1_n.asm: Grab k7/addlsh1_n.asm.
9171 * mpn/x86/atom/sublsh1_n.asm: Grab k7/sublsh1_n.asm.
9172
9173 2011-02-05 Torbjorn Granlund <[email protected]>
9174
9175 * gmp-impl.h (mpn_addlsh1_nc, mpn_addlsh2_nc, mpn_sublsh1_nc,
9176 mpn_sublsh2_nc, mpn_rsblsh1_nc, mpn_rsblsh2_nc): Declare.
9177 * mpn/asm-defs.m4: Likewise.
9178
9179 * mpn/x86_64/coreisbr/aorrlshC_n.asm: New file.
9180 * mpn/x86_64/coreisbr/aorrlsh1_n.asm: New file.
9181 * mpn/x86_64/coreisbr/aorrlsh2_n.asm: New file.
9182
9183 * mpn/x86_64/coreisbr/aors_n.asm: New file, based on old
9184 atom/aors_n.asm.
9185 * mpn/x86_64/atom/aors_n.asm: Grab coreisbr/aors_n.asm.
9186
9187 2011-02-05 Marco Bodrato <[email protected]>
9188
9189 * gmp-impl.h (mpn_toom6_mul_n_itch): Handle threshold == zero.
9190 (mpn_toom8_mul_n_itch): Likewise.
9191 (MPN_TOOM6H_MIN, MPN_TOOM8H_MIN): Define.
9192 * tests/mpn/t-toom6h.c: No tests below MPN_TOOM6H_MIN.
9193 * tests/mpn/t-toom8h.c: No tests below MPN_TOOM8H_MIN.
9194
9195 * mpz/lucnum_ui.c: Use mpn_addlsh2_n.
9196
9197 2011-02-04 Torbjorn Granlund <[email protected]>
9198
9199 * mpn/x86_64/atom/rsh1aors_n.asm: Add a MULFUNC_PROLOGUE.
9200 * mpn/x86_64/atom/dive_1.asm: Likewise.
9201 * mpn/x86_64/atom/popcount.asm: Likewise.
9202 * mpn/x86_64/core2/popcount.asm: Likewise.
9203 * mpn/x86_64/coreinhm/hamdist.asm: Likewise.
9204 * mpn/x86_64/coreinhm/popcount.asm: Likewise.
9205 * mpn/x86_64/nano/popcount.asm: Likewise.
9206 * mpn/x86_64/pentium4/popcount.asm: Likewise.
9207
9208 2011-02-04 Marco Bodrato <[email protected]>
9209
9210 * mpn/x86/atom/mode1o.asm: New file, grabbing another asm file.
9211 * mpn/x86/atom/mul_1.asm: Claim mul_1c.
9212
9213 2011-02-02 Niels Möller <[email protected]>
9214
9215 * tune/speed.h (SPEED_ROUTINE_MPN_HGCD_CALL): Fixed one
9216 speed_operand_dst call.
9217
9218 2011-02-01 Torbjorn Granlund <[email protected]>
9219
9220 * tune/speed.h (struct speed_params): Allow for 4 dst operands.
9221 * tune/common.c (TOLERANCE): Increase from 0.5% to 1%.
9222
9223 * tune/speed.h (SPEED_ROUTINE_MPN_HGCD_CALL): New macro, mainly based
9224 on old speed_mpn_hgcd, but with speed_operand_src calls (as suggested
9225 by Niels).
9226 * tune/common.c (speed_mpn_hgcd): Invoke SPEED_ROUTINE_MPN_HGCD_CALL.
9227 (speed_mpn_hgcd_lehmer): Likewise.
9228
9229 * configure.in: Set up 32-bit x86 paths for new corei* CPU strings.
9230
9231 2011-01-31 Torbjorn Granlund <[email protected]>
9232
9233 * config.guess: Recognise new Intel processors.
9234
9235 * config.guess: Support 'coreinhm' and 'coreisbr'.
9236 * config.sub: Likewise.
9237 * configure.in: Likewise.
9238
9239 2011-01-30 Torbjorn Granlund <[email protected]>
9240
9241 * configure.in: Support x86/geode.
9242 * mpn/x86/geode/gmp-mparam.h: New file.
9243
9244 2011-01-29 Marco Bodrato <[email protected]>
9245
9246 * mpn/x86/atom/addlsh1_n.asm: Removed.
9247 * mpn/x86/atom/rsh1add_n.asm: Likewise.
9248
9249 2011-01-28 Torbjorn Granlund <[email protected]>
9250
9251 * mpn/alpha/ev6/slot.pl: Add some missing insns.
9252
9253 2011-01-28 Marco Bodrato <[email protected]>
9254
9255 * mpn/x86/atom/copyd.asm: New file, grabbing another asm file.
9256 * mpn/x86/atom/copyi.asm: Likewise.
9257 * mpn/x86/atom/aors_n.asm: Likewise.
9258 * mpn/x86/atom/addlsh1_n.asm: Likewise.
9259 * mpn/x86/atom/aorsmul_1.asm: Likewise.
9260 * mpn/x86/atom/bdiv_q_1.asm: Likewise.
9261 * mpn/x86/atom/dive_1.asm: Likewise.
9262 * mpn/x86/atom/divrem_1.asm: Likewise.
9263 * mpn/x86/atom/hamdist.asm: Likewise.
9264 * mpn/x86/atom/logops_n.asm: Likewise.
9265 * mpn/x86/atom/lshift.asm: Likewise.
9266 * mpn/x86/atom/mod_34lsub1.asm: Likewise.
9267 * mpn/x86/atom/mul_1.asm: Likewise.
9268 * mpn/x86/atom/mul_basecase.asm: Likewise.
9269 * mpn/x86/atom/popcount.asm: Likewise.
9270 * mpn/x86/atom/rsh1add_n.asm: Likewise.
9271 * mpn/x86/atom/rshift.asm: Likewise.
9272 * mpn/x86/atom/sqr_basecase.asm: Likewise.
9273
9274 2011-01-27 Torbjorn Granlund <[email protected]>
9275
9276 * mpn/x86_64/atom/rsh1aors_n.asm: New file, grabbing another asm file.
9277 * mpn/x86_64/atom/popcount.asm: Likewise.
9278 * mpn/x86_64/atom/dive_1.asm: Likewise.
9279 * mpn/x86_64/nano/popcount.asm: Likewise.
9280
9281 2011-01-26 Torbjorn Granlund <[email protected]>
9282
9283 * mpn/alpha/invert_limb.asm: Complete rewrite.
9284
9285 2011-01-25 Torbjorn Granlund <[email protected]>
9286
9287 * mpn/powerpc32/invert_limb.asm: New file.
9288
9289 2011-01-25 Marco Bodrato <[email protected]>
9290
9291 * mpn/x86/pentium4/sse2/bdiv_q_1.asm: New file.
9292 * mpn/x86/k7/bdiv_q_1.asm: New file.
9293
9294 2011-01-24 Torbjorn Granlund <[email protected]>
9295
9296 * tune/tuneup.c (tune_mul_n, tune_sqr): Loop, re-measuring thresholds
9297 until no tiny ranges remain.
9298
9299 2011-01-23 Torbjorn Granlund <[email protected]>
9300
9301 * mpn/ia64/mul_2.asm: Tweak to 1.5 c/l, less overhead.
9302
9303 * mpn/ia64/addmul_2.asm: Rewrite, adding mpn_addmul_2s entry point.
9304
9305 2011-01-22 Torbjorn Granlund <[email protected]>
9306
9307 * mpn/ia64/aors_n.asm: Fix some incorrect bundle types.
9308
9309 * mpn/ia64/sqr_diagonal.asm: Remove.
9310
9311 * mpn/ia64/sqr_diag_addlsh1.asm: New file.
9312
9313 * mpn/ia64/ia64-defs.m4: Define some shorter convenience mnemonics.
9314
9315 * mpn/generic/sqr_basecase.c (MPN_SQR_DIAG_ADDLSH1): New macro, using
9316 new function mpn_sqr_diag_addlsh1 or defining its equivalent.
9317
9318 * gmp-impl.h (mpn_addmul_2s): Declare.
9319 (mpn_sqr_diag_addlsh1): Declare.
9320 * mpn/asm-defs.m4 (define_mpn): Add addmul_2s and sqr_diag_addlsh1.
9321
9322 * configure.in: Add HAVE_NATIVEs for mpn_sqr_diag_addlsh1 and
9323 mpn_addmul_2s.
9324 (gmp_mpn_functions_optional): Add sqr_diag_addlsh1.
9325
9326 2011-01-21 Marco Bodrato <[email protected]>
9327
9328 * tests/devel/try.c: Initial support for mpn_bdiv_q_1.
9329 * mpn/x86/pentium/bdiv_q_1.asm: New file.
9330 * mpn/x86/p6/bdiv_q_1.asm: New file.
9331
9332 2011-01-20 Torbjorn Granlund <[email protected]>
9333
9334 * tune/speed.c (run_gnuplot): Update to current gnuplot syntax.
9335
9336 * mpn/powerpc64/mode64/aorsmul_1.asm: Trim away 0.5 c/l for submul_1
9337 for POWER5.
9338
9339 2011-01-19 Torbjorn Granlund <[email protected]>
9340
9341 * mpn/x86_64/core2/rsh1aors_n.asm: New file.
9342
9343 2011-01-18 Marco Bodrato <[email protected]>
9344
9345 * mpn/x86/bdiv_q_1.asm: New file (same core alg. as dive_1).
9346
9347 2011-01-15 Marco Bodrato <[email protected]>
9348
9349 * mpn/generic/divexact.c: Avoid COPY if not needed.
9350
9351 2011-01-14 Torbjorn Granlund <[email protected]>
9352
9353 * gmp-impl.h (struct cpuvec_t): Add field bmod_1_to_mod_1_threshold.
9354 * configure.in (fat_thresholds): Add BMOD_1_TO_MOD_1_THRESHOLD.
9355
9356 2011-01-13 Marco Bodrato <[email protected]>
9357
9358 * mpz/mul.c: Remove redundant size computation.
9359
9360 2011-01-08 Torbjorn Granlund <[email protected]>
9361
9362 * tests/devel/try.c (types enum): Add TYPE_MUL_5 and TYPE_MUL_6.
9363 (param_init): Support new types.
9364 (choice_array): Support testing of mpn_mul_5 and mpn_mul_6.
9365 (call): Support new routines.
9366
9367 * tests/refmpn.c (refmpn_mul_5, refmpn_mul_6): New functions.
9368 * tests/tests.h (refmpn_mul_5, refmpn_mul_6): Declare.
9369 Remove parameter names from some other functions.
9370
9371 * gmp-impl.h (mpn_mul_5, mpn_mul_6): Declare.
9372 * mpn/asm-defs.m4: Likewise, also declare mpn_addmul_5, mpn_addmul_6,
9373 mpn_addmul_7, and mpn_addmul_8.
9374
9375 * configure.in (gmp_mpn_functions_optional): Add mul_5 and mul_6.
9376
9377 * tune/speed.c (routine): Add measuring of mpn_mul_5 and mpn_mul_6.
9378 * tune/common.c (speed_mpn_mul_5, speed_mpn_mul_6): New functions.
9379 * tune/speed.h: Declare new functions.
9380
9381 2011-01-03 Marco Bodrato <[email protected]>
9382
9383 * mpz/aors.h: Remove #ifdef BERKELEY_MP, and cleanup.
9384 * mpz/cmp.c: Likewise.
9385 * mpz/gcd.c: Likewise.
9386 * mpz/mul.c: Likewise.
9387 * mpz/powm.c: Likewise.
9388 * mpz/set.c: Likewise.
9389 * mpz/sqrtrem.c: Likewise.
9390 * mpz/tdiv_qr.c: Likewise.
9391
9392 2010-12-28 Torbjorn Granlund <[email protected]>
9393
9394 * mpn/minithres/gmp-mparam.h: Update with several recent thresholds.
9395
9396 2010-12-19 Torbjorn Granlund <[email protected]>
9397
9398 * mpn/x86/k7/mod_1_1.asm: Canonicalise cmov forms.
9399 * mpn/x86/k7/mod_1_4.asm: Likewise.
9400 * mpn/x86/pentium4/sse2/mod_1_1.asm: Likewise.
9401 * mpn/x86/pentium4/sse2/mod_1_4.asm: Likewise.
9402 * mpn/x86_64/core2/divrem_1.asm: Likewise.
9403 * mpn/x86_64/divrem_1.asm: Likewise.
9404 * mpn/x86_64/mod_1_1.asm: Likewise.
9405 * mpn/x86_64/mod_1_2.asm: Likewise.
9406 * mpn/x86_64/mod_1_4.asm: Likewise.
9407
9408 * mpn/x86/k7/gcd_1.asm: Rewrite. Remove slow 'div' loop. Call
9409 mpn_mod_1 for operands with mode than BMOD_1_TO_MOD_1_THRESHOLD limbs.
9410 Misc cleanups.
9411
9412 2010-12-18 Torbjorn Granlund <[email protected]>
9413
9414 * mpn/x86_64/gcd_1.asm: Call mpn_mod_1 for operands with mode than
9415 BMOD_1_TO_MOD_1_THRESHOLD limbs.
9416
9417 * configure.in: Generalise code for putting THRESHOLDs in config.m4.
9418 Add BMOD_1_TO_MOD_1_THRESHOLD to list.
9419
9420 * mpn/x86_64/core2/divrem_1.asm: Tweak slightly, correct cycle counts.
9421
9422 * mpn/x86_64/addmul_2.asm: Remove constant index.
9423 * mpn/x86_64/lshiftc.asm: Likewise.
9424 * mpn/x86_64/pentium4/lshift.asm: Likewise.
9425 * mpn/x86_64/pentium4/lshiftc.asm: Likewise.
9426 * mpn/x86_64/pentium4/rshift.asm: Likewise.
9427
9428 2010-12-16 Torbjorn Granlund <[email protected]>
9429
9430 * mpn/x86_64/mod_34lsub1.asm: Complete rewrite.
9431 * mpn/x86_64/pentium4/mod_34lsub1.asm: New file, old
9432 mpn/x86_64/mod_34lsub1.asm.
9433
9434 2010-12-15 Torbjorn Granlund <[email protected]>
9435
9436 * mpn/powerpc64/vmx/popcount.asm: Rewrite to use vperm count table.
9437
9438 2010-12-14 Torbjorn Granlund <[email protected]>
9439
9440 * mp-h.in: Remove.
9441 * configure.in: Remove mp-h.in from AC_OUTPUT invocation.
9442
9443 2010-12-13 Torbjorn Granlund <[email protected]>
9444
9445 * mpz/mod.c: Rewrite.
9446
9447 * mpn/x86_64/corei/popcount.asm: New file.
9448 * mpn/x86_64/corei/hamdist.asm: New file.
9449
9450 * mpn/x86_64/k10/hamdist.asm: New file.
9451
9452 * configure.in: Amend last change for lame /bin/sh.
9453
9454 2010-12-12 Torbjorn Granlund <[email protected]>
9455
9456 * configure.in: Comment out M4=m4-not-needed.
9457
9458 * mpn/x86_64/k10/popcount.asm: New file.
9459 * configure.in: Setup special path for k10 and later AMD CPUs.
9460 Remove special x86_64'k8' path, since directory is non-existent.
9461
9462 2010-12-11 Torbjorn Granlund <[email protected]>
9463
9464 * mpn/sparc32/ultrasparct1: New directory.
9465 * mpn/sparc32/ultrasparct1/add_n.asm: New file.
9466 * mpn/sparc32/ultrasparct1/sub_n.asm: New file.
9467 * mpn/sparc32/ultrasparct1/mul_1.asm: New file.
9468 * mpn/sparc32/ultrasparct1/addmul_1.asm: New file.
9469 * mpn/sparc32/ultrasparct1/submul_1.asm: New file.
9470 * mpn/sparc32/ultrasparct1/sqr_diagonal.asm: New file.
9471
9472 * config.guess: Support Ultrasparc T2 and T3.
9473 * config.sub: Likewise.
9474 * configure.in: Likewise.
9475
9476 * config.guess: Generalise BSD Sparc recognition by allowing any
9477 caps (needed for OpenBSD which spells things innovatively).
9478
9479 2010-12-01 Torbjorn Granlund <[email protected]>
9480
9481 * config.guess: Match new AMD processors, allow finer distinctions
9482 among old ones.
9483 * acinclude.m4 (X86_64_PATTERN): Likewise.
9484 * config.sub: Likewise.
9485 * configure.in: Rudimentarily support new AMD processors.
9486
9487 * configure.in (--enable_assembly): New option.
9488 (target none-*-*): Disable, give error.
9489
9490 2010-11-29 Torbjorn Granlund <[email protected]>
9491
9492 * mpn/x86/x86-defs.m4 (LEA): Support non-PIC code.
9493 * mpn/x86/darwin.m4 (LEA): Likewise.
9494
9495 * tests/amd64call.asm: Rewrite for code size, and to match calls and
9496 returns.
9497
9498 * tests/x86call.asm: Rewrite for code size, to support PIC, and to
9499 match calls and returns.
9500 * tests/x86check.c: Rewrite.
9501
9502 2010-11-22 Torbjorn Granlund <[email protected]>
9503
9504 * mpz/get_str.c: Make all bases either work or return an error.
9505 * mpz/out_str.c: Likewise.
9506 * mpq/get_str.c: Likewise.
9507 * mpf/get_str.c: Likewise.
9508
9509 2010-11-14 Torbjorn Granlund <[email protected]>
9510
9511 * tests/misc/t-printf.c: Add explicit casts for type conversions.
9512 * mpn/generic/toom62_mul.c: Likewise.
9513
9514 2010-11-13 Torbjorn Granlund <[email protected]>
9515
9516 * mpn/generic/get_d.c: Misc cleanup. Fail with a syntax error for
9517 non-IEEE fp formats.
9518
9519 * tests/devel/try.c (malloc_region): Add explicit casts for type
9520 conversions.
9521
9522 * acinclude.m4 (GMP_ASM_RODATA): Make test code snippet C++ compatible.
9523 (GMP_C_DOUBLE_FORMAT): Likewise.
9524 (GMP_FUNC_VSNPRINTF): Likewise.
9525
9526 * config.guess (x86): Make test C snippet C++ compatible.
9527
9528 2010-11-12 Torbjorn Granlund <[email protected]>
9529
9530 * Makefile.am: Remove mpbsd.
9531 * configure.in: Remove mpbsd.
9532 * doc/configuration: Remove mpbsd mentions.
9533 * doc/gmp.texi: Remove mpbsd docs.
9534 * tests/Makefile.am: Remove mpbsd.
9535 * libmp.sym: Remove.
9536 * mpbsd: Remove directory and files.
9537 * tests/mpbsd: Remove directory and files.
9538
9539 2010-11-11 Torbjorn Granlund <[email protected]>
9540
9541 * mpn/x86_64/atom/aors_n.asm: Don't rely on ZF after 'bt' insn.
9542 Use 64-bit 'test' to support operands of 2^32 limbs and more.
9543
9544 * rand: New directory, move rand*.c and randmt.h here.
9545 * rand/Makefile.am: New file.
9546 * Makefile.am (SUBDIRS): Add rand.
9547 (RANDOM_OBJECTS): New variable.
9548 (libgmp_la_SOURCES): Remove random objects.
9549 (libgmp_la_DEPENDENCIES): Add RANDOM_OBJECTS.
9550 * configure.in (AC_OUTPUT): Add rand/Makefile.
9551
9552 * ansi2knr.1: File removed.
9553 * ansi2knr.c: File removed.
9554
9555 2010-11-10 Torbjorn Granlund <[email protected]>
9556
9557 Make it possible to compile GMP with g++:
9558
9559 * gmp-impl.h: Declare __gmp_digit_value_tab here.
9560 * mpbsd/min.c: ...not here.
9561 * mpbsd/xtom.c: ...nor here.
9562 * mpf/set_str.c: ...nor here.
9563 * mpz/inp_str.c: ...nor here.
9564 * mpz/set_str.c: ...nor here.
9565
9566 * mpn/generic/toom43_mul.c: Add casts for logical operations on enums.
9567 * mpn/generic/toom44_mul.c: Likewise.
9568 * mpn/generic/toom4_sqr.c: Likewise.
9569 * mpn/generic/toom52_mul.c: Likewise.
9570 * mpn/generic/toom53_mul.c: Likewise.
9571 * mpn/generic/toom62_mul.c: Likewise.
9572
9573 * mpz/clrbit.c: Clean up typing using MPZ_REALLOC.
9574 * mpz/setbit.c: Likewise.
9575
9576 * mpz/powm.c: Avoid variable name 'new'.
9577
9578 * randlc2x.c: Add explicit casts for type conversions.
9579 * tests/misc/t-printf.c: Likewise.
9580 * tests/misc/t-scanf.c: Likewise.
9581 * tests/misc.c: Likewise.
9582 * tests/mpz/convert.c: Likewise.
9583 * tests/refmpn.c: Likewise.
9584
9585 * tests/tests.h: Unconditionally use <sstream> for now.
9586
9587 * tests/memory.c: Include "tests.h.
9588
9589 * mp_get_fns.c: Add a __GMP_NOTHROW for coherency with prototype.
9590 * mp_set_fns.c: Likewise.
9591 * mpf/cmp.c: Likewise.
9592 * mpf/cmp_si.c: Likewise.
9593 * mpf/cmp_ui.c: Likewise.
9594 * mpf/fits_s.h: Likewise.
9595 * mpf/fits_u.h: Likewise.
9596 * mpf/get_dfl_prec.c: Likewise.
9597 * mpf/get_prc.c: Likewise.
9598 * mpf/get_si.c: Likewise.
9599 * mpf/get_ui.c: Likewise.
9600 * mpf/int_p.c: Likewise.
9601 * mpf/set_dfl_prec.c: Likewise.
9602 * mpf/set_prc_raw.c: Likewise.
9603 * mpf/size.c: Likewise.
9604 * mpf/swap.c: Likewise.
9605 * mpq/equal.c: Likewise.
9606 * mpq/swap.c: Likewise.
9607 * mpz/cmp.c: Likewise.
9608 * mpz/cmp_si.c: Likewise.
9609 * mpz/cmp_ui.c: Likewise.
9610 * mpz/cmpabs.c: Likewise.
9611 * mpz/cmpabs_ui.c: Likewise.
9612 * mpz/cong_2exp.c: Likewise.
9613 * mpz/divis_2exp.c: Likewise.
9614 * mpz/fits_s.h: Likewise.
9615 * mpz/get_si.c: Likewise.
9616 * mpz/hamdist.c: Likewise.
9617 * mpz/scan0.c: Likewise.
9618 * mpz/scan1.c: Likewise.
9619 * mpz/sizeinbase.c: Likewise.
9620 * mpz/swap.c: Likewise.
9621 * mpz/tstbit.c: Likewise.
9622 * tal-reent.c: Likewise.
9623
9624 2010-11-09 Torbjorn Granlund <[email protected]>
9625
9626 * configure.in: Get rid of K&R support.
9627 * Makefile.am: Likewise.
9628 * mpn/Makefile.am: Likewise.
9629 * doc/configuration: Update docs wrt K&R support.
9630 * doc/gmp.texi: Likewise.
9631
9632 * configure.in (AC_INIT): Amend bug reporting address with manual
9633 reference.
9634
9635 2010-11-06 Torbjorn Granlund <[email protected]>
9636
9637 * config.guess: If cpuid says we have 32bit-only x86 but
9638 configfsf.guess return x86_64, return the latter.
9639
9640 * mpn/x86_64/aors_n.asm: Rewrite not to rely on ZF after 'bt' insn.
9641
9642 2010-10-09 Torbjorn Granlund <[email protected]>
9643
9644 * mpn/generic/trialdiv.c: Update documentation.
9645
9646 2010-10-04 Torbjorn Granlund <[email protected]>
9647
9648 * mpn/x86_64/gcd_1.asm: Use m4_lshift to avoid << operator.
9649 * mpn/x86_64/aorrlshC_n.asm: Likewise.
9650 * mpn/x86_64/pentium4/aorslshC_n.asm: Likewise.
9651 * mpn/x86/k7/gcd_1.asm: Likewise.
9652
9653 2010-08-20 Niels Möller <[email protected]>
9654
9655 Suggested by Ozkan Sezer:
9656 * configure.in: If $M4 is already set in the environment, don't
9657 touch it. Fixed the case that no assembler files are used, and
9658 GMP_PROG_M4 is omitted.
9659
9660 2010-08-08 Torbjorn Granlund <[email protected]>
9661
9662 * mpn/x86_64/fat/fat.c: Recognise many more processors.
9663
9664 2010-06-30 Torbjorn Granlund <[email protected]>
9665
9666 * mpn/x86_64/divrem_2.asm: Tune.
9667
9668 2010-06-19 Niels Möller <[email protected]>
9669
9670 * tune/speed.h (SPEED_ROUTINE_MPN_MOD_1_1): Pass normalized
9671 divisor to the benchmarked function.
9672
9673 2010-06-15 Torbjorn Granlund <[email protected]>
9674
9675 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p_cps): Rewrite.
9676 * mpn/x86_64/mod_1_2.asm (mpn_mod_1s_2p_cps): Rewrite.
9677 * mpn/x86_64/mod_1_4.asm (mpn_mod_1s_4p_cps): Rewrite.
9678
9679 * gmp-impl.h (udiv_rnd_preinv): Simplify.
9680
9681 * mpn/x86/k7/mod_1_1.asm: New file.
9682 * mpn/x86/pentium4/sse2/mod_1_1.asm (mpn_mod_1_1p_cps): Rewrite.
9683 * mpn/x86/k7/mod_1_4.asm (mpn_mod_1s_4p_cps): Rewrite.
9684 * mpn/x86/pentium4/sse2/mod_1_4.asm (mpn_mod_1s_4p_cps): Rewrite.
9685
9686 * mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Store results as they are
9687 computed.
9688 * mpn/generic/mod_1_2.c (mpn_mod_1s_2p_cps): Likewise.
9689 * mpn/generic/mod_1_4.c (mpn_mod_1s_4p_cps): Likewise.
9690
9691 * mpn/x86/k7/invert_limb.asm: Moved from mpn/x86/invert_limb.asm.
9692
9693 2010-06-15 Niels Möller <[email protected]>
9694
9695 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-mod_1.
9696 * tests/mpn/t-mod_1.c: New file.
9697
9698 2010-05-25 Torbjorn Granlund <[email protected]>
9699
9700 * mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): Trim out space
9701 for inverse, since that is passed in already.
9702
9703 2010-05-24 Torbjorn Granlund <[email protected]>
9704
9705 * mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): New function.
9706 * gmp-impl.h: Declare it.
9707 * tune/common.c (speed_mpn_mupi_div_qr): Use new itch function.
9708 * tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Pass parameters right
9709 for new itch function.
9710
9711 * mpn/powerpc32/lshiftc.asm: New file.
9712
9713 2010-05-22 Torbjorn Granlund <[email protected]>
9714
9715 * tune/tuneup.c (tune_mod_1): Revert to version of 2010-05-06.
9716
9717 2010-05-17 Torbjorn Granlund <[email protected]>
9718
9719 * configure.in (ia64): Get 32-bit sizeof test right.
9720
9721 * tune/tuneup.c (tune_mod_1): Undo unintensional change to tuning of
9722 PREINV_MOD_1_TO_MOD_1_THRESHOLD.
9723
9724 2010-05-16 Torbjorn Granlund <[email protected]>
9725
9726 * mpn/sparc64/mod_1.c: Rewrite.
9727 * mpn/sparc64/sparc64.h (umul_ppmm_s): New macro.
9728 * mpn/sparc64/mod_1_4.c: New file.
9729
9730 * mpn/generic/divrem_1.c: Minor cleanup.
9731 * mpn/generic/mod_1.c: Likewise.
9732 * mpn/generic/mod_1_1.c: Likewise.
9733 * mpn/generic/mod_1_2.c: Likewise.
9734 * mpn/generic/mod_1_3.c: Likewise.
9735 * mpn/generic/mod_1_4.c: Likewise.
9736
9737 * configure.in (ia64-hpux): Do sizeof tests for 32-bit and 64-bit ABI.
9738
9739 * tune/tuneup.c (tune_mod_1): Completely finish MOD_1_N tuning before
9740 tuning MOD_1U_TO_MOD_1_1_THRESHOLD.
9741
9742 2010-05-14 Torbjorn Granlund <[email protected]>
9743
9744 * mpn/generic/redc_2.c: Use asm code just for GNU C.
9745
9746 2010-05-13 Torbjorn Granlund <[email protected]>
9747
9748 * mpn/sparc64/ultrasparc1234: New directory. Move all code that uses
9749 floating-point into this directory.
9750 * configure.in: Point to ultrasparc1234 for appropriate CPUs.
9751
9752 * mpn/sparc64/ultrasparct1/add_n.asm: New file.
9753 * mpn/sparc64/ultrasparct1/addlsh2_n.asm: New file.
9754 * mpn/sparc64/ultrasparct1/addmul_1.asm: New file.
9755 * mpn/sparc64/ultrasparct1/lshift.asm: New file.
9756 * mpn/sparc64/ultrasparct1/mul_1.asm: New file.
9757 * mpn/sparc64/ultrasparct1/rsblsh2_n.asm: New file.
9758 * mpn/sparc64/ultrasparct1/rshift.asm: New file.
9759 * mpn/sparc64/ultrasparct1/sublsh1_n.asm: New file.
9760 * mpn/sparc64/ultrasparct1/sublshC_n.asm: New file.
9761 * mpn/sparc64/ultrasparct1/addlsh1_n.asm: New file.
9762 * mpn/sparc64/ultrasparct1/addlshC_n.asm: New file.
9763 * mpn/sparc64/ultrasparct1/lshiftc.asm: New file.
9764 * mpn/sparc64/ultrasparct1/rsblsh1_n.asm: New file.
9765 * mpn/sparc64/ultrasparct1/rsblshC_n.asm: New file.
9766 * mpn/sparc64/ultrasparct1/sub_n.asm: New file.
9767 * mpn/sparc64/ultrasparct1/sublsh2_n.asm: New file.
9768 * mpn/sparc64/ultrasparct1/submul_1.asm: New file.
9769 * mpn/sparc64/ultrasparct1/gmp-mparam.h: New file.
9770
9771 * configure.in: Give ultrasparct1 and ultrasparct2 special code path.
9772
9773 * mpn/x86_64/pentium4/gmp-mparam.h: Disable mpn_addlsh_n, mpn_rsblsh_n.
9774
9775 2010-05-12 Niels Möller <[email protected]>
9776
9777 * mpz/jacobi.c (mpz_jacobi): Fixed off-by-one error in use of
9778 scratch space.
9779
9780 * tune/common.c (speed_mpz_powm_sec): New function.
9781 * tune/speed.h: Declare speed_mpz_powm_sec.
9782 * tune/speed.c (routine): Added speed_mpz_powm_sec.
9783
9784 * tune/common.c (speed_mpn_addlsh_n, speed_mpn_sublsh_n)
9785 (speed_mpn_rsblsh_n): New functions.
9786 * tune/speed.h: Declare new functions.
9787 * tune/speed.c (routine): Add new functions.
9788
9789 2010-05-12 Torbjorn Granlund <[email protected]>
9790
9791 * mpn/x86_64/mod_1_4.asm: Tune for more processors.
9792
9793 * mpn/x86_64/pentium4/lshiftc.asm: New file.
9794
9795 2010-05-11 Niels Möller <[email protected]>
9796
9797 * mpz/jacobi.c (mpz_jacobi): Deleted old implementation.
9798 Reorganized new implementation, to handle small inputs efficiently.
9799
9800 * tests/mpz/t-jac.c (check_large_quotients): Reduced test sizes.
9801 (check_data): One more input pair related to a fixed bug.
9802 (main): Enable check_large_quotients.
9803
9804 2010-05-10 Torbjorn Granlund <[email protected]>
9805
9806 * mpn/x86_64/aorrlsh2_n.asm: Fix typo.
9807
9808 2010-05-09 Torbjorn Granlund <[email protected]>
9809
9810 * mpn/x86_64/aorrlshC_n.asm: New file based on aorrlsh2_n.asm.
9811 * mpn/x86_64/aorrlsh2_n.asm: Now just include aorrlshC_n.asm.
9812 * mpn/x86_64/core2/aorrlsh1_n.asm: New file, include ../aorrlshC_n.asm.
9813 * mpn/x86_64/core2/aorrlsh2_n.asm: Likewise.
9814
9815 * mpn/x86_64/core2/sublshC_n.asm: New file based on aorslsh1_n.asm.
9816 * mpn/x86_64/core2/aorslsh1_n.asm: Remove.
9817 * mpn/x86_64/core2/sublsh1_n.asm: Just include sublshC_n.asm.
9818 * mpn/x86_64/core2/sublsh2_n.asm: Likewise.
9819
9820 2010-05-08 Torbjorn Granlund <[email protected]>
9821
9822 * mpn/x86_64/atom/gmp-mparam.h: Disable mpn_rsh1add_n, mpn_rsh1sub_n.
9823
9824 * mpn/x86_64/pentium4/aorslshC_n.asm: New file based on aorslsh1_n.asm.
9825 * mpn/x86_64/pentium4/aorslsh1_n.asm: Now just include aorslshC_n.asm.
9826 * mpn/x86_64/pentium4/aorslsh2_n.asm: New file.
9827
9828 2010-05-07 Torbjorn Granlund <[email protected]>
9829
9830 * mpn/sparc64: Support operands of >= 2^32 limbs.
9831
9832 * mpn/sparc64/lshiftc.asm: New file.
9833
9834 * mpn/ia64/divrem_2.asm: Complete rewrite.
9835
9836 2010-05-06 Torbjorn Granlund <[email protected]>
9837
9838 * tune/tuneup.c (all): Don't call tune_divrem_2.
9839
9840 * mpn/generic/divrem_2.c: Complete rewrite.
9841
9842 * tune/tuneup.c (tune_mod_1): Fix typo.
9843
9844 2010-05-05 Torbjorn Granlund <[email protected]>
9845
9846 * mpn/x86_64/mod_1_1.asm (mpn_mod_1_1p): Use macro register names.
9847 (mpn_mod_1_1p_cps): Rewrite.
9848
9849 * mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Micro-optimise.
9850
9851 * longlong.h: Undo 2009-03-01 change for powerpc64, it gives poor code.
9852
9853 * mpn/x86/pentium4/sse2/mod_1_1.asm: New file.
9854
9855 * mpn/powerpc64/mode64/mod_1_1.asm: New file.
9856
9857 * tune/tuneup.c (tune_mod_1): Use more typical divisor, for the benefit
9858 of machines with early-out multipliers.
9859
9860 2010-05-04 Torbjorn Granlund <[email protected]>
9861
9862 * tune/tuneup.c (tune_mod_1): Fix typo.
9863
9864 * mpn/generic/mod_1_1.c: Undo last change.
9865 * mpn/x86_64/mod_1_1.asm: Likewise.
9866
9867 2010-05-03 Niels Möller <[email protected]>
9868
9869 * mpn/generic/jacobi_lehmer.c (jacobi_hook): New function.
9870 (mpn_jacobi_subdiv_step): Deleted function.
9871 (mpn_jacobi_lehmer): Use general mpn_gcd_subdiv_step.
9872
9873 * mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): Reorganized
9874 to use a single hook function.
9875 * mpn/generic/gcdext.c (mpn_gcdext): Adapted to new hook
9876 interface.
9877 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_hook): New unified hook
9878 function.
9879 * mpn/generic/gcd.c (gcd_hook): Renamed from gcd_done, and adapted
9880 to new hook interface.
9881 * gmp-impl.h (gcd_subdiv_step_hook): New typedef, now a function
9882 type, not a struct.
9883 (mpn_gcdext_hook): Declare.
9884
9885 2010-05-03 Torbjorn Granlund <[email protected]>
9886
9887 * mpn/generic/mod_1_1.c: Avoid multiply for 2 limb feed-in.
9888 * mpn/generic/mod_1_2.c: Likewise.
9889 * mpn/generic/mod_1_3.c: Likewise.
9890 * mpn/generic/mod_1_4.c: Likewise.
9891 * mpn/x86_64/mod_1_1.asm: Likewise.
9892 * mpn/x86_64/mod_1_2.asm: Likewise.
9893 * mpn/x86_64/mod_1_4.asm: Likewise.
9894 * mpn/x86/k7/mod_1_4.asm: Likewise.
9895 * mpn/x86/pentium4/sse2/mod_1_4.asm: Likewise.
9896 * mpn/alpha/ev6/mod_1_4.asm: Likewise.
9897
9898 * tune/tuneup.c (tune_mod_1): Measure MOD_1_1_TO_MOD_1_2_THRESHOLD and
9899 MOD_1_2_TO_MOD_1_4_THRESHOLD before MOD_1U_TO_MOD_1_1_THRESHOLD for
9900 correctness.
9901
9902 * mpn/powerpc64/sqr_diagonal.asm: Complete rewrite.
9903
9904 * mpn/powerpc64/mode64/mod_1_4.asm: New file.
9905
9906 2010-05-02 Torbjorn Granlund <[email protected]>
9907
9908 * config.guess: Recognise power7.
9909
9910 * configure.in: Major overhaul of powerpc support.
9911
9912 * mpn/powerpc64/p6/lshift.asm: New file.
9913 * mpn/powerpc64/p6/lshiftc.asm: Likewise.
9914 * mpn/powerpc64/p6/rshift.asm: Likewise.
9915
9916 2010-04-30 Torbjorn Granlund <[email protected]>
9917
9918 * configure.in (powerpc64): Support CPU specific mode-less subdirs.
9919
9920 * mpn/powerpc64/aix.m4 (PROLOGUE_cpu): Use "named csect" making
9921 requested alignment actually honoured.
9922
9923 2010-04-30 Niels Möller <[email protected]>
9924
9925 * mpn/generic/jacobi_lehmer.c (mpn_jacobi_2): Fixed handling of
9926 the case bl == 1. Fixed missing application of reciprocity.
9927
9928 2010-04-29 Niels Möller <[email protected]>
9929
9930 * configure.in (gmp_mpn_functions): Deleted gcdext_subdiv_step.
9931
9932 * mpn/generic/gcdext.c (mpn_gcdext): Use new generalized
9933 mpn_gcd_subdiv_step.
9934
9935 * mpn/generic/gcdext_lehmer.c (gcdext_update): New function.
9936 (gcdext_done): New function.
9937 (gcdext_hook): New const hook struct.
9938 (mpn_gcdext_lehmer_n): Use new generalized mpn_gcd_subdiv_step.
9939
9940 * mpn/generic/gcd.c (gcd_done): New function.
9941 (gcd_hook): New const hook struct.
9942 (mpn_gcd): Adapted to new mpn_gcd_subdiv_step interface.
9943
9944 * mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): Reorganized
9945 function. Added hook function pointers to the argument list, so
9946 the same function can be used for gcd, gcdext, and jacobi.
9947
9948 * gmp-impl.h (struct gcd_subdiv_step_hook): New struct.
9949 (mpn_gcdext_subdiv_step): Deleted prototype.
9950 (struct gcdext_ctx): New struct.
9951 (gcdext_hook): Declare const struct.
9952 (mpn_gcd_subdiv_step): Updated prototype.
9953
9954 * mpn/generic/gcdext_subdiv_step.c: Deleted file.
9955
9956 2010-04-28 Torbjorn Granlund <[email protected]>
9957
9958 * mpn/powerpc64/lshift.asm: Rewrite.
9959 * mpn/powerpc64/rshift.asm: Likewise.
9960 * mpn/powerpc64/mode64/lshiftc.asm: New file.
9961
9962 * mpn/powerpc64/aix.m4: Align functions to 32-byte boundary.
9963 * mpn/powerpc64/darwin.m4: Likewise.
9964 * mpn/powerpc64/elf.m4: Likewise.
9965
9966 2010-04-28 Niels Möller <[email protected]>
9967
9968 * tests/mpz/t-jac.c (check_data): Added some more test cases.
9969
9970 * mpn/generic/jacobi_lehmer.c (mpn_jacobi_2): Bugfix, count
9971 trailing zeros, not leading.
9972
9973 2010-04-27 Torbjorn Granlund <[email protected]>
9974
9975 * mpn/powerpc64/mode64/p6/mul_basecase.asm: New file.
9976
9977 2010-04-23 Niels Möller <[email protected]>
9978
9979 * gmp-impl.h (MPN_GCD_LEHMER_N_ITCH): Deleted.
9980 (mpn_gcd_lehmer_n): Deleted declaration.
9981
9982 * mpn/generic/gcd.c (gcd_2): Moved from gcd_lehmer.c.
9983 (mpn_gcd): Inlined the code from mpn_gcd_lehmer_n. Also use
9984 MPN_GCD_SUBDIV_STEP_ITCH rather than MPN_GCD_LEHMER_N_ITCH.
9985
9986 2010-04-22 Torbjorn Granlund <[email protected]>
9987
9988 * mpn/powerpc64/mode64/bdiv_dbm1c.asm: Swap multiply insns to make them
9989 consecutive, for the benefit of POWER6.
9990
9991 * mpn/powerpc64/mode64/p6/gmp-mparam.h: New file.
9992
9993 2010-04-21 Torbjorn Granlund <[email protected]>
9994
9995 * mpn/generic/gcd_lehmer.c: Deleted file.
9996
9997 * mpn/powerpc64/mode64/divrem_1.asm: Swap multiply insns to make them
9998 consecutive, for the benefit of POWER6.
9999 * mpn/powerpc64/mode64/dive_1.asm: Likewise.
10000 * mpn/powerpc64/mode64/divrem_2.asm: Likewise.
10001 * mpn/powerpc64/mode64/mul_1.asm: Likewise.
10002 * mpn/powerpc64/mode64/aorsmul_1.asm: Likewise.
10003
10004 * mpn/powerpc64/mode64/aorslshC_n.asm: Swap ldx operands as a temporary
10005 workaround for POWER6 pipeline glitch.
10006
10007 2010-04-19 Niels Möller <[email protected]>
10008
10009 * mpz/jacobi.c (mpz_jacobi): New implementation using
10010 mpn_jacobi_lehmer. Currently #if:ed out.
10011
10012 * mpn/generic/jacbase.c (mpn_jacobi_base)
10013 [JACOBI_BASE_METHOD < 4]: Support inputs with a >= b.
10014
10015 * gmp-impl.h (mpn_jacobi_lehmer): Added prototype.
10016 (jacobi_table): Declare.
10017 (mpn_jacobi_init): New inline function.
10018 (mpn_jacobi_finish): Likewise.
10019 (mpn_jacobi_update): Likewise.
10020
10021 * mpn/generic/jacobi_lehmer.c (mpn_jacobi_lehmer): New file, new
10022 function.
10023
10024 * configure.in (gmp_mpn_functions): Added jacobi_lehmer.
10025
10026 2010-04-14 Niels Möller <[email protected]>
10027
10028 * configure.in (gmp_mpn_functions): Added
10029 matrix22_mul1_inverse_vector.
10030 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added
10031 matrix22_mul1_inverse_vector.c.
10032
10033 * gmp-impl.h (mpn_matrix22_mul1_inverse_vector): Updated for
10034 rename of mpn_matrix22_mul1_inverse_vector.
10035 * mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Likewise.
10036 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Likewise.
10037 * mpn/generic/hgcd.c (hgcd_step): Likewise.
10038
10039 * mpn/generic/matrix22_mul1_inverse_vector.c
10040 (mpn_matrix22_mul1_inverse_vector): New file, function moved and
10041 renamed...
10042 * mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_inverse_vector):
10043 ...from here.
10044
10045 2010-04-12 Torbjorn Granlund <[email protected]>
10046
10047 * tests/mpn/t-toom6h.c (SIZE_LOG): Define.
10048 * tests/mpn/t-toom8h.c (SIZE_LOG): Likewise.
10049
10050 2010-04-10 Torbjorn Granlund <[email protected]>
10051
10052 * mpn/ia64/lorrshift.asm: Rewrite feed-in and wind-down code.
10053
10054 * mpn/ia64/aorslsh1_n.asm: Adapt to new aorslsh1_n.
10055 * mpn/ia64/aorslsh1_n.asm: Likewise.
10056
10057 * mpn/ia64/aors_n.asm: Complete rewrite.
10058 * mpn/ia64/aorslsh1_n.asm: Likewise.
10059
10060 * mpn/ia64/add_n_sub_n.asm: Misc cleanups. Add slotting comments.
10061
10062 * mpn/ia64/lshiftc.asm: New file.
10063
10064 * mpn/x86_64/pentium4/gmp-mparam.h: No longer disable rsh1add_n and
10065 rsh1sub_n; instead disable rsblsh1_n, addlsh2_n, rsblsh2_n.
10066
10067 * mpn/x86/divrem_2.asm: Use "orb" instead of "or" to work around
10068 Solaris assembler bug.
10069 * mpn/x86_64/mpn/x86_64/divrem_2.asm: Likewise.
10070
10071 * mpn/x86/aors_n.asm: Use operand-less shift-by-1 insn form.
10072 * mpn/x86/pentium/aors_n.asm: Likewise.
10073 * mpn/x86_64/invert_limb.asm: Likewise.
10074
10075 * mpn/x86_64/pentium4/aors_n.asm: Let non-nc code fall into nc code.
10076
10077 * mpn/x86_64/pentium4/rsh1aors_n.asm: New file.
10078
10079 2010-03-25 Torbjorn Granlund <[email protected]>
10080
10081 * mpn/ia64/add_n_sub_n.asm: New file.
10082
10083 * mpn/generic/toom33_mul.c: Fix mpn_add_n_sub_n usage.
10084 * mpn/generic/toom3_sqr.c: Likewise.
10085 * mpn/generic/toom63_mul.c: Likewise.
10086
10087 * mpn/generic/add_n_sub_n.c: Renamed from addsub_n.c.
10088
10089 2010-03-23 Torbjorn Granlund <[email protected]>
10090
10091 * mpn/x86_64/divrem_2.asm: Use mpn_invert_limb instead of div insn.
10092
10093 * mpn/ia64/aorslshC_n.asm: New file, generalised from last iteration of
10094 aorslsh1_n.asm.
10095 * mpn/ia64/aorslsh1_n.asm: Use aorslshC_n.asm.
10096 * mpn/ia64/aorslsh1_n.asm: New file, use aorslshC_n.asm.
10097
10098 2010-03-20 Torbjorn Granlund <[email protected]>
10099
10100 * mpn/powerpc64/mode64/invert_limb.asm: Rewrite to exploit cancellation
10101 in the Newton iteration.
10102
10103 2010-03-20 Marco Bodrato <[email protected]>
10104
10105 * mpn/generic/toom_interpolate_8pts.c: Use mpn_sublsh2_n.
10106
10107 2010-03-20 Torbjorn Granlund <[email protected]>
10108
10109 * mpn/powerpc64/mode64/aorslshC_n.asm: New file, generalised from
10110 last iteration of aorslsh1_n.asm.
10111 * mpn/powerpc64/mode64/aorslsh1_n.asm: Use aorslshC_n.asm.
10112 * mpn/powerpc64/mode64/aorslsh1_n.asm: New file, use aorslshC_n.asm.
10113
10114 2010-03-19 Torbjorn Granlund <[email protected]>
10115
10116 * mpn/x86_64/nano/dive_1.asm: New file.
10117
10118 * mpn/x86_64/divrem_1.asm: Avoid shld since it is slow on several CPU
10119 types. Unconditionally provide code for normalised and unnormalised
10120 divisors. Cleanup labels.
10121
10122 * mpn/x86_64/core2/divrem_1.asm: Remove special code for normalised
10123 divisors. Cleanup labels.
10124
10125 * mpn/generic/toom_interpolate_6pts.c: Call mpn_sublsh2_n and
10126 mpn_sublsh_n with correct args.
10127
10128 * tests/devel/try.c: Use enum for TYPE_*.
10129
10130 * tests/devel/try.c: Test mpn_sublsh2_n.
10131 * tests/refmpn.c (refmpn_sublsh2_n): New function.
10132 * tests/tests.h (refmpn_sublsh2_n): Declare.
10133
10134 * mpn/powerpc64/mode64/aorslsh1_n.asm: New file, with faster
10135 mpn_addlsh1_n and mpn_sublsh1_n.
10136 * mpn/powerpc64/mode64/addlsh1_n.asm: Delete.
10137 * mpn/powerpc64/mode64/sublsh1_n.asm: Delete.
10138
10139 2010-03-18 Torbjorn Granlund <[email protected]>
10140
10141 * configure.in (*-*-aix): Define gcc_32_cflags_maybe, ar_32_flags and
10142 nm_32_flags.
10143
10144 * mpn/x86/pentium4/sse2/addlsh1_n.asm: Tune for slightly better speed.
10145 Misc cleanups. Add cycle table.
10146
10147 * mpn/x86_64/copyi.asm: Update cycle table.
10148 * mpn/x86_64/copyd.asm: Likewise.
10149 * mpn/x86_64/rsh1aors_n.asm: Likewise.
10150 * mpn/x86_64/dive_1.asm: Likewise.
10151
10152 * mpn/x86/pentium4/sse2/add_n.asm: Misc cleanups. Add cycle table.
10153 * mpn/x86/pentium4/sse2/sub_n.asm: Likewise.
10154
10155 2010-03-16 Torbjorn Granlund <[email protected]>
10156
10157 * mpn/x86_64/divrem_1.asm: Use mpn_invert_limb instead of div insn.
10158 * mpn/x86_64/core2/divrem_1.asm: Likewise.
10159
10160 * tune/speed.c (routine): Add FLAG_R_OPTIONAL for many binops.
10161
10162 2010-03-15 Torbjorn Granlund <[email protected]>
10163
10164 * mpn/alpha/ev6/mod_1_4.asm (mpn_mod_1s_4p_cps): Rewrite.
10165
10166 * mpn/ia64/aors_n.asm: Insert explicitly typed nops to trigger intended
10167 bundling.
10168 * mpn/ia64/aorslsh1_n.asm: Likewise.
10169 * mpn/ia64/dive_1.asm: Likewise.
10170
10171 2010-03-13 Torbjorn Granlund <[email protected]>
10172
10173 * mpn/x86/pentium4/sse2/submul_1.asm: Rewrite.
10174
10175 * mpn/powerpc64/mode64/aorsmul_1.asm: New file, faster than old code
10176 for both mpn_addmul_1 and mpn_submul_1.
10177 * mpn/powerpc64/mode64/addmul_1.asm: Remove.
10178 * mpn/powerpc64/mode64/submul_1.asm: Remove.
10179
10180 2010-03-11 Niels Möller <[email protected]>
10181
10182 * mpn/generic/gcd_lehmer.c (gcd_2): Use sub_ddmmss.
10183
10184 * mpn/generic/jacbase.c (mpn_jacobi_base): Reorganized the
10185 JACOBI_BASE_METHOD 4 slightly. Now requires that b > 1.
10186
10187 2010-03-10 Torbjorn Granlund <[email protected]>
10188
10189 * mpn/x86_64/divrem_1.asm: Make fraction code take documented # of
10190 cycles. Annotate code for more CPUs. Misc cleanups.
10191 * mpn/x86_64/core2/divrem_1.asm: Annotate code for more CPUs.
10192
10193 * mpn/alpha/ev6/mod_1_4.asm: New file.
10194
10195 * mpn/ia64/mod_34lsub1.asm: New file.
10196
10197 * doc/gmp.texi (Language Bindings): Update Python site, add Ruby.
10198
10199 2010-03-10 Niels Möller <[email protected]>
10200
10201 * tune/tuneup.c (tune_jacobi_base): Consider mpn_jacobi_base_4.
10202 * tune/speed.c (routine): Added mpn_jacobi_base_4.
10203 * tune/common.c (speed_mpn_jacobi_base_4): New function.
10204 * tune/speed.h (speed_mpn_jacobi_base_4): Declare it.
10205 * tune/Makefile.am (libspeed_la_SOURCES): Added jacbase4.c.
10206 * tune/jacbase4.c: New file.
10207
10208 * mpn/generic/jacbase.c (mpn_jacobi_base): New function, for
10209 JACOBI_BASE_METHOD 4.
10210
10211 2010-03-09 Niels Möller <[email protected]>
10212
10213 * tests/mpz/t-jac.c (check_large_quotients): Also generate inputs
10214 with large quotients and a large gcd.
10215
10216 2010-03-09 Marco Bodrato <[email protected]>
10217
10218 * tests/mpz/t-bin.c (randomwalk): New test-generator function.
10219
10220 2010-03-07 Torbjorn Granlund <[email protected]>
10221
10222 * tune/speed.c (routine): Force r argument for several mod_1 calls.
10223
10224 2010-03-06 Torbjorn Granlund <[email protected]>
10225
10226 * mpn/x86_64/divrem_1.asm: Disable SPECIAL_CODE_FOR_NORMALIZED_DIVISOR.
10227 Misc clean up.
10228
10229 * mpn/x86_64/mod_1_1.asm: New file.
10230 * mpn/x86_64/mod_1_2.asm: New file.
10231 * mpn/x86_64/mod_1_4.asm: Update cycle counts.
10232
10233 * tests/tests.h (TESTS_REPS): Fix typo.
10234
10235 2010-03-03 Torbjorn Granlund <[email protected]>
10236
10237 * mpn/x86_64/core2/divrem_1.asm: New file.
10238
10239 2010-02-26 Niels Möller <[email protected]>
10240
10241 * tune/speed.c (routine): Added udiv_qrnnd_preinv3.
10242
10243 * tune/common.c (speed_udiv_qrnnd_preinv3): New function.
10244 * tune/speed.h: Added prototype for it.
10245
10246 2010-02-26 Niels Möller <[email protected]>
10247
10248 * tests/mpz/t-jac.c (check_large_quotients): New test. Currently
10249 disabled, since it's quite slow.
10250 (mpz_nextprime_step): New function.
10251
10252 2010-02-26 Torbjorn Granlund <[email protected]>
10253
10254 * mpn/pa64/aors_n.asm: Fix typo in last change.
10255
10256 2010-02-25 Niels Möller <[email protected]>
10257
10258 * tests/mpz/t-jac.c (ref_jacobi): New reference implementation,
10259 using factorization and legendre symbols computed by powm.
10260
10261 * tests/devel/try.c (param_init, call): Don't pass negative values
10262 for the second argument to mpz_jacobi and refmpz_jacobi.
10263
10264 * tests/refmpz.c (refmpz_jacobi): Require that b is odd and positive.
10265
10266 * tests/devel/try.c (param_init): Support mpz_legendre.
10267 (choice_array): Added mpz_kronecker (apparently forgotten) and
10268 mpz_legendre.
10269 (call): Added TYPE_MPZ_LEGENDRE.
10270 (try_one): Added support for DATA_SRC1_ODD_PRIME.
10271
10272 * tests/refmpz.c (refmpz_legendre): Rewrote using powm.
10273
10274 2010-02-25 Torbjorn Granlund <[email protected]>
10275
10276 * config.guess: Make "corei" default for unrecognised Intel P6 CPUs.
10277
10278 * tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb
10279 variables.
10280
10281 * tests/mpn/t-toom6h.c (COUNT): Define.
10282 * tests/mpn/t-toom8h.c (COUNT): Define.
10283
10284 * tests/mpn/t-div.c: Cast a switch index to placate HP's cc.
10285 * tests/mpn/t-bdiv.c: Likewise.
10286
10287 * mpn/pa64/aors_n.asm: Fix support of the 2.0n ABI.
10288
10289 2010-02-24 Marco Bodrato <[email protected]>
10290
10291 * tests/mpz/t-bin.c (data): Replace (2k,k), tested by twos ().
10292 * tests/mpf/t-inp_str.c (data): Test also "+" in the exponent.
10293
10294 2010-02-23 Torbjorn Granlund <[email protected]>
10295
10296 * mpn/generic/mod_1_3.c: Cast a switch index to placate HP's cc.
10297
10298 * mpn/generic/sqrtrem.c: Use CNST_LIMB.
10299
10300 2010-02-20 Niels Möller <[email protected]>
10301
10302 * tune/speed.h (mpn_gcd_accel): Deleted prototype.
10303 (mpn_hgcd_lehmer): New prototype.
10304 (MPN_HGCD_LEHMER_ITCH): New macro (previously in gmp-impl.h).
10305
10306 * tune/Makefile.am (libspeed_la_SOURCES): Added hgcd_lehmer.c.
10307 * tune/hgcd_lehmer.c: New file.
10308 * tune/gcd_accel.c: Deleted obsolete file.
10309
10310 * gmp-impl.h (MPN_HGCD_LEHMER_ITCH): Deleted macro.
10311
10312 * mpn/generic/hgcd.c (mpn_hgcd_lehmer): Deleted function,
10313 (mpn_hgcd): Don't call mpn_hgcd_lehmer, instead use inlined loop
10314 around hgcd_step.
10315 (mpn_hgcd_itch): Substitute n for MPN_HGCD_LEHMER_ITCH (n).
10316
10317 2010-02-19 Niels Möller <[email protected]>
10318
10319 * Makefile.am (mpn/jacobitab.h): Added the rules needed to
10320 generate this file.
10321
10322 * gen-jacobitab.c: New file.
10323
10324 2010-02-19 Torbjorn Granlund <[email protected]>
10325
10326 * mpn/generic/powm.c: Honour SQR_BASECASE_THRESHOLD in innerloop
10327 expansions.
10328
10329 2010-02-16 Niels Möller <[email protected]>
10330
10331 * tune/time.c (cgt_works_p): Added rudimentary sanity check for
10332 clock_gettime working.
10333
10334 2010-02-15 Niels Möller <[email protected]>
10335
10336 * tune/time.c (speed_time_init): Make use of cycle counter
10337 configurable, via the speed_option_cycles_broken flag.
10338 * tune/common.c (speed_option_cycles_broken): New global variable.
10339 (speed_option_set): Recognize option "cycles-broken".
10340
10341 * tune/time.c (cycles_works_p): Deleted hack to disable cycle
10342 counter on linux. Needs to be replaced by something more
10343 selective.
10344
10345 2010-02-11 Niels Möller <[email protected]>
10346
10347 * tune/time.c (speed_time_init): Fix speed_time_string when using
10348 clock_gettime.
10349 (cycles_works_p): On linux, don't use the cycle counter.
10350
10351 * tune/Makefile.am: Add $(TUNE_LIBS) when linking programs.
10352
10353 * configure.in: Check if -lrt is needed for clock_gettime, and if
10354 so, add that flag to TUNE_LIBS.
10355
10356 2010-02-07 Torbjorn Granlund <[email protected]>
10357
10358 * tune/tuneup.c (tune_redc): Set min_size and min_is_always when
10359 measuring REDC_1_TO_REDC_2_THRESHOLD.
10360 (tune_mod_1): Set min_size for PREINV_MOD_1_TO_MOD_1_THRESHOLD.
10361
10362 * mpn/x86_64/aorrlsh_n.asm (cnt): Fix a typo.
10363 * mpn/x86_64/lshsub_n.asm: Likewise.
10364
10365 2010-02-05 Torbjorn Granlund <[email protected]>
10366
10367 * Version 5.0.1 released.
10368
10369 * mpn/generic/powm.c: Use rp target area for power table computation in
10370 order to use less scratch.
10371
10372 * mpn/generic/binvert.c (mpn_binvert_itch): Enable more economical
10373 mpn_mulmod_bnm1_itch call.
10374
10375 * mpn/generic/mu_div_qr.c: Remove always true #if.
10376 * mpn/generic/mu_divappr_q.c: Likewise.
10377 * mpn/generic/mu_bdiv_q.c: Likewise.
10378 * mpn/generic/mu_bdiv_qr.c: Likewise.
10379
10380 2010-02-01 Torbjorn Granlund <[email protected]>
10381
10382 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
10383 Bump version info.
10384
10385 * mpn/powerpc64/mode64/gmp-mparam.h: Remove {MUL,SQR}_FFT_TABLE2.
10386 * mpn/x86/p6/gmp-mparam.h: Likewise.
10387 * mpn/x86/p6/mmx/gmp-mparam.h: Likewise.
10388 * mpn/generic/mul_fft.c: Don't depend on FFT_TABLE2, it was broken.
10389
10390 2010-01-29 Torbjorn Granlund <[email protected]>
10391
10392 * mpn/generic/mul_fft.c (mpn_mul_fft_internal): Remove arguments n, m,
10393 k and rec; add argument sqr. Don't call mpn_mul_fft_decompose here,
10394 instead do that in all callers.
10395 (mpn_mul_fft): Trim allocation when squaring, and use TMP_ALLOC*, not
10396 explicit alloc/free.
10397 (mpn_fft_div_2exp_modF): Avoid a scalar division.
10398 (mpn_fft_mul_modF_K): Replace some multiplies by K with shifting by k.
10399 (mpn_fft_mul_2exp_modF): Make function more symmetrical.
10400
10401 2010-01-27 Torbjorn Granlund <[email protected]>
10402
10403 * mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): Rewrite.
10404 * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Re-enable
10405 better mulmod itch estimate.
10406 * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
10407 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
10408 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
10409
10410 2010-01-27 Marco Bodrato <[email protected]>
10411
10412 * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Disabled guessed
10413 estimate, enabled a conservative one.
10414 * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
10415 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
10416 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
10417
10418 2010-01-26 Marco Bodrato <[email protected]>
10419
10420 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Partial rewrite to
10421 reduce memory usage.
10422 * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
10423 (mpn_sqrmod_bnm1_next_size): New function.
10424
10425 * gmp-impl.h (mpn_mulmod_bnm1_itch): Accepts 3 parameters now.
10426 (mpn_sqrmod_bnm1_itch): New inline function.
10427 (mpn_sqrmod_bnm1_next_size): Declaration and mangling.
10428 * mpn/generic/nussbaumer_mul.c: Use the new functions.
10429
10430 * mpn/generic/invertappr.c (mpn_ni_invertappr): Use new syntax for
10431 mpn_mulmod_bnm1_itch.
10432 * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
10433 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
10434 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
10435 * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Likewise.
10436 * mpn/generic/binvert.c (mpn_binvert_itch): Likewise.
10437 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): Likewise.
10438 (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Likewise.
10439
10440 * tests/mpn/t-sqrmod_bnm1.c, tests/mpn/t-mulmod_bnm1.c: Test
10441 reduced memory usage.
10442
10443 2010-01-25 Torbjorn Granlund <[email protected]>
10444
10445 * tune/tuneup.c (INSERT_FFTTAB): New macro, like old insertion code but
10446 also inserting a sentinel.
10447 (fftmes): Use INSERT_FFTTAB for inserting new measurements.
10448 Limit k range to best_k - 4 ... best_k + 4.
10449
10450 2010-01-23 Torbjorn Granlund <[email protected]>
10451
10452 * gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
10453 (__GMP_MP_RELEASE): New macro.
10454
10455 * mpf/div.c: Rewrite to use mpn_div_q.
10456
10457 2010-01-21 Torbjorn Granlund <[email protected]>
10458
10459 * Add FFT_TABLE3 tables for a basic set of machines.
10460
10461 * configure.in: Use -mtune=nocona for 64-bit pentium4.
10462
10463 * config.guess: Recognise many more Intel processors.
10464
10465 * tune/common.c: Whitespace cleanup.
10466 (speed_mpn_matrix22_mul): Rewrite.
10467
10468 2010-01-21 Niels Möller <[email protected]>
10469
10470 * mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Take
10471 advantage of new mpn_mulmod_bnm1 interface, to reduce allocation.
10472
10473 * tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1, main): Adapted to
10474 mpn_mulmod_bnm1 interface change.
10475
10476 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Interface change,
10477 in case an + bn < rn, only write an + bn output limbs. New input
10478 requirement, an + bn > rn/2.
10479 * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Corresponding
10480 changes.
10481
10482 2010-01-19 Torbjorn Granlund <[email protected]>
10483
10484 * tune/tuneup.c (fftmes): Round up initial n according to initial k.
10485 Limit k to 24 in loop. Remove an obsolete always-true condition.
10486 Remove a redundant trace printout.
10487
10488 2010-01-18 Torbjorn Granlund <[email protected]>
10489
10490 * tune/tuneup.c (fftmes): New function
10491 (fft): Rewrite.
10492 (mpn_mul_fft_lcm): New function, copied from mpn/generic/mul_fft.c.
10493 (fftfill): New function, code taken from mul_fft.c (mpn_mul_fft).
10494 (cached_measure): New function.
10495
10496 * gmp-impl.h (struct fft_table_nk): Moved from mul_fft.c.
10497 (MUL_FFT_TABLE3, SQR_FFT_TABLE3): Provide dummy versions for tuneup
10498 builds.
10499 (FFT_TABLE3_SIZE): Increase value for tuneup builds.
10500
10501 * mpn/generic/mul_fft.c: Handle a new FFT threshold table type ("3").
10502 Misc cleanups to old table type code.
10503
10504 2010-01-16 Torbjorn Granlund <[email protected]>
10505
10506 * mpn/x86_64/darwin.m4: Fix typo in last change.
10507
10508 2010-01-15 Torbjorn Granlund <[email protected]>
10509
10510 * gmp-h.in (__GMP_EXTERN_INLINE): Remove "extern" for newer Sun C.
10511
10512 * gmp-impl.h (GMP_LIMB_BYTES): New define.
10513
10514 * mpn/x86_64/darwin.m4 (LEA): New define.
10515
10516 * mpn/x86/invert_limb.asm (approx_tab): Use DEF_OBJECT.
10517 Rename and globalise it to work around Mac OS bug.
10518
10519 With Philip McLaughlin:
10520 * mpn/x86_64/gcd_1.asm (ctz_table): Don't use local prefix, but
10521 use DEF_OBJECT...END_OBJECT.
10522 Keep stack pointer at ABI mandated alignment over call.
10523
10524 2010-01-12 Torbjorn Granlund <[email protected]>
10525
10526 * tune/speed.c (routine): Remove obsolete mpn_dc_tdiv_qr and
10527 mpn_dc_div_qr_n.
10528 * tune/common.c (speed_mpn_dc_tdiv_qr, speed_mpn_dcpi1_div_qr_n):
10529 Remove now unused functions.
10530 * tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_N,
10531 SPEED_ROUTINE_MPN_DC_DIVREM_SB, SPEED_ROUTINE_MPN_DC_TDIV_QR): Remove
10532 now unused macros.
10533
10534 * mpn/x86_64/fat/fat_entry.asm (mpn_cpuid_available): Remove function.
10535
10536 * ltmain.sh: Upgrade from 1.5.24 to 2.2.6b.
10537 * ylwrap: New file.
10538 * .bootstrap: Remove explicit versions.
10539
10540 * doc/gmp.texi (Block-wise Barrett Division): New node.
10541
10542 * mpn/generic/powm.c: Change some #if to plain 'if' to avoid fat build
10543 problems.
10544
10545 2010-01-11 Torbjorn Granlund <[email protected]>
10546
10547 * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): Accept arguments for size
10548 restrictions.
10549 * tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
10550 (speed_mpn_sbpi1_divappr_q, speed_mpn_dcpi1_divappr_q): Pass size
10551 limits for SPEED_ROUTINE_MPN_PI1_DIV.
10552
10553 * tune/speed.c (routine): Allow .r argument for mpn_sbpi1_divappr_q and
10554 mpn_dcpi1_divappr_q.
10555
10556 2010-01-08 Torbjorn Granlund <[email protected]>
10557
10558 * Version 5.0.0 released.
10559
10560 * mpn/generic/div_q.c: Handle mpn_*_divappr_q returning high limb
10561 everywhere.
10562
10563 2010-01-07 Torbjorn Granlund <[email protected]>
10564
10565 * Update MUL_FFT_TABLE2 and SQR_FFT_TABLE2 for many machines.
10566
10567 * mpn/generic/mu_div_q.c: Account for divisor truncation error as well
10568 as mpn_mu_divappr_q's error.
10569
10570 * mpn/generic/mu_div_q.c: Handle mpn_preinv_mu_divappr_q returning a
10571 high limb.
10572
10573 * tests/mpn/t-bdiv.c: Move a random call for debugability.
10574 * tests/mpn/t-div.c: Likewise.
10575
10576 * mpn/generic/mu_divappr_q.c: Rewrite quotient round-up code.
10577
10578 * mpn/generic/mu_div_qr.c: Handle carry-out from a carry propagation
10579 subtract.
10580 * mpn/generic/mu_divappr_q.c: Likewise.
10581
10582 * mpn/generic/mu_divappr_q.c
10583 (mpn_preinv_mu_divappr_q, mpn_mu_divappr_q): Declare dividend constant.
10584 * gmp-impl.h: Likewise.
10585
10586 * perfpow.c (mpn_perfect_power_p): Call mpn_divexact instead of
10587 mpn_bdiv_q (with too little scratch space!).
10588
10589 From Niels Möller:
10590 * tests/mpn/t-div.c (check_one): Get rid of the poorly managed variable
10591 tn.
10592
10593 * mpn/minithres/gmp-mparam.h: Add all lately defined thresholds.
10594
10595 * mpn/generic/div_q.c: Use SB division for small quotients as well as
10596 small divisors. Fix typo in itch call.
10597
10598 2010-01-06 Niels Möller <[email protected]>
10599
10600 * tests/mpn/t-div.c (check_one): Checking based on multiplication,
10601 refmpn_mul, rather than refmpn_tdiv_qr.
10602
10603 2010-01-06 Marco Bodrato <[email protected]>
10604
10605 * mpn/generic/toom8h_mul.c: Avoid overflows of mp_size_t.
10606
10607 2010-01-06 Torbjorn Granlund <[email protected]>
10608
10609 * gmp-h.in (__GNU_MP__): Bump.
10610 (__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL):
10611 Bump version info.
10612 * mp-h.in (__GNU_MP__): Bump.
10613 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
10614 Bump version info.
10615
10616 * doc/gmp.texi: Rewrite mpn_gcdext text. Remove some out-of-date
10617 text in Algorithms chapter.
10618
10619 * mpn/generic/div_q.c: Properly handle np=scratch. Fix critical typo
10620 in final adjustment code. Misc cleanups.
10621
10622 * mpn/generic/rootrem.c: Use mpn_div_q.
10623 * mpz/tdiv_q.c: Likewise.
10624
10625 * tests/mpn/t-div.c: Test mpn_div_q.
10626 (SIZE_LOG): Up to 17.
10627
10628 * mpn/generic/div_q.c: New file.
10629 * configure.in (gmp_mpn_functions): Add div_q.
10630
10631 * mpn/generic/mu_div_q.c: Actually declare dividend constant.
10632
10633 2010-01-04 Torbjorn Granlund <[email protected]>
10634
10635 * tune/tuneup.c (fft): Separate tuning of modf and full products.
10636 (struct fft_param_t): New field, mul_modf_function.
10637 (tune_fft_sqr): Fix typo.
10638 (tune_fft_mul, tune_fft_sqr): Initialise mul_modf_function field.
10639 * tune/common.c (speed_mpn_fft_mul, speed_mpn_fft_sqr): New functions.
10640
10641 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.
10642
10643 * mpn/generic/mul.c: Simplify rational expression.
10644
10645 * gmp-impl.h: Cleanup threshold variables; remove obsolete ones and
10646 make all possibly needed definitions for existing ones.
10647 * tune/tuneup.c (tune_mul): Write fractions-compensated values to
10648 threshold variables.
10649
10650 2010-01-03 Marco Bodrato <[email protected]>
10651
10652 * tune/common.c, tune/speed.c, tune/speed.h: Support measuring
10653 mpn_toom43_mul.
10654
10655 * mpn/generic/toom_interpolate_6pts.c: Small reorganisation.
10656
10657 2010-01-03 Torbjorn Granlund <[email protected]>
10658
10659 * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
10660 INV_MULMOD_BNM1_THRESHOLD/2 instead.
10661
10662 * gmp-impl.h (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default
10663 here...
10664 * mpn/generic/invert.c, mpn/generic/invertappr.c: ...not here.
10665
10666 * tests/mpn/t-div.c: Rewrite operand generation code.
10667
10668 2010-01-02 Torbjorn Granlund <[email protected]>
10669
10670 * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
10671 INV_MULMOD_BNM1_THRESHOLD.
10672
10673 2010-01-02 Marco Bodrato <[email protected]>
10674
10675 * mpn/generic/dcpi1_div_q.c: Handle divappr approximation problem more
10676 efficiently.
10677 * mpn/generic/mu_div_q.c: Likewise.
10678
10679 * mpn/generic/invert.c: Remove duplicated code.
10680
10681 2010-01-01 Torbjorn Granlund <[email protected]>
10682
10683 * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to 0.
10684
10685 * mpn/generic/mu_div_qr.c: Rewrite to use mpn_mulmod_bnm1. Clean up
10686 scratch usage. Improve itch functions.
10687 * mpn/generic/mu_divappr_q.c: Likewise.
10688 * mpn/generic/mu_bdiv_qr.c: Likewise.
10689 * mpn/generic/mu_div_q.c: Likewise.
10690
10691 * mpn/generic/dcpi1_bdiv_qr.c: Add parameter ASSERTs.
10692 * mpn/generic/dcpi1_bdiv_q.c: Likewise.
10693
10694 * tests/mpn/t-bdiv.c: Replace with unit testing code, based on t-div.c.
10695 Increase COUNT to 500.
10696
10697 * tests/mpn/t-div.c: Avoid generating too small test operands.
10698 Move SB suppression limit downwards. Increase COUNT to 200.
10699
10700 2009-12-31 Torbjorn Granlund <[email protected]>
10701
10702 * mpn/generic/tdiv_qr.c: Handle numerator/remainder overlap in MU case.
10703
10704 * tests/tests.h (TESTS_REPS): New macro.
10705 * tests/mpz/dive.c: Use larger operands, decrease default reps, use
10706 TESTS_REPS.
10707 * tests/mpz/convert.c: Likewise.
10708 * tests/mpz/t-sqrtrem.c: Likewise.
10709 * tests/mpz/reuse: Likewise.
10710 * tests/mpz/t-root.c: Likewise.
10711 * tests/mpz/t-tdiv.c: Likewise.
10712 * tests/mpz/t-gcd.c: Likewise.
10713 * tests/mpz/t-powm.c: Likewise.
10714
10715 2009-12-31 Marco Bodrato <[email protected]>
10716
10717 * mpn/generic/toom8_sqr.c (SQR_TOOM8_MAX): Avoid overflow.
10718 * mpn/generic/toom6_sqr.c (SQR_TOOM6_MAX): Likewise.
10719
10720 * mpn/generic/mulmod_bnm1.c: Don't mention MISUSE any more,
10721 simply consider UNLIKELY any unexpected size.
10722
10723 2009-12-31 Torbjorn Granlund <[email protected]>
10724
10725 * tune/tuneup.c (speed_mpn_sbordcpi1_div_qr): New function.
10726 (tune_mu_div): Use it.
10727
10728 2009-12-30 Torbjorn Granlund <[email protected]>
10729
10730 * tune/tuneup.c (tune_mu_bdiv, tune_dc_bdiv, tune_mu_div)
10731 (tune_dc_div): Clear global s.r to make speed functions do 2n/n.
10732
10733 * tune/speed.c (routine): New entries for mpn_mu_div_qr and
10734 mpn_mupi_div_qr. Allow .r parameter for mpn_sbpi1_div_qr,
10735 mpn_dcpi1_div_qr.
10736 * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV, SPEED_ROUTINE_MPN_MU_DIV_QR)
10737 (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Handle .r parameter.
10738
10739 * tests/mpz/t-tdiv.c: Increase operands size again.
10740
10741 * mpn/generic/tdiv_qr.c: Attempt to choose between DC and MU cleverer.
10742
10743 * mpn/generic/tdiv_qr.c: Don't overwrite rp with unnecessary temporary
10744 alloc.
10745
10746 2009-12-29 Torbjorn Granlund <[email protected]>
10747
10748 * tune/tuneup.c (tune_mu_div): Tune MUPI_DIV_QR_THRESHOLD.
10749 * tune/speed.h (struct speed_params): Allow 3 source operands.
10750 (SPEED_ROUTINE_MPN_MUPI_DIV_QR): New macro.
10751 * tune/common.c (speed_mpn_mupi_div_qr): New function.
10752
10753 * mpn/generic/tdiv_qr.c: Call mpn_mu_div_qr.
10754
10755 * tests/mpz/t-tdiv.c: Use larger test operands.
10756
10757 * mpn/generic/mu_div_qr.c (mpn_mu_div_qr2): Remove code for dn==1.
10758
10759 * mpz/mul.c: Call mpn_sqr directly. Use PTR,SIZ,ALLOC.
10760
10761 * tune/tuneup.c (tune_mu_div): Set min_size to 6, DC functions require
10762 this.
10763
10764 * tests/mpn/t-div.c: Call mu_div functions with operands that generate
10765 a high quotient limb.
10766
10767 * mpn/generic/mu_div_qr.c: Rewrite to return a high quotient limb,
10768 to let dividend argument be constant, and as a general cleanup.
10769 * mpn/generic/mu_divappr_q.c: Likewise.
10770 * mpn/generic/mu_div_q.c: Likewise.
10771 * gmp-impl.h: Update declarations of changed functions.
10772
10773 * mpn/generic/invertappr.c (mpn_invertappr): Allocate scratch space
10774 when caller passed NULL.
10775
10776 2009-12-28 Torbjorn Granlund <[email protected]>
10777
10778 * mpn/generic/toom_couple_handling.c: Prefix name with mpn_.
10779 * gmp-impl.h: Likewise.
10780 * mpn/generic/toom63_mul.c: Likewise.
10781 * mpn/generic/toom6_sqr.c: Likewise.
10782 * mpn/generic/toom6h_mul.c: Likewise.
10783 * mpn/generic/toom8_sqr.c: Likewise.
10784 * mpn/generic/toom8h_mul.c: Likewise.
10785
10786 * configure.in (gmp_mpn_functions_optional) Move "com" from here...
10787 (gmp_mpn_functions): ...to here.
10788 * mpn/generic/com.c: New file.
10789 * (mpn_com): New name for mpn_com_n. Make public.
10790 * (mpn_neg): Analogous changes.
10791
10792 * tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Set step_factor.
10793
10794 * tune/common.c, tune/speed.c, tune/speed.h: Support measuring
10795 mpn_lshiftc.
10796
10797 * tests/devel/try.c: Test mpn_lshiftc.
10798 * tests/refmpn.c (refmpn_com): New function.
10799 (refmpn_lshiftc): Likewise.
10800
10801 * configure.in (gmp_mpn_functions_optional) Move lshiftc from here...
10802 (gmp_mpn_functions): ...to here.
10803 * mpn/generic/lshiftc.c: New file.
10804 * mpn/x86_64/lshiftc.asm: New file.
10805 * mpn/x86_64/core2/lshiftc.asm: New file.
10806 * mpn/generic/mul_fft.c (mpn_lshiftc): Remove.
10807
10808 * mpn/x86_64/core2/lshift.asm: Tweak for better Core iN performance.
10809 * mpn/x86_64/core2/rshift.asm: Likewise.
10810
10811 2009-12-27 Marco Bodrato <[email protected]>
10812
10813 * mpn/generic/mul.c: Use toom6h and toom8h for almost balanced.
10814
10815 * mpn/generic/mullo_n.c (mpn_dc_mullo_n): New ratio, to be used in
10816 Toom-8 range.
10817
10818 2009-12-27 Torbjorn Granlund <[email protected]>
10819
10820 * (mpn_sqr): New name for mpn_sqr_n. Many files affected.
10821
10822 * tune/tuneup.c (tune_mullo): Up step_factor for MULLO_MUL_N_THRESHOLD.
10823 (tune_invertappr, tune_invert, tune_binvert): Let max_size default.
10824
10825 * tune/tuneup.c (tune_mu_div, tune_mu_bdiv) New functions.
10826 * tune/speed.h (SPEED_ROUTINE_MPN_MU_DIV_Q): New macro.
10827 (SPEED_ROUTINE_MPN_MU_DIV_QR): Likewise.
10828 (SPEED_ROUTINE_MPN_MU_BDIV_Q): Likewise.
10829 (SPEED_ROUTINE_MPN_MU_BDIV_QR): Likewise.
10830 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add bdiv_q.c and bdiv_qr.c.
10831 * tune/common.c (speed_mpn_mu_div_qr): New function.
10832 (speed_mpn_mu_divappr_q): Likewise.
10833 (speed_mpn_mu_div_q): Likewise.
10834 (speed_mpn_mu_bdiv_q): Likewise.
10835 (speed_mpn_mu_bdiv_qr): Likewise.
10836
10837 * mpn/*/gmp-mparam.h: Fix incorrect MOD_1U_TO_MOD_1_1_THRESHOLD 0
10838 values.
10839
10840 * gmp-impl.h (MODEXACT_1_ODD_THRESHOLD): Remove.
10841 (BMOD_1_TO_MOD_1_THRESHOLD): New parameter, with the reverse meaning of
10842 MODEXACT_1_ODD_THRESHOLD.
10843 (MPN_MOD_OR_MODEXACT_1_ODD): Use BMOD_1_TO_MOD_1_THRESHOLD.
10844 * mpn/generic/divis.c, mpz/{cong.c,cong_ui.c,divis_ui.c}: Likewise.
10845 * tune/tuneup.c (tune_modexact_1_odd): Tune BMOD_1_TO_MOD_1_THRESHOLD;
10846 Do not assume native mpn_modexact_1_odd is faster than mpn_mod_1.
10847 (tuned_speed_mpn_mod_1): Remove variable.
10848 (tune_mod_1): Fix thinkos. Suppress printing of "always" etc.
10849 (all): Measure for divrem_1, mod_1, divexact_1, etc first, since Toom
10850 depends on some of them.
10851
10852 * mpn/generic/toom22_mul.c (TOOM22_MUL_REC): New name for
10853 TOOM22_MUL_MN_REC.
10854
10855 2009-12-26 Niels Möller <[email protected]>
10856
10857 * tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Relax
10858 requirements a bit.
10859
10860 * mpn/generic/toom32_mul.c (mpn_toom32_mul): Relax requirement on
10861 input sizes, to support s+t>=n (used to be s+t>=n+2). Keep high
10862 limbs of the evaluated values in scalar variables.
10863
10864 * mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Remove
10865 unused variables.
10866
10867 * mpn/generic/toom32_mul.c (mpn_toom32_mul): Fixed left-over use
10868 of mpn_addsub_n which should be mpn_add_n_sub_n.
10869
10870 2009-12-26 Marco Bodrato <[email protected]>
10871
10872 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add new toom files (spotted by Torbjorn).
10873
10874 * gmp-impl.h (mpn_toom6_sqr_itch): Rename to mpn_toom6_mul_n_itch and redefine.
10875 (mpn_toom8_sqr_itch): Rename to mpn_toom8_mul_n_itch and redefine.
10876 * mpn/generic/mul_n.c: Use renamed _itch macros.
10877
10878 2009-12-25 Niels Möller <[email protected]>
10879
10880 * tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Tightened requirements.
10881 * gmp-impl.h (mpn_toom32_mul_itch): Updated. Less scratch needed
10882 by toom32 itself, and also the pointwise multiplications are
10883 currently mpn_mul_n with no supplied scratch.
10884 * mpn/generic/toom32_mul.c (mpn_toom32_mul): Reorganized
10885 interpolation to use less scratch space. No longer supports the
10886 most extreme size ratios.
10887
10888 2009-12-25 Torbjorn Granlund <[email protected]>
10889
10890 * tune/tuneup.c (tune_preinv_mod_1): Purge.
10891 (tune_mod_1): Use speed_mpn_mod_1_tune for
10892 PREINV_MOD_1_TO_MOD_1_THRESHOLD
10893
10894 * mpn/generic/dcpi1_divappr_q.c: Handle 2n/n properly. Don't use full
10895 precision in mpn_sbpi1_divappr_q call. Misc cleanup.
10896
10897 * tune/tuneup.c (tune_mod_1): Add a check_size for
10898 PREINV_MOD_1_TO_MOD_1_THRESHOLD.
10899
10900 2009-12-24 Torbjorn Granlund <[email protected]>
10901
10902 * tune/mod_1_div.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
10903 (MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
10904 * tune/mod_1_inv.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
10905 (MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
10906
10907 * gmp-impl.h (USE_PREINV_MOD_1): Remove.
10908 (MPN_MOD_OR_PREINV_MOD_1): Define to choose functions dynamically in
10909 terms of PREINV_MOD_1_TO_MOD_1_THRESHOLD (used to choose statically
10910 using USE_PREINV_MOD_1).
10911 * mpn/generic/perfsqr.c (PERFSQR_MOD_PP): Corresponding updates.
10912
10913 * tune/tuneup.c (tune_mod_1): Rewrite.
10914 * gmp-impl.h (MOD_1N_TO_MOD_1_1_THRESHOLD): New.
10915 (MOD_1U_TO_MOD_1_1_THRESHOLD): New name for MOD_1_1_THRESHOLD.
10916 (MOD_1_1_TO_MOD_1_2_THRESHOLD): Mew name for MOD_1_2_THRESHOLD.
10917 (MOD_1_2_TO_MOD_1_4_THRESHOLD): New name for MOD_1_4_THRESHOLD.
10918 * mpn/generic/mod_1.c: Corresponding updates.
10919
10920 2009-12-24 Marco Bodrato <[email protected]>
10921
10922 * mpn/generic/mul_n.c: Use also toom6h and toom8h.
10923 * mpn/generic/sqr_n.c: Use also toom6 and toom8.
10924 * gmp-impl.h: Initial support for tuning of Toom-6half and Toom-8half.
10925 * tune/tuneup.c: Tune Toom-6half and Toom-8half thresholds.
10926
10927 2009-12-24 Torbjorn Granlund <[email protected]>
10928
10929 * mpn/generic/mod_1_4.c: Get ASSERT right.
10930 * mpn/generic/mod_1_3.c: Likewise.
10931 * mpn/generic/mod_1_2.c: Likewise.
10932
10933 * mpn/generic/powm_sec.c: Use SQR_TOOM2_THRESHOLD as limit for a native
10934 mpn_sqr_basecase, not TUNE_SQR_TOOM2_MAX.
10935
10936 2009-12-23 Marco Bodrato <[email protected]>
10937
10938 * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
10939 mpn_toom8h_mul and mpn_toom8_sqr speed.
10940
10941 * mpn/generic/toom_eval_pm2exp.c: Fix ASSERTs.
10942
10943 * mpn/generic/toom8h_mul.c: New file.
10944 * mpn/generic/toom8_sqr.c: New file.
10945 * mpn/generic/toom_interpolate_16pts.c: New file.
10946 * gmp-impl.h: Provide corresponding declarations.
10947 * configure.in (gmp_mpn_functions): List toom_interpolate_16pts,
10948 toom8h_mul, and toom8h_sqr.
10949 * tests/mpn/t-toom8h.c: New test program.
10950
10951 * mpn/generic/toom6_sqr.c: New file, was part of toom6h_mul.
10952 * mpn/generic/toom6h_mul.c: Removed _sqr.
10953
10954 * mpn/generic/mulmod_bnm1.c: Nailify CRT.
10955 * mpn/generic/sqrmod_bnm1.c: Likewise.
10956
10957 * mpn/generic/mullo_n.c: Split dc_mullo_n function;
10958 ALLOC memory at once.
10959
10960 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Update.
10961
10962 * mpn/generic/toom6h_mul.c: Add prefix to toom_interpolate_12pts.
10963 * mpn/generic/toom_interpolate_12pts.c: Likewise.
10964
10965 * mpn/generic/invertappr.c (mpn_bc_invertappr): Use mpn_divrem_2.
10966 * mpn/generic/invert.c: Faster basecase, use mpn_sbpi1_div_q.
10967
10968 * mpn/generic/toom_eval_pm2exp.c: Assert support for degree 3.
10969 * mpn/generic/toom6h_mul.c: Avoid obsolete _itch function.
10970
10971 2009-12-23 Torbjorn Granlund <[email protected]>
10972
10973 * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
10974 mpn_mod_1_1p, mpn_mod_1s_2p, mpn_mod_1s_3p, mpn_mod_1s_4p.
10975
10976 * tests/mpz/t-powm.c: Test mpz_powm_sec.
10977
10978 * mpz/powm_sec.c: New file.
10979 * gmp-h.in: Declare it.
10980 * Makefile.am, mpz/Makefile.am: Compile it.
10981 * doc/gmp.texi: Document it.
10982
10983 * mpn/generic/powm_sec.c (mpn_powm_sec_itch): New function.
10984 (mpn_powm_sec): Use passed scratch, no local allocation.
10985 Allow exp argument = 1.
10986 (win_size): Start loop from 1.
10987
10988 * mpn/generic/powm.c (win_size): Start loop from 1.
10989
10990 2009-12-22 Torbjorn Granlund <[email protected]>
10991
10992 * tests/mpn/t-div.c: New file.
10993 * tests/mpn/Makefile.am: Compile it.
10994
10995 * mpn/generic/mu_divappr_q.c: Handle quotient overflow.
10996
10997 * mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): New function.
10998
10999 2009-12-22 Niels Möller <[email protected]>
11000
11001 * mpn/generic/sbpi1_div_q.c: Use udiv_qr_3by2. Intended to change
11002 nothing after preprocessing.
11003
11004 * mpn/generic/sbpi1_divappr_q.c: For the last call to udiv_qr_3by2,
11005 avoid using memory locations as output parameters, and revert to
11006 explicitly copying n1 and n0 to memory.
11007
11008 * gmp-impl.h (udiv_qr_3by2): Tweaked to expand to precisely the
11009 same code as was used before the introduction of this macro.
11010 Eliminated some local variables, instead do multiple updates to
11011 the output parameters.
11012
11013 2009-12-22 Torbjorn Granlund <[email protected]>
11014
11015 * tests/mpn/t-toom6h.c (MIN_AN): Set to MUL_TOOM6H_THRESHOLD to avoid
11016 invalid recursive sizes.
11017
11018 * tests/mpn/t-bdiv.c: Get itch function calls right.
11019
11020 * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Rewrite.
11021 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify.
11022
11023 * mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Simplify, don't allocate.
11024 (mpn_bdiv_qr_itch): Conditionalise on MU_BDIV_QR_THRESHOLD.
11025
11026 2009-12-18 Niels Möller <[email protected]>
11027
11028 * tests/mpn/t-bdiv.c: Add red-zones.
11029
11030 2009-12-21 Torbjorn Granlund <[email protected]>
11031
11032 * mpn/generic/sbpi1_div_q.c: Fix fixup code to work for qn = 0.
11033
11034 * mpn/generic/dcpi1_divappr_q.c: Handle qn = 1 and qn = 2 for initial
11035 quotient block (code block copied from dcpi1_div_qr.c).
11036
11037 * mpn/generic/dcpi1_div_qr.c: Rewrite singular case giving q limb of
11038 GMP_NUMB_MAX. Remove an impossible qn = 0 case.
11039
11040 * mpn/generic/dcpi1_bdiv_q.c: Remove a spurious mpn_sub_1.
11041
11042 * mpn/generic/mul.c: Put back call to mpn_mul_n.
11043
11044 * tune/tuneup.c (all): Call tune_mulmod_bnm1 before tuning fft due to
11045 dependency on mulmod_bnm1 from both mul_fft_mul and from mullo_n.
11046
11047 * mpn/generic/dcpi1_divappr_q.c: ASSERT that dn >= 6 and nn > dn.
11048 * mpn/generic/dcpi1_div_q.c: ASSERT that dn >= 6 and nn-dn >= 3.
11049 * mpn/generic/dcpi1_div_qr.c: ASSERT that dn >= 6 and nn-dn >= 3.
11050
11051 * mpn/generic/bdiv_q_1.c (mpn_pi1_bdiv_q_1): Renamed from
11052 mpn_bdiv_q_1_pi1.
11053 * All references changed.
11054
11055 * configure.in: Add --enable-old-fft-full.
11056 * tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on
11057 WANT_OLD_FFT_FULL.
11058 * tune/common.c (speed_mpn_mul_fft_full)
11059 (speed_mpn_mul_fft_full_sqr): Likewise.
11060 * mpn/generic/mul_fft.c (mpn_mul_fft_full): Include iff
11061 WANT_OLD_FFT_FULL.
11062
11063 2009-12-21 Marco Bodrato <[email protected]>
11064
11065 * gmp-impl.h (mpn_toom6h_mul_itch): New inline function.
11066 (MUL_TOOM6H_THRESHOLD): Default value.
11067 (SQR_TOOM6_THRESHOLD): Default value.
11068 * mpn/generic/toom6h_mul.c: Remove definitions moved to gmp-impl.h.
11069 * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
11070 mpn_toom6h_mul and mpn_toom6_sqr speed.
11071
11072 * mpn/generic/toom63_mul.c: Remove unused TMP_*.
11073
11074 * mpn/generic/toom_eval_pm2rexp.c: New file.
11075 * gmp-impl.h: Provide corresponding declaration.
11076 * configure.in (gmp_mpn_functions): List toom_eval_pm2rexp.
11077 * mpn/generic/toom6h_mul.c: Use shared toom_eval_pm2rexp.
11078
11079 * mpn/generic/toom_couple_handling.c: New file, helper function
11080 for high degree Toom.
11081 * gmp-impl.h: Provide corresponding declaration.
11082 * configure.in (gmp_mpn_functions): List toom_couple_handling.
11083 * mpn/generic/toom6h_mul.c: Use shared toom_couple_handling.
11084 * mpn/generic/toom63_mul.c: Likewise.
11085
11086 * mpn/generic/toom6h_mul.c: New file.
11087 * mpn/generic/toom_interpolate_12pts.c: New file.
11088 * gmp-impl.h: Provide corresponding declarations.
11089 * configure.in (gmp_mpn_functions): List toom_interpolate_12pts,
11090 toom6h_mul.
11091 * tests/mpn/t-toom6h.c: New test program.
11092
11093 * tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1): Use ref_mul.
11094 * tests/mpn/t-sqrmod_bnm1.c (ref_sqrmod_bnm1): Likewise.
11095
11096 2009-12-20 Marco Bodrato <[email protected]>
11097
11098 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): New CRT.
11099 * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
11100
11101 2009-12-20 Torbjorn Granlund <[email protected]>
11102
11103 * Change all bit counts for bignums to use mp_bitcnt_t.
11104
11105 * mpn/generic/bdivmod.c: File removed. All references purged.
11106
11107 * mpn/generic/mul_fft.c (mpn_mul_fft_full): Disable.
11108
11109 * gmp-impl.h: Define mpn_fft_mul as an alias for mpn_nussbaumer_mul.
11110 * mpn/generic/mul.c: Refer mpn_fft_mul.
11111 * mpn/generic/mul_n.c: Likewise.
11112 * mpn/generic/sqr_n.c: Likewise.
11113 * mpn/generic/mullo_n.c: Likewise.
11114
11115 * mpn/generic/mul.c: Loop also over mpn_nussbaumer_mul, as suggested by
11116 Marco. Use TMP_SALLOC_LIMBS in more places. Clean up ws allocation.
11117
11118 2009-12-19 Marco Bodrato <[email protected]>
11119
11120 * mpn/generic/toom_interpolate_8pts.c: Nailify.
11121
11122 2009-12-19 Torbjorn Granlund <[email protected]>
11123
11124 * mpn/generic/mul.c: Major rewrite. Use toom43, toom53, toom63.
11125 Call mpn_nussbaumer_mul for largest operands.
11126
11127 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL): New macro.
11128 (SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL): New macro.
11129 (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL): New macro.
11130 (SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL): New macro.
11131 (SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL): New macro.
11132 (SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL): New macro.
11133 * tune/common.c (speed_mpn_toom63_mul): New function.
11134 (speed_mpn_toom32_for_toom43_mul): New function.
11135 (speed_mpn_toom43_for_toom32_mul): New function.
11136 (speed_mpn_toom32_for_toom53_mul): New function.
11137 (speed_mpn_toom53_for_toom32_mul): New function.
11138 (speed_mpn_toom42_for_toom53_mul): New function.
11139 (speed_mpn_toom53_for_toom42_mul): New function.
11140 * tune/tuneup.c (tune_mul_n): New name for old tune_mul.
11141 (tune_sqr_n): New name for old tune_sqr.
11142 (tune_mul): New function, for unbalanced multiplication.
11143 * gmp-impl.h: Provide declarations for corresponding threshold vars.
11144
11145 * gmp-impl.h (mpn_rsh1add_nc, mpn_rsh1sub_nc): Declare.
11146 * mpn/asm-defs.m4: Likewise.
11147 * configure.in: Add corresponding HAVE_NATIVEs.
11148 * mpn/x86_64/rsh1aors_n.asm: Add _nc entry point.
11149
11150 2009-12-18 Niels Möller <[email protected]>
11151
11152 * mpz/divexact.c: Rewrite to use mpn_divexact.
11153
11154 * mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Deleted some unused
11155 variables.
11156
11157 * mpn/generic/toom52_mul.c (mpn_toom52_mul)
11158 [HAVE_NATIVE_mpn_add_n_sub_n]: Moved declaration of cy to avoid a
11159 compiler warning.
11160
11161 * gmp-impl.h (gmp_pi1_t): Eliminated inv21 member.
11162 (invert_pi1): ...and don't store it here.
11163
11164 * mpn/generic/toom63_mul.c (mpn_toom63_mul): Simplified
11165 calculation of block size n.
11166 * gmp-impl.h (mpn_toom63_mul_itch): Likewise.
11167
11168 * mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Fixed
11169 output asserts.
11170
11171 2009-12-18 Torbjorn Granlund <[email protected]>
11172
11173 * tests/mpn/t-toom63.c: New test program.
11174
11175 2009-12-18 Marco Bodrato <[email protected]>
11176
11177 * mpn/generic/invert.c: Nailify.
11178 * mpn/generic/invertappr.c: Nailify.
11179 * mpn/generic/mulmod_bnm1.c: Nailify.
11180 * mpn/generic/sqrmod_bnm1.c: Nailify.
11181
11182 * tests/mpn/t-invert.c: New test program.
11183
11184 * mpn/generic/toom63_mul.c: New file.
11185 * mpn/generic/toom_interpolate_8pts.c: New file.
11186 * gmp-impl.h: Provide corresponding declarations.
11187 * configure.in (gmp_mpn_functions): List toom_interpolate_8pts and
11188 toom63_mul.
11189
11190 2009-12-17 Torbjorn Granlund <[email protected]>
11191
11192 * mpn/generic/mul.c: Move allocation of ws to where it is used.
11193 Identify toom22, 32, 42, in that order (in two places). Use midline
11194 between toom22, 32, 42.
11195 * mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): Call also
11196 mpn_toom32_mul.
11197
11198 * doc/gmp.texi: Update References section. Update Contributors
11199 section. Misc updates.
11200
11201 * gmp-impl.h: Renew default values for all THRESHOLDs.
11202
11203 2009-12-17 Niels Möller <[email protected]>
11204
11205 * mpn/generic/divexact.c (mpn_divexact): Don't require that the
11206 dividend is normalized. Use MPN_DIVREM_OR_PREINV_DIVREM_1. When
11207 shifting, allocate and process only the low qn+1 limbs. Eliminated
11208 code for the impossible case nn < qn.
11209
11210 * mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): Added some input
11211 asserts.
11212
11213 * mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): In the case that
11214 the initial quotient block is a single limb, use 3/2 division,
11215 thereby eliminating the only use of gmp_pi1_t->inv21.
11216
11217 2009-12-17 Marco Bodrato <[email protected]>
11218
11219 * mpn/generic/invert.c: Added some comment.
11220 * mpn/generic/invertappr.c: Slightly better threshold handling.
11221 * gmp-impl.h (INV_NEWTON_THRESHOLD): Default to 200.
11222
11223 * mpn/generic/nussbaumer_mul.c: New file.
11224 * configure.in (gmp_mpn_functions): Add nussbaumer_mul.
11225 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add nussbaumer_mul.
11226 * gmp-impl.h (mpn_nussbaumer_mul): Added prototype and name-mangling.
11227 * tune/speed.h (speed_mpn_nussbaumer_mul): Declare function.
11228 * tune/common.c (speed_mpn_nussbaumer_mul): New function.
11229 * tune/speed.c (routine): Add speed_mpn_nussbaumer_mul.
11230
11231 * mpn/generic/sqrmod_bnm1.c: New file.
11232 * configure.in (gmp_mpn_functions): Add sqrmod_bnm1.
11233 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrmod_bnm1.
11234 * gmp-impl.h (mpn_sqrmod_bnm1): Added prototype and name-mangling.
11235 (SQRMOD_BNM1_THRESHOLD): support for the new threshold.
11236 * tune/speed.h (speed_mpn_sqrmod_bnm1): Declare function.
11237 * tune/common.c (speed_mpn_sqrmod_bnm1): New function.
11238 * tune/speed.c (routine): Add speed_mpn_sqrmod_bnm1.
11239 * tests/mpn/t-mulmod_bnm1.c: Attribution.
11240 * tests/mpn/t-sqrmod_bnm1.c: New test file.
11241 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-sqrmod_bnm1.
11242
11243 * tune/tuneup.c: Tune SQRMOD_BNM1_THRESHOLD.
11244
11245 * mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Mimic fft_mul,
11246 use squaring if operands coincide.
11247 * tune/speed.h (speed_mpn_nussbaumer_mul_sqr): Declare function.
11248 * tune/common.c (speed_mpn_nussbaumer_mul_sqr): New function.
11249 * tune/speed.c (routine): Add speed_mpn_nussbaumer_mul_sqr.
11250
11251 2009-12-17 Torbjorn Granlund <[email protected]>
11252
11253 * mpn/generic/bdiv_q.c (mpn_bdiv_q_itch): Rewrite.
11254
11255 2009-12-16 Torbjorn Granlund <[email protected]>
11256
11257 * tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul
11258 instead of refmpn_mul_basecase.
11259 * tests/mpn/toom-shared.h: Likewise.
11260 * tests/refmpn.c (refmpn_mullo_n,refmpn_sqr,refmpn_mul_any): Likewise.
11261
11262 * minithres/gmp-mparam.h: Add new thresholds, trim old values.
11263
11264 * mpn/generic/powm.c: Use mp_bitcnt_t for bit counts.
11265 Handle REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD in
11266 non-WANT_REDC_2 INNERLOOP expansion code.
11267 * mpn/generic/powm_sec.c: Use mp_bitcnt_t for bit counts.
11268
11269 2009-12-16 Niels Möller <[email protected]>
11270
11271 * tests/mpz/t-gcd.c (main): Added test case to exercise the
11272 unlikely u0 == u1 case in mpn_gcdext_lehmer_n.
11273
11274 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Get ASSERT
11275 right.
11276
11277 2009-12-16 Torbjorn Granlund <[email protected]>
11278
11279 * tests/mpz/t-mul.c: Misc cleanups.
11280 (mul_basecase): Remove.
11281 (ref_mpn_mul): Remove.
11282 * tests/refmpn.c (refmpn_mul): New function, mainly from t-mul.c's
11283 ref_mpn_mul.
11284 (refmpn_mullo_n): Add a missing free.
11285
11286 * tune/speed.c (routine): Measure speed_mpn_{sb,dc}pi1_div_qr,
11287 mpn_{sb,dc}pi1_divappr_q, mpn_{sb,dc}pi1_bdiv_qr, and
11288 mpn_{sb,dc}pi1_bdiv_q.
11289
11290 * mpn/generic/invertappr.c: New file, meat from invert.c.
11291 * mpn/generic/invert.c: Leave just mpn_invert.c.
11292 * configure.in (gmp_mpn_functions): Add invertappr.
11293 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invertappr.c.
11294 * gmp-impl.h (mpn_invert_itch, mpn_invertappr_itch): New macros.
11295
11296 2009-12-15 Torbjorn Granlund <[email protected]>
11297
11298 * mpn/generic/gcdext_subdiv_step.c: Get an ASSERT right.
11299
11300 2009-12-15 Niels Möller <[email protected]>
11301
11302 * mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): A very small step
11303 towards nail support.
11304
11305 2009-12-15 Marco Bodrato <[email protected]>
11306
11307 * gmp-impl.h (mpn_ni_invertappr): Added prototype and name-mangling.
11308 * mpn/generic/mulmod_bnm1.c: Comment representation of class [0].
11309
11310 2009-12-14 Niels Möller <[email protected]>
11311
11312 * mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Use
11313 udiv_qr_3by2.
11314
11315 2009-12-14 Torbjorn Granlund <[email protected]>
11316
11317 * tune/tuneup.c (tune_binvert): Remove BINV_MULMOD_BNM1_THRESHOLD
11318 tuning, it was always zero and caused BINV_NEWTON_THRESHOLD to be
11319 wrong (as pointed out by Marco).
11320 * (BINV_MULMOD_BNM1_THRESHOLD): Clean from other files too.
11321
11322 2009-12-14 Marco Bodrato <[email protected]>
11323
11324 * mpn/generic/invert.c: Improved comments.
11325 (mpn_bc_invertappr): Conditionally re-enable mpn_dcpi1_divappr_q.
11326
11327 2009-12-14 Niels Möller <[email protected]>
11328
11329 * gmp-impl.h (udiv_qr_3by2): Fix typo in argument list.
11330
11331 2009-12-13 Niels Möller <[email protected]>
11332
11333 * gmp-impl.h (udiv_qr_3by2): New macro.
11334 * mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): Use udiv_qr_3by2.
11335
11336 2009-12-13 Torbjorn Granlund <[email protected]>
11337
11338 * mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q): Avoid a buffer
11339 overrun.
11340
11341 * mpn/generic/mul_fft.c (mpn_mul_fft_full): Handle carry-out from 2nd
11342 mpn_mul_fft, add an ASSERT for the 1st mpn_mul_fft. Replace some
11343 comments on cc's range with ASSERTs.
11344
11345 * mpn/generic/gcdext.c (compute_v): Normalise tp[] after mpn_mul.
11346
11347 * mpz/powm.c: Rework buffer handling.
11348
11349 2009-12-13 Niels Möller <[email protected]>
11350
11351 * tests/mpn/toom-shared.h (main): Use refmpn_mul_basecase to check
11352 results (slow!). Iteration counts of all toom tests reduced
11353 considerably.
11354
11355 2009-12-13 Marco Bodrato <[email protected]>
11356
11357 * mpn/generic/invert.c (mpn_invertapp): Split in _bc and _ni.
11358 (mpn_bc_invertappr): New function, the basecase.
11359 (mpn_ni_invertapp): New function, Newton iteration.
11360 (mpn_invert): Use mpn_ni_invertapp.
11361 * tune/tuneup.c (tune_invert): Min for INV_APPR_THRESHOLD.
11362 (tune_invertappr): Min for INV_NEWTON_THRESHOLD.
11363
11364 * tune/speed.h (SPEED_ROUTINE_MPN_NI_INVERTAPPR): New macro.
11365 (speed_mpn_ni_invertappr): Declare function.
11366 * tune/common.c (speed_mpn_ni_invertappr): New function.
11367 * tune/speed.c (routine): Add speed_mpn_ni_invertappr.
11368
11369 * tune/tuneup.c (tune_invertappr): Use speed_mpn_ni_invertappr to
11370 tune INV_MULMOD_BNM1_THRESHOLD.
11371
11372 2009-12-12 Torbjorn Granlund <[email protected]>
11373
11374 * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Rewrite.
11375
11376 2009-12-12 Marco Bodrato <[email protected]>
11377
11378 * tests/mpn/t-mulmod_bnm1.c (main): Disable B^n+1 stressing test
11379 for odd sizes.
11380
11381 * mpn/generic/invert.c: Complete rewrite. Uses Newton iterations.
11382 * gmp-impl.h (mpn_invertappr): Added prototype and name-mangling.
11383 (mpn_invertappr_itch): Added prototype and name-mangling.
11384 (INV_APPR_THRESHOLD): Support for a new tunable const.
11385 * tune/speed.h (SPEED_ROUTINE_MPN_INVERTAPPR): New macro.
11386 (speed_mpn_invertappr): Declare function.
11387 * tune/common.c (speed_mpn_invertappr): New function.
11388 * tune/speed.c (routine): Add speed_mpn_invertappr.
11389 * tune/tuneup.c (tune_invertappr): New function: was tune_invert.
11390 (tune_invert): Now tune only INV_APPR_THRESHOLD.
11391 (all): Enable call to tune_invert and tune_invertappr.
11392
11393 2009-12-11 Torbjorn Granlund <[email protected]>
11394
11395 * mpn/generic/binvert.c: Use mpn_mulmod_bnm1 instead of FFT wrapping.
11396 Old, evidently broken wrapping code removed.
11397 * tune/tuneup.c (tune_binvert): Tune BINV_MULMOD_BNM1_THRESHOLD.
11398 * gmp-impl.h: Provide declarations for corresponding threshold var.
11399
11400 * tests/mpn/t-bdiv.c (COUNT): Decrease to keep run time reasonable.
11401
11402 * tune/tuneup.c (tune_invert): Tune INV_MULMOD_BNM1_THRESHOLD.
11403 * gmp-impl.h: Provide declarations for corresponding threshold var.
11404
11405 * tests/mpn/t-mulmod_bnm1.c: Avoid a division by zero.
11406
11407 * configure.in: Set up different paths for different 64-bit sparc
11408 processors.
11409 * mpn/sparc64/ultrasparc34/gmp-mparam.h: New file.
11410
11411 2009-12-10 Torbjorn Granlund <[email protected]>
11412
11413 * mpn/*/gmp-mparam.h: Regenerate many of these files.
11414
11415 2009-12-10 Niels Möller <[email protected]>
11416
11417 * gmp-impl.h (mpn_divexact): Removed scratch pointer from
11418 prototype.
11419 * mpn/generic/gcdext.c (divexact): Deleted, moved to...
11420 * mpn/generic/divexact.c (mpn_divexact): New implementation (moved
11421 from gcdext.c). The bidirectional divexact is kept but #if:ed out.
11422 Interface change, since the new code doesn't take a scratch
11423 argument.
11424
11425 * tests/mpn/t-mulmod_bnm1.c (main): Ensure that an >= bn. Lowered
11426 MIN_N to 1. Various fixes to handle n == 1 properly.
11427
11428 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Small interface
11429 change, require an >= bn.
11430
11431 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Fixed non-recursive
11432 case to not write beyond end of result area.
11433
11434 2009-12-09 Torbjorn Granlund <[email protected]>
11435
11436 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): New macro, made
11437 from now deleted SPEED_ROUTINE_MPN_MULMOD_BNM1.
11438 * tune/common.c (speed_mpn_bc_mulmod_bnm1): New function.
11439 (speed_mpn_mulmod_bnm1): Use SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL.
11440 * tune/speed.c (routine): Add mpn_bc_mulmod_bnm1.
11441
11442 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
11443
11444 * tune/tuneup.c (tune_mulmod_bnm1): Rewrite.
11445
11446 2009-12-08 Marco Bodrato <[email protected]>
11447
11448 * mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnm1,
11449 mpn_bc_mulmod_bnp1): Added a parameter for scratch area, possibly
11450 same as result area (as suggested by Niels Möller).
11451 (mpn_mulmod_bnm1): Calls changed accordingly.
11452
11453 2009-12-08 Niels Möller <[email protected]>
11454
11455 * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Use
11456 table lookup for count_trailing_zeros. Binary algorithm still
11457 disabled by default.
11458
11459 * mpn/generic/gcdext.c (divexact): Local definition of divexact,
11460 using mpn_bdiv_q.
11461 (compute_v): Use it.
11462
11463 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-bdiv.
11464
11465 * tests/mpn/t-bdiv.c: New file.
11466
11467 * mpn/generic/bdiv_q.c (mpn_bdiv_q): Fixed bad quotient length,
11468 should have qn == nn.
11469
11470 * mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Pass correct nn length to
11471 the lower-level functions.
11472
11473 2009-12-08 Torbjorn Granlund <[email protected]>
11474
11475 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): New define.
11476 * tune/common.c (speed_mpn_mulmod_bnm1_rounded): New function.
11477 * tune/speed.c (routine): Add mpn_mulmod_bnm1_rounded for measuring
11478 mpn_mulmod_bnm1 at recommended sizes.
11479
11480 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
11481 (mpn_bc_mulmod_bnm1): Use mpn_add_n instead of mpn_add.
11482
11483 * tune/speed.c (routine): Add mpn_invert.
11484
11485 * tune/tuneup.c (tune_invert): New function.
11486 * tune/speed.h (SPEED_ROUTINE_MPN_INVERT): New macro.
11487 * tune/common.c (speed_mpn_invert): New function.
11488 * gmp-impl.h: Provide declarations for corresponding threshold var.
11489 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invert.c.
11490
11491 2009-12-08 Marco Bodrato <[email protected]>
11492
11493 * tests/devel/try.c: Test mpn_addlsh2_n and mpn_{add,sub}lsh_n;
11494 mpn_rsblsh_n now tests all shift values.
11495 * tests/refmpn.c (refmpn_addlsh_n, refmpn_sublsh_n): New functions.
11496 (refmpn_addlsh1_n): Use generic refmpn_addlsh_n.
11497 (refmpn_sublsh1_n): Use generic refmpn_sublsh_n.
11498 (refmpn_addlsh2_n): New function.
11499 * tests/tests.h: Declare new functions.
11500
11501 2009-12-06 Torbjorn Granlund <[email protected]>
11502
11503 * tune/tuneup.c (tune_mulmod_bnm1): Up min_size to 12.
11504
11505 * Globally: Rename *mullow* to *mullo*, *MULLOW* to *MULLO*.
11506
11507 * configure.in: Don't include ev5 directory for ev6* and ev7. Misc
11508 alpha path cleanups.
11509 * mpn/alpha/add_n.asm: Replaced by mpn/alpha/ev5/add_n.asm.
11510 * mpn/alpha/sub_n.asm: Replaced by mpn/alpha/ev5/sub_n.asm.
11511 * mpn/alpha/lshift.asm: Replaced by mpn/alpha/ev5/lshift.asm.
11512 * mpn/alpha/rshift.asm: Replaced by mpn/alpha/ev5/rshift.asm.
11513 * mpn/alpha/com_n.asm: New, moved from mpn/alpha/ev5/rshift.asm.
11514 * mpn/alpha/ev5/diveby3.asm: New, moved from mpn/alpha/diveby3.asm.
11515
11516 * mpn/powerpc64/mode64/diveby3.asm: Remove, it is slower than
11517 mpn_bdiv_dbm1c on all hardware.
11518
11519 * mpn/generic/powm_sec.c: Rework logic for mpn_sqr_basecase size limit.
11520
11521 * gmp-impl.h (mpn_redc_1_sec): Declare.
11522 * configure.in (gmp_mpn_functions): Add redc_1_sec.
11523
11524 2009-12-06 Marco Bodrato <[email protected]>
11525
11526 * tests/devel/try.c (try_one): DATA_SRC0_HIGHBIT sets the high bit.
11527
11528 2009-12-05 Marco Bodrato <[email protected]>
11529
11530 * mpn/generic/toom_eval_dgr3_pm1.c: Change return value: 0 or ~0.
11531 * mpn/generic/toom_eval_dgr3_pm2.c: Likewise.
11532 * mpn/generic/toom_eval_pm1.c: Likewise.
11533 * mpn/generic/toom_eval_pm2exp.c: Likewise.
11534 * mpn/generic/toom_eval_pm2.c: Rewrite to use mpn_addlsh2_n.
11535
11536 * mpn/generic/toom_interpolate_5pts.c: Param sa is a flag, not a sign.
11537
11538 * mpn/generic/toom33_mul.c: Adapt to changes above.
11539 * mpn/generic/toom3_sqr.c: Likewise.
11540 * mpn/generic/toom42_mul.c: Likewise.
11541 * mpn/generic/toom43_mul.c: Reduce branches.
11542 * mpn/generic/toom44_mul.c: Likewise.
11543 * mpn/generic/toom53_mul.c: Likewise.
11544 * mpn/generic/toom62_mul.c: Likewise.
11545
11546 * mpn/generic/toom52_mul.c: Use toom_eval_ functions.
11547
11548 * mpn/generic/toom4_sqr.c: Avoid C99 construct.
11549 * mpn/generic/toom_interpolate_7pts.c: Likewise.
11550
11551 2009-12-05 Torbjorn Granlund <[email protected]>
11552
11553 * mpn/generic/redc_1_sec.c: New file.
11554 * mpn/generic/powm_sec.c: Use redc_1_sec. Use dummy full subtract
11555 instead of mpn_cmp since the latter leaks to the side channel.
11556 (mpn_local_sqr_n): New function, with associated macros.
11557 (mpn_powm_sec): Use mpn_local_sqr_n.
11558
11559 * configure.in (HAVE_NATIVE): Add missing functions, then sort.
11560
11561 2009-12-04 Torbjorn Granlund <[email protected]>
11562
11563 * tune/tuneup.c (tune_dc_div): Up min_size to 6.
11564 (tune_mod_1): Set MOD_1_1_THRESHOLD min_size to 2.
11565
11566 * tune/speed.h: Negate "binvert"-type inverses, as required.
11567
11568 * mpn/generic/redc_1.c: Add ASSERTs.
11569 * mpn/generic/redc_2.c: Likewise.
11570
11571 * mpn/generic/sbpi1_bdiv_q.c: Simplify loops, indexing.
11572
11573 2009-12-03 Yann Droneaud <[email protected]>
11574
11575 * acinclude.m4 ([long long reliability test 1]): Add a "static" for C99
11576 inline semantics compatibility.
11577
11578 2009-12-03 Torbjorn Granlund <[email protected]>
11579
11580 * configure.in: Move intptr_t test into common AC_CHECK_TYPES.
11581
11582 * mpn/generic/gcdext.c: Add a TMP_FREE.
11583
11584 2009-12-03 Niels Möller <[email protected]>
11585
11586 * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
11587 Added various masking tricks.
11588
11589 * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
11590 Reimplemented binary gcdext, with proper canonicalization.
11591
11592 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Handle v == 0
11593 from mpn_gcdext_1.
11594 * mpn/generic/gcdext_1.c (mpn_gcdext_1): Allow inputs with a < b,
11595 assertions fixed accordingly.
11596
11597 2009-12-03 Torbjorn Granlund <[email protected]>
11598
11599 * tune/tuneup.c: Tune DC_DIVAPPR_Q_THRESHOLD. Rewrite
11600 DC_DIV_QR_THRESHOLD tuning code.
11601 (tune_dc_div): Rewrite.
11602 * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): New macro.
11603 * tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
11604 speed_mpn_sbpi1_divappr_q, speed_mpn_sbpi1_bdiv_qr): New functions.
11605 * gmp-impl.h: Provide declarations for corresponding threshold vars.
11606 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_divappr_q.c.
11607
11608 * tune/tuneup.c (tune_binvert): Up max_size.
11609
11610 2009-12-02 Marco Bodrato <[email protected]>
11611
11612 * tests/devel/try.c: Test mpn_rsblsh2_n and mpn_rsblsh_n.
11613 * tests/refmpn.c (refmpn_rsblsh_n, refmpn_rsblsh2_n): New functions.
11614 (refmpn_rsblsh1_n): Use generic refmpn_rsblsh_n.
11615 * tests/tests.h: Declare new functions.
11616
11617 2009-12-03 Niels Möller <[email protected]>
11618
11619 * mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step):
11620 Select the right cofactor in the cases A == B or A == 2B.
11621
11622 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Deleted
11623 handling of ap[0] == 0 and bp[0] == 0; these cases don't happen.
11624 Select the right cofactor in the case ap[0] == bp[0].
11625 * mpn/generic/gcdext.c (mpn_gcdext): Analogous changes.
11626
11627 2009-12-02 Niels Möller <[email protected]>
11628
11629 * gmp-h.in (mpn_gcdext_1): Updated prototype.
11630 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
11631 signed cofactors from gcdext_1.
11632 * mpn/generic/gcdext_1.c (mpn_gcdext_1): Use Euclid's algorithm,
11633 and return signed cofactors.
11634
11635 2009-12-02 Torbjorn Granlund <[email protected]>
11636
11637 * doc/gmp.texi (Low-level Functions): Document mpn_sqr_n.
11638
11639 * tune/speed.c (routine): Add mpn_binvert.
11640
11641 * tune/tuneup.c: Tune BINV_NEWTON_THRESHOLD.
11642 (tune_binvert): New function.
11643 * tune/speed.h (SPEED_ROUTINE_MPN_BINVERT): New macro.
11644 * tune/common.c (speed_mpn_binvert): New function.
11645 * gmp-impl.h: Provide declarations for corresponding threshold var.
11646 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add binvert.c.
11647
11648 * tune/tuneup.c: Tune DC_BDIV_QR_THRESHOLD and DC_BDIV_Q_THRESHOLD.
11649 (tune_dc_bdiv): New function.
11650 (tune_dc_div): New name for tune_dc.
11651 * tune/speed.h (SPEED_ROUTINE_MPN_PI1_BDIV_QR,
11652 SPEED_ROUTINE_MPN_PI1_BDIV_Q): New macros.
11653 * tune/common.c (speed_mpn_sbpi1_bdiv_qr, speed_mpn_dcpi1_bdiv_qr,
11654 speed_mpn_sbpi1_bdiv_q, speed_mpn_dcpi1_bdiv_q): New functions.
11655 * gmp-impl.h: Provide declarations for corresponding threshold vars.
11656 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_bdiv_qr.c and
11657 dcpi1_bdiv_q.c.
11658
11659 2009-12-01 Marco Bodrato <[email protected]>
11660
11661 * mpn/generic/toom53_mul.c: Removed double computation of vinf.
11662
11663 * mpn/x86_64/aorrlsh_n.asm: Correct return value for rsblsh_n.
11664 * mpn/asm-defs.m4 (define_mpn): Add rsblsh_n.
11665 * gmp-impl.h (mpn_rsblsh_n): Added prototype and name-mangling.
11666
11667 * mpn/generic/fib2_ui.c: Reduce the amount of temporary storage.
11668 Use mpn_rsblsh_n.
11669
11670 2009-12-01 Torbjorn Granlund <[email protected]>
11671
11672 * mpn/generic/redc_n.c: Rework temp allocation.
11673
11674 * mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n_itch): Add pi1 also
11675 to this function.
11676
11677 * mpn/generic/dcpi1_bdiv_q.c: Get the mpn_sbpi1_bdiv_q call right.
11678 Misc cleanups.
11679
11680 * tune/speed.c (routine): Fix typo in last change.
11681 Add mpn_redc_2.
11682
11683 * tune/speed.h (SPEED_ROUTINE_REDC_N): Set min size properly.
11684
11685 2009-12-01 Niels Möller <[email protected]>
11686
11687 * tune/speed.c (routine): Added mpn_toom42_mul and mpn_redc_n.
11688 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM42_MUL): New macro.
11689 (speed_mpn_toom42_mul): Declare function.
11690 * tune/common.c (speed_mpn_toom42_mul): New function.
11691 * gmp-impl.h (MPN_TOOM42_MUL_MINSIZE): New constant.
11692
11693 2009-11-30 Marco Bodrato <[email protected]>
11694
11695 * mpn/generic/fib2_ui.c: Use mpn_rsblsh2_n.
11696
11697 2009-11-29 Torbjorn Granlund <[email protected]>
11698
11699 * mpn/x86_64/pentium4/gmp-mparam.h
11700 (HAVE_NATIVE_mpn_addlsh1_n, HAVE_NATIVE_mpn_sublsh1_n): Don't undef.
11701
11702 * Makefile.am (EXTRA_DIST): Remove macos.
11703
11704 2009-11-28 Torbjorn Granlund <[email protected]>
11705
11706 * tune/tuneup.c (tune_redc): Set min_size to 16 for redc_n tuning.
11707
11708 * mpn/x86_64/sqr_basecase.asm (SQR_TOOM2_THRESHOLD_MAX): Avoid quoting
11709 to allow configure.in parse it more easily. Trim from 120 to 80.
11710
11711 2009-11-28 Marco Bodrato <[email protected]>
11712
11713 * mpn/generic/mulmod_bnm1.c: Basecases made simpler, this also corrects
11714 a bug affecting previous version.
11715
11716 2009-11-28 Torbjorn Granlund <[email protected]>
11717
11718 * configure.in: Handle atom also in 32-bit mode.
11719 * mpn/x86/atom/gmp-mparam.h: New file.
11720
11721 * gmp-impl.h (MULMOD_BNM1_THRESHOLD): Default.
11722
11723 * mpn/generic/redc_n.c: Use mpn_mulmod_bnm1 instead of mpn_mul_n.
11724
11725 * Use TMP_ALLOC_LIMBS consistently.
11726 * Finish renaming BITS_PER_MP_LIMB to GMP_LIMB_BITS.
11727
11728 * macos: Remove entire directory.
11729
11730 2009-11-27 Torbjorn Granlund <[email protected]>
11731
11732 * mpn/x86_64/corei/gmp-mparam.h: New file.
11733 * mpn/x86_64/core2/gmp-mparam.h: Now for just core2.
11734 * mpn/powerpc64/mode64/p3/gmp-mparam.h: New file.
11735 * mpn/powerpc64/mode64/p4/gmp-mparam.h: New file.
11736 * mpn/powerpc64/mode64/p5/gmp-mparam.h: New file.
11737
11738 * config.guess: Return "corei" for core i7 and core i5.
11739 * config.sub: Recognise "corei".
11740 * acinclude.m4 (X86_64_PATTERN): Add corei.
11741 * configure.in (powerpc): Set up more CPU-specific paths.
11742 (x86): Handle corei.
11743
11744 * mpz/powm.c: Allow input operand overlap also when exponent = 1.
11745 Misc cleanups.
11746
11747 2009-11-26 Marco Bodrato <[email protected]>
11748
11749 * tests/mpn/t-mulmod_bnm1.c: New test file.
11750 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-mulmod_bnm1.
11751
11752 * mpn/generic/mullow_n.c: Comments on Mulders' trick implementation.
11753
11754 2009-11-26 Torbjorn Granlund <[email protected]>
11755
11756 * mpn/generic/powm.c: Make comments reflect current code state.
11757
11758 * tests/devel/try.c: Make mpn_mullow_n testing actually work.
11759
11760 2009-11-25 Torbjorn Granlund <[email protected]>
11761
11762 * mpz/powm.c: Clean up unused defs.
11763
11764 2009-11-24 Torbjorn Granlund <[email protected]>
11765
11766 * tune/tuneup.c (tune_redc): Rewrite.
11767 * mpn/generic/powm.c: Use REDC_1_TO_REDC_2_THRESHOLD,
11768 REDC_1_TO_REDC_N_THRESHOLD, and REDC_2_TO_REDC_N_THRESHOLD.
11769 Get rid of previous REDC params, including LOCAL_REDC_N_THRESHOLD.
11770 (WANT_REDC_2): Define.
11771 * gmp-impl.h: Corresponding changes.
11772
11773 2009-11-23 Torbjorn Granlund <[email protected]>
11774
11775 * mpn/generic/powm.c: Fix typo.
11776 Define LOCAL_REDC_N_THRESHOLD, use in REDC_2_THRESHOLD...
11777 REDC_N_THRESHOLD chain.
11778
11779 2009-11-22 Torbjorn Granlund <[email protected]>
11780
11781 * tune/tuneup.c (tune_mullow): Set min_size to 1.
11782
11783 * mpn/generic/powm_sec.c: Use just mpn_mul_basecase and
11784 mpn_sqr_basecase for multiplication and squaring.
11785
11786 * tune/tuneup.c: Tune REDC_2_THRESHOLD and REDC_N_THRESHOLD.
11787 (tune_redc): New function.
11788 (tune_powm): Remove function.
11789 * tune/speed.h (SPEED_ROUTINE_REDC_2, SPEED_ROUTINE_REDC_N): New.
11790 * tune/common.c (speed_mpn_redc_2, speed_mpn_redc_n): New.
11791
11792 * mpz/powm.c: Complete rewrite. Use mpn_powm and mpn_powlo.
11793 * mpn/generic/powm.c: Rewrite.
11794 * mpn/generic/redc_n.c: New file.
11795 * configure.in (gmp_mpn_functions): Add redc_n.
11796 * gmp-impl.h (REDC_2_THRESHOLD, REDC_N_THRESHOLD): Default, and define
11797 for tuneup.
11798
11799 2009-11-21 Marco Bodrato <[email protected]>
11800
11801 * mpn/generic/mullow_n.c: Disable Mulders' trick for small operands,
11802 use fft for bigger ones.
11803 * tests/mpn/t-mullo.c: New test file.
11804
11805 2009-11-22 Torbjorn Granlund <[email protected]>
11806
11807 * tune/tuneup.c (tune_mullow): Rewrite.
11808
11809 2009-11-21 Marco Bodrato <[email protected]>
11810
11811 * gmp-impl.h: Removed unused macros (CACHED_ABOVE_THRESHOLD and
11812 CACHED_BELOW_THRESHOLD).
11813
11814 * mpn/generic/mullow_n.c: Use Mulders' trick.
11815 * tune/tuneup.c (tune_mullow): MULLOW_MUL_N_THRESHOLD range of
11816 search depends on FFT tuning;
11817 (all): Anticipate tune_fft_{mul,sqr}.
11818
11819 * tune/speed.c (routine): Add entry related to mpn_mulmod_bnm1.
11820
11821 2009-11-19 Niels Möller <[email protected]>
11822
11823 * mpn/generic/toom_eval_dgr3_pm2.c (mpn_toom_eval_dgr3_pm2)
11824 [HAVE_NATIVE_mpn_add_n_sub_n]: Fixed typo in mpn_add_n_sub_n call
11825 (spotted by Marco Bodrato).
11826 * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): Likewise.
11827 * mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Likewise.
11828
11829 * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2) [HAVE_NATIVE_mpn_addlsh_n]:
11830 Fixed missing declaration.
11831
11832 * mpn/asm-defs.m4 (define_mpn): Add addlsh_n.
11833 * gmp-impl.h (mpn_addlsh_n): Added prototype and name-mangling.
11834
11835 2009-11-19 Niels Möller <[email protected]>
11836
11837 * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): New file.
11838 * mpn/generic/toom53_mul.c (mpn_toom53_mul): Use mpn_toom_eval_pm2.
11839 * mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
11840 * configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
11841
11842 2009-11-18 Torbjorn Granlund <[email protected]>
11843
11844 * gmp-impl.h (mpn_and_n, etc): Adapt to now-public logic functions.
11845
11846 * config.guess: Recognise VIA nano.
11847 * config.sub: Likewise.
11848 * configure.in: Generalise x86_64 support; recognise VIA nano.
11849
11850 2009-11-16 Torbjorn Granlund <[email protected]>
11851
11852 * tune/speed.c (routine): Add measurement of mpn_addlsh2_n,
11853 mpn_sublsh2_n, mpn_rsblsh2_n.
11854 * tune/common.c: Add speed routines for lsh2 functions.
11855
11856 * mpn/generic/divis.c: Use MU_BDIV_QR_THRESHOLD.
11857
11858 * configure.in (gmp_mpn_functions_optional): Add *lsh_n functions.
11859
11860 * mpn/generic/toom_eval_pm2exp.c: Make HAVE_NATIVE_mpn_addlsh_n code
11861 work.
11862
11863 * mpn/x86_64/aorrlsh2_n.asm: Optimise inner loop.
11864
11865 * configure.in (gmp_mpn_functions_optional): Remove copyi,copyd, they
11866 are now in gmp_mpn_functions. Analogously move logical functions.
11867
11868 2009-11-16 Marco Bodrato <[email protected]>
11869
11870 * mpn/generic/toom53_mul.c: Use addlsh2 for evaluation (and fix typo).
11871 * mpn/generic/toom_eval_dgr3_pm2.c: Likewise (affects toom44 and 43).
11872
11873 * mpn/asm-defs.m4: Fix comments for op_lsh2 new functions.
11874 * gmp-impl.h: Likewise.
11875 * tests/mpz/t-fac_ui.c: Fix a comment.
11876
11877 2009-11-15 Torbjorn Granlund <[email protected]>
11878
11879 * mpn/x86_64/aorrlsh2_n.asm: New file.
11880 * configure.in: Add support for addlsh2_n, sublsh2_n, and rsblsh2_n,
11881 including mulfuncs.
11882 * gmp-impl.h (mpn_addlsh2_n, mpn_sublsh2_n, mpn_rsblsh2_n): Declare.
11883 * mpn/asm-defs.m4: Likewise.
11884
11885 * mpn/generic/copyi.c: New file.
11886 * mpn/generic/copyd.c: Likewise.
11887 * mpn/generic/zero.c: Likewise.
11888 * gmp-h.in: Declare new functions.
11889 * configure.in (gmp_mpn_functions): Add new functions.
11890
11891 2009-11-15 Marco Bodrato <[email protected]>
11892
11893 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): fix typo
11894
11895 * mpn/generic/toom33_mul.c: Use rsblsh1 for evaluation.
11896 * mpn/generic/toom3_sqr.c: Likewise.
11897
11898 2009-11-14 Torbjorn Granlund <[email protected]>
11899
11900 * mpn/generic/toom52_mul.c: Use mpn_addlsh1_n.
11901
11902 * mpn/generic/toom52_mul.c: Toggle the right flag bit in an
11903 HAVE_NATIVE_mpn_add_n_sub_n arm.
11904
11905 * tests/mpz/t-remove.c: New file.
11906
11907 * mpn/generic/remove.c: Major overhaul. Add parameter 'cap'.
11908
11909 * mpn/generic/binvert.c: Fix typo in last change.
11910
11911 * mpn/generic/bdiv_qr.c: Make it actually work. Also use passed-in
11912 scratch space.
11913
11914 * mpn/generic/mu_bdiv_qr.c: Reset FFT parameters for each call.
11915
11916 2009-11-12 Torbjorn Granlund <[email protected]>
11917
11918 * mpn/x86/k7/gcd_1.asm (MASK): Compute from MAXSHIFT.
11919
11920 2009-11-11 Torbjorn Granlund <[email protected]>
11921
11922 * mpn/generic/binvert.c: Simplify, fix comments.
11923
11924 * tests/devel/try.c: Test mpn_invert and mpn_binvert.
11925
11926 * tests/refmpn.c (refmpn_invert, refmpn_binvert): New functions.
11927 * tests/tests.h: Declare new functions.
11928
11929 2009-11-10 Torbjorn Granlund <[email protected]>
11930
11931 * configure.in: Supply compiler options for atom in 32-bit mode.
11932
11933 * acinclude.m4 (X86_64_PATTERN): New.
11934 * configure.in: Setup and use X86_64_PATTERN.
11935
11936 * mpn/x86_64/fat/fat.c: New file.
11937 * mpn/x86_64/fat/fat_entry.asm: New file.
11938 * mpn/x86_64/fat: Copy C placeholder files from mpn/x86/fat.
11939 * mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): New, copied from
11940 mpn/x86/x86-defs.m4.
11941 * configure.in: Move down x86 fat setup code until after ABI has been
11942 determined; generalise to handle x86_64.
11943
11944 2009-11-09 Torbjorn Granlund <[email protected]>
11945
11946 * mpn/x86/fat/mod_1.c: New file.
11947
11948 * acinclude.m4 (GMP_C_FOR_BUILD_ANSI): Avoid poor quoting.
11949
11950 2009-11-08 Torbjorn Granlund <[email protected]>
11951
11952 * gmp-impl.h (MPN_LOGOPS_N_INLINE): Rewrite, update interface. Callers
11953 updated.
11954 * mpn/generic/logops_n.c: New file.
11955 * doc/gmp.texi (Low-level Functions): Document logical mpn functions.
11956
11957 2009-11-07 Torbjorn Granlund <[email protected]>
11958
11959 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): Adapt to new
11960 mpn_mulmod_bnm1 interface.
11961
11962 2009-11-07 Marco Bodrato <[email protected]>
11963
11964 * mpn/generic/mulmod_bnm1.c: New interface, with size
11965 specified for all operands in mpn_mulmod_bnm1.
11966 * gmp-impl.h: Changed mpn_mulmod_bnm1 prototype.
11967
11968 2009-11-05 Torbjorn Granlund <[email protected]>
11969
11970 * mpn/x86/k7/gcd_1.asm: Actually use div-reduced value.
11971 Mnemonic cleanup.
11972
11973 * mpn/x86_64/gcd_1.asm: New file.
11974
11975 2009-11-03 Torbjorn Granlund <[email protected]>
11976
11977 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqr_n.c.
11978
11979 2009-11-03 Marco Bodrato <[email protected]>
11980
11981 * mpn/generic/toom_interpolate_6pts.c: removed an addmul_1 and cleanup.
11982
11983 2009-11-02 Torbjorn Granlund <[email protected]>
11984
11985 * configure.in (gmp_mpn_functions): Remove obsolete functions
11986 dc_divrem_n and sb_divrem_mn.
11987 * gmp-impl.h: Misc cleanup.
11988 (mpn_sb_divrem_mn, mpn_dc_divrem_n): Remove.
11989 (DIV_DC_THRESHOLD): Remove.
11990 * mpn/generic/dc_divrem_n.c: Remove.
11991 * mpn/generic/sb_divrem_mn.c: Remove.
11992 * mpn/generic/tdiv_qr.c: Use DC_DIV_QR_THRESHOLD, not DIV_DC_THRESHOLD.
11993
11994 * tests/devel/try.c: Replace mpn_sb_divrem_mn by mpn_sbpi1_div_qr.
11995 * tests/refmpn.c (refmpn_sb_div_qr): New name for refmpn_sb_divrem_mn.
11996
11997 * tune/Makefile.am (libspeed_la_SOURCES): Remove sb_div.c and sb_inv.c.
11998 (TUNE_MPN_SRCS_BASIC): Remove sb_divrem_mn.c.
11999 * tune/common.c (speed_mpn_dcpi1_div_qr_n): New function.
12000 Remove mpn_sb_divrem_mn related functions.
12001 * tune/speed.c (routine): Remove entries related to mpn_dc_divrem and
12002 mpn_sb_divrem.
12003 (routine): New entry for mpn_dc_div_qr_n.
12004 * tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_CALL): Compute inverse
12005 needed by pi1 calls.
12006 (SPEED_ROUTINE_MPN_SB_DIVREM_M3): Remove.
12007 * tune/tuneup.c (tune_sb_preinv): Remove.
12008 (tune_dc): Update to measure DC_DIV_QR_THRESHOLD.
12009
12010 * mpn/generic/sb_divappr_q.c: Remove.
12011
12012 2009-11-01 Torbjorn Granlund <[email protected]>
12013
12014 * gmp-impl.h: Misc minor cleanups.
12015
12016 2009-10-31 Torbjorn Granlund <[email protected]>
12017
12018 * gmp-impl.h (toom itch functions): Simplify, make some into macros.
12019 (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Remove.
12020 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove.
12021 * mpn/generic/mul_n.c (mpn_sqr_n): Move from here...
12022 * mpn/generic/sqr_n.c: ...to this new file.
12023 * configure.in (gmp_mpn_functions): Add sqr_n.
12024
12025 * Globally change
12026 MUL_TOOM3_THRESHOLD => MUL_TOOM33_THRESHOLD,
12027 MUL_KARATSUBA_THRESHOLD => MUL_TOOM22_THRESHOLD,
12028 SQR_KARATSUBA_THRESHOLD => SQR_TOOM2_THRESHOLD,
12029 and associated names analogously.
12030
12031 2009-10-31 Niels Möller <[email protected]>
12032
12033 * mpn/generic/toom_interpolate_7pts.c: Changed evaluation points,
12034 replacing -1/2 by -2.
12035 * mpn/generic/toom44_mul.c: Updated to use new evaluation points,
12036 and use mpn_toom_eval_dgr3_pm2.
12037 * mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Likewise.
12038 * mpn/generic/toom53_mul.c (mpn_toom53_mul): Updated to use new
12039 evaluation points, and use mpn_toom_eval_pm1 and
12040 mpn_toom_eval_pm2exp.
12041 * mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
12042
12043 * mpn/generic/toom_eval_pm2exp.c: New file.
12044 * mpn/generic/toom_eval_pm1.c: New file.
12045
12046 * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
12047 mpn_toom_eval_dgr3_pm2.
12048
12049 2009-10-30 Torbjorn Granlund <[email protected]>
12050
12051 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom2* and toom3* files.
12052
12053 2009-10-30 Niels Möller <[email protected]>
12054
12055 * configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
12056 * gmp-impl.h: Added prototype for mpn_toom_eval_dgr3_pm2.
12057 * mpn/generic/toom_eval_dgr3_pm2.c: New file.
12058
12059 2009-10-29 Niels Möller <[email protected]>
12060
12061 * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
12062 mpn_toom_eval_dgr3_pm1.
12063 * mpn/generic/toom42_mul.c (mpn_toom42_mul): Likewise.
12064
12065 2009-10-29 Torbjorn Granlund <[email protected]>
12066
12067 * mpn/generic/mulmod_bnm1.c: Replace some add_1 by INCR.
12068
12069 * gmp-impl.h (mpn_mulmod_bnm1_itch): New macro.
12070
12071 * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Call mpn_mul_fft.
12072 (mpn_mulmod_bnm1_next_size): Adopt to SS FFT.
12073
12074 * mpn/generic/mul_fft.c (mpn_mul_fft): Make it return high limb.
12075 (mpn_mul_fft_internal): Likewise.
12076
12077 * mpn/generic/mulmod_bnm1.c: New file, by Niels Möller.
12078 * configure.in (gmp_mpn_functions): Add mulmod_bnm1.
12079 * gmp-impl.h: Add related declarations.
12080 * tune/tuneup.c: Tune MULMOD_BNM1_THRESHOLD.
12081 * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): New macro.
12082 * tune/common.c (speed_mpn_mulmod_bnm1): New function.
12083 * Makefile.am (TUNE_MPN_SRCS_BASIC): Add mulmod_bnm1.c.
12084
12085 * gmp-impl.h (mpn_kara_mul_n, mpn_kara_sqr_n): Remove declarations.
12086 * tune/common.c: Remove/rename kara functions.
12087 * tune/speed.h: Likewise.
12088
12089 * tests/devel/try.c: Clean up usage of %p printf arguments.
12090
12091 * gmp-impl.h: Update MUL/SQR MINSIZE macros to reflect new function
12092 names and limitations
12093 * tune/tuneup.c: Use updated macro names.
12094 * tune/speed.h: Likewise.
12095 * tests/devel/try.c: Test new mul/sqr functions, remove old tests.
12096
12097 2009-10-29 Niels Möller <[email protected]>
12098
12099 * tune/speed.c: Added support for mpn_toom4_sqr.
12100
12101 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM4_SQR): New macro.
12102 (SPEED_ROUTINE_MPN_KARA_MUL_N): Deleted.
12103 (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Deleted.
12104 (SPEED_ROUTINE_MPN_TOOM2_SQR): Use mpn_toom2_sqr_itch.
12105
12106 * gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove
12107 declarations.
12108 (mpn_toom2_sqr_itch): Add margin for recursive calls.
12109
12110 2009-10-28 Niels Möller <[email protected]>
12111
12112 * mpn/generic/mul_n.c (mpn_kara_mul_n): Deleted old Karatsuba
12113 implementation.
12114 (mpn_kara_sqr_n): Likewise deleted.
12115
12116 * mpn/generic/mul_n.c (mpn_sqr_n): Use mpn_toom2_sqr and
12117 mpn_toom3_sqr, not the old implementations.
12118
12119 * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE): Deleted, replaced by
12120 mpn_toom33_mul_itch.
12121 (MPN_TOOM3_SQR_N_TSIZE): Deleted, replaced by
12122 mpn_toom3_sqr_itch.
12123 (mpn_toom33_mul_itch): Needs more scratch.
12124 (mpn_toom3_sqr_itch): Likewise.
12125 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Use
12126 mpn_toom33_mul_itch.
12127 (SPEED_ROUTINE_MPN_TOOM3_SQR_N): Use mpn_toom3_sqr_itch.
12128 * mpn/generic/mul_n.c (mpn_mul_n): Use mpn_toom33_mul_itch.
12129 (mpn_sqr_n): Use mpn_toom3_sqr_itch.
12130
12131 * mpn/generic/toom33_mul.c (mpn_toom33_mul): Avoid TMP_ALLOC. Needs
12132 some more supplied scratch instead.
12133 * mpn/generic/toom3_sqr.c (mpn_toom3_sqr): Likewise.
12134
12135 2009-10-26 Torbjorn Granlund <[email protected]>
12136
12137 * gmp-impl.h (invert_pi1): Streamline, as suggested by Niels.
12138
12139 2009-10-24 Torbjorn Granlund <[email protected]>
12140
12141 * mpn/generic/bdiv_q.c: Update to call new functions.
12142 * mpn/generic/bdiv_qr.c: Likewise.
12143 * mpn/generic/binvert.c: Likewise.
12144 * mpn/generic/divexact.c: Likewise.
12145 * mpn/generic/divis.c: Likewise.
12146 * mpn/generic/perfpow.c: Likewise.
12147 * mpn/generic/tdiv_qr.c: Likewise.
12148 * mpn/generic/dcpi1_bdiv_q.c: New file.
12149 * mpn/generic/dcpi1_bdiv_qr.c: New file.
12150 * mpn/generic/dcpi1_div_q.c: New file.
12151 * mpn/generic/dcpi1_div_qr.c: New file.
12152 * mpn/generic/dcpi1_divappr_q.c: New file.
12153 * mpn/generic/sbpi1_bdiv_q.c: New file.
12154 * mpn/generic/sbpi1_bdiv_qr.c: New file.
12155 * mpn/generic/sbpi1_div_q.c: New file.
12156 * mpn/generic/sbpi1_div_qr.c: New file.
12157 * mpn/generic/sbpi1_divappr_q.c: New file.
12158 * mpn/generic/dc_bdiv_q.c: Removed.
12159 * mpn/generic/dc_bdiv_qr.c: Removed.
12160 * mpn/generic/dc_div_q.c: Removed.
12161 * mpn/generic/dc_div_qr.c: Removed.
12162 * mpn/generic/dc_divappr_q.c: Removed.
12163 * mpn/generic/sb_bdiv_q.c: Removed.
12164 * mpn/generic/sb_bdiv_qr.c: Removed.
12165 * mpn/generic/sb_div_q.c: Removed.
12166 * mpn/generic/sb_div_qr.c: Removed.
12167
12168 * configure.in (gmp_mpn_functions): Add new division functions, remove
12169 obsolete division functions.
12170
12171 * gmp-impl.h: Add declarations of new division functions, remove
12172 corresponding obsolete declarations.
12173 (gmp_pi1_t, gmp_pi2_t): New types.
12174 (invert_pi1): New macro for computing 2/1 and 3/2 inverses.
12175
12176 2009-10-23 Niels Möller <[email protected]>
12177
12178 * gmp-impl.h (mpn_toom62_mul_itch): New function.
12179
12180 * tests/mpn/t-toom53.c: New test program.
12181 * tests/mpn/t-toom62.c: New test program.
12182
12183 2009-10-23 Torbjorn Granlund <[email protected]>
12184
12185 * mpn/generic/get_d.c: Fix code handling denorms for 64-bit machines.
12186 * tests/mpf/t-get_d.c (test_denorms): New function.
12187
12188 2009-10-23 Niels Möller <[email protected]>
12189
12190 * mpn/generic/toom52_mul.c (mpn_toom52_mul): Use supplied scratch
12191 space, not TMP_ALLOC. Interface change, now requires input sizes
12192 such that s + t >= 5.
12193
12194 * gmp-impl.h (mpn_toom52_mul_itch): New function.
12195
12196 * tests/mpn/t-toom52.c: New test program.
12197
12198 2009-10-22 Torbjorn Granlund <[email protected]>
12199
12200 * mpn/x86_64/sqr_basecase.asm: Tune for speed and a 7% size decrease.
12201
12202 2009-10-22 Niels Möller <[email protected]>
12203
12204 * tests/mpn/t-toom44.c: New test program.
12205 * tests/mpn/t-toom33.c: New test program.
12206
12207 * tests/mpn/toom-shared.h (main): Reorganized input generation.
12208 Users are now supposed to define macros MAX_AN, MIN_BN and MAX_BN.
12209 Updated existing toom test programs.
12210
12211 2009-10-22 Torbjorn Granlund <[email protected]>
12212
12213 * tests/devel/try.c: Fix typos in last change.
12214
12215 2009-10-21 Torbjorn Granlund <[email protected]>
12216
12217 * mpn/asm-defs.m4 (define_mpn): Add mullow_basecase.
12218
12219 * tests/devel/try.c: Test mpn_mullow_n.
12220
12221 * tests/refmpn.c (refmpn_mullow_n): New function.
12222 * tests/tests.h: Declare it.
12223
12224 2009-10-21 Niels Möller <[email protected]>
12225
12226 * tests/mpn/toom-shared.h (main): Check for writes outside of the
12227 product or scratch area.
12228
12229 * gmp-impl.h (mpn_toom43_mul_itch): New function.
12230
12231 * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use supplied scratch
12232 space, not TMP_ALLOC. Interface change, now requires input sizes
12233 such that s + t >= 5.
12234
12235 2009-10-20 Niels Möller <[email protected]>
12236
12237 * tests/mpn/toom-shared.h (MIN_BLOCK): New constant, which can be
12238 overridden by users. Needed by t-toom42 and t-toom43.
12239
12240 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom32,
12241 t-toom42 and t-toom43.
12242 * tests/mpn/t-toom43.c: New test program.
12243 * tests/mpn/t-toom42.c: New test program.
12244 * tests/mpn/t-toom32.c: New test program.
12245
12246 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom22.
12247 * tests/mpn/t-toom22.c: New test file.
12248 * tests/mpn/toom-shared.h: New file. Test framework for Toom
12249 functions.
12250
12251 2009-10-14 Niels Möller <[email protected]>
12252
12253 * mpn/generic/hgcd.c (mpn_hgcd_itch): Thanks to the new
12254 mpn_matrix22_mul_strassen, the scratch need is reduced by 16%.
12255
12256 2009-10-14 Marco Bodrato <[email protected]>
12257
12258 * mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): New
12259 Strassen-like algorithm, to reduce the amount of temporary
12260 storage.
12261 (mpn_matrix22_mul_itch): Updated to reflect the reduced storage
12262 need.
12263
12264 2009-10-03 Torbjorn Granlund <[email protected]>
12265
12266 * Rename mpn_addsub_n to mpn_add_n_sub_n.
12267
12268 2009-10-01 Torbjorn Granlund <[email protected]>
12269
12270 * mpn/generic/tdiv_qr.c: Call mpn_divrem_1 and mpn_dc_div_qr instead of
12271 old functions.
12272
12273 * mpn/generic/mul_n.c: Call toom22 and toom33 instead of old functions.
12274
12275 * mpn/generic/toom42_mul.c (TOOM42_MUL_N_REC): Renamed from
12276 TOOM22_MUL_N_REC. Unconditionally call the generic mpn_mul_n.
12277 * mpn/generic/toom32_mul.c: Analogous changes.
12278
12279 2009-09-28 Niels Möller <[email protected]>
12280
12281 * mpn/x86_64/invert_limb.asm: Rewrite. Exploit cancellation in the
12282 Newton iteration.
12283
12284 2009-09-27 Niels Möller <[email protected]>
12285
12286 * mpn/x86/invert_limb.asm: Reduce register usage. Eliminated $1
12287 arguments to add, sub and shift.
12288
12289 2009-09-25 Niels Möller <[email protected]>
12290
12291 * mpn/x86/invert_limb.asm: New file.
12292
12293 2009-09-24 Torbjorn Granlund <[email protected]>
12294
12295 * mpn/generic/toom33_mul.c: Use new toom functions for all recursive
12296 products.
12297 * mpn/generic/toom3_sqr.c: Likewise.
12298 * mpn/generic/toom44_mul.c: Likewise.
12299 * mpn/generic/toom4_sqr.c: Likewise.
12300
12301 * mpn/generic/add_n.c: Relax operand overlap ASSERTs.
12302 * mpn/generic/sub_n.c: Likewise.
12303
12304 2009-09-15 Torbjorn Granlund <[email protected]>
12305
12306 Suggested by Uwe Mueller:
12307 * printf/doprnt.c: Use "%ld" for exponent printing.
12308 * printf/doprntf.c (__gmp_doprnt_mpf): Make expval "long".
12309
12310 2009-09-14 Torbjorn Granlund <[email protected]>
12311
12312 * configure.in: Handle mingw64.
12313 * gmp-impl.h (gmp_intptr_t): Declare.
12314 * tests/amd64check.c (calling_conventions_values): Use CNST_LIMB.
12315 * tests/memory.c: Use gmp_intptr_t; print pointers using C90 "%p".
12316 * tests/misc.c: Use gmp_intptr_t.
12317 * tests/mpq/t-get_str.c: Print pointers using C90 "%p".
12318
12319 2009-08-12 Torbjorn Granlund <[email protected]>
12320
12321 * mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Remove silly ASSERT code.
12322
12323 * mpn/asm-defs.m4 (define_mpn): Remove mod_1s_1p, add mod_1_1p.
12324
12325 * mpn/arm/invert_limb.asm: Complete rewrite.
12326
12327 * longlong.h: Document LONGLONG_STANDALONE and NO_ASM.
12328
12329 2009-08-05 Torbjorn Granlund <[email protected]>
12330
12331 * tests/mpz/dive_ui.c (check_random): Avoid zero divisors.
12332
12333 2009-07-31 Torbjorn Granlund <[email protected]>
12334
12335 * mpn/generic/mod_1_1.c: Tweak to handle any modulus (possibility
12336 pointed out by Per Austrin).
12337 (mpn_mod_1_1p): Renamed from mpn_mod_1s_1p.
12338 (mpn_mod_1_1p_cps): Renamed from mpn_mod_1s_1p_cps.
12339 *mpn/generic/mod_1.c (mpn_mod_1): Reorganise to call mpn_mod_1_1p for
12340 any modulus.
12341
12342 2009-07-28 Torbjorn Granlund <[email protected]>
12343
12344 * configure.in: Pass arch for x86 also in 64-bit mode.
12345
12346 2009-07-26 Torbjorn Granlund <[email protected]>
12347
12348 * config.guess (_cpuid): Recognise more Intel "Core" processors.
12349
12350 2009-07-13 Torbjorn Granlund <[email protected]>
12351
12352 * mpf/eq.c: Rewrite.
12353
12354 * tests/mpf/t-eq.c: New test.
12355
12356 2009-07-06 Torbjorn Granlund <[email protected]>
12357
12358 * gmp-impl.h (__mp_bases): Remove this alias.
12359
12360 * mpf/get_str.c: Use less overflow prone expression for computing limb
12361 allocation.
12362 * mpz/inp_str.c: Likewise.
12363 * mpf/set_str.c: Likewise.
12364 * mpz/set_str.c: Likewise.
12365
12366 2009-07-03 Niels Möller <[email protected]>
12367
12368 * mpn/generic/gcd_1.c (mpn_gcd_1): Use masking tricks to reduce
12369 the number of branches in the loop.
12370
12371 2009-06-28 Torbjorn Granlund <[email protected]>
12372
12373 * demos/factorize.c (factor_using_pollard_rho): Rewrite.
12374
12375 * mpz/clears.c: New file.
12376 * mpq/clears.c: New file.
12377 * mpf/clears.c: New file.
12378 * gmp-h.in (mpz_clears, mpq_clears, mpf_clears): Declare.
12379 * mpz/Makefile.am: Add clears.c.
12380 * mpq/Makefile.am: Add clears.c.
12381 * mpf/Makefile.am: Add clears.c.
12382 * Makefile.am: Add these also to respective OBJECTS variables.
12383 * doc/gmp.texi: Document inits function and clears functions.
12384
12385 2009-06-20 Torbjorn Granlund <[email protected]>
12386
12387 * mp-h.in (mp_bitcnt_t): Declare here too.
12388
12389 2009-06-19 Torbjorn Granlund <[email protected]>
12390
12391 * mpq/inits.c: New file.
12392 * mpf/inits.c: New file.
12393 * gmp-h.in (mpz_inits, mpq_inits, mpf_inits): Declare .
12394
12395 * mpn/generic/remove.c: New file.
12396 * configure.in (gmp_mpn_functions): Add remove.
12397 * gmp-impl.h (mpn_remove): Declare.
12398
12399 * gmp-h.in (mp_bitcnt_t): New basic type.
12400 * mpn/generic/perfpow.c (mp_bitcnt_t): Remove private definition.
12401
12402 * mpn/generic/bdiv_qr.c: Make it actually work.
12403
12404 * mpn/x86_64/core2/aorsmul_1.asm: Rewrite to use shorter pipeline and
12405 to need fewer registers.
12406
12407 2009-06-17 Torbjorn Granlund <[email protected]>
12408
12409 * mpn/x86_64/rsh1aors_n.asm: New file.
12410 * mpn/x86_64/rsh1add_n.asm: Remove.
12411 * mpn/x86_64/rsh1sub_n.asm: Remove.
12412
12413 * mpz/inits.c: New file.
12414
12415 * gen-trialdivtab.c: Wrap limb constants into CNST_LIMB.
12416
12417 With Martin Boij:
12418 * mpn/generic/perfpow.c (binv_root, binv_sqroot): Change from being
12419 recursive to being iterative.
12420 (mpn_perfect_power_p): Reorganise temp memory usage to avoid a buffer
12421 overrun. Trim allocation of next and prev. Never create oversize
12422 products in the multiplicity binary search.
12423
12424 * mpn/generic/dc_div_q.c: Add missing TMP_FREE.
12425
12426 2009-06-16 Torbjorn Granlund <[email protected]>
12427
12428 Revert:
12429 * mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
12430
12431 2009-06-16 Martin Boij <[email protected]>
12432
12433 * mpn/generic/perfpow.c (logs): Use more conservative table.
12434
12435 2009-06-15 Torbjorn Granlund <[email protected]>
12436
12437 * mpn/pa64/aors_n.asm: New file.
12438 * mpn/pa64/add_n.asm: Remove.
12439 * mpn/pa64/sub_n.asm: Remove.
12440
12441 * mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
12442
12443 2009-06-14 Torbjorn Granlund <[email protected]>
12444
12445 * mpn/x86_64/bdiv_q_1.asm: Optimise away a mov insn.
12446 * mpn/x86_64/dive_1.asm: Likewise.
12447
12448 * mpn/generic/perfpow.c (binv_root): Use mpn_bdiv_q_1, not
12449 mpn_divexact_itch for 2-adic division.
12450 (all functions): Micro optimise.
12451
12452 * Makefile.am (libmp_la_SOURCES): Add nextprime.c.
12453
12454 2009-06-13 Torbjorn Granlund <[email protected]>
12455
12456 * gmp-h.in (mpn_perfect_power_p): Declare.
12457 * configure.in (gmp_mpn_functions): Add perfpow.
12458 * mpz/perfpow.c: Now trivial, simply calls mpn_perfect_power_p.
12459
12460 2009-06-13 Martin Boij <[email protected]>
12461
12462 * mpn/generic/perfpow.c: New file.
12463 * tests/mpz/t-perfpow.c: Rewrite.
12464
12465 2009-06-12 Torbjorn Granlund <[email protected]>
12466
12467 * mpn/generic/bdiv_qr.c: New file.
12468 * mpn/generic/bdiv_q.c: New file.
12469 * configure.in (gmp_mpn_functions): Add bdiv_qr and bdiv_q.
12470 * gmp-impl.h: Declare new functions.
12471
12472 * nextprime.c: New file.
12473 * gmp-impl.h (gmp_primesieve_t, gmp_init_primesieve, gmp_nextprime):
12474 Declare.
12475 * Makefile.am (libgmp_la_SOURCES): Add nextprime.c.
12476
12477 2009-06-11 Torbjorn Granlund <[email protected]>
12478
12479 * mpn/generic/trialdiv.c: New file.
12480 * gen-trialdivtab.c: New file.
12481 * configure.in (gmp_mpn_functions): Add trialdiv.
12482 * gmp-impl.h (mpn_trialdiv): Declare
12483 * Makefile.am: Add rules for gen-trialdivtab and trialdiv.
12484
12485 * longlong.h (arm count_leading_zeros): Define for armv5.
12486
12487 * gmp-impl.h: Move down toom itch functions to after we've #defined
12488 all THRESHOLDs.
12489
12490 * dumbmp.c (isprime): Replace with slightly less inefficient code.
12491 (mpz_tdiv_r): New function.
12492
12493 2009-06-11 Niels Möller <[email protected]>
12494
12495 Support for mpn_toom32_mul in speed:
12496 * tune/speed.c (routine): Added mpn_toom32_mul.
12497 * tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_MUL): New macro.
12498 * tune/common.c (speed_mpn_toom32_mul): New function.
12499
12500 * gmp-impl.h (mpn_toom32_mul_itch): Count scratch space needed
12501 for the calls to mpn_toom22_mul.
12502 (ABOVE_THRESHOLD): Moved this and related macros so it can be used
12503 by mpn_toom32_mul_itch.
12504 (mpn_toom22_mul_itch): Count scratch space for recursive calls.
12505
12506 2009-06-11 Torbjorn Granlund <[email protected]>
12507
12508 * mpn/x86/k7/mod_1_4.asm: New file, mainly for k7, but perhaps useful
12509 also for k6 and non-sse p6.
12510
12511 2009-06-10 Torbjorn Granlund <[email protected]>
12512
12513 * mpn/x86_64/mod_1_4.asm: Minor size reducing tweaks.
12514
12515 * mpn/x86/mod_1.asm: Remove obsolete file.
12516 * mpn/x86/k7/mmx/mod_1.asm: Likewise.
12517 * mpn/x86/pentium4/sse2/mod_1.asm: Likewise.
12518 * mpn/x86/p6/mod_1.asm: Likewise.
12519 * mpn/x86/pentium/mod_1.asm: Likewise.
12520
12521 2009-06-08 Niels Möller <[email protected]>
12522
12523 * mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Reorganized, to reduce
12524 the need for scratch space, and get rid of TMP_ALLOC. Also use
12525 mpn_toom_eval_dgr3_pm1.
12526
12527 * mpn/generic/toom_interpolate_6pts.c (mpn_toom_interpolate_6pts):
12528 Stricter ASSERTs based on maximum size of polynomial coefficients.
12529 Improved comments on the signedness of intermediate values.
12530
12531 2009-06-07 Torbjorn Granlund <[email protected]>
12532
12533 * mpn/generic/toom2_sqr.c: Make it actually work.
12534
12535 * mpn/generic/toom3_sqr.c: Reduce local scratch space.
12536
12537 2009-06-05 Torbjorn Granlund <[email protected]>
12538
12539 * mpn/generic/mul_fft.c (FFT_TABLE2_SIZE): Default to 200.
12540 (MUL_FFT_TABLE2_SIZE, SQR_FFT_TABLE2_SIZE): Let these decide
12541 FFT_TABLE2_SIZE if they are defined.
12542 (struct nk): Use bit field.
12543
12544 2009-06-05 Niels Möller <[email protected]>
12545
12546 * mpn/generic/toom44_mul.c (mpn_toom44_mult): Use
12547 mpn_toom_eval_dgr3_pm1.
12548
12549 * mpn/generic/toom_eval_dgr3_pm1.c: New file.
12550
12551 * mpn/generic/toom_interpolate_7pts.c (mpn_toom_interpolate_7pts):
12552 Minor cleanup, use mpn_add rather than mpn_add_n + MPN_INCR_U.
12553
12554 * mpn/generic/toom44_mul.c (mpn_toom44_mul): Reorganized, to
12555 reduce the need for scratch space, and get rid of TMP_ALLOC.
12556
12557 2009-06-05 Torbjorn Granlund <[email protected]>
12558
12559 * mpn/generic/toom_interpolate_7pts.c: Fall back mpn_divexact_byN to
12560 mpn_bdiv_q_1_pi1, if the latter is NATIVE.
12561
12562 2009-06-04 Torbjorn Granlund <[email protected]>
12563
12564 * mpn/x86_64/bdiv_q_1.asm: New file.
12565
12566 * configure.in (HAVE_NATIVE): Add recently added functions.
12567 (GMP_MULFUNC_CHOICES): Handle addlsh_n, sublsh_n, rsblsh_n.
12568
12569 * tune/common.c (speed_mpn_bdiv_q_1, speed_mpn_bdiv_q_1_pi1):
12570 New functions.
12571 * tune/speed.c (routine): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
12572 * tune/speed.h (SPEED_ROUTINE_MPN_BDIV_Q_1_PI1): New #define.
12573 (SPEED_ROUTINE_MPN_BDIV_Q_1): Mew #define.
12574
12575 * configure.in (gmp_mpn_functions): Add bdiv_q_1.
12576 * mpn/generic/bdiv_q_1.c: New file.
12577 * mpn/asm-defs.m4 (define_mpn): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
12578 * gmp-impl.h (mpn_bdiv_q_1, mpn_bdiv_q_1_pi1): Declare.
12579
12580 * mpn/x86_64/lshift.asm: Cleanup.
12581 * mpn/x86_64/rshift.asm: Cleanup.
12582
12583 * mpn/x86_64/addlsh1_n.asm: Removed.
12584 * mpn/x86_64/aorrlsh1_n.asm: Generalised addlsh1_n.asm to handle
12585 addlsh1_n and rsblsh1_n functionality.
12586
12587 * tests/refmpn.c (refmpn_rsblsh1_n): New function.
12588 * tests/devel/try.c: Test mpn_rsblsh1_n.
12589 * tests/tests.h: Declare refmpn_rsblsh1_n.
12590 * tune/common.c (speed_mpn_rsblsh1_n): New function.
12591 * tune/speed.c (routine): Add mpn_rsblsh1_n.
12592 * tune/speed.h (mpn_rsblsh1_n): Declare.
12593
12594 * configure.in (gmp_mpn_functions_optional): Add rsblsh1_n.
12595 (GMP_MULFUNC_CHOICES): Handle rsblsh1_n defined with a mulfunc.
12596 * mpn/asm-defs.m4 (define_mpn): Add rsblsh1_n.
12597 * gmp-impl.h (mpn_rsblsh1_n): Declare.
12598
12599 * mpn/generic/toom32_mul.c: Consistently use TOOM22_MUL_N_REC.
12600
12601 2009-06-03 Marco Bodrato <[email protected]>
12602
12603 * mpn/generic/toom43_mul.c: New file.
12604 * mpn/generic/toom52_mul.c: New file.
12605 * mpn/generic/toom_interpolate_6pts.c: New file.
12606
12607 2009-06-03 Torbjorn Granlund <[email protected]>
12608
12609 * configure.in (gmp_mpn_functions): Add toom43_mul, toom52_mul, and
12610 toom_interpolate_6pts, but also some previously forgotten functions.
12611 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Likewise.
12612 * gmp-impl.h: Declare new functions. Sort toom function declarations.
12613
12614 * gmp-impl.h: Rename toom4_* flags enum to toom7_*. Relevant C files
12615 updated.
12616
12617 * mpn/generic/toom_interpolate_7pts (divexact_2exp): Remove.
12618
12619 2009-06-02 Torbjorn Granlund <[email protected]>
12620
12621 * demos/factorize.c: Add -q command line option.
12622
12623 2009-06-02 Marco Bodrato <[email protected]>
12624
12625 * mpn/generic/toom_interpolate_7pts.c: Streamline, resulting in speed
12626 improvements.
12627
12628 * mpn/generic/toom_interpolate_5pts.c: Likewise, but also completely
12629 do away with explicit scratch space.
12630 * gmp-impl.h (mpn_toom_interpolate_5pts): Update prototype.
12631
12632 * mpn/generic/mul_n.c (mpn_toom3_sqr_n, mpn_toom3_mul_n):
12633 Update toom_interpolate_5pts call without scratch space parameter.
12634 * mpn/generic/toom3_sqr.c: Likewise.
12635 * mpn/generic/toom42_mul.c: Likewise.
12636 * mpn/generic/toom33_mul.c: Likewise.
12637
12638 * mpn/generic/toom33_mul.c: Reduce local scratch space.
12639 * mpn/generic/toom32_mul.c: Rewrite to not use local scratch space.
12640
12641 2009-06-02 Torbjorn Granlund <[email protected]>
12642
12643 * mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): New macro, use it for
12644 oo point.
12645
12646 2009-06-01 Torbjorn Granlund <[email protected]>
12647
12648 * mpn/generic/mul.c: Loop to avoid excessive recursion in toom33 and
12649 toom44 slicing code.
12650
12651 * mpz/remove.c: Correctly handle multiplicity that does not fit an int.
12652
12653 * Makefile.am (dist-hook): Check library version consistency.
12654
12655 * mpn/generic/mul.c: Rewrite.
12656
12657 2009-05-29 Torbjorn Granlund <[email protected]>
12658
12659 * tests/mpz/t-divis.c (check_random): Create huge test operands.
12660
12661 * mpn/generic/toom44_mul.c: Allocate temp space using one TMP_ALLOC
12662 call, not multiple TMP_SALLOC.
12663 * mpn/generic/toom4_sqr.c: Likewise.
12664
12665 * gmp-impl.h (mpn_toom22_mul_itch): Replace totally wrong code.
12666
12667 * mpn/generic/mullow_n.c: Relax overlap requirement implied by ASSERT.
12668
12669 * mpn/generic/divis.c: Rewrite.
12670
12671 * gmp-impl.h (mpn_mu_bdiv_qr): Now returns mp_limb_t.
12672 (mpn_toom2_sqr_itch): Simplify.
12673
12674 * mpn/generic/mu_bdiv_qr.c: Implement properly.
12675
12676 2009-05-27 Torbjorn Granlund <[email protected]>
12677
12678 * mpn/generic/mod_1_1.c: Add proper ASSERT functionality cps function.
12679 * mpn/generic/mod_1_2.c: Likewise.
12680 * mpn/generic/mod_1_3.c: Likewise.
12681 * mpn/generic/mod_1_4.c: Likewise.
12682
12683 * tune: Add speed measuring of toom22, toom33, and toom44.
12684
12685 * mpn/generic/toom22_mul.c: Handle potentially unbalanced coefficient
12686 product better.
12687
12688 2009-05-26 Torbjorn Granlund <[email protected]>
12689
12690 * tests/mpz/t-mul.c (ref_mpn_mul): Use mpn_toom44_mul in FFT range for
12691 better huge-operands performance.
12692
12693 2009-05-24 Torbjorn Granlund <[email protected]>
12694
12695 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Try "$L" too, before "$".
12696
12697 2009-05-23 Torbjorn Granlund <[email protected]>
12698
12699 * gmp-impl.h (mpn_mod_1s_1p,mpn_mod_1s_2p,mpn_mod_1s_3p,mpn_mod_1s_4p):
12700 Declare using __GMP_ATTRIBUTE_PURE.
12701
12702 * tune/tuneup.c (tune_mod_1): Specify check_size for measuring mod_1_N
12703 functions.
12704 (one): Remove redundant size loop exit condition.
12705
12706 2009-05-20 Torbjorn Granlund <[email protected]>
12707
12708 * mpn/x86/pentium4/sse2/mod_1_4.asm: New file.
12709 * mpn/x86/p6/sse2/mod_1_4.asm: New file (grabbing pentium4 code).
12710
12711 2009-05-18 Torbjorn Granlund <[email protected]>
12712
12713 * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 4.
12714 (__GNU_MP_VERSION_PATCHLEVEL): Set to -1.
12715
12716 * mpn/x86_64/mod_1_4.asm: New file.
12717
12718 * mpn/asm-defs.m4: Correct names for mod_1_N functions.
12719 Add defines for corresponding cps functions.
12720
12721 * mpn/generic/mod_1_2.c: Support any sizes > 1.
12722 * mpn/generic/mod_1_3.c: Likewise.
12723 * mpn/generic/mod_1_4.c: Likewise.
12724
12725 2009-05-12 Torbjorn Granlund <[email protected]>
12726
12727 * Version 4.3.1 released.
12728
12729 2009-05-11 Torbjorn Granlund <[email protected]>
12730
12731 * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
12732
12733 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
12734 Bump version info.
12735
12736 2009-05-09 Torbjorn Granlund <[email protected]>
12737
12738 * tests/mpz: Add MPZ_CHECK_FORMAT to many tests.
12739
12740 2009-05-07 Torbjorn Granlund <[email protected]>
12741
12742 * mpn/x86/pentium4/sse2/mul_basecase.asm: Avoid L(ret), "ret" is
12743 defined in x86-defs.m4.
12744
12745 2009-05-06 Torbjorn Granlund <[email protected]>
12746
12747 * mpn/x86/p6/aors_n.asm: Use L() for labels.
12748 * mpn/x86/pentium4/sse2/addmul_1.asm: Likewise.
12749 * mpn/x86/pentium4/sse2/mul_1.asm: Likewise.
12750 * mpn/x86/pentium4/sse2/mul_basecase.asm: Likewise.
12751 * mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
12752 * mpn/x86_64/lshift.asm: Likewise.
12753 * mpn/x86_64/rshift.asm: Likewise.
12754
12755 * tests/cxx/t-locale.cc (point_string): Declare as extern "C" to
12756 placate compilers that mangle variable names.
12757
12758 2009-05-04 Torbjorn Granlund <[email protected]>
12759
12760 * tests/mpz/t-gcd.c: Generate operands that are multiple of each other.
12761
12762 2009-05-01 Torbjorn Granlund <[email protected]>
12763
12764 * gmp-h.in (__GMP_EXTERN_INLINE): Support for more systems.
12765 (gmp_randinit_set): Add missing __GMP_DECLSPEC.
12766
12767 2009-04-28 Torbjorn Granlund <[email protected]>
12768
12769 * mpn/generic/neg_n.c: New file.
12770 * configure.in (gmp_mpn_functions): Add neg_n.
12771 * mpn/asm-defs.m4 (define_mpn): Add neg_n.
12772 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add neg_n.c.
12773 * gmp-h.in: Handle mpn_neg_n properly.
12774
12775 * mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Nailify.
12776
12777 * mpn/generic/gcdext.c: Change some MPN_NORMALIZE to
12778 MPN_NORMALIZE_NOT_ZERO.
12779 * mpn/generic/gcdext_lehmer.c: Likewise.
12780 Add a MPN_NORMALIZE_NOT_ZERO.
12781
12782 * mpn/generic/binvert.c: Remove own mpn_neg_n.
12783
12784 * tests/mpz/t-gcd.c: Add some MPZ_CHECK_FORMAT calls.
12785
12786 2009-04-27 Torbjorn Granlund <[email protected]>
12787
12788 * mpn/Makefile.am (TARG_DIST): Add minithres.
12789
12790 * mpn/generic/bdiv_dbm1c.c: Handle nails.
12791
12792 2009-04-26 Torbjorn Granlund <[email protected]>
12793
12794 * config.guess: Recognise more POWER processor types.
12795
12796 2009-04-25 Torbjorn Granlund <[email protected]>
12797
12798 * mpn/x86/pentium4/sse2/popcount.asm: Work around Apple reloc bug.
12799 * mpn/x86/darwin.m4: Define symbol "DARWIN".
12800
12801 2009-04-19 Torbjorn Granlund <[email protected]>
12802
12803 * mpn/generic/powm.c (mpn_redc_n): Use ASSERT_ALWAYS, not abort().
12804 * mpn/generic/powm_sec.c: Likewise.
12805
12806 * mpn/powerpc64/aix.m4 (EXTERN_FUNC): New define. Add dummy variants
12807 for other m4 files.
12808 * mpn/powerpc64/mode64/divrem_1.asm: Use EXTERN_FUNC.
12809 * mpn/powerpc64/mode64/divrem_1.asm: Likewise.
12810
12811 2009-04-16 Torbjorn Granlund <[email protected]>
12812
12813 * mpn/x86_64/x86_64-defs.m4 (JUMPTABSECT): New define.
12814 * mpn/x86_64/darwin.m4: Likewise.
12815 * mpn/x86_64/sqr_basecase.asm: Rework switch code using JUMPTABSECT.
12816
12817 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
12818 Remove an unused variable.
12819
12820 * mpn/x86/x86-defs.m4 (LEA): Get SIZE arguments right.
12821
12822 2009-04-14 Torbjorn Granlund <[email protected]>
12823
12824 * Version 4.3.0 released.
12825
12826 * scanf/doscan.c (__gmp_doscan): Pad 3-operand scanf call with dummy
12827 argument.
12828 * scanf/sscanffuns.c (scan): Disable vsscanf variant for now.
12829
12830 2009-04-13 Torbjorn Granlund <[email protected]>
12831
12832 * scanf/sscanffuns.c (scan): Rewrite to use stdarg.
12833
12834 * tests/mpz/t-root.c: Rewrite. Add unconditional gcc 4.3.2 tests.
12835
12836 2009-04-09 Torbjorn Granlund <[email protected]>
12837
12838 * mpn/generic/powm.c: New file.
12839 * mpn/generic/powlo.c: New file.
12840 * mpn/generic/powm_sec.c: New file.
12841 * configure.in (gmp_mpn_functions): List new functions.
12842
12843 2009-04-08 Torbjorn Granlund <[email protected]>
12844
12845 * mpz/urandomm.c: Amend last fix.
12846
12847 2009-04-06 Torbjorn Granlund <[email protected]>
12848
12849 * configure.in: Support Sun cc for x86_64.
12850
12851 * mpz/urandomm.c: Handle operand overlap.
12852
12853 2009-03-11 Torbjorn Granlund <[email protected]>
12854
12855 * configure.in (powerpc): Brave removing -Wa,-mppc64, in the hope that
12856 GCC now passes the proper options.
12857
12858 2009-03-09 Torbjorn Granlund <[email protected]>
12859
12860 * mpn/x86_64/divrem_1.asm: Add a nop to save a cycle in unnormalised
12861 case.
12862
12863 2009-03-05 Torbjorn Granlund <[email protected]>
12864
12865 * ia64/gmp-mparam.h, arm/gmp-mparam.h, x86/p6/mmx/gmp-mparam.h,
12866 pa32/hppa2_0/gmp-mparam.h sparc32/v9/gmp-mparam.h: Update.
12867
12868 2009-03-03 Torbjorn Granlund <[email protected]>
12869
12870 * mpn/ia64/bdiv_dbm1c.asm: Accept/return carry.
12871
12872 2009-03-02 Torbjorn Granlund <[email protected]>
12873
12874 * configure.in (64-bit sparc/solaris): Pass -xO3, not -O3 to solaris
12875 system compiler.
12876
12877 2009-03-01 Torbjorn Granlund <[email protected]>
12878
12879 * longlong.h (mips, powerpc): Provide assembly-free umul_ppmm for newer
12880 gcc.
12881
12882 2009-02-04 Torbjorn Granlund <[email protected]>
12883
12884 * mpn/generic/redc_2.c: Remove code for testing and timing. Update
12885 to current FSF header.
12886 * mpn/generic/redc_1.c: Update to current FSF header.
12887
12888 2009-01-21 Torbjorn Granlund <[email protected]>
12889
12890 * mpz/powm.c (redc): Remove.
12891 (mpz_powm): Use mpn_redc_1 instead of redc.
12892
12893 * tests/mpz/t-powm.c: Rewrite reference code.
12894
12895 2009-01-18 Torbjorn Granlund <[email protected]>
12896
12897 * tests/mpz: Increase reps for many tests.
12898
12899 * mpn/generic/rootrem.c (mpn_rootrem_internal): Use MPN_DECR_U instead of
12900 mpn_sub_1 (works around gcc 4.3 bugs and is also faster).
12901
12902 2009-01-16 Torbjorn Granlund <[email protected]>
12903
12904 * tests/tests.h: Declare refmpn_divrem_2.
12905
12906 2009-01-15 Torbjorn Granlund <[email protected]>
12907
12908 * mpz/perfpow.c: Add TMP_FREE before every return statement.
12909
12910 * mpn/generic/rootrem.c (mpn_rootrem_internal): Add a missing TMP_FREE.
12911
12912 * configure.in (gcc_cflags, gcc_64_cflags): Revert from -O3 to -O2,
12913 the change was accidental and cause too much miscompilation.
12914
12915 2009-01-14 Torbjorn Granlund <[email protected]>
12916
12917 * tune/tuneup.c (tune_mod_1): Run MOD_1_x_THRESHOLD tests also when
12918 longlong.h specified UDIV_PREINV_ALWAYS.
12919
12920 * mpn/generic/mod_1.c (mpn_mod_1): Properly check for normalisation
12921 divisor.
12922
12923 2009-01-13 Torbjorn Granlund <[email protected]>
12924
12925 * tune/tuneup.c (tune_mod_1): Tune for MOD_1_1_THRESHOLD,
12926 MOD_1_2_THRESHOLD, and MOD_1_4_THRESHOLD.
12927
12928 * mpn/generic/mod_1.c: Rewrite.
12929 * mpn/generic/mod_1_1.c: New file.
12930 * mpn/generic/mod_1_2.c: New file.
12931 * mpn/generic/mod_1_3.c: New file.
12932 * mpn/generic/mod_1_4.c: New file.
12933 * configure.in (gmp_mpn_functions): Add mod_1_*.
12934 * mpn/asm-defs.m4 (define_mpn): Add mod_1_*.
12935 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mod_1_*.c.
12936 * gmp-impl.h: Declare new mpn_mod_1s_* functions and associated
12937 THRESHOLD macros.
12938 (udiv_rnd_preinv): New macro.
12939
12940 2009-01-12 Torbjorn Granlund <[email protected]>
12941
12942 * tune/tuneup.c (tune_gcd_dc,tune_gcdext_dc): Lower step_factor to 0.1.
12943
12944 2009-01-08 Torbjorn Granlund <[email protected]>
12945
12946 * tests/mpz/t-nextprime.c: New test file.
12947 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-nextprime.
12948
12949 From Niels Möller:
12950 * mpz/nextprime.c: Handle large prime gaps by limiting incr.
12951
12952 2009-01-04 Torbjorn Granlund <[email protected]>
12953
12954 * mpz/and.c, mpz/ior.c, mpz/xor.c: Re-read only necessary source
12955 pointers after reallocation. Misc cleanup.
12956
12957 * gmp-impl.h (MPN_TOOM44_MAX_N): New define, replaces MPN_TOOM3_MAX_N.
12958
12959 * mpn/x86/fat/diveby3.c: New file.
12960
12961 2008-12-30 Niels Möller <[email protected]>
12962
12963 * doc/gmp.texi (Greatest Common Divisor Algorithms): Updated
12964 section on GCD algorithms.
12965
12966 2008-12-29 Torbjorn Granlund <[email protected]>
12967
12968 * doc/gmp.texi (Multiplication Algorithms): Add descriptions of Toom-4
12969 and unbalanced multiplication.
12970 (Radix to Binary): Add warning that text is outdated,
12971 (Contributors): Fix typos.
12972
12973 * mpn/generic/toom*.c: Use coherent MAYBE_ macros for trimming
12974 unreachable recursive functions.
12975 * gmp-impl.h: Update toom itch functions.
12976
12977 * mpn/x86_64/sqr_basecase.asm: Slightly increase stack allocation, to
12978 placate tuneup.
12979
12980 2008-12-28 Torbjorn Granlund <[email protected]>
12981
12982 * mpn/x86_64/pentium4/aors_n.asm: Tune prologue code.
12983
12984 * mpn/x86_64/pentium4/aorslsh1_n.asm: New file.
12985
12986 * mpn/x86_64/darwin.m4: Define symbol "DARWIN".
12987 * mpn/x86_64/invert_limb.asm: Work around darwin quirks.
12988
12989 * mpn/x86_64/sqr_basecase.asm: Further optimize, support Darwin.
12990
12991 * mpn/x86_64/invert_limb.asm: New file.
12992
12993 2008-12-27 Torbjorn Granlund <[email protected]>
12994
12995 * mpn/x86_64/core2/aorslsh1_n.asm: New file.
12996
12997 2008-12-26 Torbjorn Granlund <[email protected]>
12998
12999 * mpz/perfpow.c: Handle negative arguments properly.
13000 * tests/mpz/t-perfpow.c: New file.
13001 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-perfpow.
13002
13003 2008-12-23 Torbjorn Granlund <[email protected]>
13004
13005 * tests/mpz/t-mul.c (dump_abort): Improve error message.
13006
13007 * gcd.c gcd_subdiv_step.c gcdext.c gcdext_subdiv_step.c:
13008 Remove private mpn_zero_p.
13009
13010 * tune/tuneup.c (tune_mul): Tune for MUL_TOOM44_THRESHOLD.
13011 (tune_sqr): Tune for SQR_TOOM4_THRESHOLD.
13012
13013 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom44_mul.c and
13014 toom4_sqr.c.
13015
13016 * configure.in (gmp_mpn_functions): Toom function updates.
13017
13018 * Rename mpn/mul_toomMN.c to mpn/toomMN_mul.c. Function names changed
13019 accordingly.
13020
13021 * mpn/toomMN_mul.c: Add scratch parameter. Do recursive multiplies
13022 properly. Misc tuning. Remove CHECK and TIMING code.
13023
13024 * mpn/toom2_sqr.c, mpn/toom3_sqr.c, mpn/toom4_sqr.c: New files.
13025
13026 * gmp-impl.h (mpn_toomMN_mul_itch): Several new functions.
13027 (mpn_zero_p): New functions.
13028 Add various TOOM4/TOOM44 related parameters.
13029 Update mpn_toomMN_mul prototypes.
13030
13031 * mpn/generic/mul_n.c (mpn_mul_n): Call mpn_toom44_mul. Use TMP_BALLOC
13032 instead of malloc.
13033 (mpn_sqr_n): Analogous changes.
13034
13035 * mpn/generic/mul.c: Update unbalanced toom code to pass scratch space.
13036
13037 2008-12-21 Torbjorn Granlund <[email protected]>
13038
13039 * mpz/nextprime.c: Add TMP_SDECL/MARK/FREE.
13040
13041 2008-12-20 Torbjorn Granlund <[email protected]>
13042
13043 * mpn/generic/sqrtrem.c (mpn_sqrtrem1): Rewrite, improve interface.
13044 (invsqrttab): New table, remove table approx_tab.
13045 (mpn_sqrtrem2): Optimize, update mpn_sqrtrem1 call.
13046 (mpn_sqrtrem): Update mpn_sqrtrem1 call.
13047
13048 2008-12-18 Torbjorn Granlund <[email protected]>
13049
13050 * mpz/nextprime.c: Run 10 mpz_millerrabin tests (was 5).
13051 Give credit to authors.
13052
13053 * mpn/x86_64/redc_1.asm: Align stack as mandated by ABI.
13054
13055 * mpn/x86_64/divrem_2.asm: Add some comments.
13056
13057 * mpn/x86_64/darwin.m4: New file.
13058 * configure.in: Use x86_64/darwin.m4.
13059
13060 2008-12-15 Torbjorn Granlund <[email protected]>
13061
13062 * doc/projects.html: Remove GCD and division projects, update text on
13063 multiplication.
13064
13065 * doc/tasks.html: Add a caution about that the file is somewhat
13066 outdated.
13067
13068 2008-12-14 Torbjorn Granlund <[email protected]>
13069
13070 * mpn/alpha/ev6/aorsmul_1.asm: New file (same code for mpn_addmul_1,
13071 much improved for mpn_submul_1).
13072 * mpn/alpha/ev6/addmul_1: File removed.
13073 * mpn/alpha/ev6/submul_1: File removed.
13074
13075 2008-12-09 Torbjorn Granlund <[email protected]>
13076
13077 From David Harvey:
13078 * mpn/x86_64/mul_basecase.asm: Further tweaks for code size and speed.
13079
13080 * mpn/powerpc64/mode64/divrem_1.asm: Rewrite.
13081
13082 * mpn/powerpc64/mode64/mul_basecase.asm: New file.
13083
13084 2008-12-08 Torbjorn Granlund <[email protected]>
13085
13086 * mpn/powerpc64/mode64/gmp-mparam.h: New file.
13087
13088 * gmp-impl.h: Additional cleanups.
13089 (mpn_set_str_compute_powtab): New prototype.
13090 (mpn_powm, mpn_powlo): New prototypes.
13091
13092 * mpz/pow_ui.c: Handle some small exponents locally.
13093
13094 2008-12-07 Torbjorn Granlund <[email protected]>
13095
13096 * mpn/generic/set_str.c: Remove prototypes (they are in gmp-impl.h).
13097
13098 * tune/set_strs.c, tune/set_strb.c: Make prototypes effective by moving
13099 the #define mpn_set_str* before including gmp-impl.h.
13100
13101 * All files: Change _PROTO => __GMP_PROTO.
13102
13103 * tune/speed.c (routine): Remove non-working choice mpn_set_str_subquad.
13104 * tune/common.c (speed_mpn_dc_set_str): Remove, it is broken.
13105
13106 * mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Make this static,
13107 and inline it.
13108
13109 * gmp-impl.h: Major cleanup.
13110 (Remove formal parameter names. Use __GMP_PROTO consistently. Move
13111 __GMP_PROTO and __MPN use to adjacent lines for declared function.
13112 Fix typos. Remove code inside #if 0.)
13113
13114 * configure.in (gmp_mpn_functions): Add mul_toom33. Reformat.
13115
13116 2008-12-05 Torbjorn Granlund <[email protected]>
13117
13118 * mpn/generic/redc_1.c: New file.
13119 * mpn/generic/redc_2.c: New file.
13120
13121 * configure.in (gmp_mpn_functions): List redc_1 and redc_2.
13122 (HAVE_NATIVE): Likewise.
13123
13124 * tune/common.c (speed_mpn_redc_1): Renamed from speed_redc.
13125 * tune/speed.c (routine): Remove "redc", and "mpn_redc_1".
13126 * tune/speed.h (SPEED_ROUTINE_REDC_1): Renamed from SPEED_ROUTINE_REDC.
13127 Updated call.
13128 * tune/tuneup.c (tune_powm): Update redc call.
13129
13130 2008-12-04 Torbjorn Granlund <[email protected]>
13131
13132 * mpn/x86_64/sqr_basecase.asm: Inline a combined diagonal product code
13133 and addlsh1 loop. Misc cleanup.
13134
13135 2008-12-02 Torbjorn Granlund <[email protected]>
13136
13137 * mpn/x86_64/sqr_basecase.asm: New file.
13138
13139 2008-11-30 Torbjorn Granlund <[email protected]>
13140
13141 * mpn/generic/sqr_basecase.c: Fix typo in mpn_addmul_2s variant.
13142
13143 2008-11-28 Torbjorn Granlund <[email protected]>
13144
13145 * mpn/x86_64/redc_1.asm: Rewrite.
13146
13147 2008-11-27 Torbjorn Granlund <[email protected]>
13148
13149 * tests/refmpn.c (refmpn_redc_1): New function.
13150
13151 2008-11-25 Torbjorn Granlund <[email protected]>
13152
13153 * mpn/x86/k7/aorsmul_1.asm: Actually handle mpn_submul_1.
13154
13155 2008-11-23 Torbjorn Granlund <[email protected]>
13156
13157 * mpn/x86_64/divrem_1.asm: Rewrite.
13158
13159 * alpha/divrem_2.asm: New file.
13160 * powerpc32/divrem_2.asm: New file.
13161 * powerpc64/mode64/divrem_2.asm: New file.
13162 * x86/divrem_2.asm: New file.
13163 * x86_64/divrem_2.asm: New file.
13164 * tests/refmpn.c (refmpn_divrem_2): New function.
13165
13166 2008-11-22 Torbjorn Granlund <[email protected]>
13167
13168 * mpn/x86/k7/mul_1.asm: Rewrite for smaller size and better speed.
13169 * mpn/x86/k7/aorsmul_1.asm: Likewise.
13170
13171 * acinclude.m4 (GMP_VERSION): Include last component even when zero.
13172
13173 2008-11-21 Torbjorn Granlund <[email protected]>
13174
13175 * mpn/x86_64/README: Rewrite.
13176
13177 * tests/devel/try.c (malloc_region, mprotect_maybe): Add casts for
13178 printf type correctness.
13179
13180 * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
13181
13182 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
13183 Bump version info.
13184
13185 2008-11-20 Torbjorn Granlund <[email protected]>
13186
13187 * gmp-impl.h: Rename modlimb_invert to binvert_limb.
13188 * tune/speed.h: Likewise.
13189 * tune/modlinv.c: Likewise.
13190 * tune/common.c: Likewise.
13191 * tests/t-modlinv.c: Likewise.
13192 * tests/t-constants.c: Likewise.
13193 * mpn/sparc64/mode1o.c: Likewise.
13194 * mpn/alpha/dive_1.c: Likewise.
13195 * mpn/sparc64/dive_1.c: Likewise.
13196 * mpn/generic/mode1o.c: Likewise.
13197 * mpn/generic/dive_1.c: Likewise.
13198 * mpn/generic/bdivmod.c: Likewise.
13199 * mpn/alpha/mode1o.asm: Likewise.
13200 * mpn/asm-defs.m4: Likewise.
13201 * mpn/ia64/mode1o.asm: Likewise.
13202 * mpn/powerpc32/README: Likewise.
13203 * mpn/powerpc32/mode1o.asm: Likewise.
13204 * mpn/powerpc64/mode64/dive_1.asm: Likewise.
13205 * mpn/powerpc64/mode64/mode1o.asm: Likewise.
13206 * mpn/x86/dive_1.asm: Likewise.
13207 * mpn/x86/k6/mmx/dive_1.asm: Likewise.
13208 * mpn/x86/k6/mode1o.asm: Likewise.
13209 * mpn/x86/k7/dive_1.asm: Likewise.
13210 * mpn/x86/k7/mode1o.asm: Likewise.
13211 * mpn/x86/p6/dive_1.asm: Likewise.
13212 * mpn/x86/p6/mode1o.asm: Likewise.
13213 * mpn/x86/pentium/dive_1.asm: Likewise.
13214 * mpn/x86/pentium/mode1o.asm: Likewise.
13215 * mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
13216 * mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
13217 * mpn/x86_64/dive_1.asm: Likewise.
13218 * mpn/x86_64/mode1o.asm: Likewise.
13219
13220 * mpn/x86_64/aors_n.asm: Replace with slightly faster, more alignment
13221 neutral loop.
13222
13223 2008-11-18 Torbjorn Granlund <[email protected]>
13224
13225 * configure.in: Remove gcd_finda related declarations.
13226 * gmp-impl.h (mpn_gcd_finda): Remove declaration.
13227 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Remove gcd_finda.
13228 * mpn/asm-defs.m4: Remove define_mpn(gcd_finda).
13229 * mpn/x86/k6/gcd_finda.asm: Remove file.
13230 * tests/devel/try.c (param_init): Remove mpn_gcd_finda.
13231 (choice_array): Remove mpn_gcd_finda.
13232 * tests/mpn/t-instrument.c (check): Remove testing of mpn_gcd_finda.
13233 * tests/refmpn.c (refmpn_gcd_finda): Remove.
13234 * tests/tests.h (refmpn_gcd_finda): Remove declaration.
13235 * tune/common.c (speed_mpn_gcd_finda): Remove.
13236 * tune/gcd_finda_gen.c: Remove file.
13237 * tune/speed.h (speed_mpn_gcd_finda): Remove declaration.
13238 * tune/speed.c (routine): Remove mpn_gcd_finda entry.
13239
13240 * tests/mpz/t-powm.c: Print test number when failing a test.
13241
13242 * mpn/x86_64/redc_1.asm (CALL): Move from here...
13243 * mpn/x86_64/x86_64-defs.m4: ...to here.
13244
13245 * gmp-impl.h (mpn_jacobi_base): Remove parameter names.
13246
13247 2008-11-11 Torbjorn Granlund <[email protected]>
13248
13249 * tests/mpf/t-conv.c: Add some specific tests, supplementing the random
13250 tests.
13251
13252 2008-11-09 Torbjorn Granlund <[email protected]>
13253
13254 * mpf/set_str.c: Default 'base' before letting exp_base inherit it.
13255
13256 * tests/cxx/t-prec.cc: Use the right precision for all float constants.
13257
13258 2008-11-08 Torbjorn Granlund <[email protected]>
13259
13260 * doc/gmp.texi (Float Comparison): Update mpf_eq documentation.
13261
13262 * mpf/eq.c: Compare the right number of bits.
13263
13264 2008-11-02 Torbjorn Granlund <[email protected]>
13265
13266 Undo, it made testing too slow:
13267 * tests/mpz/t-mul.c: Use slower geometric progression for operand
13268 sizes.
13269
13270 * mpn/x86/k7/mod_34lsub1.asm: Use movzb for masking low 8 bits.
13271
13272 2008-10-31 Niels Möller <[email protected]>
13273
13274 * mpn/generic/hgcd2.c (div1): New function (taken from old gcdext
13275 implementation)
13276 (mpn_hgcd2): Use single precision for the second half of the work.
13277
13278 2008-10-30 Torbjorn Granlund <[email protected]>
13279
13280 * mpn/x86/p6/sse2/gmp-mparam.h: New file.
13281
13282 2008-10-29 Torbjorn Granlund <[email protected]>
13283
13284 * configure.in (x86 fat_path): Add "x86/p6/sse2".
13285
13286 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Recognize sse2 capable p6
13287 (pentiumm, core2).
13288
13289 * mpn/x86/p6/sse2/mul_1.asm: New file.
13290 * mpn/x86/p6/sse2/addmul_1.asm: New file.
13291 * mpn/x86/p6/sse2/submul_1.asm: New file.
13292 * mpn/x86/p6/sse2/mul_basecase.asm: New file.
13293 * mpn/x86/p6/sse2/sqr_basecase.asm: New file.
13294 * mpn/x86/p6/sse2/popcount.asm: New file.
13295
13296 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Handle "extended" fields for
13297 model and family.
13298
13299 2008-10-28 Torbjorn Granlund <[email protected]>
13300
13301 From Mickael Gastineau:
13302 * gmp-h.in (gmp_urandomm_ui, gmp_urandomb_ui): Add __GMP_DECLSPEC.
13303
13304 2008-10-27 Torbjorn Granlund <[email protected]>
13305
13306 * gmp-h.in (mpn_gcdext_1): Remove bogus __GMP_ATTRIBUTE_PURE.
13307
13308 2008-10-27 Niels Möller <[email protected]>
13309
13310 * tune/common.c (speed_mpn_hgcd): Call mpn_hgcd_matrix_init once
13311 for each call to mpn_hgcd.
13312 (speed_mpn_hgcd_lehmer): Likewise.
13313
13314 2008-10-26 Torbjorn Granlund <[email protected]>
13315
13316 * configure.in: Point to p6/sse2 for pentiumm and core2.
13317
13318 * gmp-impl.h (mpn_add_nc, mpn_sub_nc): Move these macros to after fat
13319 definitions.
13320
13321 * tune/common.c, tune/speed.c, tune/speed.h:
13322 Add speed measurement of mpn_bdiv_dbm1c.
13323
13324 2008-10-24 Torbjorn Granlund <[email protected]>
13325
13326 * mpn/x86_64/gmp-mparam.h (MUL_FFT_TABLE2, SQR_FFT_TABLE2): Extend.
13327
13328 * mpz/nextprime.c: Move declarations to function beginning.
13329
13330 2008-10-23 Niels Möller <[email protected]>
13331
13332 * gmp-impl.h (DECL_gcdext_1): Deleted.
13333
13334 2008-10-22 Torbjorn Granlund <[email protected]>
13335
13336 * mpn/x86_64/atom/aors_n.asm: New file.
13337 * mpn/x86_64/atom/gmp-mparam.h: New file.
13338
13339 2008-10-21 Torbjorn Granlund <[email protected]>
13340
13341 With Neils Möller:
13342 * mpz/nextprime.c: Rewrite.
13343
13344 * tests/devel/try.c (main): Use strtol for 's' and 'S' optargs.
13345
13346 * mpn/x86_64/pentium4/rshift.asm: Misc cleanups.
13347 * mpn/x86_64/pentium4/lshift.asm: Likewise.
13348
13349 * mpn/x86_64/pentium4/aors_n.asm: Use fewer registers.
13350
13351 * configure.in: Set up specific path for x86_64/atom.
13352
13353 2008-10-21 Niels Möller <[email protected]>
13354
13355 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Removed
13356 qstack.c.
13357 * mpn/generic/qstack.c: Deleted obsolete file.
13358
13359 2008-10-20 Torbjorn Granlund <[email protected]>
13360
13361 * mpn/x86_64/core2/aorsmul_1.asm: New file.
13362
13363 2008-10-19 Torbjorn Granlund <[email protected]>
13364
13365 * mpn/x86_64/aors_n.asm: Remove redundant MULFUNC_PROLOGUE.
13366
13367 * gmp-impl.h (popc_limb): Remove redundant checks of GMP_LIMB_BITS
13368 inside several of these macros.
13369
13370 2008-10-17 Torbjorn Granlund <[email protected]>
13371
13372 * tests/mpz/t-mul.c: Use slower geometric progression for operand
13373 sizes. Do every other tests for same size operands.
13374
13375 2008-10-15 Torbjorn Granlund <[email protected]>
13376
13377 * mpn/x86_64/mul_basecase.asm: Simplify addressing in epilogue.
13378
13379 * mpn/mips64/divrem_1.asm: Remove file, it is n32-only, and uses an old
13380 algorithm.
13381
13382 * config.guess, config.sub, configure.in: Support Intel Atom processor.
13383
13384 2008-10-10 Torbjorn Granlund <[email protected]>
13385
13386 * mpq/mul.c: Fix typo in last change.
13387
13388 2008-10-09 Torbjorn Granlund <[email protected]>
13389
13390 * tests/refmpn.c (refmpn_sb_divrem_mn): Work around a gcc bug.
13391
13392 2008-10-08 Torbjorn Granlund <[email protected]>
13393
13394 * mpq/mul.c: Use TMP_ALLOC. Cleanup.
13395 * mpq/div.c: Likewise.
13396
13397 * mpn/x86_64/mul_basecase.asm: Use lea directly for loading entry point
13398 addresses.
13399
13400 2008-10-09 Niels Möller <[email protected]>
13401
13402 * mpn/x86/k7/gmp-mparam.h: Updated GCD-related values.
13403
13404 2008-10-05 Torbjorn Granlund <[email protected]>
13405
13406 * mpn/generic/mul_fft.c (mpn_mul_fft_internal): Do store
13407 mpn_fft_norm_modF return value, if (rec).
13408
13409 2008-10-04 Torbjorn Granlund <[email protected]>
13410
13411 * mpn/x86_64/aorsmul_1.asm: Replace with faster code.
13412 * mpn/x86_64/mul_1.asm: Likewise.
13413 * mpn/x86_64/addmul_2.asm: Likewise.
13414 * mpn/x86_64/mul_2.asm: Likewise.
13415 * mpn/x86_64/mul_basecase.asm: Likewise.
13416
13417 2008-10-02 Torbjorn Granlund <[email protected]>
13418
13419 * mpn/minithres/gmp-mparam.h: Update FFT values.
13420
13421 2008-10-02 Niels Möller <[email protected]>
13422
13423 * hgcd.c (mpn_hgcd_matrix_mul): Fixed normalization bug.
13424
13425 2008-09-24 Torbjorn Granlund <[email protected]>
13426
13427 * configure.in: Handle --enable-minithres.
13428 * mpn/minithres/gmp-mparam.h: Update all values.
13429
13430 2008-09-22 Torbjorn Granlund <[email protected]>
13431
13432 * tune/speed.c (routine): New entry for mpn_mul.
13433 * tune/speed.h (SPEED_ROUTINE_MPN_MUL): Renamed from
13434 SPEED_ROUTINE_MPN_MUL_BASECASE.
13435 (speed_mpn_mul): Renamed from speed_mpn_mul_basecase.
13436 (SPEED_ROUTINE_MPN_MUL): Allocate our own memory of xp operand.
13437
13438 * tune/common.c: Corresponding changes.
13439
13440 2008-09-22 Niels Möller <[email protected]>
13441
13442 * mpn/generic/gcdext.c (hgcd_mul_matrix_vector): New function,
13443 replaces addmul2_n. Needs less copying.
13444 (mpn_gcdext): Use hgcd_mul_matrix_vector. Updated for interface
13445 change in mpn_gcdext_subdiv_step
13446
13447 * mpn/generic/hgcd.c (hgcd_matrix_mul_1): Rewritten to use
13448 mpn_hgcd_mul_matrix1_vector.
13449 (hgcd_step): Updated for interface change in
13450 mpn_hgcd_mul_matrix1_inverse_vector.
13451
13452 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
13453 interface changes in mpn_hgcd_mul_matrix1_vector,
13454 mpn_hgcd_mul_matrix1_inverse_vector and mpn_gcdext_subdiv_step.
13455
13456 * mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Updated for
13457 interface change in mpn_hgcd_mul_matrix1_inverse_vector.
13458
13459 * mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): Use
13460 separate scratch arguments for the quotient and for the cofactor
13461 update.
13462
13463 * mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Interface
13464 change. Store first element in rp and leave ap unmodified. No
13465 additional scratch space or copying needed. Callers that require
13466 modification in place still need to copy one of the inputs.
13467 (mpn_hgcd_mul_matrix1_inverse_vector): Likewise.
13468
13469 2008-09-22 Niels Möller <[email protected]> <[email protected]>
13470
13471 * mpn/generic/hgcd.c (hgcd_matrix_mul_1): Use mpn_addaddmul_1msb0.
13472 * mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Likewise.
13473
13474 * mpn/generic/gcd.c: Use libspeed for timing measurements.
13475
13476 * gmp-impl.h: Declare mpn_addaddmul_1msb0.
13477 * mpn/asm-defs.m4: Added addaddmul_1msb0.
13478 * mpn/x86_64/addaddmul_1msb0.asm: New file.
13479 * configure.in (gmp_mpn_functions_optional): Added
13480 addaddmul_1msb0.
13481 (HAVE_NATIVE): List addaddmul_1msb0.
13482
13483 2008-09-21 Torbjorn Granlund <[email protected]>
13484
13485 * mpn/generic/get_str.c (GET_STR_DC_THRESHOLD): Remove default.
13486 (GET_STR_PRECOMPUTE_THRESHOLD): Likewise.
13487 Misc code cleanups.
13488
13489 * gmp-impl.h (mpn_dc_set_str_itch): Allocate GMP_LIMB_BITS more limbs.
13490
13491 Revert:
13492 * mpn/generic/set_str.c:
13493 (mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
13494
13495 2008-09-18 Torbjorn Granlund <[email protected]>
13496
13497 * mpn/alpha/ev6/gmp-mparam.h (DIVEXACT_BY3_METHOD): Define.
13498
13499 * mpn/ia64/diveby3.asm: Remove.
13500 * mpn/x86/diveby3.asm: Remove.
13501 * mpn/x86/k6/diveby3.asm: Remove.
13502 * mpn/x86/k7/diveby3.asm: Remove.
13503 * mpn/x86/p6/diveby3.asm: Remove.
13504 * mpn/x86/pentium/diveby3.asm: Remove.
13505 * mpn/x86_64/diveby3.asm: Remove.
13506 * mpn/x86/pentium4/sse2/diveby3.asm: Remove.
13507
13508 * configure.in (HAVE_NATIVE): List divexact_by3c.
13509
13510 * gmp-impl.h (mpn_divexact_by3c): Override gmp-h.in's definition.
13511 (DIVEXACT_BY3_METHOD): Don't default to 0 if
13512 HAVE_NATIVE_mpn_divexact_by3c.
13513
13514 2008-09-18 Niels Möller <[email protected]>
13515
13516 * mpn/generic/gcd.c (main): Added code for tuning of CHOOSE_P.
13517
13518 * mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Assert that inputs are
13519 normalized.
13520
13521 2008-09-17 Niels Möller <[email protected]> <[email protected]>
13522
13523 * mpn/generic/gcdext.c (mpn_gcdext): p = n/5 caused a
13524 slowdown for large inputs. As a compromise, use p = n/2 for the
13525 first iteration, and p = n/3 for the rest. Handle the first
13526 iteration specially, since the initial u0 and u1 are trivial.
13527
13528 * mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
13529 from 409 to 390.
13530
13531 * mpn/generic/gcdext.c (CHOOSE_P): New macro. Use p = n/5.
13532 (mpn_gcdext): Use CHOOSE_P, and generalized the calculation of
13533 scratch space.
13534
13535 * tune/tuneup.c (tune_hgcd): Use default step factor.
13536
13537 * mpn/x86_64/gmp-mparam.h: (GCD_DC_THRESHOLD): Reduced from 493 to
13538 412.
13539
13540 * mpn/generic/gcd.c (CHOOSE_P): New macro, to determine the
13541 split when calling hgcd. Use p = 2n/3, as that seems better than
13542 the more obvious split p = n/2.
13543 (mpn_gcd): Use CHOOSE_P, and generalized the calculation of
13544 scratch space.
13545
13546 2008-09-16 Torbjorn Granlund <[email protected]>
13547
13548 * mpn/generic/toom_interpolate_7pts.c: Use new mpn_divexact_byN
13549 functions.
13550
13551 * gmp-impl.h (mpn_divexact_by3, mpn_divexact_by5, mpn_divexact_by7,
13552 mpn_divexact_by9, mpn_divexact_by11, mpn_divexact_by13,
13553 mpn_divexact_by15): New macros, defined in terms of mpn_bdiv_dbm1.
13554
13555 * configure.in (gmp_mpn_functions): List bdiv_dbm1c.
13556 (HAVE_NATIVE): Likewise.
13557 * mpn/asm-defs.m4: Define bdiv_dbm1c.
13558 * gmp-impl.h (mpn_bdiv_dbm1c): Declare.
13559 (mpn_bdiv_dbm1): New macro.
13560 * mpn/generic/bdiv_dbm1c.c: New file.
13561 * mpn/alpha/bdiv_dbm1c.asm: New file.
13562 * mpn/ia64/bdiv_dbm1c.asm: New file.
13563 * mpn/powerpc32/bdiv_dbm1c.asm: New file.
13564 * mpn/powerpc64/mode64/bdiv_dbm1c.asm: New file.
13565 * mpn/x86/bdiv_dbm1c.asm: New file.
13566 * mpn/x86_64/bdiv_dbm1c.asm: New file.
13567
13568 * mpn/generic/diveby3.c: Add mpn_bdiv_dbm1c based function.
13569 Choose function depending on DIVEXACT_BY3_METHOD.
13570 * gmp-impl.h (DIVEXACT_BY3_METHOD): Provide default.
13571
13572 2008-09-16 Niels Möller <[email protected]>
13573
13574 * mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Moved function to
13575 gcdext.c, where it is used.
13576 * mpn/generic/gcdext.c (addmul2_n): Moved and renamed, was
13577 mpn_hgcd_addmul2_n. Made static. Deleted input normalization.
13578 Deleted rn argument.
13579 (mpn_gcdext): Updated calls to addmul2_n, and added assertions.
13580
13581 * gmp-impl.h (MPN_HGCD_MATRIX_INIT_ITCH): Increased storage by 4 limbs.
13582 (MPN_HGCD_LEHMER_ITCH): Reduced storage by one limb.
13583 (MPN_GCD_SUBDIV_STEP_ITCH): Likewise.
13584 (MPN_GCD_LEHMER_N_ITCH): Likewise.
13585
13586 * mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Use two extra limbs.
13587 (hgcd_step): Use overlapping arguments to mpn_tdiv_qr.
13588 (mpn_hgcd_matrix_mul): Deleted normalization code. Tighter bounds
13589 for the element size of the product. Needs two extra limbs of
13590 storage for the elements.
13591 (mpn_hgcd_itch): Updated storage calculation.
13592
13593 * mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): Use
13594 overlapping arguments to mpn_tdiv_qr. Use mpn_zero_p.
13595
13596 * mpn/generic/gcd.c (mpn_gcd): Use mpn_zero_p.
13597
13598 2008-09-15 Niels Möller <[email protected]>
13599
13600 * mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Updated for deleted
13601 tp pointer.
13602 (hgcd_matrix_update_q): Likewise.
13603 (mpn_hgcd_matrix_mul): Likewise.
13604 (mpn_hgcd_itch): Updated calculation of scratch space.
13605
13606 * gmp-impl.h (struct hgcd_matrix): Deleted tp pointer.
13607 (MPN_HGCD_MATRIX_INIT_ITCH): Reduced storage.
13608 (mpn_hgcd_step, MPN_HGCD_STEP_ITCH): Deleted declarations.
13609
13610 2008-09-15 Niels Möller <[email protected]> <[email protected]>
13611
13612 * mpn/x86_64/gmp-mparam.h (MATRIX22_STRASSEN_THRESHOLD): New
13613 threshold.
13614
13615 * mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Use mpn_matrix22_mul.
13616 (mpn_hgcd_itch): Updated calculation of scratch space. Use
13617 count_leading_zeros to get the recursion depth.
13618
13619 * mpn/generic/gcd.c (mpn_gcd): Fixed calculation of scratch space,
13620 and use mpn_hgcd_itch.
13621
13622 2008-09-15 Niels Möller <[email protected]>
13623
13624 * tune/tuneup.c (tune_matrix22_mul): New function.
13625 (all): Use it.
13626
13627 * tune/common.c (speed_mpn_matrix22_mul): New function.
13628
13629 * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Added matrix22_mul.c.
13630
13631 * tests/mpn/t-matrix22.c: Use MATRIX22_STRASSEN_THRESHOLD to
13632 select sizes for tests.
13633
13634 * gmp-impl.h (MATRIX22_STRASSEN_THRESHOLD): New threshold
13635
13636 * configure.in (gmp_mpn_functions): Added matrix22_mul.
13637 * gmp-impl.h: Added declarations for mpn_matrix22_mul and related
13638 functions.
13639
13640 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added
13641 matrix22_mul.c.
13642 * tests/mpn/Makefile.am (check_PROGRAMS): Added t-matrix22.
13643
13644 * tests/mpn/t-matrix22.c: New file.
13645 * mpn/generic/matrix22_mul.c: New file.
13646
13647 2008-09-11 Niels Möller <[email protected]>
13648
13649 * tune/tuneup.c: Updated tuning of gcdext.
13650
13651 * mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
13652 from 713 to 409.
13653
13654 2008-09-11 Niels Möller <[email protected]>
13655
13656 * gmp-impl.h: Updated for gcdext changes.
13657 (GCDEXT_DC_THRESHOLD): New constant, renamed from
13658 GCDEXT_SCHOENHAGE_THRESHOLD.
13659
13660 * mpn/generic/gcdext.c (compute_v): Accept non-normalized a and b
13661 as inputs.
13662 (mpn_gcdext): Rewrote and simplified. Now uses the new mpn_hgcd
13663 interface.
13664
13665 * mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Renamed from addmul2_n
13666 and made non-static. Changed interface to take non-normalized
13667 inputs, and only two size arguments.
13668 (mpn_hgcd_matrix_mul): Simplified using new mpn_hgcd_addmul2_n.
13669
13670 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): Deleted
13671 function.
13672 (mpn_gcdext_lehmer_n): Renamed from mpn_gcd_lehmer. Now takes
13673 inputs of equal size. Moved the code for the division step to a
13674 separate function...
13675 * mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): New
13676 file, new function.
13677
13678 * configure.in (gmp_mpn_functions): Added gcdext_subdiv_step.
13679
13680 2008-09-10 Torbjorn Granlund <[email protected]>
13681
13682 * tests/devel/anymul_1.c: Include <string.h>.
13683
13684 * gmp-h.in: Unconditionally include <cstdio>.
13685
13686 2008-09-10 Niels Möller <[email protected]>
13687
13688 * tune/common.c: #if:ed out speed_mpn_gcd_binary and
13689 speed_mpn_gcd_accel.
13690 * tune/speed.c (routine): #if:ed out mpn_gcd_binary, mpn_gcd_accel
13691 and find_a.
13692 * tune/Makefile.am (libspeed_la_SOURCES): Removed gcd_bin.c
13693 gcd_accel.c gcd_finda_gen.c.
13694 * tune/tuneup.c: Enable tuning of GCD_DC_THRESHOLD.
13695
13696 * mpn/generic/gcd.c (mpn_gcd): Rewrote and simplified. Now uses
13697 the new mpn_hgcd interface.
13698
13699 * */gmp-mparam.h: Renamed GCD_SCHOENHAGE_THRESHOLD to
13700 GCD_DC_THRESHOLD.
13701
13702 * mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Renamed (was
13703 mpn_gcd_lehmer). Now takes inputs of equal size.
13704
13705 * mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer): Reintroduced gcd_2,
13706 to get better performance for small inputs.
13707
13708 * mpn/generic/hgcd.c: Don't hardcode small HGCD_THRESHOLD.
13709 * mpn/x86_64/gmp-mparam.h (HGCD_THRESHOLD): Reduced from 145 to
13710 120.
13711 * */gmp-mparam.h: Renamed HGCD_SCHOENHAGE_THRESHOLD to
13712 HGCD_THRESHOLD.
13713
13714 2008-09-09 Torbjorn Granlund <[email protected]>
13715
13716 * doc/gmp.texi: Fix a typo and clarify mpn_gcdext docs.
13717
13718 2008-09-09 Niels Möller <[email protected]>
13719
13720 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Adapted
13721 to new hgcd interface.
13722
13723 * gmp-impl.h (MPN_HGCD_LEHMER_ITCH): New macro.
13724
13725 * hgcd.c (mpn_hgcd_lehmer): Renamed function, from hgcd_base. Made
13726 non-static.
13727
13728 * gcd_lehmer.c (mpn_gcd_lehmer): Use hgcd2 also for n == 2.
13729
13730 * gcdext_lehmer.c (mpn_gcdext_lehmer): Simplified code for
13731 division step. Added proper book-keeping of swaps, which affect
13732 the sign of the returned cofactor.
13733
13734 * tests/mpz/t-gcd.c (one_test): Display co-factor when mpn_gcdext
13735 fails.
13736
13737 * gcd_lehmer.c (mpn_gcd_lehmer): At end of loop, need to handle
13738 the special case n == 1 correctly.
13739
13740 * gcd_subdiv_step.c (mpn_gcd_subdiv_step): Simplified function.
13741 The special cancellation logic is not needed here.
13742
13743 2008-09-08 Torbjorn Granlund <[email protected]>
13744
13745 * mpn/generic/invert.c: Add working but slow code.
13746
13747 * mpn/x86_64/x86_64-defs.m4 (R32, R8): New macros.
13748
13749 * mpn/ia64/submul_1.asm: Move some labels for broader assembler
13750 compatibility.
13751
13752 * gmp-impl.h (mpn_mul_3, mpn_mul_4): Declare.
13753 * tests/tests.h (refmpn_mul_3, refmpn_mul_4): Declare.
13754 * tests/try.c (param_init): Set things up for mpn_mul_3 and mpn_mul_4.
13755 (choice_array): Likewise.
13756 (call): Likewise.
13757 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES):
13758 Add mul_3.c and mul_4.
13759 * mpn/asm-defs.m4: Define mul_3 and mul_4.
13760 * tests/refmpn.c (refmpn_mul_N): New function.
13761 (refmpn_mul_2): Remove old definition, call refmpn_mul_N.
13762 (refmpn_mul_3, refmpn_mul_4): New functions.
13763 * tune/common.c (speed_mpn_mul_3, speed_mpn_mul_4): New functions.
13764 * tune/speed.h (speed_mpn_mul_3, speed_mpn_mul_4): Declare.
13765 * tune/speed.c (routine): New entries for mpn_mul_2 and mpn_mul_3.
13766
13767 * ltmain.sh: Update to libtool 1.5.24.
13768
13769 * mpn/generic/mul_toom22.c: Compute s and t more cleverly.
13770
13771 2008-09-08 Niels Möller <[email protected]>
13772
13773 * tests/mpn/t-hgcd.c: Updated tests. Rewrite of hgcd_ref.
13774
13775 * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): New function.
13776 (mpn_gcdext_lehmer): Various bugfixes.
13777
13778 * gcdext.c (mpn_gcdext): Allocate scratch space for gcdext_lehmer.
13779
13780 * mpn/generic/gcd_lehmer.c (gcd_2): ASSERT that inputs are odd.
13781 (mpn_gcd_lehmer): Added tp argument, for scratch space. Make both
13782 arguments odd before calling gcd_2.
13783
13784 * mpn/generic/hgcd.c (mpn_hgcd): Allow the trivial case n <= 2,
13785 and return 0 immediately.
13786
13787 * gmp-impl.h (MPN_EXTRACT_NUMB): New macro.
13788
13789 * configure.in (gmp_mpn_functions): Added gcdext_lehmer.
13790
13791 2008-09-05 Torbjorn Granlund <[email protected]>
13792
13793 * mpn/generic/toom_interpolate_7pts.c: Use mpn_divexact_by3c instead of
13794 divexact_odd.
13795
13796 * doc/texinfo.tex: Update to 2007-06-29.13.
13797
13798 * doc/gmp.texi: Update GMP site URL. Fix some typos.
13799
13800 * demos/pexpr.c (main): Allow bases up to 62.
13801
13802 * gmp-impl.h: Remove formal parameter names from function prototypes.
13803
13804 * config.guess: Recognize recent AMD and Itanium CPUs.
13805 Default X86 CPU recognition to configfsf.guess' value.
13806
13807 * configure.in: Handle core2 separately from athlon64.
13808
13809 2008-09-05 Niels Möller <[email protected]>
13810
13811 * */Makefile.in, configure, aclocal.m4, config.in: Removed files
13812 from repository. They're instead generated by automake and
13813 autoconf before distribution.
13814
13815 2008-08-25 Torbjorn Granlund <[email protected]>
13816
13817 * mpf/set_str.c: Allocate mantissa space based on mantissa size,
13818 not on destination variable space.
13819 * mpf/set_str.c: Accept unary plus before exponent.
13820
13821 2008-08-06 Torbjorn Granlund <[email protected]>
13822
13823 * mpn/generic/mul_toom22.c: Add statistics gathering functionality,
13824 triggered by cpp predef STAT.
13825
13826 From David Harvey:
13827 * mpn/generic/mul_toom22.c: Decrease scratch space usage.
13828
13829 2008-08-02 Torbjorn Granlund <[email protected]>
13830
13831 * tests/misc/t-scanf.c: Avoid negative arguments to _ui functions.
13832 * tests/misc/t-printf.c: Likewise.
13833
13834 * acinclude.m4 (X86_PATTERN): Add geode.
13835
13836 * acinclude.m4 (CL_AS_NOEXECSTACK): Avoid -q flag to grep.
13837
13838 2008-08-01 Torbjorn Granlund <[email protected]>
13839
13840 * acinclude.m4 (CL_AS_NOEXECSTACK): New.
13841 * configure.in: Use CL_AS_NOEXECSTACK.
13842 * mpn/Makeasm.am: Use ASM_FLAGS (defined by CL_AS_NOEXECSTACK).
13843
13844 * gmpxx.h (__GMP_DBL_LIMBS): Use DBL_MAX_EXP instead of
13845 std::numeric_limits<double>::max_exponent for better portability.
13846
13847 2008-07-29 Torbjorn Granlund <[email protected]>
13848
13849 * gmpxx.h (__GMP_DBL_LIMBS): New #define.
13850 (__GMP_ULI_LIMBS): New #define.
13851 (__GMPXX_TMP_UI): New macro.
13852 (__GMPXX_TMP_SI): New macro.
13853 (__GMPXX_TMP_D): New macro.
13854 (struct __gmp_binary_and): Rewrite, using the new macros.
13855 (struct __gmp_binary_ior): Likewise.
13856 (struct __gmp_binary_xor): Likewise.
13857
13858 2008-07-28 Torbjorn Granlund <[email protected]>
13859
13860 * tests/cxx/t-binary.cc: Add some tests for logical operations.
13861
13862 2008-07-24 Torbjorn Granlund <[email protected]>
13863
13864 * gmpxx.h: Use __GMPZ_* instead of __GMPZZ_* for bitwise ops, remove
13865 __GMPZZ_*.
13866 Remove repeated #undefs.
13867 (__gmp_alloc_cstring): Declare freefunc as extern "C".
13868
13869 2008-07-23 Torbjorn Granlund <[email protected]>
13870
13871 * gmp-h.in (__GMP_CC): New define, undocumented for now.
13872 (__GMP_CFLAGS): Likewise.
13873
13874 2008-07-21 Torbjorn Granlund <[email protected]>
13875
13876 * tests/amd64check.c: Fix a printf type clash.
13877
13878 * mpz/realloc.c: Amend last fix.
13879
13880 * gmp-h.in: Include <cstdlib> for C++.
13881 * gmp-h.in: Handle new gcc 4.3 inline semantics defaults.
13882
13883 * configfsf.guess: Update to version of 2008-04-14.
13884 * configfsf.sub: Update to version of 2008-06-16.
13885
13886 * configure.in: Separate core2 and athlon64 flags handling.
13887
13888 2008-06-19 Torbjorn Granlund <[email protected]>
13889
13890 * config.guess: Recognize pentiumm and AMD geode.
13891 * config.sub: Likewise.
13892 * configure.in: Likewise.
13893
13894 2008-06-02 Torbjorn Granlund <[email protected]>
13895
13896 * configure.in: Disallow odd nails sizes.
13897 * configure.in: Inherit default gcc_cflags/gcc_64_cflags everywhere.
13898
13899 2008-05-23 Torbjorn Granlund <[email protected]>
13900
13901 * mpz/init2.c: Rewrite to avoid internal overflow and to detect mpz_t
13902 overflow.
13903 * mpz/realloc2.c: Likewise.
13904 * mpz/realloc.c: Detect mpz_t overflow.
13905
13906 2008-05-22 Torbjorn Granlund <[email protected]>
13907
13908 * configure.in (sparc): Remove -fast, it causes documented
13909 miscompilation.
13910
13911 * config.guess: Properly handle the "extended" variants of x86 cpuid.
13912
13913 2008-05-09 Torbjorn Granlund <[email protected]>
13914
13915 * gmp-impl.h (mpn_mul_fft): Now void.
13916 (udiv_qrnnd_preinv3): Special case for constant (nl).
13917
13918 2008-05-08 Torbjorn Granlund <[email protected]>
13919
13920 * mpn/generic/mul_fft.c: Clean up types in TRACE (printf (...)).
13921 (TRACE): Redefine to allow command line control.
13922 (mpn_mul_fft_internal): Now void, remove return value.
13923 (mpn_mul_fft): Likewise.
13924 (MPN_FFT_TABLE2_SIZE): Up size fro 256 to 512.
13925 (mpn_fft_fft): Call mpn_fft_mul_2exp_modF just once instead of twice,
13926 then add/subtract result. Get rid of temp allocation as a result.
13927 Remove some redundant CNST_LIMB.
13928 (mpn_fft_fftinv): Analogous changes.
13929 (mpn_fft_sub_modF): Re-enable, now needed by mpn_fft_fft and
13930 mpn_fft_fftinv.
13931
13932 2008-03-10 Torbjorn Granlund <[email protected]>
13933
13934 * tests/mpz/t-mul.c (main): Let GMP_CHECK_FFT mean largest allowed
13935 power-of-2 of test operands.
13936
13937 2008-02-28 Torbjorn Granlund <[email protected]>
13938
13939 * tests/cxx/t-binary.cc (check_mpz): Expect floor rounding for right
13940 shift.
13941
13942 2008-02-27 Torbjorn Granlund <[email protected]>
13943
13944 * mpz/mul_i.h: Check sml's size (not the signed small_mult).
13945
13946 * longlong.h (umul_ppmm) [alpha]: Define using __builtin_alpha_umulh
13947 when possible.
13948
13949 * longlong.h (count_trailing_zeros): Force destination register mode.
13950
13951 * gmpxx.h (struct __gmp_binary_rshift): Use floor rounding, not
13952 truncation.
13953
13954 * gmpxx.h (__gmp_binary_and, __gmp_binary_ior, __gmp_binary_xor):
13955 Add variants with unsigned long int argument.
13956
13957 * config.sub: Recog geode.
13958 * config.guess: Likewise.
13959 * acinclude.m4 (X86_PATTERN): Likewise.
13960
13961 2008-02-10 Torbjorn Granlund <[email protected]>
13962
13963 * mpn/x86/p6/aors_n.asm: Use Zdisp to work around GNU as bug.
13964 * mpn/x86/x86-defs.m4 (Zdisp): Add more instructions.
13965
13966 2008-02-08 Torbjorn Granlund <[email protected]>
13967
13968 * mpn/x86_64/aors_n.asm: New file.
13969 * mpn/x86_64/add_n.asm: Delete.
13970 * mpn/x86_64/sub_n.asm: Delete.
13971
13972 2008-02-07 Torbjorn Granlund <[email protected]>
13973
13974 * mpn/x86/k6/mmx/dive_1.asm: Fix typo in last change.
13975
13976 2007-12-10 Torbjorn Granlund <[email protected]>
13977
13978 * mpf/set_str.c (mpf_set_str): Write own code for converting the
13979 exponent, avoids strtol base < 36 limitation.
13980
13981 2007-10-28 Torbjorn Granlund <[email protected]>
13982
13983 * gmp-impl.h (mpn_dc_get_str_itch): New macro.
13984 (mpn_dc_get_str_powtab_alloc): New macro.
13985 (struct powers): Add field "shift".
13986
13987 * mpn/generic/get_str.c: Compute powers without low zero limbs; all
13988 functions modified. Correct temporary allocation. Misc cleanups.
13989
13990 * mpn/generic/set_str.c: Compute powers without low zero limbs; all
13991 functions modified.
13992 (mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
13993
13994 2007-10-26 Torbjorn Granlund <[email protected]>
13995
13996 * mpn/generic/set_str.c: Remove default thresholds, not in gmp-impl.h.
13997 (mpn_dc_set_str): Insert ASSERT_ALWAYS in a presumably dead code arm.
13998
13999 2007-10-22 Torbjorn Granlund <[email protected]>
14000
14001 * gmp-impl.h (mpn_add_nc): Define as inline function, unless NATIVE.
14002 (mpn_sub_nc): Likewise.
14003
14004 2007-10-17 Torbjorn Granlund <[email protected]>
14005
14006 * tests/misc/t-printf.c: Fix a printf type clash.
14007 * tests/mpq/t-get_str.c: Likewise.
14008 * tests/mpz/t-import.c: Likewise.
14009
14010 * acinclude.m4: Conditionally disable some tests when compiled by a C++
14011 compiler.
14012
14013 * gmp-impl.h (udiv_qrnnd_preinv3): Remove an unused variable.
14014
14015 * mpn/generic/hgcd.c: Add some WANT_ASSERTs to shut up warnings.
14016
14017 2007-10-08 Torbjorn Granlund <[email protected]>
14018
14019 * mpn/powerpc64/elf.m4 (LEAL): Define as an alias for LEA.
14020 * mpn/powerpc32/darwin.m4 (LEAL): Likewise.
14021 * mpn/powerpc64/aix.m4: Likewise.
14022
14023 * mpn/powerpc64/vmx/popcount.asm: Use LEAL.
14024
14025 * mpn/powerpc64/darwin.m4 (LEAL): New name for LEA, since it is only
14026 usable for local symbols.
14027 (LEA): Replace with code for external references.
14028
14029 * mpn/powerpc32/vmx/mod_34lsub1.asm: Use LEAL.
14030
14031 2007-10-07 Torbjorn Granlund <[email protected]>
14032
14033 * mpn/x86/dive_1.asm: Use LEA, remove explicit movl_eip_*.
14034 * mpn/x86/k6/mode1o.asm: Likewise.
14035 * mpn/x86/k6/mmx/dive_1.asm: Likewise.
14036 * mpn/x86/k7/dive_1.asm: Likewise.
14037 * mpn/x86/k7/mode1o.asm: Likewise.
14038 * mpn/x86/p6/dive_1.asm: Likewise.
14039 * mpn/x86/p6/mode1o.asm: Likewise.
14040 * mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
14041 * mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
14042 * mpn/x86/pentium4/sse2/popcount.asm: Likewise.
14043
14044 * mpn/x86/p6/aors_n.asm: Table cycle counts.
14045
14046 * mpn/x86/k7/mod_34lsub1.asm: Fix over-optimistic cycle count claims.
14047
14048 * mpn/x86/x86-defs.m4 (DEF_OBJECT, END_OBJECT): New define's.
14049
14050 * mpn/x86/darwin.m4 (LEA): Put also movl_eip_XX into EPILOGUE_cpu.
14051 Expect target register to have prepended %.
14052
14053 * mpn/x86_64/add_n.asm: Use L() for labels.
14054 * mpn/x86_64/addlsh1_n.asm: Likewise.
14055 * mpn/x86_64/addmul_2.asm: Likewise.
14056 * mpn/x86_64/aorrlsh_n.asm: Likewise.
14057 * mpn/x86_64/aorsmul_1.asm: Likewise.
14058 * mpn/x86_64/com_n.asm: Likewise.
14059 * mpn/x86_64/copyd.asm: Likewise.
14060 * mpn/x86_64/copyi.asm: Likewise.
14061 * mpn/x86_64/diveby3.asm: Likewise.
14062 * mpn/x86_64/logops_n.asm: Likewise.
14063 * mpn/x86_64/lshsub_n.asm: Likewise.
14064 * mpn/x86_64/mul_1.asm: Likewise.
14065 * mpn/x86_64/mul_2.asm: Likewise.
14066 * mpn/x86_64/mul_basecase.asm: Likewise.
14067 * mpn/x86_64/popham.asm: Likewise.
14068 * mpn/x86_64/redc_1.asm: Likewise.
14069 * mpn/x86_64/rsh1add_n.asm: Likewise.
14070 * mpn/x86_64/rsh1sub_n.asm: Likewise.
14071 * mpn/x86_64/rshift.asm: Likewise.
14072 * mpn/x86_64/sub_n.asm: Likewise.
14073 * mpn/x86_64/sublsh1_n.asm Likewise.
14074 * mpn/x86_64/pentium4/aors_n.asm: Likewise.
14075 * mpn/x86_64/pentium4/lshift.asm: Likewise.
14076 * mpn/x86_64/pentium4/rshift.asm: Likewise.
14077
14078 * mpn/x86_64/x86_64-defs.m4: New file, defining LEA, DEF_OBJECT, and
14079 END_OBJECT.
14080
14081 * mpn/generic/mul.c: Put TMP_DECL as last decl.
14082
14083 2007-10-06 Torbjorn Granlund <[email protected]>
14084
14085 * mpn/x86/pentium4/sse2/popcount.asm: New file.
14086
14087 2007-09-26 Torbjorn Granlund <[email protected]>
14088
14089 * mpz/get_str.c: Cast a char index to int to shut up compilers.
14090
14091 * mpn/generic/dc_div_qr.c: Pass dummy scratch argument to mpn_invert.
14092 * mpn/generic/dc_divappr_q.c: Likewise.
14093 * mpn/generic/mu_div_qr.c: Likewise.
14094 * mpn/generic/mu_divappr_q.c: Likewise.
14095 * mpn/generic/mu_div_q.c: Likewise.
14096 * mpn/generic/divexact.c: Likewise.
14097
14098 * mpn/generic/invert.c: New file, placeholder for now.
14099
14100 2007-09-24 Torbjorn Granlund <[email protected]>
14101
14102 * mpn/generic/toom_interpolate_5pts.c: New file, contents from
14103 mpn/generic/mul_n.c
14104 * mpn/generic/mul_n.c (mpn_toom3_interpolate): Function removed.
14105
14106 * mpn/generic/toom_interpolate_7pts.c: New file.
14107
14108 * mpn/x86/k7/mmx/popham.asm: Table cycle counts.
14109
14110 * mpn/x86/k6/README: Update URLs.
14111
14112 * mpn/powerpc32/README: Update URL's, company names.
14113
14114 * mpn/generic/get_d.c: Complete rewrite.
14115
14116 * mpn/generic/mul_toom33.c: New file.
14117
14118 * mpn/generic/mul_toom22.c: Make orthogonal with other toomXY files.
14119 * mpn/generic/mul_toom32.c: Likewise.
14120 * mpn/generic/mul_toom42.c: Likewise.
14121
14122 * mpn/alpha/invert_limb.asm: Update cycle counts. Fix a comment typo.
14123
14124 * mpf/get_str.c: Include stdlib.h, not stdio.h for NULL.
14125
14126 * doc/gmp.texi: Fix a typo.
14127
14128 * memory.c (__gmp_default_allocate, __gmp_default_reallocate):
14129 Cast size operands in error fprintf's.
14130
14131 * longlong.h (sub_ddmmss) [powerpc 64]: Add more variants for constant
14132 args.
14133
14134 * gmp-impl.h (udiv_qrnnd_preinv3): New define.
14135 * gmp-impl.h (ULONG_PARITY): Exclude masquerading __INTEL_COMPILER from
14136 ia64 asm.
14137
14138 * gmp-h.in (mpn_neg_n): New function.
14139
14140 2007-09-18 Torbjorn Granlund <[email protected]>
14141
14142 * demos/pexpr.c (main): Add -v option.
14143 (enum op_t): New tag TIMING.
14144 (mpz_eval_expr): Execute TIMING.
14145 (fns): Add TIMING entry.
14146
14147 * gmp-impl.h: Add decls and THRESHOLDs for new toom multiplication
14148 functions and division functions.
14149
14150 2007-09-10 Torbjorn Granlund <[email protected]>
14151
14152 * mpn/powerpc32/addlsh1_n.asm: Use L() for labels.
14153 * mpn/powerpc32/sublsh1_n.asm: Likewise.
14154
14155 2007-09-09 Torbjorn Granlund <[email protected]>
14156
14157 * mpn/x86/x86-defs.m4 (LEA): New define.
14158 * mpn/x86/darwin.m4: New file, for now just defining LEA.
14159 * configure.in: Pick up x86/darwin.m4.
14160 * mpn/x86/*: Use LEA for PIC references.
14161
14162 * configure.in: For X86/32, treat core2 like pentium3.
14163
14164 2007-09-06 Torbjorn Granlund <[email protected]>
14165
14166 * tests/amd64check.c (calling_conventions_values): Put constants,
14167 dynamic values in this array (was in scalars).
14168 (calling_conventions_check): Corresponding changes.
14169 * tests/amd64call.asm: Rewrite to be PIC, smaller, using amd64check.c's
14170 array.
14171
14172 2007-09-04 Torbjorn Granlund <[email protected]>
14173
14174 * mpn/x86/pentium4/sse2/mul_basecase.asm: Misc cleanups.
14175 * mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
14176
14177 * mpn/x86_64/mod_34lsub1.asm: Optimize loop, reduce code size.
14178
14179 * tests/amd64call.asm: Remove bogus no-op moves.
14180
14181 2007-09-03 Torbjorn Granlund <[email protected]>
14182
14183 From Richard Guenther:
14184 * gmp-h.in (__GMP_EXTERN_INLINE): Declare conditionally on
14185 __GNUC_STDC_INLINE__.
14186
14187 * tests/cxx/t-locale.cc: #include <cstdlib>, for abort.
14188
14189 * mpn/x86_64/core2/popcount.asm: New file.
14190 * mpn/x86_64/pentium4/popcount.asm: New file.
14191
14192 * mpn/x86_64/addmul_2.asm: New file.
14193 * mpn/x86_64/mul_2.asm: New file.
14194
14195 * mpn/x86_64/aorsmul_1.asm: Use 32-bit mov for zeroing registers
14196 (saves space).
14197
14198 2007-09-01 Torbjorn Granlund <[email protected]>
14199
14200 * configure.in: Handle athlon64, core2, and pentium4 separately for
14201 64-bit ABI.
14202
14203 * config.sub: Recog athlon64, core2, and opteron.
14204
14205 * config.guess: Do two x86 variants, for 32-bit ABI and 64-bit ABI.
14206 Return "athlon64" and "core2", not x86_64.
14207
14208 2007-08-31 Torbjorn Granlund <[email protected]>
14209
14210 From Patrick Pelissier:
14211 * gmp-h.in: Don't refer to FILE from C++ unless we've seen FILE.
14212
14213 2007-08-30 Torbjorn Granlund <[email protected]>
14214
14215 * demos/isprime.c: Include string.h for strcmp.
14216
14217 * demos/factorize.c (main): Declare to int.
14218
14219 2007-06-22 Torbjorn Granlund <[email protected]>
14220
14221 * mpn/x86_64/pentium4/lshift.asm: Minor tuning.
14222 * mpn/x86_64/pentium4/rshift.asm: Likewise.
14223
14224 2007-05-30 Torbjorn Granlund <[email protected]>
14225
14226 * mpn/powerpc64/mode64/aors_n.asm: Add _nc entry points.
14227
14228 2007-05-22 Torbjorn Granlund <[email protected]>
14229
14230 * tests/memory.c: Cast calls to new mem* calls to avoid unaligned ops.
14231
14232 2007-05-16 Torbjorn Granlund <[email protected]>
14233
14234 * tests/mpz/convert.c: Tweak operand sizes for best coverage.
14235
14236 * tests/memory.c: Add red zones around allocations.
14237
14238 2007-05-15 Torbjorn Granlund <[email protected]>
14239
14240 * mpn/ia64/mul_1.asm: Make mul_1c entry point actually work.
14241
14242 * mpn/generic/set_str.c (mpn_dc_set_str): Avoid calling mpn_add_n when
14243 ln == 0.
14244
14245 * tests/mpz/convert.c (string_urandomb): New function.
14246 (main): Use it by enabling ifdef'ed out code.
14247
14248 2007-04-30 Torbjorn Granlund <[email protected]>
14249
14250 * mpn/x86_64/mul_basecase.asm: Complete rewrite.
14251
14252 * mpn/x86_64/copyi.asm: Use short shift-by-one form. Misc cleanups.
14253 * mpn/x86_64/copyi.asm: Likewise.
14254 * mpn/x86_64/popham.asm: Likewise.
14255
14256 * mpn/x86_64/aorsmul_1.asm: Cleanup formatting.
14257
14258 2007-04-25 Torbjorn Granlund <[email protected]>
14259
14260 * mpz/divexact.c: Handle undefined case of |N| < |D| to avoid segfaults.
14261
14262 2007-02-24 Torbjorn Granlund <[email protected]>
14263
14264 * doc/gmp.texi (Toom 3-Way Multiplication): Fix typo.
14265 (mpz_scan0, mpz_scan1): Fix typos.
14266 (Float Internals): Rewrite paragraph about struct types.
14267
14268 2007-02-12 Torbjorn Granlund <[email protected]>
14269
14270 * mpn/x86/pentium4/sse2/sqr_basecase.asm: Complete rewrite (except
14271 diagonal code).
14272
14273 2007-02-05 Torbjorn Granlund <[email protected]>
14274
14275 * mpn/generic/mul_fft.c (mpn_fft_fft): New name for mpn_fft_fft_sqr,
14276 old mpn_fft_fft removed.
14277 (mpn_mul_fft_internal): Call mpn_fft_fft separately for each operand.
14278 (mpn_fft_add_modF): Rewrite to avoid random branches.
14279 (mpn_fft_sub_modF): Likewise.
14280
14281 * mpn/x86/pentium4/sse2/addmul_1.asm: Complete rewrite.
14282 * mpn/x86/pentium4/sse2/mul_1.asm: Complete rewrite.
14283 * mpn/x86/pentium4/sse2/mul_basecase.asm: Complete rewrite, based on
14284 new addmul and mul code.
14285
14286 2007-01-31 Torbjorn Granlund <[email protected]>
14287
14288 * mpn/generic/get_str.c (mpn_sb_get_str): Get loop count for frac
14289 development right.
14290
14291 * mpn/powerpc32/vmx/mod_34lsub1.asm: New file.
14292
14293 * mpn/powerpc32/aors_n.asm: New file, complete rewrite.
14294 * mpn/powerpc32/add_n.asm: Remove.
14295 * mpn/powerpc32/sub_n.asm: Remove.
14296
14297 2007-01-25 Torbjorn Granlund <[email protected]>
14298
14299 * mpn/x86_64/core2/aors_n.asm: Add _nc entry points, minor cleanups.
14300
14301 * mpn/x86_64/core2/lshift.asm: Rewrite.
14302 * mpn/x86_64/core2/rshift.asm: Rewrite.
14303
14304 * mpn/x86_64/pentium4/lshift.asm: Swap some loop insns for a small
14305 speedup.
14306 * mpn/x86_64/pentium4/rshift.asm: New file, based on lshift.asm.
14307
14308 * mpn/x86_64/pentium4/gmp-mparam.h: New file.
14309
14310 * mpn/x86_64/pentium4/aors_n.asm: Complete rewrite of add/subtract
14311 code.
14312 * mpn/x86_64/pentium4/add_n.asm: Remove.
14313 * mpn/x86_64/pentium4/sub_n.asm: Remove.
14314
14315 2007-01-20 Torbjorn Granlund <[email protected]>
14316
14317 * mpn/x86_64/lshift.asm: Add special case for cnt=1.
14318
14319 2007-01-19 Torbjorn Granlund <[email protected]>
14320
14321 * mpn/x86_64/aorsmul_1.asm: New file, written from scratch, finally at
14322 3.0 c/l on K8 (addmul_1 was 3.3; submul_1 was 3.5).
14323 * mpn/x86_64/addmul_1.asm: Remove.
14324 * mpn/x86_64/submul_1.asm: Remove.
14325
14326 2006-12-29 Torbjorn Granlund <[email protected]>
14327
14328 * randmt.c (__gmp_randclear_mt): Initialize ALLOC field, like in
14329 __gmp_randinit_mt_noseed.
14330 (__gmp_randclear_mt, __gmp_randinit_mt_noseed): Make similar functions
14331 look similar.
14332 (__gmp_randclear_mt): Pass actually allocated size.
14333
14334 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mul_toom22.c,
14335 mul_toom32.c, mul_toom42.c.
14336
14337 * configure.in: Recognize athlon64 and core2 as alternatives to x86_64.
14338 Provide special settings for core2.
14339
14340 * configure.in (gmp_mpn_functions): Add mul_toom22, mul_toom32,
14341 mul_toom42.
14342
14343 * mpn/generic/mul_toom22.c: New file.
14344 * mpn/generic/mul.c: Use mpn_mul_toom22. Trim cutoff points between
14345 the mpn_mul_toomN2 functions. Handle balanced operands at function
14346 entry.
14347
14348 2006-12-29 Marco Bodrato <[email protected]>
14349
14350 * mpn/generic/mul_n.c: Rewrite interpolation code.
14351
14352 2006-12-28 Torbjorn Granlund <[email protected]>
14353
14354 * mpn/generic/mul_toom32.c: New file.
14355 * mpn/generic/mul_toom42.c: New file.
14356 * mpn/generic/mul.c: Use mpn_mul_toom32 and mpn_mul_toom42 for
14357 unbalanced operands.
14358
14359 2006-12-17 Torbjorn Granlund <[email protected]>
14360
14361 * mpn/x86_64/aorrlsh_n.asm: New file.
14362 * mpn/x86_64/lshsub_n.asm: New file.
14363
14364 * mpn/x86_64/core2/aors_n.asm: New file.
14365 * mpn/x86_64/core2/lshift.asm: New file.
14366 * mpn/x86_64/core2/rshift.asm: New file.
14367
14368 * mpn/x86/p6/aors_n.asm: Replace K7 grabbing code with P6 specific
14369 code.
14370
14371 * mpn/x86/p6/lshsub_n.asm: New file.
14372
14373 2006-11-23 Torbjorn Granlund <[email protected]>
14374
14375 * tune/speed.h (SPEED_ROUTINE_MPN_MUL_BASECASE): Allocate space for xp
14376 locally, s->xp might be insufficient.
14377
14378 2006-11-22 Torbjorn Granlund <[email protected]>
14379
14380 * randmt.c (__gmp_randinit_mt_noseed): Initialize ALLOC field of result
14381 param.
14382
14383 2006-11-06 Torbjorn Granlund <[email protected]>
14384
14385 * tune/set_strp.c: New file.
14386
14387 2006-11-04 Torbjorn Granlund <[email protected]>
14388
14389 * extract-dbl.c: Rewrite to handle nails better, and for general
14390 optimization.
14391
14392 * mpz/bin_uiui.c: Simplify.
14393
14394 * longlong.h (umul_ppmm) [mmix]: New.
14395
14396 * tune/tuneup.c, tune/common.c, tune/speed.c, tune/speed.h,
14397 tune/set_strb.c, tune/set_strs.c: Add tuning and speed measurements
14398 of separate SET_STR_DC_THRESHOLD and SET_STR_PRECOMPUTE_THRESHOLD.
14399 Add tuning and speed measurement of mpn_addsub_n.
14400
14401 2006-10-31 Torbjorn Granlund <[email protected]>
14402
14403 * gmpxx.h: Remove ternary stuff, it is hardly an optimization and it
14404 writes to destination before reading all source operands.
14405
14406 2006-10-25 Torbjorn Granlund <[email protected]>
14407
14408 * mpn/generic/set_str.c: Complete rewrite.
14409 * mpn/generic/get_str.c: Likewise.
14410
14411 * gmp-impl.h (struct powers, powers_t): New types.
14412 Restructure GET_STR_* and SET_STR_* thresholds.
14413
14414 2006-09-21 Torbjorn Granlund <[email protected]>
14415
14416 * mpn/generic/rootrem.c: Remove some redundant casts.
14417
14418 2006-07-12 Torbjorn Granlund <[email protected]>
14419
14420 * mpn/alpha/ev6/nails/addmul_2.asm: Make it run at claimed speed.
14421 * mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
14422
14423 * mpf/get_str.c: Avoid copying result when not needed. Misc cleanups.
14424
14425 * tests/amd64call.asm: Use jmp instead of jmpq to placate Solaris.
14426
14427 2006-06-30 Torbjorn Granlund <[email protected]>
14428
14429 * configure.in (powerpc-*): Remove repeated path component.
14430
14431 2006-06-15 Torbjorn Granlund <[email protected]>
14432
14433 * configure.in: (ia64-*-linux*): Don't use -O3.
14434
14435 2006-06-14 Torbjorn Granlund <[email protected]>
14436
14437 * mpq/get_str.c: Fix upper base limit boundary in an ASSERT.
14438
14439 * tests/refmpn.c (refmpn_sb_divrem_mn): Use ASSERT_CARRY for add-back.
14440
14441 2006-05-31 Torbjorn Granlund <[email protected]>
14442
14443 * tests/mpz/t-set_d.c (check_data): Add more data points.
14444
14445 * mpz/set_d.c: Handle negative return values from __gmp_extract_double.
14446
14447 2006-05-17 Torbjorn Granlund <[email protected]>
14448
14449 * configure.in: Clear out gcc_cflags_cpu and gcc_cflags_arch for a fat
14450 build.
14451
14452 2006-05-16 Torbjorn Granlund <[email protected]>
14453
14454 * demos/primes.c (find_primes): Increase mpz_probab_prime_p cnt to 10.
14455
14456 * mpn/generic/addsub_n.c: Fix criteria for when to call _nc functions.
14457
14458 2006-05-12 Torbjorn Granlund <[email protected]>
14459
14460 * config.guess: Recognize more ppc processor types.
14461
14462 2006-05-11 Torbjorn Granlund <[email protected]>
14463
14464 * tune/speed.c (usage): Update URL for gnuplot and quickplot.
14465
14466 2006-05-10 Torbjorn Granlund <[email protected]>
14467
14468 * configure.in (powerpc-*-*): Pass -maltivec to assembler for
14469 appropriate CPUs.
14470
14471 2006-05-08 Torbjorn Granlund <[email protected]>
14472
14473 * mpn/powerpc32/aix.m4 (LEA): Remove [RW] attribute.
14474
14475 2006-05-03 Torbjorn Granlund <[email protected]>
14476
14477 * mpn/powerpc64/vmx/popcount.asm: Conditionally zero extend n.
14478
14479 2006-04-27 Torbjorn Granlund <[email protected]>
14480
14481 * mpz/divexact.c: Call mpz_tdiv_q for large operands.
14482
14483 * configure.in (powerpc-*-darwin): Remove -fast, it affects PIC.
14484
14485 2006-04-26 Torbjorn Granlund <[email protected]>
14486
14487 * config.guess: Try to recognize Ultrasparc T1 (as ultrasparct1).
14488 * config.sub: Handle ultrasparct1.
14489
14490 2006-04-25 Torbjorn Granlund <[email protected]>
14491
14492 * mpn/sparc64/gmp-mparam.h: Retune, without separation of GNUC and
14493 non-GNUC data.
14494
14495 2006-04-20 Torbjorn Granlund <[email protected]>
14496
14497 * tests/mpz/convert.c: Increase operands range.
14498
14499 2006-04-19 Torbjorn Granlund <[email protected]>
14500
14501 * configure.in: Support powerpc eABI.
14502 * mpn/powerpc32/eabi.m4: New file.
14503
14504 * configure.in: Support powerpc *bsd.
14505 * mpn/powerpc64/elf.m4: New name for mpn/powerpc64/linux64.m4.
14506 * mpn/powerpc32/elf.m4: New name for mpn/powerpc32/linux.m4.
14507
14508 * mpn/powerpc64/linux64.m4 (ASM_END): Quote TOC_ENTRY.
14509
14510 2006-04-18 Torbjorn Granlund <[email protected]>
14511
14512 * configure.in (gmp_mpn_functions_optional): Add lshiftc.
14513 (HAVE_NATIVE): Add lshiftc.
14514
14515 * mpn/powerpc64/mode64/invert_limb.asm: Use LEA, not LDSYM.
14516 * mpn/powerpc64/mode64/mode1o.asm: Likewise.
14517 * mpn/powerpc64/mode64/dive_1.asm: Likewise.
14518
14519 * mpn/powerpc64/linux64.m4 (TOC_ENTRY): Define to empty.
14520 * mpn/powerpc64/aix.m4 (TOC_ENTRY): Likewise.
14521 * mpn/powerpc32/aix.m4 (TOC_ENTRY): Likewise.
14522
14523 * mpn/powerpc32/aix.m4 (EXTERN): New, copied form powerpc64/aix.m4.
14524 * mpn/powerpc32/mode1o.asm: Use EXTERN.
14525 * mpn/powerpc32/linux.m4 (EXTERN): Provide dummy definition.
14526 * mpn/powerpc32/darwin.m4 (EXTERN): Likewise.
14527
14528 2006-04-13 Torbjorn Granlund <[email protected]>
14529
14530 * mpn/generic/mul_fft.c: Use new thresholds mechanism if MUL_FFT_TABLE2
14531 is defined.
14532 (mpn_lshiftc): New name for mpn_lshift_com (for consistency with some
14533 stuff already in 4.1.4.
14534 (mpn_fft_mul_2exp_modF): Reorganize initial operand reductions to avoid
14535 divisions.
14536
14537 * tests/devel/try.c (choice_array): Add mpn_addsub_n[c].
14538
14539 2006-04-11 Torbjorn Granlund <[email protected]>
14540
14541 * aclocal.m4: Regenerate with patched libtool.
14542
14543 * mpn/asm-defs.m4 (ASM_END): Provide (empty) default.
14544
14545 2006-04-08 Torbjorn Granlund <[email protected]>
14546
14547 * configure.in (gmp_mpn_functions_optional): Add addsub.
14548
14549 * gmpxx.h: Remove missed MPFR references.
14550
14551 * gmp-impl.h (LIMBS_PER_DOUBLE): Adjust formula to not be pessimistic.
14552
14553 * gmp-impl.h (TMP_*, WANT_TMP_DEBUG): Don't expect marker argument;
14554 define TMP_SALLOC and TMP_BALLOC.
14555
14556 * mpn/minithres/gmp-mparam.h: New file.
14557
14558 * tests/mpz/t-io_raw.c: Fix printf type/arg mismatches.
14559 * tests/mpz/t-export.c: Likewise.
14560 * tests/mpz/io.c: Likewise.
14561 * tests/t-constants.c: Likewise.
14562
14563 * mpn/ia64/popcount.asm: Append "cond.dptk" to conditional branches to
14564 placate icc.
14565 * mpn/ia64/hamdist.asm: Likewise.
14566 * mpn/ia64/lorrshift.asm: Likewise.
14567 * mpn/ia64/dive_1.asm: Likewise.
14568
14569 2006-04-05 Torbjorn Granlund <[email protected]>
14570
14571 * tal-notreent.c (__gmp_tmp_mark): Add "struct" tag for tmp_marker.
14572 (__gmp_tmp_free): Likewise.
14573
14574 * mpn/generic/mul_fft.c: Optimize many scalar divisions and mod
14575 operations into masks and shifts.
14576 (mpn_fft_mul_modF_K): Fix a spurious ASSERT_NOCARRY.
14577
14578 2006-03-26 Torbjorn Granlund <[email protected]>
14579
14580 * Version 4.2 released.
14581
14582 * mpn/powerpc64/aix.m4 (LEA): Renamed from LDSYM.
14583 * mpn/powerpc64/darwin.m4: Likewise.
14584 * mpn/powerpc64/linux64.m4: Likewise.
14585 * mpn/powerpc64/vmx/popcount.asm: Use LEA, not LDSYM.
14586
14587 2006-03-23 Torbjorn Granlund <[email protected]>
14588
14589 * gmp-impl.h: (class gmp_allocated_string): Prefix strlen with std::.
14590
14591 * gmpxx.h (__GMP_DEFINE_TERNARY_EXPR2): Remove for now.
14592 (struct __gmp_ternary_addmul2): Likewise.
14593 (struct __gmp_ternary_submul2): Likewise.
14594
14595 * gmpxx.h: #include <cstring>.
14596 (struct __gmp_alloc_cstring): Prefix strlen with std::.
14597
14598 * mpn/x86/pentium/com_n.asm: Add TEXT and ALIGN.
14599 * mpn/x86/pentium/copyi.asm: Likewise.
14600 * mpn/x86/pentium/copyd.asm: Likewise.
14601
14602 2006-03-22 Torbjorn Granlund <[email protected]>
14603
14604 * gmp-h.in: Add a "using std::FILE" for C++.
14605 (_GMP_H_HAVE_FILE): Check also _ISO_STDIO_ISO_H.
14606
14607 * gmpxx.h: Remove mpfr code.
14608 * tests/cxx: Likewise.
14609
14610 * gmp-impl.h (FORCE_DOUBLE): Rename a tempvar to avoid a clash with
14611 GNU/Linux public include file.
14612
14613 * configure.in (powerpc64, darwin): New optional, gcc_cflags_subtype.
14614 Grab powerpc32/darwin.m4 for ABI=mode32.
14615
14616 * configure.in: Use host_cpu whenever just the cpu type is needed.
14617
14618 2006-03-08 Torbjorn Granlund <[email protected]>
14619
14620 * mpz/get_si.c: Fix a typo.
14621
14622 * tests/mpq/t-get_d.c (check_random): Improve random generation for
14623 nails.
14624
14625 2006-02-28 Torbjorn Granlund <[email protected]>
14626
14627 * tests/mpq/t-get_d.c (check_random): New function.
14628 (main): Call check_random.
14629
14630 * mpq/set_d.c: Make choices based on LIMBS_PER_DOUBLE, not
14631 BITS_PER_MP_LIMB. Make it work for LIMBS_PER_DOUBLE == 4.
14632 Use MPZ_REALLOC.
14633
14634 * mpz/set_d.c: Make it work for LIMBS_PER_DOUBLE == 4.
14635
14636 * extract-dbl.c: Make it work for LIMBS_PER_DOUBLE > 3.
14637
14638 2006-02-27 Torbjorn Granlund <[email protected]>
14639
14640 * mpz/cmp_d.c: Declare `i'.
14641 * mpz/cmpabs_d.c: Likewise.
14642
14643 2006-02-23 Torbjorn Granlund <[email protected]>
14644
14645 * mpn/powerpc32/vmx/copyd.asm: Set right VRSAVE bits.
14646 * mpn/powerpc32/vmx/copyi.asm: Likewise.
14647
14648 2006-02-22 Torbjorn Granlund <[email protected]>
14649
14650 * mpn/powerpc32/vmx/logops_n.asm: New file.
14651
14652 * mpn/powerpc32/diveby3.asm: Rewrite.
14653
14654 2006-02-21 Torbjorn Granlund <[email protected]>
14655
14656 * mpn/powerpc32/vmx/copyi.asm: New file.
14657 * mpn/powerpc32/vmx/copyd.asm: New file.
14658
14659 2006-02-17 Torbjorn Granlund <[email protected]>
14660
14661 * mpn/alpha/ev6/nails/aors_n.asm (CYSH): Import proper setting from
14662 deleted mpn_sub_n.
14663
14664 2006-02-16 Torbjorn Granlund <[email protected]>
14665
14666 * mpn/alpha/ev6/addmul_1.asm: Correct slotting comments.
14667
14668 2006-02-15 Torbjorn Granlund <[email protected]>
14669
14670 * tests/devel/anymul_1.c: Copy error reporting code from addmul_N.c.
14671
14672 * tests/devel/addmul_N.c: New file.
14673 * tests/devel/mul_N.c: New file.
14674
14675 * mpn/alpha/default.m4 (PROLOGUE_cpu): Align functions at 16-byte
14676 boundary.
14677
14678 * mpn/alpha/ev6/nails/aors_n.asm: New file.
14679 * mpn/alpha/ev6/nails/add_n.asm: Remove.
14680 * mpn/alpha/ev6/nails/sub_n.asm: Remove.
14681
14682 * mpn/alpha/ev6/nails/addmul_1.asm: Rewrite.
14683 * mpn/alpha/ev6/nails/submul_1.asm: Likewise.
14684 * mpn/alpha/ev6/nails/mul_1.asm: Likewise.
14685
14686 * mpn/alpha/ev6/nails/addmul_2.asm: Use L() for labels.
14687 * mpn/alpha/ev6/nails/addmul_3.asm: Use L() for labels.
14688 * mpn/alpha/ev6/nails/addmul_4.asm: Use L() for labels.
14689
14690 2006-02-13 Torbjorn Granlund <[email protected]>
14691
14692 * mpn/powerpc32/diveby3.asm: Trivially reorder loop insns to save
14693 1 c/l.
14694
14695 * mpn/x86_64/dive_1.asm: Use movabsq to support large model non-PIC.
14696
14697 * mpn/x86_64/rsh1add_n.asm: Replace high register with rbx.
14698 * mpn/x86_64/rsh1sub_n.asm: Likewise.
14699
14700 2006-02-10 Torbjorn Granlund <[email protected]>
14701
14702 * mpn/powerpc64/sqr_diagonal.asm: Software pipeline.
14703
14704 * mpn/powerpc64/vmx/popcount.asm: Add prefetching.
14705
14706 2006-02-07 Torbjorn Granlund <[email protected]>
14707
14708 * mpn/powerpc64/mode64/diveby3.asm: Rewrite.
14709
14710 2006-02-04 Torbjorn Granlund <[email protected]>
14711
14712 * mpn/powerpc64/vmx/popcount.asm: Remove mpn_hamdist partial code.
14713 Move compare for huge n so that it is always executed.
14714
14715 2006-02-03 Torbjorn Granlund <[email protected]>
14716
14717 * mpn/powerpc32/linux.m4 (LEA): Add support for PIC.
14718
14719 * configure.in (powerpc): New optional, gcc_cflags_subtype.
14720
14721 * mpn/x86_64/pentium4/add_n.asm: New file.
14722 * mpn/x86_64/pentium4/sub_n.asm: New file.
14723 * mpn/x86_64/pentium4/lshift.asm: New file.
14724
14725 * mpn/powerpc64/linux64.m4 (PROLOGUE_cpu): Align function start to
14726 16-multiple.
14727 * mpn/powerpc64/aix.m4: Likewise.
14728 * mpn/powerpc64/darwin.m4: Likewise.
14729
14730 * mpn/powerpc64/copyi.asm: Align loop to 16-multiple.
14731 * mpn/powerpc64/copyd.asm: Likewise
14732
14733 * configure.in (powerpc): Add vmx to relevant paths.
14734
14735 * mpn/powerpc64/linux64.m4 (DEF_OBJECT): Accept 2nd argument, for
14736 alignment.
14737 * mpn/powerpc64/aix.m4: Likewise.
14738 * mpn/powerpc64/darwin.m4: Likewise.
14739
14740 * mpn/powerpc32/linux.m4 (DEF_OBJECT, END_OBJECT): New macros,
14741 inherited from powerpc64 versions.
14742 * mpn/powerpc32/aix.m4: Likewise.
14743 * mpn/powerpc32/darwin.m4: Likewise.
14744
14745 * mpn/powerpc64/vmx/popcount.asm: New file, for ppc32 and ppc64.
14746 * mpn/powerpc32/vmx/popcount.asm: New file, grabbing above file.
14747
14748 2006-01-22 Torbjorn Granlund <[email protected]>
14749
14750 * configure.in: Generalize OS-dependent patterns for powerpcs.
14751
14752 2006-01-20 Torbjorn Granlund <[email protected]>
14753
14754 * mpn/x86_64/popham.asm: Optimize.
14755
14756 * config.guess: Recognize power4 and up under linux-gnu.
14757 * config.sub: Generalize power recognition code.
14758 * acinclude.m4 (POWERPC64_PATTERN): Add 64-bit powerpc processors.
14759 * configure.in: Recognize powerpc processors masquerading as power
14760 processors.
14761
14762 2006-01-19 Torbjorn Granlund <[email protected]>
14763
14764 * mpn/x86_64/logops_n.asm: Rewrite for more stable speed and smaller
14765 code.
14766 * mpn/x86_64/com_n.asm: Likewise.
14767
14768 2006-01-18 Torbjorn Granlund <[email protected]>
14769
14770 * mpn/x86_64/addlsh1_n.asm: Rewrite to use indexed addressing.
14771 * mpn/x86_64/sublsh1_n.asm: Likewise.
14772
14773 2006-01-17 Torbjorn Granlund <[email protected]>
14774
14775 * mpn/generic/diveby3.c: Use GMP standard parameter names. Nailify
14776 alternative code. Use restrict for params.
14777
14778 * configure.in: Recognize andn_n as not needing nailification.
14779
14780 * tests/mpq/t-equal.c (check_various): Disable a test that gives common
14781 factors for GMP_NUMB_BITS == 62.
14782
14783 2006-01-16 Torbjorn Granlund <[email protected]>
14784
14785 * mpn/generic/get_str.c (mpn_sb_get_str): Fix digit count computation,
14786 was inaccurate for nails.
14787
14788 2006-01-15 Torbjorn Granlund <[email protected]>
14789
14790 * mpn/x86_64/mode1o.asm: Remove unneeded carry register zeroing.
14791
14792 2006-01-08 Torbjorn Granlund <[email protected]>
14793
14794 * mpn/alpha/ev6/sqr_diagonal.asm: New file.
14795
14796 2006-01-06 Torbjorn Granlund <[email protected]>
14797
14798 * mpn/powerpc64/mode64/mod_34lsub1.asm: Tune to 1.5 c/l.
14799
14800 * mpn/generic/mullow_n.c (MUL_BASECASE_ALLOC): New #define.
14801 (mpn_mullow_n): Use it.
14802
14803 * mpn/powerpc64/mode64/dive_1.asm: Use EXTERN.
14804 * mpn/powerpc64/mode64/mode1o.asm: Likewise.
14805
14806 * mpn/powerpc64/aix.m4 (EXTERN): Define to import symbol.
14807 (LDSYM): Remove [RW] attribute.
14808 * mpn/powerpc64/linux64.m4 (EXTERN): Dummy definition.
14809 * mpn/powerpc64/darwin.m4 (EXTERN): Likewise.
14810
14811 2006-01-05 Torbjorn Granlund <[email protected]>
14812
14813 * mpn/powerpc64/mode64/mode1o.asm: New file.
14814
14815 * mpn/powerpc64/mode64/dive_1.asm: Use L() for labels. Invoke ASM_END.
14816
14817 * mpn/powerpc64/mode64/invert_limb.asm: Invoke ASM_END.
14818
14819 * mpn/powerpc64/linux64.m4: Move toc entry generation from direct at
14820 DEF_OBJECT to delayed via LDSYM, define ASM_END to output it.
14821 * mpn/powerpc64/aix.m4: Likewise.
14822 * mpn/powerpc64/darwin.m4: Define a dummy ASM_END.
14823
14824 * mpn/powerpc64/mode64/addmul_1.asm: Add POWER5 timings.
14825 * mpn/powerpc64/mode64/mul_1.asm: Likewise.
14826
14827 * mpn/powerpc64/mode64/submul_1.asm: Tweak to save 1.5 c/l for POWER5.
14828
14829 2006-01-04 Torbjorn Granlund <[email protected]>
14830
14831 * mpn/powerpc64/mode64/dive_1.asm: New file.
14832
14833 * mpn/powerpc64/mode64/invert_limb.asm: Add missing ASM_START.
14834
14835 * mpn/powerpc64/mode64/addmul_1.asm: Fix a comment typo.
14836
14837 * mpn/x86_64/diveby3.asm: Rewrite.
14838
14839 2006-01-03 Torbjorn Granlund <[email protected]>
14840
14841 * configure.in: Update bugs reporting address.
14842
14843 * mpn/powerpc64/mode64/diveby3.asm: Trim a cycle off of POWER4 timing.
14844 Misc cleanup.
14845
14846 2006-01-02 Torbjorn Granlund <[email protected]>
14847
14848 * mpn/powerpc64/linux64.m4 (CALL): New macro.
14849 * mpn/powerpc64/aix.m4: Likewise.
14850 * mpn/powerpc64/darwin.m4: Likewise, also define macro "DARWIN".
14851
14852 2005-12-28 Torbjorn Granlund <[email protected]>
14853
14854 * mpn/powerpc64/mode64/mod_34lsub1.asm: New file.
14855
14856 2005-12-26 Torbjorn Granlund <[email protected]>
14857
14858 * mpn/x86_64/mod_34lsub1.asm: New file.
14859
14860 2005-12-20 Torbjorn Granlund <[email protected]>
14861
14862 * mpn/x86_64/submul_1.asm: Save a push/pop by not using register r12.
14863 Use addq instead of leaq for pointer updates; schedule them. (These
14864 changes shaves one cycle of overhead and 0.25 c/l.)
14865
14866 2005-12-18 Torbjorn Granlund <[email protected]>
14867
14868 * mpf/ui_div.c: Implement workaround for GCC bug triggered on alpha.
14869 * mpf/set_q.c: Likewise.
14870
14871 2005-12-16 Torbjorn Granlund <[email protected]>
14872
14873 * mpn/generic/tdiv_qr.c: Remove statement with no effect.
14874 Rename dead variable to `dummy'.
14875
14876 2005-12-15 Torbjorn Granlund <[email protected]>
14877
14878 * demos/pexpr.c (setup_error_handler): Add a missing ";".
14879
14880 2005-11-27 Torbjorn Granlund <[email protected]>
14881
14882 * mpn/generic/mul.c: Crudely call mpn_mul_fft_full before checking
14883 for unbalanced operands.
14884
14885 * mpn/generic/mul_fft.c: Remove many scalar divisions.
14886 (mpn_mul_fft_lcm): Simplify.
14887 (mpn_mul_fft_decompose): Rewrite to handle arbitrarily unbalanced
14888 operands.
14889
14890 2005-11-22 Torbjorn Granlund <[email protected]>
14891
14892 * configure.in: Properly recognize all 32-bit Solaris releases.
14893
14894 2005-11-10 Torbjorn Granlund <[email protected]>
14895
14896 * mpn/generic/mul_fft.c: Inline mpn_fft_mul_2exp_modF,
14897 mpn_fft_add_modF and mpn_fft_normalize.
14898
14899 2005-11-02 Torbjorn Granlund <[email protected]>
14900
14901 * tests/mpz/reuse.c: Increase operand size, decrease # of reps.
14902
14903 * mpz/rootrem.c: Adapt to new mpn_rootrem.
14904 * mpz/root.c: Likewise.
14905
14906 * tests/mpz/reuse.c: Test mpz_rootrem.
14907
14908 With Paul Zimmermann:
14909 * mpn/generic/rootrem.c: Complete rewrite.
14910
14911 2005-10-31 Torbjorn Granlund <[email protected]>
14912
14913 * mpz/pprime_p.c (mpz_probab_prime_p): Considerably limit trial
14914 dividing.
14915
14916 * mpz/perfpow.c (mpz_perfect_power_p): Use mpz_divisible_ui_p instead
14917 of mpz_tdiv_ui.
14918
14919 * mpz/divegcd.c: Correct probability number for GCD == 1.
14920
14921 * mpn/x86_64/mul_basecase.asm: Remove an obsolete comment.
14922
14923 * mpn/x86: Add cycle counts for array of x86 processors.
14924
14925 * mpn/x86/k7/mod_34lsub1.asm: Remove spurious mentions of ebp.
14926
14927 * mpn/powerpc32: Add POWER5 timings.
14928
14929 * mpn/powerpc32/README: Describe global reference variations.
14930
14931 * mpn/ia64/divrem_2.asm: Add some comments.
14932
14933 * mpn/ia64/divrem_1.asm: Reformat.
14934
14935 * mpn/ia64/addmul_2.asm: Correct a comment on slotting.
14936 * mpn/ia64/logops_n.asm: Likewise.
14937
14938 * mpn/ia64/addmul_1.asm: Remove a redundant preg mutex decl.
14939
14940 * mpn/generic/dive_1.c: Whitespace cleanup.
14941
14942 * mpn/alpha/ev6/nails/addmul_1.asm: Correct comments on slotting.
14943 * mpn/alpha/ev6/nails/addmul_2.asm: Likewise.
14944 * mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
14945
14946 * mpf/out_str.c: List some allocation improvement ideas.
14947
14948 * doc/gmp.texi: Update many URLs and email addresses.
14949
14950 * gmp-h.in (_GMP_H_HAVE_FILE): Check also _STDIO_H_INCLUDED.
14951
14952 2005-10-26 Torbjorn Granlund <[email protected]>
14953
14954 * tune/tuneup.c (tune_mullow): Update param.max_size for each threshold
14955 measurement.
14956
14957 * configure.in (POWERPC64_PATTERN/*-*-darwin*): Set
14958 SPEED_CYCLECOUNTER_OBJ_mode64 and cyclecounter_size_mode64.
14959 (POWERPC64_PATTERN/*-*-linux*): Likewise.
14960
14961 2005-10-03 Torbjorn Granlund <[email protected]>
14962
14963 * demos/factorize.c (factor_using_division_2kp): Honor verbose flag.
14964 (factor_using_pollard_rho): Divide out new factor before it's
14965 clobbered. Don't stop factoring after a composite factor was found.
14966
14967 2005-09-17 Torbjorn Granlund <[email protected]>
14968
14969 * demos/pexpr.c (fns): Add factorial keywords.
14970
14971 2005-08-16 Torbjorn Granlund <[email protected]>
14972
14973 * tune/Makefile.am (EXTRA_DIST): Change "amd64" => "x86_64".
14974 * mpn/Makefile.am (TARG_DIST): Change "amd64" => "x86_64".
14975
14976 2005-08-15 Torbjorn Granlund <[email protected]>
14977
14978 * configure.in: Change "amd64" => "x86_64".
14979
14980 2005-06-13 Torbjorn Granlund <[email protected]>
14981
14982 * mpn/generic/pre_mod_1.c: Canonicalize variable names.
14983
14984 * mpn/generic/divrem.c: Rate qxn test as UNLIKELY.
14985
14986 * mpn/generic/gcdext.c (sanity_check_row): Invoke TMP_MARK.
14987
14988 * tune/tuneup.c (tune_mullow): Fix all max_size fields.
14989
14990 * gmp-impl.h (SQR_TOOM3_THRESHOLD_LIMIT): New #define.
14991 * tune/tuneup.c (tune_sqr): Use SQR_TOOM3_THRESHOLD_LIMIT.
14992 (sqr_toom3_threshold): Initialize from SQR_TOOM3_THRESHOLD_LIMIT.
14993
14994 * mpn/generic/mul_n.c (mpn_sqr_n): Use SQR_TOOM3_THRESHOLD_LIMIT.
14995
14996 * gmp-impl.h (mpn_nand_n, mpn_iorn_n, mpn_nior_n, mpn_xnor_n):
14997 Handle nails.
14998
14999 2005-06-13 Niels Möller <[email protected]>
15000
15001 * mpn/generic/gcdext.c (gcdext_schoenhage): Check for the
15002 (unlikely) case that one of the hgcd/euclid steps results in two
15003 remainders of one limb each. Then use gcdext_1.
15004
15005 2005-06-12 Torbjorn Granlund <[email protected]>
15006
15007 * mpn/alpha/ev6/sub_n.asm: Analogous changes as to add_n.asm last.
15008
15009 2005-06-11 Torbjorn Granlund <[email protected]>
15010
15011 * mpn/alpha/ev6/add_n.asm: Rewrite inner loop to load later.
15012 Add mpn_add_nc entry.
15013
15014 * mpn/alpha/ev6/addmul_1.asm: Remove redundant initial loads.
15015
15016 2005-06-09 Torbjorn Granlund <[email protected]>
15017
15018 * mpn/ia64/dive_1.asm: Fix issues with HP-UX.
15019
15020 2005-06-08 Torbjorn Granlund <[email protected]>
15021
15022 * mpn/ia64/diveby3.asm: Update TODO list.
15023
15024 * mpn/ia64/mode1o.asm: Fix comment typos.
15025
15026 * mpn/ia64/dive_1.asm: New file.
15027
15028 2005-06-07 Torbjorn Granlund <[email protected]>
15029
15030 * mpn/ia64/mode1o.asm: Add prefetching.
15031
15032 * mpn/generic/dive_1.c: Use variable h for upper umul_ppmm result.
15033
15034 2005-06-06 Torbjorn Granlund <[email protected]>
15035
15036 * mpn/ia64/hamdist.asm: Complete rewrite.
15037 * mpn/ia64/popcount.asm: Rewrite to use multi-pronged feed-in.
15038
15039 * mpn/ia64/aors_n.asm: Rewrite feed-in code.
15040 * mpn/ia64/rsh1aors_n.asm: Likewise.
15041 * mpn/ia64/aorslsh1_n.asm: Likewise.
15042 * mpn/ia64/lorrshift.asm: Likewise.
15043
15044 2005-06-04 Torbjorn Granlund <[email protected]>
15045
15046 * tests/devel/try.c (choice_array): Exclude mpn_preinv_mod_1 unless
15047 USE_PREINV_MOD_1.
15048 (choice_array): Exclude mpn_sqr_basecase if SQR_KARATSUBA_THRESHOLD
15049 is zero.
15050
15051 2005-06-03 Torbjorn Granlund <[email protected]>
15052
15053 * mpn/alpha/ev6/addmul_1.asm: Prefix all labels with "$".
15054 * mpn/alpha/ev6/mul_1.asm: Likewise.
15055
15056 2005-06-02 Torbjorn Granlund <[email protected]>
15057
15058 * tests/refmpn.c (refmpn_divmod_1c_workaround): Implement workaround
15059 to gcc 3.4.x bug triggered on powerpc64 with 32-bit ABI.
15060
15061 2005-06-01 Torbjorn Granlund <[email protected]>
15062
15063 * tests/devel/try.c (main): Fix a typo.
15064
15065 2005-05-31 Torbjorn Granlund <[email protected]>
15066
15067 * mpn/alpha/ev6/addmul_1.asm: Rewrite for L1 cache, add prefetch.
15068
15069 2005-05-30 Torbjorn Granlund <[email protected]>
15070
15071 * tests/misc.c (tests_rand_start): Mask random seed to 32 bits.
15072
15073 2005-05-29 Torbjorn Granlund <[email protected]>
15074
15075 * mpn/powerpc64/mode32/mul_1.asm: Handle BROKEN_LONGLONG_PARAM.
15076 * mpn/powerpc64/mode32/addmul_1.asm: Likewise.
15077 * mpn/powerpc64/mode32/submul_1.asm: Likewise.
15078
15079 * mpn/powerpc32/mode1o.asm: Rewrite to actually work.
15080
15081 * mpn/powerpc32/aix.m4 (LEA): New macro.
15082 (ASM_END): New macro.
15083
15084 * mpn/powerpc32/linux.m4: New file.
15085 * mpn/powerpc32/darwin.m4: New file.
15086 * configure.in: Use linux.m4 and darwin.m4.
15087 (powerpc64-linux-gnu): Add support for mode32.
15088
15089 2005-05-25 Torbjorn Granlund <[email protected]>
15090
15091 * mpn/generic/mullow_n.c: Remove FIXME mentioning fixed flaw.
15092
15093 * tests/mpz/t-cmp_d.c (check_one): Fix printf fmt string typo.
15094
15095 * demos/isprime.c: #include stdlib.h.
15096 * tests/rand/t-urbui.c: Likewise.
15097 * tests/rand/t-urmui.c: Likewise.
15098
15099 * tests/mpz/t-popcount.c (check_random): Remove spurious printf arg.
15100
15101 * mpn/ia64/lorrshift.asm: Cleanup code layout.
15102 * mpn/ia64/popcount.asm: Likewise.
15103
15104 2005-05-24 Torbjorn Granlund <[email protected]>
15105
15106 * tests/devel/try.c (param_init) [TYPE_GET_STR]: Set retval field.
15107 (compare): Handle SIZE_GET_STR as SIZE_RETVAL.
15108
15109 * tests/refmpn.c (refmpn_get_str): Rewrite to make it work.
15110
15111 2005-05-23 Torbjorn Granlund <[email protected]>
15112
15113 * mpn/amd64/add_n.asm: Add mpn_add_nc entry point.
15114 * mpn/amd64/sub_n.asm: Add mpn_sub_nc entry point.
15115
15116 * longlong.h (many places): Remove lvalue casts.
15117
15118 * gmp-impl.h (MPF_SIGNIFICANT_DIGITS): Cast prec to avoid overflow
15119 for > 4G digits.
15120
15121 * mpn/alpha/ev6/add_n.asm: Prefetch using ldl.
15122 * mpn/alpha/ev6/sub_n.asm: Likewise.
15123
15124 * mpn/alpha/ev6/slot.pl (optable): Recognize negq and ldl.
15125
15126 * mpn/ia64/aors_n.asm: Prefetch using lfetch.
15127 * mpn/ia64/lorrshift.asm: Likewise.
15128 * mpn/ia64/popcount.asm: Likewise.
15129 * mpn/ia64/diveby3.asm: Likewise.
15130
15131 2005-05-22 Torbjorn Granlund <[email protected]>
15132
15133 * mpn/alpha/ev67/popcount.asm: Prefetch.
15134 * mpn/alpha/ev67/hamdist.asm: Prefetch.
15135
15136 * longlong.h (add_ssaaaa) [x86]: Remove lvalue casts.
15137 (sub_ddmmss) [x86]: Likewise.
15138
15139 * tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Add DATA_SRC1_ODD.
15140 (param_init) [TYPE_MPZ_KRONECKER]: Clear inherited DATA_SRC1_ODD.
15141 (param_init) [TYPE_DIVEXACT_1]: Use symbolic name DIVISOR_LIMB.
15142
15143 2005-05-21 Torbjorn Granlund <[email protected]>
15144
15145 * tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Initialize divisor
15146 field according to UDIV_NEEDS_NORMALIZATION.
15147
15148 * mpz/mul_i.h: Remove left-over TMP_XXXX marker arguments.
15149
15150 2005-05-20 Torbjorn Granlund <[email protected]>
15151
15152 * mpn/x86/pentium4/sse2/addmul_1.asm (mpn_addmul_1c): Put carry in
15153 proper register.
15154
15155 * mpn/generic/sqr_basecase.c (mpn_sqr_basecase, addmul_2 version):
15156 Avoid accesses out-of-bound in MPN_SQR_DIAGONAL applicate code.
15157
15158 2005-05-19 Torbjorn Granlund <[email protected]>
15159
15160 * mpn/alpha/diveby3.asm: Make it actually work.
15161
15162 * gmp-impl.h (MULLOW_BASECASE_THRESHOLD_LIMIT): New #define.
15163 * mpn/generic/mullow_n.c: Use fixed stack allocation for the smallest
15164 operands; use TMP_S* allocation for medium operands.
15165
15166 * gmp-impl.h: Remove nested TUNE_PROGRAM_BUILD test.
15167
15168 2005-05-18 Torbjorn Granlund <[email protected]>
15169
15170 * mpn/generic/mul_n.c: Make squaring and multiplication code more
15171 similar. Use TMP_S* functions.
15172
15173 * gmp-impl.h (TMP_DECL, TMP_MARK, TMP_FREE): Get rid of argument.
15174 (TMP_SALLOC): New macro for "small" allocations.
15175 (TMP_BALLOC): New macro for "big" allocations.
15176 (TMP_SDECL, TMP_SMARK, TMP_SFREE): New macros for functions that use
15177 just TMP_SALLOC.
15178 (WANT_TMP_ALLOCA): Make default functions choose alloca or reentrant
15179 functions, depending on size.
15180
15181 * *.c: Remove TMP_XXXX marker arguments.
15182
15183 * acinclude.m4 (WANT_TMP): Want tal-reent.lo also for alloca case.
15184
15185 2005-05-16 Torbjorn Granlund <[email protected]>
15186
15187 * mpn/ia64/gmp-mparam.h: Further extend FFT tables.
15188
15189 2005-05-15 Torbjorn Granlund <[email protected]>
15190
15191 * gmp-impl.h (udiv_qrnnd_preinv2): Pull an add into add_ssaaaa.
15192 (udiv_qrnnd_preinv2gen): Likewise.
15193
15194 2005-05-14 Torbjorn Granlund <[email protected]>
15195
15196 * longlong.h (add_ssaaaa) [x86_64]: Restrict allowed immediate
15197 operands.
15198 * (sub_ddmmss) [x86_64]: Likewise.
15199
15200 2005-05-02 Torbjorn Granlund <[email protected]>
15201
15202 * acinclude.m4 (GMP_HPC_HPPA_2_0): Make gmp_tmp_v1 sed pattern handle
15203 version numbers like B.11.X.32509-32512.GP.
15204
15205 * mpn/m68k/aors_n.asm: Correct MULFUNC_PROLOGUE.
15206
15207 * mpn/powerpc64/mode64/aors_n.asm: Add a MULFUNC_PROLOGUE.
15208
15209 * mpf/inp_str.c: Use plain int for mpf_set_str return value (works
15210 around gcc 4 bug).
15211
15212 * acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): Handle darwin's assembly
15213 syntax.
15214 (long long reliability test 1): New GMP_PROG_CC_WORKS_PART test.
15215 (long long reliability test 2): New GMP_PROG_CC_WORKS_PART test.
15216
15217 * configure.in: Add mode64 support for darwin. Use darwin.m4.
15218 Add cflags_opt flags for mode32 darwin.
15219
15220 * mpn/powerpc64: Use L() for all asm files.
15221
15222 * mpn/asm-defs.m4 (PIC_ALWAYS): Define PIC just iff PIC_ALWAYS = "yes".
15223
15224 * mpn/powerpc64/darwin.m4: New file.
15225
15226 * mpn/powerpc64/linux64.m4: Remove TOCREF, add LDSYM.
15227 Rework DEF_OBJECT to need just one argument.
15228 * mpn/powerpc64/aix.m4: Likewise.
15229
15230 * mpn/powerpc64/mode64/invert_limb.asm: Load approx_tab address with
15231 LDSYM. Optimize somewhat. Remove 2nd DEF_OBJECT operand.
15232
15233 2005-05-01 Torbjorn Granlund <[email protected]>
15234
15235 * mpn/generic/popham.c: Compute final summation differently for 64-bit.
15236
15237 * tests/mpz/t-popcount.c (check_random): New function.
15238 (main): Call it.
15239
15240 2005-04-28 Torbjorn Granlund <[email protected]>
15241
15242 * mpn/amd64/add_n.asm: Use r9 instead of rbx to save push/pop.
15243 * mpn/amd64/sub_n.asm: Likewise.
15244
15245 2005-04-09 Torbjorn Granlund <[email protected]>
15246
15247 * mpn/powerpc64/copyi.asm: If HAVE_ABI_mode32, ignore upper 32 bits of
15248 mp_size_t argument.
15249 * mpn/powerpc64/copyd.asm: Likewise.
15250 * mpn/powerpc64/sqr_diagonal.asm: Likewise.
15251 * mpn/powerpc64/lshift.asm: Likewise.
15252 * mpn/powerpc64/rshift.asm: Likewise.
15253 * mpn/powerpc64/logops_n.asm: Likewise.
15254 * mpn/powerpc64/com_n.asm: Likewise.
15255
15256 2005-04-08 Torbjorn Granlund <[email protected]>
15257
15258 * mpn/generic/rootrem.c: Allocate PP_ALLOC limbs also for qp.
15259
15260 2005-04-07 Torbjorn Granlund <[email protected]>
15261
15262 * mpn/powerpc32/add_n.asm: Add nc entry point.
15263 * mpn/powerpc32/sub_n.asm: Likewise.
15264
15265 * mpn/amd64/*.asm: Add Prescott/Nocona cycle/limb numbers.
15266
15267 * mpn/alpha/add_n.asm: Add correct cycle/limb numbers.
15268 * mpn/alpha/sub_n.asm: Likewise.
15269 * mpn/alpha/ev5/add_n.asm: Likewise.
15270 * mpn/alpha/ev5/sub_n.asm: Likewise.
15271
15272 2005-03-31 Torbjorn Granlund <[email protected]>
15273
15274 * mpn/x86/k7/gmp-mparam.h: Fix typo in last change.
15275
15276 2005-03-19 Torbjorn Granlund <[email protected]>
15277
15278 * mpn/amd64/gmp-mparam.h: Update.
15279
15280 * mpn/alpha/gmp-mparam.h: Update.
15281 * mpn/alpha/ev5/gmp-mparam.h: Update.
15282 * mpn/alpha/ev6/gmp-mparam.h: Update.
15283
15284 * mpn/ia64/gmp-mparam.h: Update.
15285
15286 * mpn/x86/p6/mmx/gmp-mparam.h: Update.
15287 * mpn/x86/pentium4/sse2/gmp-mparam.h: Update.
15288 * mpn/x86/k7/gmp-mparam.h: Update.
15289
15290 * tests/mpz/t-gcd.c (main): Honor command line reps argument.
15291
15292 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Simplify and correct code
15293 for generating test operands.
15294
15295 2005-03-17 Niels Möller <[email protected]>
15296
15297 * mpn/generic/hgcd.c (qstack_adjust): New argument d, saying how much
15298 to adjust the top quotient.
15299 (hgcd_adjust): The quotient can be off by either 1 or 2.
15300
15301 2005-03-16 Torbjorn Granlund <[email protected]>
15302
15303 * tests/mpz/t-gcd.c (MAX_SCHOENHAGE_THRESHOLD): Set to largest of
15304 gcd,gcdext thresholds.
15305
15306 2005-03-15 Niels Möller <[email protected]>
15307
15308 * mpn/generic/gcdext.c (gcdext_schoenhage): When calling gcdext_lehmer,
15309 reuse all temporary limb storage, including the storage used for the
15310 qstack.
15311
15312 2005-03-09 Torbjorn Granlund <[email protected]>
15313
15314 * mpn/amd64/logops_n.asm: Add MULFUNC_PROLOGUE.
15315
15316 2005-03-05 Torbjorn Granlund <[email protected]>
15317
15318 * mpn/amd64/gmp-mparam.h: Extend MUL_FFT_TABLE and SQR_FFT_TABLE.
15319 * mpn/ia64/gmp-mparam.h: Likewise.
15320
15321 2005-02-17 Torbjorn Granlund <[email protected]>
15322
15323 * mpn/ia64/divrem_1.asm: Add preinv entry point.
15324
15325 2005-01-13 Torbjorn Granlund <[email protected]>
15326
15327 * gmp-impl.h (MPN_SIZEINBASE): Count bits in type size_t.
15328 (MPN_SIZEINBASE_16): Likewise.
15329
15330 2004-12-17 Torbjorn Granlund <[email protected]>
15331
15332 * tune/speed.c (run_gnuplot): Use lines, not linespoints.
15333 Output a reset gnuplot command initially.
15334
15335 2004-12-04 Torbjorn Granlund <[email protected]>
15336
15337 * mpn/generic/random2.c (gmp_rrandomb): Rework again.
15338 * mpz/rrandomb.c (gmp_rrandomb): Likewise.
15339
15340 * mpn/amd64/redc_1.asm: Call via PLT when PIC.
15341
15342 2004-11-29 Torbjorn Granlund <[email protected]>
15343
15344 * mpn/amd64/divrem_1.asm: Add preinv entry point.
15345 * mpn/amd64/gmp-mparam.h: Set USE_PREINV_DIVREM_1 to 1.
15346
15347 2004-11-24 Torbjorn Granlund <[email protected]>
15348
15349 * mpn/alpha/diveby3.asm: Use correct prefetch instruction.
15350
15351 2004-11-19 Torbjorn Granlund <[email protected]>
15352
15353 * mpn/alpha/diveby3.asm: Add ",gp" glue in PROLOGUE.
15354 Add r31 dummy operand to `br' instruction.
15355
15356 2004-11-17 Torbjorn Granlund <[email protected]>
15357
15358 * mpn/powerpc64/mode64/addmul_1.asm: Rewrite.
15359 * mpn/powerpc64/mode64/mul_1.asm: Rewrite.
15360
15361 * configure.in: Invoke AC_C_RESTRICT.
15362
15363 2004-11-16 Torbjorn Granlund <[email protected]>
15364
15365 * mpn/alpha/diveby3.asm: New file.
15366
15367 2004-11-13 Torbjorn Granlund <[email protected]>
15368
15369 * mpn/amd64/popham.asm: New file.
15370
15371 2004-11-12 Torbjorn Granlund <[email protected]>
15372
15373 * mpn/amd64/add_n.asm: Correct cycle count.
15374 * mpn/amd64/sub_n.asm: Likewise.
15375
15376 * mpn/amd64/dive_1.asm: Speed divisors with many factors of 2.
15377
15378 2004-11-11 Torbjorn Granlund <[email protected]>
15379
15380 * mpn/amd64/dive_1.asm: New file.
15381
15382 2004-11-10 Torbjorn Granlund <[email protected]>
15383
15384 * mpn/generic/popham.c: Add comment.
15385
15386 2004-11-09 Torbjorn Granlund <[email protected]>
15387
15388 * mpn/amd64/com_n.asm: New file.
15389
15390 * mpn/amd64/logops_n.asm: New file.
15391
15392 2004-11-08 Torbjorn Granlund <[email protected]>
15393
15394 * mpn/powerpc64/com_n.asm: New file.
15395
15396 2004-11-05 Torbjorn Granlund <[email protected]>
15397
15398 * mpn/amd64/diveby3.asm: New file.
15399
15400 * config.guess: Strip any PPC string in /proc/cpuinfo.
15401 Recognize 970 in that code.
15402
15403 2004-11-01 Torbjorn Granlund <[email protected]>
15404
15405 * mpn/amd64/mul_basecase.asm: New file.
15406
15407 * mpn/amd64/redc_1.asm: New file.
15408
15409 2004-10-25 Torbjorn Granlund <[email protected]>
15410
15411 * mpn/powerpc64/mode64/addlsh1_n.asm: Correct cycle counts.
15412
15413 * mpn/powerpc64/README: Update POWER5/PPC970 pipeline information.
15414
15415 * mpn/generic/mul_basecase.c (MAX_LEFT): Add comment.
15416
15417 * doc/gmp.texi: Consistently use "x86" denotation.
15418 (Assembler SIMD Instructions): Mention SSE2 usage.
15419
15420 * demos/pexpr.c (main): Handle "negative" base in mpz_sizeinbase call.
15421
15422 2004-10-18 Torbjorn Granlund <[email protected]>
15423
15424 * mpn/powerpc64/mode64/submul_1.asm: Shave 2 cycles/limb with new carry
15425 inversion trick.
15426
15427 2004-10-16 Torbjorn Granlund <[email protected]>
15428
15429 * configure.in: Support icc under x86.
15430 (ia64-*-linux*): Pass -no-gcc to icc.
15431
15432 2004-10-15 Torbjorn Granlund <[email protected]>
15433
15434 * longlong.h (ia64 umul_ppmm): Add version for icc.
15435
15436 * configure.in: Support icc under ia64-*-linux*.
15437
15438 * acinclude.m4: New "compiler works" test for icc 8.1 bug.
15439 (GMP_PROG_CC_IS_GNU): Don't let Intel's icc fool us it is GCC.
15440
15441 2004-10-14 Torbjorn Granlund <[email protected]>
15442
15443 * mpn/generic/gcdext.c: Add a few missing TMP_MARK.
15444
15445 2004-10-14 Torbjorn Granlund <[email protected]>
15446
15447 * acinclude.m4 (GMP_ASM_W32): Try also "data4".
15448
15449 * mpn/ia64/logops_n.asm: Don't use naked "br", rejected by Intel
15450 assembler.
15451 * mpn/ia64/aors_n.asm: Likewise.
15452
15453 * mpn/ia64/divrem_2.asm: Add ".prologue".
15454
15455 * mpn/ia64/hamdist.asm: Put alloc first in bundle, enforced by the
15456 Intel assembler.
15457
15458 * longlong.h: Exclude masquerading __INTEL_COMPILER from ia64 asm.
15459 * gmp-impl.h: Likewise.
15460
15461 2004-10-12 Torbjorn Granlund <[email protected]>
15462
15463 * mpn/ia64/mul_2.asm: Rewrite function entry code, write new code for
15464 n=2.
15465 * mpn/ia64/addmul_2.asm: Likewise.
15466
15467 * tests/devel/try.c: Handle mpn_mul_2 like mpn_addmul_2.
15468
15469 * tune/speed.c (routine): Make R parameter optional for mpn_mul_2.
15470
15471 2004-10-11 Torbjorn Granlund <[email protected]>
15472
15473 * mpn/sparc64/addmul_1.asm: Update a comment.
15474
15475 * tests/devel/aors_n.c: #include tests.h.
15476 * tests/devel/anymul_1.c: Likewise.
15477 * tests/devel/shift.c: Likewise.
15478 * tests/devel/copy.c: Likewise.
15479
15480 * tests/devel/aors_n.c: Handle also mpn_addlsh1_n, mpn_sublsh1_n,
15481 mpn_rsh1add_n, and mpn_rsh1sub_n.
15482
15483 * mpn/ia64/submul_1.asm: Add TODO item.
15484
15485 * mpn/ia64/aors_n.asm: Rewrite function entry code (again).
15486 * mpn/ia64/aorslsh1_n.asm: Likewise.
15487 * mpn/ia64/logops_n.asm: Likewise.
15488
15489 * mpn/ia64/rsh1aors_n.asm: Tune function entry and feed-in code.
15490 * mpn/ia64/lorrshift.asm: Likewise. Remove several spurious loads.
15491
15492 * tests/devel/Makefile.am (EXTRA_PROGRAMS): Updates for yesterday's
15493 file removals and additions.
15494
15495 2004-10-10 Torbjorn Granlund <[email protected]>
15496
15497 * mpn/ia64/copyi.asm: Tune function entry code.
15498 * mpn/ia64/copyd.asm: Likewise.
15499
15500 * mpn/ia64/logops_n.asm: Tune function entry and feed-in code for speed
15501 and size.
15502 * mpn/ia64/aors_n.asm: Likewise.
15503
15504 * mpn/powerpc64/logops_n.asm: Correct cycles counts.
15505 * mpn/powerpc64/mode64/aors_n.asm: Likewise.
15506
15507 * tests/devel/copy.c: Handle both MPN_COPY_INCR and MPN_COPY_DECR.
15508
15509 * tests/devel/logops_n.c: New file, handle all logical operations.
15510
15511 * tests/devel/anymul_1.c: New file, handle mpn_mul_1, mpn_addmul_1, and
15512 mpn_submul_1
15513 * tests/devel/mul_1.c: Remove.
15514 * tests/devel/addmul_1.c: Remove.
15515 * tests/devel/submul_1.c: Remove.
15516
15517 * tests/devel/shift.c: New file, handle mpn_lshift and mpn_rshift.
15518 * tests/devel/lshift.c: Remove.
15519 * tests/devel/rshift.c: Remove.
15520
15521 * tests/devel/aors_n.c: New file, handle mpn_add_n and mpn_sub_n.
15522 * tests/devel/add_n.c: Remove.
15523 * tests/devel/sub_n.c: Remove.
15524
15525 2004-10-09 Torbjorn Granlund <[email protected]>
15526
15527 * mpn/powerpc64/linux64.m4: Define DEF_OBJECT, END_OBJECT, and TOCREF.
15528 * mpn/powerpc64/aix.m4: Likewise.
15529 * mpn/powerpc64/mode64/invert_limb.asm: Use DEF_OBJECT, END_OBJECT, and
15530 TOCREF for approx_tab.
15531
15532 * mpn/amd64/mul_1.asm: Add mpn_mul_1c entry point.
15533
15534 2004-10-08 Torbjorn Granlund <[email protected]>
15535
15536 * mpn/powerpc64/copyi.asm: New file.
15537 * mpn/powerpc64/copyd.asm: New file.
15538 * gmp-h.in: Remove PPC MPN_COPY variants.
15539 * gmp-impl.h: Likewise.
15540
15541 * mpn/powerpc64/logops_n.asm: New file.
15542
15543 * mpn/powerpc64/mode64/invert_limb.asm: New file.
15544
15545 2004-10-07 Torbjorn Granlund <[email protected]>
15546
15547 * mpn/powerpc64/mode64/aors_n.asm: New file, optimized for POWER4 and
15548 its derivatives.
15549 * mpn/powerpc64/mode64/add_n.asm: Delete.
15550 * mpn/powerpc64/mode64/sub_n.asm: Delete.
15551
15552 * configfsf.guess: Patch HP-UX code to accommodate HP compiler's new
15553 inability to read from stdin.
15554
15555 * mpn/powerpc64/mode64/addsub_n.asm: Remove accidentally added file.
15556
15557 2004-10-02 Torbjorn Granlund <[email protected]>
15558
15559 * mpn/amd64/README: Update for new developments, fix typos.
15560
15561 * mpn/amd64/mul_1.asm: Tweak addressing (3.25 => 3.0 cycles/limb).
15562
15563 * mpn/amd64/addmul_1.asm: Remove unreachable code block.
15564
15565 2004-09-30 Torbjorn Granlund <[email protected]>
15566
15567 * mpn/amd64/addmul_1.asm: Rewrite, now 3.25 cycles/limb.
15568
15569 * mpn/ia64/addmul_1.asm: Slightly enhance cross-jumping for code
15570 density.
15571 * mpn/ia64/mul_1.asm: Analogous changes.
15572
15573 2004-09-29 Torbjorn Granlund <[email protected]>
15574
15575 * gmp-impl.h (x86 ULONG_PARITY): Work around GCC change of "q" register
15576 flag.
15577
15578 2004-09-28 Torbjorn Granlund <[email protected]>
15579
15580 * mpn/ia64/divrem_1.asm: Add cycle counts to loop.
15581
15582 * mpn/ia64/divrem_2.asm: New file.
15583
15584 2004-09-28 Paul Zimmermann <[email protected]>
15585
15586 * mpn/generic/mul_fft.c (mpn_mul_fft): Fix a bug in the choice of the
15587 recursive fft parameters.
15588
15589 2004-09-20 Torbjorn Granlund <[email protected]>
15590
15591 * tests/misc.c (tests_rand_start): Default to strtoul for re-seeding.
15592
15593 * tests/mpz/t-mul.c (ref_mpn_mul): Fudge tmp allocation for toom3.
15594
15595 2004-09-19 Torbjorn Granlund <[email protected]>
15596
15597 * tests/misc.c (tests_rand_start): Shift tv_usec for better seeding.
15598
15599 2004-09-18 Torbjorn Granlund <[email protected]>
15600
15601 * tests/misc.c (tests_rand_start): Invoke fflush after printing seed.
15602
15603 * tests/mpz/t-mul.c (main): Check environment for GMP_CHECK_FFT, run
15604 extra FFT tests if set.
15605 (ref_mpn_mul): Use library code for kara and toom, but skewded so that
15606 we never use the same algorithm that we're testing.
15607 (mul_kara): Delete.
15608 (debug_mp): Print just one line of large numbers.
15609 (ref_mpn_mul): Rework usage of tp temporary space.
15610
15611 2004-09-15 Torbjorn Granlund <[email protected]>
15612
15613 * mpn/ia64/mul_2.asm: For HAVE_ABI_32, convert vp.
15614 * mpn/ia64/addmul_2.asm: Likewise.
15615
15616 2004-09-13 Torbjorn Granlund <[email protected]>
15617
15618 * mpn/ia64/invert_limb.asm: Rewrite.
15619
15620 * mpn/ia64/logops_n.asm: Insert some more stops.
15621
15622 2004-09-12 Torbjorn Granlund <[email protected]>
15623
15624 * mpn/ia64/gmp-mparam.h: Update.
15625 * mpn/amd64/gmp-mparam.h: Update.
15626
15627 * mpn/ia64/sqr_diagonal.asm: Shave off a few cycles.
15628
15629 2004-09-11 Torbjorn Granlund <[email protected]>
15630
15631 * mpn/ia64/mul_2.asm: New file.
15632 * mpn/ia64/addmul_2.asm: New file.
15633
15634 * mpn/ia64/addmul_1.asm: Tune a cycle from prologue.
15635
15636 * mpn/ia64/lorrshift.asm: Insert stops after several branches.
15637 * mpn/ia64/aorslsh1_n.asm: Likewise.
15638 * mpn/ia64/rsh1aors_n.asm: Likewise.
15639
15640 * mpn/generic/sqr_basecase.c: In variant for HAVE_NATIVE_mpn_addmul_2,
15641 accumulate carry also for when HAVE_NATIVE_mpn_addlsh1_n.
15642
15643 2004-09-07 Torbjorn Granlund <[email protected]>
15644
15645 * mpn/ia64/submul_1.asm: Rewrite.
15646
15647 * mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
15648 * mpn/ia64/mul_1.asm: Likewise.
15649
15650 2004-09-02 Torbjorn Granlund <[email protected]>
15651
15652 * mpn/ia64/mul_1.asm: Optimize feed-in code.
15653 * mpn/ia64/addmul_1.asm: Rewrite feed-in code.
15654
15655 2004-08-29 Torbjorn Granlund <[email protected]>
15656
15657 * tests/mpz/t-sizeinbase.c: Disable mpz_fake_bits and check_sample.
15658
15659 2004-07-16 Torbjorn Granlund <[email protected]>
15660
15661 * mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
15662
15663 2004-06-17 Kevin Ryde <[email protected]>
15664
15665 * doc/gmp.texi: Use @. when sentence ends with a capital, for good
15666 spacing in tex.
15667 (Language Bindings): Add gmp-d, reported by Ben Hinkle. Update SWI
15668 Prolog URL, reported by Jan Wielemaker.
15669
15670 2004-06-09 Torbjorn Granlund <[email protected]>
15671
15672 * configure.in: Handle --enable-fat. Use that to enable x86 fat
15673 builds, remove magic meaning of i386-*-*.
15674
15675 2004-06-03 Kevin Ryde <[email protected]>
15676
15677 * gmp-impl.h (memset): Use a local char* pointer, in case parameter is
15678 something else (eg. tune/common.c). Reported by Emmanuel Thomé.
15679
15680 2004-06-01 Kevin Ryde <[email protected]>
15681
15682 * config.guess (i?86-*-*): Avoid "Illegal instruction" message which
15683 goes to stdout on 80386 freebsd4.9.
15684
15685 2004-05-23 Niels Möller <[email protected]>
15686
15687 * mpn/generic/gcdext.c (gcdext_1_u): New function.
15688 (mpn_gcdext): Use it.
15689
15690 2004-05-23 Torbjorn Granlund <[email protected]>
15691
15692 * mpn/generic/gcdext.c (gcdext_1_odd): Use masking to avoid jumps.
15693
15694 2004-05-22 Torbjorn Granlund <[email protected]>
15695
15696 * mpn/x86/pentium4/sse2/addmul_1.asm: Add Prescott cycle numbers.
15697
15698 * mpn/amd64/divrem_1.asm: Shave a cycle from fraction development code.
15699
15700 * mpn/powerpc32/lshift.asm: Add more cycle numbers.
15701 * mpn/powerpc32/rshift.asm: Likewise.
15702
15703 * mpn/ia64/addmul_1.asm: Reformat.
15704
15705 2004-05-21 Torbjorn Granlund <[email protected]>
15706
15707 * gmp-impl.h (mpn_mullow_n, mpn_mullow_basecase): Declare.
15708
15709 * tune/Makefile.am: Compile gcdext.c.
15710
15711 * gmp-impl.h (GET_STR_THRESHOLD_LIMIT): Lower outrageous value to 150.
15712 (GCDEXT_SCHOENHAGE_THRESHOLD): Set reasonable default. Override when
15713 TUNE_PROGRAM_BUILD.
15714 (GCDEXT_THRESHOLD): Remove.
15715
15716 * tune/tuneup.c (gcdext_schoenhage_threshold): New variable.
15717 (gcdext_threshold): Remove variable.
15718 (tune_gcd_schoenhage): Lower step_factor to 0.1.
15719 (tune_gcdext_schoenhage): New function, based on tune_gcd_schoenhage.
15720 (tune_gcdext): Remove function.
15721 (all): Corresponding changes.
15722
15723 2004-05-21 Niels Möller <[email protected]>
15724
15725 * mpn/generic/gcdext.c: Complete rewrite. Uses fast Lehmer code for
15726 small operands, and Schoenhage code for large operands.
15727
15728 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Ensure first operand is
15729 not smaller than 2nd operand.
15730
15731 2004-05-17 Kevin Ryde <[email protected]>
15732
15733 * gmp-h.in (mpz_get_ui): Use #if instead of plain if, and for nails
15734 use ?: same as normal case, to avoid warnings from Borland C++ 6.0.
15735 Reported by delta trinity.
15736
15737 2004-05-15 Kevin Ryde <[email protected]>
15738
15739 * tune/time.c (getrusage_backwards_p): New function
15740 (speed_time_init): Use it to exclude broken netbsd1.4.1 getrusage.
15741 * configure.in (m68*-*-netbsd1.4*): Remove code pretending getrusage
15742 doesn't exist.
15743 * tune/README (NetBSD 1.4.1 m68k): Update notes.
15744
15745 * configure.in (mips*-*-* ABI=n32): Remove gcc_n32_ldflags and
15746 cc_n32_ldflags, libtool knows to put the linker in n32 mode.
15747
15748 2004-05-15 Torbjorn Granlund <[email protected]>
15749
15750 * config.guess (powerpc*-*-*): Add more processor types to mfpvr code.
15751 * configure.in: Generalize powerpc subtype matching code.
15752
15753 * mpz/fac_ui.c: Misc cleanups, spelling corrections.
15754
15755 2004-05-14 Kevin Ryde <[email protected]>
15756
15757 * mpf/sub.c: When one operand cancels high limbs of the other, strip
15758 high zeros on the balance before truncating to destination precision.
15759 Truncating first loses accuracy and can lead to a result 0 despite
15760 operands being not equal. Reported by John Abbott.
15761 Also, ensure exponent is zero when result is zero, for instance if
15762 operands are exactly equal.
15763 * tests/mpf/t-sub.c (check_data): New function, exercising these.
15764
15765 2004-05-12 Kevin Ryde <[email protected]>
15766
15767 * configure.in (AC_PROG_RANLIB): New macro, supposedly required by
15768 automake, though it doesn't complain.
15769
15770 * demos/expr/Makefile.am (ARFLAGS): Add a default setting, to
15771 workaround an automake bug.
15772
15773 2004-05-10 Kevin Ryde <[email protected]>
15774
15775 * */Makefile.in, install-sh, aclocal.m4: Update to automake 1.8.4.
15776
15777 * doc/gmp.texi (Demonstration Programs): Add a remark about expression
15778 evaluation in the main gmp library.
15779
15780 * demos/expr/exprfa.c (mpf_expr_a): Correction to mpX_init, use
15781 mpf_init2 to follow requested precision.
15782 * demos/expr/exprza.c, demos/expr/exprqa.c: Use wrappers for mpX_init,
15783 to make parameters match.
15784
15785 * demos/expr/run-expr.c: Don't use getopt, to avoid needing configury
15786 for optarg declaration. Remove TRY macro, rename foo and bar to var_a
15787 and var_b, for clarity.
15788 * demos/expr/expr-impl.h: Don't use expr-config.h.
15789 * configure.in (demos/expr/expr-config.h): Remove.
15790 * demos/expr/expr-config.in: Remove file.
15791
15792 2004-05-08 Kevin Ryde <[email protected]>
15793
15794 * doc/configuration (Configure): Update for current automake not
15795 copying acinclude.m4 into aclocal.m4.
15796
15797 * configure.in, Makefile.am, doc/gmp.texi, doc/configuration,
15798 tests/cxx/Makefile.am, demos/expr/Makefile.am, demos/expr/README,
15799 demos/expr/expr.c, demos/expr/expr.h, demos/expr/expr-config-h.in,
15800 demos/expr/expr-impl.h, demos/expr/run-expr.c, demos/expr/t-expr.c:
15801 MPFR now published separately, remove various bits.
15802 * mpfr/*, tests/cxx/t-headfr.cc, demos/expr/exprfr.c,
15803 demos/expr/exprfra.c: Remove.
15804
15805 2004-05-07 Kevin Ryde <[email protected]>
15806
15807 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Amend c++ shared library
15808 path hack, on k62-unknown-dragonfly1.0 /usr/bin/make runs its commands
15809 "set -e", so we need an "|| true" in case there's nothing to copy (for
15810 instance in a static build).
15811
15812 2004-05-06 Kevin Ryde <[email protected]>
15813
15814 * mpn/alpha/mode1o.c: Remove, in favour of ...
15815 * mpn/alpha/mode1o.asm: New file.
15816 * mpn/alpha/alpha-defs.m4 (bwx_available_p): New macro.
15817
15818 * tune/amd64.asm: Save rbx in r10 rather than on the stack.
15819
15820 * configure.in (x86_64-*-*): Try also "-march=k8 -mno-sse2", in case
15821 we're in ABI=32 on an old OS not supporting xmm regs.
15822 (GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): Run these tests under
15823 -march=k8 too, and not under ABI=64.
15824
15825 * doc/gmp.texi (Converting Integers): For mpz_get_d, note truncation
15826 and overflows. For mpz_get_d_2exp note truncation, note result if
15827 OP==0, and cross reference libc frexp.
15828 (Rational Conversions): For mpq_get_d, note truncation and overflows.
15829 (Converting Floats): For mpf_get_d, note truncation and overflows.
15830 For mpf_get_d_2exp, note truncation, note result if OP==0.
15831 (Assembler Code Organisation): Note nails subdirectories.
15832 Clarification of get_d_2exp OP==0 reported by Sylvain Pion.
15833
15834 2004-05-05 Torbjorn Granlund <[email protected]>
15835
15836 * mpn/generic/mullow_n.c, mpn/generic/mullow_basecase.c: New files
15837 (mainly by Niels Möller).
15838 * configure.in, mpn/Makefile.am: Add them.
15839
15840 * gmp-impl.h (MULLOW_BASECASE_THRESHOLD, MULLOW_DC_THRESHOLD,
15841 MULLOW_MUL_N_THRESHOLD): Override for TUNE_PROGRAM_BUILD.
15842
15843 * tune/Makefile.am: Compile mullow_n.c.
15844 * tune/common.c (speed_mpn_mullow_n, speed_mpn_mullow_basecase):
15845 New functions.
15846 * tune/speed.c (routine): Add entries for mpn_mullow_n and
15847 mpn_mullow_basecase.
15848 * tune/speed.h (SPEED_ROUTINE_MPN_MULLOW_N_CALL,
15849 SPEED_ROUTINE_MPN_MULLOW_BASECASE): New #defines.
15850 * tune/tuneup.c (tune_mullow): New function.
15851
15852 * gmp-impl.h (invert_limb): Compute branch-freely.
15853
15854 2004-05-02 Kevin Ryde <[email protected]>
15855
15856 * mpn/amd64/mode1o.asm: Use movabsq to support large model non-PIC.
15857 Use 32-bit insns to save code bytes, and to save a couple of cycles on
15858 the initial setup multiplies.
15859
15860 2004-05-01 Kevin Ryde <[email protected]>
15861
15862 * doc/gmp.texi (References): Update gcc online docs url to
15863 gcc.gnu.org.
15864
15865 * configure.in (mips*-*-irix[6789]*): Correction to m4 quoting of this
15866 pattern. (Believe the mips64*-*-* part also used picks up all current
15867 irix6 tuples anyway.) Reported by Rainer Orth.
15868
15869 2004-04-30 Kevin Ryde <[email protected]>
15870
15871 * acinclude.m4 (GMP_PROG_CC_X86_GOT_EAX_EMITTED,
15872 GMP_ASM_X86_GOT_EAX_OK): New macros.
15873 (GMP_PROG_CC_WORKS): Use them to detect an old gas bug tickled by
15874 recent gcc. Reported by David Newman.
15875
15876 * doc/gmp.texi (Reentrancy): Note also gmp_randinit_default as an
15877 alternative to gmp_randinit.
15878
15879 2004-04-29 Torbjorn Granlund <[email protected]>
15880
15881 * configfsf.guess: Update to 2004-03-12.
15882 * configfsf.sub: Likewise.
15883
15884 2004-04-27 Torbjorn Granlund <[email protected]>
15885
15886 * mpz/rrandomb.c (gmp_rrandomb): Rework to avoid extra limb allocation
15887 and to generate even numbers.
15888 * mpn/generic/random2.c (gmp_rrandomb): Likewise.
15889
15890 2004-04-25 Kevin Ryde <[email protected]>
15891
15892 * gmp-impl.h (FORCE_DOUBLE): Don't use an asm with a match constraint
15893 on a memory output, apparently not supported and provokes a warning
15894 from gcc 3.4.
15895
15896 2004-04-24 Kevin Ryde <[email protected]>
15897
15898 * longlong.h (count_leading_zeros_gcc_clz,
15899 count_trailing_zeros_gcc_ctz): New macros.
15900 (count_leading_zeros, count_trailing_zeros) [x86]: Use them on gcc
15901 3.4.
15902
15903 * configure.in (x86-*-* gcc_cflags_cpu): Give a -mtune at the start of
15904 each option list, for use by gcc 3.4 to avoid deprecation warnings
15905 about -mcpu.
15906
15907 * mpz/aorsmul.c, mpz/aorsmul_i.c, mpz/cfdiv_q_2exp.c,
15908 mpz/cfdiv_r_2exp.c, mpq/aors.c, mpf/ceilfloor.c: Give REGPARM_ATTR()
15909 on function definition too, as demanded by gcc 3.4.
15910
15911 2004-04-22 Kevin Ryde <[email protected]>
15912
15913 * tests/rand/t-lc2exp.c (check_bigc1): New test.
15914
15915 * doc/fdl.texi: Tweak @appendixsubsec -> @appendixsec to match our
15916 preference for this in an @appendix, and because texi2pdf doesn't
15917 support @appendixsubsec directly within an @appendix.
15918
15919 2004-04-20 Kevin Ryde <[email protected]>
15920
15921 * doc/texinfo.tex: Update to 2004-04-07.08 from texinfo 4.7.
15922 * doc/gmp.texi, mpfr/mpfr.texi (@copying): Don't put a line break in
15923 @ref within @copying, recent texinfo.tex doesn't like that.
15924
15925 * demos/perl/GMP.xs (static_functable): Treat cygwin the same as mingw
15926 DLLs.
15927
15928 * */Makefile.in, install-sh: Update to automake 1.8.3.
15929 * ltmain.sh, aclocal.m4, configure: Update to libtool 1.5.6.
15930
15931 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): Use a compile-time constant
15932 expression, rather than a configure test.
15933 * acinclude.m4, configure.in (GMP_C_RIGHT_SHIFT): Remove, no longer
15934 needed.
15935 * tests/t-hightomask.c: New file.
15936 * tests/Makefile.am (check_PROGRAMS): Add it.
15937
15938 * macos/configure (parse_top_configure): Look for PACKAGE_NAME and
15939 PACKAGE_VERSION now used by autoconf.
15940 (what_objects): Only demand 9 object files, as for instance occurs in
15941 the scanf directory.
15942 (asm files): Transform labels L(foo) -> Lfoo. Take func name from
15943 PROLOGUE to support empty "EPILOGUE()". Recognise and substitute
15944 register name "define()"s.
15945 * macos/Makefile.in (CmnObjs): Add tal-notreent.o.
15946
15947 2004-04-19 Torbjorn Granlund <[email protected]>
15948
15949 * tune/speed.h (SPEED_ROUTINE_MPN_ROOTREM): New #define.
15950 (speed_mpn_rootrem): Declare.
15951 * tune/common.c (speed_mpn_rootrem): New function.
15952 * tune/speed.c (routine): Add entry for mpn_rootrem.
15953
15954 2004-04-16 Kevin Ryde <[email protected]>
15955
15956 * doc/fdl.texi: Update from FSF, just fixing a couple of typos.
15957
15958 * macos/configure, macos/Makefile.in: Add printf and scanf directories.
15959
15960 * tests/mpz/t-gcd.c (check_data): New function, exercising K6
15961 gcd_finda bug.
15962
15963 2004-04-14 Kevin Ryde <[email protected]>
15964
15965 * doc/gmp.texi (Reentrancy, Random State Initialization): Note
15966 gmp_randinit use of gmp_errno is not thread safe. Reported by Vincent
15967 Lefèvre.
15968
15969 * doc/gmp.texi (Random State Initialization): Add index entries for
15970 gmp_errno and constants.
15971
15972 * mpn/m68k/README: Update _SHORT_LIMB -> __GMP_SHORT_LIMB.
15973
15974 * configure.in (--enable-mpbsd): Typo Berkley -> Berkeley in help msg.
15975
15976 2004-04-12 Kevin Ryde <[email protected]>
15977
15978 * demos/perl/GMP.xs (static_functable): New macro, use it for all
15979 function tables, to support mingw DLL builds.
15980 * demos/perl/INSTALL (NOTES FOR PARTICULAR SYSTEMS): Remove note on
15981 DLLs, should be ok now.
15982
15983 * demos/perl/sample.pl: Print the module and library versions in use.
15984
15985 * demos/perl/GMP.pm, Makefile.PL (VERSION): Set to '2.00'.
15986 * demos/perl/GMP.pm (COPYRIGHT): New in the doc section.
15987
15988 * Makefile.am: Note 4.1.3 libtool versioning info, and REVISION policy.
15989
15990 * tal-debug.c: Add <stdlib.h> for abort.
15991
15992 2004-04-07 Torbjorn Granlund <[email protected]>
15993
15994 * tests/refmpf.c (refmpf_add_ulp): Adjust exponent when needed.
15995
15996 * mpn/generic/random2.c: Rewrite (clone mpz/rrandomb.c).
15997
15998 2004-04-07 Kevin Ryde <[email protected]>
15999
16000 * mpn/x86/k6/gcd_finda.asm: Correction jbe -> jb in initial setups.
16001 Zero flag is wrong here, it relects only the high limb of the compare,
16002 leading to n1>=n2 not satisfied and wrong results. cp[1]==0x7FFFFFFF
16003 with cp[0]>=0x80000001 provokes this.
16004
16005 * doc/gmp.texi (BSD Compatible Functions): Note "pow" name clash under
16006 the pow function description too.
16007 (Language Bindings): Add XEmacs (betas at this stage). Reported by
16008 Jerry James.
16009
16010 * tests/refmpn.c (refmpn_mod2): Correction to ASSERTs, r==a is allowed.
16011
16012 * gen-psqr.c (generate_mod): Cast mpz_invert_ui_2exp args, for K&R.
16013 * gen-bases.c, gen-fib.c, gen-psqr.c: For mpz_out_str, use stdout
16014 instead of 0, in case a K&R treats int and FILE* params differently.
16015
16016 2004-04-04 Kevin Ryde <[email protected]>
16017
16018 * gmp-impl.h (BSWAP_LIMB) [amd64]: New macro.
16019 (FORCE_DOUBLE): Use this for amd64 too.
16020
16021 * tests/amd64check.c, tests/amd64call.asm: New files, derived in part
16022 from x86check.c and x86call.asm.
16023 * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add them.
16024 * configure.in (x86_64-*-* ABI=64): Use them.
16025
16026 2004-04-03 Kevin Ryde <[email protected]>
16027
16028 * mpn/amd64/mode1o.asm: New file.
16029 * mpn/amd64/amd64-defs.m4 (ASSERT): New macro.
16030
16031 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/pentium4/sse2/divrem_1.asm: Add
16032 note on how "dr" part of algorithm is handled.
16033
16034 * mpn/x86/k7/dive_1.asm, mpn/x86/k7/mod_34lsub1.asm,
16035 mpn/x86/k7/mode1o.asm: Note Hammer (32-bit mode) speeds.
16036
16037 2004-03-31 Kevin Ryde <[email protected]>
16038
16039 * doc/gmp.texi (Language Bindings): Add GOO, MLGMP and Numerix.
16040
16041 * mpf/mul_2exp.c, mpf/div_2exp.c: Rate u==0 as UNLIKELY.
16042
16043 2004-03-28 Torbjorn Granlund <[email protected]>
16044
16045 * mpn/amd64/divrem_1.asm: Trim a few cycles.
16046
16047 2004-03-27 Torbjorn Granlund <[email protected]>
16048
16049 * mpn/amd64/sublsh1_n.asm: Fix typo.
16050
16051 * mpn/generic/divrem_1.c: Fix typo.
16052
16053 * mpn/generic/sqr_basecase.c: Fix typo.
16054
16055 * mpn/amd64/divrem_1.asm: New file.
16056
16057 2004-03-20 Kevin Ryde <[email protected]>
16058
16059 * longlong.h (power, powerpc): Add comments on how we select this code.
16060
16061 * gmp-h.in (mpz_get_ui): Use ?: instead of mask style, gcc treats the
16062 two identically but ?: is a bit clearer.
16063
16064 * insert-dbl.c: Remove file, no longer used, scaling is now integrated
16065 in mpn_get_d.
16066 * Makefile.am (libgmp_la_SOURCES): Remove insert-dbl.c.
16067 * gmp-impl.h (__gmp_scale2): Remove prototype.
16068
16069 2004-03-17 Kevin Ryde <[email protected]>
16070
16071 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init, fake_cpuid_table): Add x86_64.
16072
16073 * mpq/get_d.c: Use mpn_tdiv_qr, demand den>0 per canonical form.
16074
16075 2004-03-16 Torbjorn Granlund <[email protected]>
16076
16077 * mpn/generic/sqr_basecase.c: Add versions using mpn_addmul_2 and
16078 mpn_addmul_2s.
16079
16080 2004-03-14 Kevin Ryde <[email protected]>
16081
16082 * mpf/mul_ui.c: Incorporate carry from low limbs, for exactness.
16083 * tests/mpf/t-mul_ui.c: New file.
16084 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16085
16086 * mpf/div.c: Use mpn_tdiv_qr. Use just one TMP_ALLOC. Use full
16087 divisor, since truncating can lose accuracy.
16088 * tests/mpf/t-div.c: New file.
16089 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16090
16091 * tests/mpf/t-set_q.c, tests/mpf/t-ui_div.c (check_various): Amend
16092 bogus 99/4 test.
16093 * tests/mpf/t-ui_div.c (check_rand): Exercise r==v overlap.
16094
16095 * tests/refmpf.c, tests/tests.h (refmpf_set_overlap): New function.
16096
16097 * mpf/cmp_si.c [nails]: Correction, cast vval in exp comparisons, for
16098 when vval=-0x800..00 and limb==longlong.
16099
16100 * mpf/cmp_si.c [nails]: Correction, return usign instead of 1 when
16101 uexp==2 but value bigger than an mp_limb_t.
16102 * tests/mpf/t-cmp_si.c (check_data): Add test cases.
16103
16104 * tests/trace.c (mpf_trace): Use ABS(mp_trace_base) to allow for
16105 negative bases used for upper case hex in integer traces.
16106
16107 2004-03-12 Torbjorn Granlund <[email protected]>
16108
16109 * mpn/generic/sb_divrem_mn.c: Correct header comment.
16110
16111 2004-03-11 Kevin Ryde <[email protected]>
16112
16113 * aclocal.m4, configure, ltmain.sh: Downgrade to libtool 1.5, version
16114 1.5.2 doesn't remove .libs/*.a files when rebuilding, which is bad for
16115 development when changing contents or with duplicate named files like
16116 we have.
16117
16118 Revert this, ie restore AR_FLAGS=cq:
16119 * acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
16120 does this itself on detecting duplicate object filenames in piecewise
16121 linking mode.
16122
16123 * randbui.c, randmui.c [longlong+nails]: Correction to conditionals
16124 for second limb.
16125
16126 * mpz/aors_ui.h, mpz/cdiv_q_ui.c, mpz/cdiv_qr_ui.c, mpz/cdiv_r_ui.c,
16127 mpz/cdiv_ui.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr_ui.c, mpz/fdiv_r_ui.c,
16128 mpz/fdiv_ui.c, mpz/gcd_ui.c, mpz/iset_ui.c, mpz/lcm_ui.c,
16129 mpz/set_ui.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr_ui.c, mpz/tdiv_r_ui.c,
16130 mpz/tdiv_ui.c, mpz/ui_sub.c, mpf/div_ui.c, mpf/mul_ui.c
16131 [longlong+nails]: Amend #if to avoid warnings about shift amount.
16132
16133 2004-03-07 Kevin Ryde <[email protected]>
16134
16135 * mpf/reldiff.c: Use rprec+ysize limbs for d, to ensure accurate
16136 result. Inline mpf_abs(d,d) and mpf_cmp_ui(x,0), and rate the latter
16137 UNLIKELY.
16138
16139 * mpf/ui_div.c: Use mpn_tdiv_qr. Use just one TMP_ALLOC. Use full
16140 divisor, since truncating can lose accuracy.
16141 * tests/mpf/t-ui_div.c: New file.
16142 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16143
16144 * mpf/set_q.c: Expand TMP_ALLOC_LIMBS_2, to make conditional clearer
16145 and avoid 1 limb alloc when not wanted.
16146
16147 * gmp-impl.h (WANT_TMP_DEBUG): Define to 0 if not defined.
16148 (TMP_ALLOC_LIMBS_2): Use "if" within macro rather than "#if", for less
16149 preprocessor conditionals.
16150
16151 * mpf/mul_2exp.c, mpf/div_2exp.c: Add some comments.
16152
16153 * tests/refmpn.c (refmpn_sb_divrem_mn, refmpn_tdiv_qr): Nailify.
16154
16155 2004-03-04 Kevin Ryde <[email protected]>
16156
16157 * gen-psqr.c (print): Add CNST_LIMB in PERFSQR_MOD_TEST, for benefit
16158 of K&R.
16159 * tests/mpn/t-perfsqr.c (PERFSQR_MOD_1): Use CNST_LIMB for K&R.
16160
16161 * doc/configuration (Configure): Remove mkinstalldirs, no longer used.
16162
16163 * acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
16164 does this itself on detecting duplicate object filenames in piecewise
16165 linking mode.
16166
16167 * configure.in (hppa2.0*-*-*): Test sizeof(long) == 4 or 8 to verify
16168 ABI=2.0n versus ABI=2.0w. In particular this lets CC=cc_bundled
16169 correctly fall back to ABI=2.0n (we don't automatically add CC=+DD64
16170 to that compiler, currently).
16171
16172 * doc/gmp.texi (Reentrancy): Note C++ mpf_class constructors using
16173 global default precision.
16174 (Random State Miscellaneous): Describe gmp_urandomb_ui as giving N
16175 bits.
16176 (C++ Interface Floats): Describe operator= copying the value, not the
16177 precision, and what this can mean about copy constructor versus
16178 default constructor plus assignment.
16179
16180 * mpf/set_q.c: Use mpn_tdiv_qr rather than mpn_divrem, so no shifting.
16181 Don't truncate the divisor, it can make the result inaccurate.
16182 * tests/mpf/t-set_q.c: New file.
16183 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16184
16185 * mpf/set.c: Use MPN_COPY_INCR, in case r==u and ABSIZ(u) > PREC(r)+1.
16186 No actual bug here, because MPN_COPY has thusfar been an alias for
16187 MPN_COPY_INCR, only an ASSERT failure.
16188 * tests/mpf/t-set.c: New file.
16189 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16190
16191 * mpf/set.c, mpf/iset.c: Do MPN_COPY last, for possible tail call.
16192
16193 * mpf/set_d.c: Rate d==0 as UNLIKELY. Store size before extract call,
16194 to shorten lifespan of "negative".
16195
16196 * mpf/init.c, mpf/init2.c, mpf/iset_d.c, mpf/iset_si.c,
16197 mpf/iset_str.c, mpf/iset_ui.c: Store prec before alloc call, for one
16198 less live quantity across that call.
16199 * mpf/init.c, mpf/init2.c, mpf/iset_str.c: Store size and exp before
16200 alloc call, to overlap with other operations.
16201
16202 * tests/refmpf.c, tests/tests.h (refmpf_fill, refmpf_normalize,
16203 refmpf_validate, refmpf_validate_division): New functions.
16204
16205 * tests/refmpn.c, tests/tests.h (refmpn_copy_extend,
16206 refmpn_lshift_or_copy_any, refmpn_rshift_or_copy_any): New functions.
16207
16208 * tal-debug.c: Add <string.h> for strcmp.
16209
16210 * tests/cxx/t-istream.cc (check_mpz, check_mpq, check_mpf): Use size_t
16211 for loop index, to quieten g++ warning.
16212
16213 2004-03-02 Kevin Ryde <[email protected]>
16214
16215 * tests/mpn/t-hgcd.c: Use __GMP_PROTO on prototypes.
16216
16217 2004-03-01 Torbjorn Granlund <[email protected]>
16218
16219 With Karl Hasselström:
16220 * mpn/generic/dc_divrem_n.c (mpn_dc_div_2_by_1): New function, with
16221 meat from old mpn_dc_divrem_n. Accept scratch parameter. Rewrite to
16222 avoid a recursive call.
16223 (mpn_dc_div_3_by_2): New function, with meat from old
16224 mpn_dc_div_3_halves_by_2. Accept scratch parameter.
16225 (mpn_dc_divrem_n): Now just allocate scratch space and call new
16226 mpn_dc_div_2_by_1.
16227
16228 2004-02-29 Kevin Ryde <[email protected]>
16229
16230 * longlong.h (count_leading_zeros) [alpha gcc]: New version, inlining
16231 mpn/alpha/cntlz.asm cmpbge technique.
16232
16233 * aclocal.m4, configure, install-sh, missing, ltmain.sh,
16234 */Makefile.in: Update to automake 1.8.2 and libtool 1.5.2.
16235
16236 * doc/gmp.texi (C++ Interface Integers): Note / and % rounding follows
16237 C99 / and %.
16238 (Exact Remainder): Index entries for divisibility testing algorithm.
16239
16240 * tune/time.c (speed_endtime): Return 0.0 for negative time measured.
16241 Revise usage comments for clarity.
16242 * tune/common.c (speed_measure): Recognise speed_endtime 0.0 for
16243 failed measurement.
16244
16245 * tests/mpn/t-get_d.c (check_rand): Correction to nhigh_mask setup.
16246
16247 2004-02-27 Torbjorn Granlund <[email protected]>
16248
16249 * tune/tuneup.c (tune_dc, tune_set_str): Up param.step_factor.
16250
16251 * tests/mpz/t-gcd.c: Decrease # of tests to 50.
16252
16253 2004-02-27 Kevin Ryde <[email protected]>
16254
16255 * tests/devel/try.c: Add a comment that this is not for Cray systems.
16256
16257 * mpf/set_q.c: Don't support den(q)<0, demand canonical form in the
16258 usual way.
16259
16260 2004-02-24 Torbjorn Granlund <[email protected]>
16261
16262 From Kevin:
16263 * mpn/generic/mul_fft.c (mpn_fft_add_modF): Loop until normalization
16264 criterion met.
16265
16266 2004-02-22 Kevin Ryde <[email protected]>
16267
16268 * acinclude.m4 (GMP_PROG_CC_WORKS, GMP_OS_X86_XMM, GMP_PROG_CXX_WORKS):
16269 Remove files that might look like compiler output, so our "||"
16270 alternatives are not fooled.
16271
16272 * acinclude.m4 (GMP_PROG_CC_WORKS): Add test for lshift_com code
16273 mis-compiled by certain IA-64 HP cc at +O3.
16274
16275 * gmp-impl.h (USE_LEADING_REGPARM): Disable under prof or gprof, for
16276 the benefit of freebsd where .mcount clobbers registers. Spotted by
16277 Torbjorn.
16278 * configure.in (WANT_PROFILING_PROF, WANT_PROFILING_GPROF): New
16279 AC_DEFINEs.
16280
16281 2004-02-21 Kevin Ryde <[email protected]>
16282
16283 * configure.in (sparc64-*-*bsd*): Amend -m32 setup for ABI=32, so it's
16284 not used in ABI=64 on the BSD systems.
16285
16286 2004-02-18 Niels Möller <[email protected]>
16287
16288 * tests/mpz/t-gcd.c (gcdext_valid_p): New function.
16289 (ref_mpz_gcd): Deleted function.
16290 (one_test): Rearranged to call mpz_gcdext first, so that the
16291 returned value can be validated.
16292 (main): Don't use ref_mpz_gcd.
16293
16294 2004-02-18 Torbjorn Granlund <[email protected]>
16295
16296 * gmp-impl.h (MPN_TOOM3_MAX_N): Move to !WANT_FFT section.
16297
16298 * tests/mpz/t-mul.c: Exclude special huge operands unless WANT_FFT.
16299
16300 * mpz/rrandomb.c (gmp_rrandomb): Rewrite.
16301
16302 * mpn/generic/mul_n.c (mpn_toom3_sqr_n): Remove write-only variable c5.
16303
16304 2004-02-18 Kevin Ryde <[email protected]>
16305
16306 * mpf/iset_si.c, mpf/iset_ui.c, mpf/set_si.c, mpf/set_ui.c [nails]:
16307 Always store second limb, to avoid a conditional.
16308
16309 * tests/mpf/t-get_ui.c: New file.
16310 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16311 * tests/mpf/t-get_si.c (check_limbdata): Further tests.
16312 * gmp-impl.h (MP_EXP_T_MAX, MP_EXP_T_MIN): New defines.
16313
16314 * mpf/get_ui.c, mpf/get_si.c: Remove size==0 test, it's covered by
16315 other conditions. Attempt greater clarity by expressing conditions as
16316 based on available data range.
16317 * mpf/get_si.c [nails]: Correction, don't bail on exp > abs_size,
16318 since may still have second limb above radix point available.
16319 * mpf/get_ui.c: Nailify.
16320
16321 2004-02-16 Kevin Ryde <[email protected]>
16322
16323 * mpz/scan0.c, mpz/scan1.c: Use count_trailing_zeros, instead of
16324 count_leading_zeros on limb&-limb.
16325
16326 * mpf/sqrt.c: Use "/ 2" for exp, avoiding C undefined behaviour on
16327 ">>" of negatives. Correction to comment, exp is rounded upwards.
16328 SIZ(r) always prec now, no need for tsize expression. Store EXP(r)
16329 and SIZ(r) where calculated to reduce variable lifespans. Make tsize
16330 mp_size_t not mp_exp_t, though of course those are currently the same.
16331
16332 * gmp-h.in (GMP_ERROR_ALLOCATE, GMP_ERROR_BAD_STRING,
16333 GMP_ERROR_UNUSED_ERROR): Remove, never used or documented, and we
16334 don't want to use globals for communicating error information.
16335
16336 * mpz/gcd_ui.c [nails]: Correction, actually return a value.
16337
16338 * mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails==1]: Add code.
16339
16340 2004-02-15 Kevin Ryde <[email protected]>
16341
16342 * tests/mpz/t-jac.c (check_data): Remove unnecessary variable
16343 "answer".
16344
16345 2004-02-14 Torbjorn Granlund <[email protected]>
16346
16347 * mpn/ia64/aors_n.asm: Break a group with a RAW conflict.
16348
16349 2004-02-14 Kevin Ryde <[email protected]>
16350
16351 * acinclude.m4 (GMP_C_RIGHT_SHIFT): Note that it's "long"s which we're
16352 concerned about.
16353
16354 * mpn/generic/mul_n.c: Add some remarks about toom3 high zero
16355 stripping.
16356
16357 * mpn/generic/scan0.c, mpn/generic/scan1.c: Remove design issue
16358 remarks. What to do about going outside `up' space is a problem, but
16359 anything to address it would be an incompatible change.
16360
16361 2004-02-12 Torbjorn Granlund <[email protected]>
16362
16363 * tests/mpn/t-hgcd.c: Remove unused variables.
16364
16365 * mpn/ia64/hamdist.asm: Remove bundling incompatible with HP-UX
16366 assembler. Misc HP-UX changes.
16367 * mpn/ia64/gcd_1.asm: Add some syntax to placid the HP-UX assembler.
16368
16369 2004-02-11 Kevin Ryde <[email protected]>
16370
16371 * longlong.h (power, powerpc): Use HAVE_HOST_CPU_FAMILY_power and
16372 HAVE_HOST_CPU_FAMILY_powerpc rather than various cpp defines.
16373
16374 * gmp-impl.h: Add remarks about limits.h and Cray etc.
16375
16376 * mpn/ia64/mul_1.asm: Don't put .pred directives on labelled lines,
16377 hpux 11.23 assembler doesn't like that.
16378 * mpn/ia64/README: Add a note on this.
16379
16380 * dumbmp.c (mpz_mul): Set ALLOC(r) for new data block used. Reported
16381 by Jason Moxham.
16382
16383 * mpn/pa32/README, mpn/pa64/README (REFERENCES): New sections.
16384
16385 2004-02-10 Torbjorn Granlund <[email protected]>
16386
16387 * tests/mpz/t-gcd.c: Decrease # of tests run.
16388
16389 * mpn/*/gmp-mparam.h: Add HGCD values, update TOOM values.
16390
16391 2004-02-01 Torbjorn Granlund <[email protected]>
16392
16393 From Kevin:
16394 * config.guess: Recognize AMD's hammer processors, return x86_64.
16395
16396 2004-01-31 Niels Möller <[email protected]>
16397
16398 * mpn/generic/hgcd.c (mpn_cmp_sum3): Declare static.
16399
16400 2004-01-25 Niels Möller <[email protected]>
16401
16402 * tests/mpn/Makefile.am (check_PROGRAMS): Add t-hgcd.
16403
16404 * mpn/generic/hgcd.c (hgcd_jebelean): Simplify, use mpn_cmp_sum3.
16405 (mpn_cmp_sum3): New function.
16406 (mpn_diff_smaller_p): Remove.
16407 (hgcd_final, hgcd_jebelean, hgcd_small_1, hgcd_small_2, euclid_step):
16408 Remove tp,talloc arguments. Callers changed.
16409
16410 2004-01-25 Torbjorn Granlund <[email protected]>
16411
16412 * tune/tuneup.c (all): Reenable calls of tune_gcd_schoenhage and
16413 tune_hgcd.
16414
16415 * mpn/generic/gcd.c: Reenable Schoenhage code.
16416
16417 With Niels Möller:
16418 * mpn/generic/hgcd.c: Add const and inline to several functions.
16419 (qstack_push_start qstack_push_end qstack_push_quotient): Remove.
16420 (euclid_step): Insert removed functions here.
16421 (hgcd_adjust): Simplify, don't handle d != 1.
16422 (qstack_adjust): Corresponding changes.
16423 (mpn_hgcd2_lehmer_step): Remove redundant tests for bh against zero.
16424 (hgcd_start_row_p): Tweak.
16425 (hgcd_final): Shorten life of ralloc.
16426
16427 2004-01-24 Kevin Ryde <[email protected]>
16428
16429 * tests/mpf/t-sqrt.c (check_rand1): Further diagnostic printouts.
16430
16431 * mpn/generic/sqrtrem.c (mpn_sqrtrem): Add ASSERT_MPN.
16432 (mpn_dc_sqrtrem): Add casts for K&R.
16433
16434 * mpf/sqrt_ui.c: Nailify.
16435
16436 * mpf/set_z.c: Do MPN_COPY last, for possible tail call.
16437
16438 * doc/gmp.texi (Miscellaneous Float Functions): For mpf_random2, note
16439 exponent is in limbs.
16440
16441 * mpn/ia64/README: Add remark about concentrating on itanium-2.
16442
16443 2004-01-22 Kevin Ryde <[email protected]>
16444
16445 * mpf/sqrt.c: Change tsize calculation to get prec limbs result
16446 always, previously got prec+1 when exp was odd.
16447 * tests/mpf/t-sqrt.c (check_rand1): New function, code from main.
16448 (check_rand2): New function.
16449
16450 * mpf/sqrt_ui.c: Change rsize calculation to get prec limbs result,
16451 previously got prec+1.
16452 * tests/mpf/t-sqrt_ui.c: New file.
16453 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
16454
16455 * tests/refmpf.c, tests/tests.h (refmpf_add_ulp,
16456 refmpf_set_prec_limbs): New functions.
16457
16458 * mpz/get_d_2exp.c, mpf/get_d_2exp.c: Remove x86+m68k force to double,
16459 mpn_get_d now does this. Remove res==1.0 check for round upwards,
16460 mpn_get_d now rounds towards zero. Move exp store to make mpn_get_d a
16461 tail call.
16462
16463 * configure.in (x86-*-*): Use ABI=32 rather than ABI=standard.
16464 Use gcc -m32 when available, to force mode on bi-arch amd64 gcc.
16465 * configure.in, acinclude.m4 (x86_64-*-*): Merge into plain x86 setups
16466 as ABI=64. Support ABI=32, using athlon code. Use gcc -mcpu=k8,
16467 -march=k8.
16468 (amd64-*-*): Remove pattern, config.sub only gives x86_64.
16469 * doc/gmp.texi (ABI and ISA): Add x86_64 dual ABIs.
16470
16471 * mpn/amd64/README: Add reference to ABI spec.
16472
16473 2004-01-17 Niels Möller <[email protected]>
16474
16475 * mpn/generic/hgcd.c (hgcd_adjust): Backed out mpn_addlsh1_n
16476 change for now.
16477
16478 * mpn/generic/hgcd.c (hgcd_adjust): Fixed calls of mpn_addlsh1_n.
16479
16480 2004-01-17 Kevin Ryde <[email protected]>
16481
16482 * tune/README: Remove open/mpn versions of toom3, no longer exist.
16483 * tune/powerpc64.asm: Remove unused L(again).
16484 * tune/time.c (mftb): Note single mftb possible for powerpc64.
16485
16486 * mpn/generic/mode1o.c: Use "c<s" to do underflow detection in last
16487 step, for better parallelism.
16488
16489 * mpn/generic/get_d.c: Preserve comments about hppa fcnv,udw,dbl from
16490 previous mpz_get_d code.
16491
16492 * tune/freq.c: Add some comments about systems not covered.
16493
16494 * gmp-h.in (_GMP_H_HAVE_FILE): Add _MSL_STDIO_H for Metrowerks.
16495 Reported by Tomas Zahradnicky.
16496
16497 2004-01-16 Niels Möller <[email protected]>
16498
16499 * mpn/generic/hgcd.c (mpn_diff_smaller_p): Use MPN_DECR_U.
16500 (hgcd_adjust): Use mpn_addlsh1_n when available.
16501
16502 2004-01-16 Kevin Ryde <[email protected]>
16503
16504 * configure.in (powerpc64-*-linux*): Try gcc64. Try -m64 with
16505 "cflags_maybe" to get it used in all probing. Add sizeof-long-8 test
16506 to check the mode is right if -m64 is not applicable.
16507
16508 2004-01-15 Kevin Ryde <[email protected]>
16509
16510 * configure.in (--with-readline=detect): Check for readline/readline.h
16511 and readline/history.h. Report result of detection.
16512
16513 2004-01-14 Niels Möller <[email protected]>
16514
16515 * tune/speed.c (routine): Disabled speed_mpn_hgcd_lehmer.
16516 * tune/common.c (speed_mpn_hgcd_lehmer): Disabled function.
16517
16518 * mpn/generic/hgcd.c (mpn_hgcd_lehmer_itch, mpn_hgcd_lehmer)
16519 (mpn_hgcd_equal): Deleted functions.
16520
16521 * mpn/generic/gcd.c (hgcd_start_row_p): Deleted function.
16522 (gcd_schoenhage): Deleted assertion code using mpn_hgcd_lehmer.
16523
16524 * mpn/generic/hgcd.c (hgcd_final): Fixed ASSERT typos.
16525 (mpn_hgcd): To use Lehmer's algorithm, call hgcd_final directly,
16526 not mpn_hgcd_lehmer.
16527
16528 * mpn/generic/gcd.c (gcd_schoenhage): Updated for changes to
16529 mpn_hgcd and mpn_hgcd_fix. (Schoenhage code is still disabled).
16530
16531 * gmp-impl.h (mpn_hgcd_fix): Updated prototype.
16532
16533 * mpn/generic/hgcd.c (mpn_hgcd_fix): Replaced a bunch of arguments
16534 by a pointer const struct hgcd_row *s. Updated callers.
16535
16536 * mpn/generic/hgcd.c (hgcd_start_row_p): Use const for the input.
16537 Moved function definition before hgcd_jebelean.
16538 (hgcd_jebelean): Interface change, analogous to hgcd2.
16539 (mpn_hgcd_fix): Normalize v. Require that v > 0.
16540 (hgcd_adjust): Fix bug in carry update.
16541 (mpn_hgcd): Reorganized again, to adapt to mpn_hgcd/hgcd_jebelean
16542 now sometimes returning 1. Reintroduced hgcd_adjust.
16543
16544 * mpn/generic/hgcd.c (hgcd_final): Streamlined logic for the first
16545 hgcd2 call.
16546
16547 * mpn/generic/hgcd2.c (mpn_hgcd2): Interface change. Return 1
16548 instead of 2, in the no progress case r0=A, r1=B.
16549
16550 * mpn/generic/hgcd.c (hgcd_adjust): Changed arguments and return
16551 value. Now takes a struct hgcd_row * and the uv size, and returns
16552 updated uvsize.
16553 (hgcd_final): Special handling of the case hgcd2 returning 1. Now
16554 uses hgcd_adjust, instead of a full Euclid division.
16555
16556 2004-01-13 Niels Möller <[email protected]>
16557
16558 * mpn/generic/hgcd.c (euclid_step, hgcd_case0): Merged into a
16559 single function euclid_step.
16560 (mpn_hgcd): Reorganized the logic for the second recursive call.
16561 Avoid unnecessary Euclid steps.
16562
16563 * tests/mpn/t-hgcd.c (hgcd_values): One more test value.
16564
16565 * tests/mpn/t-hgcd.c (hgcd_values): Added values that trigged the
16566 hgcd_jebelean bug.
16567
16568 * mpn/generic/hgcd.c (hgcd_jebelean): Fixed off by one error.
16569 (mpn_hgcd): Simplified the logic for the first recursive call. Now
16570 it uses only the correct values from the recursive call, and
16571 doesn't do tricks with hgcd_adjust (hgcd_adjust will probably be
16572 reintroduced later, though).
16573
16574 * tests/mpn/t-hgcd.c (mpz_mpn_equal, hgcd_ref_equal)
16575 (hgcd_ref_init, hgcd_ref_clear): New functions.
16576 (hgcd_ref): Reference implementation of hgcd, using mpz.
16577 (one_test): Use hgcd_ref. Don't use mpn_hgcd_lehmer.
16578 (main): Skip one_step if both input values are zero.
16579
16580 2004-01-12 Niels Möller <[email protected]>
16581
16582 * mpn/generic/hgcd.c (hgcd_final): Rewritten, now uses Lehmer
16583 steps instead of a division loop.
16584 (mpn_hgcd_lehmer): Deleted old Lehmer code, instead just
16585 initialize and then call hgcd_final.
16586
16587 * tests/tests.h: Added refmpn_free_limbs prototype.
16588 * tests/refmpn.c (refmpn_free_limbs): New function.
16589
16590 * tests/mpn/t-hgcd.c: Try the same kind of random inputs as for
16591 mpz/t-gcd.
16592
16593 2004-01-11 Niels Möller <[email protected]>
16594
16595 * mpn/generic/hgcd.c (mpn_hgcd_lehmer): Rewritten, after some more
16596 analysis of the size reduction for one Lehmer step.
16597
16598 * tests/mpn/t-hgcd.c: New file.
16599
16600 2004-01-11 Torbjorn Granlund <[email protected]>
16601
16602 With Niels Möller:
16603 * mpn/generic/hgcd.c (hgcd_normalize): Fix ASSERTs.
16604 (hgcd_mul): Normalize R[1].uvp[1]. Add some more ASSERTs.
16605 (hgcd_update_uv): Streamline. ASSERT that input and output is
16606 normalized.
16607
16608 2004-01-11 Kevin Ryde <[email protected]>
16609
16610 * mpn/alpha/ev6/slot.pl: New file, derived in part from
16611 mpn/x86/k6/cross.pl.
16612
16613 * mpn/alpha/alpha-defs.m4 (ASSERT): New macro.
16614
16615 * mpn/asm-defs.m4 (m4_ifdef): New macro, avoiding OSF 4.0 m4 bug.
16616 (m4_assert_defined): Use it.
16617
16618 * mpn/alpha/default.m4, mpn/alpha/unicos.m4 (LDGP): New macro.
16619 * mpn/alpha/ev67/gcd_1.asm: Use it to re-establish gp after jsr.
16620
16621 * configure.in, demos/calc/Makefile.am: Use -lcurses or -lncurses with
16622 readline, when available.
16623
16624 * longlong.h (sub_ddmmss) [generic]: Use al<bl for the borrow rather
16625 than __x>al, since the former can be done without waiting for __x,
16626 helping superscalar chips, in particular alpha ev5 and ev6.
16627
16628 * longlong.h (sub_ddmmss) [ia64]: New macro.
16629
16630 * tests/t-sub.c: New file.
16631 * tests/Makefile.am (check_PROGRAMS): Add it.
16632 * tests/refmpn.c, tests/tests.h (refmpn_sub_ddmmss): New function.
16633
16634 2004-01-09 Kevin Ryde <[email protected]>
16635
16636 * mpn/x86/p6/mod_34lsub1.asm: New file, derived in part from
16637 mpn/x86/mod_34lsub1.asm.
16638
16639 * configure.in (IA64_PATTERN): Use -mtune on gcc 3.4.
16640
16641 2004-01-07 Kevin Ryde <[email protected]>
16642
16643 * gmp-h.in, mp-h.in (__GMP_SHORT_LIMB): Renamed from _SHORT_LIMB, to
16644 keep in our namespace. (Not actually used anywhere currently.)
16645 Reported by Patrick Pelissier.
16646
16647 * mp-h.in: Use "! defined (__GMP_WITHIN_CONFIGURE)" in the same style
16648 as gmp-h.in (though mp-h.in is not actually used during configure).
16649
16650 * mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
16651 Use __dllexport__ and __dllimport__ to keep out of application
16652 namespace. Same previously done in gmp-h.in.
16653
16654 2004-01-06 Kevin Ryde <[email protected]>
16655
16656 * configfsf.sub, configfsf.guess: Update to 2004-01-05.
16657 * configure.in (amd64-*-* | x86_64-*-*): Update comments on what
16658 configfsf.sub does.
16659
16660 2004-01-04 Kevin Ryde <[email protected]>
16661
16662 * mpn/alpha/README (REFERENCES): Add tru64 assembly manuals.
16663 (ASSEMBLY RULES): Note what gcc says about !literal! etc.
16664
16665 2004-01-03 Kevin Ryde <[email protected]>
16666
16667 * mpn/alpha/ev67/gcd_1.asm: New file.
16668
16669 * mpn/x86/pentium4/sse2/rsh1add_n.asm: New file, derived in part from
16670 mpn/x86/pentium4/sse2/addlsh1_n.asm.
16671
16672 * mpn/x86/p6/p3mmx/popham.asm: Note measured speeds.
16673
16674 * mpn/ia64/hamdist.asm: Correction to inputs vs locals in alloc (makes
16675 no difference to the generated code). Corrections to a couple of
16676 comments.
16677
16678 * mpn/x86/pentium4/sse2/addlsh1_n.asm (PARAM_CARRY): Remove macro, not
16679 used, no such parameter.
16680
16681 * mpn/generic/gcd.c: Use <stdio.h> for NULL.
16682
16683 * doc/gmp.texi (Single Limb Division): Correction to tex expression
16684 for (1/2)x1. And minor wording tweaks elsewhere.
16685
16686 * gmp-impl.h (mpn_rsh1add_n, mpn_rsh1sub_n): Correction to comments
16687 about how carries returned.
16688
16689 * longlong.h (umul_ppmm) [generic]: Add comments about squaring
16690 (dropped from tasks list)
16691
16692 2003-12-31 Kevin Ryde <[email protected]>
16693
16694 * demos/perl/GMP.xs (scan0, scan1): Return ~0 for not-found.
16695 * demos/perl/GMP.pm: Describe this, remove the note about ULONG_MAX
16696 being the same as ~0 (which is not true in old perl).
16697 * demos/perl/test.pl: Update tests.
16698 * demos/perl/typemap (gmp_UV): New type.
16699
16700 * demos/perl/test.pl (fits_slong_p): Comment out uv_max test, it won't
16701 necessarily exceed a long.
16702
16703 * demos/perl/GMP.pm: Add a remark about get_str to the bugs section.
16704
16705 * mpn/generic/sqrtrem.c, mpz/fac_ui.c, tests/mpf/reuse.c: Add casts
16706 for K&R.
16707 * tests/mpf/t-muldiv.c: Make ulimb, vlimb into ulongs, which is how
16708 they're used, for the benefit of K&R calling.
16709
16710 * doc/gmp.texi (Square Root Algorithm): Add a summary of the algorithm.
16711 And add further index entries in various places.
16712
16713 * mpz/lucnum_ui.c, mpz/lucnum2_ui.c: Use mpn_addlsh1_n when available.
16714
16715 * gmp-impl.h, mpn/generic/mul_n.c (mpn_addlsh1_n, mpn_sublsh1_n,
16716 mpn_rsh1add_n, mpn_rsh1sub_n): Move descriptions to gmp-impl.h with
16717 the prototypes, for ease of locating.
16718
16719 2003-12-30 Torbjorn Granlund <[email protected]>
16720
16721 * tune/tuneup.c (all): Disable calls of tune_gcd_schoenhage and
16722 tune_hgcd for now.
16723
16724 2003-12-29 Torbjorn Granlund <[email protected]>
16725
16726 * tests/mpz/t-gcd.c: Rewrite, based on suggestions by Kevin.
16727
16728 * mpn/ia64/mul_1.asm: Amend TODO list.
16729
16730 * mpn/sparc64/README: Remove mpn_Xmul_2, done.
16731 Add blurb about L1 cache conflicts.
16732
16733 * mpn/generic/gcd.c: Disable Schoenhage code for now.
16734
16735 2003-12-29 Kevin Ryde <[email protected]>
16736
16737 * mpn/generic/mul_fft.c, mpz/root.c, mpq/cmp_ui.c: Add casts for K&R.
16738
16739 2003-12-27 Kevin Ryde <[email protected]>
16740
16741 * tests/mpz/t-mul.c (mul_kara, mul_basecase): Use __GMP_PROTO.
16742
16743 * mpn/generic/gcd.c (NHGCD_SWAP4_2, NHGCD_SWAP3_LEFT),
16744 mpn/generic/hgcd.c (HGCD_SWAP4_LEFT, HGCD_SWAP4_RIGHT, HGCD_SWAP4_2,
16745 HGCD_SWAP3_LEFT): Aggregate initializers for automatics is an
16746 ANSI-ism, avoid.
16747
16748 * Makefile.am (AUTOMAKE_OPTIONS): Restore this, giving no directory on
16749 ansi2knr to avoid a circular build rule.
16750 * configure.in (AM_INIT_AUTOMAKE): Note options also in Makefile.am.
16751
16752 * configure.in (cflags_maybe): Don't loop adding cflags_maybe if the
16753 user has set CFLAGS.
16754
16755 2003-12-24 Torbjorn Granlund <[email protected]>
16756
16757 * mpn/generic/gcd.c (gcd_schoenhage_itch): Avoid unary "+".
16758 (mpn_gcd): Allocate scratch space on heap for gcd_schoenhage.
16759 (mpn_gcd): Don't invoke MPN_NORMALIZE on input operands.
16760
16761 2003-12-23 Kevin Ryde <[email protected]>
16762
16763 * configure.in (*sparc*-*-*): Test sizeof(long)==4 or 8 for ABIs, to
16764 get the right mode when the user sets the CFLAGS.
16765 (testlist): Introduce "any_<abi>_testlist" to apply to all compilers.
16766
16767 * demos/perl/typemap (MPZ_ASSUME, MPQ_ASSUME, MPF_ASSUME): Remove
16768 output rules, these are only meant for inputs.
16769 (MPZ_MUTATE): Remove, not used since changes for magic.
16770
16771 * demos/perl/GMP.xs (mpz_class_hv, mpq_class_hv, mpf_class_hv): New
16772 variables, initialized in BOOT.
16773 * demos/perl/GMP.xs, demos/perl/typemap: Use them and explicit
16774 sv_bless, to save a gv_stashpv for every new object.
16775
16776 2003-12-22 Kevin Ryde <[email protected]>
16777
16778 * mpn/alpha/mode1o.c, mpn/alpha/dive_1.c: Moved from ev5/mode1o.c and
16779 ev5/dive_1.c, these are good for ev4, and would like them in a generic
16780 alpha build.
16781
16782 2003-12-21 Kevin Ryde <[email protected]>
16783
16784 * doc/gmp.texi (Integer Logic and Bit Fiddling): Say "bitwise" in
16785 mpz_and, mpz_ior and mpz_xor, to avoid any confusion with what C means
16786 by "logical". Reported by Rüdiger Schütz.
16787
16788 * gmp-h.in (_GMP_H_HAVE_FILE): Note why defined(EOF) is not good.
16789
16790 2003-12-20 Torbjorn Granlund <[email protected]>
16791
16792 * mpn/generic/hgcd.c (mpn_diff_smaller_p): Use mpn_cmp instead of
16793 mpn_sub_n where possible. Use mp_size_t for relevant variables.
16794
16795 2003-12-20 Kevin Ryde <[email protected]>
16796
16797 * tune/speed.h (SPEED_TMP_ALLOC_LIMBS): Correction to last change,
16798 don't want "- 1" on the TMP_ALLOC_LIMBS.
16799
16800 * demos/expr/expr.h: Test #ifdef MPFR_VERSION_MAJOR for when mpfr.h is
16801 included, not GMP_RNDZ which is now an enum.
16802
16803 * demos/expr/exprfra.c (e_mpfr_ulong_p): Use mpfr_integer_p and
16804 mpfr_fits_ulong_p.
16805 (e_mpfr_get_ui_fits): Use mpfr_get_ui.
16806
16807 * mpfr/*: Update to mpfr cvs head 2003-12-20.
16808
16809 * configure, config.in: Update to autoconf 2.59.
16810 * */Makefile.in, configure, aclocal.m4, ansi2knr.c, install-sh,
16811 doc/mdate-sh: Update to automake 1.8.
16812
16813 * mkinstalldirs: Remove, not required by automake 1.8.
16814 * doc/gmp.texi (Build Options): HTML is a usual target in automake 1.8.
16815
16816 * configure.in (AC_PREREQ): Require autoconf 2.59.
16817 (AM_INIT_AUTOMAKE): Require automake 1.8.
16818 (AC_C_INLINE): Use rather than GMP_C_INLINE, now has #ifndef
16819 __cplusplus we want.
16820 (gettimeofday): Use AC_CHECK_FUNCS rather than our workaround code,
16821 autoconf now ok.
16822
16823 * acinclude.m4 (GMP_C_INLINE): Remove.
16824 (GMP_H_EXTERN_INLINE): Use AC_C_INLINE.
16825 (GMP_PROG_AR): Comment on automake $ARFLAGS.
16826
16827 2003-12-19 Niels Möller <[email protected]>
16828
16829 * mpn/generic/hgcd.c (mpn_diff_smaller_p): Rewrote function. Tried
16830 to explain how it works.
16831 (slow_diff_smaller_p, wrap_mpn_diff_smaller_p) [WANT_ASSERT]: Use
16832 CPP to wrap assertion checks around all calls to
16833 mpn_diff_smaller_p.
16834
16835 * mpn/generic/hgcd.c (mpn_addmul2_n_1) [nails]: Fixed carry handling.
16836
16837 * mpn/generic/hgcd.c (mpn_diff_smaller_p) [nails]: Use
16838 GMP_NUMB_MAX, not MP_LIMB_T_MAX.
16839 (mpn_hgcd_itch): Improved size calculation.
16840 (mpn_hgcd_max_recursion): Moved function from qstack.c. Should to
16841 be recompiled when HGCD_SCHOENHAGE_THRESHOLD is tuned.
16842
16843 * mpn/generic/qstack.c (mpn_hgcd_max_recursion): ... moved from
16844 here.
16845
16846 2003-12-19 Torbjorn Granlund <[email protected]>
16847
16848 * tests/mpf/t-get_d.c: Print message before aborting.
16849
16850 * mpn/generic/hgcd2.c (mpn_hgcd2): Substitute always-zero variable
16851 with 0. Remove bogus comment.
16852
16853 * mpn/generic/get_d.c: Make ONE_LIMB case actually work for nails.
16854
16855 2003-12-18 Niels Möller <[email protected]>
16856
16857 * mpn/generic/hgcd.c (hgcd_update_r): Assert that the output r2 is
16858 smaller than the input r1.
16859
16860 2003-12-18 Torbjorn Granlund <[email protected]>
16861
16862 * mpz/get_d.c: Don't include longlong.h.
16863
16864 * tests/mpz/t-mul.c (ref_mpn_mul): Handle un == vn specially, to avoid
16865 a dummy r/w outside of allocated area.
16866
16867 2003-12-18 Kevin Ryde <[email protected]>
16868
16869 * mpn/alpha/unicos.m4 (ALIGN): Add comments on what GCC does.
16870
16871 * configure.in (fat setups), acinclude.m4 (GMP_INIT): Obscure
16872 include() from automake 1.8 aclocal.
16873 * acinclude.m4: Quote names in AC_DEFUN, for automake 1.8 aclocal.
16874
16875 2003-12-17 Niels Möller <[email protected]>
16876
16877 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer) [nails]:
16878 Enabled code also for GMP_NAIL_BITS > 0.
16879 * tune/speed.c [nails]: Enable speed_mpn_hgcd and
16880 speed_mpn_hgcd_lehmer.
16881 * tune/tuneup.c (tune_hgcd) [nails]: Likewise.
16882
16883 * mpn/generic/gcd.c [nails]: Use Schönhage's algorithm also for
16884 GMP_NAIL_BITS > 0.
16885
16886 * mpn/generic/hgcd.c [nails]: Enable the code for GMP_NAIL_BITS > 0.
16887 (MPN_EXTRACT_LIMB) [nails]: Handle nails.
16888 (__gmpn_hgcd_sanity): Allocate temporaries on the heap, not on the
16889 stack. Also check that r[i] >= r[i+1].
16890 (mpn_hgcd2_lehmer_step) [nails]: Handle nails.
16891 (mpn_hgcd_lehmer): When we temporarily have r3 > r2, avoid
16892 trigging that assert in __gmpn_hgcd_sanity.
16893 (mpn_hgcd): Likewise.
16894
16895 * mpn/generic/hgcd2.c (div2) [nails]: Alternative nail-aware
16896 version.
16897 (SUB_2): New macro of Kevin's, which reduces do sub_ddmmss in the
16898 non-nail case.
16899 (HGCD2_STEP): Use SUB_2, not sub_ddmmss. Added alternative version
16900 for K&R compilers.
16901 (mpn_hgcd2) [nails]: Use SUB_2, not sub_ddmmss. New nail-aware
16902 code for checking Jebelean's condition.
16903
16904 2003-12-13 Kevin Ryde <[email protected]>
16905
16906 * mpq/get_d.c: Amend comments per mpn_get_d change.
16907 (limb2dbl): Remove, no longer used.
16908
16909 * gmp-impl.h (DIVREM_1_NORM_THRESHOLD etc) [nails]: Correction to
16910 comments, MP_SIZE_T_MAX means preinv never.
16911
16912 * gmp-impl.h (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD) [nails]:
16913 Remove overrides, divexact_1 and modexact_1 have been nailified.
16914
16915 * mpz/inp_str.c (mpz_inp_str_nowhite): Use ASSERT_ALWAYS for EOF value
16916 requirement.
16917
16918 * tests/refmpn.c (refmpn_rsh1add_n, refmpn_rsh1sub_n): Parens around
16919 GMP_NUMB_BITS - 1 with ">>", to quieten gcc -Wall.
16920 * tests/t-constants.c (main), tests/t-count_zeros.c (check_clz),
16921 tests/t-modlinv.c (one), tests/mpz/t-jac.c (try_si_zi),
16922 tests/mpq/t-get_d.c (check_onebit): : Correction to printfs.
16923 * tests/mpn/t-fat.c: Add <string.h> for memcpy.
16924 * tests/mpz/t-scan.c (check_ref): Remove unused variable "isigned".
16925 * tests/mpq/t-get_d.c (check_onebit): Remove unused variable "limit".
16926 * tests/mpf/t-set_si.c, tests/mpf/t-set_ui.c (check_data): Braces for
16927 initializers.
16928 * tests/devel/try.c (mpn_divexact_by3_fun, mpn_modexact_1_odd_fun):
16929 Correction to return values.
16930
16931 * doc/gmp.texi (Miscellaneous Integer Functions): Note mpz_sizeinbase
16932 can be used to locate the most significant bit. Reword a bit for
16933 clarity.
16934
16935 2003-12-12 Niels Möller <[email protected]>
16936
16937 * mpn/generic/hgcd.c (__gmpn_hgcd_sanity): Fixed stack buffer
16938 overrun.
16939 * mpn/generic/hgcd.c: Improved comments.
16940
16941 2003-12-11 Torbjorn Granlund <[email protected]>
16942
16943 * gmp-impl.h: Change asm => __asm__, tabify.
16944 * mpz/get_d_2exp.c: Likewise.
16945 * mpf/get_d_2exp.c: Likewise.
16946
16947 * tests/cxx/t-ops.cc: #if .. #endif out tests that cause ambiguities.
16948
16949 2003-12-10 Torbjorn Granlund <[email protected]>
16950
16951 * tests/mpz/t-gcd.c: Generate operands with sizes as a geometric
16952 progression, to allow for larger operands and less varying timing.
16953
16954 * tune/tuneup.c (tune_gcd_schoenhage): Set param.step_factor.
16955 (tune_hgcd): Likewise.
16956
16957 2003-12-10 Kevin Ryde <[email protected]>
16958
16959 * demos/perl/test.pl: Should be $] for perl version in old perl.
16960
16961 * configure.in (sparc64-*-*): Single block of gcc configs for all
16962 systems, on unknown systems try both ABI 32 and 64.
16963
16964 * configure.in (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New AC_SUBSTs with
16965 options to generate .def files with windows DLLs.
16966 * Makefile.am (libgmp_la_LDFLAGS, libgmpxx_la_LDFLAGS): Use them.
16967
16968 * mpn/generic/gcd.c: Use ABOVE_THRESHOLD / BELOW_THRESHOLD, to follow
16969 convention and cooperate with tune/tuneup.c.
16970
16971 * tune/tuneup.c (tune_gcd_schoenhage): Increase max_size to 3000, side
16972 default 1000 is approx the crossover point on athlon.
16973
16974 * tune/common.c, tune/speed.c, tune/speed.h, tune/speed-ext.c,
16975 tune/tuneup.c (SPEED_TMP_ALLOC_LIMBS): Take variable as parameter
16976 rather than returning a value, avoids alloca in a function call.
16977 * tune/common.c, tune/speed.h (speed_tmp_alloc_adjust): Remove, now
16978 inline in SPEED_TMP_ALLOC_LIMBS, and using ptr-NULL for alignment
16979 extraction.
16980
16981 * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal,
16982 __gmp_binary_less, __gmp_binary_less_equal, __gmp_binary_greater,
16983 __gmp_binary_greater_equal, __gmp_cmp_function): Use mpfr_cmp_si and
16984 mpfr_cmp_d.
16985 * tests/cxx/t-ops.cc: Exercise this.
16986
16987 * demos/perl/Makefile.PL: Don't install sample.pl and test2.pl.
16988
16989 * demos/perl/GMP.xs (use_sv): Prefer PV over IV or NV to avoid any
16990 rounding.
16991 * demos/perl/test.pl: Exercise this.
16992
16993 * demos/perl/GMP/Mpf.pm (overload_string): Corrections to $# usage.
16994 * demos/perl/test.pl: Exercise this.
16995
16996 2003-12-08 Kevin Ryde <[email protected]>
16997
16998 * demos/perl/GMP.pm: Correction to canonicalize example.
16999
17000 * demos/perl/GMP.xs: New type check scheme, support magic scalars,
17001 support UV when available. Remove some unused local variables.
17002 (coerce_long): Check range of double.
17003 (get_d_2exp): Remove stray printf.
17004
17005 * demos/perl/test.pl: Exercise magic, rearrange to make it clearer
17006 what's being tested.
17007
17008 2003-12-07 Kevin Ryde <[email protected]>
17009
17010 * mpn/generic/hgcd.c (mpn_hgcd): Use BELOW_THRESHOLD, to follow the
17011 convention of N<THRESH for the lower algorithm, not <=. Fixes
17012 algorithm selection in tuneup.c.
17013
17014 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Use intended
17015 align_xp, align_yp.
17016
17017 * tune/tuneup.c (mul_toom3_threshold): Use MUL_TOOM3_THRESHOLD_LIMIT,
17018 for the benefit of ASSERT in mpn_mul_n.
17019
17020 * tune/tuneup.c (tune_mul): Correction to toom3 param.min_size, should
17021 use MPN_TOOM3_MUL_N_MINSIZE.
17022
17023 * tune/speed.c (check_align_option): Correction to printf format.
17024 * tune/freq.c (freq_sysctl_hw_model): Remove unused "i" variable.
17025
17026 * scanf/doscan.c: Correction to a couple of trace printfs.
17027 Add <stdlib.h> for strtol.
17028
17029 * tests/misc/t-scanf.c (test_sscanf_eof_ok): New function.
17030 (check_misc): Use it to suppress tests broken by libc.
17031 And should be EOF rather than -1 in various places.
17032
17033 2003-12-06 Torbjorn Granlund <[email protected]>
17034
17035 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
17036 Move SPEED_TMP_ALLOC_LIMBS invocations out from calls.
17037
17038 * mpn/generic/get_str.c (mpn_get_str, POW2_P case):
17039 Don't append extra '\0' byte.
17040
17041 2003-12-05 Niels Möller <[email protected]>
17042
17043 * tune/common.c (speed_mpn_hgcd_lehmer, speed_mpn_hgcd):
17044 Updated for the renaming hgcd_sanity -> ASSERT_HGCD.
17045
17046 * mpn/generic/gcd.c (gcd_schoenhage): TMP_DECL must be the final
17047 declaration in the declaration section of a block.
17048
17049 * tune/speed.h (mpn_gcd_accel): Added prototype.
17050
17051 2003-12-05 Torbjorn Granlund <[email protected]>
17052
17053 * randmt.c (__gmp_mt_recalc_buffer): Put parens around "&" expressions
17054 inside "!=".
17055
17056 * mpf/get_str.c: Remove unused variable "fracn".
17057
17058 2003-12-03 Kevin Ryde <[email protected]>
17059
17060 * configure.in, Makefile.am (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New
17061 AC_SUBSTs, use them to create .def files with Windows DLLs.
17062 * doc/gmp.texi (Notes for Particular Systems): Update notes on mingw
17063 DLL with MS C.
17064
17065 * mpz/export.c: Allow NULL for countp.
17066 * doc/gmp.texi (Integer Import and Export): Describe this.
17067 Suggested by Jack Lloyd.
17068
17069 * mpn/x86/p6/aors_n.asm: New file, grabbing the K7 code.
17070 Superiority of this reported by Patrick Pelissier.
17071
17072 2003-11-30 Kevin Ryde <[email protected]>
17073
17074 * mpn/alpha/ev67/popcount.asm, mpn/alpha/ev67/hamdist.asm: New files.
17075
17076 * mpn/alpha/ev67: New directory.
17077 * configure.in (alphaev67, alphaev68, alphaev7*): Use it.
17078
17079 * doc/gmp.texi (GMPrefu, GMPpxrefu): Change back to plain ref and
17080 pxref, remove macros.
17081 (GMPreftopu, GMPpxreftopu): Remove URL parameter, rename to GMPreftop
17082 and GMPpxreftop.
17083 (Debugging): Remove debauch, seems to have disappeared.
17084 (Language Bindings): Corrections to URLs for CLN, Omni F77, Pike.
17085
17086 2003-11-29 Kevin Ryde <[email protected]>
17087
17088 * demos/perl/GMP/Mpf.pm (overload_string): Use $OFMT to avoid warnings
17089 about $#.
17090
17091 * demos/perl/GMP.xs (fits_slong_p): Use LONG_MAX+1 to avoid possible
17092 rounding of 0x7F..FF in a double on 64-bit systems.
17093
17094 * configure.in (ppc601-*-*): Remove this case, it never matched
17095 anything, the name adopted is powerpc601.
17096 (powerpc601-*-*): Use gcc -mcpu=601, xlc -qarch=601.
17097
17098 * configure.in: Introduce ${cc}_cflags_maybe, used if they work.
17099 (*sparc*-*-*) [ABI=32]: Add gcc_cflags_maybe=-m32 to force that mode.
17100
17101 * doc/gmp.texi (Introduction to GMP): Add AMD64 to optimizations list.
17102 (Build Options): Add cpu types alphaev7 and amd64. Update texinfo
17103 html cross reference.
17104
17105 2003-11-28 Niels Möller <[email protected]>
17106
17107 * tune/tuneup.c (tune_hgcd): Disable if GMP_NAIL_BITS > 0.
17108 * tune/speed.c (routine): Likewise.
17109 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Likewise.
17110
17111 * mpn/generic/gcd.c, mpn/generic/hgcd.c, mpn/generic/hgcd2.c
17112 [GMP_NAIL_BITS]: Disabled new code if we have nails.
17113
17114 * mpn/generic/gcd.c (MPN_LEQ_P): Copied macro definition (needed
17115 for compilation with --enable-assert).
17116
17117 * tune/tuneup.c (hgcd_schoenhage_threshold,
17118 gcd_schoenhage_threshold): New variables.
17119 (tune_hgcd, tune_gcd_schoenhage): New functions.
17120 (all): Call tune_hgcd and tune_gcd_schoenhage.
17121
17122 * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer)
17123 (speed_mpn_gcd_accel): New functions.
17124 * tune/speed.c (routine): Added mpn_hgcd, mpn_hgcd_lehmer and
17125 mpn_gcd _accel.
17126 * tune/speed.h: Added corresponding prototypes.
17127
17128 * tune/gcd_accel.c: New file.
17129
17130 * tune/gcd_bin.c (GCD_SCHOENHAGE_THRESHOLD): Set to MP_SIZE_T_MAX.
17131
17132 * tune/Makefile.am (libspeed_la_SOURCES): Added gcd_accel.c.
17133 (TUNE_MPN_SRCS_BASIC): Added hgcd.c.
17134
17135 * mpn/x86/k7/gmp-mparam.h (HGCD_SCHOENHAGE_THRESHOLD)
17136 (GCD_SCHOENHAGE_THRESHOLD): Tuned values.
17137
17138 * mpn/generic/gcd.c (mpn_gcd, gcd_binary_odd): Renamed the
17139 old mpn_gcd function (which implements accelerated binary gcd) to
17140 gcd_binary_odd.
17141 (gcd_binary): New function, with the additional book keeping
17142 needed when using gcd_binary_odd to compute the gcd of non-odd
17143 numbers.
17144 (hgcd_tdiv): New function.
17145 (gcd_lehmer): New function, currently #if:ed out.
17146 (hgcd_start_row_p): New function, duplicated from hgcd.c.
17147 (gcd_schoenhage_itch): New function.
17148 (gcd_schoenhage): New function.
17149 (mpn_gcd): New advertised gcd function, which calls
17150 mpn_gcd_binary_odd or mpn_gcd_schoenhage, depending on the size of
17151 the input.
17152
17153 * mpn/generic/hgcd.c (mpn_hgcd2_lehmer_step): Renamed function
17154 (was lehmer_step), and made non-static. Updated callers.
17155
17156 * gmp-impl.h (GCD_LEHMER_THRESHOLD): #if:ed out this macro.
17157 (mpn_hgcd2_lehmer_step): Added prototype.
17158
17159 2003-11-27 Niels Möller <[email protected]>
17160
17161 * tests/mpz/t-gcd.c (gcd_values): Moved definition, so that we
17162 don't need to forward declare the array.
17163
17164 2003-11-26 Niels Möller <[email protected]>
17165
17166 * mpn/generic/hgcd.c (mpn_hgcd2_fix): Deleted duplicate definition
17167 (the function belongs to hgcd2.c).
17168
17169 2003-11-26 Torbjorn Granlund <[email protected]>
17170
17171 * tests/mpz/t-gcd.c: Generate random operands up to 32767 bits;
17172 decrease # of test to 1000.
17173 (gcd_values): Remove oversize test case.
17174
17175 2003-11-26 Niels Möller <[email protected]>
17176
17177 * gmp-impl.h: Added name mangling for hgcd-related functions. Also
17178 use __GMP_PROTO.
17179 (MPN_LEQ_P, MPN_EXTRACT_LIMB): Moved macros to hgcd.c.
17180 * mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
17181 Adapted to name changes.
17182
17183 * tests/mpz/t-gcd.c (main): Added some tests with non-random
17184 input.
17185
17186 2003-11-25 Niels Möller <[email protected]>
17187
17188 * gmp-impl.h (MPN_LEQ_P, MPN_EXTRACT_LIMB): New macros.
17189 (struct qstack, struct hgcd2_row, struct hgcd2, struct hgcd_row)
17190 (struct hgcd): New structs. Also added prototypes for new hgcd,
17191 hgcd2, qstack and gcd functions.
17192
17193 * configure.in (gmp_mpn_functions): Added hgcd2, hgcd and qstack.
17194
17195 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added hgcd2.c,
17196 hgcd.c and qstack.c.
17197
17198 * mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
17199 New files, needed for the sub-quadratic gcd.
17200
17201 2003-11-25 Kevin Ryde <[email protected]>
17202
17203 * doc/gmp.texi (Language Bindings): Add Axiom.
17204
17205 2003-11-22 Kevin Ryde <[email protected]>
17206
17207 * mpn/alpha/README: More notes on assembler syntax variations.
17208
17209 * mpn/alpha/alpha-defs.m4, mpn/alpha/unicos.m4 (unop): Should be ldq_u
17210 not bis, and move to alpha-defs.m4 since it can be happily used
17211 everywhere.
17212
17213 * mpn/alpha/alpha-defs.m4, mpn/alpha/default.m4, mpn/alpha/unicos.m4
17214 (bigend): Move to alpha-defs.m4 and base it on HAVE_LIMB_BIG_ENDIAN or
17215 HAVE_LIMB_LITTLE_ENDIAN, so as not to hard code system endianness.
17216
17217 * mpn/alpha/alpha-defs.m4: New file.
17218 * configure.in (alpha*-*-*): Use it.
17219
17220 2003-11-21 Kevin Ryde <[email protected]>
17221
17222 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-21.
17223
17224 * mpn/alpha/ev5/com_n.asm: Change "not" to "ornot r31", since "not"
17225 isn't recognised by on Cray Unicos. Add missing "gp" to PROLOGUE.
17226 * mpn/alpha/README: Add a note on "not".
17227
17228 2003-11-19 Torbjorn Granlund <[email protected]>
17229
17230 * mpn/alpha/aorslsh1_n.asm: Slightly rework feed-in code, avoiding
17231 spurious reads beyond operand limits.
17232
17233 * mpn/alpha/ev5/com_n.asm: Add ASM_START/ASM_END.
17234
17235 * mpn/generic/mul_fft.c (mpn_fft_zero_p): Remove unused function.
17236 (mpn_lshift_com): Make static, nailify properly.
17237
17238 2003-11-19 Kevin Ryde <[email protected]>
17239
17240 * mpn/generic/diveby3.c: Use a "q" variable to make it clearer what
17241 the code is doing.
17242
17243 * mpn/powerpc32/750/lshift.asm, mpn/powerpc32/750/rshift.asm: New
17244 files.
17245
17246 * mpn/alpha/ev5/com_n.asm: New file.
17247
17248 * doc/gmp.texi (Assembler Functional Units, Assembler Writing Guide):
17249 New sections by Torbjorn, tweaked by me.
17250
17251 2003-11-17 Torbjorn Granlund <[email protected]>
17252
17253 * mpn/powerpc32: Add power4/powerpc970 cycle counts.
17254 Use cmpwi instead of cmpi to placate darwin.
17255
17256 2003-11-15 Kevin Ryde <[email protected]>
17257
17258 * config.guess: Add comments on MacOS "machine" command.
17259
17260 * tests/devel/try.c (main): Use gmp_randinit_default explicitly on
17261 __gmp_rands, since RANDS doesn't allow seeding.
17262
17263 * doc/gmp.texi (Assigning Integers): Remove notes on possible change
17264 to disallow whitespace, this would be an incompatible change and
17265 really can't be made.
17266 (Toom 3-Way Multiplication): Updates for Paul's new code.
17267
17268 * mpn/generic/mul_n.c (toom3_interpolate, mpn_toom3_mul_n): Put
17269 if/else braces around whole of #if code, for readability.
17270
17271 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
17272 refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps
17273 etc.
17274
17275 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-15.
17276
17277 2003-11-14 Torbjorn Granlund <[email protected]>
17278
17279 * mpn/alpha/aorslsh1_n.asm: Use Cray-friendly syntax for "br".
17280
17281 2003-11-13 Torbjorn Granlund <[email protected]>
17282
17283 * mpn/alpha/aorslsh1_n.asm: New file.
17284
17285 2003-11-12 Kevin Ryde <[email protected]>
17286
17287 * acinclude.m4 (GMP_PROG_CC_WORKS): Add case provoking AIX power2
17288 assembler, test code by Torbjorn.
17289 * configure.in (power*-*-*): Add a comment about -mcpu=rios2 fallback.
17290
17291 * tune/speed.c (main): Use gmp_randinit_default explicitly on
17292 __gmp_rands, since RANDS doesn't allow seeding.
17293
17294 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-12.
17295
17296 * gmp-impl.h, randmt.h (__gmp_randinit_mt_noseed): Move prototype to
17297 gmp-impl.h, for use by RANDS.
17298
17299 * mpn/Makeasm.am (.s, .S, .asm): Quote $< in test -f, per automake.
17300 (.obj): Use test -f and $(CYGPATH_W) as per automake.
17301
17302 2003-11-11 Kevin Ryde <[email protected]>
17303
17304 * configure.in: Make umul and udiv standard-optional objects, rather
17305 than under various extra_functions.
17306
17307 * mpn/pa32/hppa1_1/pa7100/add_n.asm,
17308 mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
17309 mpn/pa32/hppa1_1/pa7100/lshift.asm,
17310 mpn/pa32/hppa1_1/pa7100/rshift.asm,
17311 mpn/pa32/hppa1_1/pa7100/sub_n.asm,
17312 mpn/pa32/hppa1_1/pa7100/submul_1.asm: Use LDEF for labels.
17313
17314 * mpf/set_str.c: Don't use memcmp for decimal point testing, just a
17315 loop is enough and avoids any chance of memcmp reading past the end of
17316 the given string.
17317
17318 * randmts.c, randmt.h: New files.
17319 * Makefile.am (libgmp_la_SOURCES): Add them.
17320 * randmt.c: Move seeding to randmts.c, common defines in randmt.h.
17321 * gmp-impl.h (RANDS): Use __gmp_randinit_mt_noseed.
17322 * tests/misc.c (tests_rand_start): Use gmp_randinit_default
17323 explicitly, not RANDS.
17324
17325 * mpn/ia64/ia64-defs.m4 (PROLOGUE_cpu): Use 32-byte alignment, for the
17326 benefit of itanium 2.
17327 * mpn/ia64/gcd_1.asm: Remove own .align 32.
17328
17329 * mpn/ia64/ia64-defs.m4 (ALIGN): New define, using IA64_ALIGN_OK.
17330 * mpn/ia64/hamdist.asm: Use ALIGN instead of .align.
17331
17332 * acinclude.m4 (GMP_ASM_IA64_ALIGN_OK): New macro.
17333 * configure.in (IA64_PATTERN): Use it.
17334 * mpn/ia64/README: Add notes on gas big endian align problem.
17335
17336 2003-11-10 Torbjorn Granlund <[email protected]>
17337
17338 * mpn/ia64/mul_1.asm: Rewrite.
17339
17340 2003-11-08 Torbjorn Granlund <[email protected]>
17341
17342 * mpn/x86/aors_n.asm: Align loop to a multiple of 16. Also align
17343 M4_function_n to a multiple of 16, to minimize alignment padding.
17344 Update P6 cycle counts reflecting improvements with new alignment.
17345
17346 2003-11-07 Kevin Ryde <[email protected]>
17347
17348 * gmp-impl.h (HAVE_HOST_CPU_alpha_CIX): New define.
17349 (ULONG_PARITY, popc_limb): Use it, to pick up ev7 as well as 67 and 68.
17350 * longlong.h (count_leading_zeros, count_trailing_zeros): Ditto.
17351
17352 * doc/gmp.texi (Notes for Package Builds): Add notes on multi-ABI
17353 system packaging.
17354 (ABI and ISA): Add GNU/Linux ABI=64.
17355 (Binary GCD): Add notes on 1x1 GCD algorithms.
17356
17357 * mpn/alpha/README: Add some literature references.
17358
17359 * mpn/ia64/mode1o.asm: Various corrections to initial checkin.
17360 * mpn/ia64/ia64-defs.m4 (ASSERT): Correction to arg quoting.
17361
17362 2003-11-05 Torbjorn Granlund <[email protected]>
17363
17364 * mpn/powerpc64/linux64.m4: New file.
17365 * configure.in (POWERPC64_PATTERN): Handle *-*-linux*.
17366 Use linux64.m4.
17367
17368 * mpn/ia64/logops_n.asm: New file.
17369
17370 2003-11-05 Kevin Ryde <[email protected]>
17371
17372 * tune/freq.c (freq_sysctl_hw_model): Relax to just look for "%u MHz",
17373 for the benefit of sparc cypress under netbsd 1.6.1.
17374
17375 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-05.
17376
17377 * mpn/alpha/ev5/dive_1.c: New file.
17378
17379 * configure.in (x86_64-*-*): Accept together with amd64-*-*.
17380
17381 * tune/speed.c: Check range of -x,-y,-w,-W alignment specifiers.
17382 * tune/speed.h (CACHE_LINE_SIZE): Amend comments.
17383
17384 2003-11-04 Torbjorn Granlund <[email protected]>
17385
17386 * tune/speed.c: Fix typo in testing HAVE_NATIVE_mpn_modexact_1_odd.
17387
17388 2003-11-03 Kevin Ryde <[email protected]>
17389
17390 * mpn/ia64/hamdist.asm: New file.
17391 * mpn/ia64/mode1o.asm: New file.
17392 * mpn/ia64/ia64-defs.m4 (ASSERT): New macro.
17393
17394 * tests/mpz/t-set_d.c (check_2n_plus_1): New test.
17395
17396 2003-11-01 Kevin Ryde <[email protected]>
17397
17398 * mpz/fac_ui.c (BSWAP_ULONG) [limb==2*long]: Remove this case, it
17399 provokes code gen problems on HP cc.
17400 (BSWAP_ULONG) [generic]: Rename __dst variable to avoid conflicts with
17401 BITREV_ULONG.
17402 Fix by Jason Moxham.
17403
17404 * mpn/powerpc32/mode1o.asm: Use 16-bit i*i for early out, no need to
17405 truncate divisor. Amend stated 750/7400 speeds, and note operands
17406 that give the extremes.
17407
17408 * mpz/set_d.c: Don't use a special case for d < MP_BASE_AS_DOUBLE, gcc
17409 3.3 -mpowerpc64 on darwin gets ulonglong->double casts wrong.
17410
17411 * mpn/generic/diveby3.c: Show a better style carry handling in the
17412 alternative pipelined sample code.
17413
17414 Revert this, the longlong.h macros need -mpowerpc64:
17415 * acinclude.m4 (GMP_GCC_POWERPC64): New macro.
17416 * configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
17417 when bad.
17418
17419 2003-10-31 Torbjorn Granlund <[email protected]>
17420
17421 * mpn/powerpc64/mode64/submul_1.asm: Move an instruction to save a
17422 cycle on POWER4.
17423
17424 * mpn/powerpc64/mode64/divrem_1.asm: Fix several syntax problems
17425 revealed on Mac OS X.
17426
17427 * mpn/powerpc64/mode64/*.asm: Add cycle counts for POWER4.
17428
17429 * mpn/powerpc64/sqr_diagonal.asm: Rewrite to save a cycle on POWER4.
17430
17431 2003-10-31 Kevin Ryde <[email protected]>
17432
17433 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-31.
17434
17435 * mpn/powerpc64/README: Add subdirectory organisation notes.
17436
17437 * tests/mpn/t-get_d.c: Don't use limits.h, LONG_MIN is wrong on gcc
17438 2.95 with -mcpu=ultrasparc.
17439
17440 * acinclude.m4 (GMP_GCC_POWERPC64): New macro.
17441 * configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
17442 when bad.
17443
17444 * configure.in (powerpc64-*-darwin*) [ABI=mode32]: Use gcc -mcpu flags.
17445
17446 * mpn/ia64/divrem_1.asm, mpn/ia64/gcd_1.asm: Use "C" for comments.
17447 * mpn/ia64/README, mpn/ia64/ia64-defs.m4: Note this.
17448
17449 * mpn/ia64/ia64-defs.m4: Renamed from default.m4, per other defs files.
17450 * configure.in (IA64_PATTERN): Update GMP_INCLUDE_MPN.
17451
17452 * doc/gmp.texi (Notes for Particular Systems): Remove m68k ABI notes
17453 for -mshort and PalmOS, now works.
17454 (References): Correction, GMP Square Root proof already there, just
17455 wanting URL from RRRR 4475.
17456
17457 2003-10-29 Kevin Ryde <[email protected]>
17458
17459 * configure.in (sparc*-*-*): Use gcc -m32 when that option works, to
17460 force 32-bit mode on dual 32/64 configurations like GNU/Linux.
17461 (sparc64-*-linux*): Add support for ABI=64.
17462
17463 * mpn/generic/pre_divrem_1.c: In fraction part, use CNST_LIMB(0) with
17464 udiv_qrnnd_preinv to avoid warning about shift > type.
17465
17466 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-29.
17467
17468 * tests/cxx/t-istream.cc: Avoid tellg() checks if putback() doesn't
17469 update that, avoids certain g++ 2.96 problems.
17470
17471 * tests/mpn/t-fat.c: New file.
17472 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
17473
17474 * configure.in (CPUVEC_INSTALL, ITERATE_FAT_THRESHOLDS): New macros
17475 for fat.h.
17476 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Use CPUVEC_INSTALL instead
17477 of memcpy. Correction to location of "initialized" set. Improve
17478 various comments.
17479
17480 2003-10-27 Torbjorn Granlund <[email protected]>
17481
17482 * mpn/sparc64/mul_1.asm: Change addcc => add in a few places.
17483 * mpn/sparc64/addmul_1.asm: Likewise.
17484
17485 * mpn/sparc32/v9/mul_1.asm: Apply cross-jumping.
17486 * mpn/sparc32/v9/addmul_1.asm: Likewise.
17487 * mpn/sparc32/v9/submul_1.asm: Likewise.
17488 * mpn/sparc32/v9/sqr_diagonal.asm: Likewise.
17489
17490 2003-10-27 Kevin Ryde <[email protected]>
17491
17492 * tests/cxx/t-misc.cc: Don't use <climits>, on g++ 2.95.4 (debian 3.0)
17493 -mcpu=ultrasparc LONG_MIN is wrong and kills the compile.
17494
17495 * tests/cxx/t-istream.cc: Correction to tellg tests, don't assume
17496 streampos is zero based.
17497
17498 * configure.in (HAVE_HOST_CPU_FAMILY_alpha): New define for config.h.
17499 * mpn/generic/get_d.c: Use it instead of __alpha for alpha workaround,
17500 since Cray cc doesn't define __alpha.
17501
17502 * mpn/x86/README: Revise PIC coding notes a bit, add gcc visibility
17503 attribute.
17504
17505 2003-10-25 Kevin Ryde <[email protected]>
17506
17507 * mpn/ia64/gcd_1.asm: New file.
17508
17509 * tune/many.pl: Allow for PROLOGUE(fun,...), as used on alpha.
17510
17511 * doc/gmp.texi (C++ Formatted Input): Describe base indicator handling.
17512
17513 * tests/cxx/t-istream.cc: New file.
17514 * tests/cxx/Makefile.am: Add it.
17515
17516 * cxx/ismpznw.cc: New file, integer input without whitespace ...
17517 * cxx/ismpz.cc: ... from here.
17518 * gmp-impl.h (__gmpz_operator_in_nowhite): Add prototype.
17519 * cxx/ismpq.cc: Rewrite using mpz input routines. Change to accept a
17520 separate base indicator on numerator and denominator. Fix base
17521 indicator case where "123/0456" would stop at "123/0".
17522 * Makefile.am, cxx/Makefile.am: Add cxx/ismpznw.cc.
17523
17524 * tests/mpz/t-set_d.c: New file, derived from tests/mpz/t-set_si.c
17525 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
17526
17527 * mpn/m68k/lshift.asm, mpn/m68k/rshift.asm: Support 16-bit int and
17528 stack alignment.
17529 * mpn/m68k/README: Add notes on this.
17530 * configure.in (SIZEOF_UNSIGNED): New define in config.m4.
17531 * mpn/m68k/m68k-defs.m4 (m68k_definsn): Add cmpw, movew.
17532 Reported by Patrick Pelissier.
17533
17534 * mpn/m68k/t-m68k-defs.pl: Don't use -> with hashes, to avoid
17535 deprecation warnings from perl 5.8.
17536
17537 * configure.in (viac3-*-*): Use just x86/pentium in $path not x86/p6.
17538 If gcc is to be believed the old C3s don't have cmov.
17539
17540 * Makefile.am: Amend comments about not building from libtool
17541 convenience libraries.
17542
17543 * mpn/asm-defs.m4 (PROLOGUE): Use m4_file_seen, for correct filename
17544 in missing EPILOGUE error messages.
17545 (m4_file_seen): Amend comments about where used.
17546
17547 * Makefile.am (CXX_OBJECTS): Remove $U, C++ files are not subject to
17548 ansi2knr rules.
17549
17550 * gmp-h.in (mpn_divmod_1): Use __GMP_CAST, to avoid warnings in
17551 applications using g++ -Wold-style-cast.
17552
17553 * mpn/z8000/README: New file.
17554
17555 2003-10-22 Kevin Ryde <[email protected]>
17556
17557 * mpn/generic/get_d.c (CONST_1024, CONST_NEG_1023,
17558 CONST_NEG_1022_SUB_53): Replace ALPHA_WORKAROUND with a non-gcc-ism,
17559 and use on Cray Unicos alpha too, which has the same problem.
17560
17561 * configure.in (powerpc64-*-darwin*): Make ABI=32 available as the
17562 final fallback, remove mode64 until we know how it will work.
17563
17564 * doc/gmp.texi (Build Options): Add powerpc970 to available CPUs.
17565 (ABI and ISA): Add mode32 for Darwin.
17566
17567 * configure.in (gettimeofday): Use an explicit AC_TRY_LINK, to avoid
17568 known autoconf 2.57 problems with gettimeofday in AC_CHECK_FUNCS on
17569 HP-UX.
17570
17571 * configure.in (powerpc*-*-*): Use ABI=32 instead of ABI=standard for
17572 the default 32-bit ABI. Fixes powerpc64-*-aix* which is documented as
17573 choices "aix64 32" but had "aix64 standard".
17574
17575 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-22.
17576
17577 * doc/gmp.texi (Notes for Particular Systems): Note m68k gcc -mshort
17578 and PalmOS calling conventions not supported. Reported by Patrick
17579 Pelissier.
17580 (References): Add Paul Zimmermann's Inria 4475 paper.
17581
17582 2003-10-21 Torbjorn Granlund <[email protected]>
17583
17584 * mpn/ia64/submul_1.asm: Slightly reschedule loop to accommodate
17585 Itanium 2 getf.sig latency.
17586
17587 2003-10-21 Kevin Ryde <[email protected]>
17588
17589 * tests/mpn/t-instrument.c: Add mpn_addlsh1_n, mpn_rsh1add_n,
17590 mpn_rsh1sub_n, mpn_sub_nc, mpn_sublsh1_n. Typo in mpn_preinv_divrem_1
17591 conditional.
17592
17593 2003-10-20 Torbjorn Granlund <[email protected]>
17594
17595 * mpn/powerpc64/mode32/add_n.asm: New file.
17596 * mpn/powerpc64/mode32/sub_n.asm: New file.
17597 * mpn/powerpc64/mode32/mul_1.asm: New file.
17598 * mpn/powerpc64/mode32/addmul_1.asm: New file.
17599 * mpn/powerpc64/mode32/submul_1.asm: New file.
17600
17601 2003-10-19 Torbjorn Granlund <[email protected]>
17602
17603 * longlong.h (AMD64): __x86_64__ => __amd64__.
17604 (64-bit powerpc): Only define carry-dependent macros if
17605 !_LONG_LONG_LIMB.
17606
17607 * acinclude.m4 (POWERPC64_PATTERN): Add powerpc970-*-*.
17608
17609 * configure.in (POWERPC64_PATTERN): Handle *-*-darwin*.
17610 (POWERPC64_PATTERN, *-*-aix*): Prepend powerpc64/mode64 to path_aix64.
17611
17612 * mpn/powerpc64/mode64/mul_1.asm: Change cal => addi.
17613 * mpn/powerpc64/mode64/addmul_1.asm: Likewise.
17614 * mpn/powerpc64/mode64/submul_1.asm: Likewise.
17615 * mpn/powerpc64/sqr_diagonal.asm: Likewise.
17616
17617 * mpn/powerpc64/mode64/mul_1.asm: Move from "..".
17618 * mpn/powerpc64/mode64/addmul_1.asm: Likewise.
17619 * mpn/powerpc64/mode64/submul_1.asm: Likewise.
17620 * mpn/powerpc64/mode64/divrem_1.asm: Likewise.
17621 * mpn/powerpc64/mode64/rsh1sub_n.asm: Likewise.
17622 * mpn/powerpc64/mode64/add_n.asm: Likewise.
17623 * mpn/powerpc64/mode64/addsub_n.asm: Likewise.
17624 * mpn/powerpc64/mode64/sub_n.asm: Likewise.
17625 * mpn/powerpc64/mode64/addlsh1_n.asm: Likewise.
17626 * mpn/powerpc64/mode64/diveby3.asm: Likewise.
17627 * mpn/powerpc64/mode64/rsh1add_n.asm: Likewise.
17628 * mpn/powerpc64/mode64/sublsh1_n.asm: Likewise.
17629
17630 * mpn/powerpc64/lshift.asm: Handle mode32 ABI.
17631 * mpn/powerpc64/rshift.asm: Likewise.
17632 * mpn/powerpc64/umul.asm: Likewise.
17633
17634 * tune/powerpc64.asm: Make it actually work.
17635
17636 2003-10-19 Kevin Ryde <[email protected]>
17637
17638 * mpn/generic/get_d.c: Add a workaround for alpha gcc signed constant
17639 comparison bug.
17640
17641 * gmpxx.h (gmp_randclass gmp_randinit_lc_2exp_size constructor): Throw
17642 std::length_error if size is too big.
17643 * tests/cxx/t-rand.cc (check_randinit): Exercise this.
17644
17645 * mpn/x86/pentium4/sse2/addlsh1_n.asm: New file, derived in part from
17646 mpn/x86/pentium4/sse2/add_n.asm.
17647
17648 * doc/gmp.texi (C++ Interface Integers, C++ Interface Rationals, C++
17649 Interface Floats): Note std::invalid_argument exception for invalid
17650 strings to constructors and operator=.
17651 (C++ Interface Random Numbers): Note std::length_error exception for
17652 size too big in gmp_randinit_lc_2exp_size.
17653
17654 2003-10-18 Kevin Ryde <[email protected]>
17655
17656 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-18.
17657
17658 * gmpxx.h (mpz_class, mpq_class, mpf_class, mpfr_class constructors
17659 and operator= taking string or char*): Throw std::invalid_argument if
17660 string cannot be converted.
17661 * tests/cxx/t-constr.cc, tests/cxx/t-assign.cc: Exercise this.
17662
17663 * cxx/ismpz.cc, cxx/ismpq.cc, cxx/ismpf.cc: Use istream std::locale
17664 ctype facet for isspace when available. Only accept space at the
17665 start of the input, same as g++ libstdc++. Use ASSERT_NOCARRY to
17666 check result of mpz_set_str etc.
17667 * cxx/ismpf.cc: Don't accept "@" for exponent indicator.
17668
17669 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Remove
17670 _open and _mpn variants of mpn_toom3_mul_n, only one style now.
17671 * tune/mul_n_open.c, tune/mul_n_mpn.c: Remove files.
17672
17673 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
17674 (udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
17675
17676 * tests/mpz/t-import.c, tests/mpz/t-export.c: Use octal for character
17677 constants, hex is an ANSI-ism.
17678
17679 * mpn/alpha/ev5/mode1o.c: Corrections to ASSERTs, as per
17680 mpn/generic/mode1o.c.
17681
17682 * mpn/generic/diveby3.c: Add commented out alternative code and notes
17683 for taking the multiply off the dependent chain. Amend/clarify some
17684 of the other comments.
17685
17686 * configure.in (powerpc970-*-*): Use gcc -mcpu=970 when available.
17687 (powerpc7400-*-*): Fallback on gcc -mcpu=750 if -mcpu=7400 not
17688 available.
17689
17690 * doc/gmp.texi (C++ Formatted Input): Note locale digit grouping not
17691 supported.
17692 (C++ Formatted Input, C++ Formatted Output): Cross reference class
17693 interface on overloading.
17694
17695 * mpn/m68k/README: Add various ideas from doc/tasks.html.
17696
17697 * mpn/m88k/README: New file.
17698
17699 2003-10-16 Torbjorn Granlund <[email protected]>
17700
17701 * config.sub: Recognize powerpc970.
17702
17703 2003-10-15 Torbjorn Granlund <[email protected]>
17704
17705 * config.guess: Recognize powerpc970 under MacOS.
17706
17707 2003-10-15 Kevin Ryde <[email protected]>
17708
17709 * configure.in, acinclude.m4 (GMP_C_RIGHT_SHIFT): New test.
17710 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
17711 (udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
17712
17713 * mpn/amd64/amd64-defs.m4: New file, with a non-aligning PROLOGUE.
17714 * configure.in (amd64-*-*): Use it.
17715 * mpn/amd64/addlsh1_n.asm: Add ALIGN(16).
17716
17717 * mpfr/*: Update to mpfr cvs 2003-10-15.
17718
17719 * mpn/generic/get_d.c: Rewrite, simplifying and truncating towards
17720 zero unconditionally.
17721 * tests/mpn/t-get_d.c: Add various further tests.
17722 * gmp-impl.h (FORCE_DOUBLE): New macro.
17723
17724 * gmp-h.in (__mpz_struct): Add comment on __mpz_struct getting into
17725 C++ mangled function names.
17726
17727 * doc/gmp.texi (Build Options): Update notes for new doc subdir.
17728 (Low-level Functions): Note mpn functions don't check for zero limbs
17729 etc, it's up to an application to strip.
17730
17731 * doc/configuration (Configure): mdate-sh now in doc subdir, add
17732 generated fat.h.
17733
17734 2003-10-14 Torbjorn Granlund <[email protected]>
17735
17736 * mpn/ia64/lorrshift.asm: Rewrite.
17737
17738 * mpn/ia64/diveby3.asm: Remove explicit bundling; add branch hints.
17739
17740 2003-10-13 Torbjorn Granlund <[email protected]>
17741
17742 * mpn/ia64/diveby3.asm: New file.
17743
17744 2003-10-13 Kevin Ryde <[email protected]>
17745
17746 * mpn/powerpc32/mod_34lsub1.asm: New file.
17747
17748 * mpn/powerpc32/diveby3.asm, mpn/powerpc64/diveby3.asm: src[] in
17749 second operand of mullw, to allow possible early-out, which the
17750 0xAA..AB inverse cannot give. This improvement noticed by Torbjorn.
17751
17752 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Print to config.log whether
17753 local label is purely temporary or appears in object files, for
17754 development purposes.
17755
17756 * doc/gmp.texi, doc/fdl.texi, doc/texinfo.tex, doc/mdate-sh: Moved
17757 from top-level.
17758 * doc/Makefile.am: New file.
17759 * configure.in (AC_OUTPUT): Add doc/Makefile.
17760 * Makefile.am (SUBDIRS): Move doc subdirectory from EXTRA_DIST.
17761 (info_TEXINFOS, gmp_TEXINFOS): Moved to doc/Makefile.am.
17762 * mpfr/Makefile.am (mpfr_TEXINFOS): fdl.texi now in doc subdir.
17763 (TEXINFO_TEX): texinfo.tex now in doc subdir.
17764 (AM_MAKEINFOFLAGS): Set -I to doc subdir.
17765
17766 * mpz/and.c: For positive/positive, use mpn_and_n, rate a realloc as
17767 UNLIKELY.
17768
17769 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Don't test
17770 for high zero limbs.
17771
17772 2003-10-12 Torbjorn Granlund <[email protected]>
17773
17774 * mpn/powerpc64/diveby3.asm: New file (trivial edits of
17775 powerpc32/diveby3.asm).
17776
17777 * mpn/powerpc32/diveby3.asm: Update cycle counts with more processors.
17778 * mpn/powerpc32/sqr_diagonal.asm: Likewise.
17779
17780 * mpn/pa64/add_n.asm: Correct PA8500 cycle counts.
17781 * mpn/pa64/sub_n.asm: Likewise.
17782
17783 * mpn/m68k/aors_n.asm (INPUT PARAMETERS): Fix typo.
17784 * mpn/m68k/lshift.asm: Likewise.
17785 * mpn/m68k/rshift.asm: Likewise.
17786
17787 * mpn/m68k/README: Correct an URL; add some STATUS comments.
17788
17789 * mpn/ia64/aorslsh1_n.asm: Avoid shrp when shl/shr works just as well.
17790
17791 * mpn/powerpc32/addlsh1_n.asm: New file.
17792 * mpn/powerpc32/sublsh1_n.asm: New file.
17793
17794 2003-10-12 Kevin Ryde <[email protected]>
17795
17796 * mpn/sparc64/divrem_1.c, mpn/sparc64/mod_1.c: New files.
17797 * mpn/sparc64/sparc64.h (HALF_ENDIAN_ADJ, count_leading_zeros_32,
17798 invert_half_limb, udiv_qrnnd_half_preinv): New macros.
17799
17800 * gmp-impl.h (udiv_qrnnd_preinv2): Use a ? : for getting the n1 bit,
17801 so as not to depend on signed right shifts being arithmetic.
17802
17803 * mpn/powerpc32/diveby3.asm: New file.
17804
17805 * mpn/generic/divrem_1.c: Use CNST_LIMB(0) to avoid warnings from
17806 udiv_qrnnd_preinv about shift count when int<long. Do the same with
17807 udiv_qrnnd, for consistency.
17808
17809 * Makefile.am (install-data-hook): Print a warning recommending "make
17810 check" to watch out for compiler bugs. Proposed by Torbjorn.
17811
17812 * mpn/ia64/README (mpn_lshift, mpn_rshift): Amend prospective itanium2
17813 speed, 0.75 c/l with shrp plus shl/shr.
17814
17815 * mpn/ia64/popcount.asm: Add comment on optimality.
17816
17817 2003-10-11 Torbjorn Granlund <[email protected]>
17818
17819 * mpn/ia64/rsh1aors_n.asm: New file.
17820
17821 * mpn/asm-defs.m4: Handle rsh1aors_n.
17822
17823 * configure.in (tmp_mulfunc): Handle rsh1aors_n.
17824
17825 2003-10-11 Kevin Ryde <[email protected]>
17826
17827 * mpn/x86/pentium4/sse2/diveby3.asm: Remove non-PIC RODATA memory
17828 access for 0xAAAAAAAB constant.
17829
17830 * gmp-impl.h (popc_limb, ULONG_PARITY) [ev67, ev68]: Add gcc asm
17831 versions using ctpop.
17832
17833 * mpn/x86/k6/aorsmul_1.asm: Tweak some comments, remove M4_description
17834 and M4_desc_retval used only in comments.
17835
17836 * mpn/x86/k6/mul_basecase.asm: Add comment on using mpn_mul_1.
17837
17838 2003-10-09 Torbjorn Granlund <[email protected]>
17839
17840 * mpn/powerpc64/addlsh1_n.asm: Tweak for 0.25 c/l better loop speed.
17841 * mpn/powerpc64/sublsh1_n.asm: Likewise.
17842
17843 2003-10-09 Kevin Ryde <[email protected]>
17844
17845 * mpfr/*: Update to mpfr cvs 2003-10-09.
17846
17847 * tests/devel/try.c (_SC_PAGESIZE): Define from _SC_PAGE_SIZE on
17848 systems which use that, eg. hpux 9.
17849
17850 2003-10-07 Kevin Ryde <[email protected]>
17851
17852 * tune/freq.c (freq_sysctl_hw_model): Correction to last sscanf change.
17853
17854 * configure.in: Check for psp_iticksperclktick in struct pst_processor.
17855 * tune/freq.c (freq_pstat_getprocessor): Use this.
17856
17857 * tests/devel/try.c (divisor_array): Add a couple of half-limb values.
17858
17859 * acinclude.m4 (GMP_PROG_CC_WORKS): Correction to last change, need to
17860 set result "yes" when cross compiling.
17861
17862 2003-10-06 Torbjorn Granlund <[email protected]>
17863
17864 * mpn/generic/mul_n.c: Use __GMPN_ADD_1/_GMPN_SUB_1 instead of
17865 mpn_add_1 and mpn_sub_1.
17866
17867 * mpn/pa64/aorslsh1_n.asm: Schedule register save and restore code.
17868
17869 2003-10-05 Torbjorn Granlund <[email protected]>
17870
17871 * mpn/pa64/mul_1.asm: Misc comment cleanups.
17872 * mpn/pa64/addmul_1.asm: Likewise.
17873 * mpn/pa64/submul_1.asm: Likewise.
17874
17875 * mpn/pa64/README: Correct cycle counts.
17876
17877 * mpn/pa64/aorslsh1_n.asm: New file.
17878
17879 2003-10-04 Kevin Ryde <[email protected]>
17880
17881 * tune/freq.c (freq_sysctl_hw_model, freq_sunos_sysinfo,
17882 freq_sco_etchw, freq_bsd_dmesg, freq_irix_hinv): Demand matching of
17883 MHz etc at end of sscanf format string. In particular need this for
17884 freq_bsd_dmesg on i486-pc-freebsd4.7 to avoid the 486 cpu being used
17885 for the frequency.
17886
17887 * tests/misc.c, tests/tests.h (tests_setjmp_sigfpe,
17888 tests_sigfpe_handler, tests_sigfpe_done, tests_sigfpe_target,
17889 tests_dbl_mant_bits): New.
17890
17891 * configure.in (viac3*-*-*): Add gcc VIA c3 options.
17892
17893 * mpfr/*: Update to mpfr cvs 2003-10-04.
17894
17895 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
17896 refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps.
17897 * tests/tests.h (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
17898 refmpn_rsh1sub_n): Add prototypes.
17899
17900 * tests/devel/try.c, tune/many.pl: Add mpn_addlsh1_n, mpn_sublsh1_n,
17901 mpn_rsh1add_n, mpn_rsh1sub_n.
17902
17903 2003-10-03 Torbjorn Granlund <[email protected]>
17904
17905 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
17906 refmpn_rsh1sub_n): New functions.
17907
17908 2003-10-03 Paul Zimmermann <[email protected]>
17909
17910 * mpn/generic/mul_n.c (toom3_interpolate): Use mpn_add_1/mpn_sub_1
17911 instead of MPN_INCR_/MPN_DECR_U.
17912
17913 2003-10-02 Torbjorn Granlund <[email protected]>
17914
17915 * configure.in (ia64*-*-hpux*): Fall back to +O1, not +O.
17916
17917 2003-10-02 Kevin Ryde <[email protected]>
17918
17919 * configure.in (ia64*-*-hpux*): For cc, let +O optimization level
17920 fallback if +O3 doesn't work.
17921
17922 * acinclude.m4 (GMP_PROG_CC_WORKS): Add a test of __builtin_alloca
17923 when available, to pick up Itanium HP-UX cc internal errors in +O2.
17924 Provoking code by Torbjorn.
17925
17926 2003-10-01 Torbjorn Granlund <[email protected]>
17927
17928 * mpn/ia64/gmp-mparam.h: Retune.
17929
17930 * mpn/asm-defs.m4: Handle aorslsh1_n.
17931
17932 * configure.in (tmp_mulfunc): Handle aorslsh1_n.
17933
17934 * mpn/ia64/aorslsh1_n.asm: New file.
17935
17936 * mpn/ia64/aors_n.asm: New file, complete rewrite of mpn_add_n and
17937 mpn_sub_n.
17938 * mpn/ia64/add_n.asm: Replace by aors_n.asm.
17939 * mpn/ia64/sub_n.asm: Replace by aors_n.asm.
17940
17941 2003-10-01 Kevin Ryde <[email protected]>
17942
17943 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Make bad ARM last byte into a
17944 separate case and consider it non-IEEE, since it looks like this is
17945 due to some sort of restricted or incorrect software floats.
17946
17947 * demos/calc/Makefile.am: Use automake yacc/lex support, seems fine in
17948 separate objdir now.
17949
17950 * cxx/dummy.cc: Moved from top-level dummy.cc.
17951 * Makefile.am (libgmpxx_la_SOURCES): Update to cxx/dummy.cc,
17952 correction to comment about this.
17953
17954 2003-09-30 Torbjorn Granlund <[email protected]>
17955
17956 * demos/pexpr.c: Correct documentation of -split.
17957 (TIME): Remove cast of result to double.
17958 (main): Change timing variables to int.
17959 (main): #ifdef LIMIT_RESOURCE_USAGE, don't convert numbers of more than
17960 100000 digits.
17961
17962 2003-09-28 Torbjorn Granlund <[email protected]>
17963
17964 * mpn/*/*.asm: Clean up spacing, tabify.
17965
17966 * mpn/alpha/rshift.asm: Table cycle counts.
17967 * mpn/alpha/lshift.asm: Likewise.
17968 * mpn/alpha/ev5/rshift.asm: Likewise.
17969 * mpn/alpha/ev5/lshift.asm: Likewise.
17970 * mpn/alpha/ev6/add_n.asm: Likewise.
17971 * mpn/alpha/ev6/sub_n.asm: Likewise.
17972
17973 * mpn/ia64/lorrshift.asm: Amend comments about performance.
17974
17975 * mpn/pa64/mul_1.asm: Fix comment typo.
17976 * mpn/pa64/addmul_1.asm: Likewise.
17977 * mpn/pa64/submul_1.asm: Likewise.
17978
17979 * mpn/amd64/addlsh1_n.asm: Save/restore carry using two insn to break
17980 recurrency. Add remarks about possible further speedup.
17981 * mpn/amd64/sublsh1_n.asm: Likewise.
17982
17983 * mpn/amd64/rsh1add_n.asm: Add remarks about possible further speedup.
17984 * mpn/amd64/rsh1sub_n.asm: Likewise.
17985
17986 2003-09-27 Torbjorn Granlund <[email protected]>
17987
17988 * mpn/powerpc64/README: Update with POWER4/PPC970 pipeline info.
17989
17990 * mpn/powerpc64/rsh1add_n.asm: New file.
17991 * mpn/powerpc64/rsh1sub_n.asm: New file.
17992 * mpn/powerpc64/rshift.asm: Rewrite.
17993 * mpn/powerpc64/lshift.asm: Rewrite.
17994
17995 2003-09-26 Torbjorn Granlund <[email protected]>
17996
17997 * mpn/powerpc64/addlsh1_n.asm: New file.
17998 * mpn/powerpc64/sublsh1_n.asm: New file.
17999
18000 2003-09-25 Torbjorn Granlund <[email protected]>
18001
18002 * tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
18003 speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): Conditionalize on
18004 corresponding HAVE_NATIVE_*.
18005
18006 2003-09-25 Kevin Ryde <[email protected]>
18007
18008 * mpz/combit.c: Use GMP_NUMB_BITS not BITS_PER_MP_LIMB.
18009
18010 * demos/expr/exprfr.c: Allow for mpfr_inf_p, mpfr_nan_p and
18011 mpfr_number_p merely returning non-zero, rather than 1 or 0.
18012
18013 * demos/expr/exprfr.c, demos/expr/t-expr.c: Add erf, integer_p, zeta.
18014
18015 * demos/expr/Makefile.am (LDADD): Update comments on $(LIBM).
18016
18017 2003-09-24 Torbjorn Granlund <[email protected]>
18018
18019 * tune/speed.c (routine): Add entries for mpn_addlsh1_n, mpn_sublsh1_n,
18020 mpn_rsh1add_n, and mpn_rsh1sub_n.
18021
18022 * tune/speed.h: Declare speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
18023 speed_mpn_rsh1add_n, and speed_mpn_rsh1sub_n.
18024
18025 * tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
18026 speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): New functions.
18027
18028 * gmp-impl.h: Declare mpn_addlsh1_n, mpn_sublsh1_n, mpn_rsh1add_n, and
18029 mpn_rsh1sub_n.
18030
18031 * mpn/asm-defs.m4: Add define_mpn's for addlsh1_n, sublsh1_n,
18032 rsh1add_n, and rsh1sub_n.
18033
18034 * mpn/powerpc64/*.asm: Add cycle counts in consistent style. Misc
18035 styling edits.
18036
18037 * mpn/amd64/gmp-mparam.h: Retune.
18038
18039 * configure.in: Add #undefs for HAVE_NATIVE_mpn_addlsh1_n,
18040 HAVE_NATIVE_mpn_sublsh1_n, HAVE_NATIVE_mpn_rsh1add_n,
18041 HAVE_NATIVE_mpn_rsh1sub_n.
18042 (gmp_mpn_functions_optional): List addlsh1_n, sublsh1_n, rsh1add_n,
18043 and rsh1sub_n.
18044
18045 * mpn/amd64/addlsh1_n.asm: New file.
18046 * mpn/amd64/sublsh1_n.asm: New file.
18047 * mpn/amd64/rsh1add_n.asm: New file.
18048 * mpn/amd64/rsh1sub_n.asm: New file.
18049
18050 2003-09-24 Kevin Ryde <[email protected]>
18051
18052 * mpfr/*: Update to mpfr cvs 2003-09-24.
18053
18054 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Remove conftest* temporary files.
18055
18056 2003-09-23 Torbjorn Granlund <[email protected]>
18057
18058 * gmp-impl.h (MUL_TOOM3_THRESHOLD, SQR_TOOM3_THRESHOLD): Now 128.
18059
18060 2003-09-23 Kevin Ryde <[email protected]>
18061
18062 * gmp-h.in (gmp_randinit_set): Use __gmp_const rather than const.
18063
18064 2003-09-22 Torbjorn Granlund <[email protected]>
18065
18066 * tune/mul_n_mpn.c: (__gmpn_sqr_n): New #define.
18067 * tune/mul_n_open.c (__gmpn_sqr_n): New #define.
18068
18069 * mpn/generic/mul.c (mpn_sqr_n): Move from here...
18070 * mpn/generic/mul_n.c (mpn_sqr_n): ...to here.
18071 (mpn_sqr_n): Allocate workspace for toom3 using TMP_* mechanism except
18072 for very large operands when !WANT_FFT.
18073
18074 * mpn/generic/mul_n.c: Add a missing ";". Misc comment fixes.
18075
18076 * mpn/generic/mul.c: Remove spurious #include <stdio.h>.
18077
18078 * mpn/x86/k7/gmp-mparam.h: Retune.
18079
18080 * mpn/generic/mul_n.c (mpn_mul_n): Allocate workspace for toom3 using
18081 TMP_* mechanism except for very large operands when !WANT_FFT.
18082
18083 * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE):
18084 Define conditionally on WANT_FFT and HAVE_NATIVE_mpn_sublsh1_n.
18085 (MPN_TOOM3_MAX_N): New #define.
18086
18087 * mpn/amd64/gmp-mparam.h: Retune.
18088
18089 * mpn/Makefile.am (TARG_DIST): Add amd64.
18090
18091 * mpn/generic/sqr_basecase.c: Use mpn_addlsh1_n when available.
18092
18093 * mpn/generic/mul_n.c: Use proper form for HAVE_NATIVE macros.
18094
18095 2003-09-22 Kevin Ryde <[email protected]>
18096
18097 * mpfr/*: Update to mpfr cvs 2003-09-22.
18098
18099 2003-09-21 Kevin Ryde <[email protected]>
18100
18101 * mpn/x86/pentium4/sse2/gmp-mparam.h (USE_PREINV_DIVREM_1,
18102 USE_PREINV_MOD_1): Set to 1 for new asm versions.
18103
18104 * mpfr/*: Update to mpfr cvs 2003-09-21.
18105
18106 2003-09-21 Paul Zimmermann <[email protected]>
18107
18108 * mpn/generic/mul_n.c (mpn_toom3_mul_n): Conditionally use
18109 mpn_sublsh1_n, mpn_rsh1add_n and mpn_rsh1sub_n, in addition to
18110 mpn_addlsh1_n. Avoid all copying, at the expense of some additional
18111 workspace.
18112
18113 * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Accommodate
18114 latest toom3 code.
18115
18116 2003-09-19 Kevin Ryde <[email protected]>
18117
18118 * mpn/x86/pentium4/sse2/divrem_1.asm, mpn/x86/pentium4/sse2/mod_1.asm:
18119 New files.
18120
18121 2003-09-16 Kevin Ryde <[email protected]>
18122
18123 * tune/speed.c (run_one): Don't scale the -1.0 not-available return.
18124 Print "n/a" for times not-available.
18125
18126 2003-09-13 Paul Zimmermann <[email protected]>
18127
18128 * mpn/generic/mul_n.c (toom3_interpolate): New function.
18129 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Call toom3_interpolate.
18130
18131 2003-09-12 Torbjorn Granlund <[email protected]>
18132
18133 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove unused
18134 variables.
18135 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Use offset `+ 1', not `+ 2' in last
18136 MPN_DECR_U calls.
18137
18138 2003-09-12 Paul Zimmermann <[email protected]>
18139
18140 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Rewrite.
18141
18142 2003-09-12 Torbjorn Granlund <[email protected]>
18143
18144 * gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Reformulate
18145 to use the same form as MPN_TOOM3_MUL_N_TSIZE.
18146 (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Update for new Toom3
18147 code requirements.
18148 * mpn/generic/mul_n.c (evaluate3, interpolate3, add2Times): Remove.
18149 (USE_MORE_MPN): Remove.
18150
18151 2003-08-31 Kevin Ryde <[email protected]>
18152
18153 * mpfr/*: Update to mpfr cvs 2003-08-31.
18154
18155 2003-08-30 Kevin Ryde <[email protected]>
18156
18157 * mpfr/*: Update to mpfr cvs 2003-08-30.
18158
18159 2003-08-29 Torbjorn Granlund <[email protected]>
18160
18161 * mpn/amd64/copyi.asm: New file.
18162 * mpn/amd64/copyd.asm: New file.
18163 * mpn/amd64/README: New file.
18164
18165 2003-08-28 Torbjorn Granlund <[email protected]>
18166
18167 * mpn/amd64/lshift.asm: New file.
18168 * mpn/amd64/rshift.asm: New file.
18169 * mpn/amd64/gmp-mparam.h: Retune.
18170
18171 2003-08-23 Kevin Ryde <[email protected]>
18172
18173 * tune/freq.c (freq_getsysinfo): Correction to speed_cycletime value
18174 established.
18175
18176 * mpz/rootrem.c, gmp-h.in, gmp.texi (mpz_rootrem): Don't return
18177 exactness indication, can get that from testing the remainder.
18178
18179 * mpn/x86/k7/aors_n.asm, mpn/x86/k7/mmx/copyi.asm: Amend to comments
18180 about loads and stores and what speed should be possible.
18181
18182 2003-08-22 Torbjorn Granlund <[email protected]>
18183
18184 * mpn/amd64/add_n.asm: New file.
18185 * mpn/amd64/sub_n.asm: New file.
18186 * mpn/amd64/mul_1.asm: New file.
18187 * mpn/amd64/addmul_1.asm: New file.
18188 * mpn/amd64/submul_1.asm: New file.
18189
18190 2003-08-19 Kevin Ryde <[email protected]>
18191
18192 * longlong.h (add_ssaaaa, sub_ddmmss) [hppa 64]: Move down into main
18193 __GNUC__ block. Exclude for _LONG_LONG_LIMB (ie. ABI=2.0n) since
18194 these forms are only for ABI=2.0w.
18195
18196 * longlong.h (count_leading_zeros) [__mcpu32__]: Check __mcpu32__ to
18197 avoid bfffo on GCC 3.4 in CPU32 mode. Reported by Bernardo Innocenti.
18198
18199 * longlong.h (count_trailing_zeros) [x86_64]: Use "%q0" to force
18200 64-bit register destination. Pointed out by Torbjorn.
18201
18202 * mpz/combit.c: Correction to carry handling when extending a
18203 negative, and use __GMPN_ADD_1. Correction to complement limb for a
18204 negative when there's a non-zero low limb.
18205 * tests/mpz/bit.c (check_clr_extend, check_com_negs): Exercise these.
18206
18207 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add
18208 get_d_2exp.
18209 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Rand.pm,
18210 demos/perl/test.pl: Add gmp_urandomb_ui, gmp_urandomm_ui.
18211 (GMP::Rand::randstate): Accept a randstate object to copy.
18212 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Mpz.pm,
18213 demos/perl/test.pl: Add combit, rootrem.
18214
18215 2003-08-19 Torbjorn Granlund <[email protected]>
18216
18217 * tune/Makefile.am (EXTRA_DIST): Add amd64.asm.
18218
18219 2003-08-17 Kevin Ryde <[email protected]>
18220
18221 * gmpxx.h [__MPFR_H]: Include full <iostream> for inlines.
18222 * tests/cxx/t-headfr.cc: New file, exercising this.
18223 * tests/cxx/Makefile.am: Add it.
18224
18225 * tests/cxx/t-constr.cc: Include config.h for WANT_MPFR.
18226
18227 * gmpxx.h: Correction to temp variable type in mpf -> mpfr assignment.
18228 Reported by Derrick Bass.
18229 * tests/cxx/t-assign.cc (check_mpfr): Exercise this.
18230
18231 * configure.in (WANT_MPFR): AC_DEFINE this, for the benefit of
18232 tests/cxx/t-*.cc. (Was always meant to have been defined.)
18233 * tests/cxx/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpfr.
18234
18235 * gmpxx.h: __gmp_default_rounding_mode -> __gmpfr_default_rounding_mode
18236 (struct __gmp_hypot_function): Correction to mpfr_hypot addition.
18237 * tests/cxx/t-misc.cc (check_mpfr_hypot): Corrections to mpfr/long
18238 tests.
18239
18240 2003-08-16 Torbjorn Granlund <[email protected]>
18241
18242 * configure.in (amd64): New.
18243
18244 * mpn/amd64/gmp-mparam.h: New file.
18245
18246 * tune/amd64.asm: New file, derived in part from tune/pentium.asm.
18247
18248 2003-08-15 Kevin Ryde <[email protected]>
18249
18250 * tune/freq.c (freq_irix_hinv): Reinstate, for the benefit of IRIX 6.2.
18251 (freq_attr_get_invent): Conditionalize on INFO_LBL_DETAIL_INVENT too.
18252
18253 2003-08-14 Kevin Ryde <[email protected]>
18254
18255 * mpq/get_d.c: Use mpn_get_d.
18256 * tests/mpq/t-get_d.c (check_onebit): New test.
18257
18258 * gmp.texi (Notes for Particular Systems): Under x86 cpu types, note
18259 i386 is a fat binary, remove pentium4 recommendation since i386 is now
18260 quite reasonable for p4.
18261 (Notes for Particular Systems): Under Windows DLLs, remove caveat
18262 about --enable-cxx now ok, update .lib creation for new libtool,
18263 remove .exp not needed for MS C.
18264 (Notes for Package Builds): i386 is a fat binary.
18265 (Reentrancy): Remove SCO ctype.h note, don't want to list every system
18266 misfeature, and was quite possibly for non-threading mode anyway.
18267 (Autoconf): Remove notes on gmp 2 detection, too old to want to
18268 encourage anyone to use.
18269 (Karatsuba Multiplication): Correction to threshold increase/decrease
18270 for a and b terms. Reported by Richard Brent and Paul Zimmermann.
18271 Also add various further index entries.
18272
18273 * tune/freq.c (freq_attr_get_invent): New function.
18274 (freq_irix_hinv): Remove, in favour or freq_attr_get_invent.
18275 * configure.in (AC_CHECK_FUNCS): Add attr_get.
18276 (AC_CHECK_HEADERS): Add invent.h, sys/attributes.h, sys/iograph.h.
18277
18278 2003-08-03 Kevin Ryde <[email protected]>
18279
18280 * tune/tuneup.c (tune_mul): Use MUL_KARATSUBA_THRESHOLD_LIMIT.
18281
18282 2003-08-02 Kevin Ryde <[email protected]>
18283
18284 * mpn/asm-defs.m4: Tweak some comments, add hpux11 to m4wrap 0xFF
18285 problem systems.
18286
18287 * configure.in (*-*-sco3.2v5*): Remove lt_cv_archive_cmds_need_lc=no,
18288 since libtool no longer uses it. This was a workaround fixing ctype.h
18289 in SCO 5 shared libraries; not sure if libtool now gets it right on
18290 its own, let's hope so.
18291
18292 * configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Remove, libtool no
18293 longer demands HOST_CC.
18294
18295 * configure.in: When C or C++ compiler not found, refer user to
18296 config.log.
18297
18298 * configure.in (i386-*-*): Turn i386 into a fat binary build.
18299 * mpn/x86/fat/fat.c, mpn/x86/fat/fat_entry.asm,
18300 mpn/x86/fat/gmp-mparam.h, mpn/x86/fat/gcd_1.c, mpn/x86/fat/mode1o.c:
18301 New files.
18302 * gmp-impl.h (struct cpuvec_t) [x86 fat]: New structure.
18303 * longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB) [x86 fat]: Define.
18304 * mpn/asm-defs.m4 (foreach): New macro.
18305 * mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): New define.
18306 * mpn/x86/sqr_basecase.asm: New file, primarily as a fallback for fat
18307 binaries.
18308 * mpn/x86/p6/gmp-mparam.h, mpn/x86/p6/mmx/gmp-mparam.h: Add comments
18309 about fat binary SQR_KARATSUBA_THRESHOLD for p6 and p6/mmx.
18310
18311 * configure.in: Add various supports for fat binaries, via fat_path,
18312 fat_functions and fat_thresholds variables.
18313 * acinclude.m4 (GMP_STRIP_PATH): Mung $fat_path too.
18314 (GMP_FAT_SUFFIX, GMP_REMOVE_FROM_LIST): New macros.
18315 * gmp-impl.h: Add various supports for fat binaries.
18316 (DECL_add_n etc): New macros.
18317 (mpn_mul_basecase etc): Define only if not already defined.
18318 * mpn/asm-defs.m4 (m4_config_gmp_mparam): Mention fat binary.
18319 (MPN): Use m4_unquote, for the benefit of fat binary name expansion.
18320 * doc/configuration: Notes on fat binaries.
18321 * gmp-impl.h (MUL_TOOM3_THRESHOLD_LIMIT): Define always.
18322 (MUL_KARATSUBA_THRESHOLD_LIMIT): New define.
18323 * mpn/generic/mul.c, mpn/generic/mul_n.c: Use these.
18324 * tune/divrem1div.c, tune/divrem1inv.c, tune/mod_1_div.c,
18325 tune/mod_1_inv.c: Define OPERATION_divrem_1 and OPERATION_mod_1, to
18326 tell fat.h what's being done.
18327
18328 * config.guess (alpha-*-*): Update comments on what configfsf.guess
18329 does and doesn't do for us.
18330
18331 2003-07-31 Kevin Ryde <[email protected]>
18332
18333 * config.guess: Remove $dummy.o files everywhere, in case vendor
18334 compilers produce that even when not asked.
18335
18336 * demos/perl/GMP.xs (class_or_croak): Rename "class" parameter to
18337 avoid C++ keyword.
18338 (coerce_ulong, coerce_long): Move croaks to stop g++ 3.3 complaining
18339 about uninitialized variables.
18340
18341 * demos/perl/INSTALL: Add notes on building with a DLL.
18342
18343 * longlong.h (count_trailing_zeros) [x86_64]: Ensure bsfq destination
18344 is a 64-bit register. Diagnosed by Francois G. Dorais.
18345
18346 2003-07-31 Torbjorn Granlund <[email protected]>
18347
18348 * longlong.h [ppc]: Remove nested test for vxworks.
18349
18350 2003-07-24 Kevin Ryde <[email protected]>
18351
18352 * gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si for
18353 mpz*long and long*mpz.
18354 * tests/cxx/t-ops.cc (check_mpz): Exercise mpz*long and mpz*ulong.
18355
18356 * cxx/ismpf.cc: Use std::locale decimal point when available. Expect
18357 localeconv available always.
18358 * tests/cxx/t-locale.cc: Enable check_input tests.
18359
18360 * gmpxx.h (struct __gmp_hypot_function): Use mpfr_hypot.
18361 * tests/cxx/t-misc.cc (check_mpfr_hypot): New tests.
18362
18363 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-ops.cc,
18364 tests/cxx/t-prec.cc, tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc:
18365 Include config.h for WANT_MPFR.
18366
18367 * tests/mpz/bit.c (check_single): Correction to a diagnostic print.
18368
18369 2003-07-24 Niels Möller <[email protected]>
18370
18371 * mpz/combit.c: New file.
18372 * Makefile.am, mpz/Makefile.am: Add it.
18373 * gmp-h.in (mpz_combit): Add prototype.
18374 * tests/mpz/bit.c (check_single): Exercise mpz_combit.
18375
18376 2003-07-16 Kevin Ryde <[email protected]>
18377
18378 * mpn/generic/get_d.c: Correction to infinity handling for large exp.
18379
18380 2003-07-14 Kevin Ryde <[email protected]>
18381
18382 * mpz/get_d.c, mpz/get_d_2exp.c, mpf/get_d.c, mpf/get_d_2exp.c: Use
18383 mpn_get_d.
18384
18385 * mpn/generic/get_d.c: New file, based on mpz/get_d.c and insert-dbl.c.
18386 * configure.in, mpn/Makefile.am: Add it.
18387 * gmp-impl.h (mpn_get_d): Add prototype.
18388
18389 * tests/mpn/t-get_d.c: New file.
18390 * tests/mpn/Makefile.am: Add it.
18391
18392 * tests/mpz/t-get_d_2exp.c (check_onebit, check_round): Test negatives.
18393 (check_onebit): Add a few more bit sizes.
18394
18395 * tests/misc.c, tests/tests.h (tests_isinf): New function.
18396
18397 2003-07-12 Kevin Ryde <[email protected]>
18398
18399 * configure.in (GMP_PROG_CXX_WORKS): Include $CPPFLAGS, same as
18400 automake does in the actual build.
18401
18402 * acinclude.m4 (GMP_PROG_CXX_WORKS): In the namespace test, declare
18403 namespace before trying to use. In std iostream test, provoke a
18404 failure from Compaq C++ in pre-standard mode.
18405
18406 2003-07-08 Kevin Ryde <[email protected]>
18407
18408 * acinclude.m4 (GMP_PROG_CC_WORKS): Use separate compiles for various
18409 known problems, and indicate to the user the reason for rejecting.
18410 (GMP_PROG_CXX_WORKS): Ditto, and insist on being able to execute each
18411 compiled program.
18412
18413 2003-07-05 Kevin Ryde <[email protected]>
18414
18415 * config.sub: Add comments to our alias transformations.
18416
18417 * configfsf.sub, configfsf.guess: Update to 2003-07-04.
18418
18419 * acinclude.m4 (GMP_PROG_CC_WORKS, GMP_PROG_CC_WORKS_LONGLONG): Show
18420 failing program in config.log, per other autoconf tests.
18421
18422 * configure.in (i786-*-*): Recognise as pentium4, per configfsf.sub.
18423
18424 2003-06-28 Kevin Ryde <[email protected]>
18425
18426 * mpz/get_d_2exp.c, mpf/get_d_2exp.c: Avoid res==1.0 when floats round
18427 upwards.
18428
18429 * tests/mpz/t-get_d_2exp.c: New file.
18430 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
18431 * tests/mpf/t-get_d_2exp.c: New file.
18432 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
18433 * tests/x86call.asm, test/tests.h (x86_fldcw, x86_fstcw): New
18434 functions.
18435 * tests/misc.c, tests/tests.h (tests_hardware_getround,
18436 tests_hardware_setround): New functions.
18437
18438 2003-06-25 Kevin Ryde <[email protected]>
18439
18440 * mpn/sparc64/dive_1.c: New file.
18441
18442 * mpn/sparc64/sparc64.h: New file.
18443 * mpn/sparc64/mode1o.c: Remove things now in sparc64.h.
18444
18445 * mpfr/*: Update to mpfr cvs 2003-06-25.
18446
18447 * acinclude.m4 (GMP_PROG_CC_WORKS): In last change provoking gnupro
18448 gcc, don't use ANSI style function definition.
18449
18450 2003-06-22 Kevin Ryde <[email protected]>
18451
18452 * mpn/pa32/hppa1_1/udiv.asm: Remove .proc, .entry, .exit and .procend,
18453 handled by PROLOGUE and EPILOGUE. Comment out .callinfo, per other
18454 asm files.
18455
18456 * gmpxx.h (mpz_class __gmp_binary_divides, __gmp_binary_modulus): Fix
18457 long/mpz and long%mpz for dividend==LONG_MIN divisor==-LONG_MIN.
18458 (mpz_class __gmp_binary_modulus): Fix mpz%long for negative dividend.
18459 * tests/cxx/t-ops.cc (check_mpz): Add test cases for these, merging
18460 operator/ and operator% sections for clarity.
18461
18462 2003-06-21 Kevin Ryde <[email protected]>
18463
18464 * mpfr/*: Update to mpfr cvs 2003-06-21.
18465
18466 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code by Torbjorn provoking an
18467 ICE from gcc 2.9-gnupro-99r1 under -O2 -mcpu=ev6.
18468 * configure.in (alpha*-*-* gcc_cflags_cpu): Fallback on -mcpu=ev56 for
18469 this compiler.
18470
18471 * gmpxx.h (get_d): Remove comments about long double, double is
18472 correct for get_d, a future long double form would be get_ld.
18473
18474 2003-06-19 Kevin Ryde <[email protected]>
18475
18476 * mpfr/*: Update to mpfr cvs 2003-06-19.
18477
18478 * mpn/generic/dive_1.c: Share src[0] fetch among all cases. No need
18479 for separate final umul_ppmm in even case, make it part of the loop.
18480
18481 * mpz/get_d_2exp.c, mpq/set_si.c, mpq/set_ui.c: Nailify.
18482
18483 * mpf/iset_si.c: Rewrite using mpf/set_si.c code, in particular this
18484 nailifies it.
18485 * tests/mpf/t-set_si.c: Nailify tests.
18486
18487 * mpf/iset_ui.c: Nailify, as per mpf/set_ui.c
18488 * tests/mpf/t-set_ui.c: New file.
18489 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
18490
18491 2003-06-15 Kevin Ryde <[email protected]>
18492
18493 * mpfr/*: Update to mpfr cvs 2003-06-15.
18494
18495 * mpn/x86/k6/mode1o.asm: Remove a bogus ASSERT.
18496
18497 2003-06-12 Kevin Ryde <[email protected]>
18498
18499 * configure.in (--enable-assert): Emit WANT_ASSERT to config.m4.
18500 * mpn/powerpc32/powerpc-defs.m4, mpn/x86/x86-defs.m4 (ASSERT): Check
18501 WANT_ASSERT is defined.
18502
18503 * mpn/sparc32/v9/udiv.asm: Amend heading, this file is for sparc v9.
18504
18505 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): In libtool openbsd hack,
18506 discard error messages from cp, for the benefit of --disable-shared or
18507 systems not using names libgmp.so.*.
18508
18509 * tests/devel/try.c (try_one): When overlapping, copy source data
18510 after filling dst. Previously probably used only DEADVAL in
18511 overlapping cases.
18512
18513 2003-06-11 Torbjorn Granlund <[email protected]>
18514
18515 * mpf/random2.c: Rewrite. Ignore sign of exp parameter.
18516
18517 2003-06-10 Kevin Ryde <[email protected]>
18518
18519 * mpn/sparc64/mode1o.c: New file.
18520
18521 2003-06-09 Torbjorn Granlund <[email protected]>
18522
18523 * mpn/powerpc32/lshift.asm: Add more cycle counts.
18524 * mpn/powerpc32/rshift.asm: Add more cycle counts.
18525
18526 * mpn/ia64/addmul_1.asm: Reformat comments for 80 columns.
18527
18528 * gmp-impl.h (udiv_qrnnd_preinv1): New name for udiv_qrnnd_preinv.
18529 (udiv_qrnnd_preinv2): New name for udiv_qrnnd_preinv2norm.
18530 (udiv_qrnnd_preinv): New #define, making udiv_qrnnd_preinv2
18531 the default.
18532 * tune/speed.c: Corresponding changes.
18533 * tune/speed.h: Likewise.
18534 * tune/common.c: Likewise.
18535
18536 * mpf/get_str.c: Simplify `off' computation.
18537
18538 * longlong.h: Tabify.
18539
18540 2003-06-09 Kevin Ryde <[email protected]>
18541
18542 * gmp.texi (ABI and ISA): FreeBSD has sparc64 too, just say "BSD" to
18543 cover all flavours.
18544 * configure.in: Ditto in some comments.
18545
18546 * mpfr/*: Update to mpfr cvs 2003-06-09.
18547
18548 * tests/cxx/Makefile.am (LDADD): Add -L$(top_builddir)/$(LIBS), for
18549 the benefit of gcc 3.2 on itanium2-hp-hpux11.22.
18550
18551 * tune/many.pl (mul_2): Add speed routine settings.
18552 (MAKEFILE): Close when done, for the benefit of development hackery.
18553
18554 2003-06-08 Kevin Ryde <[email protected]>
18555
18556 * mpfr/*: Update to mpfr cvs 2003-06-08.
18557
18558 * mpn/x86/x86-defs.m4 (femms): Remove fallback to emms.
18559 (cmovCC, psadbw): Remove simulated versions.
18560 (cmov_available_p, psadbw_available_p): Remove.
18561 This trickery was only ever for development purposes on machines
18562 without those instructions. Removing it simplifies gmp and in
18563 particular avoids complications for fat binary builds. Development
18564 can be done with a wrapper around "as" if really needed.
18565
18566 * mpn/x86/divrem_1.asm: Don't use loop_or_decljnz, now K6 has its own
18567 mpn/x86/k6/divrem_1.asm. Amend K6 comments now moved to there.
18568 * mpn/x86/x86-defs.m4 (loop_or_decljnz): Remove, no longer used.
18569
18570 * mpn/x86/k6/divrem_1.asm: New file, derived from mpn/x86/divrem_1.asm.
18571
18572 * mpn/x86/k6/pre_mod_1.asm: Remove comments now in mpn/x86/mod_1.asm.
18573
18574 * mpn/x86/mod_1.asm: Put mpn_mod_1c after mpn_mod_1 for better branch
18575 prediction. Put done_zero at end for less wastage in alignment. Use
18576 decl+jnz unconditionally since in fact it's ok on k6. Amend comments.
18577
18578 2003-06-07 Kevin Ryde <[email protected]>
18579
18580 * mpn/generic/mode1o.c: Fix ASSERTs on return value.
18581
18582 * gmp.texi (Build Options): Add viac3 and viac32 cpu types.
18583 (ABI and ISA): Note on sparcv9 ABI=32 vs ABI=64 speed. More indexing.
18584
18585 * configfsf.guess, configfsf.sub: Update to 2003-06-06.
18586 * config.guess: Remove $RANDOM hack supporting netbsd 1.4, not needed
18587 by new configfsf.guess.
18588
18589 2003-06-06 Torbjorn Granlund <[email protected]>
18590
18591 * mpn/ia64/submul_1.asm: Add branch over .align block.
18592
18593 2003-06-05 Torbjorn Granlund <[email protected]>
18594
18595 * longlong.h (add_ssaaaa) [pa64]: Output zero operand as register 0.
18596 Allow more immediate operands.
18597 (sub_ddmmss) [pa64]: Likewise.
18598 (add_ssaaaa) [pa32]: Likewise.
18599 (sub_ddmmss) [pa32]: Likewise.
18600
18601 * mpn/pa64: Change ".level 2.0W" to ".level 2.0w" to please
18602 picky GNU assembler.
18603
18604 2003-06-05 Kevin Ryde <[email protected]>
18605
18606 * gmp.texi (Integer Special Functions): In mpz_array_init, fix type
18607 shown for integer_array and give an example use.
18608
18609 2003-06-04 Torbjorn Granlund <[email protected]>
18610
18611 * mpf/set_str.c (mpf_set_str): Work around gcc 2 bug triggered on
18612 alpha.
18613
18614 2003-06-03 Kevin Ryde <[email protected]>
18615
18616 * mpn/x86/pentium/README: Add 7 c/l mmx mul_1, tweak wordings.
18617
18618 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Use octal char constants in test
18619 program, hex is not supported by K&R.
18620
18621 2003-06-02 Torbjorn Granlund <[email protected]>
18622
18623 * mpn/mips64/divrem_1.asm: New file.
18624
18625 2003-06-01 Torbjorn Granlund <[email protected]>
18626
18627 * mpn/powerpc32/lshift.asm: Reformat code.
18628 * mpn/powerpc32/rshift.asm: Reformat code.
18629
18630 2003-05-30 Kevin Ryde <[email protected]>
18631
18632 * tests/misc.c (tests_start): Set stdout and stderr to unbuffered, to
18633 avoid any chance of losing output on segv etc.
18634
18635 2003-05-28 Torbjorn Granlund <[email protected]>
18636
18637 * mpf/get_str.c: Move label `done' to match TMP_MARK and TMP_FREE.
18638 Remove redundant variable prec.
18639
18640 2003-05-26 Torbjorn Granlund <[email protected]>
18641
18642 * tests/mpz/convert.c: Test bases up to 62.
18643
18644 * tests/mpf/t-conv.c: Test bases up to 62.
18645
18646 * demos/pexpr.c: Don't iterate to get accurate timing.
18647
18648 * mpf/set_str.c (mpn_pow_1_highpart): Cleanup.
18649
18650 * mp_dv_tab.c: Fix typo.
18651
18652 * mpf/get_str.c: Rewrite (now sub-quadratic).
18653
18654 2003-05-22 Kevin Ryde <[email protected]>
18655
18656 * tests/mpn/t-divrem_1.c: New file.
18657 * tests/mpn/Makefile.am: Add it.
18658
18659 2003-05-22 Torbjorn Granlund <[email protected]>
18660
18661 * config.sub: Recognize viac3* processors.
18662
18663 2003-05-20 Torbjorn Granlund <[email protected]>
18664
18665 * mpn/sparc64/addmul_2.asm: New file.
18666
18667 2003-05-19 Torbjorn Granlund <[email protected]>
18668
18669 * configure.in: Recognize alphaev7* as alphaev67.
18670
18671 * config.guess: Recognize viac3* processors.
18672 * configure.in: Set up path for viac3* processors.
18673 * acinclude.m4 (X86_PATTERN): Include viac3* processors.
18674
18675 2003-05-19 Kevin Ryde <[email protected]>
18676
18677 * tune/freq.c (freq_pstat_getprocessor): New function.
18678 (freq_all): Use it.
18679 * configure.in (AC_CHECK_HEADERS): Add sys/pstat.h.
18680 (AC_CHECK_FUNCS): Add pstat_getprocessor.
18681
18682 2003-05-15 Kevin Ryde <[email protected]>
18683
18684 * mpn/generic/mul_fft.c (mpn_mul_fft_decompose): Remove "inline",
18685 since the code is a bit too big. gcc doesn't actually inline when
18686 alloca (TMP_ALLOC) is used anyway.
18687
18688 2003-05-13 Kevin Ryde <[email protected]>
18689
18690 * gmp.texi (Notes for Particular Systems): Libtool directory is .libs
18691 not _libs for mingw dll. Reported by Andreas Fabri.
18692
18693 2003-05-07 Kevin Ryde <[email protected]>
18694
18695 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code to generate sse2/xmm code
18696 from gcc -march=pentium4, to check the assembler supports that.
18697 (GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): New macros.
18698 * configure.in (pentium4-*-*): Use them to see if gcc -march=pentium4
18699 (with sse2) is ok.
18700
18701 2003-05-06 Kevin Ryde <[email protected]>
18702
18703 * mpz/com.c: Rate size==0 as UNLIKELY, fix comment to mpn_add_1.
18704
18705 * tune/freq.c (<sys/sysinfo.h>): Include only when needed for
18706 getsysinfo(), to avoid a problem with this file on AIX 5.1.
18707
18708 2003-05-03 Torbjorn Granlund <[email protected]>
18709
18710 * mpf/set_str.c: Do not ignore supposedly superfluous digits (in part
18711 reverting last change).
18712
18713 2003-05-03 Kevin Ryde <[email protected]>
18714
18715 * gmp.texi: Use @code for files in @cindex entries, it looks nicer
18716 than @file.
18717
18718 * Makefile.am: Note gmp 4.1.1 and 4.1.2 version info.
18719
18720 * configure.in, acinclude.m4 (GMP_CRAY_OPTIONS): New macro for Cray
18721 system setups, letting AC_REQUIRE do its job instead of a hard coded
18722 AC_PROG_EGREP.
18723
18724 * config.guess: Amend fake RANDOM to avoid ". configfsf.guess" which
18725 segfaults on Debian "ash" 0.4.16.
18726
18727 2003-05-01 Kevin Ryde <[email protected]>
18728
18729 * configure.in (AC_CHECK_FUNCS): Add getsysinfo.
18730 (AC_CHECK_HEADERS): Add sys/sysinfo.h and machine/hal_sysinfo.h.
18731 * tune/freq.c (freq_getsysinfo): New function.
18732 (freq_all): Use it.
18733 (freq_sysctlbyname_i586_freq, freq_sysctlbyname_tsc_freq,
18734 freq_sysctl_hw_cpufrequency, freq_sysctl_hw_model): Set
18735 speed_cycletime before trying to print it, when verbose.
18736
18737 2003-04-28 Torbjorn Granlund <[email protected]>
18738
18739 * mpf/set_str.c: Major overhaul.
18740 (mpn_pow_1_highpart): New helper function, meat extracted from
18741 mpf_set_str.
18742
18743 2003-04-24 Kevin Ryde <[email protected]>
18744
18745 * acinclude.m4 (GMP_GCC_ARM_UMODSI): Quote result string against m4.
18746
18747 * configure, ltmain.sh, aclocal.m4: Update to libtool 1.5.
18748
18749 * longlong.h (add_ssaaaa) [all]: Remove first "%" commutative in each,
18750 since gcc only supports one per asm.
18751
18752 * printf/doprnt.c: Add M for mp_limb_t.
18753 * tests/misc/t-printf.c: Exercise this.
18754
18755 * tests/mpz/t-cmp_d.c: Test infinities.
18756 * tests/mpf/t-cmp_d.c: New file.
18757 * tests/mpf/Makefile.am: Add it.
18758
18759 * mpz/cmp_d.c, mpz/cmpabs_d.c, mpf/cmp_d.c: NaN invalid, Inf bigger
18760 than any value.
18761 * mpz/set_d.c, mpq/set_d.c, mpf/set_d.c: Nan or Inf invalid.
18762
18763 * configure.in (AC_CHECK_FUNCS): Add raise.
18764 * invalid.c: New file.
18765 * Makefile.am: Add it.
18766 * gmp-impl.h (__gmp_invalid_operation): Add prototype.
18767 (DOUBLE_NAN_INF_ACTION): New macro.
18768
18769 * tests/trace.c, tests/tests.h (d_trace): New function.
18770 * tests/misc.c, tests/tests.h (tests_infinity_d): New function.
18771 * tests/misc.c (mpz_erandomb, mpz_errandomb): Use gmp_urandomm_ui.
18772
18773 * tune/tuneup.c, tune/common.c, tests/devel/try.c: Cast various
18774 mp_size_t values for printf %ld in case mp_size_t==int. Use
18775 gmp_printf for mp_limb_t values.
18776
18777 * gmp.texi (Nomenclature and Types): Add mp_exp_t, mp_size_t,
18778 gmp_randstate_t. Note ulong for bit counts and size_t for byte
18779 counts. Don't bother with @noindent.
18780 (Debugging): New valgrind is getting MMX/SSE.
18781 (Integer Comparisons): mpz_cmp_d and mpz_cmpabs_d on NaNs and Infs.
18782 (Float Comparison): mpf_cmp_d behaviour on NaNs and Infs.
18783 (Low-level Functions): Note with mpn_hamdist what hamming distance is.
18784 (Formatted Output Strings): Add type M.
18785 (Internals): Remove remarks on ulong bits and size_t bytes. Move int
18786 field remarks to ...
18787 (Integer Internals, Float Internals): ... here.
18788
18789 2003-04-19 Kevin Ryde <[email protected]>
18790
18791 * configure.in (*sparc*-*-* ABI=32): Add umul to extra_functions.
18792
18793 * mpn/x86/p6/mul_basecase.asm: New file.
18794
18795 2003-04-18 Kevin Ryde <[email protected]>
18796
18797 * configure.in (m68060-*-*): Fallback to gcc -m68000 when -m68060 not
18798 available, and don't use mpn/m68k/mc68020 asm routines. (Avoids 32x32
18799 mul and 64/32 div which trap to the kernel on 68060. Advice by
18800 Richard Zidlicky.)
18801 * mpn/m68k/README: Update notes on directory usage.
18802
18803 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Add a hack to let the
18804 test programs run with a shared libgmpxx on openbsd 3.2.
18805
18806 * gmp.texi (Language Bindings): Add Guile.
18807
18808 2003-04-12 Kevin Ryde <[email protected]>
18809
18810 * configure.in (cygwin*, mingw*, pw32*, os2*): Add
18811 -Wl,--export-all-symbols to GMP_LDFLAGS, no longer the default in
18812 latest mingw and libtool.
18813
18814 * acinclude.m4 (GMP_ASM_COFF_TYPE): New macro.
18815 * configure.in (x86s): Use it.
18816 * mpn/x86/x86-defs.m4 (COFF_TYPE): New macro.
18817 (PROLOGUE_cpu): Use it, for the benefit of mingw DLLs.
18818
18819 * gmp-impl.h (mpn_copyi, mpn_copyd): Add __GMP_DECLSPEC.
18820
18821 * gmp.texi (Known Build Problems): Remove windows test program .exe
18822 repeated built, fixed by new libtool. Remove MacOS C++ shared library
18823 creation, fixed by new libtool.
18824 (Notes for Package Builds, Known Build Problems): Remove DESTDIR notes
18825 on libgmpxx, fixed in new libtool.
18826
18827 2003-04-10 Torbjorn Granlund <[email protected]>
18828
18829 * configure.in: Match turbosparc.
18830 * config.guess: Recognize turbosparc (just for *bsd for now).
18831
18832 2003-04-09 Kevin Ryde <[email protected]>
18833
18834 * mpf/mul_ui.c [nails]: Call mpf_mul to handle v > GMP_NUMB_MAX.
18835
18836 * tests/mpz/t-mul.c (main): Don't try FFT sizes when FFT disabled via
18837 MP_SIZE_T_MAX, eg. for nails.
18838
18839 * tests/cxx/t-ternary.cc: Split up tests to help compile speed and
18840 memory usage.
18841
18842 * tests/devel/try.c: Print seed under -R, add -E to reseed, use ulong
18843 for seed not uint.
18844
18845 * gmp.texi: Add @: after various abbreviations, more index entries.
18846 (leftarrow): New macro, for non-tex.
18847 (Random State Initialization): Remove commented gmp_randinit_lc, not
18848 going to be implemented.
18849 (Random Number Algorithms): New section.
18850 (References): Add Matsumoto and Nishimura on Mersenne Twister, add
18851 Bertot, Magaud and Zimmermann on GMP Square Root.
18852
18853 2003-04-06 Kevin Ryde <[email protected]>
18854
18855 * tests/mpz/t-gcd_ui.c: New file.
18856 * tests/mpz/Makefile.am: Add it.
18857
18858 * mpz/gcd_ui.c: Correction to return value on longlong limb systems,
18859 limb might not fit a ulong.
18860
18861 2003-04-04 Kevin Ryde <[email protected]>
18862
18863 * configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
18864 2003-04-02.
18865
18866 2003-04-02 Kevin Ryde <[email protected]>
18867
18868 * configure.in (*-*-cygwin*): No longer force lt_cv_sys_max_cmd_len,
18869 libtool has addressed this now.
18870 (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): Remove this, libtool _LT_AC_LOCK
18871 no longer needs it.
18872
18873 * acinclude.m4 (GMP_PROG_AR): Also set ac_cv_prog_AR and
18874 ac_cv_prog_ac_ct_AR when adding flags to AR, so they're not lost by
18875 libtool's call to AC_CHECK_TOOL.
18876
18877 2003-04-01 Kevin Ryde <[email protected]>
18878
18879 * configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
18880 2003-03-31.
18881
18882 * configure.in (AC_PROG_F77): Add a dummy AC_PROVIDE to stop libtool
18883 running F77 probes.
18884
18885 * randlc2x.c (gmp_rand_lc_struct): Add comments about what exactly is
18886 in each field.
18887 (randseed_lc): Rename seedp to seedz to avoid confusion with seedp in
18888 the lc function. Suggested by Pedro Gimeno.
18889 (gmp_randinit_lc_2exp): Use __GMP_ALLOCATE_FUNC_TYPE. No need for
18890 "+1" in mpz_init2 of _mp_seed. Don't bother with mpz_init2 for _mp_a.
18891
18892 2003-03-29 Kevin Ryde <[email protected]>
18893
18894 * configure.in (m68k-*-*): Use -O2, no longer need to fallback to -O.
18895 * acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): Remove macro.
18896
18897 * configure.in (AC_CHECK_TYPES): Add notes on why tested.
18898
18899 * gmp.texi (GMPrefu, GMPpxrefu, GMPreftopu, GMPpxreftopu): New macros,
18900 use them for all external references to get URLs into HTML output.
18901 (Random State Initialization): Add gmp_randinit_set.
18902 (Random State Miscellaneous): New section.
18903
18904 2003-03-29 Kevin Ryde <[email protected]>
18905
18906 * randbui.c, randmui.c: New files.
18907 * Makefile.am: Add them.
18908 * gmp-h.in (gmp_urandomb_ui, gmp_urandomm_ui): Add prototypes.
18909 * tests/rand/t-urbui.c, tests/rand/t-urmui.c: New files.
18910 * tests/rand/Makefile.am: Add them.
18911
18912 * gmp-impl.h (gmp_randstate_srcptr): New typedef.
18913 (gmp_randfnptr_t): Add randiset_fn.
18914 * randiset.c: New file.
18915 * Makefile.am: Add it.
18916 * gmp-h.in (gmp_randinit_set): Add prototype.
18917 * randlc2x.c, randmt.c: Add gmp_randinit_set support.
18918 * tests/rand/t-iset.c: New file.
18919 * tests/rand/Makefile.am: Add it.
18920
18921 * tests/misc.c, tests/tests.h (call_rand_algs): New function.
18922
18923 2003-03-27 Kevin Ryde <[email protected]>
18924
18925 * mpz/bin_uiui.c: Use plain "*" for kacc products rather than
18926 umul_ppmm since high not needed, except for an ASSERT now amended.
18927
18928 2003-03-26 Kevin Ryde <[email protected]>
18929
18930 * demos/expr/exprfr.c (cbrt, cmpabs, exp2, gamma, nextabove,
18931 nextbelow, nexttoward): New functions.
18932 * demos/expr/t-expr.c: Exercise these.
18933
18934 * mpfr/*: Update to mpfr cvs 2003-03-26.
18935
18936 * gmp-impl.h (MPZ_REALLOC): Use UNLIKELY, to expect no realloc.
18937
18938 * tune/time.c (cycles_works_p): Scope variables down to relevant part
18939 to avoid warnings about unused.
18940
18941 * configfsf.guess, configfsf.sub: Update to 2003-02-22.
18942 * config.guess: Fake a $RANDOM variable when running configfsf.guess,
18943 to workaround a problem on m68k NetBSD 1.4.1.
18944
18945 * mpz/fac_ui.c: Remove unused variable "z1".
18946
18947 * tune/freq.c (freq_irix_hinv): Allow "Processor 0" line from IRIX 6.5.
18948
18949 2003-03-24 Torbjorn Granlund <[email protected]>
18950
18951 * randlc2x.c (randget_lc): Remove write-only variable rn.
18952 * mpf/eq.c: Remove write-only variable usign.
18953 * gen-psqr.c (main): Remove write-only variable numb_bits.
18954
18955 2003-03-17 Torbjorn Granlund <[email protected]>
18956
18957 * Makefile.am (libgmp_la_SOURCES): Add mp_dv_tab.c.
18958 (libmp_la_SOURCES): Add mp_dv_tab.c.
18959
18960 * mpn/alpha/invert_limb.asm: Add a few comments.
18961
18962 * mp_dv_tab.c: New file, defining __gmp_digit_value_tab.
18963
18964 * mpz/set_str.c: Get rid of function digit_value_in_base and use table
18965 __gmp_digit_value_tab instead.
18966 * mpz/inp_str.c: Likewise.
18967 * mpf/set_str.c: Likewise.
18968 * mpbsd/min.c: Likewise.
18969 * mpbsd/xtom.c: Likewise.
18970
18971 * mpz/set_str.c: Allow bases <= 62. Return error for invalid bases.
18972 * mpz/inp_str.c: Likewise.
18973 * mpf/set_str.c: Likewise.
18974 * mpz/out_str.c: Likewise.
18975 * mpz/get_str.c: Likewise.
18976 * mpf/get_str.c: Likewise.
18977
18978 * mpz/inp_str.c: Restructure to allocate more string space just
18979 before needed.
18980 * mpbsd/min.c: Likewise.
18981
18982 * longlong.h (__udiv_qrnnd_c): Remove redundant casts.
18983 (32-bit sparc): Test HAVE_HOST_CPU_supersparc in addition to various
18984 sparc_v8 spellings.
18985
18986 2003-03-17 Kevin Ryde <[email protected]>
18987
18988 * mpfr/*: Update to mpfr cvs 2003-03-17.
18989
18990 2003-03-15 Kevin Ryde <[email protected]>
18991
18992 * Makefile.am (EXTRA_libgmp_la_SOURCES): Use this for TMP_ALLOC
18993 sources, instead of a libdummy.la.
18994
18995 2003-03-16 Torbjorn Granlund <[email protected]>
18996
18997 * config.guess: Recognize supersparc and microsparc for *BSD systems.
18998 Generalize some superscalar recognition patterns.
18999
19000 2003-03-14 Torbjorn Granlund <[email protected]>
19001
19002 * mpn/sparc64/udiv.asm: New file.
19003
19004 2003-03-13 Torbjorn Granlund <[email protected]>
19005
19006 * mpn/sparc64: Table cycle counts. Update some comments.
19007
19008 * mpn/powerpc64/divrem_1.asm: New file.
19009
19010 2003-03-10 Torbjorn Granlund <[email protected]>
19011
19012 * mpn/generic/mul.c (mpn_mul): Don't blindly expect
19013 MUL_KARATSUBA_THRESHOLD to be a constant.
19014
19015 2003-03-07 Torbjorn Granlund <[email protected]>
19016
19017 * mpn/generic/mul.c (mpn_mul): New operand splitting code for
19018 avoiding cache misses when un >> MUL_KARATSUBA_THRESHOLD > vn.
19019 (MUL_BASECASE_MAX_UN): New #define, default to 500 for now.
19020
19021 2003-03-07 Kevin Ryde <[email protected]>
19022
19023 * Makefile.am: Put gmp.h and mp.h under $(exec_prefix)/include.
19024 * gmp.texi (Build Options): Add notes on this.
19025 Reported by Vincent Lefèvre.
19026
19027 2003-03-06 Kevin Ryde <[email protected]>
19028
19029 * configure.in (alpha*-*-* gcc): Add asm option before testing -mcpu,
19030 for the benefit of gcc 2.9-gnupro-99r1 on alphaev68-dec-osf5.1 which
19031 doesn't otherwise put the assembler in the right mode for -mcpu=ev6.
19032
19033 2003-03-05 Torbjorn Granlund <[email protected]>
19034
19035 * mpn/powerpc32/powerpc-defs.m4: Set up renaming for v registers.
19036
19037 * mpz/powm.c (redc): Instead of repeated mpn_incr_u invocations,
19038 accumulate carries and add at the end.
19039 (mpz_powm): Trim tp allocation, now as redc doesn't need carry guard.
19040
19041 2003-02-25 Torbjorn Granlund <[email protected]>
19042
19043 * mpn/x86/pentium4/copyd.asm: Correct header comment.
19044
19045 * mpn/arm/addmul_1.asm: Correct cycle counts.
19046 * mpn/arm/submul_1.asm: Likewise.
19047
19048 2003-02-20 Kevin Ryde <[email protected]>
19049
19050 * demos/factorize.c (factor_using_pollard_rho): Test k>0 to avoid
19051 infinite loop if k=0 and gcd!=1 reveals a factor. Reported by John
19052 Pongsajapan.
19053
19054 * gmp.texi, fdl.texi: Update to FDL version 1.2.
19055
19056 2003-02-18 Torbjorn Granlund <[email protected]>
19057
19058 * mpn/arm/mul_1.asm: Fix typo introduced in last change.
19059
19060 2003-02-17 Torbjorn Granlund <[email protected]>
19061
19062 * mpn/ia64/gmp-mparam.h: Retune.
19063
19064 * mpn/sparc64/copyi.asm: Add some header comments.
19065 * mpn/sparc64/copyd.asm: Likewise.
19066
19067 * mpn/arm/mul_1.asm: Put vl operand last for umull/umlal.
19068 Add some header comments.
19069 * mpn/arm/addmul_1.asm: Rewrite.
19070 * mpn/arm/submul_1.asm: Rewrite.
19071 * mpn/arm/gmp-mparam.h: Retune.
19072
19073 2003-02-16 Torbjorn Granlund <[email protected]>
19074
19075 * mpn/arm/copyi.asm: New file.
19076 * mpn/arm/copyd.asm: New file.
19077
19078 2003-02-16 Kevin Ryde <[email protected]>
19079
19080 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Tolerate incorrect last data
19081 byte seen on an arm system.
19082
19083 2003-02-15 Torbjorn Granlund <[email protected]>
19084
19085 * mpn/arm/gmp-mparam.h: Retune.
19086
19087 2003-02-13 Torbjorn Granlund <[email protected]>
19088
19089 * mpn/powerpc32/750/com_n.asm: Add more cycle counts.
19090
19091 2003-02-13 Kevin Ryde <[email protected]>
19092
19093 * configure.in (AC_PREREQ): Bump to 2.57.
19094
19095 * configure.in, acinclude.m4 (GMP_GCC_WA_OLDAS): New macro, applying
19096 -Wa,-oldas only when necessary.
19097
19098 * configure.in (powerpc*-*-*): Don't use -Wa,-mppc with gcc, it
19099 overrides options recent gcc adds for -mcpu, making generated code
19100 fail to assemble.
19101
19102 * tune/tuneup.c (mpn_fft_table): Remove definition, it's in mul_fft.c.
19103
19104 2003-02-12 Torbjorn Granlund <[email protected]>
19105
19106 * mpn/x86/pentium4/sse2/gmp-mparam.h: Retune.
19107 * mpn/x86/k7/gmp-mparam.h: Retune.
19108 * mpn/x86/k6/gmp-mparam.h: Retune.
19109 * mpn/x86/p6/gmp-mparam.h: Retune.
19110 * mpn/x86/p6/mmx/gmp-mparam.h: Retune.
19111
19112 * tests/mpz/t-mul.c (main): Rewrite FFT testing code.
19113
19114 2003-02-10 Torbjorn Granlund <[email protected]>
19115
19116 * config.guess: Recognize "power2" systems.
19117
19118 * mpn/powerpc64/gmp-mparam.h: Fix indentation.
19119 * mpn/power/gmp-mparam.h: Retune.
19120 * mpn/alpha/ev6/nails/gmp-mparam.h: Retune.
19121 * mpn/sparc64/gmp-mparam.h: Retune.
19122 * mpn/pa64/gmp-mparam.h: Retune.
19123 * mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
19124 * mpn/sparc32/v8/gmp-mparam.h: Retune.
19125 * mpn/mips64/gmp-mparam.h: Retune.
19126 * mpn/alpha/ev6/gmp-mparam.h: Retune.
19127 * mpn/powerpc32/gmp-mparam.h: Retune.
19128 * mpn/powerpc32/750/gmp-mparam.h: Retune.
19129 * mpn/alpha/ev5/gmp-mparam.h: Retune.
19130 * mpn/m68k/gmp-mparam.h: Retune.
19131 * mpn/cray/gmp-mparam.h: Set GET_STR_PRECOMPUTE_THRESHOLD.
19132
19133 * configure.in: Undo this, problem doesn't happen any more:
19134 (mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
19135
19136 2003-02-03 Kevin Ryde <[email protected]>
19137
19138 * gmp-impl.h (MPN_NORMALIZE, MPN_NORMALIZE_NOT_ZERO): Add parens
19139 around macro parameters. Reported by Jason Moxham.
19140
19141 2003-02-01 Kevin Ryde <[email protected]>
19142
19143 * gmp.texi (Low-level Functions): No overlap permitted by mpn_mul_n.
19144 Reported by Jason Moxham.
19145 (Formatted Input Strings): Correction to strtoul cross reference
19146 formatting.
19147 (BSD Compatible Functions): Add index entry for MINT.
19148
19149 2003-01-29 Torbjorn Granlund <[email protected]>
19150
19151 * gmp-impl.h (mpn_mul_fft): Now returns int.
19152
19153 2003-01-29 Paul Zimmermann <[email protected]>
19154
19155 * mpn/generic/mul_fft.c: Major rewrite.
19156
19157 2003-01-25 Kevin Ryde <[email protected]>
19158
19159 * config.guess (powerpc*-*-*): Remove $dummy.core file when mfpvr
19160 fails on NetBSD.
19161 (trap): Remove $dummy.core on abnormal termination too.
19162
19163 * mpfr/*: Update to mpfr cvs 2003-01-25.
19164
19165 2003-01-24 Torbjorn Granlund <[email protected]>
19166
19167 * mpn/ia64/README: Update cycle counts to match current code.
19168
19169 2003-01-18 Kevin Ryde <[email protected]>
19170
19171 * mpfr/*: Update to mpfr cvs 2003-01-18.
19172
19173 2003-01-17 Torbjorn Granlund <[email protected]>
19174
19175 * gmp.texi: Canonicalize URLs.
19176
19177 2003-01-15 Kevin Ryde <[email protected]>
19178
19179 * gmp.texi (Notes for Particular Systems): Add hardware floating point
19180 precision mode.
19181
19182 * mpfr/*, configure, aclocal.m4, config.in: Update to mpfr cvs
19183 2003-01-15.
19184
19185 2003-01-11 Kevin Ryde <[email protected]>
19186
19187 * mpfr/*: Update to mpfr cvs 2003-01-11.
19188
19189 2003-01-09 Kevin Ryde <[email protected]>
19190
19191 * mpfr/get_str.c: Update to mpfr cvs 2003-01-09.
19192
19193 * doc/configuration: Various updates.
19194
19195 2003-01-06 Torbjorn Granlund <[email protected]>
19196
19197 * mpn/alpha/copyi.asm: Avoid `nop' mnemonic, unsupported on Cray.
19198 * mpn/alpha/copyd.asm: Likewise.
19199
19200 2003-01-05 Kevin Ryde <[email protected]>
19201
19202 * demos/expr/t-expr.c (check_r): Tolerate mpfr_set_str new return
19203 value.
19204
19205 * configure, aclocal.m4 (*-*-osf4*, *-*-osf5*): Regenerate with
19206 libtool patch to avoid bash printf option problem when building shared
19207 libraries with cxx.
19208
19209 * configure.in (pentium4-*-*): Use "-march=pentium4 -mno-sse2" since
19210 sse2 causes buggy code from gcc 3.2.1 and is only supported on new
19211 enough kernels.
19212
19213 * acinclude.m4 (GMP_PROG_NM): Add some notes about failures, per
19214 report by Krzysztof Kozminski.
19215
19216 * gmp-h.in (mpz_mdivmod_ui, mpz_mmod_ui): Add parens around "r".
19217
19218 * gmp-h.in (__GMP_CAST): New macro, clean to g++ -Wold-style-cast.
19219 (GMP_NUMB_MASK, mpz_cmp_si, mpq_cmp_si, mpz_odd_p, mpn_divexact_by3,
19220 mpn_divmod): Use it. Reported by Krzysztof Kozminski.
19221 (mpz_odd_p): No need for the outermost cast to "int".
19222 * tests/cxx/t-cast.cc: New file.
19223 * tests/cxx/Makefile.am: Add it.
19224
19225 2003-01-04 Kevin Ryde <[email protected]>
19226
19227 * mpfr/set_str.c: Update to mpfr cvs 2003-01-04.
19228
19229 * demos/expr/exprfra.c (e_mpfr_number): Tolerate recent mpfr_set_str
19230 returning count of characters accepted.
19231
19232 2003-01-03 Torbjorn Granlund <[email protected]>
19233
19234 * mpn/alpha/copyi.asm: New file.
19235 * mpn/alpha/copyd.asm: New file.
19236
19237 2003-01-03 Kevin Ryde <[email protected]>
19238
19239 * demos/expr/t-expr.c: Use __gmpfr on some mpfr internals that have
19240 changed.
19241
19242 * mpfr/*, aclocal.m4, config.in, configure: Update to mpfr cvs
19243 2003-01-03.
19244
19245 * gmp.texi (Introduction to GMP): Mention release announcements
19246 mailing list, and put home page and ftp before mailing lists.
19247
19248 2002-12-28 Torbjorn Granlund <[email protected]>
19249
19250 * mpn/generic/mul_fft.c (mpn_fft_next_size): Simplify.
19251
19252 2002-12-28 Kevin Ryde <[email protected]>
19253
19254 * acinclude.m4 (M68K_PATTERN): New macro.
19255 (GMP_GCC_M68K_OPTIMIZE): Use it to avoid m6811 and friends.
19256 * configure.in: Ditto.
19257
19258 * tests/mpz/t-import.c, tests/mpz/t-export.c: Use '\xHH' to avoid
19259 warnings about char overflows.
19260 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Ditto.
19261
19262 2002-12-28 Pedro Gimeno <[email protected]>
19263
19264 * randmt.c (randseed_mt, default_state): Fix off-by-one bug on padding.
19265 (randseed_mt): Add ASSERT checking result of mpz_export.
19266
19267 2002-12-24 Kevin Ryde <[email protected]>
19268
19269 * gmp.texi (Integer Import and Export): Clarify treatment of signs,
19270 reported by Kent Boortz.
19271
19272 * randmt.c: Use gmp_uint_least32_t.
19273 (randseed_mt): Add nails to mpz_export in case mt[i] more than 32 bits.
19274
19275 * gmp-impl.h (gmp_uint_least32_t): New typedef, replacing GMP_UINT32.
19276 * configure.in (AC_CHECK_TYPES): Add uint_least32_t.
19277 (AC_CHECK_SIZEOF): Add unsigned short.
19278
19279 2002-12-22 Kevin Ryde <[email protected]>
19280
19281 * gmp-impl.h (ULONG_PARITY) [generic C]: Mask result to a single bit.
19282 (ULONG_PARITY) [_CRAY, __ia64]: New macros.
19283 * tests/t-parity.c: New test.
19284 * tests/Makefile.am (check_PROGRAMS): Add it.
19285
19286 * longlong.h (count_trailing_zeros) [ia64]: New macro.
19287
19288 * tests/t-count_zeros.c (check_various): Remove unused variable "n".
19289
19290 * mpn/x86/README: Revise notes on PIC, PLT and GOT.
19291
19292 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add "mt"
19293 to GMP::Rand::randstate.
19294
19295 2002-12-22 Pedro Gimeno <[email protected]>
19296
19297 * randmt.c (randseed_mt): Fix bug that might cause the generator to
19298 return all zeros with certain seeds. Fix WARM_UP==0 case.
19299 (gmp_randinit_mt): Initialize to a known state by default.
19300 (randget_mt): Remove check for uninitialized buffer: no longer needed.
19301 (recalc_buffer): Use ?: instead of two-element array.
19302
19303 * tests/rand/t-mt.c: New test.
19304 * tests/rand/Makefile.am (check_PROGRAMS): Add it.
19305
19306 2002-12-21 Kevin Ryde <[email protected]>
19307
19308 * cxx/osdoprnti.cc: Use <cstdarg> and <cstring> rather than <stdarg.h>
19309 and <string.h>. No need for <stdio.h>.
19310
19311 * demos/expr/expr.c, demos/expr/exprfa.c, demos/expr/exprfra.c,
19312 demos/expr/exprza.c: Use mp_get_memory_functions, not
19313 __gmp_allocate_func etc.
19314 * demos/expr/t-expr.c: Don't use gmp-impl.h.
19315 (numberof): New macro.
19316
19317 * gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
19318 __gmp_free_func): Move declarations to gmp-impl.h
19319
19320 * mp_get_fns.c: New file.
19321 * Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
19322 * gmp-h.in (mp_get_memory_functions): Add prototype.
19323 * gmp.texi (Custom Allocation): Add mp_get_memory_functions, refer to
19324 "free" not "deallocate" function.
19325 * gmpxx.h (struct __gmp_alloc_cstring): Use mp_get_memory_functions,
19326 not __gmp_free_func.
19327
19328 * gmp-impl.h [__cplusplus]: Add <cstring> for strlen.
19329 (gmp_allocated_string): Hold length in a field.
19330 * cxx/osdoprnti.cc, cxx/osmpf.cc: Use this.
19331
19332 2002-12-20 Torbjorn Granlund <[email protected]>
19333
19334 * tests/mpz/t-perfsqr.c (check_sqrt): Print more variables upon
19335 failure.
19336
19337 * mpn/generic/rootrem.c: In Newton loop, pad qp with leading zero.
19338
19339 2002-12-19 Torbjorn Granlund <[email protected]>
19340
19341 * mpn/generic/rootrem.c: Allocate 1.585 (log2(3)) times more space
19342 for pp temporary to allow for worst case overestimate of root.
19343 Add some asserts.
19344
19345 * tests/mpz/t-root.c: Generalize and speed up.
19346
19347 2002-12-19 Kevin Ryde <[email protected]>
19348
19349 * tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt test.
19350
19351 * gmp-h.in: Don't bother trying to support Compaq C++ in pre-standard
19352 I/O mode.
19353 * gmp.texi (Notes for Particular Systems): Compaq C++ must be used in
19354 "standard" iostream mode.
19355
19356 2002-12-18 Torbjorn Granlund <[email protected]>
19357
19358 * mpn/alpha/mod_34lsub1.asm: Add code for big-endian, using existing
19359 little-endian code only if HAVE_LIMB_LITTLE_ENDIAN is defined.
19360
19361 2002-12-18 Kevin Ryde <[email protected]>
19362
19363 * configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): New
19364 defines in config.m4.
19365
19366 2002-12-17 Torbjorn Granlund <[email protected]>
19367
19368 * printf/printffuns.c (gmp_fprintf_reps): Make it actually work
19369 for padding > 256.
19370
19371 2002-12-17 Kevin Ryde <[email protected]>
19372
19373 * tune/freq.c: Add <string.h> for memcmp.
19374
19375 * mpz/pprime_p.c: Use MPN_MOD_OR_MODEXACT_1_ODD.
19376
19377 * gmp.texi (Formatted Output Strings): %a and %A are C99 not glibc.
19378 (Formatted Input Strings): Type "l" is for double too. Hex floats are
19379 accepted for mpf_t.
19380 (Formatted Input Functions): Describe tightened parse rule, clarify
19381 return value a bit.
19382
19383 * scanf/doscan.c: Add hex floats, tighten matching to follow C99, for
19384 instance "0x" is no longer acceptable to "%Zi".
19385 Rename "invalid" label to avoid "invalid" variable, SunOS cc doesn't
19386 like them the same.
19387 * tests/misc/t-scanf.c: Update tests.
19388 * tests/misc/t-locale.c (check_input): Don't let "0x" appear from fake
19389 decimal point.
19390
19391 * config.guess (sparc*-*-*): Look at BSD sysctl hw.model to recognise
19392 ultrasparcs.
19393
19394 * mpfr/tests/dummy.c: New file.
19395 * mpfr/tests/Makefile.am (libfrtests_a_SOURCES): Add it.
19396
19397 2002-12-14 Kevin Ryde <[email protected]>
19398
19399 * mpbsd/Makefile.am (nodist_libmpbsd_la_SOURCES): Move these mpz
19400 sources to libmpbsd_la_SOURCES directly, automake 1.7.2 now gets the
19401 ansi2knr setups right for sources in other directories.
19402
19403 * mpfr/tests/Makefile.am: Add libfrtests.a in preparation for new mpfr.
19404
19405 2002-12-13 Kevin Ryde <[email protected]>
19406
19407 * mpfr/Makefile.am (mpfr_TEXINFOS, AM_MAKEINFOFLAGS): Allow for
19408 fdl.texi in recent mpfr.
19409
19410 * configure.in (AC_PROG_EGREP): Ensure this is run outside the Cray
19411 conditional AC_EGREP_CPP.
19412
19413 * configure.in (alpha*-*-*): Use gcc -Wa,-oldas if it works, to avoid
19414 problems with new compaq "as" on OSF 5.1.
19415
19416 * mpn/Makefile.am (EXTRA_DIST): Remove Makeasm.am, automake 1.7.2 does
19417 it automatically.
19418
19419 * acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Remove this hack, fixed by
19420 autoconf 2.57.
19421
19422 * configure.in (AC_CONFIG_LIBOBJ_DIR): Set to mpfr, for the benefit of
19423 new mpfr using LIBOBJ.
19424
19425 * configure.in: (AM_INIT_AUTOMAKE): Use "gnu no-dependencies
19426 $(top_builddir)/ansi2knr".
19427 * */Makefile.am (AUTOMAKE_OPTIONS): Remove, now in configure.in.
19428
19429 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.57.
19430 * */Makefile.in, configure, aclocal.m4, install-sh, mkinstalldirs:
19431 Update to automake 1.7.2.
19432
19433 * gmp.texi (Build Options): Add hppa64 to cpu types.
19434 (ABI and ISA): Add gcc to hppa 2.0.
19435 (Debugging): Add maximum debuggability config options.
19436 (Language Bindings): Add Arithmos, reported by Johan Vervloet.
19437 (Formatted Output Strings): 128 bits is about 40 digits, ll is only
19438 for long long not long double.
19439 (Formatted Input Strings): ll is only for long long not long double.
19440
19441 * mpz/divis.c, mpz/divis_ui.c, mpz/cong.c, mpz/cong_ui.c: Allow d=0,
19442 under the rule n==c mod d iff exists q satisfying n=c+q*d.
19443 * gmp.texi (Integer Division): Describe this.
19444 Suggested by Jason Moxham.
19445
19446 2002-12-13 Pedro Gimeno <[email protected]>
19447
19448 * randlc2x.c (lc): Remove check for seedn < an, which is now
19449 superfluous. Add ASSERT to ensure it's correct. Add ASSERT to check
19450 precondition of __GMPN_ADD.
19451 (gmp_randinit_lc_2exp): Avoid reallocation by allocating one extra bit
19452 for both seed and a. Simplify seedn < p->_cn case.
19453
19454 * tests/rand/t-lc2exp.c (check_bigs): Test negative seeds.
19455
19456 2002-12-12 Torbjorn Granlund <[email protected]>
19457
19458 * mpn/pa32/pa-defs.m4 (PROLOGUE_cpu): Zap spurious argument to `.proc'.
19459 Add empty `.callinfo'.
19460
19461 2002-12-11 Torbjorn Granlund <[email protected]>
19462
19463 * mpn/x86/pentium4/sse2/addmul_1.asm: Don't reuse `ret' symbol for a
19464 label.
19465
19466 2002-12-11 Kevin Ryde <[email protected]>
19467
19468 * configure.in (hppa*-*-*): Don't use gcc -mpa-risc-2-0 in ABI=1.0.
19469
19470 * mpn/pa32/pa-defs.m4: New file, arranging for .proc/.procend.
19471 * configure.in (hppa*-*-*): Use it.
19472
19473 * printf/doprnt.c: Comments on "ll" versus "L".
19474
19475 * tests/mpz/t-div_2exp.c: Reduce tests, especially the random ones.
19476
19477 2002-12-11 Torbjorn Granlund <[email protected]>
19478
19479 * mpz/get_d.c (limb2dbl): New macro for conversion to `double'.
19480 Define it to something non-trivial for 64-bit hppa.
19481 * mpq/get_d.c: Likewise.
19482 * mpf/get_d.c: Likewise.
19483
19484 * mpn/x86/pentium4/sse2/addmul_1.asm: Unroll to save one c/l.
19485
19486 2002-12-09 Kevin Ryde <[email protected]>
19487
19488 * tune/Makefile.am: Don't use -static under --disable-static, it tends
19489 not to work.
19490 * configure.in (ENABLE_STATIC): New AM_CONDITIONAL.
19491
19492 * gmp-h.in: Use <iostream> instead of <iosfwd> with Compaq C++ in
19493 pre-standard I/O mode.
19494
19495 * tests/mpz/t-jac.c, tests/mpz/t-scan.c: Reduce tests.
19496
19497 2002-12-08 Kevin Ryde <[email protected]>
19498
19499 * configure.in (*-*-ultrix*): Remove forcible --disable-shared,
19500 believe this was a generic problem with libtool, now gone.
19501
19502 2002-12-08 Torbjorn Granlund <[email protected]>
19503
19504 * gmp-impl.h (USE_LEADING_REGPARM): Disable for PIC code generation.
19505
19506 2002-12-07 Torbjorn Granlund <[email protected]>
19507
19508 * tests/cxx/t-misc.cc (check_mpq): Use 0/1 for canonical 0 in
19509 mpq_cmp_ui calls.
19510
19511 * configure.in (hppa2.0*-*-*): Pass +O2 instead of +O3 to work around
19512 compiler bug with mpfr/tests/tdiv.
19513
19514 2002-12-07 Kevin Ryde <[email protected]>
19515
19516 * configure.in (hppa2.0*-*-* ABI=2.0n): Make -mpa-risc-2-0 optional.
19517 New hppa-level-2.0 test using GMP_HPPA_LEVEL_20 to detect assembler
19518 support for 2.0n.
19519 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code that provokes an error
19520 from gcc -mpa-risc-2-0 if the assembler doesn't know 2.0 instructions.
19521 (GMP_HPPA_LEVEL_20): New macro.
19522
19523 2002-12-07 Pedro Gimeno <[email protected]>
19524
19525 * gmp-impl.h (gmp_randfnptr_t.randseed_fn) Return void.
19526 (LIMBS_PER_ULONG, MPN_SET_UI): New macros.
19527 (MPZ_FAKE_UI): Rename couple of parameters.
19528
19529 * randlc2x.c (gmp_rand_lc_struct): _mp_c and _mp_c_limbs replaced
19530 with mpn style _cp and _cn. All callers changed.
19531 (randseed_lc): Fix limbs(seed) > bits_to_limbs(m2exp) case.
19532 Remove return value.
19533 (gmp_randinit_lc_2exp): Attempt to avoid redundant reallocation.
19534
19535 * randmt.c (mangle_seed): New function by Kevin.
19536 (randseed_mt): Use it instead of mpz_powm, for performance. Remove
19537 return value. Remove commented out code (an inferior alternative to
19538 mpz_export).
19539
19540 * randsdui.c (gmp_randseed_ui): Use MPZ_FAKE_UI.
19541
19542 * tests/rand/t-lc2exp.c (check_bigm, check_bigs): New tests.
19543 * tests/rand/t-urndmm.c: Add L to constants in calls, for K&R.
19544
19545 2002-12-06 Torbjorn Granlund <[email protected]>
19546
19547 * configure.in: Remove -g.
19548 (hppa*-*-*): Pass -Wl,+vnocompatwarnings with +DA2.0.
19549
19550 2002-12-05 Torbjorn Granlund <[email protected]>
19551
19552 * mpn/pa64/sqr_diagonal.asm: Remove .entry, .proc, .procend.
19553 * mpn/pa64/udiv.asm: Likewise.
19554
19555 2002-12-05 Kevin Ryde <[email protected]>
19556
19557 * mpn/pa64/sub_n.asm: Remove space in "sub, db" which gas objects to.
19558 * mpn/pa64/*.asm, tune/hppa2.asm: Use ".level 2.0" for 2.0n, since gas
19559 doesn't like ".level 2.0N".
19560
19561 * configure.in (hppa*-*-*): Group path and flags choices, for clarity.
19562 (hppa1.0*-*-*): Use gcc -mpa-risc-1-0 when available.
19563 (hppa2.0*-*-*): Ditto -mpa-risc-2-0.
19564 (*-*-hpux*): Exclude ABI=2.0w for hpux[1-9] and hpux10, rather than
19565 the converse of allowing it for hpux1[1-9]; ie. list the bad systems
19566 rather than try to guess the good systems.
19567 (hppa2.0*-*-*) [ABI=2.0n ABI=2.0w]: Add gcc to likely compilers.
19568 (hppa*-*-*) [gcc]: Test sizeof(long) to differentiate a 32-bit or
19569 64-bit build of the compiler.
19570 (hppa64-*-*): Add this as equivalent to hppa2.0-*-*.
19571 * acinclude.m4 (GMP_C_TEST_SIZEOF): New macro.
19572
19573 * tests/tests.h (ostringstream::str): Must null-terminate
19574 ostrstream::str() for the string constructor.
19575
19576 2002-12-04 Torbjorn Granlund <[email protected]>
19577
19578 * mpn/pa32/hppa1_1/udiv.asm: Don't wrap symbol to INT64 in L() stuff.
19579
19580 * longlong.h (mpn_udiv_qrnnd_r based udiv_qrnnd): Fix typo.
19581
19582 * mpn/powerpc32/powerpc-defs.m4: Define float registers with `f'
19583 prefix.
19584
19585 2002-12-04 Kevin Ryde <[email protected]>
19586
19587 * gmp.texi (Floating-point Functions): Note the mantissa is binary and
19588 decimal fractions cannot be represented exactly. Suggested by Serge
19589 Winitzki.
19590 (Known Build Problems): Note libtool stripping options when linking.
19591 Reported by Vincent Lefevre.
19592
19593 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Don't make an empty result a
19594 failure, that's a valid result.
19595 (GMP_ASM_GLOBL): Establish this from the host cpu type.
19596 (IA64_PATTERN): New macro.
19597 (GMP_PROG_EXEEXT_FOR_BUILD, GMP_C_FOR_BUILD_ANSI,
19598 GMP_CHECK_LIBM_FOR_BUILD): Remove temporary files created.
19599 * configure.in: Use IA64_PATTERN.
19600
19601 2002-12-03 Torbjorn Granlund <[email protected]>
19602
19603 * tune/hppa.asm: Use config.m4.
19604 * tune/hppa2.asm: Likewise.
19605 * tune/hppa2w.asm: Likewise.
19606
19607 * mpn/pa64: Use LDEF.
19608
19609 2002-12-03 Kevin Ryde <[email protected]>
19610
19611 * INSTALL: Use return rather than exit in the example programs.
19612 Suggested by Richard Dawe.
19613
19614 * gmp.texi (Build Options): Move non-unix notes to ...
19615 (Notes for Particular Systems): ... here. Mention MS Interix,
19616 reported by Paul Leyland.
19617 (C++ Interface Random Numbers): Add gmp_randinit_mt to examples.
19618
19619 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Must test empty suffix first,
19620 for the benefit of hppa hp-ux.
19621 (GMP_ASM_UNDERSCORE): Grep the output of "nm" instead of trying to
19622 construct an asm file, and in case of failure fallback on no
19623 underscore and a warning.
19624
19625 * longlong.h (count_leading_zeros, count_trailing_zeros) [ev67, ev68]:
19626 Restrict __asm__ ctlz and cttz to __GNUC__.
19627
19628 * gen-psqr.c (HAVE_CONST, const): New macros.
19629
19630 * tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt.
19631
19632 2002-12-02 Torbjorn Granlund <[email protected]>
19633
19634 * gmp-impl.h: Split popc_limb again, combined version gives too many
19635 compiler warnings.
19636
19637 2002-12-01 Torbjorn Granlund <[email protected]>
19638
19639 * mpn/generic/gcdext.c (div1): Disable unused function.
19640
19641 * mpz/root.c: Don't include stdlib.h or longlong.h.
19642 * mpz/rootrem.c: Likewise.
19643
19644 * extract-dbl.c: abort => ASSERT_ALWAYS.
19645 * mpz/set_d.c: Likewise.
19646 * mpn/generic/tdiv_qr.c: Likewise.
19647
19648 * gen-psqr.c (f_cmp_fraction, f_cmp_divisor): Change parameter to
19649 `const void *', to match qsort spec.
19650
19651 2002-12-01 Kevin Ryde <[email protected]>
19652
19653 * gmp.texi (Integer Division): Fix a couple of @math's for tex.
19654 Use @dots in more places.
19655
19656 * tests/cxx/t-locale.cc: Test non std::locale systems too.
19657 * tests/cxx/clocale.c: New file, reinstating what was localeconv.c,
19658 and subverting nl_langinfo too.
19659 * tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
19660
19661 * tests/tests.h (ostringstream, istringstream): Provide fakes of these
19662 if <sstream> not available.
19663 * tests/cxx/t-locale.cc, tests/cxx/t-ostream.cc: Remove <sstream>.
19664 * configure.in (AC_CHECK_HEADERS) [C++]: Add <sstream>.
19665
19666 2002-11-30 Torbjorn Granlund <[email protected]>
19667
19668 * printf/doprnt.c (__gmp_doprnt): Comment out a `break' to shut up
19669 compiler warnings.
19670
19671 * mpn/ia64/invert_limb.asm: Add `many' hints to return insns.
19672
19673 * mpn/ia64/divrem_1.asm: Allocate more local registers; put b0 in
19674 one of them.
19675
19676 * mpn/ia64/popcount.asm: Properly restore register ar.lc.
19677
19678 * longlong.h (umul_ppmm) [ia64]: Form both product parts in asm.
19679
19680 * mpz/bin_uiui.c: Cast umul_ppmm operands.
19681
19682 * scanf/doscan.c (gmpscan): Remove unused label store_get_digits.
19683
19684 * gmp-impl.h: #undef MIN and MAX before #defining.
19685
19686 * mpn/ia64/copyi.asm: Add `;' after bundle declarators.
19687 * mpn/ia64/copyd.asm: Likewise.
19688
19689 * mpn/ia64/divrem_1.asm: Add some syntax to placid the HP-UX assembler.
19690
19691 2002-11-30 Kevin Ryde <[email protected]>
19692
19693 * configure.in (AC_CHECK_HEADERS): Add nl_types.h.
19694 * tests/misc/t-locale.c: Use this, for nl_item on netbsd 1.4.1.
19695
19696 2002-11-29 Torbjorn Granlund <[email protected]>
19697
19698 * tests/devel/addmul_1.c: Provide prototype for mpn_print.
19699 (OPS): Account for function overhead.
19700 * tests/devel/{submul_1.c,mul_1.c,add_n.c,sub_n.c}: Likewise.
19701
19702 * mpn/ia64/addmul_1.asm: Rewrite.
19703
19704 2002-11-28 Torbjorn Granlund <[email protected]>
19705
19706 * mpn/ia64/sqr_diagonal.asm: Don't allocate any registers.
19707
19708 * mpn/ia64/submul_1.asm: Adapt to Itanium 2.
19709
19710 * mpn/ia64/mul_1.asm: Fix typo in HAVE_ABI_32 code.
19711
19712 * mpn/ia64/add_n.asm: Rewrite.
19713 * mpn/ia64/sub_n.asm: Rewrite.
19714
19715 2002-11-28 Kevin Ryde <[email protected]>
19716
19717 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Use this rather
19718 than libdummy.
19719 * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Use this for
19720 x86call.asm and x86check.c rather than libdummy.
19721
19722 2002-11-27 Torbjorn Granlund <[email protected]>
19723
19724 * tests/mpz/t-mul.c: Implement reference Karatsuba multiplication.
19725 Rewrite testing scheme to run fewer really huge tests.
19726
19727 2002-11-26 Torbjorn Granlund <[email protected]>
19728
19729 * tests: Decrease repetition count for some of the slowest tests.
19730
19731 * mpn/ia64/divrem_1.asm: New file.
19732
19733 2002-11-25 Torbjorn Granlund <[email protected]>
19734
19735 * mpfr/tests/tdiv.c: Decrease number of performed tests.
19736
19737 2002-11-23 Torbjorn Granlund <[email protected]>
19738
19739 * mpn/ia64/mul_1.asm: Rewrite.
19740
19741 2002-11-23 Kevin Ryde <[email protected]>
19742
19743 * mpn/ia64/README: Add some references.
19744
19745 * gmp.texi (Build Options): Add itanium and itanium2, mention DocBook
19746 and XML from makeinfo, add texinfo top level cross reference.
19747 (Integer Division): Try to clarify 2exp functions a bit.
19748 (C++ Interface Floats): Giving bad string to constructor is undefined.
19749 (C++ Interface Integers, C++ Interface Rationals): Ditto, and show
19750 default base in prototype, not the description.
19751
19752 * config.sub, config.guess, configure.in (itanium, itanium2): New cpu
19753 types.
19754
19755 * tests/misc/t-printf.c, tests/misc/t-scanf.c (check_misc): Suppress
19756 %zd test on glibc prior to 2.1, it's not supported.
19757
19758 2002-11-22 Torbjorn Granlund <[email protected]>
19759
19760 * mpn/ia64/copyi.asm: Optimize for Itanium 2.
19761 * mpn/ia64/copyd.asm: Likewise.
19762
19763 2002-11-20 Torbjorn Granlund <[email protected]>
19764
19765 * mpn/ia64/sqr_diagonal.asm: New file.
19766
19767 * mpn/ia64/submul_1.asm: Handle vl == 0 specially.
19768
19769 2002-11-20 Kevin Ryde <[email protected]>
19770
19771 * tests/cxx/t-locale.cc: Test with locales imbued into stream, use
19772 <sstream>, eliminated some C-isms. istream tests disabled, not yet
19773 locale-ized.
19774 * tests/cxx/Makefile.am (t_locale_SOURCES): Remove localeconv.c.
19775 * tests/cxx/localeconv.c: Remove file.
19776
19777 * configure.in (AC_CHECK_TYPES) [C++]: Add std::locale.
19778 * printf/doprntf.c: Add decimal point parameter, remove localeconv use.
19779 * gmp-impl.h (__gmp_doprnt_mpf): Update prototype, bump symbol to
19780 __gmp_doprnt_mpf2 to protect old libgmpxx.
19781 * cxx/osmpf.cc: Use this with ostream locale decimal_point facet.
19782 * printf/doprnt.c: Ditto, with GMP_DECIMAL_POINT.
19783
19784 * gmp-h.in: More comments on __declspec for windows DLLs.
19785
19786 * mpf/set_str.c, scanf/doscan.c: Cast through "unsigned char" for
19787 decimal point string, same as input chars.
19788
19789 * configure.in (AC_CHECK_HEADERS): Add langinfo.h.
19790 (AC_CHECK_FUNCS): Add nl_langinfo.
19791 * gmp-impl.h (GMP_DECIMAL_POINT): New macro.
19792 * mpf/out_str.c, mpf/set_str.c, scanf/doscan.c: Use it, and don't
19793 bother with special code for non-locale systems.
19794 * tests/misc/t-locale.c: Subvert nl_langinfo too.
19795
19796 * configure.in, acinclude.m4 (GMP_ASM_X86_GOT_UNDERSCORE): New macro.
19797 * mpn/x86/x86-defs.m4 (_GLOBAL_OFFSET_TABLE_): New macro, inserting
19798 extra underscore for OpenBSD.
19799 * mpn/x86/README (_GLOBAL_OFFSET_TABLE_): Update notes.
19800 Reported by Christian Weisgerber.
19801
19802 * tests/cxx/t-rand.cc (check_randinit): New function, collecting up
19803 constructor tests.
19804
19805 * tests/cxx/t-ostream.cc: Use <sstream> instead of <strstream>, use
19806 compare instead of strcmp.
19807
19808 * gmpxx.h (__gmp_randinit_lc_2exp_size_t): Return type is int.
19809
19810 2002-11-18 Kevin Ryde <[email protected]>
19811
19812 * tune/speed.c (r_string): Use CNST_LIMB with <N>bits, spotted by
19813 Torbjorn.
19814
19815 2002-11-19 Torbjorn Granlund <[email protected]>
19816
19817 * mpn/ia64/mul_1.asm: Remove redundant cmp from prologue code.
19818 Streamline prologue.
19819 * mpn/ia64/addmul_1.asm: Likewise.
19820 * mpn/ia64/submul_1.asm: New file.
19821 * mpn/ia64/submul_1.c: Remove.
19822
19823 2002-11-17 Torbjorn Granlund <[email protected]>
19824
19825 * mpn/generic/popham.c: New file, using new faster algorithm.
19826 * mpn/generic/popcount.c: Remove.
19827 * mpn/generic/hamdist.c: Remove.
19828
19829 * mpn/ia64/addmul_1.asm: Don't clobber callee-saves register f16.
19830 * mpn/ia64/mul_1.asm: Likewise.
19831
19832 * mpn/ia64/addmul_1.asm: Add pred.rel declarations. Resolve RAW
19833 hazards for condition code registers, duplicating code as needed. Add
19834 prediction to all branches.
19835 * mpn/ia64/mul_1.asm: Likewise.
19836 * mpn/ia64/add_n.asm: Likewise.
19837 * mpn/ia64/sub_n.asm: Likewise.
19838 * mpn/ia64/copyi.asm: Likewise.
19839 * mpn/ia64/copyd.asm: Likewise.
19840
19841 * mpn/generic/random2.c: Add a cast to silence some compilers.
19842
19843 2002-11-16 Torbjorn Granlund <[email protected]>
19844
19845 * mpz/powm.c: Cap allocation by limiting k to 10 (512 precomputed
19846 values).
19847
19848 2002-11-16 Kevin Ryde <[email protected]>
19849
19850 * configure.in, gmp.texi: Remove powerpc64 ABI=32L, doesn't work and
19851 is unlikely to ever do so.
19852 * configure.in: Allow ABI=32 for powerpc64.
19853 Reported by David Edelsohn.
19854
19855 2002-11-14 Kevin Ryde <[email protected]>
19856
19857 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add addmul_2.c
19858 addmul_3.c addmul_4.c addmul_5.c addmul_6.c addmul_7.c addmul_8.c.
19859
19860 * gmp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
19861 Use __dllexport__ and __dllimport__ to keep out of application
19862 namespace.
19863
19864 2002-11-14 Gerardo Ballabio <[email protected]>
19865
19866 * gmpxx.h (__gmp_randinit_default_t, __gmp_randinit_lc_2exp_t,
19867 __gmp_randinit_lc_2exp_size_t): Use extern "C" { typedef ... }, for
19868 the benefit of g++ prior to 3.2.
19869
19870 2002-11-12 Kevin Ryde <[email protected]>
19871
19872 * gmpxx.h (gmp_randclass constructors): Patch from Roberto Bagnara to
19873 use extern "C" on C function pointer arguments.
19874
19875 2002-11-09 Kevin Ryde <[email protected]>
19876
19877 * configure.in, Makefile.am, printf/Makefile.am,
19878 printf/repl-vsnprintf.c: Handle vsnprintf replacement with C
19879 conditionals.
19880
19881 * acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Workaround troubles recent
19882 HP cc +O3 causes for AC_CHECK_FUNCS.
19883
19884 * gmp.texi (Notes for Particular Systems): Add Sparc app regs.
19885 (Debugging): Note gcc -fstack options to detect overflow.
19886 (Formatted Output Strings, Formatted Input Strings): Format strings
19887 are not multibyte.
19888
19889 2002-11-06 Torbjorn Granlund <[email protected]>
19890
19891 * mpn/generic/tdiv_qr.c: Remove a bogus assert.
19892
19893 2002-11-05 Torbjorn Granlund <[email protected]>
19894
19895 * mpn/generic/tdiv_qr.c: Remove two dead mpn_divrem_2 calls.
19896
19897 2002-11-04 Kevin Ryde <[email protected]>
19898
19899 * acinclude.m4 (GMP_C_INLINE): Don't define "inline" for C++.
19900
19901 * demos/expr/expr-impl.h (stdarg.h): Test __DECC same as gmp.h.
19902
19903 * mpbsd/mtox.c, printf/obprintf.c, printf/obvprintf.c,
19904 scanf/vsscanf.c, demos/expr/expr.c, demos/expr/exprf.c,
19905 demos/expr/exprfa.c, demos/expr/exprfr.c, demos/expr/exprq.c,
19906 demos/expr/exprz.c, demos/expr/exprza.c: Add <string.h> for strlen and
19907 memcpy.
19908
19909 2002-11-02 Kevin Ryde <[email protected]>
19910
19911 * longlong.h: Test __x86_64__ not __x86_64. Reported by Andreas
19912 Jaeger.
19913
19914 * mpz/import.c, mpz/export.c: Use char* subtract from NULL to get
19915 pointer alignment, for the benefit of Cray vector systems.
19916
19917 * cxx/ismpf.cc: Use <clocale>.
19918 * tests/cxx/t-locale.cc: No need to conditionalize <clocale>.
19919
19920 * scanf/doscan.c: Don't use isascii, rely on C99 ctype.h.
19921
19922 * gmp.texi (Build Options): Describe CC_FOR_BUILD, cross reference
19923 texinfo manual.
19924 (ABI and ISA): Add powerpc620 and powerpc630 to powerpc64, add NetBSD
19925 and OpenBSD sparc64.
19926 (Notes for Package Builds): Cross reference libtool manual.
19927 (Notes for Particular Systems): Add OpenBSD to non-MMX versions of gas.
19928 (Known Build Problems): Add MacOS X C++ shared libraries.
19929
19930 2002-10-31 Kevin Ryde <[email protected]>
19931
19932 * gmp-impl.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
19933 tests/devel/try.c, tests/tests.h, tests/refmpn.c (mpn_addmul_5,
19934 mpn_addmul_6, mpn_addmul_7, mpn_addmul_8): Add testing and measuring.
19935 * configure.in (config.in): Add #undefs of HAVE_NATIVE_mpn_addmul_5,
19936 HAVE_NATIVE_mpn_addmul_6, HAVE_NATIVE_mpn_addmul_7,
19937 HAVE_NATIVE_mpn_addmul_8.
19938 (gmp_mpn_functions_optional): Add addmul_5 addmul_6 addmul_7 addmul_8.
19939
19940 * tests/devel/try.c (ASSERT_CARRY): Remove, now in gmp-impl.h
19941 (try_one): Do dest setups after sources, for benefit of
19942 dst0_from_src1.
19943
19944 2002-11-01 Torbjorn Granlund <[email protected]>
19945
19946 * mpn/generic/tdiv_qr.c: Avoid quadratic behaviour for
19947 sub-division when numerator is more than twice the size of the
19948 denominator. Simplify loop logic for the same case. Clean up a
19949 few comments.
19950
19951 2002-10-29 Torbjorn Granlund <[email protected]>
19952
19953 * configure.in (*-cray-unicos*): Pass -hnofastmd again.
19954
19955 2002-10-25 Torbjorn Granlund <[email protected]>
19956
19957 * tests/tadd.c: Disable test of denorms.
19958
19959 2002-10-23 Linus Nordberg <[email protected]>
19960
19961 * gmp.texi (Introduction to GMP): Update section about mailing
19962 lists.
19963
19964 2002-10-23 Kevin Ryde <[email protected]>
19965
19966 * gmp-h.in (__GMP_ATTRIBUTE_PURE): Suppress this when
19967 __GMP_NO_ATTRIBUTE_CONST_PURE is defined.
19968 * gmp-impl.h (ATTRIBUTE_CONST): Ditto.
19969 * tune/common.c: Use __GMP_NO_ATTRIBUTE_CONST_PURE.
19970
19971 * tune/speed.h, tune/many.pl: Remove ATTRIBUTEs from prototypes.
19972 * tune/speed.h: Remove various "dummy" variables attempting to keep
19973 "pure" calls live, no longer necessary. They weren't sufficient for
19974 recent MacOS cc anyway.
19975
19976 2002-10-21 Torbjorn Granlund <[email protected]>
19977
19978 * mpn/cray/ieee/addmul_1.c: Handle overlap as in mul_1.c.
19979 * mpn/cray/ieee/submul_1.c: Likewise.
19980
19981 2002-10-19 Kevin Ryde <[email protected]>
19982
19983 * configure.in (sparcv9 etc -*-*bsd*): Add support for NetBSD and
19984 OpenBSD sparc64. Reported by Christian Weisgerber.
19985 (AC_CHECK_HEADERS): Add sys/param.h for sys/sysctl.h on *BSD.
19986
19987 * demos/calc/calc.y: Change ={ to {, needed for bison 1.50.
19988
19989 * longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]:
19990 Should be UDItype.
19991
19992 * mpz/set_str.c, mpf/set_str.c, mpbsd/xtom.c, scanf/sscanffuns.c: Cast
19993 chars through "unsigned char" to zero extend, required by C99 ctype.h.
19994
19995 2002-10-18 Torbjorn Granlund <[email protected]>
19996
19997 * tests/mpz/t-root.c: Test also mpz_rootrem.
19998
19999 * mpn/generic/rootrem.c: Avoid overflow problem when n is huge.
20000
20001 * mpz/root.c: Avoid overflow problems in allocation computation; also
20002 simplify it. Misc cleanups.
20003
20004 * mpz/rootrem.c: New file.
20005 * Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
20006
20007 2002-10-17 Torbjorn Granlund <[email protected]>
20008
20009 * gmp-impl.h (popc_limb): Combine variants.
20010
20011 2002-10-14 Kevin Ryde <[email protected]>
20012
20013 * configure.in (AC_CHECK_HEADERS): Add sys/time.h for sys/resource.h
20014 test, needed by SunOS, and next autoconf will insist headers actually
20015 compile.
20016
20017 2002-10-08 Kevin Ryde <[email protected]>
20018
20019 * tune/time.c (speed_time_init): Allow for Cray times() apparently
20020 being a cycle counter.
20021
20022 * dumbmp.c (mpz_get_str): Fix buf size allocation.
20023
20024 * tests/trace.c, tests/tests.h (mp_limb_trace): New function.
20025
20026 * tune/speed-ext.c (SPEED_EXTRA_PROTOS): Use __GMP_PROTO.
20027 * tests/devel/try.c (malloc_region): Add a cast for SunOS cc.
20028
20029 * configure.in (AC_CHECK_FUNCS): Add strerror.
20030 (AC_CHECK_DECLS): Add sys_errlist, sys_nerr.
20031 * tune/time.c, tests/devel/try.c: Use them.
20032
20033 2002-10-05 Kevin Ryde <[email protected]>
20034
20035 * configure.in (AC_CHECK_HEADERS): Test float.h, not in SunOS cc.
20036 * printf/repl-vsnprintf.c: Use this.
20037
20038 * configure.in (*sparc*-*-*): Collect up various options for clarity,
20039 use gcc -mcpu=supersparc and ultrasparc3, use cc -xchip, don't use
20040 -xtarget=native, use cc configs with acc, merge SunOS bundled cc and
20041 SunPRO cc configs.
20042
20043 * gmp-impl.h (gmp_randfnptr_t): Use __GMP_PROTO.
20044 (MPZ_REALLOC): Cast _mpz_realloc return value to mp_ptr, for the
20045 benefit of SunOS cc which requires pointers of the same type on the
20046 two legs of a ?:.
20047
20048 * dumbmp.c (mpz_realloc): Add a cast to avoid a warning from SunOS cc.
20049
20050 * acinclude.m4: Allow for i960 b.out default cc output.
20051
20052 * gmp.texi (Random State Initialization): Add gmp_randinit_mt.
20053 (Perfect Square Algorithm): Describe new mpn_mod_34lsub1 use.
20054 (Factorial Algorithm): Describe Jason's new code.
20055 (Binomial Coefficients Algorithm): Ideas about improvements
20056 moved to doc/projects.html.
20057 (Contributors): Add Jason Moxham and Pedro Gimeno.
20058
20059 2002-10-03 Kevin Ryde <[email protected]>
20060
20061 * gen-psqr.c: New file.
20062 * Makefile.am, mpn/Makefile.am: Use it to generate mpn/perfsqr.h.
20063 * mpn/generic/perfsqr.c: Use generated data, put mod 256 data into
20064 limbs to save space, use mpn_mod_34lsub1 when good.
20065 * tests/mpn/t-perfsqr.c: New file.
20066 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
20067 * tests/mpz/t-perfsqr.c (check_modulo): New test.
20068 (check_sqrt): New function holding current tests.
20069
20070 * configure.in (AC_INIT): Modernize to package name and version here
20071 rather than AM_INIT_AUTOMAKE, add bug report email.
20072 (AC_CONFIG_SRCDIR): New macro.
20073
20074 * gmp-impl.h (ROUND_UP_MULTIPLE): Fix for non-power-of-2 moduli (not
20075 normal in current uses), clarify the comments a bit.
20076
20077 2002-09-30 Kevin Ryde <[email protected]>
20078
20079 * mpn/Makeasm.am (.s.lo): Add --tag=CC for the benefit of CCAS!=CC,
20080 same as .S.lo and .asm.lo.
20081
20082 * Makefile.am (gen-fac_ui, gen-fib, gen-bases): Quote source files in
20083 test -f stuff to avoid Sun make rewriting them.
20084
20085 2002-09-28 Kevin Ryde <[email protected]>
20086
20087 * tests/devel/try.c, tune/speed.c: Avoid strings longer than C99
20088 guarantees.
20089
20090 * tests/refmpn.c, tests/tests.h (refmpn_zero_extend, refmpn_normalize,
20091 refmpn_sqrtrem): New functions.
20092 * tests/devel/try.c (TYPE_SQRTREM): Use refmpn_sqrtrem.
20093 (compare): Correction to tr->dst_size subscripting.
20094
20095 * dumbmp.c: Add several new functions, allow for initial n<d in
20096 mpz_tdiv_q (now in mpz_tdiv_qr actually).
20097
20098 * gen-bases.c (chars_per_limb): Get GMP_NUMB_BITS for base==2,
20099 similarly other powers of 2, which this was in the past.
20100 * tests/refmpn.c (refmpn_chars_per_limb): Ditto.
20101 * tests/mpn/t-mp_bases.c: Test chars_per_limb for power-of-2 bases too.
20102
20103 * Makefile.am, mpz/Makefile.am: Setups for gen-fac_ui.c generating
20104 mpz/fac_ui.h.
20105
20106 2002-09-28 Jason Moxham <[email protected]>
20107
20108 * dumbmp.c (mpz_pow_ui, mpz_addmul_ui, mpz_root): New functions.
20109 * gen-fac_ui.c: New file.
20110 * mpz/fac_ui.c: Rewrite.
20111
20112 2002-09-26 Kevin Ryde <[email protected]>
20113
20114 * tests/cxx/localeconv.c: New file, split from t-locale.cc.
20115 * tests/cxx/t-locale.cc: Use it.
20116 * tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
20117
20118 * tests/cxx/Makefile.am: Updates for Gerardo's new test programs.
20119
20120 2002-09-26 Gerardo Ballabio <[email protected]>
20121
20122 * gmpxx.h (__gmp_cmp_function): Bug fixes in double/mpq and
20123 double/mpfr comparisons.
20124
20125 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-constr.cc,
20126 tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: Revise and add various
20127 tests, including some for mpfr, some split from t-expr.cc.
20128 * tests/cxx/t-locale.cc: Modernize include files.
20129 * tests/cxx/t-ostream.cc: Modernize include files, use cout rather
20130 than printf for diagnostics.
20131 * tests/cxx/t-misc.cc, tests/cxx/t-rand.cc: New file, split from
20132 t-allfuns.cc.
20133 * tests/cxx/t-ops.cc: New file, some split from t-allfuns.cc.
20134 * tests/cxx/t-prec.cc: New file.
20135 * tests/cxx/t-allfuns.cc, tests/cxx/t-expr.cc: Remove files.
20136
20137 2002-09-25 Torbjorn Granlund <[email protected]>
20138
20139 * configure.in (*-cray-unicos*): Remove -hscalar0, it causes too much
20140 performance loss. Let's trust Cray to fix their compilers.
20141
20142 2002-09-24 Torbjorn Granlund <[email protected]>
20143
20144 * mpn/powerpc32/add_n.asm: Rewrite.
20145 * mpn/powerpc32/sub_n.asm: Rewrite.
20146
20147 2002-09-24 Pedro Gimeno <[email protected]>
20148
20149 * randlc2x.c: Prepare for nails by changing type of _mp_c to mpz_t,
20150 make _mp_seed fixed-size, disallow SIZ(a)==0 to optimize comparisons
20151 for mpn_mul.
20152 * gmp-impl.h (MPZ_FAKE_UI): New macro.
20153
20154 * randmt.c: Some constants made long for K&R compliance; remove UL at
20155 the end of other constants; use mp_size_t where appropriate; use
20156 mpz_export to split the seed.
20157
20158 * gmp-impl.h: Remove type cast in RNG_FNPTR and RNG_STATE, to allow
20159 them to be used as lvalues.
20160 * randclr.c, randlc2x.c, randmt.c, randsd.c: All callers changed.
20161
20162 * mpz/urandomm.c: Replace mpn_cmp with MPN_CMP.
20163
20164 * tests/rand/gen.c: Get rid of gmp_errno.
20165
20166 2002-09-24 Kevin Ryde <[email protected]>
20167
20168 * gmp.texi (Custom Allocation): Keep allocate_function etc out of the
20169 function index by using @deftypevr.
20170 More index entries.
20171
20172 2002-09-24 Gerardo Ballabio <[email protected]>
20173
20174 * gmpxx.h (mpfr_class constructors from strings): Precision was set
20175 incorrectly, fixed.
20176
20177 2002-09-23 Torbjorn Granlund <[email protected]>
20178
20179 * mpf/urandomb.c: Don't crash for overlarge nbits argument.
20180 Let nbits==0 mean to fill number with random bits.
20181
20182 2002-09-21 Torbjorn Granlund <[email protected]>
20183
20184 * mpn/alpha/mod_34lsub1.asm: Add r31 dummy operand to `br' instruction.
20185
20186 2002-09-20 Gerardo Ballabio <[email protected]>
20187
20188 * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken
20189 mpq/double functions.
20190
20191 2002-09-18 Torbjorn Granlund <[email protected]>
20192
20193 * randmt.c (randget_mt): Fix typo.
20194
20195 2002-09-18 Kevin Ryde <[email protected]>
20196
20197 * gmp-impl.h (_gmp_rand): Avoid evaluating "state" more than once, for
20198 the benefit places calling it with RANDS.
20199
20200 * randmt.c (randseed_mt): Use mpz_init for mod and seed1, for safety.
20201
20202 * tune/tuneup.c (sqr_karatsuba_threshold): Initialize to
20203 TUNE_SQR_KARATSUBA_MAX so mpn_sqr_n works for randmt initialization.
20204
20205 * gmp.texi (Integer Comparisons): Remove mention of non-existent
20206 mpz_cmpabs_si, reported by Conrad Curry.
20207
20208 * tune/speed.c, tune/speed.h, tune/common.c: Add gmp_randseed,
20209 gmp_randseed_ui and mpz_urandomb.
20210
20211 2002-09-18 Pedro Gimeno <[email protected]>
20212
20213 * tests/rand/gen.c: Add mt, remove lc and bbs.
20214
20215 * Makefile.am (libgmp_la_SOURCES): Add randmt.c, remove randlc.c and
20216 randraw.c.
20217
20218 * randmt.c: New file.
20219 * gmp-h.in (gmp_randinit_mt): Add prototype.
20220 * randdef.c: Use gmp_randinit_mt.
20221
20222 * gmp-impl.h (RNG_FNPTR, RNG_STATE): New macros.
20223 (gmp_randfnptr_t): New structure.
20224 (_gmp_rand): Now a macro not a function.
20225 * gmp-h.in (__gmp_randata_lc): Remove, now internal to randlc2x.c.
20226 (__gmp_randstate_struct): Revise comments on field usage.
20227 * randsd.c, randclr.c: Use function pointer scheme.
20228 * randsdui.c: Use gmp_randseed.
20229 * randraw.c: Remove file.
20230 * randlc2x.c: Collect up lc_2exp related code from randsd.c, randclr.c
20231 and randraw.c, use function pointer scheme, integrate seed==0/a==0
20232 into main case and fix case where bits(a) < m2exp.
20233
20234 * randlc.c: Remove file, never documented and never worked.
20235 * gmp-h.in (gmp_randinit_lc): Remove prototype.
20236
20237 2002-09-16 Torbjorn Granlund <[email protected]>
20238
20239 * mpn/alpha/mod_34lsub1.asm: New file.
20240
20241 2002-09-16 Kevin Ryde <[email protected]>
20242
20243 * configure.in, acinclude.m4 (GMP_C_RESTRICT): Remove this, not
20244 currently used, and #define restrict upsets Microsoft C headers on
20245 win64. Reported by David Librik.
20246
20247 * configure.in (x86): Add gcc 3.2 -march and -mcpu flags, remove some
20248 unnecessary -march=i486 fallbacks.
20249
20250 * gmp.texi (Notes for Particular Systems): Note cl /MD is required for
20251 Microsoft C and MINGW to cooperate on I/O. Explained by David Librik.
20252 (Language Bindings): Add linbox.
20253 * gmp.texi (Language Bindings):
20254
20255 2002-09-12 Kevin Ryde <[email protected]>
20256
20257 * mpz/aorsmul_i.c: Allow for w==x overlap with nails. Test
20258 BITS_PER_ULONG > GMP_NUMB_BITS rather than GMP_NAIL_BITS != 0.
20259 * tests/mpz/t-aorsmul.c: Test this.
20260
20261 * tune/common.c: mpn_mod_34lsub1 only exists for GMP_NUMB_BITS%4==0
20262 * tune/speed.c: Add mpn_mod_34lsub1.
20263
20264 2002-09-10 Pedro Gimeno <[email protected]>
20265
20266 * rand.c: Remove old disabled BBS code.
20267 * mpf/urandomb.c: Use BITS_TO_LIMBS.
20268
20269 2002-09-10 Kevin Ryde <[email protected]>
20270
20271 * gmp.texi (Multiplication Algorithms): FFT is now enabled by default.
20272
20273 2002-09-10 Pedro Gimeno <[email protected]>
20274
20275 * mpz/urandomm.c: Use mpn level functions, avoid an infinite loop if
20276 _gmp_rand forever returns all "1" bits.
20277 * tests/rand/t-urndmm.c: New file
20278 * tests/rand/Makefile.am (check_PROGRAMS): Add it.
20279
20280 * gmp-impl.h (BITS_TO_LIMBS): New macro.
20281 * mpz/urandomb.c: Use it, and use MPZ_REALLOC.
20282
20283 2002-09-08 Kevin Ryde <[email protected]>
20284
20285 * acinclude.m4 (GMP_GCC_WA_MCPU): New macro.
20286 * configure.in (alpha*-*-*): Use it to avoid -Wa,-mev67 if gas isn't
20287 new enough to know ev67. Reported by David Bremner.
20288
20289 2002-07-30 Gerardo Ballabio <[email protected]>
20290
20291 * gmpxx.h (__gmpz_value etc): Remove, use mpz_t etc instead.
20292 (__gmp_expr): Reorganise specializations, use __gmp_expr<T,T> not
20293 mpz_class etc.
20294 (mpfr evals): Remove mode parameter, was always
20295 __gmp_default_rounding_mode anyway.
20296
20297 2002-09-07 Kevin Ryde <[email protected]>
20298
20299 * gmp-h.in, mp-h.in: Use #ifdef for tests, for the benefit of
20300 applications using gcc -Wundef.
20301
20302 * longlong.h: Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB for all alphas,
20303 since mpn/alpha/cntlz.asm always goes into libgmp.so, even for ev67
20304 and ev68 which don't need it. Reported by David Bremner.
20305
20306 * gmp.texi (Demonstration Programs): New section, expanding on what
20307 was under "Build Options".
20308 (Converting Floats): Don't need \ for _ in @var within @math.
20309 Add and amend various index entries.
20310
20311 * demos/qcn.c: Add -p prime limit option.
20312
20313 2002-08-30 Kevin Ryde <[email protected]>
20314
20315 * mpz/pprime_p.c: Handle small negatives with isprime, in particular
20316 must do so for n==-2.
20317 * tests/mpz/t-pprime_p.c: New file.
20318 * tests/mpz/Makefile.am: Add it.
20319
20320 2002-08-26 Torbjorn Granlund <[email protected]>
20321
20322 * gmp.texi (Converting Floats): Fix typo in mpf_get_d_2exp docs,
20323 reported by Paul Zimmermann.
20324
20325 2002-08-26 Kevin Ryde <[email protected]>
20326
20327 * configure.in: Echo the ABI being tried for the compilers.
20328 (powerpc*-*-*): Use powerpc64/aix.m4 for ABI=aix64 too.
20329 (AC_CHECK_FUNCS): Add strtol, for tests/rand/gen.c.
20330
20331 2002-08-24 Kevin Ryde <[email protected]>
20332
20333 * configure.in (HAVE_HOST_CPU_, HAVE_HOST_CPU_FAMILY_, HAVE_NATIVE_):
20334 Setup templates for these using AH_VERBATIM rather than acconfig.h,
20335 preferred by latest autoconf. Prune lists to just things used.
20336 * acconfig.h: Remove file.
20337
20338 * mpn/powerpc32/mode1o.asm: Forgot ASM_START.
20339
20340 * tune/time.c (have_cgt_id): Renamed from HAVE_CGT_ID so avoid
20341 confusion with autoconf outputs, and turn it into a "const" variable.
20342
20343 2002-08-23 Torbjorn Granlund <[email protected]>
20344
20345 * configure.in: Choose powerpc32/aix.m4 or powerpc64/aix.m4 based on
20346 ABI, not configuration triple.
20347
20348 * mpz/pprime_p.c: Partially undo last change--handle small and
20349 negative numbers in the same test.
20350
20351 2002-08-22 Kevin Ryde <[email protected]>
20352
20353 * gmp-impl.h (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD): Note
20354 mpn/generic/mul_fft.c is not nails-capable, and don't bother setting
20355 other FFT data for nails.
20356
20357 * configfsf.guess: Update to 2002-08-19.
20358 * configfsf.sub: Update to 2002-08-20.
20359
20360 * config.guess (powerpc*-*-*): Use a { } construct to suppress SIGILL
20361 message on AIX.
20362
20363 2002-08-20 Kevin Ryde <[email protected]>
20364
20365 * gmp.texi (Build Options): Add ia64 under cpu types.
20366 (ABI and ISA): Describe IRIX 6 ABI=o32.
20367 (Notes for Particular Systems): Remove -march=pentiumpro, now ok.
20368 (Known Build Problems): Binutils 2.12 is ok for libgmp.a.
20369 (Emacs): New section.
20370 (Language Bindings): Update MLton URL, reported by Stephen Weeks.
20371 (Prime Testing Algorithm): New section.
20372 Don't put a blank line after @item in @table since it can make a page
20373 break between the heading and the entry.
20374 Misc tweaks elsewhere, in particular more index entries.
20375
20376 * mpz/millerrabin.c: Need x to be size+1 for change to urandomm.
20377
20378 * gmp-impl.h: Comments on the use of __GMP_DECLSPEC.
20379
20380 * tune/time.c (freq_measure_mftb_one): Use struct_timeval, for the
20381 benefit of mingw.
20382
20383 * tests/refmpn.c, tests/tests.h (ref_addc_limb, ref_subc_limb):
20384 Renamed from add and sub, following gmp-impl.h ADDC_LIMB and SUBC_LIMB.
20385
20386 2002-08-17 Kevin Ryde <[email protected]>
20387
20388 * mpn/powerpc32/mode1o.asm: New file.
20389 * configure.in, acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): New macro.
20390 * mpn/asm-defs.m4: Use it to help setting up PIC.
20391
20392 * configure.in (AC_PREREQ): Bump to 2.53.
20393
20394 * mpn/powerpc32/powerpc-defs.m4 (ASSERT): New macro.
20395 (PROLOGUE_cpu): New macro, giving ALIGN(4) not 8.
20396
20397 2002-08-16 Torbjorn Granlund <[email protected]>
20398
20399 * mpn/m68k/lshift.asm: Fix typo in !scale_available_p code.
20400 * mpn/m68k/rshift.asm: Likewise.
20401
20402 2002-08-16 Kevin Ryde <[email protected]>
20403
20404 * configure.in (--enable-profiling=instrument): New option.
20405 * gmp.texi (Profiling): Describe it.
20406 * mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_instrument, ret_internal):
20407 Add support.
20408 (call_mcount): Share PIC setups with call_instrument.
20409 * mpn/x86/*.asm: Use ret_internal.
20410 * mpn/asm-defs.m4 (m4_unquote): New macro.
20411 * tests/mpn/t-instrument.c: New file.
20412 * tests/mpn/Makefile.am: Add it.
20413
20414 * mpn/alpha/umul.asm: Add ASM_END.
20415
20416 2002-08-12 Kevin Ryde <[email protected]>
20417
20418 * mpz/pprime_p.c: Fake up a local mpz_t to take abs(n), rather than
20419 using mpz_init etc.
20420
20421 * mpz/millerrabin.c: Use mpz_urandomm for uniform selection of x,
20422 reported by Jason Moxham. Exclude x==n-1, ie. -1 mod n. Use
20423 gmp_randinit_default.
20424
20425 * mpn/alpha/umul.asm: Use "r" registers, for the benefit of Unicos.
20426
20427 * tests/devel/try.c: Add mpn_copyi and mpn_copyd.
20428
20429 2002-08-09 Kevin Ryde <[email protected]>
20430
20431 * Makefile.am: Remove configure.lineno from DISTCLEANFILES and gmp.tmp
20432 from MOSTLYCLEANFILES, automake does these itself now.
20433
20434 * */Makefile.in, aclocal.m4, configure, install-sh, missing,
20435 mkinstalldirs: Update to automake 1.6.3.
20436
20437 * mpn/ia64/README: Some notes on assembler syntax.
20438
20439 * mpn/ia64/add_n.asm, mpn/ia64/sub_n.asm: Add .body.
20440 * mpn/ia64/add_n.asm, mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm,
20441 mpn/ia64/sub_n.asm: Position .save ar.lc just before relevant
20442 instruction.
20443 * mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm: Add .save ar.pfs and pr.
20444 * mpn/ia64/copyd.asm, mpn/ia64/copyi.asm: Correction to .body position.
20445 * mpn/ia64/lorrshift.asm: Add .prologue stuff.
20446
20447 * configure.in (*-*-unicos*): Remove forcible --disable-shared,
20448 libtool gets this right itself now.
20449
20450 2002-08-07 Kevin Ryde <[email protected]>
20451
20452 * mpn/x86/pentium/mmx/hamdist.asm: New file, adapted from
20453 mpn/x86/pentium/mmx/popham.asm.
20454 * mpn/x86/pentium/mmx/popham.asm: Remove file, not faster than plain
20455 mpn/x86/pentium/popcount.asm for the popcount.
20456
20457 * mpn/alpha/umul.asm: Use PROLOGUE/EPILOGUE, rename it mpn_umul_ppmm.
20458 * configure.in (alpha*-*-*): Add umul to extra_functions.
20459
20460 * mpz/remove.c: Make src==0 return 0, not do DIVIDE_BY_ZERO.
20461
20462 2002-08-05 Torbjorn Granlund <[email protected]>
20463
20464 * acconfig.h: Remove spurious undefs for mpn_divrem_newton and
20465 mpn_divrem_classic.
20466
20467 2002-08-05 Kevin Ryde <[email protected]>
20468
20469 * tests/refmpn.c, tests/tests.h, tests/misc/t-printf.c,
20470 tests/mpf/t-trunc.c, tests/mpn/t-mp_bases.c, tests/mpn/t-scan.c,
20471 tests/mpq/t-cmp_ui.c, tests/mpz/bit.c, tests/mpz/t-aorsmul.c,
20472 tests/mpz/t-powm_ui.c tests/mpz/t-root.c, tests/mpz/t-scan.c: More
20473 care with long and mp_size_t parameters, for the benefit of K&R.
20474
20475 * demos/perl/GMP.pm, demos/perl/GMP.xs, demos/perl/GMP/Mpz.pm,
20476 demos/perl/test.pl: Add mpz_import and mpz_export.
20477 * demos/perl/GMP.pm: Remove "preliminary" warning.
20478
20479 * mpn/lisp/gmpasm-mode.el: Set add-log-current-defun-header-regexp to
20480 pick up m4 defines etc.
20481
20482 * Makefile.am (libgmpxx_la_DEPENDENCIES): libgmp.la should be here,
20483 not libgmpxx_la_LIBADD, for the benefit of "make -j2".
20484
20485 * mpn/ia64/*.asm [hpux ABI=32]: Extend 32-bit operands to 64-bits, not
20486 optimal and might not be sufficient, but seems to work.
20487
20488 2002-08-03 Kevin Ryde <[email protected]>
20489
20490 * gmp.texi (Profiling): Use a table and expand for clarity.
20491 (Integer Special Functions): New section for mpz_array_init,
20492 _mpz_realloc, mpz_getlimbn and mpz_size, to discourage their use.
20493
20494 * configure.in (*-*-msdosdjgpp*): Remove forcible --disable-shared,
20495 libtool gets this right itself now.
20496
20497 2002-07-30 Kevin Ryde <[email protected]>
20498
20499 * mpn/powerpc32/lshift.asm, mpn/powerpc32/rshift.asm: Lose final mr,
20500 and make final stwu into an stw.
20501
20502 * gmp.texi (Known Build Problems): An easier workaround for DESTDIR,
20503 using LD_LIBRARY_PATH.
20504 (C++ Interface MPFR): Remove mpfrxx.h.
20505
20506 * mpfrxx.h: Remove file.
20507 * Makefile.am: Remove mpfrxx.h.
20508 * tests/cxx/Makefile.am: Add Gerardo's new test programs.
20509
20510 2002-07-30 Gerardo Ballabio <[email protected]>
20511
20512 * gmpxx.h: Use mpz_addmul etc for ternary a+b*c etc. Reorganise some
20513 macros for maintainability. Merge mpfrxx.h.
20514 * tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: Various updates.
20515 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc,
20516 tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: New files.
20517
20518 2002-07-27 Kevin Ryde <[email protected]>
20519
20520 * longlong.h (count_trailing_zeros) [ia64 __GNUC__]: Don't use
20521 __builtin_ffs for now, doesn't seem to work.
20522
20523 * configure.in: Establish CONFIG_SHELL to avoid a problem with
20524 AC_LIBTOOL_SYS_MAX_CMD_LEN on ia64-*-hpux*.
20525
20526 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_FINDA): Don't let calls to
20527 mpn_gcd_finda go dead.
20528
20529 * mpn/generic/tdiv_qr.c: Inline mpn_rshift and MPN_COPY of 2 limbs.
20530
20531 2002-07-24 Kevin Ryde <[email protected]>
20532
20533 * demos/primes.c: Use __GMP_PROTO and don't use signed, for the
20534 benefit of K&R.
20535
20536 * demos/calc/calclex.l: Add <string.h> for strcmp.
20537
20538 * mpn/ia64/invert_limb.asm: Use .rodata which works on ia64-*-hpux*
20539 and should be standard, rather than worrying about RODATA.
20540
20541 * gmp.texi (Function Classes): Add cross references.
20542 (Integer Import and Export): Fix return value grouping.
20543
20544 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add // for
20545 ia64. Add notes on what the various styles are for.
20546
20547 * mpn/ia64/default.m4 (ASM_START): Define to empty, not dnl, so as not
20548 to kill text on the same line.
20549 (EPILOGUE_cpu): Force a newline after "#", so as not to suppress macro
20550 expansion in the rest of the EPILOGUE line.
20551
20552 2002-07-21 Kevin Ryde <[email protected]>
20553
20554 * tune/speed.h: Fix some missing _PROTOs.
20555
20556 * Makefile.am (DISTCLEANFILES): Add configure.lineno.
20557
20558 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Define
20559 HAVE_DOUBLE_IEEE_BIG_ENDIAN and HAVE_DOUBLE_IEEE_LITTLE_ENDIAN in
20560 config.m4 too.
20561 * mpn/ia64/invert_limb.asm: Add big-endian data.
20562
20563 * tests/mpz/t-jac.c (try_si_zi): Correction to "a" parameter type.
20564
20565 2002-07-20 Kevin Ryde <[email protected]>
20566
20567 * mpz/bin_ui.c, mpz/jacobi.c, mpz/pprime_p.c, mpn/generic/divis.c:
20568 More care with long and mp_size_t parameters, for the benefit of K&R.
20569
20570 * gmp-impl.h (invert_limb): Use parens around macro arguments.
20571 (mpn_invert_limb): Give prototype and define unconditionally.
20572
20573 * gmp-impl.h (CACHED_ABOVE_THRESHOLD, CACHED_BELOW_THRESHOLD): New
20574 macros.
20575 * mpn/generic/sb_divrem_mn.c: Use them to help gcc let preinv code go
20576 dead when not wanted.
20577
20578 2002-07-17 Kevin Ryde <[email protected]>
20579
20580 * tests/refmpz.c (refmpz_hamdist): Ensure mp_size_t parameters are
20581 that type, for the benefit of hpux ia64 bundled cc ABI=64.
20582
20583 * configure.in (ia64*-*-hpux*): Need +DD64 in cc_64_cppflags to get
20584 the right headers for ansi2knr.
20585
20586 * acinclude.m4 (GMP_TRY_ASSEMBLE, GMP_ASM_UNDERSCORE): Use $CPPFLAGS
20587 with $CCAS and when linking, as done by the makefiles.
20588 (GMP_ASM_X86_MMX, GMP_ASM_X86_SSE2): Show $CPPFLAGS in diagnostics.
20589
20590 * gmp-impl.h (ieee_double_extract): Setup using HAVE_DOUBLE_IEEE_*.
20591 (GMP_UINT32): New define, 32 bit type for ieee_double_extract.
20592 * configure.in: Add AC_CHECK_SIZEOF unsigned.
20593 * configure.in, acinclude.m4 (GMP_IMPL_H_IEEE_FLOATS): Remove.
20594 (GMP_C_DOUBLE_FORMAT): Instead warn about unknown float here.
20595
20596 * configure.in, acinclude.m4 (GMP_C_SIZES): Remove.
20597 * acinclude.m4 (GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB): Remove this
20598 scheme, not required.
20599 * configure.in (unsigned long, mp_limb_t): Run AC_CHECK_SIZEOF for
20600 these unconditionally, check mp_limb_t against gmp-mparam.h values.
20601 * gmp-impl.h (BYTES_PER_MP_LIMB, BITS_PER_MP_LIMB): Define based on
20602 SIZEOF_MP_LIMB_T if not provided by gmp-mparam.h.
20603 (BITS_PER_ULONG): Define here now.
20604
20605 * gmp.texi (ABI and ISA): Add HP-UX IA-64 choices.
20606 (Random State Initialization): Typo in m2exp described for
20607 gmp_randinit_lc_2exp_size.
20608 (Formatted Output Functions): Clarify gmp_obstack_printf a bit.
20609 (Formatted Input Strings): Typo in %n summary.
20610
20611 * mpz/inp_raw.c (NTOH_LIMB_FETCH): Use simple generic default, since
20612 endianness detection is now cross-compile friendly.
20613 * mpz/out_raw.c (HTON_LIMB_STORE): Ditto.
20614
20615 * mpz/fib_ui.c: Nailify.
20616 * mpz/random.c: Nailify.
20617
20618 * mpfr/acinclude.m4 (MPFR_CONFIGS): Patch by Vincent for an apparent
20619 float rounding gremlin on powerpc.
20620
20621 2002-07-15 Kevin Ryde <[email protected]>
20622
20623 * Makefile.am (PRINTF_OBJECTS): Avoid ending in a backslash, hpux ia64
20624 make doesn't like that.
20625
20626 * mpn/ia64/*.asm: Add .sptk to unconditional branches, add ";" after
20627 .mib etc, for the benefit of hpux.
20628
20629 * configure.in (ia64*-*-*): Use ABI=64 on non-HPUX systems, for
20630 consistency.
20631
20632 * gmp-impl.h (ieee_double_extract): Test __sparc__, used by gcc 3.1.
20633 Reported by [email protected].
20634 * mpfr/mpfr-math.h (_MPFR_NAN_BYTES etc): Ditto.
20635
20636 2002-07-13 Kevin Ryde <[email protected]>
20637
20638 * mpn/powerpc32/rshift.asm: Rewrite, transformed from lshift.asm.
20639
20640 * tune/tuneup.c (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD):
20641 Always zero for native mpn_divexact_1, mpn_modexact_1_odd.
20642
20643 * gmp-h.in (__GMP_EXTERN_INLINE): Don't use this during configure,
20644 ie. __GMP_WITHIN_CONFIGURE, to avoid needing dependent routines.
20645 * acinclude.m4 (GMP_H_EXTERN_INLINE): Consequent changes.
20646
20647 * gmp-impl.h, mpn/asm-defs.m4 (mpn_addmul_2, mpn_addmul_3,
20648 mpn_addmul_4): Add prototypes and defines.
20649
20650 * gmp.texi (Number Theoretic Functions): Clarify return value.
20651 Reported by Peter Keller.
20652
20653 2002-07-10 Kevin Ryde <[email protected]>
20654
20655 * configure.in, acinclude.m4 (GMP_PROG_LEX): Remove this in favour of
20656 AM_PROG_LEX, now ok when lex is missing.
20657
20658 * longlong.h (count_leading_zeros) [pentiummmx]: Don't use __clz_tab
20659 variant under LONGLONG_STANDALONE.
20660 (count_trailing_zeros) [ia64 __GNUC__]: Use __builtin_ffs.
20661
20662 * gmp-impl.h (popc_limb): Add an ia64 asm version.
20663 (DItype): Use HAVE_LONG_LONG to choose long long, avoiding _LONGLONG
20664 which is in gcc but means something unrelated in MS Visual C 7.0.
20665 Reported by David Librik.
20666
20667 * mpz/divexact.c: Add an ASSERT that den divides num.
20668
20669 * mpn/asm-defs.m4 (LDEF): New macro.
20670 (INT32, INT64): Use it.
20671 * mpn/pa32/*.asm: Use it.
20672 * mpn/pa32/README: Update notes on labels.
20673
20674 * tests/refmpn.c, tests/tests.h, tests/t-bswap.c (ref_bswap_limb):
20675 Renamed from refmpn_bswap_limb.
20676 * tests/t-bswap.c: Add tests_start/tests_end for randomization.
20677
20678 * tests/refmpn.c, tests/tests.h (ref_popc_limb): New function.
20679 * tests/t-popc.c: New file.
20680 * tests/Makefile.am: Add it.
20681
20682 * mpn/ia64/invert_limb.asm: Use RODATA since ".section .rodata" is not
20683 accepted by ia64-*-hpux*.
20684
20685 * acinclude.m4 (GMP_ASM_BYTE): New macro.
20686 (GMP_ASM_ALIGN_LOG, GMP_ASM_W32): Use it.
20687 (GMP_ASM_LABEL_SUFFIX): Use test compiles, not $host.
20688 (GMP_ASM_GLOBL): Ditto, and add .global for ia64-*-hpux*.
20689 (GMP_ASM_GLOBL_ATTR): Use GMP_ASM_GLOBL result, not $host.
20690 (GMP_ASM_LSYM_PREFIX): Allow any "a-z" nm symbol code, add ".text" to
20691 test program, required by ia64-*-hpux*.
20692 (GMP_ASM_LABEL_SUFFIX): Make LABEL_SUFFIX just the value, not a "$1:",
20693 the former being how it's currently being used in fact.
20694
20695 * configure.in, acinclude.m4 (GMP_PROG_CC_WORKS_LONGLONG): New macro.
20696 * configure.in (ia64-*-hpux*): Add 32 and 64 bit ABI modes.
20697
20698 2002-07-06 Kevin Ryde <[email protected]>
20699
20700 * tests/cxx/t-allfuns.cc: New file.
20701 * tests/cxx/Makefile.am: Add it.
20702
20703 * mpz/clrbit.c, mpz/setbit.c: Only MPN_NORMALIZE if high limb changes
20704 to zero. Use _mpz_realloc return value.
20705
20706 * gmp.texi (Build Options, C++ Formatted Output, C++ Formatted Input):
20707 Cross reference to Headers and Libraries for libgmpxx stuff.
20708 (Low-level Functions): mpn_divexact_by3 result based on GMP_NUMB_BITS.
20709 mpn_set_str takes "unsigned char *", reported by Mark Sofroniou.
20710 (C++ Interface General): Describe linking with libgmpxx and libgmp.
20711
20712 2002-07-01 Kevin Ryde <[email protected]>
20713
20714 * tune/tuneup.c, gmp-impl.h: Eliminate the array of thresholds in
20715 one(), tune just one at a time and let the callers hand dependencies.
20716 Eliminate the second_start_min hack, handle SQR_KARATSUBA_THRESHOLD
20717 oddities in tune_sqr() instead.
20718
20719 * mpn/pa64/umul.asm, mpn/pa64/udiv.asm, mpn/asm-defs.m4, acconfig.h,
20720 longlong.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
20721 tests/devel/try.c: Introduce mpn_umul_ppmm_r and mpn_udiv_qrnnd_r
20722 rather than having variant parameter order for mpn_umul_ppmm and
20723 mpn_udiv_qrnnd on pa64.
20724
20725 * gmp-h.in (mpz_export): Remove a spurious parameter name.
20726 * gmp-impl.h (mpn_rootrem): Use __MPN.
20727
20728 2002-06-29 Kevin Ryde <[email protected]>
20729
20730 * longlong.h (udiv_qrnnd) [hppa32]: Remove mpn_udiv_qrnnd version, the
20731 general mechanism for that suffices.
20732
20733 * mpf/inp_str.c: Fix returned count of chars read, reported by Paul
20734 Zimmermann. Also fix a memory leak for invalid input.
20735 * tests/mpf/t-inp_str.c: New file.
20736 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
20737
20738 * tests/devel/try.c (mpn_mod_34lsub1): Only exists for
20739 GMP_NUMB_BITS%4==0.
20740 (SIZE2_FIRST): Respect option_firstsize2 for "fraction" case.
20741
20742 * mpn/generic/diveby3.c: Further nailifications.
20743 * gmp-impl.h (MODLIMB_INVERSE_3): Allow for GMP_NUMB_BITS odd.
20744 (GMP_NUMB_CEIL_MAX_DIV3, GMP_NUMB_CEIL_2MAX_DIV3): New constants.
20745 * tests/t-constants.c: Check them.
20746
20747 * gmp-h.in (__GMP_CRAY_Pragma): New macro.
20748 (__GMPN_COPY_REST): Use it.
20749 * gmp-impl.h (CRAY_Pragma): Use it.
20750
20751 2002-06-25 Kevin Ryde <[email protected]>
20752
20753 * mpz/import.c, mpz/export.c: Cast data pointer through "char *" in
20754 alignment tests, for the benefit of Cray vector systems.
20755
20756 * configure.in (x86-*-*): Remove -march=pentiumpro check, seems ok
20757 with current code.
20758 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO, GMP_GCC_VERSION_GE): Remove
20759 macros, no longer needed
20760
20761 * acinclude.m4 (GMP_ASM_RODATA): Remove temporary files.
20762
20763 * configure.in (GMP_ASM_GLOBL_ATTR): Reposition to avoid duplication
20764 through AC_REQUIRE.
20765
20766 2002-06-23 Kevin Ryde <[email protected]>
20767
20768 * tests/mpz/t-fib_ui.c (check_fib_table): Check table values, not just
20769 that they're non-zero.
20770
20771 * acinclude.m4 (GMP_GCC_ARM_UMODSI): Match bad "gcc --version" output
20772 exactly, rather than parsing it with GMP_GCC_VERSION_GE.
20773 (GMP_ASM_UNDERSCORE): Use GLOBL_ATTR.
20774
20775 * mpn/pa32/udiv.asm, mpn/pa32/hppa1_1/udiv.asm, mpn/pa64/udiv.asm:
20776 Renamed from udiv_qrnnd.asm, for consistency with other udiv's.
20777 * mpn/pa64/umul.asm: Renamed from umul_ppmm.asm likewise.
20778 * configure.in (hppa*-*-*): Update extra_functions.
20779 (NAILS_SUPPORT): Remove umul_ppmm, udiv_qrnnd, udiv_fp, udiv_nfp from
20780 nails-neutral list, no longer needed.
20781
20782 * gmp-h.in (__DECC): Add notes on testing this for ANSI-ness.
20783 (__GMP_EXTERN_INLINE): Add static __inline for DEC C.
20784 (mpz_mod_ui): Move up to main section, it's still documented.
20785
20786 2002-06-22 Kevin Ryde <[email protected]>
20787
20788 * mpz/jacobi.c, mpz/kronsz.c, mpz/kronuz.c, mpz/kronzs.c,
20789 mpz/kronzu.c: Allow for odd GMP_NUMB_BITS, tweak a few variable setups.
20790 * gmp-impl.h (JACOBI_STRIP_LOW_ZEROS): New macro.
20791
20792 * mpn/generic/mod_34lsub1.c: Nailify.
20793 * tests/devel/try.c (CNST_34LSUB1): Nailify.
20794 * gmp-impl.h (ADDC_LIMB): New macro.
20795
20796 * gmpxx.h (mpf_class::get_str): Make exponent mp_exp_t&, default
20797 base=10 and ndigits=0.
20798 (mpz_class::set_str, mpq_class::set_str, mpf_class::set_str): Add
20799 versions accepting "const char *".
20800 * mpfrxx.h (mpfr_class::get_str, mpfr_class::set_str): Ditto, and
20801 uncommenting set_str and operator=.
20802 * gmp.texi (C++ Interface Integers, C++ Interface Rationals)
20803 (C++ Interface Floats): Update.
20804
20805 * gmp-impl.h (modlimb_invert): Merge the <=64bits and general versions.
20806 (const, signed): Move to near top of file, fixes --enable-alloca=debug
20807 on K&R.
20808
20809 * gen-fib.c: New file, derived from mainline in mpn/generic/fib2_ui.c.
20810 * dumbmp.c (mpz_init_set_ui): New function.
20811 * Makefile.am, mpn/Makefile.am: Generate fib_table.h, mpn/fib_table.c.
20812 * gmp-impl.h: Use fib_table.h, add __GMP_DECLSPEC to __gmp_fib_table
20813 (for the benefit of tests/mpz/t-fib_ui.c).
20814 * mpn/generic/fib2_ui.c: Remove __gmp_fib_table and generating code.
20815
20816 * Makefile.am: Add mp.h to BUILT_SOURCES, distclean all BUILT_SOURCES,
20817 use += more.
20818
20819 * acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_BRANCHES):
20820 Don't let "unknown" get into the cache variables.
20821 (GMP_ASM_TEXT): See what assembles, don't hard-code hpux and aix.
20822 (GMP_PROG_EXEEXT_FOR_BUILD): Add ,ff8 for RISC OS, per autoconf cvs.
20823 (GMP_PROG_CPP_FOR_BUILD): Restructure per AC_PROG_CPP, print correct
20824 result if CPP_FOR_BUILD overrides the cache variable.
20825 (GMP_PROG_CC_FOR_BUILD_WORKS): New macro split from
20826 GMP_PROG_CC_FOR_BUILD. Allow for "conftest" default compiler output.
20827 * configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Reinstate this,
20828 separating HOST_CC establishment from GMP_PROG_CC_FOR_BUILD.
20829
20830 * configure.in (mpn_objs_in_libgmp): Move mpn/mp_bases.lo ...
20831 * Makefile.am (MPN_OBJECTS): ... to here, add $U, and arrange
20832 MPN_OBJECTS to be common between libgmp and libmp.
20833
20834 2002-06-20 Torbjorn Granlund <[email protected]>
20835
20836 * mpn/generic/mul_n.c (TOOM3_MUL_REC, TOOM3_SQR_REC): Don't check if
20837 basecase is to be invoked when *_TOOM3_THRESHOLD is more than 3 times
20838 the corresponding *_THRESHOLD.
20839
20840 2002-06-20 Kevin Ryde <[email protected]>
20841
20842 * mpn/ia64/submul_1.c: Add missing TMP_DECL, TMP_MARK, TMP_FREE.
20843 Reported by Paul Zimmermann.
20844
20845 * configure.in, acinclude.m4 (AC_DEFINE): Make templates read "Define
20846 to 1", for clarity as per autoconf.
20847 * acinclude.m4 (GMP_OPTION_ALLOCA): Group WANT_TMP templates.
20848
20849 2002-06-20 Gerardo Ballabio <[email protected]>
20850
20851 * gmpxx.h, mpfrxx.h: Remove mpz_classref, let mpq_class::get_num and
20852 mpq_class::get_den return mpz_class& as per the documentation.
20853 Reported by Roberto Bagnara.
20854
20855 2002-06-18 Kevin Ryde <[email protected]>
20856
20857 * tests/rand/t-lc2exp.c: New file.
20858 * tests/rand/Makefile.am: Add it, and use tests/libtests.la.
20859
20860 * randraw.c (lc): Pad seed==0 case with zero limbs, return same
20861 (m2exp+1)/2 bits as normal, right shift "c" result as normal.
20862
20863 * configure.in: Don't bother with line numbers in some diagnostics.
20864 (*-*-mingw*): Use -mno-cygwin if it works, suggested by delta trinity.
20865
20866 * tests/mpz/Makefile.am, tests/mpq/Makefile.am,
20867 tests/misc/Makefile.am, (CLEANFILES): Set to *.tmp for test program
20868 temporaries, to get t-scanf.tmp and reduce future maintenance.
20869
20870 2002-06-16 Torbjorn Granlund <[email protected]>
20871
20872 * mpn/generic/get_str.c (mpn_dc_get_str): Pass scratch memory area in
20873 new `tmp' parameter. Trim allocation needs by reusing input parameter.
20874
20875 2002-06-15 Torbjorn Granlund <[email protected]>
20876
20877 * mpn/sparc32/v9/udiv.asm: New file.
20878
20879 2002-06-15 Kevin Ryde <[email protected]>
20880
20881 * acinclude.m4 (GMP_GCC_VERSION_GE): Correction to recognising mingw
20882 gcc 3.1 version number. Reported by Jim Fougeron.
20883
20884 * configure.in (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): New define, to make
20885 AC_LIBTOOL_WIN32_DLL work with autoconf 2.53.
20886
20887 * acinclude.m4 (GMP_C_SIZES): Establish BITS_PER_MP_LIMB as a value,
20888 not an expression, for the benefit of the gen-bases invocation.
20889
20890 * config.guess (CC_FOR_BUILD): Try c99, same as configfsf.guess.
20891
20892 2002-06-15 Paul Zimmermann <[email protected]>
20893
20894 * mpfr/set_q.c: Allow for 1 bit numerator or denominator.
20895
20896 2002-06-14 Kevin Ryde <[email protected]>
20897
20898 * configure.in (AC_C_BIGENDIAN): Use new style action parameters.
20899
20900 * randlc2x.c: Allow for a<0, allow for c>=2^m2exp.
20901 * randraw.c (lc): Allow for a==0.
20902
20903 * mpn/sparc32/udiv.asm: Renamed from udiv_fp.asm. Don't know if float
20904 is the best way for v7, but it's what configure has chosen since gmp 3.
20905 * configure.in (*sparc*-*-* ABI=32): extra_functions="udiv" for all,
20906 in particular sparc32/v8/udiv.asm is faster (on ultrasparc2) than
20907 udiv_fp previously used for v9 chips.
20908
20909 * gen-bases.c: New file, derived from mpn/mp_bases.c.
20910 * dumbmp.c: New file, mostly by Torbjorn, some by me.
20911 * configure.in, acinclude.m4 (GMP_PROG_CC_FOR_BUILD,
20912 GMP_PROG_CPP_FOR_BUILD, GMP_PROG_EXEEXT_FOR_BUILD,
20913 GMP_C_FOR_BUILD_ANSI, GMP_CHECK_LIBM_FOR_BUILD): New macros.
20914 (GMP_PROG_HOST_CC): Remove, superceded by GMP_PROG_CC_FOR_BUILD.
20915 * Makefile.am: Run gen-bases to create mp_bases.h and mpn/mp_bases.c.
20916 * gmp-impl.h: Use mp_bases.h.
20917 * mpn/mp_bases.c: Remove file.
20918 * mpn/Makefile.am: mp_bases.c now in nodist_libmpn_la_SOURCES.
20919
20920 * tests/mpz/t-cmp_d.c (check_one_2exp): Use volatile to force to
20921 double, fixes gcc 3.1 with -O4. Reported by Michael Lee.
20922 * configure.in (AC_C_VOLATILE): New macro.
20923
20924 * tests/misc/t-scanf.c: (fromstring_gmp_fscanf): Add missing va_end.
20925 Don't mix varargs and fixed args functions, not good on x86_64.
20926 Reported by Marcus Meissner.
20927
20928 * Makefile.am (EXTRA_DIST): Remove mpfr/README, now in mpfr/Makefile.in
20929
20930 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.53.
20931 * */Makefile.in, install-sh, mdate-sh, missing, aclocal.m4, configure:
20932 Update to automake 1.6.1.
20933 * configfsf.guess, configfsf.sub: Update to 2002-05-29.
20934
20935 2002-06-12 Kevin Ryde <[email protected]>
20936
20937 * acinclude.m4 (GMP_GCC_VERSION_GE): Recognise mingw gcc 3.1 version.
20938 (GMP_PROG_CC_WORKS): Allow for a_out.exe, as per autoconf.
20939 (GMP_GCC_NO_CPP_PRECOMP, GMP_ASM_UNDERSCORE): Ditto, plus a.exe.
20940
20941 2002-06-09 Torbjorn Granlund <[email protected]>
20942
20943 * randraw.c (lc): Remove broken ASSERT_ALWAYS.
20944
20945 * mpn/x86: Update gmp-mparam.h files with current measures *_THRESHOLD
20946 values.
20947 * mpn/x86/p6/mmx/gmp-mparam.h: New file.
20948
20949 2002-06-09 Kevin Ryde <[email protected]>
20950
20951 * mpn/x86/*/gmp-mparam.h (USE_PREINV_DIVREM_1): Add tuned settings.
20952
20953 * acconfig.h (HAVE_NATIVE_mpn_preinv_divrem_1): New template.
20954
20955 * tests/refmpn.c, tests/tests.h (refmpn_chars_per_limb,
20956 refmpn_big_base): New functions.
20957 * tests/mpn/t-mp_bases.c: Use them, and don't test big_base_inverted
20958 unless it's being used.
20959
20960 * gmp.texi (Notes for Particular Systems): Using Microsoft C with DLLs.
20961 (Known Build Problems): Notes on MacOS and GCC.
20962 (Integer Logic and Bit Fiddling): Use ULONG_MAX for maximum ulong.
20963 (Low-level Functions): mpn_get_str accepts base==256.
20964 (Formatted Output Functions): Note output is not atomic.
20965 (Internals): Note mp_size_t for limb counts.
20966
20967 * mp-h.in, gmp-h.in (mp_ptr, mp_srcptr, mp_size_t, mp_exp_t): Remove
20968 these types from mp.h, not needed.
20969
20970 * mpfr/tests/tadd.c, mpfr/tests/tmul.c (check): Apply a hack to the
20971 parameter order to make sparc gcc 2.95.2 happy.
20972
20973 * doc/configuration: Notes on bootstrapping.
20974
20975 2002-06-08 Kevin Ryde <[email protected]>
20976
20977 * mpfr/tests/tsqrt.c, mpfr/tests/tsqrt_ui.c: Suppress tests if sqrt is
20978 not affected by mpfr_set_machine_rnd_mode.
20979
20980 * mpfr/mul_2si.c: Workaround a mips gcc 2.95.3 bug under -O2 -mabi=n32.
20981
20982 * configure.in (alphev56): Fix to use ev5 path.
20983
20984 2002-06-06 Kevin Ryde <[email protected]>
20985
20986 * gmp-h.in: Use __gmp_const not const, in a number of places.
20987
20988 * configure.in (sparc): Use ABI=32 instead of ABI=standard on v7 and
20989 v8, for consistency with v9 choices.
20990 (sparc64): Restrict GMP_ASM_SPARC_REGISTER to ABI=64.
20991 (x86): Move MMX $path munging to before printout.
20992 (CCAS): Move upward to support this.
20993
20994 * gmp-impl.h (modlimb_invert): Merge macros for specific limb sizes,
20995 add a version for arbitrary limb size, use GMP_NUMB_BITS.
20996 (modlimb_invert, MODLIMB_INVERSE_3): Fix comments to say GMP_NUMB_BITS.
20997
20998 * gmp-h.in (__GMP_LIKELY, __GMP_UNLIKELY): New macros.
20999 (mpz_getlimbn, mpz_perfect_square_p, mpz_popcount): Use them, make the
21000 fetch or mpn call likely, unconditionally calculate the alternative so
21001 as to avoid an "else" clause.
21002 * gmp-impl.h (LIKELY, UNLIKELY): Aliases.
21003
21004 * configure.in, mpfr/tests/Makefile.am: Add $LIBM to $LIBS for
21005 MPFR_CONFIGS so it detects fesetround, and let it go through to
21006 $MPFR_LIBS.
21007 * mpfr/rnd_mode.c: Use gmp-impl.h to get MPFR_HAVE_FESETROUND.
21008
21009 * tests/mpz/t-sizeinbase.c: Disable fake bits test, such pointer
21010 setups are bogus and have been seen failing on hppa.
21011
21012 * tests/misc.c, tests/refmpz.c, tests.tests.h, tests/mpz/t-cong.c:
21013 Rename mpz_flipbit to refmpz_combit and move from misc.c to refmpz.c.
21014
21015 2002-06-05 Torbjorn Granlund <[email protected]>
21016
21017 * tests/mpz/t-powm_ui.c Print proper routine name in error message.
21018
21019 2002-06-03 Kevin Ryde <[email protected]>
21020
21021 * tune/time.c, tune/freq.c, tune/speed.h: Add powerpc mftb support.
21022 (FREQ_MEASURE_ONE): Move to speed.h, fix tv_sec factor.
21023 (freq_measure): Use for mftb measuring too.
21024 * tune/powerpc.asm, tune/powerpc64.asm: New files.
21025 * configure.in, tune/Makefile.am: Add them.
21026
21027 * gmp-impl.h (popc_limb): Add versions for Cray and fallback for
21028 arbitrary limb size.
21029
21030 * mpn/sparc32/sparc-defs.m4: New file.
21031 * configure.in (sparc*-*-*): Use it.
21032 * acinclude.m4 (GMP_ASM_SPARC_REGISTER): New macro.
21033 * configure.in (sparc64): Use it. Also, use -Wc,-m64 for linking.
21034 * mpn/sparc64/add_n.asm, mpn/sparc64/addmul_1.asm,
21035 mpn/sparc64/copyd.asm, mpn/sparc64/copyi.asm, mpn/sparc64/lshift.asm,
21036 mpn/sparc64/mul_1.asm, mpn/sparc64/rshift.asm,
21037 mpn/sparc64/sqr_diagonal.asm, mpn/sparc64/sub_n.asm,
21038 mpn/sparc64/submul_1.asm: Use REGISTER for .register.
21039
21040 2002-06-01 Kevin Ryde <[email protected]>
21041
21042 * mpz/powm_ui.c: Fix for result range in certain circumstances.
21043
21044 * mpn/x86/k6/diveby3.asm: Speedup to 10 c/l, same as divexact_1.
21045 Anomaly pointed out by Alexander Kruppa.
21046
21047 2002-05-31 Torbjorn Granlund <[email protected]>
21048
21049 * mpz/export.c: Cast pointer via `unsigned long' when checking
21050 alignment to avoid compiler warnings.
21051
21052 2002-05-29 Kevin Ryde <[email protected]>
21053
21054 * gmp-impl.h (BSWAP_LIMB): Versions for m68k, powerpc, and arbitrary
21055 limb size.
21056 * configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_m68k): New define.
21057
21058 2002-05-27 Torbjorn Granlund <[email protected]>
21059
21060 * mpn/generic/mul_basecase.c: Improve MAX_LEFT handling, returning
21061 when possible. Add code for mpn_addmul_5 and mpn_addmul_6.
21062
21063 2002-05-25 Kevin Ryde <[email protected]>
21064
21065 * tune/tuneup.c: Misc nailifications, and disable preinv thresholds
21066 with nails.
21067 * tune/speed.h: Use GMP_NUMB_HIGHBIT with mpn_sb_divrem_mn and
21068 mpn_divrem_2.
21069 * mpz/powm.c (redc): Nailify q.
21070
21071 * tests/mpn/t-scan.c: Reduce the amount of testing, to go faster.
21072
21073 2002-05-23 Torbjorn Granlund <[email protected]>
21074
21075 * Version 4.1 released.
21076
21077 * mpn/alpha/ev6/nails/gmp-mparam.h: New file.
21078
21079 * tests/devel/add_n.c (refmpn_add_n): Nailify.
21080 * tests/devel/sub_n.c (refmpn_sub_n): Nailify.
21081 * tests/devel/addmul_1.c (refmpn_addmul_1): Nailify.
21082 * tests/devel/submul_1.c (refmpn_submul_1): Nailify.
21083
21084 * mpn/alpha/ev6/nails/add_n.asm: New file.
21085 * mpn/alpha/ev6/nails/sub_n.asm: New file.
21086 * mpn/alpha/ev6/nails/mul_1.asm: New file.
21087 * mpn/alpha/ev6/nails/submul_1.asm: New file.
21088
21089 2002-05-22 Torbjorn Granlund <[email protected]>
21090
21091 * mpn/alpha/ev6/nails/addmul_1.asm: New file.
21092
21093 * mpz/inp_str.c (mpz_inp_str_nowhite): Nailify.
21094
21095 * mpn/generic/mul_basecase.c: Update pointers before conditional
21096 MAX_LEFT break statements.
21097
21098 2002-05-21 Torbjorn Granlund <[email protected]>
21099
21100 * tests/mpz/t-gcd.c: Test mpz_gcd_ui.
21101
21102 * mpz/lcm_ui.c: Nailify.
21103
21104 * mpz/gcd_ui.c: Nailify. Make it work as documented, allowing
21105 NULL to be passed for result parameter. Fix gcd(0,0) case.
21106
21107 * mpz/set_str.c: Nailify.
21108
21109 * randlc2x.c (gmp_randinit_lc_2exp): Nailify.
21110
21111 From Jakub Jelinek:
21112 * longlong.h (add_ssaaaa,sub_ddmmss) [64-bit sparc]:
21113 Make it actually work.
21114
21115 2002-05-18 Torbjorn Granlund <[email protected]>
21116
21117 * mpf/ui_div.c: Shut up compiler warning.
21118
21119 * mpn/generic/mul_basecase.c: Use mpn_addmul_2, mpn_addmul_3, and
21120 mpn_addmul_4, as available.
21121
21122 * mpn/alpha/ev6/nails/addmul_2.asm: Adjust NAILS_SUPPORT decls.
21123 * mpn/alpha/ev6/nails/addmul_3.asm: Likewise
21124 * mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
21125
21126 * configure.in (*-cray-unicos*): Back again to -hscalar0.
21127 (gmp_mpn_functions_optional): Add mul_3, mul_4, addmul_2, addmul_3,
21128 and addmul_4.
21129 * acconfig.h: Add #undefs for new optional mpn functions.
21130
21131 2002-05-18 Kevin Ryde <[email protected]>
21132
21133 * gmp.texi (Integer Import and Export): Mention Cray unfilled words.
21134
21135 * mpz/set_d.c, mpq/set_d.c: Use LIMBS_PER_DOUBLE for the output of
21136 __gmp_extract_double. Reported by Henrik Johansson.
21137
21138 2002-05-17 Torbjorn Granlund <[email protected]>
21139
21140 * mpn/alpha/ev6/nails/addmul_2.asm: New file.
21141 * mpn/alpha/ev6/nails/addmul_3.asm: New file.
21142 * mpn/alpha/ev6/nails/addmul_4.asm: New file.
21143
21144 * mpn/generic/dump.c: Rewrite and nailify.
21145
21146 2002-05-16 Kevin Ryde <[email protected]>
21147
21148 * mpfr/Makefile.am (EXTRA_DIST): Add BUGS file.
21149
21150 2002-05-15 Torbjorn Granlund <[email protected]>
21151
21152 * configure.in (*-cray-unicos*): Remove -hscalar0, add -hnofastmd
21153 as workaround for compiler bug.
21154 (mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
21155
21156 2002-05-14 Torbjorn Granlund <[email protected]>
21157
21158 * configure.in (*-cray-unicos*): Pass -hscalar0 to work around
21159 compiler bug for mpz/import.c.
21160
21161 2002-05-11 Torbjorn Granlund <[email protected]>
21162
21163 * mpz/import.c: Cast pointer via `unsigned long' when checking
21164 alignment to avoid compiler warnings.
21165
21166 * mpn/generic/rootrem.c: Adjust allocation of qp temporary area.
21167
21168 2002-05-09 Kevin Ryde <[email protected]>
21169
21170 * mpz/import.c: Corrections to size store, special case tests, and
21171 general case ACCUMULATE.
21172 * tests/mpz/t-import.c, tests/mpz/t-export.c: More test data.
21173
21174 2002-05-09 Torbjorn Granlund <[email protected]>
21175
21176 * mpn/generic/rootrem.c: Use temp space for root, copy value in place
21177 before returning.
21178 * mpz/root.c: Don't allocate extra limb for root value.
21179 * mpz/perfpow.c: Undo last change.
21180
21181 2002-05-08 Torbjorn Granlund <[email protected]>
21182
21183 * gmp-impl.h (powerpc BSWAP_LIMB_FETCH): Rename local variable to make
21184 it not clash with caller.
21185
21186 * mpn/generic/rootrem.c: New file.
21187 * configure.in (gmp_mpn_functions): Add rootrem and pow_1.
21188 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add rootrem.c and
21189 pow_1.c
21190 * gmp-impl.h (mpn_rootrem): Add declaration.
21191 * mpz/perfpow.c: Amend allocations for mpn_rootrem requirements.
21192 * mpz/root.c: Rewrite to use mpn_rootrem.
21193
21194 2002-05-08 Kevin Ryde <[email protected]>
21195
21196 * gmp-impl.h (MUL_KARATSUBA_THRESHOLD etc): Remove forced nail values.
21197
21198 * mpf/fits_u.h, mpf/fits_s.h, tests/mpf/t-fits.c: Ignore fraction
21199 part, making the code match the documentation.
21200
21201 * gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.
21202
21203 2002-05-07 Kevin Ryde <[email protected]>
21204
21205 * mpn/powerpc32/README: New file.
21206
21207 * mpz/root.c: Use unsigned long with mpz_sub_ui not mp_limb_t.
21208
21209 * tune/README: Misc updates including sparc32/v9 smoothness, low res
21210 timebase, and mpn_add_n operand overlaps.
21211 * tune/many.pl: Add udiv.asm support.
21212
21213 * gmp.texi (Build Options): A couple of --build better as --host.
21214 (Known Build Problems, Notes for Package Builds): Add DESTDIR problem.
21215 (Compatibility with older versions): Compatible with 4.x versions.
21216 (Converting Integers): Remove mpz_get_ui + mpz_tdiv_q_2exp decompose.
21217 (Integer Import and Export): New section.
21218 (Miscellaneous Integer Functions): Clarify mpz_sizeinbase returns 1
21219 for operand of 0.
21220 (Language Bindings): Add GNU Pascal.
21221 (Low-level Functions): Add GMP_NUMB_MAX.
21222
21223 * tests/mpz/t-import.c, tests/mpz/t-export.c, tests/mpz/t-get_d.c:
21224 New tests.
21225 * tests/mpz/Makefile.am: Add them.
21226
21227 * mpz/import.c, mpz/export.c: New files.
21228 * Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
21229
21230 * gmp-h.in, gmp-impl.h (GMP_NUMB_MAX): Move to gmp.h.
21231 * gmp-impl.h (CNST_LIMB): Add cast to mp_limb_t to ensure unsigned.
21232 (CRAY_Pragma, MPN_REVERSE, MPN_BSWAP, MPN_BSWAP_REVERSE,
21233 ASSERT_ALWAYS_LIMB, ASSERT_ALWAYS_MPN): New macros.
21234 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS_MPN.
21235
21236 2002-05-07 Torbjorn Granlund <[email protected]>
21237
21238 * mpz/aors_ui.h: Nailify.
21239
21240 * tests/mpz/t-addsub.c: New file.
21241 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-addsub.
21242
21243 * mpz/ui_sub.c: New file.
21244 * mpz/Makefile.am (libmpz_la_SOURCES): Add ui_sub.c.
21245 * Makefile.am (MPZ_OBJECTS): Ditto.
21246 * gmp-h.in (mpz_ui_sub): Add declaration.
21247
21248 * gmp-impl.h (MPZ_REALLOC): Rewrite to allow the use of _mpz_realloc
21249 return value.
21250
21251 * gmp-h.in (mpn_pow_1): Add declaration.
21252
21253 * mpn/generic/pow_1.c: Handle exp <= 1. Reverse rp/tp parity scheme
21254 for bn == 1 arm.
21255
21256 * Rename MP_LIMB_T_HIGHBIT => GMP_LIMB_HIGHBIT.
21257
21258 2002-05-06 Torbjorn Granlund <[email protected]>
21259
21260 * demos/pexpr.c (main): Don't call mpz_sizeinbase with negative base.
21261
21262 * randraw.c (lc): Remove an unused variable.
21263
21264 * mpn/generic/get_str.c: Clarify an algorithm description.
21265
21266 * tests/mpf/t-trunc.c: Nailify.
21267 * tests/mpf/t-set_si.c: Disable for nails.
21268
21269 * mpf/cmp_si.c: Nailify.
21270 * mpf/cmp_ui.c: Nailify.
21271 * mpf/div.c: Nailify.
21272 * mpf/div_2exp.c: Nailify.
21273 * mpf/div_ui.c: Nailify.
21274 * mpf/eq.c: Nailify.
21275 * mpf/get_d.c: Nailify.
21276 * mpf/get_d_2exp.c: Nailify.
21277 * mpf/get_si.c: Nailify.
21278 * mpf/get_str.c: Nailify.
21279 * mpf/get_ui.c: Nailify.
21280 * mpf/mul_2exp.c: Nailify.
21281 * mpf/random2.c: Nailify.
21282 * mpf/set_q.c: Nailify.
21283 * mpf/set_si.c: Nailify.
21284 * mpf/set_str.c: Nailify.
21285 * mpf/set_ui.c: Nailify.
21286 * mpf/sub.c: Nailify.
21287 * mpf/ui_div.c: Nailify.
21288 * mpf/ui_sub.c: Nailify.
21289 * mpf/urandomb.c: Nailify.
21290
21291 * gmp-impl.h (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Nailify.
21292
21293 * mpz/get_si.c: Misc variable name changes.
21294
21295 * mpf/fits_u.h: Rewrite - nailify.
21296 * mpf/fits_s.h: Likewise.
21297
21298 * mpz/mod.c: Disambiguate if-statement with extra {}.
21299
21300 * mpf/int_p.c: Fix type of size variables.
21301 * mpf/get_ui: Likewise.
21302 * mpf/get_si: Likewise.
21303 * mpq/equal.c: Likewise.
21304 * mpq/get_d.c: Likewise.
21305 * mpz/cmp_d.c: Likewise.
21306 * mpz/cmpabs_d.c: Likewise.
21307 * mpz/divis_2exp.c: Likewise.
21308 * mpz/kronuz.c: Likewise.
21309 * mpz/kronzu.c: Likewise.
21310 * mpz/kronzs.c: Likewise.
21311 * mpz/kronsz.c: Likewise.
21312 * mpz/scan0.c: Likewise.
21313 * mpz/scan1.c: Likewise.
21314 * mpz/tstbit.c: Likewise.
21315 * mpz/cong_2exp.c: Likewise.
21316 * mpz/divis.c: Likewise.
21317
21318 2002-05-04 Torbjorn Granlund <[email protected]>
21319
21320 * mpn/generic/gcd.c: Additional nailify changes.
21321
21322 2002-05-04 Kevin Ryde <[email protected]>
21323
21324 * gmp-h.in (__GNU_MP_VERSION): Set to 4.1.
21325 * Makefile.am (-version-info): Bump for new release.
21326
21327 2002-04-30 Torbjorn Granlund <[email protected]>
21328
21329 * mpn/generic/divrem_1.c: Additional nailify changes.
21330 * mpn/generic/mod_1.c: Likewise.
21331
21332 * tests/mpq/t-get_d.c: Print floats with all 16 digits.
21333
21334 * mpq/get_d.c: Nailify.
21335
21336 * tests/mpq/t-set_f.c: Disable for nails.
21337
21338 * mpz/get_d.c: Nailify.
21339
21340 * gmp-impl.h (LIMBS_PER_DOUBLE, MP_BASE_AS_DOUBLE): Nailify.
21341
21342 * gmp-h.in (__GMPZ_FITS_UTYPE_P): Cast maxval to before shifting it.
21343
21344 * extract-dbl.c: Nailify.
21345
21346 2002-04-29 Torbjorn Granlund <[email protected]>
21347
21348 * mpq/md_2exp.c (mord_2exp): Nailify.
21349
21350 * mpq/cmp_ui.c: Nailify.
21351
21352 * mpq/cmp.c (mpq_cmp): Nailify.
21353
21354 * mpn/generic/gcd.c: Nailify. GNUify code layout.
21355
21356 * mpn/generic/gcdext.c: Nailify. Misc changes.
21357
21358 * tests/mpz/t-sqrtrem.c: Let argv[1] mean # of repetitions.
21359 * tests/mpz/t-gcd.c: Likewise.
21360
21361 * mpz/gcd.c: Nailify.
21362
21363 * mpn/generic/random.c: Nailify.
21364
21365 * gmp-impl.h (modlimb_invert): Nailify.
21366
21367 2002-04-27 Torbjorn Granlund <[email protected]>
21368
21369 * mpn/generic/gcdext.c (div2): Remove qh parameter.
21370 (mpn_gcdext): Streamline double-limb code.
21371 Move GCDEXT_THRESHOLD check to after initial division.
21372
21373 2002-04-27 Kevin Ryde <[email protected]>
21374
21375 * gmp-impl.h (JACOBI_MOD_OR_MODEXACT_1_ODD): Allow for odd
21376 GMP_NUMB_BITS.
21377
21378 * tune/time.c (sgi_works_p): Allow for 64-bit counter, and fix
21379 SGI_CYCLECNTR_SIZE handling.
21380
21381 * demos/expr/exprfr.c: Add nan and inf constants.
21382 * demos/expr/t-expr.c: Exercise them.
21383
21384 2002-04-26 Torbjorn Granlund <[email protected]>
21385
21386 * mpz/cmp_ui.c: Fix overflow conditions for nails.
21387
21388 * gmp-h.in (mpz_get_ui): Fix typo from last change.
21389
21390 * mpz/n_pow_ui.c: Adjust allocation for nails.
21391 (GMP_NUMB_HALFMAX): Renamed from MP_LIMB_T_HALFMAX.
21392 Fix umul_ppmm invocation for for nails.
21393
21394 2002-04-24 Torbjorn Granlund <[email protected]>
21395
21396 * mpn/generic/gcdext.c: Simplify by using mpn_tdiv_qr instead of
21397 mpn_divmod.
21398
21399 2002-04-24 Kevin Ryde <[email protected]>
21400
21401 * configure.in (*-*-cygwin*): Give a sensible default command line
21402 limit, to avoid blowups reported by Jim Fougeron on windows 9x.
21403 (--enable-nails): Make the default 2, since mp_bases has data for that.
21404
21405 * mpfr/mpfr-math.h (__mpfr_nan): Use a "double" for the bytes, to
21406 avoid a mis-conversion on alpha gcc 3.0.2.
21407 (_MPFR_INFP_BYTES, _MPFR_INFM_BYTES): Should be a zero mantissa.
21408
21409 2002-04-23 Torbjorn Granlund <[email protected]>
21410
21411 * mpz/dive_ui.c: Fix typo.
21412
21413 * mpz/fits_s.h: Rewrite.
21414
21415 * mpz/jacobi.c: Nailify.
21416 * mpz/kronuz.c: Additional nailify changes.
21417 * mpz/kronsz.c: Likewise.
21418
21419 2002-04-23 Kevin Ryde <[email protected]>
21420
21421 * demos/expr/Makefile.am (LDADD): Add $(LIBM) for the benefit of mpfr.
21422
21423 * mpz/divis_ui.c, mpz/cong_ui.c: Nailify.
21424 * mpn/generic/bdivmod.c, mpz/divexact.c, mpz/dive_ui.c: Nailify.
21425 * mpn/generic/sb_divrem_mn.c, mpn/generic/divrem.c,
21426 mpn/generic/divrem_2.c: Nailify ASSERTs.
21427 * mpn/x86/k6/mmx/logops_n.asm, mpn/x86/k6/mmx/com_n.asm: Nailify.
21428 * mpz/inp_raw.c, mpz/out_raw.c: Nailify.
21429 * mpz/kronzu.c, mpz/kronuz.c, mpz/kronzs.c, mpz/kronsz.c: Nailify.
21430 * mpn/generic/divis.c, mpz/cong.c, mpz/cong_2exp.c: Nailify.
21431 * gmp-impl.h (NEG_MOD): Nailify.
21432
21433 * gmp-impl.h, mpn/mp_bases.c: Add back GMP_NUMB_BITS==30 bases data.
21434
21435 * mpfr/get_d.c: Patch from Paul to avoid problem with constant folding
21436 in gcc on OSF.
21437
21438 * mpn/lisp/gmpasm-mode.el: Remove mention of defunct LF macro.
21439
21440 2002-04-22 Torbjorn Granlund <[email protected]>
21441
21442 * demos/pexpr.c: Handle "binomial" operator.
21443
21444 * mpz/cmp_ui.c: Move assignments of `up' out of conditionals.
21445
21446 * mpn/generic/gcdext.c: Fix fencepost error in STAT code.
21447
21448 * gmp-impl.h (mpn_com_n): Nailify.
21449
21450 * tests/mpz/t-cdiv_ui.c: New file.
21451 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-cdiv_ui.
21452 * mpz/cdiv_qr_ui.c: Nailify.
21453 * mpz/cdiv_q_ui.c: Nailify.
21454 * mpz/cdiv_r_ui.c: Nailify.
21455 * mpz/cdiv_ui.c: Nailify.
21456
21457 * tests/misc/t-printf.c (CHECK_N): Add cast to allow `char' to be an
21458 unsigned type.
21459 * tests/misc/t-scanf.c: Likewise.
21460
21461 * mpz/mul_i.h: Rework nails code to handle parameter overlap.
21462
21463 * tests/mpz/t-set_f.c: Disable for nails.
21464
21465 2002-04-21 Torbjorn Granlund <[email protected]>
21466
21467 * mpz/set_si.c: Add cast to support LONG_LONG_LIMB.
21468 * mpz/iset_si.c: Likewise.
21469
21470 * mpz/bin_ui.c: Nailify.
21471 * mpz/bin_uiui.c: Nailify.
21472
21473 * mpz/cmpabs_ui.c: Nailify.
21474
21475 * tests/mpz/t-aorsmul.c: Nailify.
21476 * mpz/aorsmul_i.c (mpz_addmul_ui, mpz_submul_ui): Nailify better.
21477
21478 2002-04-20 Torbjorn Granlund <[email protected]>
21479
21480 * tests/mpz/t-fdiv_ui.c: Check mpz_fdiv_ui.
21481 * tests/mpz/t-tdiv_ui.c: Check mpz_tdiv_ui.
21482
21483 * mpz/tdiv_ui.c: Rewrite nails code.
21484 * mpz/fdiv_ui.c: Nailify.
21485
21486 * tests/mpz/t-tdiv_ui.c: Check returned remainders.
21487 * tests/mpz/t-fdiv_ui.c: Merge in recent t-tdiv_ui changes.
21488
21489 * mpz/tdiv_q_ui.c: Remove spurious TMP_* calls.
21490
21491 * mpz/fdiv_qr_ui.c: Nailify.
21492 * mpz/fdiv_q_ui.c: Nailify.
21493 * mpz/fdiv_r_ui.c: Nailify.
21494
21495 * mpz/get_si.c: Misc nailify changes to shut up compiler warnings.
21496
21497 * mpz/ui_pow_ui.c: Fix typo in last change.
21498
21499 2002-04-20 Kevin Ryde <[email protected]>
21500
21501 * tests/misc/t-printf.c, tests/misc/t-scanf.c: Check all %n types.
21502
21503 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/p6/mmx/divrem_1.asm
21504 (mpn_preinv_divrem_1): New entrypoint.
21505 (mpn_divrem_1): Avoid a branch when testing high<divisor.
21506 * mpn/asm-defs.m4: Add define_mpn(preinv_divrem_1).
21507 * configure.in: Allow divrem_1.asm to provide mpn_preinv_divrem_1.
21508
21509 * gmp-impl.h [nails]: Add #undefs of MUL_KARATSUBA_THRESHOLD etc, to
21510 override CPU gmp-mparam.h. Remove JACOBI_BASE_METHOD override since
21511 it's nails-neutral.
21512
21513 * tests/mpn/t-mp_bases.c: New file.
21514 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
21515 * tests/t-constants.c: Move MP_BASES constants checks to it.
21516
21517 * mpn/mp_bases.c: Fix big_base_inverted values for nails.
21518 * gmp-impl.h (MP_BASES_BIG_BASE_INVERTED_10,
21519 MP_BASES_NORMALIZATION_STEPS_10): Fix nails values.
21520 (MP_BASES_*): Remove GMP_NUMB_BITS == 30 data.
21521
21522 * mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm: Add
21523 NAILS_SUPPORT indicators.
21524
21525 * configure.in: Grep for NAILS_SUPPORT in cpu-specific code, and look
21526 in "nails" subdirectories, print path used.
21527 * mpn/asm-defs.m4 (NAILS_SUPPORT): New macro.
21528
21529 * mpfr/mpfr-test.h: Include config.h, for the benefit of test programs
21530 not using gmp-impl.h.
21531
21532 2002-04-19 Torbjorn Granlund <[email protected]>
21533
21534 * tests/mpz/t-scan.c: Nailify.
21535
21536 * mpz/tdiv_qr_ui.c: Nailify.
21537 * mpz/tdiv_q_ui.c: Nailify.
21538 * mpz/tdiv_r_ui.c: Nailify.
21539 * mpz/tdiv_ui.c: Nailify.
21540
21541 * mpz/cmp_ui.c: Nailify.
21542
21543 * mpz/ui_pow_ui.c: Misc nailify changes to shut up compiler warnings.
21544
21545 * mpz/scan0.c: Nailify.
21546 * mpz/scan1.c: Nailify.
21547
21548 * tests/mpz/t-sizeinbase.c (mpz_fake_bits): Nailify.
21549
21550 2002-04-18 Torbjorn Granlund <[email protected]>
21551
21552 * mpz/aorsmul_i.c: Nailify.
21553
21554 * mpz/cmp_si.c: Nailify (botched).
21555
21556 * mpz/ui_pow_ui.c: Nailify.
21557
21558 * gmp-h.in (__GMPZ_FITS_UTYPE_P): Nailify.
21559
21560 * mpz/fits_s.h: Nailify.
21561
21562 * tests/mpz/bit.c (check_tstbit): Nailify.
21563
21564 From Paul Zimmermann:
21565 * mpn/generic/sqrtrem.c: Nailify.
21566
21567 * mpz/n_pow_ui.c: Nailify.
21568
21569 * mpz/cfdiv_r_2exp.c: Nailify.
21570
21571 * randraw.c (lc): Undo: Let mpn_rshift put result in place to avoid
21572 extra MPN_COPY.
21573
21574 2002-04-17 Torbjorn Granlund <[email protected]>
21575
21576 * mpz/clrbit.c: Add two GMP_NUMB_MASK masks after addition.
21577
21578 * mpn/generic/random2.c (LOGBITS_PER_BLOCK): Decrease to 4.
21579
21580 * gmp-impl.h (nail DIV_DC_THRESHOLD): Decrease to 50 to allow fast
21581 division.
21582
21583 * mpn/generic/random2.c: Nailify.
21584
21585 * mpz/fac_ui.c: Nailify.
21586
21587 * mpz/mul_i.h: #if ... #endif code block to shut up gcc warnings.
21588
21589 * mpn/generic/sqrtrem.c: Adopt to GNU coding standards.
21590 (mpn_dc_sqrtrem): New name for mpn_dq_sqrtrem.
21591 Partial nailification.
21592
21593 * configure.in: As a temporary hack, clear extra_functions for nails
21594 builds.
21595
21596 * gmp-h.in (mpz_get_ui): #if ... #endif else code block to shut up gcc
21597 warnings.
21598
21599 2002-04-17 Kevin Ryde <[email protected]>
21600
21601 * texinfo.tex: Update to 2002-03-26.08 per texinfo 4.2.
21602 * gmp.texi: Must have @top in @ifnottex (or @contents doesn't come out
21603 in one run).
21604
21605 * mpn/generic/scan0.c, mpn/generic/scan1.c: Nailify.
21606
21607 * tests/mpn/t-scan.c: New file.
21608 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
21609
21610 * tests/refmpn.c, tests/tests.h (refmpn_tstbit): Use unsigned long for
21611 bit index.
21612 (refmpn_setbit, refmpn_clrbit, refmpn_scan0, refmpn_scan1): New
21613 functions.
21614
21615 * mpfr/cmp_ui.c (mpfr_cmp_si_2exp): Fix b==0 i!=0 case.
21616
21617 2002-04-17 Gerardo Ballabio <[email protected]>
21618
21619 * gmpxx.h, mpfrxx.h: Remove mpfr_class bool combinations, remove
21620 mpfr_class::get_str2, use mp_rnd_t for rounding modes, use
21621 8*sizeof(double) for mpfr_t's holding doubles.
21622
21623 2002-04-17 Torbjorn Granlund <[email protected]>
21624
21625 * mpz/powm.c: Nailify.
21626 * mpz/powm_ui.c: Nailify.
21627
21628 2002-04-16 Torbjorn Granlund <[email protected]>
21629
21630 * mpz/hamdist.c: Nailify.
21631 * tests/misc.c (urandom): Nailify.
21632
21633 * mpz/get_si.c: Nailify.
21634 * gmp-h.in (mpz_get_ui): Nailify. Streamline (and probably upset
21635 memory checkers).
21636
21637 * gmp-impl.h (mp_bases[10] values): Add versions for GMP_NUMB_BITS
21638 being 28, 60, and 63.
21639 * mpn/mp_bases.c: Add tables for GMP_NUMB_BITS being 28, 60, and 63.
21640
21641 * mpz/iset_si.c: Nailify.
21642 * mpz/iset_ui.c: Nailify
21643
21644 * tests/mpz/convert.c (main): Print test number in error message.
21645
21646 * mpn/generic/get_str.c (mpn_sb_get_str): Shift up `frac' into nails
21647 field after bignum division.
21648
21649 2002-04-16 Kevin Ryde <[email protected]>
21650
21651 * gmp-h.in, gmp-impl.h (GMP_NAIL_MASK): Move to gmp.h.
21652
21653 * gmp.texi: Use @documentdescription and @copying, per texinfo 4.2.
21654 (Low-level Functions): Clarify mpn_gcd overlap requirements, rewrite
21655 mpn_set_str description, add nails section.
21656 (C++ Interface General): Remove bool from types that mix with classes.
21657 (Language Bindings): Add STklos, GNU Smalltalk, Regina.
21658 (Binary to Radix, Radix to Binary): Describe new code.
21659 (Assembler Cache Handling): More notes, mostly by Torbjorn.
21660
21661 * macos/configure (%vars): Remove __GMP from substitutions, per change
21662 to main configure.
21663
21664 * mpn/generic/dive_1.c: Nailify.
21665 * mpn/generic/mode1o.c: Nailify, remove bogus ASSERT in commented-out
21666 alternate implementation.
21667 * gmp-impl.h (SUBC_LIMB): New macro.
21668
21669 * tests/devel/try.c (validate_divexact_1): Correction to compare.
21670 (udiv_qrnnd): New testing.
21671 (SHIFT_LIMIT): Nailify.
21672 (-b): New option, remove spurious "H" from getopt string.
21673
21674 * mpz/clrbit.c: Nailify.
21675 * tests/mpz/t-hamdist.c: Nailify.
21676 * gmp-impl.h (MPN_FIB2_SIZE): Nailify.
21677 (PP): Nailify conditionals.
21678 * tests/mpz/t-fib_ui.c (MPZ_FIB_SIZE_FLOAT): Nailify.
21679
21680 * configure.in, acinclude.m4: Establish GMP_NAIL_BITS and
21681 GMP_LIMB_BITS for gmp-h.in configure tests.
21682
21683 * mpfr/*, configure.in: Update to final mpfr 2.0.1.
21684 * mpfr/acinclude.m4 (MPFR_CONFIGS): Use $host, not uname stuff.
21685 * mpfr/tests/tout_str.c: Patch from Paul for denorm fprintf tests.
21686
21687 2002-04-15 Torbjorn Granlund <[email protected]>
21688
21689 * mpn/generic/divrem_1.c (EXTRACT): Remove.
21690
21691 * tests/mpz/t-tdiv_ui.c (dump_abort): Accept argument for error string.
21692
21693 * mpz/rrandomb.c: Nailify. Needs further work.
21694
21695 * mpn/generic/mod_1.c: Nailify.
21696
21697 * gmp-impl.h: Set various *_THRESHOLD values to be used for nails to
21698 avoid not yet qualified algorithms.
21699 (MPZ_CHECK_FORMAT): Check that nail part is zero.
21700
21701 * tests/mpz/t-mul.c (main): Test squaring even for huge operands.
21702 (base_mul): Nailify.
21703 (dump_abort): Accept argument for error string. Print product
21704 difference.
21705
21706 * mpn/generic/set_str.c: Nailify.
21707
21708 * gmp-h.in (__GMPN_ADD, __GMPN_SUB): Nailify.
21709
21710 2002-04-14 Torbjorn Granlund <[email protected]>
21711
21712 * randraw.c (lc): Return non-nonsense return value for seed=0 case.
21713 Check for m2exp being non-zero early; remove all other tests of m2exp.
21714 Remove redundant MPN_ZERO call.
21715 Let mpn_rshift put result in place to avoid extra MPN_COPY.
21716 Remove confusing comment before function `lc' describing BBS algorithm.
21717 Misc simplification and cleanups.
21718 Nailify. Needs further work.
21719
21720 * mpz/set_si.c: Nailify.
21721 * mpz/set_ui.c: Nailify.
21722 * mpz/mul_i.h: Nailify.
21723
21724 * tests/mpz/t-mul_i.c: Actually test _ui routines. Add some more test
21725 values.
21726
21727 * mpn/generic/mul_n.c: Finish nailifying toom3 code.
21728
21729 2002-04-13 Kevin Ryde <[email protected]>
21730
21731 * mpfr/*: Update to another new mpfr 2.0.1.
21732 * configure.in, Makefile.am, mpfr/Makefile.am, mpfr/tests/Makefile.am:
21733 Use MPFR_CONFIGS macro, establish separate MPFR_CFLAGS for mpfr build.
21734
21735 * mpfr/tests/Makefile.am: Correction to convenience rule for libmpfr.a.
21736
21737 2002-04-11 Kevin Ryde <[email protected]>
21738
21739 * mpfr/set_q.c: gmp-impl.h before mpfr.h to avoid _PROTO redefine.
21740
21741 * mpfr/*, configure.in: Update to new mpfr 2.0.1.
21742
21743 * tests/refmpn.c (refmpn_udiv_qrnnd, refmpn_divmod_1c_workaround):
21744 Fixes for nails.
21745
21746 * tests/t-constants.c (MODLIMB_INVERSE_3): Nailify tests.
21747 (MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): Only
21748 check these under USE_PREINV_DIVREM_1.
21749 * tests/t-modlinv.c: Nailify tests.
21750
21751 2002-04-11 Gerardo Ballabio <[email protected]>
21752
21753 * gmpxx.h: Remove bool combinations, remove mpf_class::get_str2, only
21754 need <iosfwd> now.
21755
21756 2002-04-11 Torbjorn Granlund <[email protected]>
21757
21758 * mpn/generic/diveby3.c: Nailify.
21759 * gmp-impl.h (MODLIMB_INVERSE_3): Nailify.
21760
21761 * mpn/generic/mul_n.c: Nailify Toom3 code.
21762
21763 2002-04-10 Kevin Ryde <[email protected]>
21764
21765 * gmp-impl.h (MPN_KARA_MUL_N_MINSIZE, MPN_KARA_SQR_N_MINSIZE): Set to
21766 3, as needed by nails case.
21767
21768 * mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails]: Fix vl
21769 assert, add rp,n and up,n asserts.
21770
21771 * mpfr/Makefile.am: Add new mpfr-math.h, install mpf2mpfr.h.
21772
21773 2002-04-10 Torbjorn Granlund <[email protected]>
21774
21775 * mpn/generic/divrem_1.c: Nailify. Update mp_size_t variables to use
21776 `n' suffix instead of `size' suffix.
21777 * mpn/generic/divrem_2.c: Likewise.
21778 * mpn/generic/sb_divrem_mn.c: Nailify.
21779 * mpn/generic/tdiv_qr.c: Nailify.
21780 (SHL): Remove silly macro.
21781
21782 * mpn/generic/mul_n.c (mpn_kara_mul_n): Replace open-coded increment by
21783 mpn_incr_u call. Handle nails in ws[n] increment.
21784 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Likewise.
21785
21786 * gmp-h.in (GMP_NUMB_MASK): New #define.
21787 (__GMPN_AORS_1): Add version for nails.
21788
21789 * gmp-impl.h (GMP_NUMB_MASK): Comment out, now in gmp.h.
21790 (mpn_incr_u): Don't assume `incr' is non-zero.
21791 (mpn_decr_u): Similarly.
21792
21793 2002-04-09 Kevin Ryde <[email protected]>
21794
21795 * mpfr/*, configure.in: Update to mpfr 2.0.1.
21796
21797 * tests/refmpn.c (refmpn_mul_1c, lshift_make): Corrections for nails.
21798 * tssts/refmpn.c, tests/tests.h (refmpn_cmp_allowzero): New function.
21799
21800 * mpn/generic/mul_1.c [nails]: Fix vl assert, add {up,n} assert.
21801
21802 * mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
21803 mpn/pa32/hppa1_1/pa7100/submul_1.asm: Rename "size" define, to avoid
21804 ELF .size directive. Reported by LaMont Jones.
21805
21806 * tests/mpz/t-set_si.c: Add nails support.
21807
21808 2002-04-05 Torbjorn Granlund <[email protected]>
21809
21810 * gmp-impl.h: Replace nail mpn_incr_u, mpn_decr_u with faster versions.
21811 (mp_bases[10] values): Check GMP_NUMB_BITS instead of BITS_PER_MP_LIMB.
21812 Add GMP_NUMB_BITS == 30 version.
21813 (__gmp_doprnt, etc): Remove parameter names.
21814
21815 * mpn/generic/mul_n.c: Nailify Karatsuba code.
21816 * mpn/generic/get_str.c: Nailify.
21817 * mpn/generic/sqr_basecase.c: Nailify.
21818 * mpn/generic/lshift.c: Nailify.
21819 * mpn/generic/rshift.c: Likewise.
21820 * mpn/generic/add_n.c: Nailify. Revamp non-nail code.
21821 * mpn/generic/sub_n.c: Likewise.
21822 * mpn/generic/mul_1.c: Likewise.
21823 * mpn/generic/addmul_1.c: Likewise.
21824 * mpn/generic/submul_1.c: Likewise.
21825
21826 2002-04-02 Kevin Ryde <[email protected]>
21827
21828 * gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE) [powerpc]:
21829 Corrections to constraints, and restrict to bigendian.
21830
21831 2002-03-31 Kevin Ryde <[email protected]>
21832
21833 * tests/mpz/dive.c: Better diagnostics.
21834
21835 * tests/devel/try.c (mpn_get_str, mpn_umul_ppmm_r): New tests.
21836
21837 * tests/misc.c, tests/tests.h (byte_diff_lowest, byte_diff_highest):
21838 New functions.
21839
21840 * tests/t-bswap.c: New file.
21841 * tests/Makefile.am (check_PROGRAMS): Add it.
21842
21843 * tests/mpn/t-aors_1.c, tests/mpn/t-iord_u.c: Add nails support.
21844
21845 * gmp-impl.h (MPN_IORD_U) [x86]: Eliminate unnecessary jiord and iord,
21846 rename "n" to incr per generic versions, restrict to nails==0.
21847 (mpn_incr_u, mpn_decr_u): Add nails support.
21848 (GMP_NAIL_LOWBIT, GMP_NUMB_MAX): New macros.
21849
21850 * tests/trace.c, tests/tests.h (byte_trace, byte_tracen): New
21851 functions.
21852 * tests/trace.c: Handle NULL operands.
21853
21854 * tests/refmpn.c, tests/devel/try.c, tune/speed.c: Add preliminary
21855 nail support.
21856
21857 * tests/refmpn.c, test/tests.h (byte_overlap_p, refmpn_equal_anynail,
21858 refmpn_umul_ppmm_r, refmpn_udiv_qrnnd_r, refmpn_get_str,
21859 refmpn_bswap_limb, refmpn_random, refmpn_random2, refmpn_bswap_limb):
21860 New functions.
21861
21862 * gmp-impl.h, tests/refmpn.c (ASSERT_LIMB): Renamed from
21863 ASSERT_MP_LIMB_T.
21864
21865 * mpn/x86/*/*.asm, mpn/powerpc32/*/*.asm, mpn/powerpc64/*/*.asm: Put
21866 speeds after the copyright notice, so as to keep that clear.
21867
21868 2002-03-29 Kevin Ryde <[email protected]>
21869
21870 * configure.in (powerpc*-*-aix*): Correction to xlc -qarch selection,
21871 for 32-bit mode.
21872
21873 2002-03-28 Torbjorn Granlund <[email protected]>
21874
21875 * mpn: Fix spacing in many files.
21876
21877 * mpn/generic/aorsmul_1.c: Split into addmul_1.c and submul_1.c.
21878 * mpn/generic/aors_n.c: Split into add_n.c and sub_n.c.
21879
21880 * mpn/pa64/add_n.asm: Trim another 0.125 cycle/limb. Fix a comment.
21881 * mpn/pa64/sub_n.asm: Likewise.
21882
21883 * mpn/pa64/mul_1.asm: Change comclr, comb to proper forms cmpclr, cmpb.
21884 * mpn/pa64/addmul_1.asm: Likewise.
21885 * mpn/pa64/submul_1.asm: Likewise.
21886
21887 2002-03-28 Kevin Ryde <[email protected]>
21888
21889 * gmp.texi (Converting Integers): Fix type of exp in mpz_get_d_2exp,
21890 reported by [email protected].
21891 (References): Update Burnikel and Ziegler URL, reported by Keith
21892 Briggs.
21893
21894 * gmp-h.in, mp-h.in, configure.in, acinclude.m4: Remove __GMP from
21895 AC_SUBSTs, since autoconf says leading "_" in makefile variables is
21896 not portable.
21897
21898 * demos/expr/run-expr.c: Declare optarg, optind, opterr if necessary.
21899 * configure.in, demos/expr/expr-config-h.in: Configs for this.
21900
21901 2002-03-27 Torbjorn Granlund <[email protected]>
21902
21903 * mpn/Makefile.am (TARG_DIST): Remove pa64w and hppa, add pa32.
21904
21905 * configure.in (path_20w): Remove pa64w.
21906
21907 * mpn/pa64/udiv_qrnnd.asm: Tweak for PA8000 performance comparative to
21908 that on PA8500.
21909
21910 2002-03-26 Torbjorn Granlund <[email protected]>
21911
21912 * mpn/pa32: New name for mpn/hppa.
21913 * configure.in: Corresponding changes.
21914
21915 * mpn/pa64/umul_ppmm.asm: New file, generalized for both 2.0N and 2.0W.
21916 * mpn/pa64/umul_ppmm.S: Remove.
21917
21918 * mpn/pa64/udiv_qrnnd.asm: Generalize for both 2.0N and 2.0W.
21919 * mpn/pa64w/udiv_qrnnd.asm: Remove.
21920
21921 2002-03-26 Kevin Ryde <[email protected]>
21922
21923 * mpfr/tests/tdiv.c, mpfr/tests/tui_div.c: Don't depend on nan and inf
21924 handling in "double", for the benefit of alpha.
21925
21926 * configure (hppa2.0w): Set path to "pa64w pa64".
21927
21928 * acinclude.m4, configure.in (GMP_C_INLINE): New macro.
21929 * acinclude.m4 (GMP_H_EXTERN_INLINE): Use it, and fix "yes" handling.
21930
21931 2002-03-25 Torbjorn Granlund <[email protected]>
21932
21933 * mpn/pa64w/add_n.s: Remove.
21934 * mpn/pa64w/sub_n.s: Remove.
21935 * mpn/pa64w/lshift.s: Remove.
21936 * mpn/pa64w/rshift.s: Remove.
21937 * mpn/pa64w/mul_1.S: Remove.
21938 * mpn/pa64w/addmul_1.S: Remove.
21939 * mpn/pa64w/submul_1.S: Remove.
21940 * mpn/pa64w/sqr_diagonal.asm: Remove.
21941
21942 * mpn/pa64/mul_1.asm: New file with twice faster code; generalized
21943 for both 2.0N and 2.0W.
21944 * mpn/pa64/submul_1.asm: Likewise.
21945 * mpn/pa64/mul_1.S: Remove.
21946 * mpn/pa64/submul_1.S: Remove.
21947
21948 * mpn/pa64/sqr_diagonal.asm: Generalize for both 2.0N and 2.0W.
21949
21950 * mpn/pa64/add_n.asm: New file, generalized for both 2.0N and 2.0W.
21951 * mpn/pa64/sub_n.asm: Likewise.
21952 * mpn/pa64/lshift.asm: Likewise.
21953 * mpn/pa64/rshift.asm: Likewise.
21954 * mpn/pa64/add_n.s: Remove.
21955 * mpn/pa64/sub_n.s: Remove.
21956 * mpn/pa64/lshift.s: Remove.
21957 * mpn/pa64/rshift.s: Remove.
21958
21959 2002-03-24 Kevin Ryde <[email protected]>
21960
21961 * gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE): New macros.
21962 * mpz/inp_raw.c, mpz/out_raw.c: Use them.
21963 * acconfig.h (HAVE_HOST_CPU): Add some powerpc types.
21964
21965 * mpn/powerpc32/750/com_n.asm: New file.
21966
21967 * mpfr/tests/tout_str.c: Disable random tests, since they fail on
21968 alphaev56-unknown-freebsd4.1 and do nothing by default.
21969
21970 * mpfr/tests/tsqrt.c: Don't depend on nan, inf or -0 in "double", for
21971 the benefit of alpha.
21972 * mpfr/sqrt.c: Clear nan flag on -0.
21973
21974 * demos/factorize.c: Use mpn_random() instead of random(), to avoid
21975 portability problems.
21976
21977 * demos/isprime.c (print_usage_and_exit): Declare as "void" to avoid
21978 warnings.
21979
21980 * demos/pexpr.c (setup_error_handler): Corrections to sigstack code.
21981
21982 * demos/calc/calc.y: Add some `;'s to make bison 1.34 happy.
21983
21984 2002-03-23 Torbjorn Granlund <[email protected]>
21985
21986 * mpn/pa64/addmul_1.asm: New file with twice faster code; generalized
21987 for both 2.0N and 2.0W.
21988
21989 2002-03-22 Kevin Ryde <[email protected]>
21990
21991 * tune/time.c: Add SGI hardware counter measuring method, change some
21992 abort()s into ASSERT_FAIL()s.
21993
21994 * configure.in (AC_CHECK_HEADERS): Add fcntl.h and sys/syssgi.h.
21995 (AC_CHECK_FUNCS): Add syssgi.
21996
21997 * configure.in, mpfr/Makefile.am, mpfr/tests/Makefile.am: Use
21998 -mieee-with-inexact or -ieee_with_inexact for mpfr on alpha, so
21999 denorms work.
22000
22001 * mpfr/isinteger.c: Fix a memory leak.
22002
22003 2002-03-21 Torbjorn Granlund <[email protected]>
22004
22005 * tune/speed.c (struct choice_t): Make `r' an mp_limb_t.
22006
22007 2002-03-21 Kevin Ryde <[email protected]>
22008
22009 * configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): Use an
22010 AH_VERBATIM and better explanation.
22011 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Similarly for the HAVE_DOUBLE
22012 constants.
22013
22014 * gmp.texi (Number Theoretic Functions): Clarify sign of GCD returned
22015 by mpz_gcdext.
22016
22017 * demos/pexpr.c, demos/pexpr-config-h.in, configure.in: Use an
22018 autoconf test for stack_t.
22019
22020 * configure.in, gmp-h.in, mp-h.in, macos/configure, tests/mpz/reuse.c,
22021 tests/mpf/reuse.c: Use __GMP_LIBGMP_DLL to enable windows declspec,
22022 don't require _WIN32 (etc), remove __GMP_LIBGMP_SHARED and
22023 __GMP_LIBGMP_STATIC.
22024
22025 * gmp-impl.h (mp_bases): Add __GMP_DECLSPEC, for the benefit of
22026 tests/t-constants.c.
22027
22028 * tune/many.pl, tune/speed.h: Remove suffix hack for back.asm.
22029
22030 2002-03-21 Paul Zimmermann <[email protected]>
22031
22032 * mpfr/sin_cos.c (mpfr_sin_cos): New file.
22033 * mpfr/mpfr.h, mpfr/mpfr.texi, mpfr/Makefile.am: Add it.
22034 * mpfr/tan.c: Fix sign in 2nd and 4th quadrants.
22035
22036 * mpfr/log10.c: Fix hangs on certain inputs.
22037
22038 2002-03-20 Torbjorn Granlund <[email protected]>
22039
22040 * demos/pexpr.c (setup_error_handler): Declare `s', the first
22041 sigaltstack parameter, using `stack_t' just on AIX.
22042
22043 2002-03-19 Torbjorn Granlund <[email protected]>
22044
22045 * mpn/powerpc32/mul_1.asm: Use free caller-saves registers instead
22046 of the callee-saves r30 and r31.
22047
22048 2002-03-19 Kevin Ryde <[email protected]>
22049
22050 * tune/freq.c (freq_proc_cpuinfo): Recognise powerpc "clock", where
22051 previously got the wrong result from "bogomips".
22052
22053 * mpn/powerpc32/add_n.asm, mpn/powerpc32/sub_n.asm: Rewrite, faster on
22054 750, and smaller too.
22055 * mpn/powerpc32/*.asm: Use L(), add some measured speeds.
22056
22057 * longlong.h (count_trailing_zeros) [vax]: Add a version using ffs,
22058 but commented out.
22059
22060 2002-03-17 Kevin Ryde <[email protected]>
22061
22062 * tune/speed.c, tune/speed.h, tune/common.c, many.pl: Use optional
22063 ".r" to specify operand overlaps for mpn_add_n, mpn_sub_n and logops.
22064 Remove mpn_add_n_inplace and mpn_add_n_self.
22065 * tune/many.pl: Fix MULFUNC_PROLOGUE parsing.
22066
22067 * gmp.texi (Known Build Problems): Note `make' problem with long
22068 libgmp.la dependencies list.
22069
22070 * printf/doprnt.c, scanf/doscan.c (%zn): Remove test of non-existent
22071 HAVE_SIZE_T, just use size_t unconditionally.
22072 * printf/doprnt.c (%zd etc): Fix 'z' type parsing.
22073 * tests/misc/t-printf.c, tests/misc/t-scanf.c: More tests.
22074
22075 * configure.in: Use AC_COPYRIGHT.
22076 Add m4_pattern_allow(GMP_MPARAM_H_SUGGEST).
22077
22078 * tune/Makefile.am (libdummy.la): Remove this, sqr_basecase.c already
22079 gets an ansi2knr rule from nodist_tuneup_SOURCES.
22080
22081 * longlong.h (count_leading_zeros) [pentiumpro gcc<3]: Test
22082 HAVE_HOST_CPU_i686 too.
22083
22084 * mpz/out_raw.c (HTON_LIMB_STORE): Fix a typo in big endian #if.
22085
22086 2002-03-14 Kevin Ryde <[email protected]>
22087
22088 * mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm,
22089 mpn/x86/k6/mmx/com_n.asm: Add nails support.
22090
22091 * texinfo.tex: Update to 2002-03-01.06 (per texinfo 4.1).
22092 * gmp.texi (@ma): Remove, @math does this now.
22093
22094 * mpfr/tests/reuse.c: Clear op1 and op2 flags only in their respective
22095 outer loops.
22096
22097 * configure.in (--enable-cxx): Correction to the default stated in the
22098 help string.
22099 (power*-*-aix*, not powerpc): Use aix.m4, don't run
22100 GMP_ASM_POWERPC_R_REGISTERS or use powerpc-defs.m4.
22101
22102 2002-03-13 Torbjorn Granlund <[email protected]>
22103
22104 * mpn/sparc32/gmp-mparam.h: New file.
22105
22106 2002-03-13 Kevin Ryde <[email protected]>
22107
22108 * demos/expr/exprfr.c: More mpfr functions, corrections to agm, cos,
22109 sin, rename log2 constant to loge2 to make room for log2 function.
22110 * demos/expr/t-expr.c: More tests.
22111
22112 * mpz/inp_raw.c (NTOH_LIMB_FETCH) [generic 16bit]: Remove spurious "+".
22113
22114 * mpfr/acos.c: Avoid a memory leak for certain operands.
22115
22116 * acinclude.m4, configure.in (GMP_C_DOUBLE_FORMAT): New macro.
22117
22118 * acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
22119 GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
22120 Change ac_objext to OBJEXT, which is the documented variable.
22121
22122 * config.guess (powerpc*-*-*): Use #ifdef on constants POWER_630 etc
22123 in the AIX test, since old versions don't have them all.
22124
22125 2002-03-11 Kevin Ryde <[email protected]>
22126
22127 * configure.in (LIBC211): New AC_DEFINE, for mpfr.
22128
22129 * configure.in (mips*-*-*): Support ABI=o32 on irix 6, allow gcc 2.7.2
22130 to fall back on it, but detect it doesn't work with gcc 2.95. Use
22131 single mips-defs.m4 for both mips32 and mips64.
22132 * acinclude.m4 (GMP_GCC_MIPS_O32): New macro.
22133 * mpn/mips32/mips-defs.m4: Renamed from mips.m4.
22134 * mpn/mips64/mips.m4: Remove (was a copy of mips32/mips.m4).
22135
22136 * mpn/powerpc32/750: New directory.
22137 * configure.in (powerpc740, powerpc750, powerpc7400): Use it.
22138 * mpn/powerpc32/750/gmp-mparam.h: New file.
22139
22140 * config.sub, gmp.texi (ultrasparc1): Remove this, just use plain
22141 "ultrasparc".
22142
22143 2002-03-10 Kevin Ryde <[email protected]>
22144
22145 * mpfr: Update to 20020301, except internal_ceil_exp2.c,
22146 internal_ceil_log2.c, internal_floor_log2.c renamed to i_ceil_exp2.c,
22147 i_ceil_log2.c, i_floor_log2.c to be unique in DOS 8.3. And sqrtrem.c
22148 removed since no longer required.
22149 * mpfr/mpfr.texi: Fix some formatting.
22150 * mpfr/tests/reuse.c: Patch by Paul to fix test4 variable handling.
22151 * mpfr/sinh.c: Patch by Paul to fix err calculation when t==0.
22152 * mpfr/tests/tget_d.c: Disable until portability of rnd_mode.c can be
22153 sorted out.
22154
22155 * configure.in (powerpc*-*-*): Separate gcc and xlc cpu flags setups
22156 for clarity.
22157
22158 * longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]: New
22159 macros.
22160
22161 2002-03-07 Kevin Ryde <[email protected]>
22162
22163 * gmp.texi (Build Options): Note all the ultrasparcs accepted.
22164 (Language Bindings): Add Math::BigInt::GMP.
22165
22166 * config.sub (ultrasparc2i): New cpu type.
22167 * config.guess (sparc-*-*, sparc64-*-*): Add some exact CPU detection.
22168
22169 2002-03-05 Kevin Ryde <[email protected]>
22170
22171 * longlong.h (count_leading_zeros, count_trailing_zeros) [alphaev67,
22172 alphaev68]: Use ctlz and cttz insns (as per gcc longlong.h).
22173 (count_leading_zeros) [sparclite]: Fix parameter order (as per gcc
22174 longlong.h).
22175 * acconfig.h (HAVE_HOST_CPU_alphaev68): New define.
22176
22177 * config.guess [i?86-*-*]: Suppress error messages if compiler not
22178 found or test program won't run.
22179 [rs6000-*-*, powerpc-*-*]: Force code alignment for mfpvr test.
22180
22181 2002-03-04 Torbjorn Granlund <[email protected]>
22182
22183 * mpn/generic/pow_1.c: New file.
22184
22185 2002-03-03 Kevin Ryde <[email protected]>
22186
22187 * gmp.texi (Build Options): Note compiler must be able to fully link,
22188 add alphapca57 and alphaev68, give a clearer example of MPN_PATH
22189 (Debugging): Add notes on valgrind.
22190 (C++ Formatted Output): Clarify mpf showbase handling, in particular
22191 note "00.4" in octal.
22192
22193 * printf/doprntf.c: Do a showbase on octal float fractions, for
22194 instance "00.4" where previously it gave "0.4".
22195 * tests/cxx/t-ostream.cc: Update.
22196
22197 * gmp-h.in, mp-h.in (__GMP_DECLSPEC, __GMP_DECLSPEC_XX): Test
22198 __WIN32__ for Borland C, reported by "delta trinity".
22199
22200 * gmp-h.in, mp-h.in: Use <cstddef> for size_t under C++, suggested by
22201 Hans Aberg some time ago.
22202 * gmp-h.in (<iosfwd>): Move to top of file for clarity.
22203
22204 * Makefile.am (libgmpxx_la_SOURCES): Use dummy.cc to force C++.
22205 (CXX_OBJECTS): Add osfuns$U.lo.
22206 * dummy.cc: New file.
22207 * cxx/Makefile.am (INCLUDES): Use __GMP_WITHIN_GMPXX.
22208 (libcxx_la_SOURCES): Add osfuns.cc.
22209 * gmp-h.in (__GMP_DECLSPEC_XX): New define, use it on libgmpxx funs.
22210 * gmp-impl.h: Add __GMP_DECLSPEC to libgmp functions used by libgmpxx.
22211
22212 * longlong.h (COUNT_TRAILING_ZEROS_TIME): Remove, no longer used.
22213
22214 * gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): Correction to
22215 __totbits for nails.
22216
22217 * gmp-impl.h (JACOBI_LS0): Test size before limb, to pacify valgrind.
22218 (JACOBI_0LS): Ditto, and fix parens around arguments.
22219
22220 * mpn/x86/x86-defs.m4 (call_mcount): Add a counter to make data labels
22221 unique, since simplified L() scheme no longer gives that effect.
22222 (notl_or_xorl_GMP_NUMB_MASK): New macro.
22223 Add m4_assert_numargs in a few places.
22224
22225 * configure.in (*sparc*): Fix cycle counter setups for ABI=64.
22226
22227 2002-02-28 Torbjorn Granlund <[email protected]>
22228
22229 * mpn/vax/gmp-mparam.h: New file.
22230
22231 2002-02-28 Kevin Ryde <[email protected]>
22232
22233 * gmp-h.in (gmp_errno, gmp_version): Move into extern "C" block,
22234 reported by [email protected].
22235
22236 * gmp-h.in, mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT):
22237 Use __declspec(dllexport) and __declspec(dllimport) on Borland.
22238 * gmp-h.in (_GMP_H_HAVE_FILE): Test __STDIO_H for Borland.
22239 Reported by "delta trinity".
22240
22241 * gmp-impl.h (va_copy): Fall back on memcpy, not "=".
22242
22243 * mpn/generic/pre_mod_1.c: Add a comment about obsolescence.
22244
22245 * tune/time.c (MICROSECONDS_P): Don't trust time differences of 1
22246 microsecond.
22247
22248 * tests/cxx/t-ostream.cc: Use "const char *" not just "char *" for
22249 test data strings, avoids warnings on Sun CC.
22250
22251 2002-02-27 Torbjorn Granlund <[email protected]>
22252
22253 * configure.in: For sparc under solaris2.[7-9], pass -fsimple=1 to
22254 disable some crazy -fast optimizations.
22255
22256 2002-02-25 Torbjorn Granlund <[email protected]>
22257
22258 * configure.in: For sparc under solaris2.[7-9], pass -fns=no to enable
22259 denorm handling under -fast.
22260
22261 2002-02-25 Kevin Ryde <[email protected]>
22262
22263 * configure.in (alpha*-*-*): Rearrange -mcpu selection for gcc,
22264 provide an ev67 -> ev6 fallback. Fix -arch,-tune selection for DEC C.
22265 Allow ~ for space in optional options lists.
22266
22267 * tune/tuneup.c (tune_preinv_divrem_1): Compare against an assembler
22268 mpn_divrem_1 if it exists, not the generic C mpn_divrem_1_div.
22269 (tune_preinv_mod_1): Ditto with mpn_mod_1.
22270
22271 * tune/time.c (DIFF_SECS_ROUTINE): Eliminate the unused "type"
22272 parameter, try to make the code a bit clearer.
22273
22274 * tune/freq.c: Reduce the period measured for cycles versus
22275 gettimeofday, add cycles versus microsecond getrusage.
22276
22277 * mpz/array_init.c: "i" should be mp_size_t, noticed by E. Khong.
22278
22279 2002-02-24 Torbjorn Granlund <[email protected]>
22280
22281 * configure.in: For sparc under solaris2.[7-9], pass -fast instead of
22282 other optimization options.
22283
22284 2002-02-23 Kevin Ryde <[email protected]>
22285
22286 * mpn/asm-defs.m4 (GMP_NUMB_MASK): New macro.
22287 (PROLOGUE, EPILOGUE): Relax quoting for the benefit of tune/many.pl
22288 when GSYM_PREFIX non-empty.
22289
22290 * tune/time.c, tune/speed.h (speed_time_init): Include clock tick
22291 period in speed_time_string.
22292 * tune/time.c, configure.in (clock_gettime): New measuring method.
22293
22294 * tune/many.pl: Add -DHAVE_NATIVE_mpn_foo to C objects, to avoid
22295 conflicts with a macro version in gmp-impl.h, eg. mpn_com_n.
22296
22297 2002-02-22 Torbjorn Granlund <[email protected]>
22298
22299 * demos/pexpr.c: Increase RLIMIT_STACK to 4Mibyte.
22300
22301 2002-02-22 Kevin Ryde <[email protected]>
22302
22303 * tune/tuneup.c: Don't confuse gcc with mipspro cc in diagnostic.
22304
22305 2002-02-20 Torbjorn Granlund <[email protected]>
22306
22307 * configure.in (mips*-*-irix[6789]*]): Set `extra_functions_n32', not
22308 `extra_functions'.
22309
22310 * printf/doprnt.c: Conditionally include inttypes.h.
22311 * printf/repl-vsnprintf.c: Likewise.
22312 * scanf/doscan.c: Likewise.
22313
22314 2002-02-20 Kevin Ryde <[email protected]>
22315
22316 * mpn/x86/k7/mmx/com_n.asm: New file.
22317
22318 * mpz/n_pow_ui.c (SWAP_RP_TP): Use ASSERT_CODE on ralloc and talloc,
22319 to ensure they needn't live past the initial allocs in a normal build.
22320
22321 * mpn/generic/mod_34lsub1.c: Note this is for internal use.
22322
22323 2002-02-19 Torbjorn Granlund <[email protected]>
22324
22325 * Clean up *_THRESHOLD names. Many files affected.
22326
22327 * mpn/mips32: Asm-ify 32-bit mips code.
22328 Move files from `mips2' to `mips32' directory.
22329 * mpn/mips64: Move files from `mips3' to `mips64' directory.
22330 * configure.in: Change `mips2' => `mips32' and `mips3' => `mips64'.
22331
22332 2002-02-19 Kevin Ryde <[email protected]>
22333
22334 * acinclude.m4, configure.in (GMP_PROG_LEX): New macro.
22335
22336 * tune/tuneup.c (one): Start next threshold at a max of previous ones,
22337 in order to get a good starting point for TOOM3_SQR_THRESHOLD if
22338 KARATSUBA_SQR_THRESHOLD is 0 (ie. using mpn_mul_basecase only).
22339
22340 * configure.in, tune/tuneup.c (GMP_MPARAM_H_SUGGEST): New AC_DEFINE
22341 replacing GMP_MPARAM_H_FILENAME. Suggest a new file in a cpu specific
22342 subdirectory rather than mpn/generic.
22343
22344 * acinclude.m4 (POWERPC64_PATTERN): New macro.
22345 * configure.in (powerpc*-*-*): Use it.
22346 (powerpc*-*-*): Use umul in 32L and aix64.
22347 (mips*-*-*): Use umul, 32 and 64 bit versions.
22348
22349 2002-02-18 Torbjorn Granlund <[email protected]>
22350
22351 * longlong.h: Add basic x86-64 support.
22352
22353 2002-02-17 Torbjorn Granlund <[email protected]>
22354
22355 * demos/pexpr.c: Support `-X' for upper case hex, make `-x' output
22356 lower case hex.
22357
22358 * mpn/mips2/umul.s: Make it actually work.
22359 * mpn/mips3/umul.asm: New file.
22360
22361 * mpn/mips2/gmp-mparam.h: New file.
22362
22363 2002-02-16 Torbjorn Granlund <[email protected]>
22364
22365 * mpn/generic/get_str.c (mpn_sb_get_str): Round frac upwards after
22366 umul_ppmm calls.
22367
22368 2002-02-16 Kevin Ryde <[email protected]>
22369
22370 * config.guess (alpha-*-*): Do alpha exact cpu probes on any system,
22371 and only if configfsf.guess gives a plain "alpha".
22372
22373 * acinclude.m4 (GMP_PROG_CC_WORKS): Detect a gcc 3.0.3 powerpc64
22374 linker invocation problem.
22375
22376 2002-02-15 Torbjorn Granlund <[email protected]>
22377
22378 * mpn/generic/get_str.c (mpn_sb_get_str): For base 10, develop initial
22379 digits using umul_ppmm, then switch to plain multiplication.
22380
22381 * config.guess: Rewrite Alpha subtype detection code for *bsd systems.
22382
22383 2002-02-15 Kevin Ryde <[email protected]>
22384
22385 * gmp.texi (Build Options): Note powerpc exact cpu types.
22386 (Debugging): Advertise DEBUG in memory.c.
22387
22388 * config.sub, config.guess: Add some powerpc exact cpus.
22389 * configure.in: Add configs for them.
22390
22391 * memory.c [__NeXT__]: Remove unused #define of "static".
22392 (__gmp_default_allocate, __gmp_default_reallocate): Print size if
22393 allocation fails, don't use perror.
22394
22395 * gmp-h.in: g++ 3 demands __GMP_NOTHROW is before other attributes.
22396
22397 2002-02-14 Torbjorn Granlund <[email protected]>
22398
22399 * mpn/alpha/mul_1.asm: Fix typo preventing build on T3E systems.
22400
22401 2002-02-14 Kevin Ryde <[email protected]>
22402
22403 * tune/tuneup.c (tune_set_str): Increase max_size, for the benefit of
22404 alpha.
22405
22406 * macos/README: Bug reports to [email protected], clarify MacOS X a bit.
22407
22408 * mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Add missing TMP_FREE.
22409
22410 * tune/speed.c, tune/tuneup.c: Allow for speed_cycletime of 0.0 in
22411 some diagnostic printouts.
22412 * tune/time.c (speed_cycletime): Note can be 0.0.
22413
22414 2002-02-12 Torbjorn Granlund <[email protected]>
22415
22416 * mpn/alpha/mul_1.asm: Add mpn_mul_1c entry.
22417
22418 * mpn/pa64w/sqr_diagonal.asm: Use L() for labels.
22419
22420 2002-02-11 Torbjorn Granlund <[email protected]>
22421
22422 * mpn/generic/get_str.c (mpn_sb_get_str): Change declaration of rp to
22423 accommodate tuneup compiles.
22424
22425 2002-02-11 Kevin Ryde <[email protected]>
22426
22427 * mpn/alpha/default.m4, mpn/alpha/unicos.m4 (PROLOGUE_cpu): Add
22428 noalign option.
22429 * mpn/alpha/default.m4 (PROLOGUE_cpu): use ALIGN instead of ".align".
22430
22431 * gmp.texi (Debugging): Notes on Checker.
22432 (Other Multiplication): Move note on float FFTs to here.
22433 (Assembler Floating Point): New text and revisions by Torbjorn,
22434 picture formatting by me.
22435 Simplify tex pictures elsewhere a bit, share heights, eliminate some
22436 gaps at line joins.
22437
22438 2002-02-11 Torbjorn Granlund <[email protected]>
22439
22440 * mpn/generic/get_str.c (mpn_sb_get_str): Rewrite to generate fraction
22441 limbs and use multiplication for digit development. Trim allocation of
22442 buf. Get rid of code for !USE_MULTILIMB.
22443
22444 2002-02-10 Torbjorn Granlund <[email protected]>
22445
22446 * mpn/generic/set_str.c (mpn_set_str): Undo this:
22447 Change invocations of mpn_add_1 to instead use mpn_incr_u.
22448
22449 * tests/mpz/convert.c: Free str only after it is used in error message.
22450
22451 * mpn/generic/get_str.c (mpn_sb_get_str): Combine tail code for base 10
22452 and generic bases.
22453
22454 * mpn/mp_bases.c: Add entries for base 256. Remove __ prefix from
22455 table name.
22456 * gmp-impl.h (__mp_bases): Remove superfluous mp_ part of name, making
22457 it __gmpn_bases instead of __gmpn_mp_bases.
22458 (mp_bases): New #define.
22459 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Allow bases up to 256.
22460 (SPEED_ROUTINE_MPN_GET_STR): Likewise.
22461
22462 2002-02-09 Torbjorn Granlund <[email protected]>
22463
22464 * mpn/generic/set_str.c (mpn_set_str): Use mpn_mul_1c if available.
22465 Change invocations of mpn_add_1 to instead use mpn_incr_u.
22466
22467 2002-02-09 Kevin Ryde <[email protected]>
22468
22469 * mpz/array_init.c, mpz/cfdiv_q_2exp.c, mpz/cfdiv_r_2exp.c,
22470 mpz/cong_2exp.c, mpz/divis_2exp.c, mpz/hamdist.c, mpz/init2.c,
22471 mpz/mul_2exp.c, mpz/realloc2.c, mpz/scan0.c, mpz/scan1.c,
22472 mpz/setbit.c, mpz/tdiv_q_2exp.c, mpz/tdiv_r_2exp.c, mpz/tstbit.c,
22473 mpz/urandomb.c: Use GMP_NUMB_BITS.
22474
22475 * mpz/iset_str.c [__CHECKER__]: Store a dummy value to the low limb to
22476 stop it appearing uninitialized.
22477
22478 * gmp-h.in (__GMP_NOTHROW): New macro.
22479 (mp_set_memory_functions, mpz_cmp, mpz_cmp_si, mpz_cmp_ui, mpz_cmpabs,
22480 mpz_cmpabs_ui, mpz_congruent_2exp_p, mpz_divisible_2exp_p,
22481 mpz_fits_sint_p, mpz_fits_slong_p, mpz_fits_sshort_p, mpz_fits_uint_p,
22482 mpz_fits_ulong_p, mpz_fits_ushort_p, mpz_get_si, mpz_get_ui,
22483 mpz_getlimbn, mpz_hamdist, mpz_popcount, mpz_scan0, mpz_scan1,
22484 mpz_size, mpz_sizeinbase, mpz_swap, mpz_tstbit, mpq_equal, mpq_swap,
22485 mpf_cmp, mpf_cmp_si, mpf_cmp_ui, mpf_fits_sint_p, mpf_fits_slong_p,
22486 mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p,
22487 mpf_fits_ushort_p, mpf_get_default_prec, mpf_get_prec, mpf_get_si,
22488 mpf_get_ui, mpf_integer_p, mpf_set_default_prec, mpf_set_prec_raw,
22489 mpf_size, mpf_swap, mpn_add_1, mpn_cmp, mpn_hamdist, mpn_popcount,
22490 mpn_sub_1): Use it.
22491
22492 * gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): New macros from
22493 mpn_sizeinbase, and use GMP_NUMB_BITS.
22494 * mpz/get_str.c, mpz/sizeinbase.c, mpbsd/mout.c, tune/speed.h: Use
22495 MPN_SIZEINBASE.
22496 * mpbsd/mtox.c: Use MPN_SIZEINBASE_16.
22497
22498 * configure.in, mpn/Makefile.am, gmp-impl.h (mpn_sizeinbase): Remove.
22499 * mpn/generic/sizeinbase.c: Remove file.
22500
22501 * gmp-impl.h (MPN_GET_STR_SIZE): Remove.
22502 * tests/mpn/t-g_str_size.c: Remove file.
22503 * tests/mpn/Makefile.am: Update.
22504
22505 * Makefile.am (dist-hook): Don't distribute cvs merge ".#" files.
22506
22507 2002-02-08 Torbjorn Granlund <[email protected]>
22508
22509 * configure.in: Override extra_functions for all sparcv8 systems, not
22510 just supersparc.
22511
22512 2002-02-06 Kevin Ryde <[email protected]>
22513
22514 * tune/tuneup.c (tune_mul, tune_sqr): Disable FFTs until tuned.
22515 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix memory clobber in
22516 destination cache priming.
22517
22518 * printf/doprnt.c: Fix parsing of %s and %p conversions.
22519 * tests/misc/t-printf.c (check_misc): Add some tests.
22520
22521 2002-02-03 Torbjorn Granlund <[email protected]>
22522
22523 * mpn/sparc32/v8/udiv.asm: New file, from v8/supersparc.
22524
22525 * mpn/generic/set_str.c: Rename indigits_per_limb => chars_per_limb.
22526 Remove redundant chars_per_limb. Reverse 4 loops in basecase code for
22527 speed. Use MP_BASES_CHARS_PER_LIMB_10.
22528
22529 2002-02-03 Kevin Ryde <[email protected]>
22530
22531 * acinclude.m4 (GMP_PROG_NM): Ensure -B or -p get used when doing a
22532 cross compile with the native nm, helps OSF for instance.
22533 (GMP_ASM_LSYM_PREFIX): Remove ".byte 0" for the benefit of irix 6,
22534 allow "N" from nm for OSF, allow for "t" for other systems, but prefer
22535 no mention of the symbol at all.
22536
22537 * tune/tuneup.c (print_define_remark): New function.
22538 Turn some "#if"s into plain "if"s.
22539
22540 * tune/tuneup.c, gmp-impl.h, tune/Makefile.am
22541 (GET_STR_BASECASE_THRESHOLD, GET_STR_PRECOMPUTE_THRESHOLD): Tune these.
22542 * mpn/generic/get_str.c [TUNE_PROGRAM_BUILD]: Cope with non-constant
22543 GET_STR_PRECOMPUTE_THRESHOLD.
22544
22545 2002-02-02 Torbjorn Granlund <[email protected]>
22546
22547 * mpn/generic/get_str.c (mpn_get_str): Fix typo in a declaration.
22548
22549 2002-02-02 Kevin Ryde <[email protected]>
22550
22551 * mpn/generic/set_str.c: Use MP_PTR_SWAP and POW2_P, add __GMP_PROTO
22552 to convert_blocks prototype, disable SET_STR_BLOCK_SIZE sanity check.
22553
22554 * tune/set_strb.c, tune/set_strs.c: New files.
22555 * tune/speed.h, tune/speed.c, tune/common.c,tune/Makefile.am: Add them.
22556 * tune/tuneup.c: Tune SET_STR_THRESHOLD.
22557 (DEFAULT_MAX_SIZE): Renamed from MAX_SIZE, allow any param.max_size[].
22558
22559 2002-02-01 Torbjorn Granlund <[email protected]>
22560
22561 * tests/mpz/convert.c: Increase operand size. Add (yet disabled) code
22562 for testing with random strings.
22563
22564 * mpn/generic/get_str.c (mpn_get_str): Rewrite to become sub-quadratic.
22565 (mpn_dc_get_str, mpn_sb_get_str): New functions.
22566
22567 2002-01-31 Kevin Ryde <[email protected]>
22568
22569 * gmpxx.h (cmp): Renamed from "compare".
22570
22571 * configure.in (AC_C_BIGENDIAN): Don't abort when cross compiling.
22572 (PROLOGUE): Allow new style optional second parameter when grepping.
22573
22574 * acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
22575 GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
22576 Use $ac_objext for object filenames.
22577 (GMP_ASM_UNDERSCORE): Use CCAS to assemble.
22578
22579 * demos/pexpr-config-h.in: New file.
22580 * configure.in: Generate demos/pexpr-config.h.
22581 (AC_CHECK_FUNCS): Add clock, cputime, setrlimit, sigaction,
22582 sigaltstack, sigstack.
22583 * acinclude.m4 (GMP_SUBST_CHECK_FUNCS, GMP_SUBST_CHECK_HEADERS): New
22584 macros.
22585 * demos/pexpr.c: Use pexpr-config.h, not various #ifdefs.
22586 (setup_error_handler): Use signal if sigaction not available, allow
22587 for SIGBUS missing on mingw.
22588 (main): Use time() for random seed if gettimeofday not available.
22589 (cleanup_and_exit): Move SIGFPE out of LIMIT_RESOURCE_USAGE.
22590
22591 2002-01-30 Torbjorn Granlund <[email protected]>
22592
22593 * mpn/generic/set_str.c: Rewrite to become sub-quadratic.
22594 (convert_blocks): New function.
22595
22596 2002-01-30 Kevin Ryde <[email protected]>
22597
22598 * gmp-impl.h (GMP_NUMB_MASK, GMP_NAIL_MASK, GMP_NUMB_HIGHBIT,
22599 ASSERT_MPN, ASSERT_MP_LIMB_T): New macros.
22600
22601 * mpn/generic/fib2_ui.c: Use GMP_NUMB_BITS, simplify the data
22602 generator program, share __gmp_fib_table initializers between bit
22603 sizes, cope with bit sizes other than those specifically setup.
22604 * gmp-impl.h (FIB_TABLE_LIMIT, FIB_TABLE_LUCNUM_LIMIT): Corresponding
22605 rearrangement of conditionals.
22606 * tests/mpz/t-fib_ui.c (check_fib_table): New test.
22607
22608 2002-01-28 Kevin Ryde <[email protected]>
22609
22610 * mpz/set_si.c, mpz/iset_si.c: Store to _mp_d[0] unconditionally, use
22611 an expression for _mp_size.
22612
22613 * mpz/init.c, mpz/init2.c, mpz/iset.c, mpq/init.c [__CHECKER__]: Store
22614 dummy values to low limbs to stop them appearing uninitialized.
22615
22616 2002-01-26 Kevin Ryde <[email protected]>
22617
22618 * mpfr/mpfr-test.h (MAX, MIN, ABS): Use instead a patch from Paul and
22619 Vincent.
22620
22621 2002-01-24 Kevin Ryde <[email protected]>
22622
22623 * configure.in: Extra quoting to get argument help messages right.
22624
22625 * gmp.texi (Efficiency): Suggest hex or octal for input and output.
22626 (Formatted Output Strings): Mention "*" for width and precision.
22627
22628 * mpn/generic/sizeinbase.c: New file, adapted from mpz/sizeinbase.c.
22629 Use POW2_P, use __mp_bases[base].big_base for log2(base).
22630 * configure.in, mpn/Makefile.am: Add it.
22631 * gmp-impl.h: Add prototype.
22632 * mpz/sizeinbase.c, tune/speed.h, mpn/generic/get_str.c,
22633 mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c: Use it.
22634 * mpz/get_str.c: Write directly to user buffer, skip at most one
22635 leading zero, eliminate special case for x==0.
22636 * mpbsd/mtox.c: Allocate exact result space at the start, eliminate
22637 special case for x==0.
22638 * mpbsd/mout.c: Only need to skip one high zero with mpn_sizeinbase.
22639
22640 * configure.in (--enable-nails): New option.
22641 (GMP_NAIL_BITS, GMP_LIMB_BITS, GMP_NUMB_BITS): New defines for gmp.h
22642 and config.m4.
22643 * gmp-h.in: Add templates.
22644
22645 * mpfr/mpfr-test.h (MAX, MIN, ABS): Use #ifndef to avoid a redefine
22646 error on AIX xlc.
22647
22648 2002-01-23 Torbjorn Granlund <[email protected]>
22649
22650 * mpn/generic/get_str.c: Correct type of `out_len'.
22651
22652 2002-01-22 Kevin Ryde <[email protected]>
22653
22654 * mpn/generic/pre_divrem_1.c: Corrections to some ASSERTs.
22655
22656 * mpfr/mul_ui.c: Don't call mpn_lshift with 0 shift.
22657
22658 * mpfr/mpz_set_fr.c: Produce correct mpz_t for f==0.
22659
22660 2002-01-21 Torbjorn Granlund <[email protected]>
22661
22662 * longlong.h (32-bit powerpc add_ssaaaa): Remove spurious commutative
22663 declaration.
22664 (64-bit powerpc add_ssaaaa): Likewise.
22665
22666 2002-01-20 Kevin Ryde <[email protected]>
22667
22668 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Use %n to better detect sparc
22669 solaris 2.7 problems.
22670
22671 2002-01-19 Torbjorn Granlund <[email protected]>
22672
22673 * demos/pexpr.c (mpz_eval_expr): Optimize s^rhs for -1 <= s <= 1.
22674 (cleanup_and_exit): Improve error message wording.
22675
22676 2002-01-19 Kevin Ryde <[email protected]>
22677
22678 * mpfr/mpfr.h (_PROTO): Use __GMP_PROTO, for compatibility with
22679 gmp-impl.h.
22680
22681 2002-01-17 Torbjorn Granlund <[email protected]>
22682
22683 * mpfr/mpfr-test.h: Test "__hpux", not "hpux". Mask off mrand48
22684 return value to 31 bits to work around sloppy mpfr #include practices.
22685
22686 * mpfr/tests/*.c: Use #include "", not <>, for gmp.h and mpfr.h.
22687 Make sure to #include mpfr-test.h from all files that use random().
22688
22689 2002-01-17 Kevin Ryde <[email protected]>
22690
22691 * gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE_TYPE): New macro.
22692 * gmp-impl.h, mpz/get_str.c, mpz/out_raw.c, mpq/get_str.c,
22693 mpq/set_str.c, mpf/get_str.c, printf/asprntffuns.c, printf/doprnt.c,
22694 printf/repl-vsnprintf.c, printf/snprntffuns.c, scanf/doscan.c,
22695 mpbsd/mtox.c: Some fixes to compile as C++.
22696
22697 * mpn/generic/jacbase.c (JACOBI_BASE_METHOD): New tuned parameter,
22698 replacing COUNT_TRAILING_ZEROS_TIME test. Add a third method too.
22699 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
22700 measuring of mpn_jacobi_base methods.
22701 * tune/jacbase1.c, tune/jacbase2.c, tune/jacbase3.c: New files.
22702 * tune/tuneup.c (JACOBI_BASE_METHOD): Tune this.
22703 * mpn/x86/*/gmp-mparam.h (COUNT_TRAILING_ZEROS_TIME): Remove macro.
22704
22705 * gmp-h.in: Use __gmp prefix on variables in inlines.
22706
22707 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Remove __i, unused.
22708
22709 * mpn/generic/mul_fft.c: Use HAVE_NATIVE_mpn_addsub_n, not ADDSUB.
22710 Use CNST_LIMB for some constants.
22711
22712 2002-01-15 Kevin Ryde <[email protected]>
22713
22714 * tests/mpbsd/Makefile.am: Add a convenience rule for ../libtests.la.
22715
22716 * printf/Makefile.am: libdummy.la should be in EXTRA_LTLIBRARIES.
22717
22718 * mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and
22719 mpf_get_str give the same for ndigits==0.
22720
22721 * mpfr/exceptions.c (mpfr_set_emin, mpfr_set_emax): Work around a
22722 powerpc64 gcc 3.0 -O2 bug.
22723
22724 * tests/memory.c, tests/tests.h (tests_memory_validate): New function.
22725
22726 2002-01-14 Kevin Ryde <[email protected]>
22727
22728 * mpn/generic/sb_divrem_mn.c, mpn/generic/divrem_1.c,
22729 mpn/generic/divrem_2.c, mpn/generic/mod_1.c: Don't use UMUL_TIME and
22730 UDIV_TIME, just default to preinv.
22731 * gmp-impl.h (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Ditto.
22732 (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD): Don't use UMUL_TIME
22733 and UDIV_TIME, make default thresholds 0.
22734 (UDIV_NORM_PREINV_TIME, UDIV_UNNORM_PREINV_TIME): Remove macros.
22735 * mpn/x86/*/gmp-mparam.h (UMUL_TIME, UDIV_TIME,
22736 UDIV_NORM_PREINV_TIME): Remove macros.
22737
22738 * gmp.texi (Headers and Libraries): New section, being the header
22739 notes from "GMP Basics" and some new stuff.
22740 (Parameter Conventions): Notes on "const" parameters.
22741 (Formatted Output Strings): Add type N, tweak some wording.
22742
22743 * tests/refmpn.c (refmpn_divmod_1c): Avoid a bug in i386 gcc 3.0.
22744
22745 2002-01-12 Kevin Ryde <[email protected]>
22746
22747 * mpz/root.c: Add <stdlib.h>, for abort().
22748
22749 * mpfr/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
22750 * mpfr/mpfr.h, mpfr/mpfr-tests.h, reuse.c, tadd.c, tadd_ui.c, tagm.c,
22751 tatan.c, tcmp2.c, tcos.c, tdiv.c, tdiv_ui.c, teq.c, texp.c,
22752 tget_str.c, thyperbolic.c, tlog.c, tmul.c, tout_str.c, tpow.c,
22753 trandom.c, tset_z.c, tsin.c, tsqrt.c, tsqrt_ui.c, tsub_ui.c, ttan.c,
22754 tui_div.c: Fixes for K&R.
22755
22756 * tests/misc/t-scanf.c (check_misc, check_misc):
22757
22758 * tests/mpz/t-inp_str.c, tests/mpq/t-inp_str.c, tests/misc/t-scanf.c:
22759 Avoid strings in ASSERT, not enjoyed by K&R.
22760 * gmp-impl.h (ASSERT): Note this.
22761
22762 * tests/tests.h (refmpn_mod_34lsub1): Add __GMP_PROTO.
22763
22764 * mpbsd/Makefile.am: Avoid an automake problem with ansi2knr and
22765 sources in a different directory.
22766
22767 * printf/repl-vsnprintf.c: Test HAVE_LONG_DOUBLE for long double.
22768
22769 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mod_34lsub1.c,
22770 mul_2.c, pre_divrem_1.c.
22771
22772 * gmp-h.in, gmp-impl.h (mpn_add_nc, mpn_addmul_1c, mpn_addsub_n,
22773 mpn_addsub_nc, mpn_divrem_1c, mpn_dump, mpn_mod_1c, mpn_mul_1c,
22774 mpn_mul_basecase, mpn_sqr_n, mpn_sqr_basecase, mpn_sub_nc,
22775 mpn_submul_1c): Move to gmp-impl.h, since they're undocumented.
22776
22777 * gmp-impl.h (mpn_reciprocal): Remove, unused.
22778
22779 * tune/many.pl (cntlz, cnttz): Use new SPEED_ROUTINE_COUNT_ZEROS.
22780
22781 2002-01-11 Kevin Ryde <[email protected]>
22782
22783 * mpn/hppa/*.asm, mpn/pa64/*.asm, mpn/pa64w/*.asm: Use L().
22784
22785 2002-01-08 Kevin Ryde <[email protected]>
22786
22787 * mpn/asm-defs.m4 (PROLOGUE, EPILOGUE): New scheme, optional function
22788 name to EPILOGUE, check for missing or wrong function name EPILOGUE.
22789 * mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/m68k/m68k-defs.m4,
22790 mpn/mips3/mips.m4, mpn/ia64/default.m4, mpn/powerpc32/aix.m4,
22791 mpn/powerpc64/aix.m4, mpn/x86/x86-defs.m4: Consequent updates, add a
22792 few more asserts.
22793 * mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/alpha/cntlz.asm,
22794 mpn/alpha/invert_limb.asm (PROLOGUE_GP): Change to an optional "gp"
22795 parameter on plain PROLOGUE.
22796
22797 * gmp.texi (Low-level Functions): mpn_get_str doesn't clobber an extra
22798 limb, and doesn't clobber at all for power of 2 bases.
22799 (Language Bindings): Add python gmpy.
22800
22801 * mpz/get_str.c: Determine realloc size arithmetically.
22802
22803 * mpbsd/mtox.c: Size memory block returned to actual space needed.
22804 * gmp.texi (BSD Compatible Functions): Describe this.
22805
22806 * mpz/get_str.c: Don't copy mpn_get_str input for power of 2 bases.
22807 * mpbsd/mtox.c: Ditto, and as a side effect avoid a memory leak from a
22808 missing TMP_FREE.
22809
22810 * mpz/get_str.c, mpbsd/mout.c: No longer need for +1 limb for
22811 mpn_get_str clobber.
22812
22813 * gmp-impl.h (MPN_GET_STR_SIZE): New macro.
22814 * mpn/generic/get_str.c, mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c,
22815 tune/speed.h: Use it.
22816 * tests/mpn/t-g_str_size.c: New test.
22817 * tests/mpn/Makefile.am: Add it.
22818
22819 * gmp-impl.h (POW2_P): New macro.
22820 * mpn/generic/get_str.c, tests/misc.c: Use it.
22821
22822 * printf/doprnt.c: Add "N" for mpn, share some code between N, Q and Z.
22823 * tests/misc/t-printf.c: Add tests.
22824 * gmp-impl.h (ASSERT_CODE): New macro.
22825
22826 * tests/mpbsd/t-mtox.c: New test.
22827 * tests/mpbsd/Makefile.am: Add it.
22828 (allfuns_LDADD): Don't link against libgmp when testing everything in
22829 libmp can link.
22830
22831 2002-01-07 Torbjorn Granlund <[email protected]>
22832
22833 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Rewrite generic versions.
22834
22835 2002-01-06 Kevin Ryde <[email protected]>
22836
22837 * mpn/generic/pre_divrem_1.c: Don't support size==0.
22838 * tests/devel/try.c: Update.
22839
22840 * mpn/generic/get_str.c: Add special case for base==10.
22841 * gmp-impl.h (MP_BASES_CHARS_PER_LIMB_10, MP_BASES_BIG_BASE_10,
22842 MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): New
22843 constants.
22844 * tests/t-constants.c: Add checks.
22845 * mpn/mp_bases.c [GENERATE_TABLE]: Print defines for gmp-impl.h, print
22846 all standard bits-per-limb by default.
22847
22848 * demos/pexpr.c, demos/expr/expr.h, demos/expr/expr-impl.h: Use
22849 __GMP_PROTO.
22850
22851 * gmp-h.in (mpn_divexact_by3c): Remove variables from prototype, to
22852 keep out of application namespace.
22853
22854 2002-01-04 Torbjorn Granlund <[email protected]>
22855
22856 * gmp-impl.h: Move _PROTO declaration to before its first usages.
22857
22858 2002-01-04 Kevin Ryde <[email protected]>
22859
22860 * gmp-h.in, mp-h.in, tests/tests.h: Rename _PROTO to __GMP_PROTO, and
22861 don't use #ifndef just define it ourselves.
22862 * gmp-impl.h: Provide _PROTO as an alias for __GMP_PROTO, to avoid big
22863 edits internally, for the moment.
22864
22865 2002-01-03 Torbjorn Granlund <[email protected]>
22866
22867 * tune/speed.c (usage): Insert "\n\" into a string.
22868
22869 2001-12-30 Torbjorn Granlund <[email protected]>
22870
22871 * mpn/pa64/udiv_qrnnd.c: Remove file.
22872 * mpn/pa64w/udiv_qrnnd.c: Remove file.
22873
22874 * gmp-impl.h (MPN_IORD_U): Change formatting (labels in pos 0, insns
22875 indented by tab).
22876 (MPN_INCR_U): Use "addl $1,foo; jc", not "incl foo; jz".
22877
22878 * gmp-impl.h (udiv_qrnnd_preinv): Use plain subtract, not sub_ddmmss,
22879 in one more case.
22880
22881 2001-12-30 Kevin Ryde <[email protected]>
22882
22883 * mpn/generic/get_str.c (udiv_qrnd_unnorm): New macro.
22884 Use "do while" for dig_per_u loop since it's non-zero.
22885 * acconfig.h (HAVE_HOST_CPU_m68k etc): Add templates.
22886
22887 * mpn/generic/mul_basecase.c, mpz/mul.c, mpz/n_pow_ui.c,
22888 mpn/x86/pentium/mul_2.asm, tests/devel/try.c, tests/tests.h,
22889 tests/refmpn.c, tune/speed.c, tune/speed.h, tune/common.c,
22890 tune/many.pl (mpn_mul_2): New parameter style.
22891 * gmp-impl.h (mpn_mul_2): Add prototype.
22892 * configure.in (gmp_mpn_functions_optional): Add mul_2.
22893
22894 * longlong.h (__vxworks__): Remove from powerpc tests, not correct,
22895 not on its own at least.
22896
22897 * tune/speed.c: Add "aas" to specify 0xAA..AA data.
22898
22899 * tune/tuneup.c (print_define_end): Indicate "never" and "always".
22900
22901 2001-12-29 Torbjorn Granlund <[email protected]>
22902
22903 * mpq/set_d.c: ANSI-fy.
22904 * mpz/invert.c: Use PTR and SIZ (cosmetic change).
22905
22906 * mpz/cong.c: Rename `xor' to `sign' to avoid C++ reserved word.
22907
22908 2001-12-28 Torbjorn Granlund <[email protected]>
22909
22910 * mpn/sparc64/sqr_diagonal.asm: New file.
22911
22912 2001-12-28 Kevin Ryde <[email protected]>
22913
22914 * mpn/generic/get_str.c: Avoid one mpn_divrem_1 by running main loop
22915 only until msize==1.
22916
22917 * tune/tuneup.c: Break up all() for clarity.
22918 (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Compare against plain
22919 division udiv_qrnnd, not the tuned and possibly preinv version.
22920
22921 * tune/freq.c: Split sysctl and sysctlbyname probes into separate
22922 functions, shorten some identifiers, put descriptions inside
22923 functions, define functions unconditionally and do nothing if
22924 requisites not available.
22925
22926 * mpz/inp_raw.c: Avoid a gcc 3.0 powerpc64 bug on AIX.
22927
22928 * acinclude.m4, configure.in (GMP_C_RESTRICT): New macro.
22929
22930 * mpfr/sin.c: Patch from Paul to fix sign of sin(3pi/2).
22931
22932 * demos/calc/calc.y: Improve some error messages.
22933
22934 2001-12-28 Torbjorn Granlund <[email protected]>
22935
22936 * mpn/sparc64/mul_1.asm: Rename r72 -> r80.
22937 * mpn/sparc64/addmul_1.asm: Likewise.
22938
22939 2001-12-27 Torbjorn Granlund <[email protected]>
22940
22941 * mpn/generic/tdiv_qr.c: Misc formatting cleanups.
22942 For switch case 2, replace `dn' with its value (2).
22943
22944 2001-12-25 Torbjorn Granlund <[email protected]>
22945
22946 * tests/devel/mul_1.c: Add FIXED_XLIMB.
22947 * tests/devel/addmul_1.c: Likewise.
22948 * tests/devel/submul_1.c: Likewise.
22949
22950 * tests/devel/add_n.c: Improve error message.
22951 Accept command line argument for # of tests.
22952 * tests/devel/sub_n.c: Likewise.
22953
22954 * tests/devel/: Remove CLOCK settings.
22955
22956 * mpn/sparc32/v9/mul_1.asm: Rewrite.
22957 * mpn/sparc32/v9/addmul_1.asm: Rewrite.
22958 * mpn/sparc32/v9/submul_1.asm: Rewrite.
22959
22960 2001-12-24 Torbjorn Granlund <[email protected]>
22961
22962 * mpn/sparc64/mul_1.asm: Get rid of global constant 0.0 (L(noll)).
22963 * mpn/sparc64/addmul_1.asm: Likewise.
22964
22965 2001-12-23 Torbjorn Granlund <[email protected]>
22966
22967 * mpn/generic/get_str.c: Move final ASSERT to just before zero fill
22968 loop.
22969
22970 2001-12-22 Torbjorn Granlund <[email protected]>
22971
22972 * mpn/generic/get_str.c: Move ASSERTs out of loops. Split digit
22973 generation code into two loops, saving a test of msize in the loop.
22974
22975 2001-12-22 Kevin Ryde <[email protected]>
22976
22977 * mpn/x86/x86-defs.m4, mpn/x86/*/*.asm: Remove L / LF scheme putting
22978 function name in local labels.
22979
22980 * mpn/generic/get_str.c: Use mpn_preinv_divrem_1, add a couple of
22981 ASSERTs.
22982
22983 * mpn/generic/pre_divrem_1.c: New file.
22984 * configure.in (gmp_mpn_functions): Add it.
22985 * gmp-impl.h (mpn_preinv_divrem_1): Add prototype.
22986 (USE_PREINV_DIVREM_1, MPN_DIVREM_OR_PREINV_DIVREM_1): New macros.
22987 * tests/devel/try.c, tune/speed.c, tune/speed.h, tune/common.c,
22988 tune/many.pl, tune/Makefile.am (mpn_preinv_divrem_1): Add testing and
22989 measuring.
22990 * tune/tuneup.c: Determine USE_PREINV_DIVREM_1.
22991 * tune/pre_divrem_1.c: New file.
22992 * tests/refmpn.c, tests/tests.h (refmpn_preinv_divrem_1): New function.
22993
22994 * tests/mpz/t-io_raw.c: New file.
22995 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
22996
22997 * mpz/inp_raw.c, mpz/out_raw.c: Rewrite.
22998 * acinclude.m4, configure.in (AC_C_BIGENDIAN): New test.
22999 * gmp-impl.h (BSWAP_LIMB): New macro.
23000
23001 * acinclude.m4 (GMP_PROG_CC_WORKS): For a native compile, demand
23002 executables will run, per AC_PROG_CC. This detects ABI=64 is unusable
23003 in a native sparc solaris 7 build with the kernel in 32-bit mode.
23004 * gmp.texi (ABI and ISA): Add notes on this, add an example configure
23005 setting an ABI.
23006
23007 * tune/tuneup.c, configure.in: Print the gmp-mparam.h filename.
23008 * tune/tuneup.c: Print the CPU frequency.
23009
23010 * tune/time.c, tune/speed.h: Add s390 "stck" method, flatten
23011 conditionals in speed_time_init a bit, use have_* variables to let
23012 some code go dead in speed_starttime and speed_endtime.
23013
23014 * tune/freq.c (speed_cpu_frequency_irix_hinv): New function.
23015
23016 * Makefile.am, configure.in: Restore mpfr.
23017
23018 * configure.in: Add --with-readline, AC_PROG_YACC and AM_PROG_LEX.
23019 * demos/calc/calc.y, demos/calc/calclex.l: Add readline support, add
23020 lucnum function.
23021 * demos/calc/Makefile.am: Add calcread.c, calc-common.h, use $(YACC),
23022 $(LEX) and $(LEXLIB).
23023 * demos/calc/calcread.c, demos/calc/calc-common.h,
23024 demos/calc/calc-config-h.in, demos/calc/README: New files.
23025
23026 * configure.in: Put demos/expr configs in expr-config.h.
23027 * demos/expr/expr-config-h.in: New file.
23028 * demos/expr/expr-impl.h: Renamed from expr-impl-h.in, get configs
23029 from expr-config.h.
23030 * demos/expr/Makefile.am: Update.
23031
23032 * demos/expr/exprfr.c: Use mpfr_sin and mpfr_cos, remove some spurious
23033 returns.
23034
23035 2001-12-20 Torbjorn Granlund <[email protected]>
23036
23037 * mpn/sparc64/mul_1.asm: Trim an instruction.
23038 * mpn/sparc64/addmul_1.asm: Likewise.
23039
23040 * mpn/ia64/add_n.asm: Rewrite.
23041 * mpn/ia64/sub_n.asm: Rewrite.
23042
23043 2001-12-19 Torbjorn Granlund <[email protected]>
23044
23045 * mpn/ia64/mul_1.asm: Rewrite.
23046 * mpn/ia64/addmul_1.asm: Rewrite.
23047 * mpn/ia64/submul_1.c: Use TMP_ALLOC_LIMBS.
23048
23049 * tests/devel/mul_1.c: Improve error message.
23050 Accept command line argument for # of tests.
23051 * tests/devel/addmul_1.c: Likewise.
23052 * tests/devel/submul_1.c: Likewise.
23053
23054 2001-12-18 Torbjorn Granlund <[email protected]>
23055
23056 * mpn/mips3/mul_1.asm: Add NOPs to save a cycle on R1x000.
23057
23058 2001-12-18 Kevin Ryde <[email protected]>
23059
23060 * gmpxx.h (gmp_randclass): Don't allow copy constructors or "=",
23061 implementation by Gerardo.
23062
23063 * gmp-h.in (operator<<, operator>>): Remove parameter names from
23064 prototypes, to keep out of user namespace.
23065
23066 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Let the test program work as C++.
23067
23068 2001-12-16 Torbjorn Granlund <[email protected]>
23069
23070 * mpn/sparc64/mul_1.asm: Rewrite.
23071 * mpn/sparc64/addmul_1.asm: Rewrite.
23072 * mpn/sparc64/submul_1.asm: Rewrite.
23073
23074 * mpn/sparc64/addmul1h.asm: Remove.
23075 * mpn/sparc64/submul1h.asm: Remove.
23076 * mpn/sparc64/mul1h.asm: Remove.
23077
23078 2001-12-15 Kevin Ryde <[email protected]>
23079
23080 * gmp-h.in (mpn_add, mpn_add_1, mpn_cmp, mpn_sub, mpn_sub_1): Follow
23081 __GMP_INLINE_PROTOTYPES for whether to give prototype with inline.
23082
23083 * configure.in (i686*-*-*, pentiumpro-*-*, pentium[23]-*-*,
23084 athlon-*-*, pentium4-*-*): Fall back on -march=pentium if
23085 -march=pentiumpro or higher is not good (eg. solaris cmov).
23086
23087 2001-12-12 Torbjorn Granlund <[email protected]>
23088
23089 * gmp-impl.h (MPN_ZERO): Rewrite generic version to be similar to
23090 powerpc version.
23091
23092 2001-12-12 Kevin Ryde <[email protected]>
23093
23094 * acinclude.m4 (GMP_PROG_CC_WORKS): Detect cmov problems with gcc
23095 -march=pentiumpro on solaris 2.8.
23096
23097 * tune/common.c, tune/speed.h: Allow for commas in count_leading_zeros
23098 and count_trailing_zeros macros.
23099
23100 * demos/expr/Makefile.am: Distribute exprfr.c and exprfra.c.
23101
23102 * tune/Makefile.am (speed_ext_SOURCES): Should be speed-ext.c.
23103
23104 2001-12-10 Torbjorn Granlund <[email protected]>
23105
23106 * mpn/s390/addmul_1.asm: New file.
23107 * mpn/s390/submul_1.asm: New file.
23108 * mpn/s390/mul_1.asm: New file.
23109 * mpn/s390/gmp-mparam.h: Update.
23110
23111 2001-12-07 Kevin Ryde <[email protected]>
23112
23113 * gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start of
23114 prototypes, for the benefit of Microsoft C.
23115
23116 * gmp.texi (Introduction to GMP): Mention ABI and ISA section.
23117 (Known Build Problems): Recommend GNU sed on solaris 2.6.
23118 (Assigning Integers): Direct feedback to bug-gmp.
23119 (References): Typo Knuth vol 2 is from 1998.
23120
23121 * gmpxx.h (gmp_randclass): Add initializers for gmp_randinit_default
23122 and gmp_randinit_lc_2exp_size.
23123 gmp.texi (C++ Interface Random Numbers): Describe them.
23124
23125 * tests/misc/t-locale.c, tests/cxx/t-locale.cc: Ensure mpf_clear is
23126 done when the localconv override doesn't work. Reported by Mike
23127 Jetzer.
23128
23129 * printf/doprnti.c: Don't showbase on a zero mpq denominator.
23130 * tests/misc/t-printf.c, tests/cxx/t-ostream.c: Add test cases.
23131
23132 2001-12-04 Kevin Ryde <[email protected]>
23133
23134 * gmp.texi (Known Build Problems): Update to gmp_randinit_lc_2exp_size
23135 for the sparc solaris 2.7 problem.
23136 (Reentrancy): SCO ctype.h affects all text-based input functions.
23137 (Formatted Output Strings): Correction to the mpf example.
23138 (Single Limb Division): Correction, should be q-1 not q+1.
23139 (Extended GCD): Clarify why single-limb is inferior.
23140 (Raw Output Internals): Clarify size is twos complement, note limb
23141 order means _mp_d doesn't get directly read or written.
23142 (Contributors): Clarify mpz_jacobi.
23143 And a couple of formatting tweaks elsewhere.
23144
23145 * tests/cxx/t-headers.cc: New file.
23146 * tests/cxx/Makefile.am: Add it.
23147
23148 * gmpxx.h: Add <strstream>, needed by mpf_class::get_str2.
23149
23150 * gmp-h.in (mpq_inp_str, mpn_hamdist): Add __GMP_DECLSPEC.
23151
23152 2001-12-01 Torbjorn Granlund <[email protected]>
23153
23154 * Version 4.0 released.
23155
23156 * mpfr/README: Replace contents with explanation of why mpfr is gone.
23157
23158 2001-12-01 Kevin Ryde <[email protected]>
23159
23160 * Makefile.am, configure.in: Temporarily remove mpfr, just leave a
23161 README.
23162
23163 * mpn/Makefile.am (EXTRA_DIST): Add Makeasm.am.
23164
23165 2001-11-30 Gerardo Ballabio <[email protected]>
23166
23167 * tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: New files.
23168 * tests/cxx/Makefile.am (check_PROGRAMS): Add them.
23169
23170 2001-11-30 Kevin Ryde <[email protected]>
23171
23172 * mpfr: Update to 2001-11-16. Patch TMP handling of agm.c and sqrt.c,
23173 use plain mpn_sqrtrem in sqrt.c, separate .c files for floor and ceil,
23174 disable an expression style assert in add1.c.
23175
23176 * mpn/s370: Rename to s390.
23177 * configure.in (s3[6-9]0*-*-*): Update.
23178 * mpn/Makefile.am (TARG_DIST): Add s390.
23179
23180 * mpz/fits_s.c, mpf/fits_s.c, mpf/fits_u.c: Remove files, unused since
23181 change to .h style.
23182
23183 2001-11-29 Torbjorn Granlund <[email protected]>
23184
23185 * gmp-h.in: Declare mpz_get_d_2exp and mpf_get_d_2exp.
23186 * Makefile.am: Add mpz/get_d_2exp$U.lo and mpf/get_d_2exp$U.lo.
23187 * mpf/Makefile.am: Add get_d_2exp.c.
23188 * mpz/Makefile.am: Add get_d_2exp.c.
23189
23190 2001-11-29 Kevin Ryde <[email protected]>
23191
23192 * mpn/*/gmp-mparam.h: Update measured thresholds.
23193 * mpn/s370/gmp-mparam.h: New file.
23194
23195 * mpz/millerrabin.c: Mark for internal use only, for now.
23196 * gmp.texi (Number Theoretic Functions): Remove documentation.
23197
23198 2001-11-28 Torbjorn Granlund <[email protected]>
23199
23200 * mpf/get_d_2exp.c: New file.
23201 * mpz/get_d_2exp.c: New file.
23202
23203 * mpz/realloc2.c: Fix typo. Make more similar to mpz_realloc.
23204 * mpz/realloc.c: Use __GMP_REALLOCATE_FUNC_LIMBS.
23205
23206 2001-11-27 Gerardo Ballabio <[email protected]>
23207
23208 * gmpxx.h, mpfrxx.h: Various updates and improvements.
23209
23210 2001-11-27 Kevin Ryde <[email protected]>
23211
23212 * gmp.texi (Useful Macros and Constants): Add gmp_version, add @findex
23213 for mp_bits_per_limb.
23214
23215 * demos/perl/GMP.pm, demos/perl/GMP.xs: Use new style gmp_randinit's.
23216 * demos/perl/test.pl: Update for this, and for mpz_perfect_power_p
23217 handling of 0 and 1.
23218
23219 2001-11-26 Torbjorn Granlund <[email protected]>
23220
23221 * mpz/realloc.c: Clear variable when decreasing allocation to less than
23222 needed. Misc updates.
23223
23224 2001-11-25 Kevin Ryde <[email protected]>
23225
23226 * tests/misc/t-locale.c: Avoid printf in the normal case, since the
23227 replacement localeconv breaks it on SunOS 4.
23228
23229 * gmp.texi (Build Options, Notes for Package Builds): Note libgmpxx
23230 depends on libgmp from same GMP version.
23231
23232 * acinclude.m4, configure.in (GMP_FUNC_SSCANF_WRITABLE_INPUT): New
23233 test.
23234 * scanf/sscanf.c, scanf/vsscanf.c: Use it to ensure sscanf input is
23235 writable, if necessary.
23236
23237 * tests/misc/t-scanf.c: Ensure sscanf arguments are writable, always.
23238 * configure.in (AC_CHECK_DECLS): Remove sscanf, no longer required.
23239
23240 * configure.in (none-*-*): Fix default CFLAGS setups.
23241
23242 * doc/configuration: Misc updates.
23243
23244 2001-11-23 Kevin Ryde <[email protected]>
23245
23246 * mpz/init2.c, mpz/realloc2.c: New files.
23247 * Makefile.am, mpz/Makefile.am: Add them.
23248 * gmp-h.in: Add prototypes.
23249 * gmp.texi (Efficiency): Mention these instead of _mpz_realloc.
23250 (Initializing Integers): Add documentation, reword other parts.
23251
23252 2001-11-22 Torbjorn Granlund <[email protected]>
23253
23254 * mpn/cray/ieee/addmul_1.c: Fix logic for more_carries scalar loop.
23255 * mpn/cray/ieee/submul_1.c: Likewise.
23256
23257 2001-11-20 Kevin Ryde <[email protected]>
23258
23259 * gmp.texi (Known Build Problems): Note an out of memory on DJGPP.
23260 (Function Classes): Update function counts.
23261 Misc tweaks elsewhere.
23262
23263 * configure.in (AC_CHECK_DECLS): Add sscanf.
23264 * tests/misc/t-scanf.c: Use it, for the benefit of SunOS 4.
23265
23266 * tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREE
23267 consistency.
23268
23269 * mpfr/Makefile.am (AR): Explicit AR=@AR@ to override automake
23270 default, necessary for powerpc64 ABI=aix64.
23271
23272 2001-11-18 Torbjorn Granlund <[email protected]>
23273
23274 * mpz/powm.c: Move TMP_MARK to before any TMP_ALLOCs.
23275
23276 2001-11-18 Kevin Ryde <[email protected]>
23277
23278 * configure.in (--enable-fft): Make this the default.
23279 * gmp.texi (Build Options): Update.
23280
23281 * Makefile.am (libmp_la_DEPENDENCIES): Revise mpz objects needed by
23282 new mpz/powm.c.
23283
23284 * gmp.texi (Random State Initialization): Add gmp_randinit_default and
23285 gmp_randinit_lc_2exp_size, mark gmp_randinit as obsolete.
23286 (Random State Seeding): New section, taken from "Random State
23287 Initialization" and "Random Number Functions".
23288
23289 * configure.in (AC_CHECK_DECLS): Add fgetc, fscanf, ungetc.
23290 * scanf/fscanffuns.c: Use these, for the benefit of SunOS 4.
23291
23292 * gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back to
23293 gmp-impl.h now not required for inlined mpf.
23294
23295 * randlc2s.c (gmp_randinit_lc_2exp_size): New file, the size-based LC
23296 selection from rand.c.
23297 * rand.c (gmp_randinit): Use it.
23298 * randdef.c (gmp_randinit_default): New file.
23299 * gmp-impl.h (RANDS): Use it.
23300 (ASSERT_CARRY): New macro.
23301 * gmp-h.in (gmp_randinit_default, gmp_randinit_lc_2exp_size: Add
23302 prototypes.
23303 * Makefile.am (libgmp_la_SOURCES): Add randdef.c and randlc2s.c.
23304
23305 * printf/asprntffuns.c: Include config.h before using its defines.
23306
23307 * gmp-impl.h: Move C++ <string> to top of file to avoid the memset
23308 redefine upsetting configure tests. Remove <iostream> since <iosfwd>
23309 in gmp.h suffices.
23310
23311 2001-11-16 Kevin Ryde <[email protected]>
23312
23313 * gmp.texi (Integer Exponentiation): mpz_powm supports negative
23314 exponents.
23315 (Assigning Floats, I/O of Floats, C++ Formatted Output, C++ Formatted
23316 Input): Decimal point follows locale.
23317 (Formatted Output Strings): %n accepts any type.
23318 (Formatted Input Strings): New section.
23319 (Formatted Input Functions): New section.
23320 (C++ Class Interface): Corrections and clarifications suggested by
23321 Gerardo.
23322
23323 * scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
23324 scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c,
23325 scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files.
23326 * gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent
23327 additions.
23328
23329 * tests/misc: New directory.
23330 * tests/misc/Makefile.am: New file.
23331 * tests/misc/t-locale.c: New file.
23332 * tests/misc/t-printf.c: Moved from tests/printf.
23333 * tests/printf: Remove directory.
23334 * configure.in, tests/Makefile.am: Update.
23335
23336 * tests/cxx/t-locale.cc: New file.
23337 * tests/cxx/Makefile.am: Add it.
23338
23339 * mpf/set_str.c, cxx/ismpf.cc: Use localeconv for the decimal point.
23340
23341 * acinclude.m4 (GMP_ASM_X86_MCOUNT): Update to $lt_prog_compiler_pic
23342 for current libtool, recognise non-PIC style mcount in windows DLLs.
23343
23344 * gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.
23345
23346 * gmp-impl.h (__gmp_rands, __gmp_rands_initialized,
23347 modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test
23348 programs using them from a windows DLL.
23349 * longlong.h (__clz_tab): Ditto.
23350
23351 * mpn/x86/t-zdisp2.pl: New file.
23352
23353 * mpn/x86/pentium4/README: New file.
23354
23355 2001-11-15 Torbjorn Granlund <[email protected]>
23356
23357 * mpz/powm.c (HANDLE_NEGATIVE_EXPONENT): #define to 1.
23358 * tests/mpz/reuse.c (main): Use mpz_invert to avoid undefined mpz_powm
23359 cases.
23360
23361 2001-11-14 Torbjorn Granlund <[email protected]>
23362
23363 * mpz/powm_ui.c: Rewrite along the lines of mpz/powm.c (except still no
23364 redc).
23365 * mpz/powm.c: Adjust for negative b, after exponentiation done. Add
23366 (still disabled) code for handling negative exponents. Misc cleanups.
23367
23368 2001-11-14 Kevin Ryde <[email protected]>
23369
23370 * mpf/out_str.c: Use localeconv for the decimal point.
23371
23372 * tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
23373 available (eg. on mingw).
23374
23375 2001-11-11 Kevin Ryde <[email protected]>
23376
23377 * gmp-h.in: Remove parameter names from prototypes, to keep out of
23378 application namespace.
23379
23380 2001-11-08 Kevin Ryde <[email protected]>
23381
23382 * acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
23383 Solaris 8.
23384
23385 * printf/doprnt.c: Support %n of all types, per glibc.
23386
23387 * gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,
23388 mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c,
23389 mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order
23390 to leave open the possibility of keeping binary compatibility if mpf
23391 becomes mpfr.
23392
23393 * mpn/x86/k7/mmx/lshift.asm, mpn/x86/k7/mmx/rshift.asm: Use Zdisp to
23394 force code size for computed jumps.
23395 * mpn/x86/k6/mod_34lsub1.asm, mpn/x86/k6/k62mmx/copyd.asm: Use Zdisp
23396 to force good code alignment.
23397 * mpn/x86/x86-defs.m4 (Zdisp): More instructions.
23398
23399 * mpn/x86/pentium/sqr_basecase.asm, mpn/x86/k7/mmx/mod_1.asm,
23400 mpn/x86/k7/mmx/popham.asm: Remove some unnecessary "0" address offsets.
23401
23402 * mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
23403
23404 2001-11-07 Torbjorn Granlund <[email protected]>
23405
23406 * mpn/hppa/hppa1_1/udiv_qrnnd.asm: Work around gas bug.
23407
23408 * mpn/asm-defs.m4 (PROLOGUE): Change alignment to 8 (probably a good
23409 idea in general; required for hppa/hppa1_1/udiv_qrnnd.asm).
23410
23411 2001-11-06 Torbjorn Granlund <[email protected]>
23412
23413 * gmp-impl.h (MPN_COPY_INCR): Prepend local variable by `__'.
23414 (MPN_COPY_DECR): Likewise.
23415
23416 2001-11-05 Torbjorn Granlund <[email protected]>
23417
23418 * mpz/powm.c: Call mpn functions, not mpz functions, for computation
23419 mod m. Streamline allocations to use a mixture of stack allocation and
23420 heap allocation. Add currently disabled phi(m) exponent reduction
23421 code. Misc optimizations and cleanups.
23422
23423 2001-11-05 Kevin Ryde <[email protected]>
23424
23425 * mpq/inp_str.c: Remove unused variable "ret".
23426
23427 * mpn/x86/k7/sqr_basecase.asm: Fix a 0(%edi) to use Zdisp, so the
23428 computed jumps hit the right spot on old gas.
23429
23430 * mpq/canonicalize.c: DIVIDE_BY_ZERO if denominator is zero.
23431
23432 * mpn/lisp/gmpasm-mode.el (comment-start-skip): Correction to the way
23433 the first \( \) pair is setup.
23434 (gmpasm-font-lock-keywords): Don't fontify the space before a "#" etc.
23435 Misc tweaks to some comments.
23436
23437 2001-11-03 Torbjorn Granlund <[email protected]>
23438
23439 * tests/refmpn.c (refmpn_overlap_p): Reverse return values.
23440
23441 2001-11-02 Kevin Ryde <[email protected]>
23442
23443 * tune/many.pl: Setup CFLAGS_PIC and ASMFLAGS_PIC, since that's no
23444 longer done by configure.
23445
23446 * mpn/x86/pentium4/mmx/popham.asm: New file.
23447
23448 * mpn/x86/x86-defs.m4 (psadbw): New macro.
23449 * mpn/x86/k7/mmx/popham.asm: Use it.
23450
23451 * tests/refmpn.c (refmpn_overlap_p): New function, independent of
23452 MPN_OVERLAP_P.
23453
23454 2001-10-31 Torbjorn Granlund <[email protected]>
23455
23456 * tests/mpz/t-powm.c: Print proper error message when finding
23457 discrepancy.
23458
23459 2001-10-31 Kevin Ryde <[email protected]>
23460
23461 * mpn/x86/pentium/mod_34lsub1.asm: New file.
23462 * mpn/x86/k7/mod_34lsub1.asm: New file.
23463 * mpn/x86/mod_34lsub1.asm: New file.
23464
23465 2001-10-30 Kevin Ryde <[email protected]>
23466
23467 * tests/printf/t-printf.c (check_misc): Add checks from the glibc docs.
23468 (check_vasprintf, check_vsnprintf): Run these unconditionally.
23469
23470 * gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.
23471 * mpq/cmp.c, mpq/cmp_si.c, mpq/cmp_ui.c, mpq/equal.c: Add ASSERTs for
23472 canonical inputs, where correctness depends on it.
23473
23474 * mpn/lisp/gmpasm-mode.el (comment-start-skip): Add "dnl".
23475
23476 2001-10-27 Torbjorn Granlund <[email protected]>
23477
23478 * demos/pexpr.c: Remove some unused variables.
23479 (main): Allocate more buffer space to accommodate minus sign.
23480
23481 2001-10-27 Kevin Ryde <[email protected]>
23482
23483 * gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.h,
23484 tune/speed.c, tune/common.c, tune/many.pl, tests/devel/try.c: Add
23485 mpn_mod_34lsub1.
23486 * tests/refmpn.c, tests/tests.h (refmpn_mod_34lsub1): New function.
23487
23488 * mpn/generic/mod_34lsub1.c: New file.
23489 * mpn/x86/k6/mod_34lsub1.asm: New file.
23490 * mpn/x86/pentium4/sse2/mod_34lsub1.asm: New file.
23491 * mpn/x86/x86-defs.m4 (Zdisp): Add another instruction.
23492
23493 * gmp-h.in, gmpxx.h: Use <iosfwd> not whole <iostream>.
23494
23495 * gmp.texi (Known Build Problems): Add note on test programs with
23496 Windows DLLs.
23497
23498 2001-10-26 Kevin Ryde <[email protected]>
23499
23500 * tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
23501
23502 * gmp.texi (maybepagebreak): New macro, use it in a few places.
23503 (Notes for Particular Systems): C++ Windows DLLs are not supported.
23504 (Known Build Problems): Note sparc solaris 2.7 gcc 2.95.2 shared
23505 library problems.
23506 (Autoconf): Tweak version numbers shown.
23507 (Integer Roots): mpz_perfect_square_p and mpz_perfect_power_p consider
23508 0 and 1 perfect powers, mpz_perfect_power_p accepts negatives.
23509 (Number Theoretic Functions): Add mpz_millerrabin, combined with a
23510 reworded mpz_probab_prime_p.
23511 (Formatted Output Strings): Misc clarifications.
23512 (Formatted Output Functions): gmp_asprintf, gmp_vasprintf,
23513 gmp_snprintf, gmp_vsnprintf always available.
23514 (C++ Formatted Output): Misc rewordings.
23515 (Formatted Input): New chapter.
23516 (C++ Class Interface): New chapter, by Gerardo and me.
23517 (Language Bindings): Update GMP++ now in GMP.
23518 (C++ Interface Internals): New section, by Gerardo and me.
23519
23520 * printf/repl-vsnprintf.c: New file.
23521 * configure.in, acinclude.m4, Makefile.am, printf/Makefile.am: Use it
23522 if libc vsnprintf missing or bad.
23523 * configure.in (AC_CHECK_FUNCS): Add strnlen.
23524
23525 * printf/snprntffuns.c, printf/vasprintf.c: Use
23526 __gmp_replacement_vsnprintf if libc vsnprintf not available.
23527 * printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
23528 printf/vsnprintf.c: Provide these functions unconditionally.
23529 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Remove warning about omissions
23530 when vsnprintf not available.
23531
23532 2001-10-24 Kevin Ryde <[email protected]>
23533
23534 * configure, aclocal.m4: Regenerate with a libtool patch for a stray
23535 quote in AC_LIBTOOL_PROG_LD_SHLIBS under mingw and cygwin.
23536
23537 * gmp-impl.h (modlimb_invert): More comments.
23538
23539 * printf/doprnt.c, printf/doprnti.c: Use the precision field to print
23540 leading zeros.
23541 * tests/printf/t-printf.c: Test this.
23542 * cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<.
23543
23544 * tune/speed.c, tune/speed.h, tune/common.c: Add mpn_mul_1_inplace.
23545
23546 2001-10-23 Torbjorn Granlund <[email protected]>
23547
23548 * mpz/pprime_p.c (mpz_millerrabin): Remove function and its descendant.
23549
23550 * mpz/millerrabin.c: New file with code from pprime.c.
23551 * mpz/Makefile.am: Compile millerrabin.c.
23552 * Makefile.am (MPZ_OBJECTS): Ditto.
23553 * gmp-h.in: Declare mpz_millerrabin.
23554
23555 2001-10-22 Torbjorn Granlund <[email protected]>
23556
23557 * tests/mpz/t-perfsqr.c: New file.
23558 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
23559
23560 * demos/factorize.c (factor): Check for number to factor == 0.
23561 (main): When invoked without arguments, read from stdin.
23562
23563 * mpz/perfpow.c: Add code to handle negative perfect powers ((-b)^odd).
23564 Treat 0 and 1 as perfect powers.
23565
23566 * mpn/sparc32/v9/sqr_diagonal.asm: Jump past .align.
23567
23568 2001-10-21 Torbjorn Granlund <[email protected]>
23569
23570 * mpn/generic/perfsqr.c (sq_res_0x100): Remove bogus final `,'.
23571 (mpn_perfect_square_p): Suppress superfluous `&1' in sq_res_0x100 test.
23572 (mpn_perfect_square_p, O(n) test): Improve comments. Combine remainder
23573 tests for some small primes. Don't share code for different limb
23574 sizes. Use single `if' with many `||' for better code density.
23575
23576 2001-10-22 Kevin Ryde <[email protected]>
23577
23578 * demos/perl/GMP.xs (mutate_mpz, tmp_mpf_grow): Make these "static".
23579
23580 * mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm
23581 (mpn_popcount_table): Use GSYM_PREFIX.
23582
23583 2001-10-19 Kevin Ryde <[email protected]>
23584
23585 * mpn/x86/*.asm: Add some measured speeds on various x86s.
23586
23587 * tests/mpz/reuse.c, tests/mpf/reuse.c: Disable tests when using a
23588 windows DLL, because certain global variable usages won't compile.
23589
23590 * configure.in (AC_CHECK_FUNCS): Add alarm.
23591 * tests/spinner.c: Conditionalize alarm and SIGALRM availability, for
23592 the benefit of mingw32.
23593
23594 * acinclude.m4 (GMP_ASM_TYPE, GMP_ASM_SIZE): Suppress .type and .size
23595 on COFF.
23596
23597 * acinclude.m4 (GMP_PROG_HOST_CC): New macro.
23598 * configure.in: Use it for windows DLL cross-compiles.
23599 * aclocal.m4, configure: Regenerate with libtool patch to hold HOST_CC
23600 in the generated libtool script.
23601
23602 * aclocal.m4, configure: Regenerate with libtool patch to suppress
23603 warnings when probing command line limit on FreeBSD.
23604
23605 * demos/qcn.c (M_PI): Define if not already provided, helps mingw32.
23606
23607 2001-10-17 Kevin Ryde <[email protected]>
23608
23609 * printf/doprnt.c: Use <stdint.h> for intmax_t.
23610
23611 * longlong.h: Recognise __sparcv8 for gcc on Solaris. Reported by
23612 Mark Mentovai <[email protected]>.
23613
23614 * gmp-impl.h (gmp_allocated_string): No need for inline on member funs.
23615
23616 2001-10-16 Kevin Ryde <[email protected]>
23617
23618 * gmp.texi (Debugging): Add mpatrol.
23619 (Integer Comparisons, Comparing Rationals, Float Comparison): Index
23620 entries for sign tests.
23621 (I/O of Floats): Clarify mpf_out_str exponent is in decimal.
23622 (C++ Formatted Output): mpf_t operator<< exponent now in decimal.
23623 (FFT Multiplication): Use an ascii art sigma.
23624 (Contributors): Add Gerardo Ballabio.
23625
23626 * cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Always give mpf_t
23627 exponent in decimal, irrespective of ios::hex or ios::oct.
23628 * tests/cxx/t-ostream.cc (check_mpf): Update.
23629
23630 * printf/doprnt.c: Support %lln and %hhn.
23631
23632 * mpn/x86/pentium4/sse2/submul_1.asm: Use a psubq to negate the
23633 initial carry (helps the submul_1c case), and improve the comments.
23634
23635 2001-10-11 Kevin Ryde <[email protected]>
23636
23637 * acinclude.m4, configure.in (GMP_IMPL_H_IEEE_FLOATS): New macro.
23638
23639 * ltmain.sh: Send some rm errors to /dev/null, helps during compiles
23640 on Solaris 2.7 and HP-UX 10.
23641
23642 * tal-notreent.c: Renamed from stack-alloc.c.
23643 * Makefile.am, acinclude.m4, gmp-impl.h: Update.
23644
23645 * gmp-h.in: Don't give both prototypes and inlines, except on gcc.
23646
23647 * gmp-h.in, gmp-impl.h: Use #includes to get necessary standard
23648 classes, add std:: to prototypes.
23649 * cxx/*.cc, tests/cxx/t-ostream.cc: Add "use namespace std".
23650 * acinclude.m4 (GMP_PROG_CXX_WORKS): Ditto.
23651
23652 * tests/*/Makefile.in, mpfr/tests/Makefile.in: Regenerate with
23653 automake patch to avoid Ultrix problem with empty $(TESTS).
23654
23655 * */Makefile.in: Regenerate with automake patch to only rm *_.c in
23656 "make clean" when ansi2knr actually in use, helps DOS 8.3.
23657
23658 * Makefile.in: Regenerate with automake patch to fix stamp-h
23659 numbering, avoiding an unnecessary config.status run.
23660
23661 2001-10-09 Torbjorn Granlund <[email protected]>
23662
23663 * mpn/hppa/hppa1_1/udiv_qrnnd.asm: Use L macros for labels.
23664 Quote L reloc operator.
23665
23666 * gmp-impl.h: Declare class string.
23667
23668 * mpn/asm-defs.m4 (INT32, INT64): Quote $1 to prevent further
23669 expansion.
23670
23671 * mpn/alpha/ev6/mul_1.asm: New file.
23672
23673 2001-10-09 Kevin Ryde <[email protected]>
23674
23675 * gmp.texi (Introduction to GMP): Add pentium 4 to optimized CPUs.
23676 (Build Options): Note macos directory.
23677 (Notes for Package Builds): GMP 4 series binary compatible with 3.
23678 (Known Build Problems): Remove $* and ansi2knr note, now fixed, except
23679 possibly under --host=none.
23680 (Formatted Output Strings): Remove -1 prec for all digits.
23681
23682 * mpz/add.c, mpz/sub.c: Don't use mpz path on #include (helps macos).
23683 * mpbsd/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpz.
23684
23685 * printf/doprnt.c, tests/printf/t-printf.c: Remove support for %.*Fe
23686 prec -1 meaning all digits.
23687
23688 * acinclude.m4 (GMP_PROG_AR): Override libtool, use AR_FLAGS="cq".
23689 (GMP_HPC_HPPA_2_0): Print version string to config.log.
23690
23691 * Makefile.am (AUTOMAKE_OPTIONS): Remove check-news (permission notice
23692 in NEWS file is too big).
23693 (dist-hook): Don't distribute numbered or unnumbered emacs backups.
23694
23695 * Makefile.am, cxx/Makefile.am: Updates for Gerardo's stuff.
23696
23697 2001-10-09 Gerardo Ballabio <[email protected]>
23698
23699 * cxx/isfuns.cc: New file.
23700 * gmp-impl.h: Add prototypes.
23701 * cxx/ismpf.cc, cxx/ismpq.cc, cxx/ismpz.cc: New files.
23702 * gmp-h.in: Add prototypes.
23703 * gmpxx.h, mpfrxx.h: New files.
23704
23705 2001-10-08 Kevin Ryde <[email protected]>
23706
23707 * configure.in (with_tags): Establish a default based on --enable-cxx.
23708
23709 * aclocal.m4: Regenerate with libtool patches for sed char range to
23710 help Cray, LTCC quotes and +Z warnings grep to help HP-UX.
23711
23712 * gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,
23713 doprnt_final_t): Use _PROTO.
23714
23715 2001-10-05 Torbjorn Granlund <[email protected]>
23716
23717 * mpn/asm-defs.m4 (INT32, INT64): Use LABEL_SUFFIX.
23718
23719 * mpn/hppa: Convert files to `.asm'.
23720
23721 2001-10-05 Kevin Ryde <[email protected]>
23722
23723 * mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
23724 cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
23725 * mpn/cpp-ccas: New file.
23726 * mpn/Makefile.am (EXTRA_DIST): Add it.
23727
23728 * tune/common.c, tune/speed.h: Change SPEED_ROUTINE_MPN_COPY_CALL uses
23729 to SPEED_ROUTINE_MPN_COPY or new SPEED_ROUTINE_MPN_COPY_BYTES. Avoids
23730 macro expansion problems on Cray.
23731
23732 * configure.in (AC_PROG_CXXCPP): Add this, to make libtool happier.
23733
23734 2001-10-04 Torbjorn Granlund <[email protected]>
23735
23736 * mpz/rrandomb.c (gmp_rrandomb): Change bit_pos to be 0-based (was
23737 1-based); shift 2 (was 1) when making bit mask. These two changes
23738 avoid undefined shift counts.
23739 (gmp_rrandomb): Avoid most calls to _gmp_rand by caching random values.
23740
23741 * mpn/generic/random2.c: Changes for mirroring mpz/rrandomb.c.
23742
23743 2001-10-04 Kevin Ryde <[email protected]>
23744
23745 * gmp.texi (Build Options): Add --enable-cxx.
23746 (Notes for Particular Systems): Mention pentium4 performance and SSE2.
23747 (Known Build Problems): Remove vax jsobgtr note, no longer needed.
23748 (Converting Floats): Tweak mpf_get_str description.
23749 (Low-level Functions): Correction to mpn_gcdext destination space
23750 requirements.
23751 (C++ Formatted Output): New section.
23752 (Language Bindings): Add ALP
23753 (Contributors): Add Paul Zimmermann's square root, update my things.
23754
23755 * acinclude.m4 (GMP_PROG_CC_IS_GNU, GMP_PROG_CXX_WORKS): Send compiler
23756 errors to config.log.
23757
23758 * mpq/Makefile.am (INCLUDES): Remove -DOPERATION_$*, not needed.
23759
23760 * mpn/x86/*.asm: Change references to old README.family to just README.
23761
23762 * mpz/README: Remove file, now adequately covered in the manual.
23763
23764 2001-10-03 Torbjorn Granlund <[email protected]>
23765
23766 * mpn/x86/pentium4/copyi.asm: New file.
23767 * mpn/x86/pentium4/copyd.asm: New file.
23768
23769 * gmp-impl.h: Implement separate MPN_COPY_INCR and MPN_COPY_DECR
23770 macros for CRAY systems.
23771 (CRAY _MPN_COPY): Delete.
23772
23773 2001-10-02 Kevin Ryde <[email protected]>
23774
23775 * tests/mpz/t-popcount.c (check_data): Use "~ (unsigned long) 0" to
23776 avoid compiler warnings on sco.
23777
23778 * mpbsd/Makefile.am: Compile mpz files directly, no copying.
23779 Use mpz/add.c and mpz/sub.c rather than mpz/aors.c.
23780 (INCLUDES): Remove -DOPERATION_$*, no longer needed (by mpz).
23781
23782 * mpz/aors.h: Renamed from mpz/aors.c.
23783 * mpz/add.c, mpz/sub.c: New files, using mpz/aors.h.
23784 * mpz/aors_ui.h: Renamed from mpz/aors_ui.c.
23785 * mpz/add_ui.c, mpz/sub_ui.c: New files, using mpz/aors_ui.h.
23786 * mpz/fits_s.h: Renamed and adapted from mpz/fits_s.c.
23787 * mpz/fits_sshort.c, mpz/fits_sint.c, mpz/fits_slong.c: New files.
23788 * mpz/mul_i.h: Renamed from mpz/mul_siui.c.
23789 * mpz/mul_ui.c, mpz/mul_ui.c: New files, using mpz/mul_i.h.
23790 * mpz/Makefile.am: Consequent updates.
23791 (INCLUDES): Remove -DOPERATION_$*.
23792
23793 * mpf/fits_s.h: Renamed and adapted from mpf/fits_s.c.
23794 * mpf/fits_sshort.c, mpf/fits_sint.c, mpf/fits_slong.c: New files.
23795 * mpf/fits_u.h: Renamed and adapted from mpf/fits_u.c.
23796 * mpf/fits_ushort.c, mpf/fits_uint.c, mpf/fits_ulong.c: New files.
23797 * mpf/Makefile.am: Consequent updates.
23798 (INCLUDES): Remove -DOPERATION_$*.
23799
23800 * cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Don't use ios::hex etc
23801 as cases in a switch, they're not constant in g++ 3.0.
23802
23803 * mpn/Makeasm.am (.s.o, .s.obj, .S.o, .S.obj, .asm.o, .asm.obj):
23804 Locate source file with test -f the same as automake.
23805 (.S): Let CCAS do the preprocessing, and run libtool for .S.lo.
23806 (.asm.lo): Run libtool via m4-ccas to get new style foo.lo right.
23807 (COMPILE_FLAGS): Add $(DEFAULT_INCLUDES), per new automake.
23808 * mpn/m4-ccas: New file.
23809 * mpn/Makefile.am (EXTRA_DIST): Add it.
23810 * mpn/asm-defs.m4: Add m4_not_for_expansion(`DLL_EXPORT').
23811 * mpn/x86/x86-defs.m4: Undefine PIC if DLL_EXPORT is set.
23812 * configure.in (CFLAGS_PIC, ASMFLAGS_PIC): Remove, no longer needed.
23813
23814 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Warn what's omitted when
23815 vsnprintf not available.
23816
23817 * mpn/underscore.h: Remove file, not used since m68k converted to asm.
23818 * mpn/Makefile.am (EXTRA_DIST): Remove it.
23819
23820 * tests/refmpz.c: Add <stdlib.h>, for free().
23821
23822 2001-10-01 Torbjorn Granlund <[email protected]>
23823
23824 * mpn/x86/pentium4/sse2/submul_1.asm: Apply some algebraic
23825 simplifications.
23826 * mpn/x86/pentium4/sse2/addmul_1.asm: Comment.
23827
23828 2001-10-01 Kevin Ryde <[email protected]>
23829
23830 * configure.in (--enable-cxx): New option for C++ support.
23831 Add cxx and tests/cxx subdirectories.
23832 * ltmain.sh, aclocal.m4: Update to libtool 2001-09-30.
23833
23834 * cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,
23835 cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files.
23836 * Makefile.am: Add them, in new libgmpxx.
23837 * gmp-h.in, gmp-impl.h: Prototypes and support.
23838 * tests/cxx/Makefile.am, tests/cxx/Makefile.in,
23839 tests/cxx/t-ostream.cc: New files.
23840
23841 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL,
23842 SPEED_ROUTINE_MPN_GCDEXT_ONE): mpn_gcdext needs size+1 for
23843 destinations. Found by Torbjorn.
23844
23845 * gmp-h.in (__GNU_MP__, __GNU_MP_VERSION): Bump to 4.0.
23846 * mp-h.in (__GNU_MP__): Ditto.
23847 * gmp.texi, Makefile.am, compat.c: Amend version 3.2 to 4.0.
23848
23849 * acinclude.m4 (GMP_PROG_CXX_WORKS): New macro.
23850 (GMP_PROG_CC_WORKS): Write "conftest" test program, not a.out.
23851
23852 * gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.
23853 (GMP_ASPRINTF_T_INIT): New macro.
23854 (GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED().
23855 * printf/vasprintf.c: Use these.
23856
23857 * printf/asprntffuns.c: New file.
23858 * printf/Makefile.am, Makefile.am: Add it.
23859 * printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h
23860 (__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final):
23861 Move to asprntffuns.c, rename to __gmp and make global, remove
23862 spurious formal parameters from __gmp_asprintf_final.
23863
23864 * configure.in (j90-*-*, sv1-*-*): Don't duplicate $path in $add_path.
23865 (*-*-mingw*): Don't assemble with -DPIC (as per cygwin).
23866
23867 * printf/snprntffuns.c (gmp_snprintf_final): Remove spurious formal
23868 parameters.
23869
23870 * tune/tuneup.c (POWM_THRESHOLD): Reduce stop_factor to 1.1 to help
23871 Cray vector systems.
23872
23873 * tests/misc.c (tests_rand_start): Print GMP_CHECK_RANDOMIZE=NN to
23874 facilitate cut and paste when re-running.
23875 * tests/mpz/t-inp_str.c (check_data): Add more diagnostic prints.
23876
23877 2001-09-30 Kent Boortz <[email protected]>
23878
23879 * macos/configure, macos/Makefile.in, macos/README: Updates for gmp 4.
23880 * gmp-h.in (_GMP_H_HAVE_FILE): Recognise Apple MPW.
23881
23882 2001-09-30 Torbjorn Granlund <[email protected]>
23883
23884 * mpn/cray/ieee/submul_1.c: Rewrite. Streamline multiplications;
23885 use `majority' logic.
23886
23887 2001-09-27 Torbjorn Granlund <[email protected]>
23888
23889 * gmp-h.in (__GMPN_AORS_1): Rewrite to work around Cray compiler bug.
23890
23891 2001-09-26 Torbjorn Granlund <[email protected]>
23892
23893 * mpn/x86/pentium4/sse2/gmp-mparam.h: New file.
23894
23895 2001-09-26 Kevin Ryde <[email protected]>
23896
23897 * mpn/x86/pentium4/sse2/dive_1.asm: New file.
23898 * mpn/x86/pentium4/sse2/submul_1.asm: New file.
23899 * mpn/x86/pentium4/sse2/sqr_basecase.asm: New file.
23900
23901 * mpn/x86/pentium/copyi.asm: New file, based on past work by Torbjorn.
23902 * mpn/x86/pentium/copyi.asm: New file, ditto.
23903 * mpn/x86/pentium/com_n.asm: Rewrite, ditto.
23904
23905 * printf/snprntffuns.c (gmp_snprintf_format): Copy va_list in case
23906 vsnprintf trashes it.
23907 * printf/vasprintf.c (gmp_asprintf_format): Ditto.
23908 * gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.
23909
23910 * tests/mpz/t-cmp_d.c (check_low_z_one): Patch by Torbjorn for vax
23911 limited float range.
23912
23913 2001-09-23 Torbjorn Granlund <[email protected]>
23914
23915 * mpn/vax/lshift.s: Change `jsob*' to `sob*'.
23916 * mpn/vax/rshift.s: Likewise.
23917
23918 2001-09-23 Kevin Ryde <[email protected]>
23919
23920 * mpn/x86/pentium4/sse2/mul_basecase.asm: Some simple but real code.
23921
23922 * printf/doprnt.c: Use va_copy for va_list variables, copy function
23923 parameter in case it's call-by-reference.
23924
23925 * tune/freq.c (speed_cpu_frequency_bsd_dmesg): New function.
23926 (speed_cpu_frequency_table): Use it.
23927
23928 * tune/many.pl (popcount, hamdist): Fix declared return value.
23929 (sb_divrem_mn): Remove a spurious duplicate entry.
23930 (CLEAN): Add tmp-$objbase.c when using that for .h files.
23931 (macro_speed): Give a default for .h files.
23932 Add ATTRIBUTE_CONST or __GMP_ATTRIBUTE_PURE as appropriate.
23933
23934 * tune/speed.h (SPEED_ROUTINE_MPN_MOD_CALL,
23935 SPEED_ROUTINE_MPN_PREINV_MOD_1, SPEED_ROUTINE_MPN_POPCOUNT,
23936 SPEED_ROUTINE_MPN_HAMDIST, SPEED_ROUTINE_MPN_GCD_1N,
23937 SPEED_ROUTINE_MPN_GCD_1_CALL, SPEED_ROUTINE_MPZ_JACOBI): Use return
23938 values so gcc 3 won't discard calls to pure or const functions.
23939 (mpn_mod_1_div, mpn_mod_1_inv): Add __GMP_ATTRIBUTE_PURE.
23940
23941 2001-09-22 Torbjorn Granlund <[email protected]>
23942
23943 * mpn/x86/pentium4/sse2/mul_basecase.asm: New file, placeholder
23944 for real code, hiding the default x86 mul_basecase.asm.
23945
23946 2001-09-22 Kevin Ryde <[email protected]>
23947
23948 * configure.in (AC_PREREQ): Bump to 2.52.
23949 (m4_pattern_forbid, m4_pattern_allow): New calls, forbid GMP_.
23950 (AC_CHECK_HEADERS): Remove sys/types.h, already done by autoconf.
23951 * acinclude.m4, configure.in (GMP_GCC_NO_CPP_PRECOMP): New macro.
23952
23953 * tests/devel/try.c (TYPE_PREINV_MOD_1): Don't run size==0.
23954 (malloc_region): Need fd=-1 for mmap MAP_ANON on BSD.
23955
23956 2001-09-20 Torbjorn Granlund <[email protected]>
23957
23958 * mpz/cong.c (mpz_congruent_p): Fix one-limb c<d test.
23959
23960 * longlong.h: Rewrite __i370__ smul_ppmm; enable also for __s390__.
23961
23962 * configure.in: Add support for IBM 360, 370, 390 families.
23963
23964 2001-09-20 Kevin Ryde <[email protected]>
23965
23966 * mpn/x86/pentium4/sse2/diveby3.asm: New file.
23967 * mpn/x86/pentium4/sse2/mode1o.asm: New file.
23968
23969 2001-09-16 Kevin Ryde <[email protected]>
23970
23971 * printf/doprnt.c: '#' means showpoint and showtrailing for %e, %f, %g.
23972 * tests/printf/t-printf.c (check_f): More test cases.
23973
23974 2001-09-15 Torbjorn Granlund <[email protected]>
23975
23976 * gmp-h.in (__GMPN_AORS_1): Remove param TEST, add OP and CB.
23977 Postpone zeroing of (cout).
23978 (__GMPN_ADD_1, __GMPN_SUB_1): Corresponding changes.
23979
23980 2001-09-14 Kevin Ryde <[email protected]>
23981
23982 * ChangeLog: Merge in tests/rand/ChangeLog.
23983 * tests/rand/ChangeLog: Remove file.
23984
23985 * printf/doprnt.c: Fix handling of a plain format after a GMP one; no
23986 need to protect against negative precision internally.
23987 * tests/printf/t-printf.c (check_misc): More checks.
23988
23989 2001-09-12 Torbjorn Granlund <[email protected]>
23990
23991 * mpn/cray/ieee/invert_limb.c: Add a PROLOGUE in a comment to have
23992 HAVE_NATIVE_... defined.
23993
23994 2001-09-11 Kevin Ryde <[email protected]>
23995
23996 * configure.in, gmp-h.in (__GMP_HAVE_HOST_CPU_FAMILY_power,
23997 __GMP_HAVE_HOST_CPU_FAMILY_powerpc): New AC_SUBSTs.
23998 * gmp-h.in (__GMPN_COPY_INCR): Use them to select the power/powerpc
23999 code, rather than preprocessor defines.
24000
24001 * acinclude.m4, configure.in (GMP_H_ANSI): New macro.
24002
24003 * gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
24004
24005 * gmp-h.in, version.c (gmp_version): Make the pointer "const" as well
24006 as the string.
24007
24008 * acinclude.m4, configure.in (GMP_PROG_CC_IS_XLC): Recognise xlc when
24009 invoked under another name (cc, xlc128, etc).
24010 * acinclude.m4 (GMP_PROG_CC_IS_GCC): Print a message when recognised.
24011
24012 2001-09-11 Torbjorn Granlund <[email protected]>
24013
24014 * gmp-h.in: Let __DECC mean __GMP_HAVE_CONST, etc.
24015 * mp-h.in: Likewise.
24016
24017 2001-09-10 Torbjorn Granlund <[email protected]>
24018
24019 * mpn/x86/pentium4/mmx/lshift.asm: New file.
24020 * mpn/x86/pentium4/mmx/rshift.asm: New file.
24021
24022 * tests/mpn/t-iord_u.c (check_incr_data): Work around HP compiler bug.
24023 (check_decr_data): Likewise.
24024
24025 2001-09-08 Kevin Ryde <[email protected]>
24026
24027 * gmp.texi (Integer Logic and Bit Fiddling): Update mpz_hamdist
24028 behaviour, clarify mpz_popcount a touch.
24029 (Language Bindings): Add mlton, fix alphabetical order.
24030 (Single Limb Division): Describe 2 or 1/2 limbs at a time style.
24031
24032 * configure.in (AC_CHECK_FUNCS): Add mmap.
24033 * tests/devel/try.c (malloc_region): Use mmap if available.
24034
24035 * tests/refmpz.c, tests/tests.h (refmpz_hamdist): New function.
24036 * tests/mpz/t-hamdist.c: New file.
24037 * tests/mpz/Makefile.am: Add it.
24038
24039 * mpz/hamdist.c: Support neg/neg operands.
24040
24041 * macos/Makefile.in: Remove dual compile of mpq/aors.c and
24042 mpn/generic/popham.c.
24043
24044 * gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.
24045 For 64-bits reuse 0x33...33 constant.
24046 * mpn/generic/popcount.c, mpn/generic/hamdist.c: Split from popham.c,
24047 use popc_limb macro, remove unused "i", don't bother with "register"
24048 qualifiers.
24049 * mpn/generic/popham.c: Remove file.
24050
24051 * ltmain.sh, configure, aclocal.m4: Update to libtool 1.4.1, with one
24052 ltdll.c generation patch.
24053 * doc/configuration: Misc updates, note libtool patch used.
24054
24055 * mpn/x86/pentium4/sse2/mul_1.asm: Use pointer increments not indexed
24056 addressing, to get 4.0 c/l flat.
24057
24058 * tests/mpq/t-cmp_si.c (check_data): Use ULONG_MAX for denominators.
24059
24060 * tests/misc.c (mpz_negrandom): Use given rstate, not RANDS.
24061
24062 2001-09-07 Torbjorn Granlund <[email protected]>
24063
24064 * mpn/x86/pentium4/sse2/addmul_1.asm: New file.
24065
24066 2001-09-04 Kevin Ryde <[email protected]>
24067
24068 * tune/freq.c: Define a HAVE for each speed_cpu_frequency routine to
24069 avoid duplicating conditionals.
24070 (speed_cpu_frequency_sco_etchw): New function.
24071 (speed_cpu_frequency_table): Use it.
24072 * tune/README: Mention SCO openunix 8 /etc/hw.
24073
24074 * mpz/fib_ui.c: Use ?: to avoid a gcc 3 bug on powerpc64.
24075 Store back a carry for limb<long.
24076
24077 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/k7/mmx/mod_1.asm,
24078 mpn/x86/p6/mmx/divrem_1.asm: Fix a couple of comments.
24079
24080 * config.guess: Give m68020 for 68020 or better, not m68k.
24081 * configfsf.guess: Update to 2001-09-04.
24082
24083 2001-09-02 Kevin Ryde <[email protected]>
24084
24085 * configure.in (m68k-*-*): Let m68k mean 68000, not 68020.
24086 * gmp.texi (Notes for Particular Systems): Update.
24087
24088 * gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since int
24089 might be only 16 bits.
24090
24091 * tests/mpq/t-aors.c: New file.
24092 * tests/mpq/Makefile.am: Add it.
24093
24094 * tests/refmpq.c: New file.
24095 * tests/Makefile.am: Add it.
24096 * tests/tests.h: Add prototypes.
24097
24098 * mpq/aors.c: Share object code for mpq_add and mpq_sub.
24099 * Makefile.am, mpq/Makefile.am: Single mpq/aors.lo now.
24100
24101 * tests/devel/try.c (TYPE_SUBMUL_1): Use correct reference routine.
24102
24103 2001-08-30 Kevin Ryde <[email protected]>
24104
24105 * mpn/x86/x86-defs.m4 (cmov_available_p): Add pentium4.
24106
24107 * gmp-h.in: Put #define renamings with prototypes.
24108 Remove commented out #defines of gmp-impl.h things.
24109 (mpn_invert_limb): Remove #define, already in gmp-impl.h.
24110 (mpn_lshiftc, mpn_rshiftc): Remove #defines, unused.
24111 (mpn_addsub_nc): Add prototype to #define.
24112
24113 2001-08-28 Kevin Ryde <[email protected]>
24114
24115 * gmp.texi: Switch to GFDL.
24116 (Top): Arrange copyright and conditions to appear here too. For
24117 clarity have all this before the miscellaneous macro definitions.
24118 (Copying): Refer to COPYING.LIB file, mention plain GPL2 in demo
24119 programs.
24120 (Contributors, References): Use @appendix rather than @unnumbered.
24121 (GNU Free Documentation License): New appendix.
24122 (@contents): Move to start of document, use only for tex (not html).
24123 (Debugging): Add leakbug.
24124 (Build Options): Add pentium4.
24125 (I/O of Rationals): Add mpq_inp_str.
24126
24127 * fdl.texi: New file, with two @appendix directive tweaks.
24128 * Makefile.am (gmp_TEXINFOS): Add it.
24129
24130 * tests/mpz/io.c: Check mpz_inp_str return against ftell, send error
24131 messages just to stdout.
24132
24133 * mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function,
24134 and share a __gmp_free_func call.
24135 * mpq/inp_str.c: New file.
24136 * Makefile.am, mpq/Makefile.am: Add it.
24137 * tests/mpq/t-inp_str.c: New file.
24138 * tests/mpq/Makefile.am (check_PROGRAMS): Add it.
24139
24140 * configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,
24141 HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs
24142 for processor families.
24143 * gmp-impl.h: Use them, rather than cpp defines.
24144
24145 * demos/Makefile.am (primes_LDADD): Use $(LIBM), for log().
24146
24147 * tune/many.pl, tune/Makefile.am: Fix some from clean and distclean.
24148
24149 2001-08-26 Kevin Ryde <[email protected]>
24150
24151 * tests/devel/try.c (ARRAY_ITERATION): Make types match on "?:" legs.
24152 (TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER): Remove some superseded code.
24153
24154 * tests/printf/t-printf.c (check_plain): Don't compare "all digits"
24155 precision against plain printf.
24156
24157 * tune/Makefile.am: Eliminate empty TUNE_MPZ_SRCS.
24158
24159 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.52.
24160 * */Makefile.in, mdate-sh, missing, aclocal.m4, configure: Update to
24161 automake 1.5.
24162 * configfsf.guess, configfsf.sub: Update to 2001-08-23.
24163
24164 2001-08-24 Torbjorn Granlund <[email protected]>
24165
24166 * demos/primes.c: Complete rewrite.
24167
24168 2001-08-24 Kevin Ryde <[email protected]>
24169
24170 * longlong.h: Test __ppc__ for apple darwin cc, reported by Jon
24171 Becker. Also test __POWERPC__, PPC and __vxworks__.
24172
24173 * tune/speed.h (speed_cyclecounter) [x86]: Don't clobber ebx in PIC.
24174
24175 2001-08-22 Kevin Ryde <[email protected]>
24176
24177 * configure.in (x86 mmx): Correction to mmx path stripping.
24178
24179 2001-08-17 Kevin Ryde <[email protected]>
24180
24181 * configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,
24182 tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++
24183 support, for the time being.
24184 * printf/doprntfx.cc, doprntix.cc, osfuns.cc, osmpf.cc, osmpq.cc,
24185 osmpz.cc, tests/printf/t-ostream.cc: Remove files.
24186
24187 * printf/doprnt.c, printf/doprntf.c, gmp-impl.h: Use a single
24188 __gmp_doprnt_mpf, rather than a separate ndigits calculation.
24189 * printf/doprnt.c, printf/doprntf.c, gmp-impl.h, gmp.texi,
24190 tests/printf/t-printf.c: Let empty or -1 prec mean all digits for mpf.
24191 * printf/doprnt.c, tests/printf/t-printf.c: Accept h or l in %n; let
24192 negative "*" style width mean left justify.
24193
24194 * gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro,
24195 extracted from mpf/get_str.c.
24196
24197 * libmp.sym: New file.
24198 * Makefile.am (libmp_la_LDFLAGS): Use it.
24199 (DISTCLEANFILES): Remove asm-syntax.h, no longer generated.
24200 Remove some comments about "make check".
24201
24202 * demos/perl/GMP.pm, GMP.xs, GMP/Mpf.pm: Add printf and sprintf,
24203 change get_str to string/exponent for floats, remove separate
24204 mpf_get_str.
24205 * demos/perl/GMP/Mpf.pm (overload_string): Use $# (default "%.g").
24206 * demos/perl/typemap: Fix some duplicate string entries.
24207 * demos/perl/test.pl: Update tests, split overloaded constants into ...
24208 * demos/perl/test2.pl: ... this new file.
24209 * demos/perl/Makefile.PL (clean): Add test.tmp.
24210
24211 2001-08-16 Kevin Ryde <[email protected]>
24212
24213 * printf/snprntffuns.c (gmp_snprintf_format): Correction to bufsize-1
24214 return value handling.
24215
24216 * demos/calc/calc.y: Reposition "%{" so copyright notice gets into
24217 generated files.
24218
24219 * INSTALL: Use gmp_printf.
24220
24221 2001-08-14 Kevin Ryde <[email protected]>
24222
24223 * mpz/inp_str.c: Fix return value (was 1 too big).
24224 * tests/mpz/t-inp_str.c: New file.
24225 * tests/mpz/Makefile.am: Add it.
24226
24227 * mpn/x86/pentium4/sse2/add_n.asm: New file.
24228 * mpn/x86/pentium4/sse2/sub_n.asm: New file.
24229 * mpn/x86/pentium4/sse2/mul_1.asm: New file.
24230
24231 2001-08-12 Kevin Ryde <[email protected]>
24232
24233 * printf/sprintffuns.c, printf/doprntf.c: Don't use sprintf return
24234 value (it's a pointer on SunOS 4).
24235
24236 * acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
24237 * configure.in: Add pentium4 support.
24238 * mpn/x86/pentium4, mpn/x86/pentium4/mmx, mpn/x86/pentium4/sse2: New
24239 directories.
24240 * mpn/x86/README: Update.
24241
24242 2001-08-10 Torbjorn Granlund <[email protected]>
24243
24244 * demos/pexpr.c (setup_error_handler): Catch also SIGABRT.
24245
24246 2001-07-31 Kevin Ryde <[email protected]>
24247
24248 * tests/refmpn.c (refmpn_mul_1c): Allow low to high overlaps.
24249
24250 * gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.
24251
24252 * tune/Makefile.am (EXTRA_DIST): Add many.pl.
24253
24254 2001-07-28 Kevin Ryde <[email protected]>
24255
24256 * gmp.texi (Random Number Functions): Old rand functions no longer use
24257 the C library.
24258
24259 * configure.in, acinclude.m4 (GMP_FUNC_VSNPRINTF): New macro.
24260
24261 * mpn/generic/get_str.c: Add an ASSERT for high limb non-zero.
24262
24263 2001-07-24 Kevin Ryde <[email protected]>
24264
24265 * gmp.texi (Build Options): Add --enable-cxx.
24266 (Converting Floats): Note mpf_get_str only generates accurately
24267 representable digits.
24268 (Low-level Functions): Note mpn_get_str requires non-zero high limb.
24269 (Formatted Output): New chapter.
24270 (Multiplication Algorithms): Use @quotation with @multitable.
24271 (Toom-Cook 3-Way Multiplication): Ditto.
24272
24273 * tests/memory.c (tests_free_nosize): New function.
24274 * tests/tests.h (tests_allocate etc): Add prototypes.
24275
24276 * tests/printf: New directory.
24277 * tests/printf/Makefile.am, t-printf.c, t-ostream.cc: New files.
24278 * configure.in, tests/Makefile.am: Add them.
24279
24280 * configure.in, acinclude.m4 (GMP_PROG_CXX): New macro.
24281 * configure.in (--enable-cxx): New option.
24282 (AC_CHECK_HEADERS): Add locale.h and sys/types.h, remove unistd.h.
24283 (AC_CHECK_TYPES): Add intmax_t, long double, long long, ptrdiff_t,
24284 quad_t.
24285 (AC_CHECK_FUNCS): Add localeconv, memset, obstack_vprintf, snprintf,
24286 strchr, vsnprintf.
24287 (AC_CHECK_DECLS): Add vfprintf.
24288
24289 * gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.
24290
24291 * printf: New directory.
24292 * printf/Makefile.am, asprintf.c, doprnt.c, doprntf.c, doprntfx.cc,
24293 doprnti.c, doprntix.cc, fprintf.c, obprintf.c, obprntffuns.c,
24294 obvprintf.c, osfuns.cc, osmpf.cc, osmpq.cc, osmpz.cc, printf.c,
24295 printffuns.c, snprintf.c, snprntffuns.c, sprintf.c, sprintffuns.c,
24296 vasprintf.c, vfprintf.c, vprintf.c, vsnprintf.c, vsprintf.c: New
24297 files.
24298 * configure.in, Makefile.am: Add them.
24299
24300 * configure.in (HAVE_INLINE): Remove AC_DEFINE, unused.
24301 (AC_CHECK_TYPES): Don't test for void, assume it always exists.
24302
24303 * gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
24304 * mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
24305
24306 * gmp-impl.h (mpn_fib2_ui): Use __MPN.
24307 (MPN_COPY_DECR): Fix an ASSERT.
24308 (CAST_TO_VOID): Remove macro.
24309
24310 * gmp-h.in (mpq_out_str): Give #define even without prototype.
24311 (mpz_cmp_d, mpz_cmpabs_d): Corrections to #defines.
24312
24313 * tests/devel/try.c: Add mpn_add and mpn_sub, don't use CAST_TO_VOID.
24314
24315 2001-07-23 Torbjorn Granlund <[email protected]>
24316
24317 * config.guess: Recognize pentium4.
24318 * config.sub: Recognize pentium4.
24319
24320 2001-07-17 Kevin Ryde <[email protected]>
24321
24322 * gmp-h.in (__GMPN_AORS_1): Remove x86 and gcc versions, leave just
24323 one version.
24324 (__GMPN_ADD, __GMPN_SUB): New macros, rewrite of mpn_add and mpn_sub.
24325 (mpn_add, mpn_sub): Use them.
24326 (__GMPN_COPY_REST): New macro.
24327
24328 * gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L and
24329 __GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of
24330 LSYM_PREFIX.
24331
24332 2001-07-11 Kevin Ryde <[email protected]>
24333
24334 * gmp-h.in (__GMPN_ADD_1 etc) [x86]: Don't use this on egcs 2.91.
24335
24336 * mpz/fits_uint.c, fits_ulong.c, mpz/fits_ushort.c: Split up fits_u.c.
24337 * mpz/fits_u.c: Remove file.
24338 * mpz/Makefile.am, macos/Makefile.in: Update.
24339
24340 * tests/refmpn.c,tests.h (refmpn_copy): New function.
24341 * tests/devel/try.c (TYPE_ZERO): No return value from call.
24342 (TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD): Share call with
24343 TYPE_MOD_1 and TYPE_MOD_1C.
24344 (MPN_COPY, __GMPN_COPY, __GMPN_COPY_INCR): Add testing.
24345
24346 2001-07-10 Kevin Ryde <[email protected]>
24347
24348 * gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.
24349 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
24350 * mpn/powerpc64/copyi.asm, mpn/powerpc64/copyd.asm: Remove files.
24351
24352 * mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on
24353 i386 gcc 2.95.x), remove a bogus comment about quotient.
24354
24355 * errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,
24356 __gmp_sqrt_of_negative): New functions.
24357 * gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them.
24358
24359 * randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.
24360
24361 2001-07-07 Kevin Ryde <[email protected]>
24362
24363 * configure.in (powerpc*-*-*): Use -no-cpp-precomp for Darwin.
24364
24365 * tests/mpbsd/t-itom.c: Renamed from t-misc.c.
24366 * tests/mpbsd/t-misc.c: Remove file.
24367 * tests/mpbsd/Makefile.am: Update.
24368
24369 * tests/mpf/t-set_si.c,t-cmp_si.c,t-gsprec.c: Split from t-misc.c.
24370 * tests/mpf/t-misc.c: Remove file.
24371 * tests/mpf/Makefile.am: Update.
24372
24373 * tests/mpz/t-oddeven.c,t-set_si.c,t-cmp_si.c: Split from t-misc.c.
24374 * tests/mpz/t-misc.c: Remove file.
24375 * tests/mpz/Makefile.am: Update.
24376
24377 * stack-alloc.c: Add some alignment ASSERTs.
24378
24379 * gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
24380
24381 * tests/devel/try.c (MPN_ZERO): Add testing.
24382 * tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
24383
24384 * mpn/x86/divrem_1.asm: Update a remark about gcc and "loop".
24385
24386 * tests/mpq/t-cmp_si.c: New file.
24387 * tests/mpq/Makefile.am: Add it.
24388
24389 * tests/misc.c,tests.h (mpq_set_str_or_abort): New function.
24390
24391 * mpq/cmp_si.c: New file.
24392 * Makefile.am, mpq/Makefile.am: Add it.
24393 * gmp-h.in (mpq_cmp_si): Add prototype.
24394 * gmp.texi (Comparing Rationals): Add doco.
24395
24396 * gmp-h.in (_GMP_H_HAVE_FILE): Add _FILE_DEFINED for microsoft, add
24397 notes on what symbols are for what systems.
24398
24399 2001-07-06 Torbjorn Granlund <[email protected]>
24400
24401 * longlong.h (ibm032 umul_ppmm): Fix typo.
24402 * longlong.h (sparclite sdiv_qrnnd): Fix typo.
24403
24404 2001-07-03 Kevin Ryde <[email protected]>
24405
24406 * mpz/bin_ui.c (DIVIDE): Use MPN_DIVREM_OR_DIVEXACT_1.
24407 * mpz/bin_uiui.c (MULDIV): Ditto, and use local variables for size and
24408 pointer.
24409
24410 * acinclude.m4 (GMP_INCLUDE_GMP_H): New macro, use it everywhere gmp.h
24411 is wanted at configure time.
24412 * acinclude.m4, configure.in (GMP_H_EXTERN_INLINE, GMP_H_HAVE_FILE):
24413 New macros.
24414
24415 * gmp-h.in (__GMP_EXTERN_INLINE): Set to "inline" for C++.
24416 (mpn_add, mpn_sub): Use new style __GMP_EXTERN_INLINE.
24417 * gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.
24418 * mpn/generic/add.c, mpn/generic/sub.c: New files.
24419 * mpn/generic/inlines.c: Remove file.
24420 * configure.in, mpn/Makefile.am: Update.
24421
24422 * gmp.texi (GMP Basics): Note the need for stdio.h to get FILE
24423 prototypes.
24424
24425 2001-07-01 Kevin Ryde <[email protected]>
24426
24427 * gmp.texi (Build Options, Reentrancy): Updates for new
24428 --enable-alloca behaviour.
24429 (Debugging): Describe --enable-alloca=debug.
24430 (Miscellaneous Integer Functions): Note mpz_sizeinbase ignores signs.
24431 (Low-level Functions): Give a formula for mpn_gcdext cofactor.
24432 (Factorial Algorithm): New section.
24433 (Binomial Coefficients Algorithm): New section.
24434 Misc tweaks elsewhere.
24435
24436 * mpf/set_prc.c: Merge the two truncation conditionals, misc cleanups,
24437 no functional changes.
24438
24439 * mpn/*/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Add tuned values.
24440 * gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
24441 2*UMUL_TIME < UDIV_TIME.
24442
24443 * mpn/x86/p6/dive_1.asm: New file.
24444
24445 * mpn/x86/dive_1.asm: New file.
24446 * mpn/x86/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Use it always.
24447
24448 * tests/refmpn.c, tests.h (refmpn_zero): New function.
24449 * tests/devel/try.c: Use it.
24450
24451 * tests/refmpn.c (refmpn_sb_divrem_mn): Use refmpn_cmp, not mpn_cmp.
24452
24453 * tests/mpf/t-get_d.c (main): Use || not |.
24454
24455 * tests/misc.c, tests/t-modlinv.c, tests/mpq/t-get_str.c,
24456 tests/mpf/reuse.c: Add string.h.
24457
24458 2001-06-29 Kevin Ryde <[email protected]>
24459
24460 * tune/speed.h (SPEED_ROUTINE_MPN_FIB2_UI,
24461 SPEED_ROUTINE_COUNT_ZEROS_C): Corrections to TMP block handling.
24462
24463 * gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):
24464 Corrections to these to account for adding tD into E.
24465 (MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size
24466 assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them.
24467 (MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
24468
24469 * assert.c: Add stdlib.h for abort prototype.
24470 * tests/spinner.c, trace.c, t-constants.c, t-count_zeros.c,
24471 t-gmpmax.c, t-modlinv.c: Ditto.
24472 * tests/mpz/t-bin.c, t-cmp.c, t-get_si.c, t-misc.c, t-popcount.c,
24473 t-set_str.c, t-sizeinbase.c: Ditto.
24474 * tests/mpq/t-equal.c, t-get_str.c, t-set_f.c, t-set_str.c: Ditto.
24475 * tests/mpf/t-fits.c, t-get_d.c, t-get_si.c, t-int_p.c, t-misc.c,
24476 t-trunc.c: Ditto.
24477 * tests/mpbsd/allfuns.c, t-misc.c: Ditto.
24478
24479 * mpn/generic/mul_n.c, mpz/cfdiv_r_2exp.c: Use MPN_INCR_U rather than
24480 mpn_incr_u.
24481
24482 * tests/devel/try.c (TYPE_SB_DIVREM_MN): More fixes for calling method.
24483
24484 * mpn/x86/k6/cross.pl: More insn exceptions.
24485
24486 2001-06-23 Kevin Ryde <[email protected]>
24487
24488 * gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1) [i386]: Fix some asm output
24489 constraints.
24490
24491 * gmp-impl.h (modlimb_invert): Mask after shifting, so mask constant
24492 fits a signed byte.
24493
24494 * tests/devel/try.c (TYPE_SB_DIVREM_MN): Fix initial fill of quotient
24495 with garbage.
24496
24497 2001-06-20 Kevin Ryde <[email protected]>
24498
24499 * config.guess (rs6000-*-aix4* | powerpc-*-aix4*): Suppress error
24500 messages if $CC_FOR_BUILD or program don't work.
24501
24502 * mpz/sqrt.c,sqrtrem.c: Special case for op==0, to avoid TMP_ALLOC(0).
24503 * tests/refmpf.c (refmpf_add, refmpf_sub): Avoid TMP_ALLOC(0).
24504
24505 * tests/mpn/t-aors_1.c: New file.
24506 * tests/mpn/Makefile.am: Add it.
24507
24508 * gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1): New macros, rewrite of
24509 mpn_add_1 and mpn_sub_1, better code for src==dst and/or n==1,
24510 separate versions for gcc x86, gcc generic, and non-gcc.
24511 (mpn_add_1, mpn_sub_1): Use them.
24512 (mpn_add, mpn_sub): Ditto, to get inlines on all compilers.
24513 (extern "C") [__cplusplus]: Let this encompass the extern inlines too.
24514 * mpn/generic/add_1.c,sub_1.c: New files, force code from gmp.h.
24515 * configure.in, mpn/Makefile.am: Add them.
24516
24517 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
24518 rather than AC_DEFINE LSYM_PREFIX.
24519 * gmp-h.in (__GMP_LSYM_PREFIX): New substitution.
24520 (__GMP_ASM_L): New macro.
24521 * gmp-impl.h (ASM_L): Use it.
24522
24523 * acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
24524 * gmp-impl.h: Use it for all the malloc based TMP_ALLOCs.
24525
24526 * stack-alloc.h: Remove file.
24527 * tal-reent.c: New file.
24528 * Makefile.am: Update.
24529
24530 * acinclude.m4, configure.in (GMP_OPTION_ALLOCA): New macro, add
24531 malloc-reentrant method, use stack-alloc.c as malloc-notreentrant,
24532 make "reentrant" the default.
24533 * gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to
24534 determine the value, and demand only 4 bytes align on 32-bit systems.
24535 * gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of
24536 stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
24537 * gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations.
24538 * stack-alloc.c (tmp_stack): Move private parts of stack-alloc.h to
24539 here, use gmp-impl.h.
24540
24541 * gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
24542 * mpz/fib_ui.c, mpz/jacobi.c, mpq/cmp.c, mpn/generic/fib2_ui.c: Use it.
24543
24544 * mpfr/exp2.c: Patch by Paul to match TMP_MARK and TMP_FREE in loop.
24545 * mpfr/sqrt.c: Scope nested TMP_DECL into nested { } block, patch by
24546 Paul, tweaked by me.
24547 * mpfr/agm.c: Ditto, and add a final TMP_FREE(marker2).
24548
24549 * gmp-h.in (mpn_cmp): Add __GMP_ATTRIBUTE_PURE.
24550
24551 * INSTALL: Clarify "make install", tweak formatting a bit.
24552
24553 2001-06-17 Kevin Ryde <[email protected]>
24554
24555 * configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,
24556 selected with --enable-alloca=debug.
24557 * tal-debug.c: New file.
24558 * configure.in, Makefile.am: Compile stack-alloc.c only for
24559 --disable-alloca.
24560 * assert.c (__gmp_assert_header): New function, split from
24561 __gmp_assert_fail.
24562
24563 * mpz/lcm.c: Don't TMP_MARK and then just return. Remove unnecessary
24564 _mpz_realloc prototype.
24565
24566 * mpn/generic/mul.c (mpn_sqr_n): Use __gmp_allocate_func for toom3
24567 temporary workspace.
24568
24569 2001-06-15 Kevin Ryde <[email protected]>
24570
24571 * tests/mpz/t-set_f.c: New file.
24572 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
24573
24574 * mpz/set_f.c: Share MPN_COPY between pad and trunc cases, do exp<=0
24575 test earlier, store SIZ(w) earlier.
24576
24577 * tests/t-count_zeros.c: New file.
24578 * tests/t-gmpmax.c: New file.
24579 * tests/Makefile.am (check_PROGRAMS): Add them.
24580
24581 * mp_clz_tab.c: Compile the table only if longlong.h says it's needed;
24582 add an internal-use-only comment.
24583 * tune/common.c: Force a __clz_tab for convenience when testing.
24584
24585 * mpn/x86/pentium/gmp-mparam.h, mpn/x86/pentium/mmx/gmp-mparam.h: Add
24586 COUNT_LEADING_ZEROS_NEED_CLZ_TAB, for mod_1.asm.
24587
24588 * longlong.h (count_leading_zeros) [pentium]: Decide to go with float
24589 method for p54.
24590 (count_leading_zeros) [alpha]: Add COUNT_LEADING_ZEROS_NEED_CLZ_TAB.
24591 (__clz_tab): Provide a prototype only if it's needed.
24592
24593 * tests/trace.c (mpz_trace): Don't use = on structures.
24594 (mpn_trace): Set _mp_alloc when creating mpz.
24595
24596 2001-06-12 Kevin Ryde <[email protected]>
24597
24598 * mpn/x86/divrem_1.asm: Amend some comments about P5 speed.
24599
24600 * tune/README: Clarify reconfigure on gmp-mparam.h update.
24601
24602 * mpn/x86/p6/copyd.asm: New file.
24603 * mpn/x86/p6/README: Update copyd and mod_1.
24604 * mpn/x86/copyd.asm: Amend some comments.
24605
24606 * gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.
24607 (mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the
24608 generic code on gcc.
24609
24610 * gmp-impl.h (ASSERT_ZERO_P, ASSERT_MPN_NONZERO_P): New macros.
24611 * mpn/generic/gcd_1.c, mpn/generic/mul_fft.c: Use them.
24612 * mpz/get_d.c: Add a private mpn_zero_p.
24613 * mpfr/trunc.c: Use own mpn_zero_p.
24614 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_1N): Use refmpn_zero_p.
24615 * gmp-impl.h (mpn_zero_p): Remove, no longer needed.
24616
24617 * gmp-h.in, gmp-impl.h: Move MPN_CMP to gmp.h as __GMPN_CMP, leave an
24618 MPN_CMP alias in gmp-impl.h.
24619 * gmp-h.in (mpn_cmp): Add an inline version.
24620 * mpn/generic/cmp.c: Use __GMP_FORCE_mpn_cmp to get code from gmp.h.
24621
24622 * acinclude.m4 (GMP_C_ATTRIBUTE_MODE): New macro.
24623 * configure.in: Call it.
24624 * gmp-impl.h (SItype etc): Use it.
24625
24626 * randraw.c (lc): Change mpn_mul_basecase->mpn_mul,
24627 mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
24628
24629 * longlong.h (count_leading_zeros) [pentiumpro]: Work around a partial
24630 register stall on gcc < 3.
24631
24632 * gmp.texi (Introduction to GMP): Add IA-64.
24633 (Notes for Particular Systems): i386 means generic x86.
24634
24635 * tests/t-modlinv.c: Use tests_start and tests_end.
24636
24637 2001-06-10 Kevin Ryde <[email protected]>
24638
24639 * gmp.texi (Number Theoretic Functions): mpz_jacobi only defined for b
24640 odd. Separate the jacobi/legendre/kronecker descriptions.
24641 (Low-level Functions): Document mpn_mul_1 "incr" overlaps.
24642 (Language Bindings): New chapter.
24643
24644 * mpz/jacobi.c: Don't retaining old behaviour of mpz_jacobi on even b
24645 (it wasn't documented in 3.1.1).
24646 * mpz/jacobi.c, gmp-h.in (mpz_kronecker, mpz_legendre): Remove
24647 separate entrypoints, just #define to mpz_jacobi.
24648 * compat.c (__gmpz_legendre): Add compatibility entrypoint.
24649
24650 * mpn/generic/mul_1.c: Allow "incr" style overlaps.
24651 * tests/devel/try.c (param_init): Test this.
24652
24653 * mpf/mul_ui.c: Do size==0 test earlier.
24654
24655 2001-06-08 Kevin Ryde <[email protected]>
24656
24657 * gmp-impl.h (ULONG_HIGHBIT, UINT_HIGHBIT, USHRT_HIGHBIT): Cast
24658 ULONG_MAX etc to unsigned long etc before attempting to right shift.
24659
24660 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Add an AC_DEFINE of LSYM_PREFIX.
24661 * gmp-impl.h (ASM_L): New macro.
24662 (mpn_incr_u, mpn_decr_u, MPN_INCR_U, MPN_DECR_U): Add i386 optimized
24663 versions.
24664
24665 * mpn/hppa/*.s,S,asm: Use .label so the code works with gas on hppa
24666 GNU/Linux too, reported by LaMont Jones <[email protected]>.
24667 * mpn/hppa/README: Add some notes on this.
24668 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Ditto.
24669
24670 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add dive_1.c,
24671 fib2_ui.c.
24672
24673 * tests/mpn/t-iord_u.c: New file.
24674 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
24675
24676 * configure.in (mips*-*-irix[6789]*): Make ABI=n32 the default, same
24677 as in gmp 3.1.
24678 * gmp.texi (ABI and ISA): Update.
24679
24680 * gmp.texi (Build Options): Misc tweaks.
24681 (Notes for Particular Systems): Describe windows DLL handling.
24682 (Known Build Problems): DJGPP needs bash 2.04.
24683 (Number Theoretic Functions): mpz_invert returns 0<=r<modulus; add
24684 mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui.
24685 (Fibonacci Numbers Algorithm): Update for new formulas used.
24686 (Lucas Numbers Algorithm): New section.
24687
24688 * tune/speed.c,speed.h,common.c,many.pl: Add mpn_fib2_ui, mpz_fib2_ui,
24689 mpz_lucnum_ui, mpz_lucnum2_ui.
24690 * demos/expr/exprz.c,README: Add lucnum.
24691 * demos/perl/GMP.pm,GMP.xs,GMP/Mpz.pm,test.pl: Add fib2, lucnum,
24692 lucnum2.
24693
24694 * tests/mpz/t-lucnum_ui.c: New file.
24695 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
24696 * tests/mpz/t-fib_ui.c: Check mpz_fib2_ui too, updates for new style
24697 MPN_FIB2_SIZE.
24698
24699 * tune/tuneup.c, tune/Makefile.am, gmp-impl.h, mpn/*/gmp-mparam.h:
24700 Remove FIB_THRESHOLD, no longer required.
24701
24702 * mpz/fib2_ui.c, mpz/lucnum_ui.c mpz/lucnum2_ui.c: New files.
24703 * Makefile.am, mpz/Makefile.am: Add them.
24704 * gmp-h.in (mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui): Add
24705 prototypes.
24706
24707 * mpn/generic/fib2_ui.c: New file.
24708 * configure.in (gmp_mpn_functions): Add it.
24709 * gmp-impl.h (mpn_fib2_ui, FIB_TABLE, etc): Add these.
24710 * mpz/fib_ui.c: Rewrite.
24711
24712 * acinclude.m4 (GMP_C_SIZES): Fix _LONG_LONG_LIMB define for mp_limb_t
24713 size test.
24714 (GMP_FUNC_ALLOCA): Add dummy __GMP_BITS_PER_MP_LIMB for gmp-h.in work.
24715
24716 * configure.in (CPPFLAGS): Remove -D__GMP_WITHIN_GMP, don't want it
24717 everywhere.
24718 * Makefile.am, mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am,
24719 mpf/Makefile.am, mpbsd/Makefile.am (INCLUDES): Set -D__GMP_WITHIN_GMP.
24720
24721 * configure.in (*-*-msdosdjgpp*): Forcibly disable shared libraries,
24722 to make libtests.la work.
24723
24724 * acconfig.h (_LONG_LONG_LIMB, HAVE_MPFR): Remove dummy defines, no
24725 longer needed.
24726
24727 * mpz/set_ui.c: Store to _mp_d[0] unconditionally.
24728
24729 2001-05-27 Kevin Ryde <[email protected]>
24730
24731 * configure.in, gmp-h.in, mp-h.in: Add support for windows DLLs.
24732
24733 2001-05-26 Kevin Ryde <[email protected]>
24734
24735 * gmp.texi (ABI and ISA, Reentrancy): Minor tweaks
24736 (Notes for Package Builds): Note gmp.h is a generated file.
24737 (Notes for Particular Systems): -march=pentiumpro is used for gcc
24738 2.95.4 and up.
24739 (Assembler Loop Unrolling): Mention non power-of-2 unrolling.
24740 (Internals): New chapter.
24741 * mpf/README: Remove file.
24742
24743 * demos/expr/README: Miscellaneous rewordings.
24744
24745 * demos/perl: New directory.
24746 * demos/Makefile.am: Add it.
24747 * demos/perl/INSTALL, Makefile.PL, GMP.pm, GMP.xs, typemap,
24748 GMP/Mpz.pm, GMP/Mpq.pm, GMP/mpf.pm, GMP/Rand.pm, sample.pl, test.pl:
24749 New files.
24750
24751 * configure, aclocal.m4: Update to autoconf 2.50.
24752
24753 * configure, aclocal.m4, ltmain.sh: Update to libtool 1.4.
24754
24755 * configure, aclocal.m4, missing, ansi2knr.c, */Makefile.in: Update to
24756 automake 1.4f.
24757 * Makefile.am: Conditionalize mpfr in $(SUBDIRS) to handle mpfr.info.
24758 * mpfr/Makefile.am (INFO_DEPS): Remove previous mpfr.info handling.
24759 * mpn/Makefile.am (GENERIC_SOURCES): Remove this, just put mp_bases.c
24760 in libmpn_la_SOURCES.
24761 * tests/Makefile.am (tests.h): Move from EXTRA_HEADERS to
24762 libtests_la_SOURCES.
24763 * ltconfig: Remove file, no longer needed.
24764
24765 * Makefile.am (gmp-impl.h, longlong.h, stack-alloc.h): Move from
24766 EXTRA_DIST to libgmp_la_SOURCES, so they get included in TAGS.
24767 * tests/rand/Makefile.am (gmpstat.h): Move to libstat_la_SOURCES
24768 similarly.
24769
24770 * config.guess (68k-*-*): Use $SHELL not "sh", tweak some comments.
24771
24772 * mpfr/mpfr.texi (Introduction to MPFR): Tweak table formatting, note
24773 non-free programs must be able to be re-linked.
24774
24775 2001-05-20 Kevin Ryde <[email protected]>
24776
24777 * mpn/powerpc64/addmul_1.asm, mpn/powerpc64/mul_1.asm,
24778 mpn/powerpc64/submul_1.asm: Add carry-in entrypoints.
24779
24780 2001-05-17 Kevin Ryde <[email protected]>
24781
24782 * gmp.texi (ge): Fix definition for info.
24783 (Notes for Particular Systems): Mention 68k dragonball and cpu32.
24784 (Efficiency): Add static linking, more about in-place operations,
24785 describe mpq+/-integer using addmul.
24786 (Reporting Bugs): A couple of words about self-contained reports.
24787 (Floating-point Functions): Note exponent limitations of mpf_get_str
24788 and mpf_set_str.
24789 (Initializing Floats): Clarify mpf_get_prec, mpf_set_prec and
24790 mpf_set_prec_raw a bit.
24791 (Float Comparison): Note current mpf_eq deficiencies.
24792
24793 * gmp-h.in (__GMP_HAVE_CONST, __GMP_HAVE_PROTOTYPES,
24794 __GMP_HAVE_TOKEN_PASTE): Merge GNU ansidecl.h tests for ANSI compilers.
24795 * demos/expr/expr-impl-h.in: Ditto.
24796
24797 * gmp-impl.h (BITS_PER_MP_LIMB): Define from __GMP_BITS_PER_MP_LIMB if
24798 not already in gmp-mparam.h.
24799 * tests/t-constants.c (BITS_PER_MP_LIMB, __GMP_BITS_PER_MP_LIMB):
24800 Check these are the same.
24801
24802 * gmp-h.in (mpf_get_default_prec, mpf_get_prec, mpf_set_default_prec,
24803 mpf_set_prec_raw): Provide "extern inline" versions, use __GMPF on the
24804 macros.
24805 * mpf/get_dfl_prc.c, mpf/get_prc.c, mpf/set_dfl_prc.c,
24806 mpf/set_prc_raw.c: Get code from gmp.h using __GMP_FORCE.
24807
24808 * gmp-h.in, gmp-impl.h (__gmp_default_fp_limb_precision): Move from
24809 gmp-impl.h to gmp-h.in.
24810 (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Ditto, and use __GMPF
24811 prefix and add a couple of casts.
24812 * gmp-h.in (__GMP_MAX): New macro.
24813 * mpf/init2.c mpf/set_prc.c: Update for __GMPF prefix.
24814
24815 * gmp-h.in (__GMP_BITS_PER_MP_LIMB): New templated define.
24816 * acinclude.m4 (GMP_C_SIZES): Add AC_SUBST __GMP_BITS_PER_MP_LIMB,
24817 remove AC_DEFINE BITS_PER_MP_LIMB.
24818
24819 2001-05-13 Kevin Ryde <[email protected]>
24820
24821 * gmp-h.in, gmp.texi, Makefile.am, mpz/Makefile.am, tests/mpz/t-pow.c:
24822 Remove mpz_si_pow_ui, pending full si support.
24823 * mpz/si_pow_ui.c: Remove file.
24824
24825 2001-05-11 Kevin Ryde <[email protected]>
24826
24827 * mpn/x86/pentium/dive_1.asm: New file.
24828
24829 * mpn/powerpc32/umul.asm: Use r on registers.
24830 * mpn/powerpc64/umul.asm: New file.
24831 * configure.in (powerpc*-*-*): Enable umul in extra_functions.
24832
24833 * tests/refmpn.c, tests/tests.h (refmpn_umul_ppmm): Use same arguments
24834 as normal mpn_umul_ppmm.
24835 (refmpn_mul_1c): Update.
24836 * tests/devel/try.c, tune/many.pl: Add some umul_ppmm testing support.
24837
24838 * mpn/x86/k6/mmx/popham.asm, mpn/x86/k7/mmx/popham.asm: Don't support
24839 size==0.
24840 * mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm: Ditto,
24841 and shave a couple of cycles from the PIC entry code.
24842
24843 * mpz/mul.c: Use mpn_mul_1 for size==1 and mpn_mul_2 (if available)
24844 for size==2, to avoid copying; do vsize==0 test earlier.
24845
24846 * mpf/sub.c: Test r!=u before calling mpf_set.
24847 * mpf/add.c: Ditto, and share mpf_set between usize==0 and vsize==0.
24848
24849 * mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
24850 mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
24851 count_leading_zeros zero.
24852
24853 * acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Print a message if extra
24854 flags are added.
24855
24856 * tests/mpz/t-mul_i.c: New file.
24857 * tests/mpz/Makefile.am: Add it.
24858
24859 * mpz/mul_siui.c (mpz_mul_si): Fix for -0x80..00 on long long limb.
24860
24861 * gmp-h.in (mpf_set_si, mpf_set_ui): Revert last change, set exp to 0
24862 when n==0.
24863 * mpf/ceilfloor.c, mpf/trunc.c: Fix exp to 0 when setting r to 0.
24864 * gmp-impl.h (MPF_CHECK_FORMAT): Check exp==0 when size==0.
24865
24866 2001-05-07 Kevin Ryde <[email protected]>
24867
24868 * gmp-h.in (mpf_set_si, mpf_set_ui): Don't bother setting _mp_exp to 0
24869 when n==0 (use 1 unconditionally).
24870 * tests/mpf/t-misc.c (check_mpf_set_si): Don't demand anything of
24871 _mp_exp when _mp_size is zero.
24872
24873 * mpn/x86/README: Note gas _GLOBAL_OFFSET_TABLE_ with leal problem.
24874
24875 * gmp-h.in (mpz_fits_uint_p, mpz_fits_ulong_p, mpz_fits_ushort_p):
24876 Provide these as "extern inline"s.
24877 (__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): New macros.
24878 (mpz_popcount): Use __GMP_ULONG_MAX.
24879 * gmp-impl.h (UINT_MAX, ULONG_MAX, USHRT_MAX): Use __GMP_U*_MAX, if
24880 not already defined.
24881 * mpz/fits_u.c: Use the code from gmp.h.
24882
24883 2001-05-06 Kevin Ryde <[email protected]>
24884
24885 * mpn/x86/k7/dive_1.asm: New file.
24886 * mpn/x86/k7/gcd_1.asm: New file.
24887 * mpn/asm-defs.m4 (m4_count_trailing_zeros): New macro.
24888
24889 * gmp-h.in (mpz_get_ui, mpz_getlimbn, mpz_set_q, mpz_perfect_square_p,
24890 mpz_popcount, mpz_size, mpf_set_ui, mpf_set_si, mpf_size): Provide
24891 these as "extern inlines".
24892 Use just one big extern "C" block.
24893 * mpz/getlimbn.c, mpz/get_ui.c, mpz/perfsqr.c, mpz/popcount.c
24894 mpz/set_q.c, mpz/size.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Use
24895 __GMP_FORCE to get code from gmp.h.
24896
24897 2001-05-03 Kevin Ryde <[email protected]>
24898
24899 * extract-dbl.c: Add ASSERT d>=0.
24900
24901 * gmp.texi (Efficiency): Add mpz_addmul etc for mpz+=integer, add
24902 mpz_neg etc in-place.
24903 (Integer Arithmetic): Add mpz_addmul, mpz_submul, mpz_submul_ui.
24904 (Initializing Rationals): Add mpq_set_str.
24905 (Low-level Functions): mpn_set_str requires strsize >= 1.
24906
24907 * gmp-h.in (__GMP_EXTERN_INLINE, __GMP_ABS): New macros.
24908 (mpz_abs, mpq_abs, mpf_abs, mpz_neg, mpq_neg, mpf_neg): Provide inline
24909 versions.
24910 * mpz/abs.c, mpq/abs.c, mpf/abs.c, mpz/neg.c, mpq/neg.c, mpf/neg.c:
24911 Add suitable __GMP_FORCE to turn off inline versions.
24912
24913 * tests/mpz/t-aorsmul.c,t-cmp_d.c,t-popcount,t-set_str.c: New files.
24914 * tests/mpz/Makefile.am: Add them.
24915
24916 * mpz/aorsmul_i.c: New file, rewrite of addmul_ui.c. Add
24917 mpz_submul_ui entrypoint, share more code between some of the
24918 conditionals, use mpn_mul_1c if available.
24919 * mpz/addmul_ui.c: Remove file.
24920 * mpz/aorsmul.c: New file.
24921 * Makefile.am, mpz/Makefile.am: Update.
24922 * gmp-h.in (mpz_addmul, mpz_submul, mpz_submul_ui): Add prototypes.
24923 * gmp-impl.h (mpz_aorsmul_1): Add prototype.
24924
24925 * tests/mpq/t-set_str.c: New file.
24926 * tests/mpq/Makefile.am: Add it.
24927
24928 * mpq/set_str.c: New file.
24929 * Makefile.am, mpq/Makefile.am: Add it.
24930 * gmp-h.in (mpq_set_str): Add prototype.
24931
24932 * mpz/set_str.c: Fix for trailing white space on zero, eg. "0 ".
24933 * mpn/generic/set_str.c: Add ASSERT str_len >= 1.
24934
24935 * gmp-h.in, gmp-impl.h (mpn_incr_u, mpn_decr_u): Move to gmp-impl.h.
24936 * gmp-impl.h (MPN_INCR_U, MPN_DECR_U): New macros.
24937
24938 2001-04-30 Kevin Ryde <[email protected]>
24939
24940 * tests/mpz/t-lcm.c: New file.
24941 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
24942
24943 * mpz/lcm.c: Add one limb special case.
24944
24945 * mpz/lcm_ui.c: New file.
24946 * Makefile.am, mpz/Makefile.am: Add it.
24947 * gmp-h.in (mpz_lcm_ui): Add prototype.
24948 * gmp.texi (Number Theoretic Functions): Add mpz_lcm_ui, document lcm
24949 now always positive.
24950
24951 * mp-h.in (mp_size_t, mp_exp_t): Fix typedefs to match gmp-h.in.
24952
24953 * gmp-h.in (mpn_add_1, mpn_add, mpn_sub_1, mpn_sub): Remove K&R
24954 function defines (ansi2knr will handle mpn/inline.c, and just ansi is
24955 enough for gcc extern inline).
24956
24957 * gmp-h.in (__GMP_HAVE_TOKEN_PASTE): New macro.
24958 (__MPN): Use it.
24959 * gmp-impl.h (CNST_LIMB): Ditto.
24960
24961 * gmp-h.in, mp-h.in (__gmp_const, __gmp_signed, _PROTO, __MPN): Use
24962 ANSI forms on Microsoft C.
24963 (__GMP_HAVE_CONST): New define.
24964 * gmp-impl.h (const, signed): Use it.
24965
24966 * demos/expr/expr-impl-h.in (<stdarg.h>): Use this with Microsoft C.
24967 (HAVE_STDARG): New define.
24968 * demos/expr/expr.c,exprz.c,exprq.c,exprf.c,exprfr.c: Use it.
24969
24970 * acinclude.m4 (GMP_C_STDARG): New macro.
24971 * configure.in: Call it.
24972 * rand.c: Use it.
24973
24974 * configure.in (AC_PROG_CC_STDC): New test.
24975
24976 2001-04-25 Kevin Ryde <[email protected]>
24977
24978 * mpn/x86/k6/mmx/dive_1.asm: New file.
24979 * mpn/x86/x86-defs.m4 (Zdisp): Two more insns.
24980
24981 * mpn/x86/pentium/mul_2.asm: New file.
24982 * mpn/asm-defs.m4: Add define_mpn(mul_2).
24983 * acconfig.h (HAVE_NATIVE_mpn_divexact_1, mul_2): Add templates.
24984
24985 * configure.in (ABI): Use AC_ARG_VAR.
24986
24987 * tests/devel/try.c: Run reference function when validate fails.
24988
24989 * mpq/get_str.c: Fixes for negative bases.
24990 * tests/mpq/t-get_str.c: Check negative bases.
24991 * tests/misc.c,tests.h (__gmp_allocate_strdup, strtoupper): New
24992 functions.
24993
24994 2001-04-24 Torbjorn Granlund <[email protected]>
24995
24996 * mpz/lcm.c (mpz_lcm): Make result always positive.
24997
24998 * gmp-h.in (mpz_inp_binary, mpz_out_binary): Remove declarations.
24999
25000 2001-04-22 Kevin Ryde <[email protected]>
25001
25002 * mpn/powerpc64/addsub_n.asm: Use config.m4 not asm-syntax.m4.
25003
25004 * mpz/cmp_d.c, mpz/cmpabs_d.c: New files.
25005 * Makefile.am, mpz/Makefile.am: Add them.
25006 * mpf/cmp_d.c, mpf/get_dfl_prec.c: New files.
25007 * Makefile.am, mpf/Makefile.am: Add them.
25008 * gmp-h.in (mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d, mpf_get_default_prec):
25009 Add prototypes.
25010 * gmp.texi: Add documentation.
25011
25012 * mpf/set_prc.c: Avoid a realloc call if already the right precision.
25013
25014 * gmp-impl.h (MPF_BITS_TO_PREC, MPF_PREC_TO_BITS): New macros.
25015 * mpf/get_prc.c, init2.c, set_dfl_prec.c, set_prc.c, set_prc_raw.c:
25016 Use them.
25017
25018 2001-04-20 Kevin Ryde <[email protected]>
25019
25020 * tests/devel/try.c: Don't test size==0 on mpn_popcount and
25021 mpn_hamdist; add testing for mpn_divexact_1; print some limb values
25022 with mpn_trace not printf.
25023
25024 * mpz/popcount.c, mpz/hamdist.c: Don't pass size==0 to mpn_popcount
25025 and mpn_hamdist.
25026 * mpn/generic/popham.c: Don't support size==0.
25027
25028 * config.guess (m68k-*-*): Detect m68010, return m68360 for cpu32,
25029 cleanup the nesting a bit.
25030
25031 * gmp.texi (Integer Division): Fix mpz_congruent_2exp_p "c" type.
25032 (Integer Division): Add mpz_divexact_ui.
25033 (Number Theoretic Functions): Fix mpz_nextprime return type.
25034 (Exact Remainder): Divisibility tests now implemented.
25035 And more index entries in a few places.
25036
25037 * tests/mpz/dive_ui.c: New file.
25038 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
25039
25040 * mpz/dive_ui.c: New file.
25041 * Makefile.am, mpz/Makefile.am: Add it.
25042 * gmp-h.in (mpz_divexact_ui): Add prototype.
25043
25044 * tune/many.pl, tune/speed.h: Add special mpn_back_to_back for
25045 development.
25046
25047 * gmp-impl.h (MPN_DIVREM_OR_DIVEXACT_1): New macro.
25048 * mpz/divexact.c: Use it.
25049
25050 * gmp-impl.h (DIVEXACT_1_THRESHOLD): New threshold.
25051 * tune/tuneup.c: Tune it.
25052
25053 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of
25054 mpn_divexact_1, mpn_copyi, mpn_copyd.
25055
25056 * mpn/generic/dive_1.c: New file.
25057 * configure.in (gmp_mpn_functions): Add it.
25058 * gmp-impl.h (mpn_divexact_1): Add prototype.
25059 * mpn/asm-defs.m4: Add define_mpn(divexact_1).
25060
25061 * tests/mpn: New directory.
25062 * tests/Makefile.am: Add it.
25063 * tests/mpn/Makefile.am: New file.
25064 * configure.in (AC_OUTPUT): Add it.
25065 * tests/mpn/t-asmtype.c: New file.
25066
25067 * configure, config.in: Update to autoconf 2.49d.
25068
25069 * configure.in, gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Revert
25070 to generating gmp.h, mp.h and expr-impl.h with AC_OUTPUT and AC_SUBST.
25071
25072 * configure.in (m68*-*-*): Oops, m683?2 is 68000, m68360 is cpu32.
25073 * mpn/m68k/m68k-defs.m4 (scale_available_p): Ditto.
25074
25075 * configure.in (underscore, asm_align): Remove these variables, unused.
25076 (GMP_ASM_*): Sort by AC_REQUIREs, to avoid duplication.
25077 * acinclude.m4 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_LOG): Remove support
25078 for actions, no longer needed.
25079
25080 2001-04-17 Kevin Ryde <[email protected]>
25081
25082 * config.guess (m68k-*-*): Look for cpu in linux kernel /proc/cpuinfo.
25083
25084 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): The -mpentiumpro problem is
25085 fixed in 2.95.4, so test for that.
25086 (GMP_ASM_TYPE): Amend some comments.
25087
25088 * tune/freq.c (speed_cpu_frequency_sysctl): Avoid having unused
25089 variables on GNU/Linux.
25090
25091 * mpn/asm-defs.m4 (m4_instruction_wrapper): Fix a quoting problem if
25092 the name of the file is a macro.
25093
25094 2001-04-15 Kevin Ryde <[email protected]>
25095
25096 * mpn/powerpc64/*.asm: Add speeds on ppc630.
25097
25098 * acconfig.h: Add dummy templates for _LONG_LONG_LIMB and HAVE_MPFR.
25099 * configure.in: Ensure config.in is the last AM_CONFIG_HEADER,
25100 which autoheader requires.
25101
25102 * mpn/x86/pentium/popcount.asm: New file.
25103 * mpn/x86/pentium/hamdist.asm: New file.
25104
25105 * mpn/asm-defs.m4: (m4_popcount): New macro.
25106 Amend a few comments elsewhere.
25107
25108 * acinclude.m4 (GMP_ASM_RODATA): If possible, grep compiler output for
25109 the right directive.
25110
25111 * tune/speed.c: Print clock speed in MHz, not cycle time.
25112
25113 * configure.in (AC_CHECK_HEADERS): Check for sys/processor.h.
25114 * tune/freq.c (speed_cpu_frequency_processor_info): Require
25115 <sys/processor.h> to exist, to differentiate the different
25116 processor_info on Darwin.
25117 (speed_cpu_frequency_sysctlbyname): Remove hw.model test which is in
25118 speed_cpu_frequency_sysctl.
25119 (speed_cpu_frequency_sysctl): Add hw.cpufrequency for Darwin.
25120
25121 * gmp-impl.h (MPN_LOGOPS_N_INLINE, mpn_and_n ... mpn_xnor_n): Use a
25122 single expression argument for the different operations, necessary for
25123 the Darwin "smart" preprocessor.
25124
25125 * mpn/m68k/t-m68k-defs.pl: Allow white space in m4_definsn and
25126 m4_defbranch.
25127
25128 * tune/many.pl: Change RM_TMP_S to RM_TMP to match mpn/Makeasm.am,
25129 avoid a possibly undefined array in a diagnostic, add more renaming to
25130 hamdist.
25131
25132 2001-04-13 Kevin Ryde <[email protected]>
25133
25134 * ltmain.sh, aclocal.m4, configure, config.in: Update to libtool 1.3d.
25135 * configure.in: Change ac_ to lt_ in lt_cv_archive_cmds_need_lc and
25136 lt_cv_proc_cc_pic.
25137
25138 * config.guess (m68*-*-*): Detect exact cpu with BSD sysctl hw.model,
25139 detect 68000/68010 with trapf, detect 68302 with bfffo.
25140
25141 2001-04-11 Kevin Ryde <[email protected]>
25142
25143 * acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_ADDRESSING,
25144 GMP_ASM_M68K_BRANCHES): New macros.
25145 * configure.in: Use them, remove old 68k configs, use mc68020 udiv and
25146 umul.
25147
25148 * mpn/m68k/m68k-defs.m4: New file.
25149 * mpn/m68k/t-m68k-defs.pl: New file.
25150 * mpn/m68k/*.asm: New files, converted from .S. Merge add_n and sub_n
25151 to aors_n, ditto mc68020 addmul_1 and submul_1 to aorsmul_1. No
25152 object code changes (except .type and .size now used on NetBSD 1.4).
25153 * mpn/m68k/README: New file.
25154 * mpn/m68k/*.S, */*.S, syntax.h: Remove files.
25155
25156 * configure.in (m68*-*-netbsd1.4*): Pretend getrusage doesn't exist.
25157 * tune/README: Update.
25158
25159 * configure.in (powerpc*-*-*): For the benefit of Darwin 1.3, add cc
25160 to cclist, make gcc_cflags -Wa,-mppc optional.
25161
25162 2001-04-06 Kevin Ryde <[email protected]>
25163
25164 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add | for 68k.
25165 (gmpasm-mode-syntax-table): Add to comments.
25166
25167 * tests/mpz/reuse.c (dsi_div_func_names): Add names for cdiv_[qr]_2exp.
25168
25169 2001-04-04 Kevin Ryde <[email protected]>
25170
25171 * acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): Fix test so as to actually
25172 detect the problem, add notes on m68k netbsd 1.4.1.
25173
25174 * gmp.texi (Compatibility with older versions): Note libmp
25175 compatibility.
25176
25177 2001-04-03 Kevin Ryde <[email protected]>
25178
25179 * tests/mpz/reuse.c: Add mpz_cdiv_q_2exp and mpz_cdiv_r_2exp.
25180
25181 * tests/mpz/t-pow.c: Drag in refmpn.o when testing mpz_pow_ui etc with
25182 refmpn_mul_2.
25183
25184 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of mpn_com_n
25185 and mpn_mul_2.
25186 * tests/devel/try.c: Add testing of mpn_mul_2, and a
25187 DATA_MULTIPLE_DIVISOR attribute.
25188
25189 * gmp.texi (Build Options): List more m68k's.
25190 (Build Options): Add cross reference to tex2html.
25191 (Notes for Particular Systems): Add m68k means 68020 or up.
25192 (Rational Conversions): New section, with mpq_get_d, mpq_set_d and
25193 mpq_set_f from Miscellaneous, and new mpq_set_str.
25194 (Applying Integer Functions): Move mpq_get_num, mpq_get_den,
25195 mpq_set_num and mpq_set_den from Misc.
25196 (Miscellaneous Rational Functions): Remove section.
25197 (Custom Allocation): Partial rewrite for various clarifications.
25198 (References): Improve line breaks near URLs.
25199
25200 * acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): New macro.
25201 * configure.in (m68*-*-*): Use it to run gcc 2.95.x at -O not -O2.
25202 (m680?0-*-*, m683?2-*-*, m68360-*-*): Add optional gcc -m options.
25203
25204 * tests/mpz/t-cmp.c: New file.
25205 * tests/mpz/t-sizeinbase.c: New file.
25206 * tests/mpz/Makefile.am: Add them.
25207
25208 * gmp-impl.h (MPN_CMP): New macro.
25209 * mpz/cmp.c,cmpabs.c: Use it, and minor cleanups too.
25210
25211 * tests/mpq/t-equal.c: New file.
25212 * tests/mpq/t-get_str.c: New file.
25213 * tests/mpq/Makefile.am: Add them.
25214
25215 * mpq/get_str.c: New file.
25216 * Makefile.am, mpq/Makefile.am: Add it.
25217 * gmp-h.in (mpq_get_str): Add prototype.
25218
25219 * mpq/equal.c: Rewrite using inline compare loops.
25220
25221 * tests/refmpn.c,tests.h (refmpn_mul_2): Fix parameter order.
25222 * mpz/n_pow_ui.c: Fix mpn_mul_2 calls parameter order.
25223
25224 2001-03-29 Kevin Ryde <[email protected]>
25225
25226 * tests/mpf/t-trunc.c: New file.
25227 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
25228 * gmp-impl.h (MPF_CHECK_FORMAT): New macro.
25229
25230 * mpf/trunc.c: New file, rewrite of integer.c, preserve prec+1 in
25231 copy, don't copy if unnecessary.
25232 * mpf/ceilfloor.c: New file likewise, and use common subroutine for
25233 ceil and floor.
25234 * mpf/integer.c: Remove file.
25235 * Makefile.am, mpf/Makefile.am, macos/Makefile.in: Update.
25236
25237 * acinclude.m4 (GMP_GCC_VERSION_GE): New macro.
25238 (GMP_GCC_MARCH_PENTIUMPRO): Use it, remove CCBASE parameter (don't
25239 bother checking it's gcc).
25240 (GMP_GCC_ARM_UMODSI): New macro.
25241 * configure.in (GMP_GCC_MARCH_PENTIUMPRO): Update parameters.
25242 (arm*-*-*): Use GMP_GCC_ARM_UMODSI.
25243 * gmp.texi (Notes for Particular Systems): Add arm gcc requirements.
25244
25245 2001-03-28 Kevin Ryde <[email protected]>
25246
25247 * gmp.texi (Converting Integers): Document mpz_getlimbn using absolute
25248 value and giving zero for N out of range, move to end of section.
25249
25250 * tests/refmpn.c (refmpn_tdiv_qr): Use refmpn_divmod_1 rather than
25251 refmpn_divrem_1.
25252 * tests/tests.h: Add some prototypes that were missing.
25253
25254 * mpz/tdiv_q_ui.c: Remove a comment that belonged to mpz_tdiv_r_ui.
25255
25256 2001-03-26 Torbjorn Granlund <[email protected]>
25257
25258 * mpn/generic/gcdext.c: Handle carry overflow after m*n multiply code
25259 in both arms. Partially combine multiply arms.
25260
25261 2001-03-24 Kevin Ryde <[email protected]>
25262
25263 * longlong.h: Add comments to P5 count_leading_zeros.
25264
25265 * demos/expr/exprz.c,t-expr.c,README: Add congruent_p and divisible_p.
25266
25267 2001-03-23 Kevin Ryde <[email protected]>
25268
25269 * gmp.texi (GMPceil, GMPfloor, ge, le): New macros.
25270 (Integer Division, mpn_cmp, mpn_sqrtrem, Algorithms): Use them.
25271 (mpn_bdivmod): Refer to mp_bits_per_limb, not BITS_PER_MP_LIMB, and
25272 improve formatting a bit.
25273 (mpn_lshift, mpn_rshift): Clarify the return values, and use {rp,n}
25274 for the destination.
25275 Miscellaneous minor rewordings in a few places.
25276
25277 * mpn/arm/arm-defs.m4: New file.
25278 * configure.in (arm*-*-*): Use it.
25279 * mpn/arm/*.asm: Use changecom and registers from arm-defs.m4, use L()
25280 for local labels.
25281
25282 * mpn/x86/k6/mmx/com_n.asm: Relax code alignment (same speed).
25283
25284 * gmp-h.in (__GMP_ATTRIBUTE_PURE): Use __pure__ to avoid application
25285 namespace.
25286
25287 * gmp-impl.h (ABS): Add parens around argument.
25288
25289 2001-03-20 Kevin Ryde <[email protected]>
25290
25291 * acinclude.m4 (GMP_PROG_M4): Use AC_ARG_VAR on $M4.
25292
25293 * acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): New macro.
25294 * configure.in: Use it.
25295 * mpn/asm-defs.m4: Ditto.
25296
25297 2001-03-18 Kevin Ryde <[email protected]>
25298
25299 * mpn/x86/pentium/logops_n.asm: New file.
25300
25301 * mpn/x86/k6/k62mmx/copyd.asm: Rewrite, smaller and simpler, faster on
25302 small sizes, slower on big sizes (about half the time).
25303 * mpn/x86/k6/k62mmx/copyi.asm: Remove file, in favour of generic x86.
25304 * mpn/x86/copyi.asm: Add some comments.
25305 * mpn/x86/k6/README: Update.
25306
25307 * mpn/x86/k6/gcd_1.asm: New file.
25308
25309 * gmp-impl.h (NEG_MOD): Fix type of __dnorm.
25310
25311 * acinclude.m4 (GMP_C_SIZES): Fix use of __GMP_WITHIN_CONFIGURE.
25312
25313 2001-03-15 Kevin Ryde <[email protected]>
25314
25315 * gmp.texi (GMPabs): New macro.
25316 (Float Comparison - mpf_reldiff): Use it.
25317 (Integer Comparisons - mpz_cmpabs): Ditto, puts "abs" in info.
25318 (Reentrancy): Update notes on old random functions.
25319 (Karatsuba Multiplication): Better characterize the effect of basecase
25320 speedups on the thresholds, pointed out by Torbjorn.
25321
25322 * tune/README: Notes on the 1x1 div threshold for mpn_gcd_1.
25323
25324 * tests/misc.c (mpz_pow2abs_p, mpz_flipbit, mpz_errandomb,
25325 mpz_errandomb_nonzero, mpz_negrandom): New functions.
25326 (mpz_erandomb, mpz_erandomb_nonzero): Use urandom().
25327 * tests/spinner.c (spinner_wanted, spinner_tick): Make global.
25328 * tests/tests.h: Update prototypes.
25329
25330 * tests/mpz/t-cong.c, tests/mpz/t-cong_2exp.c: New files.
25331 * tests/mpz/Makefile.am (check_PROGRAMS): Add them.
25332
25333 * mpz/cong.c, mpz/cong_2exp.c, mpz/cong_ui.c: New files.
25334 * Makefile.am, mpz/Makefile.am: Add them.
25335 * gmp-impl.h (NEG_MOD): New macro.
25336 * gmp-h.in (mpz_congruent_p, mpz_congruent_2exp_p,
25337 mpz_congruent_ui_p): Add prototypes.
25338 * gmp.texi (Integer Division, Efficiency): Add documentation.
25339
25340 * mpq/aors.c: No need for ABS on denominator sizes.
25341
25342 * gmp-impl.h (mpn_divisible_p): Use __MPN.
25343
25344 * gmp-impl.h (LOW_ZEROS_MASK): New macro.
25345 * mpz/divis_ui.c, mpn/generic/divis.c: Use it.
25346
25347 * mpz/setbit.c: Fix normalization for case of a negative ending up
25348 with a zero high limb.
25349 * tests/mpz/bit.c (check_single): New test for this problem.
25350
25351 * configure.in (none-*-*): Fix cclist for default ABI=long.
25352
25353 2001-03-10 Kevin Ryde <[email protected]>
25354
25355 * mpz/cfdiv_q_2exp.c: Don't scan for non-zero limbs if they don't
25356 matter to the rounding.
25357
25358 * mpz/get_ui.c: Fetch _mp_d[0] unconditionally, so the code can come
25359 out branch-free.
25360
25361 2001-03-08 Kevin Ryde <[email protected]>
25362
25363 * tests/devel/try.c (param_init): Fix reference functions for and_n
25364 and nand_n.
25365
25366 * tune/speed.c, tests/devel/try.c: Seed RANDS, not srandom etc.
25367 * configure.in (AC_CHECK_FUNCS): Remove srand48 and srandom.
25368 * macos/configure (coptions): Remove random/srandom, now unnecessary.
25369
25370 * configure.in (gmp.h, mp.h, demos/expr/expr-impl.h): Generate using
25371 AM_CONFIG_HEADER.
25372 (_LONG_LONG_LIMB, HAVE_MPFR): Change to AC_DEFINEs.
25373 * gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Change to #undef's.
25374 * acinclude.m4 (GMP_FUNC_ALLOCA, GMP_C_SIZES): Use gmp-h.in, not gmp.h.
25375 * Makefile.am (EXTRA_DIST): Remove gmp-h.in and mp-h.in, now done
25376 automatically.
25377 * acinclude.m4 (GMP_FUNC_ALLOCA), gmp-impl.h: Set and use
25378 __GMP_WITHIN_CONFIGURE rather than GMP_FUNC_ALLOCA_TEST.
25379
25380 * mpf/random2.c: Use _gmp_rand and RANDS instead of random() for the
25381 exponent, ensures full range of values too.
25382
25383 * tests/mpz/t-div_2exp.c (check_various): Start with d based on i, but
25384 don't let it go negative.
25385
25386 * tune/tuneup.c (KARATSUBA_MUL_THRESHOLD): Limit probing to
25387 TOOM3_MUL_THRESHOLD_LIMIT, the size of the workspace in mul_n.c.
25388 Use a -1 with this too, so size<LIMIT not <=.
25389
25390 2001-03-07 Torbjorn Granlund <[email protected]>
25391
25392 * mpn/cray/cfp/mul_1.c: Don't call mpn_add_n with size 0.
25393 * mpn/cray/cfp/addmul_1.c: Likewise.
25394 * mpn/cray/cfp/submul_1.c: Don't call mpn_sub_n with size 0.
25395
25396 * tests/mpz/t-div_2exp.c (check_various): Start 2nd d loop from 0
25397 (avoid problems with Cray compilers).
25398
25399 2001-03-06 Torbjorn Granlund <[email protected]>
25400
25401 * mpn/cray/ieee/submul_1.c: Don't call mpn_sub_n with size 0.
25402
25403 * mpn/cray/ieee/mul_basecase.c: New file.
25404 * mpn/cray/ieee/sqr_basecase.c: New file, derived from mul_basecase.c.
25405
25406 2001-03-06 Kevin Ryde <[email protected]>
25407
25408 * tests/devel/try.c (pointer_setup): Allow dst_size == SIZE_SIZE2 for
25409 the benefit of mpn_tdiv_qr.
25410
25411 * tune/tuneup.c (all): Start karatsuba probing at size==4, for the
25412 benefit of cray t90 ieee which has speed oddities at size==2.
25413
25414 * gmp-impl.h (USE_LEADING_REGPARM): Use __GMP_GNUC_PREREQ.
25415 Use __GMP_ATTRIBUTE_PURE and ATTRIBUTE_CONST in a few places.
25416
25417 * gmp-h.in (__GMP_GNUC_PREREQ) New macro.
25418 (__GMP_ATTRIBUTE_PURE): New macro, use it in many places.
25419
25420 * gmp-impl.h, gmp-h.in (mpn_jacobi_base): Move prototype to
25421 gmp-impl.h, use ATTRIBUTE_CONST.
25422
25423 * tune/speed.h (speed_cyclecounter): Inline asm version for i386.
25424
25425 * mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Only reread "up" after second
25426 realloc, first is under w!=u.
25427
25428 2001-03-05 Torbjorn Granlund <[email protected]>
25429
25430 * mpn/cray/sub_n.c: Rewrite using `majority' logic.
25431
25432 * mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
25433
25434 * mpn/cray/ieee/mul_1.c: Rewrite. Streamline multiplications;
25435 use `majority' logic.
25436 * mpn/cray/ieee/addmul_1.c: Likewise.
25437
25438 * mpn/cray/add_n.c: Rewrite using `majority' logic.
25439
25440 2001-03-04 Torbjorn Granlund <[email protected]>
25441
25442 * longlong.h (CRAY udiv_qrnnd): No longer conditional on CRAYMPP.
25443 (64-bit hppa add_ssaaaa): New.
25444 (64-bit hppa sub_ddmmss): New.
25445
25446 * mpn/cray/ieee/invert_limb.c: New file.
25447
25448 * gmp-impl.h (RANDS): Add a `,0' to make it compile on more compilers.
25449
25450 2001-03-03 Kevin Ryde <[email protected]>
25451
25452 * mpz/n_pow_ui.c (ULONG_PARITY): Move to gmp-impl.h.
25453 * gmp-impl.h (ULONG_PARITY): i386 part from n_pow_ui.c, new generic
25454 form by Torbjorn.
25455
25456 * tests/mpz/t-div_2exp.c: New file, rewrite of t-2exp.c.
25457 * tests/mpz/t-2exp.c: Remove file.
25458 * tests/mpz/Makefile.am (check_PROGRAMS): Update.
25459
25460 * gmp-h.in (mpz_cdiv_q_2exp, mpz_cdiv_q_2exp): Add prototypes.
25461 * gmp.texi (Integer Division): Add mpz_cdiv_q_2exp and mpz_cdiv_q_2exp.
25462
25463 * mpz/cfdiv_q_2exp.c: New file, partial rewrite of fdiv_q_2exp.c, add
25464 mpz_cdiv_q_2exp entrypoint.
25465 * mpz/cfdiv_r_2exp.c: New file, rewrite of fdiv_r_2exp.c, use all mpn,
25466 add mpz_cdiv_r_2exp entrypoint.
25467 * mpz/fdiv_q_2exp.c, mpz/fdiv_r_2exp.c: Remove files.
25468 * mpz/Makefile.am (libmpz_la_SOURCES): Update.
25469 * Makefile.am (MPZ_OBJECTS): Ditto.
25470
25471 * gmp-impl.h (USE_LEADING_REGPARM): Use __i386__ same as longlong.h
25472 (REGPARM_2_1, REGPARM_3_1, REGPARM_ATTR): New macros.
25473 * mpz/jacobi.c (jac_or_kron): Use them.
25474
25475 * configure.in (HAVE_ABI_$ABI): Re-enable this for config.m4, with
25476 dots changed to underscores (necessary for hppa).
25477
25478 * tests/mpz/t-divis.c, tests/mpz/t-divis_2exp.c: New files.
25479 * tests/mpz/Makefile.am (check_PROGRAMS): Add them.
25480
25481 * gmp-h.in (mpz_divisible_p, mpz_divisible_ui_p,
25482 mpz_divisible_2exp_p): Add prototypes.
25483 * gmp.texi (Integer Division): Add mpz_divisible_p.
25484 (Efficiency): Add remarks about divisibility testing.
25485
25486 * mpz/divis.c, mpz/divis_ui.c, mpz/divis_2exp.c: New files.
25487 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
25488 * Makefile.am (MPZ_OBJECTS): Ditto.
25489
25490 * mpn/generic/divis.c: New file.
25491 * configure.in (gmp_mpn_functions): Add it.
25492 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Ditto.
25493 * gmp-impl.h (mpn_divisible_p): Add prototype.
25494
25495 * urandom.h: Remove file.
25496 * Makefile.am (EXTRA_DIST): Remove it.
25497
25498 * tests/mpz/convert.c, dive.c, io.c, logic.c, reuse.c, t-2exp.c,
25499 t-fdiv.c, t-fdiv_ui.c, t-gcd.c, t-jac.c, t-mul.c, t-pow.c,
25500 t-powm.c, t-powm_ui.c, t-root.c, t-sqrtrem.c, t-tdiv.c,
25501 t-tdiv_ui.c: Use RANDS, initialized by tests_rand_start.
25502
25503 * tests/mpz/t-pow.c: New file, being t-pow_ui renamed and with some
25504 further tests added.
25505 * tests/mpz/t-pow_ui.c: Remove file.
25506 * tests/mpz/Makefile.am (check_PROGRAMS): Update.
25507
25508 * tests/t-modlinv.c: Don't use urandom.h.
25509 * tests/mpz/bit.c, tests/mpz/t-scan.c: Ditto.
25510 * tests/mpq/t-cmp.c, tests/mpq/t-cmp_ui.c, tests/mpq/t-get_d.c: Ditto.
25511 * tests/mpf/reuse.c, t-add.c, t-conv.c, t-dm2exp.c, t-muldiv.c,
25512 t-sqrt.c, t-sub.c: Ditto.
25513
25514 * tests/misc.c (tests_rand_start, tests_rand_end): New functions.
25515 (tests_start, tests_end): Use them.
25516 (urandom): New function.
25517 * tests/tests.h: Add prototypes.
25518
25519 * mpz/random.c: Rewrite using mpz_urandomb and RANDS.
25520 * mpn/generic/random.c: Rewrite using _gmp_rand and RANDS.
25521 * mpn/generic/random2.c: Use RANDS not random() etc.
25522
25523 * gmp-impl.h (__gmp_rands, __gmp_rands_initialized): Add externs.
25524 (gmp_randstate_ptr): New typedef.
25525 (RANDS, RANDS_CLEAR): New macros.
25526
25527 * rands.c: New file.
25528 * Makefile.am (libgmp_la_SOURCES): Add it.
25529
25530 * configure.in (mpn_objs_in_libmp): New AC_SUBST.
25531 * Makefile.am (libmp_la_DEPENDENCIES): Use it.
25532
25533 2001-03-02 Torbjorn Granlund <[email protected]>
25534
25535 * mpn/pa64/udiv_qrnnd.asm: New file.
25536
25537 2001-03-01 Kevin Ryde <[email protected]>
25538
25539 * mpbsd/rpow.c: New file.
25540 * mpbsd/Makefile.am (libmpbsd_la_SOURCES): Add it
25541 (nodist_libmpbsd_la_SOURCES): Remove pow_ui.c.
25542 * Makefile.am (MPBSD_OBJECTS): Add rpow.lo, remove pow_ui.lo.
25543 (libmp_la_DEPENDENCIES): Add mpz/n_pow_ui.lo.
25544
25545 * mpz/ui_pow_ui.c: Rewrite using mpz_n_pow_ui.
25546 * mpz/pow_ui.c: Ditto, and no longer provide rpow for mpbsd.
25547
25548 * mpz/n_pow_ui.c: New file, rewrite of pow_ui.c and ui_pow_ui.c. Use
25549 less temporary memory, strip factors of 2 from the base, use mpn_mul_2
25550 if available.
25551 * mpz/si_pow_ui.c: New file.
25552 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
25553 * Makefile.am (MPZ_OBJECTS): Ditto.
25554 * gmp-impl.h (mpz_n_pow_ui): Add prototype.
25555 * gmp-h.in (mpz_si_pow_ui): Add prototype.
25556 * gmp.texi (Integer Exponentiation): Add mpz_si_pow_ui.
25557
25558 * acinclude.m4 (GMP_C_SIZES): Add BITS_PER_ULONG.
25559 Correction to mp_limb_t working check.
25560 * configure.in (limb_chosen): New variable.
25561 * tests/t-constants.c (BITS_PER_ULONG): Check this value.
25562 Add some reminders about tests that fail on Cray.
25563
25564 * tests/refmpn.c (refmpn_mul_2): New function.
25565 * tests/refmpz.c (refmpz_pow_ui): Copied from tests/mpz/t-pow_ui.c
25566 * tests/tests.h: Add prototypes.
25567
25568 * configure.in (none-*-*): Add ABI=longlong.
25569 * doc/configuration (Long long limb testing): Describe it.
25570
25571 * gmp.texi (Low-level Functions): Move some commented out remarks ...
25572 * mpn/generic/mul_basecase.c: ... to here.
25573
25574 * mpn/x86/README: Note "%=" as an alternative to "1:" in __asm__.
25575
25576 * tests/trace.c (mp_trace_start): Print "bin" for binary.
25577
25578 * mpn/generic/dump.c: Add a couple of casts to keep gcc quiet.
25579
25580 * gmp-h.in (mpn_incr_u, mpn_decr_u): Add parens around arguments.
25581
25582 * mpbsd/mout.c, mpbsd/mtox.c (num_to_text): Remove unused variable.
25583
25584 * mpfr/set_d.c (mpfr_get_d2): Declare "q" for 64-bit limbs.
25585
25586 2001-02-28 Torbjorn Granlund <[email protected]>
25587
25588 * mpn/pa64w/udiv_qrnnd.asm: Tune.
25589
25590 2001-02-27 Torbjorn Granlund <[email protected]>
25591
25592 * mpn/pa64w/udiv_qrnnd.asm: New file.
25593
25594 2001-02-26 Torbjorn Granlund <[email protected]>
25595
25596 * longlong.h (arm): Optimize sub_ddmmss by testing for constant
25597 operands.
25598 * mpn/arm/invert_limb.asm: New file.
25599
25600 2001-02-24 Torbjorn Granlund <[email protected]>
25601
25602 * mpn/generic/lshift.c: Rewrite.
25603 * mpn/generic/rshift.c: Rewrite.
25604
25605 * longlong.h: Use UWtype for external interfaces that expect mp_limb_t.
25606
25607 * longlong.h (arm): #define invert_limb.
25608
25609 * mpn/arm: Make labels have local scope.
25610
25611 * configure.in (arm*-*-*): Set extra_functions.
25612 * longlong.h (arm): #define udiv_qrnnd.
25613 * mpn/arm/udiv.asm: New file.
25614
25615 2001-02-24 Kevin Ryde <[email protected]>
25616
25617 * tune/many.pl: Add mpn_count_leading_zeros, mpn_count_trailing_zeros
25618 and mpn_invert_limb. Add count_leading_zeros, count_trailing_zeros
25619 from a .h file. Correction to modexact_1_odd prototype. Support
25620 ansi2knr.
25621 * tune/speed.h, tune/common.c: Consequent changes.
25622
25623 * demos/expr/*: Make a few more functions available in expressions,
25624 create only libexpr.a, misc minor updates.
25625
25626 * mpn/Makeasm.am: Add some comments about suffix ordering.
25627
25628 * tests/refmpn.c (rshift_make, lshift_make): No need to compare
25629 unsigned to zero.
25630
25631 * mpq/mul.c: Detect and optimize squaring.
25632
25633 2001-02-23 Torbjorn Granlund <[email protected]>
25634
25635 * mpn/mips3: Convert files to `.asm'.
25636
25637 * mpn/arm: Convert files to `.asm'. Misc cleanups.
25638 * mpn/arm/submul_1.asm: New file.
25639
25640 2001-02-21 Kevin Ryde <[email protected]>
25641
25642 * tune/tuneup.c (all): Only one compiler print should match, no need
25643 for #undef PRINTED_COMPILER.
25644
25645 * mpfr/mpfr.h (mpfr_sgn): Use mpfr_cmp_ui (patch from Paul).
25646
25647 * mpz/fib_ui.c: Update some remarks about alternative algorithms.
25648 * gmp.texi (Fibonacci Numbers Algorithm): Ditto.
25649 (Assigning Floats): Clarify mpf_swap swaps the precisions too.
25650 (Low-level Functions): Try to be clearer about negative cofactors.
25651
25652 2001-02-21 Torbjorn Granlund <[email protected]>
25653
25654 * mpn/sparc64/copyi.asm: Streamline for small operands.
25655 * mpn/sparc64/add_n.asm: Likewise.
25656 * mpn/sparc64/sub_n.asm: Likewise.
25657
25658 * mpn/sparc64/copyd.asm: New file.
25659
25660 2001-02-20 Torbjorn Granlund <[email protected]>
25661
25662 * mpn/sparc64/lshift.asm: Rewrite.
25663 * mpn/sparc64/rshift.asm: Rewrite.
25664
25665 2001-02-19 Torbjorn Granlund <[email protected]>
25666
25667 * mpn/sparc64/add_n.asm: Rewrite using `majority' logic.
25668 * mpn/sparc64/sub_n.asm: Likewise.
25669
25670 * tune/tuneup.c (all): Recognise DECC and MIPSpro compilers.
25671
25672 * mpn/pa64/sqr_diagonal.asm: Use PROLOGUE/EPILOGUE.
25673 * mpn/pa642/sqr_diagonal.asm: Likewise.
25674
25675 * configure.in (HAVE_ABI_$abi): Disable for now.
25676
25677 * mpn/asm-defs.m4 (PROLOGUE): Use LABEL_SUFFIX.
25678
25679 * acinclude.m4 (GMP_ASM_ATTR): New check, for hppa oddities.
25680
25681 2001-02-18 Torbjorn Granlund <[email protected]>
25682
25683 * mpn/hppa/hppa1_1/gmp-mparam.h: New file.
25684 * mpn/hppa/hppa2_0/gmp-mparam.h: New file.
25685
25686 * mpn/pa64/sqr_diagonal.asm: New file.
25687 * mpn/pa64w/sqr_diagonal.asm: New file.
25688 * mpn/hppa/hppa1_1/sqr_diagonal.asm: New file.
25689 * mpn/hppa/hppa2_0/sqr_diagonal.asm: New file.
25690
25691 * mpn/sparc32/v9/add_n.asm: Use `fitod' instead of `fxtod' for dummy
25692 FA-pipeline insns.
25693 * mpn/sparc32/v9/sub_n.asm: Likewise.
25694
25695 2001-02-18 Kevin Ryde <[email protected]>
25696
25697 * gmp.texi (Known Build Problems): Notes on make, $* and K&R, misc
25698 tweaks elsewhere.
25699 (Low-level Functions): Use {} notation in mpn_sqrtrem.
25700 (Basecase Multiplication): Mention BASECASE_SQR_THRESHOLD.
25701
25702 * mpfr/isnan.c (mpfr_number_p): Infinity is not a number.
25703 * mpfr/out_str.c: Pass strlen+1 for the block size to free.
25704 * mpfr/get_str.c: Correction for realloc to strlen+1.
25705
25706 * acinclude.m4 (GMP_C_SIZES): Generate an error if mp_limb_t doesn't
25707 seem to work for some reason.
25708
25709 2001-02-16 Torbjorn Granlund <[email protected]>
25710
25711 * mpn/sparc32/v9/gmp-mparam.h: Retune.
25712
25713 * mpn/sparc32/v9/add_n.asm: New file.
25714 * mpn/sparc32/v9/sub_n.asm: New file.
25715
25716 * mpn/sparc32/v9/mul_1.asm: Tune function entry.
25717 * mpn/sparc32/v9/addmul_1.asm: Likewise.
25718 * mpn/sparc32/v9/submul_1.asm: Likewise.
25719
25720 * mpn/sparc32/v9/sqr_diagonal.asm: New file.
25721
25722 2001-02-16 Kevin Ryde <[email protected]>
25723
25724 * configure.in: Fix flags selection when $CC is a compiler known to us.
25725
25726 * demos/expr/exprfr.c (e_mpfr_cos, e_mpfr_sin): mpfr_sin_cos now
25727 allows NULL for one parameter.
25728
25729 * mpfr/*: Update to 20010215.
25730 * mpfr/trunc.c: Use -DOPERATION scheme, and gmp mpn_zero_p.
25731 * mpfr/sqrt.c: Use plain mpn_sqrtrem, not mpn_sqrtrem_new.
25732 * mpfr/sqrtrem.c: Remove file.
25733 * mpfr/Makefile.am (libmpfr_a_SOURCES): Add isnan.c and set_ui.c,
25734 remove sqrtrem.c and srandom.h.
25735
25736 * configfsf.guess: Update to 2001-02-13.
25737 * configfsf.sub: Update to 2001-02-16.
25738 * config.sub (j90, t90): Remove special handing, configfsf.sub now ok.
25739
25740 * Makefile.am (MPF_OBJECTS): Add a couple of missing $U's.
25741
25742 * tune/tuneup.c: Identify compiler used (GCC and Sun C so far).
25743
25744 2001-02-15 Torbjorn Granlund <[email protected]>
25745
25746 * mpn/sparc32/v9/mul_1.asm: Change `ld' to `lduw' and `st' to `stw'.
25747 * mpn/sparc32/v9/addmul_1.asm: Likewise.
25748 * mpn/sparc32/v9/submul_1.asm: Likewise.
25749
25750 2001-02-14 Torbjorn Granlund <[email protected]>
25751
25752 * mpn/mips3/mips.m4: New file.
25753 * configure.in (mips*-*-irix[6789]*): Use mips3/mips.m4.
25754
25755 * mpn/powerpc64/sqr_diagonal.asm: New file.
25756
25757 * mpn/mips3/sqr_diagonal.asm: New file.
25758
25759 2001-02-12 Torbjorn Granlund <[email protected]>
25760
25761 * mpn/powerpc32/sqr_diagonal.asm: New file.
25762
25763 * mpn/generic/sqr_basecase.c: Remove declaration of mpn_sqr_diagonal.
25764 Fix typo in header comment.
25765
25766 2001-02-12 Kevin Ryde <[email protected]>
25767
25768 * mpn/generic/mul.c, mpn/generic/mul_n.c, gmp-impl.h: Use
25769 mpn_mul_basecase for squaring below new BASECASE_SQR_THRESHOLD.
25770 * tune/tuneup.c gmp-impl.h: Tune BASECASE_SQR_THRESHOLD.
25771
25772 * Makefile.am (libgmp.la, libmp.la): Revert change to build from
25773 mpn/libmpn.la etc, go back to explicitly listed objects.
25774
25775 * configure.in: Recognise sparc64-*-*, not just sparc64-*-linux*.
25776
25777 2001-02-11 Torbjorn Granlund <[email protected]>
25778
25779 * mpn/asm-defs.m4 (sqr_diagonal): New define_mpn.
25780
25781 * mpn/alpha/sqr_diagonal.asm: New file.
25782
25783 2001-02-11 Kevin Ryde <[email protected]>
25784
25785 * gmp.texi (Low-level Functions): Note mpn_get_str clobbers its input
25786 plus 1 extra limb.
25787
25788 * mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
25789 set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
25790 * tests/mpz/reuse.c, tests/mpq/t-md_2exp.c, demos/pexpr.c,
25791 demos/expr/t-expr.c: Ditto.
25792
25793 * configure.in (HAVE_ABI_$abi): New define in config.m4.
25794
25795 * gmp-impl.h (mpn_sqr_diagonal): Add prototype and define.
25796 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of
25797 mpn_sqr_diagonal.
25798
25799 * gmp.texi, acinclude.m4: Mention x86 solaris 2.7 has the reg->reg
25800 movq bug the same as 2.6.
25801
25802 * mpfr/Makefile.am (EXTRA_DIST): Add mpfr-test.h and mpf2mpfr.h.
25803
25804 * mpn/x86/README: Merge contents of README.family.
25805 * mpn/x86/README.family: Remove file.
25806
25807 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mode1o, gcd_finda,
25808 invert_limb, sqr_diagonal; remove mod_1_rs; sort alphabetically.
25809
25810 2001-02-10 Torbjorn Granlund <[email protected]>
25811
25812 * configure.in (gmp_mpn_functions_optional): List sqr_diagonal.
25813
25814 * mpn/powerpc32/aix.m4: Use unnamed csects.
25815 * mpn/powerpc64/aix.m4: Likewise.
25816
25817 * acconfig.h: Add #undef of mpn_sqr_diagonal.
25818 Remove lots of spacing.
25819
25820 * configure.in (syntax testing section): Match power* instead of
25821 powerpc*.
25822 * mpn/power: Convert files to `.asm'.
25823 Prefix umul_ppmm and sdiv_qrnnd.
25824 Update some comments.
25825
25826 2001-02-09 Kevin Ryde <[email protected]>
25827
25828 * acconfig.h: Add HAVE_NATIVE_mpn_modexact_1_odd and
25829 HAVE_NATIVE_mpn_modexact_1c_odd.
25830
25831 * configure.in (CCAS): Don't override a user selection.
25832
25833 * mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
25834
25835 2001-02-08 Torbjorn Granlund <[email protected]>
25836
25837 * mpn/generic/sqr_basecase.c: Use mpn_sqr_diagonal when appropriate.
25838
25839 2001-02-07 Kevin Ryde <[email protected]>
25840
25841 * gmp.texi (Low-level Functions): mpn_preinv_mod_1 now undocumented.
25842
25843 * mpn/generic/random2.c (myrandom): Use rand() on mingw.
25844
25845 * mpn/alpha/gmp-mparam.h: Update tuned parameters.
25846
25847 2001-02-05 Torbjorn Granlund <[email protected]>
25848
25849 * mpn/alpha/ev6/gmp-mparam.h: Retune.
25850
25851 2001-02-05 Kevin Ryde <[email protected]>
25852
25853 * Makefile.am (libgmp, libmp): Construct from mpn/libmpn.la etc rather
25854 than explicitly listed objects.
25855
25856 * urandom.h: Use rand() on mingw.
25857
25858 * mpn/powerpc64/lshift.asm,addsub_n.asm: Use r1 not 1.
25859
25860 2001-02-04 Torbjorn Granlund <[email protected]>
25861
25862 * mpn/ia64/copyi.asm: New file.
25863 * mpn/ia64/copyd.asm: New file.
25864
25865 2001-02-04 Kevin Ryde <[email protected]>
25866
25867 * mpn/alpha/ev5/gmp-mparam.h, mpn/mips3/gmp-mparam.h,
25868 mpn/powerpc32/gmp-mparam.h, mpn/powerpc64/gmp-mparam.h,
25869 mpn/sparc64/gmp-mparam.h, mpn/x86/*/gmp-mparam.h:
25870 Update tuned parameters.
25871
25872 * mpn/x86/i486: New directory.
25873 * configure.in (i486-*-*): Use it.
25874 * mpn/x86/i486/gmp-mparam.h: New file.
25875
25876 * mpn/x86/pentium/mode1o.asm: New file.
25877 * mpn/x86/p6/mode1o.asm: New file.
25878
25879 * tune/many.pl: Use $(ASMFLAGS_PIC) and $(CFLAGS_PIC).
25880
25881 * gmp.texi (Integer Division): Another rewording of 2exp divisions.
25882
25883 2001-02-03 Torbjorn Granlund <[email protected]>
25884
25885 * mpn/arm/gmp-mparam.h: Tune.
25886
25887 * mpn/ia64/popcount.asm: Put a `;;' break at end of main loop.
25888
25889 * configure.in (arm*-*-*): Set gcc_cflags in order to pass
25890 $fomit_frame_pointer.
25891
25892 * tests/mpz/t-mul.c (base_mul): Remove an unused variable.
25893
25894 2001-02-02 Torbjorn Granlund <[email protected]>
25895
25896 * demos/pexpr.c (TIME): New macro.
25897 (main): Use TIME--print timing more accurately.
25898 (setup_error_handler): Increase RLIMIT_DATA to 16 Mibyte.
25899
25900 * longlong.h (arm): Add __CLOBBER_CC to add_ssaaaa and sub_ddmmss.
25901
25902 2001-02-02 Kevin Ryde <[email protected]>
25903
25904 * configure.in: Don't remove gmp-mparam.h and mpn source links under
25905 --no-create since in that case they're not re-created.
25906
25907 * demos/expr: New directory.
25908 * Makefile.am (SUBDIRS, allprogs): Add it.
25909 * demos/expr/README, Makefile.am, expr.c, exprv.c, exprz.c, exprza.c,
25910 exprq.c, exprqa.c, exprfa.c, exprf.c, exprfr.c, exprfra.c, expr.h,
25911 expr-impl-h.in, run-expr.c, t-expr.c: New files.
25912 * configure.in: Generate demos/expr/Makefile & demos/expr/expr-impl.h.
25913
25914 * Makefile.am: Remove mpfr from main libgmp.
25915 * mpfr/Makefile.am: Build and install separate libmpfr.a.
25916 * mpfr/*: Update to mpfr 2001.
25917
25918 * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 2.
25919 * Makefile.am (libtool -version-info): Bump appropriately.
25920 * NEWS: Updates.
25921
25922 * tune/divrem1div.c, tune/divrem1inv.c, tune/divrem2div.c,
25923 tune/divrem2inv.c: Renamed from divrem_1_div.c, divrem_1_inv.c,
25924 divrem_2_div.c, divrem_2_inv.c, to be unique in DOS 8.3 filenames.
25925 * tune/Makefile.am (libspeed_la_SOURCES): Update.
25926
25927 * mpn/x86/*/README, mpn/x86/README.family: Misc updates.
25928 * tune/README: Misc updates.
25929 * doc/configuration: Misc updates.
25930
25931 * mpn/x86/pentium/mmx/gmp-mparam.h: Change UDIV_PREINV_TIME to
25932 UDIV_NORM_PREINV_TIME.
25933
25934 * mpz/pprime_p.c: Use ASSERT_ALWAYS instead of abort.
25935
25936 * rand.c (__gmp_rand_lc_scheme): Add "const".
25937 (struct __gmp_rand_lc_scheme_struct): Make astr "const char *".
25938
25939 * demos/calc/calc.y, demos/calc/calclex.l: Add kron function.
25940
25941 * tests/devel/try.c: Partial rewrite, new scheme of function types,
25942 allow result validation functions, add sqrtrem and jacobi testing.
25943 * tune/many.pl: Corresponding updates.
25944 * tests/devel/Makefile.am: Add a convenience rule for libtests.la.
25945
25946 * tests/refmpz.c: New file.
25947 * tests/Makefile.am: Add it.
25948 * tests/misc.c (mpz_erandomb, mpz_erandomb_nonzero): New functions.
25949 * tests/tests.h: Add prototypes.
25950
25951 * mpn/x86/k6/cross.pl: Add a couple more exceptions.
25952
25953 * gmp.texi: Don't use @nicode{'\0'}, it doesn't come out right in tex.
25954 (Introduction to GMP): Mention Cray vector systems.
25955 (Build Options): Describe --enable-mpfr, refer to its manual. Add
25956 Crays under supported CPUs.
25957 (Debugging): Add notes on source file paths.
25958 (Autoconf): New section.
25959 (Assigning Integers): Note truncation by mpz_set_d, mpz_set_q and
25960 mpz_set_f.
25961 (Converting Integers): Note the size mpz_get_str allocates.
25962 (Floating-point Functions): Rewrite introduction, clarifying some
25963 points about precision handling.
25964 (Converting Floats): Note the size mpf_get_str allocates, and that it
25965 gives an empty string for zero. Add mpf_get_si and mpf_get_ui.
25966 (Float Comparison): Give the formula mpf_reldiff calculates.
25967 (Miscellaneous Float Functions): Add mpf_integer_p and mpf_fits_*_p.
25968 (Random Number Functions): Misc rewordings for clarity.
25969 (Random State Initialization): Ditto.
25970 (Custom Allocation): Remove note on deallocate_function called with 0,
25971 misc rewording and clarifications.
25972 (Exact Remainder): New section.
25973 (Binary GCD): A few words on initial reduction using division.
25974 (Accelerated GCD): Refer to exact remainder section.
25975 (Extended GCD): Extra remarks on single versus double selection.
25976 (Jacobi Symbol): Update for mpz/jacobi.c rewrite and modexact_1_odd.
25977 (Modular Powering Algorithm): Refer to exact remainder section.
25978 (Assembler SIMD Instructions): Update remarks on MMX.
25979 (Contributors): Amend to "Divide and Conquer" division.
25980 (References): Tweak some formatting. Add "Proof of GMP Fast Division
25981 and Square Root Implementations" by Paul Zimmermann.
25982
25983 2001-01-31 Torbjorn Granlund <[email protected]>
25984
25985 * configure.in: Don't ever pass -mips3; let ABI flags imply ISA.
25986
25987 2001-01-31 Kevin Ryde <[email protected]>
25988
25989 * tune/time.c: Remove unnecessary longlong.h.
25990 (speed_endtime): Add some extra diagnostics.
25991
25992 * tests/mpz/t-fdiv_ui.c, tests/mpz/t-tdiv_ui.c: Use unsigned long for
25993 the divisor, not mp_limb_t.
25994 * tests/mpz/t-jac.c (try_base): Use %llu for long long limb.
25995 * tests/trace.c: Add <string.h> for strlen.
25996
25997 * tune/freq.c (speed_cpu_frequency_proc_cpuinfo): Ignore "cycle
25998 frequency" of 0, allow "BogoMIPS" as well as "bogomips".
25999
26000 * macos/Makefile.in: Add mpf/fits_s.c and mpf/fits_u.c objects.
26001
26002 2001-01-30 Torbjorn Granlund <[email protected]>
26003
26004 * longlong.h: Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
26005
26006 2001-01-29 Torbjorn Granlund <[email protected]>
26007
26008 * mpn/powerpc64/addmul_1.asm: Prefix registers with an `r'.
26009 * mpn/powerpc64/submul_1.asm: Likewise.
26010 * mpn/powerpc64/mul_1.asm: Likewise.
26011
26012 * configure.in (alpha*-*-*): Amend last change to handle pca*.
26013
26014 2001-01-29 Kevin Ryde <[email protected]>
26015
26016 * tune/speed.h (SPEED_ROUTINE_INVERT_LIMB_CALL): Don't let the
26017 compiler optimize everything away.
26018
26019 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Measure
26020 operator_div, operator_mod, mpn_divrem_2_div, mpn_divrem_2_inv,
26021 mpn_sb_divrem_m3, mpn_sb_divrem_m3_div, mpn_sb_divrem_m3_inv,
26022 mpn_dc_divrem_sb_div, mpn_dc_divrem_sb_inv.
26023 * tune/divrem_2_div.c, tune/divrem_2_inv.c, tune/sb_div.c,
26024 tune/sb_inv.c: New files.
26025
26026 * tune/tuneup.c, gmp-impl.h, tune/speed.h, tune/common.c,
26027 tune/Makefile.am: Tune SB_PREINV_THRESHOLD and DIVREM_2_THRESHOLD.
26028
26029 * mpn/generic/divrem_2.c: Use new DIVREM_2_THRESHOLD.
26030 * mpn/generic/sb_divrem_mn.c: Use new SB_PREINV_THRESHOLD.
26031
26032 * mpn/x86/p6/mmx/lshift.asm, mpn/x86/p6/mmx/rshift.asm: New files,
26033 just m4 include()ing the P55 code.
26034 * configure.in (pentium[23]-*-*): Remove x86/pentium/mmx from path.
26035
26036 2001-01-27 Kevin Ryde <[email protected]>
26037
26038 * configure.in (AC_CHECK_FUNCS): Add srand48.
26039 * tune/speed.c: Use this test.
26040
26041 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): Allow "egcs-" prefix on gcc
26042 --version, warn if the format is unrecognised.
26043 (GMP_COMPARE_GE): Guard against empty $1 not only on last arg.
26044 (GMP_INIT, GMP_FINISH, GMP_PROG_M4): Obscure or eliminate literal
26045 "dnl"s since autoconf thinks they indicate faulty macros.
26046
26047 * mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
26048 strlen(str)+1 bytes.
26049 * mpz/dump.c, mpf/dump.c, tests/mpz/convert.c: Use this size when
26050 freeing.
26051 * tests/mpf/t-conv.c: Ditto, and ensure x==0 is exercised.
26052
26053 * tests/mpz/t-fits.c: New file.
26054 * tests/mpz/Makefile.am: Add it.
26055
26056 * tests/mpf/t-fits.c: New file.
26057 * tests/mpf/t-get_si.c: New file.
26058 * tests/mpf/t-int.c: New file.
26059 * tests/mpf/Makefile.am: Add them.
26060
26061 * mpf/fits_s.c: New file.
26062 * mpf/fits_u.c: New file.
26063 * mpf/get_si.c: New file.
26064 * mpf/get_ui.c: New file.
26065 * mpf/int_p.c: New file.
26066 * Makefile.am, mpf/Makefile.am: Add them.
26067 * gmp-h.in (mpf_fits_*_p, mpf_get_si, mpf_get_ui, mpf_integer_p): Add
26068 prototypes.
26069
26070 * tests/memory.c (tests_allocate, tests_reallocate): Guard against
26071 size==0.
26072
26073 * tests/mpz/*.c, tests/mpq/*.c, tests/mpf/*.c: Uses tests_start and
26074 tests_end.
26075
26076 * gmp-impl.h (USE_LEADING_REGPARM): Fix conditionals.
26077
26078 2001-01-23 Kevin Ryde <[email protected]>
26079
26080 * configure.in, mpn/Makeasm.am (ASMFLAGS_PIC): New substitution,
26081 allowing -DPIC to be suppressed on cygwin.
26082 (CFLAGS_PIC): New substitution, use it and $(CCAS) directly, rather
26083 than $(LIBTOOL), avoiding a problem with FreeBSD 2.2.8.
26084
26085 * mpn/x86/k6/mode1o.asm, mpn/x86/k7/mode1o.asm: Remove an unnecessary
26086 +[.-L(here)] from _GLOBAL_OFFSET_TABLE_, avoids a segv from gas 1.92.3.
26087 * mpn/x86/README.family: Add notes on the problem.
26088
26089 2001-01-20 Torbjorn Granlund <[email protected]>
26090
26091 * configure.in (alpha*-*-*): Default `flavour' to ev4.
26092
26093 2001-01-19 Kevin Ryde <[email protected]>
26094
26095 * assert.c, gmp-impl.h (__gmp_assert_fail): Change return type to
26096 void, since it's no longer used in expressions.
26097
26098 * mpn/x86/addsub_n.S: Remove file, since it doesn't work and it upsets
26099 tune/many.pl.
26100
26101 * mpz/jacobi.c: Rewrite, but still binary algorithm; accept zero and
26102 negative denominators; merge mpz_jacobi and mpz_legendre, add
26103 mpz_kronecker; use mpn directly, add special cases for size==1.
26104 * gmp.texi (Number Theoretic Functions): Update.
26105 * gmp-h.in (mpz_kronecker): Add prototype.
26106 * gmp-impl.h (USE_LEADING_REGPARM): New macro.
26107 * tests/mpz/t-jac.c: Test mpz_kronecker.
26108 * mpz/legendre.c: Remove file.
26109 * Makefile.am, mpz/Makefile.am: Update.
26110
26111 * longlong.h (alpha count_leading_zeros): Use __attribute__ ((const))
26112 when possible, add parameter to prototype.
26113 (ia64 udiv_qrnnd): Use for all compilers, not just gcc.
26114 (pentium count_trailing_zeros): Use count_leading_zeros.
26115
26116 * acinclude.m4 (GMP_C_ATTRIBUTE_CONST, GMP_C_ATTRIBUTE_NORETURN): New
26117 macros.
26118 * configure.in: Use them.
26119 * gmp-impl.h (ATTRIBUTE_CONST, ATTRIBUTE_NORETURN): New macros.
26120 (mpn_invert_limb): Add ATTRIBUTE_CONST.
26121 (__gmp_assert_fail): Add ATTRIBUTE_NORETURN.
26122
26123 2001-01-18 Kevin Ryde <[email protected]>
26124
26125 * gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
26126 __gmp_free_func): Move prototypes from gmp-impl.h to gmp-h.in, for the
26127 benefit of gmp++.h.
26128
26129 * gmp-impl.h, tests/misc.c, tests/tests.h: Move MPZ_SET_STR_OR_ABORT
26130 and MPF_SET_STR_OR_ABORT to mpz_set_str_or_abort and
26131 mpf_set_str_or_abort in libtests.
26132 * tests/mpz/convert.c, tests/mpz/t-bin.c, tests/mpz/t-get_si.c,
26133 tests/mpz/t-jac.c, tests/mpz/t-misc.c, tests/mpq/t-md_2exp.c,
26134 tests/mpq/t-set_f.c, tests/mpf/t-conv.c, tests/mpf/t-misc.c: Update.
26135
26136 * mpn/generic/sqrtrem.c: Use MPN_COPY_INCR (for when rp==NULL).
26137
26138 * tests/mpz/reuse.c: Only run mpz_divexact_gcd on positive divisors.
26139
26140 2001-01-18 Torbjorn Granlund <[email protected]>
26141
26142 * demos/pexpr.c (main): Accept -vml option.
26143 (fns): List `hamdist', `pow', `nextprime'.
26144 (mpz_eval_expr): Return -1 for `popc' of negative.
26145 (mpz_eval_expr): Handle `hamdist', `pow', `nextprime'.
26146
26147 2001-01-15 Kevin Ryde <[email protected]>
26148
26149 * mpn/alpha/ev5/mode1o.c: New file.
26150
26151 * tune/freq.c (speed_cpu_frequency_measure): Check cycles_works_p
26152 before running speed_cyclecounter.
26153 * tune/speed.h (cycles_works_p): Add prototype.
26154
26155 2001-01-13 Torbjorn Granlund <[email protected]>
26156
26157 * tests/rand/t-rand.c (farr): Fix typo.
26158 (zarr): Fix typo.
26159
26160 2001-01-12 Kevin Ryde <[email protected]>
26161
26162 * mpz/kronsz.c: Don't depend on right shifting a negative.
26163
26164 * mpn/x86/gmp-mparam.h: New file.
26165
26166 * mpn/x86/pentium/mmx/mul_1.asm: New file.
26167
26168 2001-01-11 Torbjorn Granlund <[email protected]>
26169
26170 * mpz/kronsz.c: Temporary workaround for Cray right shift oddities.
26171 Explicitly compare against zero in tests.
26172
26173 2001-01-10 Kevin Ryde <[email protected]>
26174
26175 * mpz/kronzs.c: Don't depend on right shifting a negative.
26176
26177 2001-01-09 Torbjorn Granlund <[email protected]>
26178
26179 * tests/t-constants.c: Disable some undefined tests.
26180 (CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
26181
26182 2001-01-09 Kevin Ryde <[email protected]>
26183
26184 * tests/t-constants.c: Add more diagnostics.
26185 (CHECK_MAX_S): Fix for gcc 2.95.2 -mpowerpc64 -maix64.
26186
26187 * mpn/x86/k6/mode1o.asm: New file.
26188 * mpn/x86/k7/mode1o.asm: New file.
26189
26190 * mpn/asm-defs.m4 (modexact_1_odd, modexact_1c_odd): New define_mpn's.
26191 (__clz_tab, modlimb_invert_table, PROLOGUE, EPILOGUE): Add asserts for
26192 GSYM_PREFIX.
26193 * mpn/x86/x86-defs.m4 (Zdisp): Add a movzbl.
26194
26195 * tests/mpz/t-jac.c (check_a_zero): New test.
26196 (check_squares_zi): Fix to use (a^2/b), not (a*b/b); revert last
26197 change avoiding a,b=0, both are fine.
26198 (try_2den): Don't use mpz_kronecker_ui for the expected answer.
26199 (try_*): Call abort rather than exit.
26200
26201 * mpz/kronzu.c, mpz/kronzs.c: Fix for a=0.
26202
26203 * tune/tuneup.c (USE_PREINV_MOD_1): Fix to use new DATA_HIGH_LT_R.
26204
26205 2001-01-08 Torbjorn Granlund <[email protected]>
26206
26207 * urandom.h: Amend 2000-11-21 change to also handle cygwin.
26208
26209 2001-01-08 Kevin Ryde <[email protected]>
26210
26211 * tune/many.pl: Updates for move to tests/devel, add modexact_1_odd,
26212 don't assume C files can't have carry-in entrypoints, remove
26213 $(TRY_TESTS_OBJS) now in libtests.
26214
26215 * tests/devel/try.c, tests/refmpn.c, tests/tests.h: Remove
26216 mpn_mod_1_rshift testing.
26217
26218 * tune/tuneup.c (fft_step_size): Test for overflow using the actual
26219 mp_size_t, don't use BITS_PER_INT.
26220
26221 * tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
26222 change LONG_ONES to LIMB_ONES.
26223 * tune/time.c (M_2POWU): Use INT_MAX rather than BITS_PER_INT.
26224
26225 * extract-dbl.c (BITS_PER_PART): Use BITS_PER_MP_LIMB not
26226 BITS_PER_LONGINT.
26227
26228 * mpz/inp_raw.c, mpz/out_raw.c: Add private defines of BITS_PER_CHAR.
26229 * mpz/fac_ui.c, tests/mpz/t-fac_ui.c: Don't use BITS_PER_LONGINT.
26230 * tests/mpz/t-get_si.c: Don't use BITS_PER_LONGINT, do the LONG_MAX
26231 tests with some explicit code.
26232
26233 * mpn/*/gmp-mparam.h, acinclude.m4, tests/t-constants.c
26234 (BITS_PER_LONGINT, BITS_PER_INT, BITS_PER_SHORTINT, BITS_PER_CHAR):
26235 Remove defines, remove probings, remove tests.
26236
26237 * tune/tuneup.c (MODEXACT_1_ODD_THRESHOLD): Add tuning.
26238
26239 * tune/speed.c,speed.h,common.c: Add measuring of mpn_modexact_1_odd,
26240 mpn_gcd_finda, and an "N" form for mpn_gcd_1.
26241
26242 * tests/mpz/t-jac.c (check_squares_zi): Ensure random a,b != 0.
26243
26244 2001-01-07 Kevin Ryde <[email protected]>
26245
26246 * configure.in (gmp_mpn_functions): Add mode1o, remove mod_1_rs.
26247
26248 * mpn/generic/mod_1_rs.c: Remove file, no longer needed.
26249 * gmp-h.in (mpn_mod_1_rshift): Remove prototype and define.
26250
26251 * mpq/set_f.c: Use MPN_STRIP_LOW_ZEROS_NOT_ZERO.
26252
26253 * mpz/kronzu.c, mpz/kronzs.c, mpz/kronuz.c, mpz/kronsz.c: Use
26254 mpn_modexact_1_odd, new style MPN_STRIP_LOW_ZEROS_NOT_ZERO, and new
26255 JACOBI macros. Various rearrangements supporting all this.
26256
26257 * mpn/generic/gcd_1.c: Use mpn_modexact_1_odd, reduce u%v if u much
26258 bigger than v when size==1, some rearrangements supporting this.
26259
26260 * gmp-impl.h (JACOBI_*): More macros, add some casts to "int".
26261 (MPN_STRIP_LOW_ZEROS_NOT_ZERO): Add a "low" parameter.
26262 (mpn_modexact_1_odd, mpn_modexact_1c_odd): Add prototype and defines.
26263 (MODEXACT_1_ODD_THRESHOLD): New threshold.
26264 (MPN_MOD_OR_MODEXACT_1_ODD, JACOBI_MOD_OR_MODEXACT_1_ODD): New macros.
26265
26266 * mpn/generic/mode1o.c: New file.
26267
26268 * tests/mpz/reuse.c: Add testing of mpz_divexact_gcd.
26269 * tests/mpz/t-fac_ui.c: Use libtests for memory leak checking.
26270 * tests/mpz/t-fib_ui.c: Add a usage comment.
26271
26272 * tests/mpz/bit.c: Use libtests.
26273 * tests/mpz/t-scan.c: Remove unused subroutines.
26274 * tests/devel/try.c: Use libtests, define PROT_NONE if the system
26275 doesn't.
26276
26277 * tests/spinner.c, tests/x86check.c: Use tests.h.
26278 * tests/trace.c: Use tests.h, add mpf_trace.
26279 * tests/refmpn.c: Use tests.h, add refmpn_malloc_limbs_aligned,
26280 refmpn_tstbit, refmpn_neg.
26281
26282 * tune/common.c, tune/speed.h: Update for functions moved to
26283 tests/misc.c.
26284
26285 * tune/Makefile.am, tests/mpz/Makefile.am, tests/mpq/Makefile.am,
26286 tests/mpf/Makefile.am: Use tests/libtests.la.
26287
26288 * configure.in (AC_OUTPUT): Update for new directories.
26289 (x86 CALLING_CONVENTIONS_OBJS): Use .lo for libtests.la, allow
26290 ansi2knr on x86check.c.
26291
26292 * tests/Makefile.am: Establish new libtests.la convenience library,
26293 add mpz, mpq, mpf, mpbsd subdirectories.
26294 * tests/tests.h: New file.
26295 * mpn/tests/ref.h,try.h: Remove files, now in tests.h.
26296
26297 * tests/mpf/ref.c: Move to tests/refmpf.c, rename functions to refmpf.
26298 * tests/mpf/t-add.c, tests/mpf/t-sub.c: Use libtests.
26299 * tests/mpf/Makefile.am: Update.
26300
26301 * tests/memory.c: New file.
26302 * tests/misc.c: New file, a few subroutines from the test programs.
26303
26304 * mpz/tests, mpq/tests, mpf/tests, mpbsd/tests: Move directories to
26305 tests/mpz etc.
26306 * mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpbsd/Makefile.am
26307 (SUBDIRS): Remove.
26308
26309 * tests/devel: New directory.
26310 * mpn/tests/*.c: Move programs to tests/devel.
26311 * mpn/tests/Makefile.am, mpn/tests/README: Move to tests/devel, update.
26312
26313 * mpn/tests/ref.c: Move to tests/refmpn.c.
26314 * mpn/tests/spinner.c,trace.c,x86call.asm,x86check.c: Move to tests
26315 directory.
26316
26317 * tests/t-constants.c: Add checks of HIGHBIT, MAX and MIN constants,
26318 simplify ANSI vs K&R stringizing, use correct printf format types, do
26319 all tests before aborting.
26320
26321 2001-01-05 Torbjorn Granlund <[email protected]>
26322
26323 * mpn/cray/ieee/gmp-mparam.h: Retune.
26324
26325 2001-01-05 Kevin Ryde <[email protected]>
26326
26327 * configure.in (mp.h): Only create this under --enable-mpbsd.
26328
26329 * demos/calc: New subdirectory, move demos/calc* to it.
26330 * demos/calc/Makefile.am: New file, split from demos/Makefile.am.
26331 * demos/Makefile.am: Update.
26332 * configure.in (AC_OUTPUT): Add demos/calc/Makefile.
26333
26334 * tests/t-constants.c (CALC_BITS_PER_TYPE etc): Use a run-time test
26335 for how many bits work in a give type, don't assume bits==8*sizeof.
26336
26337 2001-01-04 Kevin Ryde <[email protected]>
26338
26339 * mpz/fits_s.c, mpz/fits_u.c: New files, split from fits.c, use plain
26340 UINT_MAX etc, not MPZ_FITS_UTYPE_SDT etc.
26341 * mpz/fits.c: Remove file.
26342 * mpz/Makefile.am, macos/Makefile.in: Update.
26343
26344 * gmp-impl.h (UNSIGNED_TYPE_MAX etc): Remove these generic forms.
26345 (MPZ_FITS_[SU]TYPE_SDT): Remove these.
26346 (UINT_MAX etc): Provide a full set of defaults.
26347 * gmp-h.in (__GMP_MP_SIZE_T_INT): New define.
26348
26349 * mpz/tests/t-scan.c: New file.
26350 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
26351
26352 * mpz/scan0.c, mpz/scan1.c: Rewrite, don't read beyond allocated
26353 memory, support negatives, return ULONG_MAX for no bit found.
26354 * gmp.texi (Integer Logic and Bit Fiddling): Update.
26355
26356 2001-01-03 Torbjorn Granlund <[email protected]>
26357
26358 * mpz/tests/dive.c: Generate test operands using new random functions.
26359 * mpz/tests/io.c: Likewise.
26360 * mpz/tests/logic.c: Likewise.
26361 * mpz/tests/t-2exp.c: Likewise.
26362
26363 * stack-alloc.c (__gmp_tmp_alloc): Round `now' to required alignment.
26364
26365 * stack-alloc.h (__TMP_ALIGN): Append `L'.
26366
26367 * gmp-impl.h: For Cray, #include limits.h.
26368 (LONG_MIN): New #define.
26369 (ULONG_HIGHBIT): #define in terms of ULONG_MAX.
26370 (LONG_HIGHBIT): #define as LONG_MIN.
26371 (USHRT_MAX): New name for USHORT_MAX.
26372 (SHRT_MAX): New name for SHORT_MAX.
26373 (SHRT_MIN): New #define.
26374 (USHORT_HIGHBIT,SHORT_HIGHBIT): Removed.
26375
26376 * mpbsd/tests/t-misc.c (check_itom [data]): *SHORT* => *SHRT*;
26377 remove code disabling a test for Cray.
26378
26379 * tests/t-constants.c (CHECK_CONSTANT): Cast parameters to long.
26380
26381 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove unused variable `t'.
26382 (mpn_kara_mul_n): Likewise.
26383
26384 * mpz/fac_ui.c (MPZ_SET_1_NZ): Actually use `__z'.
26385
26386 * mpz/tests/t-jac.c
26387 (main, check_squares_zi): Generate test operands using new random
26388 functions.
26389
26390 All changes below on this date for enabling `make; make check'
26391 with C++ compilers:
26392
26393 * mpz/tests/t-pow_ui.c (debug_mp, ref_mpz_pow_ui): Provide prototypes.
26394
26395 * mpz/tests/t-mul.c (debug_mp, base_mul, ref_mpz_mul):
26396 Provide prototypes.
26397 (dump_abort): Provide prototype and declare properly for C++.
26398
26399 * mpz/tests/t-jac.c: #include stdlib.h and sys/time.h.
26400
26401 * mpz/tests/t-fdiv.c
26402 (dump_abort): Provide prototype and declare properly for C++.
26403 (debug_mp): Provide prototype.
26404 * mpz/tests/t-fdiv_ui.c: Likewise.
26405 * mpz/tests/t-gcd.c: Likewise.
26406 * mpz/tests/t-powm.c: Likewise.
26407 * mpz/tests/t-powm_ui.c: Likewise.
26408 * mpz/tests/t-sqrtrem.c: Likewise.
26409 * mpz/tests/t-tdiv_ui.c: Likewise.
26410 * mpz/tests/t-tdiv.c: Likewise.
26411
26412 * mpz/tests/t-2exp.c: #include stdlib.h and sys/time.h.
26413 Remove #include of longlong.h.
26414
26415 * mpz/tests/io.c: #include config.h, stdlib.h, sys/time.h, and
26416 conditionally unistd.h.
26417
26418 * mpz/tests/dive.c: #include stdlib.h and sys/time.h.
26419 (dump_abort): Provide prototype and declare properly for C++.
26420 (debug_mp): Provide prototype.
26421 * mpz/tests/logic.c: Likewise.
26422
26423 * mpz/tests/convert.c (debug_mp): Provide prototype.
26424 * mpz/tests/t-root.c (debug_mp): Likewise.
26425
26426 * mpz/tests/bit.c: #include stdlib.h and sys/time.h.
26427
26428 * mpq/tests/t-get_d.c: #include stdlib.h and sys/time.h.
26429 (dump): Provide prototype and declare properly for C++.
26430
26431 * mpq/tests/t-cmp_ui.c: #include stdio.h, stdlib.h and sys/time.h.
26432 (ref_mpq_cmp_ui): Declare properly for C++.
26433
26434 * mpq/tests/t-cmp.c: #include stdlib.h and sys/time.h.
26435 (ref_mpq_cmp): Declare properly for C++.
26436 (dump): Delete unused function.
26437
26438 * mpf/random2.c (myrandom): New function.
26439 (mpf_random2): Use it.
26440
26441 * mpn/generic/random2.c: #include stdlib.h (for random/mrand48).
26442 (myrandom): New function.
26443 (mpn_random2): Use it.
26444
26445 * mpf/tests/t-add.c: #include stdlib.h and sys/time.h.
26446 (oo): Remove unused function.
26447 * mpf/tests/t-conv.c: Likewise.
26448 * mpf/tests/t-sub.c: Likewise.
26449 * mpf/tests/t-dm2exp.c: Likewise.
26450 * mpf/tests/t-muldiv.c: Likewise.
26451 * mpf/tests/t-sqrt.c: Likewise.
26452
26453 * mpf/tests/reuse.c: #include stdlib.h and sys/time.h.
26454 Use PROTO on some typedefs.
26455 (oo): Remove function.
26456 (dump_abort): Call mpf_dump instead of oo.
26457
26458 * mpf/set_str.c: #include stdlib.h (for strtol).
26459
26460 * mpf/random2.c: #include stdlib.h (for random/mrand48).
26461 * mpn/alpha/udiv_arnnd: File deleted.
26462
26463 * Remove K&R function headers.
26464
26465 2001-01-02 Torbjorn Granlund <[email protected]>
26466
26467 * mpn/generic/mul.c: Clean up spacing and indentation.
26468
26469 * mpn/generic/mul_fft.c (mpn_fft_add_modF): Use mpn_decr_u.
26470 Clean up spacing and indentation.
26471
26472 * extract-dbl.c: Generalize to handle smaller limb sizes.
26473
26474 2001-01-01 Torbjorn Granlund <[email protected]>
26475
26476 * mpbsd/mout.c: Output newline after "0".
26477
26478 2000-12-31 Torbjorn Granlund <[email protected]>
26479
26480 * ltmain.sh: Remove space between `#!' and `$SHELL' when generating
26481 `libtool'.
26482
26483 * mpbsd/tests/t-misc.c (check_itom): Exclude test for all Cray
26484 vector systems. Correct comment.
26485
26486 2000-12-31 Kevin Ryde <[email protected]>
26487
26488 * gmp.texi (ABI and ISA): New enough gcc needed for mips n32 etc, gcc
26489 2.95 needed for sparc 64-bit ABI, gcc 2.8 needed for -mv8plus.
26490
26491 * configure.in ([cjt]90,sv1-cray-unicos*): Preserve user specified
26492 MPN_PATH, amend test program indenting.
26493 (none-*-*): Add -DNO_ASM to gcc to disable longlong.h asm macros in
26494 generic C.
26495
26496 * config.sub (j90, t90): Preserve these, don't let configfsf.sub turn
26497 them into c90.
26498
26499 * config.guess (m68k-*-nextstep*,m68k-*-openstep*): Don't transform
26500 m68k to m68020, since m68k is already interpreted as 68020.
26501
26502 2000-12-30 Kevin Ryde <[email protected]>
26503
26504 * mpq/neg.c: Rewrite, use mpn, avoid denominator copy if unnecessary.
26505
26506 * mpz/tstbit.c: Rewrite, slightly simplified.
26507 * mpz/tests/bit.c (check_tstbit): New test, and add a couple more
26508 diagnostics elsewhere.
26509
26510 * configure.in (x86 gcc_cflags_cpu): Add -m486 for gcc 2.7.2.
26511 (ccbase): Only use a known compiler in eval statements (avoids
26512 problems with non-symbol characters).
26513 (ccbase): Use GMP_PROG_CC_IS_GNU to identify gcc installed under a
26514 different name.
26515 (cclist): Use same style $abi as other variables.
26516
26517 * acinclude.m4 (GMP_PROG_CC_IS_GNU): New macro.
26518 (GMP_GCC_MARCH_PENTIUMPRO): Use $ccbase to identify gcc.
26519 (GMP_ASM_TYPE): Define TYPE to empty, not "dnl", when no .type needed.
26520 (GMP_ASM_SIZE): Ditto for SIZE, which ensures EPILOGUE on the last
26521 line of a file doesn't leave a tab and no newline.
26522 (GMP_ASM_UNDERSCORE): Add a prototype for C++.
26523
26524 * configure.in (sys/mman.h, mprotect): New tests.
26525 * mpn/tests/try.c: Use them, and HAVE_UNISTD_H too.
26526
26527 * configure.in (getopt.h): Remove test.
26528 * tune/speed.c, mpn/tests/try.c (getopt.h): Remove include, since
26529 plain getopt() is in <unistd.h>.
26530
26531 * configure.in, gmp-h.in (mips*-*-irix6*): Set limb_n32=longlong
26532 rather than using _ABIN32.
26533
26534 2000-12-29 Torbjorn Granlund <[email protected]>
26535
26536 * mpz/tests/reuse.c: Rename dump_abort => dump.
26537 * mpz/tests/reuse.c: Generate operands using gmp_rand*.
26538 * mpz/tests/convert.c: Likewise.
26539
26540 * configure.in: Detect T90-ieee systems; move Cray path
26541 selection to after AC_PROG_CC. Invoke AC_PROG_CPP.
26542 * mpn/cray/cfp: New directory. Move cfp specific files here.
26543 * mpn/cray/cfp/mulwwc90.s: New file.
26544 * mpn/cray/cfp/mulwwj90.s: New file.
26545 * mpn/cray/mulww.s: Delete.
26546
26547 2000-12-27 Torbjorn Granlund <[email protected]>
26548
26549 * mpn/cray/ieee/mul_1.c: New file.
26550 * mpn/cray/ieee/addmul_1.c: New file.
26551 * mpn/cray/ieee/submul_1.c: New file.
26552 * mpn/cray/ieee/gmp-mparam.h: New file.
26553
26554 * mpn/cray/gmp-mparam.h: Disable UMUL_TIME and UDIV_TIME.
26555
26556 * mpn/cray/hamdist.c: New file.
26557 * mpn/cray/popcount.c: New file.
26558 * mpn/cray/rshift.c: New file.
26559 * mpn/cray/lshift.c: New file.
26560
26561 * longlong.h: Add count_leading_zeros for _CRAY.
26562 Reorganize _CRAY stuff.
26563
26564 2000-12-24 Kevin Ryde <[email protected]>
26565
26566 * configure.in (alpha*-cray-unicos*): Disable SPEED_CYCLECOUNTER_OBJ,
26567 as tune/alpha.asm doesn't suit.
26568
26569 * mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
26570 mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
26571
26572 2000-12-23 Torbjorn Granlund <[email protected]>
26573
26574 * mpn/generic/mul_fft.c: Reformat.
26575 (mpn_fft_neg_modF): Remove.
26576 (mpn_fft_mul_2exp_modF): Inline mpn_fft_neg_modF.
26577
26578 * mpn/cray/gmp-mparam.h: Retune.
26579
26580 * configure.in (*-cray-unicos*): Pass `-O3 -htask0'.
26581 (vax*-*-*): Fix typo.
26582
26583 * mpn/cray/mul_1.c: Use dynamic arrays, get rid of TMP_*.
26584 * mpn/cray/addmul_1.c: Likewise.
26585 * mpn/cray/submul_1.c: Likewise.
26586 * mpn/cray/add_n.c: Likewise.
26587 * mpn/cray/sub_n.c: Likewise.
26588
26589 * configure.in (default cc_cflags,cc_64_cflags): Remove -g/add -O.
26590 (mips*-*-irix[6789]*]): Remove -g from cc_*_cflags.
26591
26592 2000-12-22 Torbjorn Granlund <[email protected]>
26593
26594 * mpn/generic/mul_n.c: Delete K&R function headers.
26595
26596 * mpn/generic/mul_n.c (mpn_kara_mul_n): Clean up type confusion
26597 between mp_limb_t and mp_size_t.
26598 (mpn_kara_sqr_n): Likewise.
26599
26600 * mpn/generic/mul_n.c (mpn_kara_mul_n): Use mpn_incr_u.
26601 (mpn_kara_sqr_n): Likewise.
26602
26603 * mpn/generic/mul_n.c (mpn_kara_mul_n): Change handling of `sign'
26604 to work around GCC 2.8.1 MIPS bug.
26605
26606 * configure.in (implied alpha*-cray-unicos*): Remove -g from cc_cflags.
26607
26608 2000-12-21 Torbjorn Granlund <[email protected]>
26609
26610 * mpn/alpha/invert_limb.asm: Simplify a bit.
26611 Add handling of bigend systems.
26612 * mpn/alpha/unicos.m4: Define `bigend'.
26613 * mpn/alpha/default.m4: Define `bigend' (to expand to nothing).
26614
26615 * tests/t-constants.c (CHECK_CONSTANT): Print using %lx.
26616
26617 * mpn/alpha/gmp-mparam.h: Remove sizes for plain C types.
26618 * mpn/alpha/ev5/gmp-mparam.h: Likewise.
26619 * mpn/alpha/ev6/gmp-mparam.h: Likewise.
26620
26621 * mpn/alpha/unicos.m4: Define LEA.
26622 * mpn/alpha/default.m4: Likewise.
26623 * mpn/alpha/invert_limb.asm: Use LEA for loading symbolic addresses.
26624 * mpn/alpha/cntlz.asm: Likewise.
26625
26626 * mpn/alpha/cntlz.asm: Don't use `ldbu', use slightly slower
26627 `ldq_u' + `extbl' instead.
26628
26629 * mpn/alpha/unicos.m4: Define EXTERN.
26630 * mpn/alpha/default.m4: Define EXTERN (to expand to nothing).
26631 * mpn/alpha/cntlz.asm: Declare __clz_tab usign `EXTERN' (for the
26632 benefit of Unicos).
26633
26634 2000-12-21 Kevin Ryde <[email protected]>
26635
26636 * mpn/alpha/unicos.m4 (GSYM_PREFIX): Define for the benefit of
26637 __clz_tab.
26638
26639 2000-12-20 Torbjorn Granlund <[email protected]>
26640
26641 * longlong.h: Add udiv_qrnnd and count_leading_zeros for _CRAYMPP
26642 systems.
26643
26644 2000-12-19 Torbjorn Granlund <[email protected]>
26645
26646 * configure.in (*sparc*-*-*): Remove -g from cc_cflags and acc_cflags.
26647
26648 * mpn/generic/sqrtrem.c (mpn_sqrtrem): Separate `limb' values from
26649 `size' values.
26650
26651 * configure.in (*-cray-unicos*): Add `-Wa,-B' to cc_cflags.
26652
26653 * demos/pexpr.c (rstate): New variable.
26654 (main): Initialize rstate.
26655 (enum op_t): Add RANDOM.
26656 (fns): Add field for RANDOM.
26657 (mpz_eval_expr): Handle RANDOM.
26658
26659 2000-12-19 Kevin Ryde <[email protected]>
26660
26661 * mpn/generic/sqrtrem.c: Rewrite by Paul Zimmermann, based on his
26662 Karatsuba Square Root algorithm.
26663 * gmp.texi (Square Root Algorithm): Update.
26664
26665 * tune/many.pl: New file.
26666
26667 * mpn/tests/try.c,ref.[ch] (mpn_preinv_mod_1, mpn_sb_divrem_mn,
26668 mpn_tdiv_qr, mpn_gcd_finda, mpn_kara_mul_n, mpn_kara_sqr_n,
26669 mpn_toom3_mul_n, mpn_toom3_sqr_n): Add testing.
26670 * mpn/tests/ref.c: Cast some "0"s in function calls.
26671
26672 * mpn/x86/k7/mmx/mod_1.asm: Add preinv_mod_1 entrypoint, remove extra
26673 variable for loop termination.
26674
26675 * mpn/x86/p6/mmx/mod_1.asm: Remove file, in favour of the following.
26676 * mpn/x86/p6/mod_1.asm: New file.
26677
26678 * mpn/x86/pentium/mod_1.asm: New file.
26679
26680 2000-12-18 Torbjorn Granlund <[email protected]>
26681
26682 * configure.in (mips*-*-irix[6789]*): Pass options to compiler using
26683 `-Wc'.
26684
26685 2000-12-18 Kevin Ryde <[email protected]>
26686
26687 * mpn/x86/k6/pre_mod_1.asm: New file.
26688
26689 * tune/tuneup.c (USE_PREINV_MOD_1): Tune this, rearrange mpn_divrem_1
26690 and mpn_mod_1 handling in support of it.
26691 * tune/Makefile.am: Consequent changes to divrem_1.c and mod_1.c.
26692
26693 * gmp-impl.h (USE_PREINV_MOD_1, MPN_MOD_OR_PREINV_MOD_1): New macros.
26694 * mpn/generic/perfsqr.c, mpz/pprime_p.c: Use MPN_MOD_OR_PREINV_MOD_1.
26695
26696 * configure.in: Let an asm mod_1 provide a preinv_mod_1 entrypoint.
26697
26698 * mpn/alpha/default.m4: Remove some newlines, add some asserts.
26699 (r0 etc, f0 etc): Use defreg and deflit.
26700 (PROLOGUE, PROLOGUE_GP, EPILOGUE): Use GSYM_PREFIX.
26701 * mpn/alpha/unicos.m4: Remove some newlines, add some asserts.
26702 * mpn/alpha/invert_limb.asm: Remove unused second DATASTART parameter.
26703 * mpn/alpha/cntlz.asm: Use mpn_count_leading_zeros and __clz_tab.
26704
26705 * mpn/asm-defs.m4 (changecom): Comments on portability.
26706 (__clz_tab, modlimb_invert_table): New macros, matching gmp-impl.h.
26707 (count_leading_zeros, count_trailing_zeros): New define_mpn's.
26708 (PROLOGUE etc): Comments on usage, add some asserts.
26709 (OPERATION_[lr]shift): Use m4_not_for_expansion, for the benefit of
26710 lorrshift multifunc.
26711
26712 * mpn/Makeasm.am (RM_TMP): New variable controlling tmp-*.s
26713 removal, for development purposes.
26714
26715 * mpz/fac_ui.c: Fix for long long limb by using mpn_mul_1 not
26716 mpz_mul_ui, and note some possible enhancements.
26717
26718 * mpz/tests/t-fac_ui.c: New test.
26719 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
26720 * macos/Makefile.in: Ditto, and add t-fib_ui too.
26721
26722 * mpn/generic/[lr]shift.c: Remove some DEBUG code adequately covered
26723 by new parameter ASSERTs.
26724
26725 * longlong.h (count_trailing_zeros): Assert x!=0.
26726
26727 * doc/configuration: Updates for new configure things, add some notes
26728 on test setups.
26729
26730 2000-12-16 Torbjorn Granlund <[email protected]>
26731
26732 * configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc also for 64-bit
26733 compiles.
26734 * configure.in: Disable shared libs for *-*-ultrix*.
26735
26736 2000-12-15 Torbjorn Granlund <[email protected]>
26737
26738 * configure.in (powerpc*-*-*): Pass -Wa,-mppc when using gcc.
26739
26740 * gmp-impl.h (_EXTERN_INLINE): #define different for GCC and other
26741 compilers.
26742
26743 * gmp-h.in (__gmp_inline): Remove.
26744 * mp-h.in: Likewise.
26745 * mpn/generic/gcd.c: Use `inline' instead of `__gmp_inline'.
26746
26747 * configure.in (mips*-*-irix[6789]*): Define *_ldflags.
26748
26749 2000-12-14 Torbjorn Granlund <[email protected]>
26750
26751 * mpn/generic/pre_mod_1.c: Use proper type for udiv_qrnnd
26752 parameter `dummy'.
26753
26754 * mpn/generic/divrem_1.c: Use explicit `!= 0' in if statement.
26755 * mpn/generic/mod_1.c: Likewise.
26756
26757 2000-12-14 Kevin Ryde <[email protected]>
26758
26759 * config.guess (mips-*-irix[6789]*): Transform to mips64.
26760 (m68k-*-nextstep* | m68k-*-openstep*): Transform to m68020.
26761
26762 2000-12-13 Torbjorn Granlund <[email protected]>
26763
26764 * tests/t-constants.c (main): Conditionalize use of PP_INVERTED.
26765
26766 * mpn/mp_bases.c: Handle 4-bit limbs.
26767 (main): Add code for generating tables.
26768
26769 * mpn/generic/popham.c: Handle limb bitsizes of 4, 8, 16.
26770 Suffix all 32-bit constant with `L'.
26771 Use CNST_LIMB for 64-bit constants.
26772
26773 2000-12-13 Kevin Ryde <[email protected]>
26774
26775 * gmp-impl.h (FIB_THRESHOLD): Defaults for 4,8,16 bits per limb, and
26776 an arbitrary fallback default.
26777 (modlimb_invert): Add efficient code for 8,16 (or 4) bits per limb.
26778
26779 * configure.in (mips3, mips64): Don't bother with o32 (mips2 32-bit
26780 limb) on IRIX 6.
26781
26782 * Makefile.am (SUBDIRS): Put "tests" first so tests/t-constants.c is
26783 run first, to pick up any limb size mismatch.
26784
26785 * tune/tuneup.c (DIVREM_1, MOD_1): Fix result values, were off by 1.
26786
26787 * mpz/fib_ui.c (table1, table2): Add data for 4,8,16 bits per limb.
26788
26789 2000-12-12 Torbjorn Granlund <[email protected]>
26790
26791 * gmp-impl.h (LIMBS_PER_DOUBLE): Define for any limb bitsize.
26792
26793 2000-12-11 Torbjorn Granlund <[email protected]>
26794
26795 * mpn/mp_bases.c: Add tables for 8-bit and 16-bit limbs.
26796 Round existing `double' values properly.
26797
26798 * gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_
26799 to keep out of user name space.
26800 (__gmp_randata_lc): Likewise.
26801 * randclr.c, randlc.c, randlc2x.c, randraw.c, randsd.c, randsdui.c:
26802 Corresponding changes.
26803
26804 * gmp-impl.h (PP): #define for machines with BITS_PER_MP_LIMB
26805 of 2, 4, 8, and 16.
26806 (PP_FIRST_OMITTED): New, define for various BITS_PER_MP_LIMB.
26807 (PP_MASK): Remove.
26808 (PP_MAXPRIME): Remove.
26809
26810 * mpn/generic/perfsqr.c: Generalize PP handling for machines with
26811 limbs of < 32 bits. Allow PP_INVERTED to be undefined.
26812 * mpz/pprime_p.c: Likewise.
26813
26814 2000-12-10 Torbjorn Granlund <[email protected]>
26815
26816 * mpn/generic/mul_1.c: Declare parameters in C89 style.
26817
26818 2000-12-10 Kevin Ryde <[email protected]>
26819
26820 * tune/Makefile.am (speed_LDFLAGS, speed_ext_LDFLAGS, tune_LDFLAGS):
26821 Don't use -all-static, as gcc 2.95.2 on i386 solaris 8 doesn't like
26822 it.
26823
26824 * configure.in (mips3,mips64): Add ABI=64, name the others ABI=n32 and
26825 ABI=o32.
26826 * mpn/mips3/gmp-mparam.h (BITS_PER_LONGINT): Remove #define and let
26827 configure determine it, since it varies with ABI=64 or ABI=n32.
26828 * gmp.texi (ABI and ISA): Update.
26829 (mpz_mod_ui): Remark that it's identical to mpz_fdiv_r_ui.
26830 (mpn_divexact_by3): Qualify a statement needing mp_bits_per_limb even.
26831
26832 * mul_fft.c (mpn_fft_mul_modF_K etc): Patch by Paul Zimmermann to fix
26833 results in certain cases of recursing into a further FFT.
26834
26835 2000-12-09 Torbjorn Granlund <[email protected]>
26836
26837 * mpz/cmpabs.c: Remove unused variable.
26838 * mpz/rrandomb.c: Likewise.
26839 * mpz/xor.c: Likewise.
26840
26841 2000-12-07 Torbjorn Granlund <[email protected]>
26842
26843 * mpn/generic/gcdext.c: Handle double carry when computing s1.
26844 Merge two code blocks for computing s0 and s1.
26845
26846 2000-12-07 Kevin Ryde <[email protected]>
26847
26848 * configure.in (hppa*-*-*): Remove -Aa -D_HPUX_SOURCE from
26849 cc_cflags/cppflags, and instead let AM_C_PROTOTYPES add it, or -Ae,
26850 whichever works.
26851
26852 * configure.in (*-*-aix[34]*): Disable shared by default, but let
26853 the user override that, if desired.
26854 * gmp.texi (Notes for Particular Systems): Update.
26855
26856 2000-12-06 Torbjorn Granlund <[email protected]>
26857
26858 * mpq/cmp_ui.c: Streamline.
26859
26860 2000-12-06 Kevin Ryde <[email protected]>
26861
26862 * tune/divrem_1_div.c,divrem_1_inv.c,mod_1_div.c,mod_1_inv.c,
26863 gcdext_double.c: New files for measuring.
26864 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
26865 * tune/speed.c,speed.h,common.c: Add measuring of them.
26866 (mpn_preinv_mod_1, mpz_jacobi, mpz_powm_ui): Add measuring.
26867
26868 * speed.c (getopt_long): Don't use this, just plain getopt.
26869 * configure.in (getopt_long): Remove test.
26870
26871 * gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_MUL_N_MINSIZE,
26872 MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_MUL_N_MINSIZE): New macros, and
26873 assume toom3 square tsize was meant to be the same as the mul (both
26874 are overestimates).
26875 * tune/tuneup.c, mpn/generic/mul.c, mpn/generic/mul_n.c: Use them.
26876 * mpn/generic/mul_n.c (mpn_toom3_sqr_n): Fix an ASSERT to use
26877 TOOM3_SQR_THRESHOLD not TOOM3_MUL_THRESHOLD, add a few that might
26878 be more realistic size checks.
26879 * tune/speed.h (SPEED_ROUTINE_MPN_MUL_N_TSPACE etc): Use minsize.
26880
26881 * mpn/generic/divrem_1.c: Partial rewrite, merge fractional part
26882 calculation, skip a divide step in more cases, introduce
26883 DIVREM_1_NORM_THRESHOLD and DIVREM_1_UNNORM_THRESHOLD.
26884 * mpn/generic/mod_1.c: Partial rewrite, skip a divide step in more
26885 cases, introduce MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD.
26886 * longlong.h (UDIV_PREINV_ALWAYS): New define, set for alpha and ia64.
26887 * tune/tuneup.c (DIVREM_1_NORM_THRESHOLD, DIVREM_1_UNNORM_THRESHOLD,
26888 MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD): Tune these.
26889 * gmp-impl.h [TUNE_PROGRAM_BUILD]: Support for this.
26890 * tune/Makefile.am (TUNE_MPN_SRCS): Add divrem_1.c and mod_1.c.
26891
26892 * gmp-impl.h (UDIV_NORM_PREINV_TIME): Renamed from UDIV_PREINV_TIME.
26893 * mpn/generic/perfsqr.c, mpn/generic/sb_divrem_mn.c,
26894 mpn/x86/*/gmp-mparam.h: Ditto.
26895 * gmp-impl.h (UDIV_UNNORM_PREINV_TIME): New define.
26896
26897 * configure.in (AC_C_INLINE, HAVE_INLINE): New test and define.
26898 * gmp-impl.h (inline): Remove, use config.h.
26899 (_EXTERN_INLINE): Redefine based on HAVE_INLINE.
26900 (mpn_zero_p): Use HAVE_INLINE.
26901
26902 * acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Don't add flags to a user
26903 selected $AR or $NM.
26904
26905 * tune/tuneup.c (all): Print how long the tuning took.
26906
26907 * configure.in (AM_C_PROTOTYPES): Use this, not GMP_ANSI2KNR.
26908 * acinclude.m4 (GMP_ANSI2KNR): Remove.
26909
26910 * Makefile.am (gmp.h, mp.h): In DISTCLEANFILES not CLEANFILES.
26911
26912 * gmp-h.in (mpn_divmod, mpn_divmod_1, mpn_divexact_by3): Cast some
26913 zeros, for the benefit of K&R if long!=int.
26914
26915 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add "*" for
26916 the benefit of cray.
26917
26918 * compat.c (mpn_divexact_by3, mpn_divmod_1): Return types should be
26919 mp_limb_t, not int, and need an actual "return".
26920
26921 2000-12-05 Torbjorn Granlund <[email protected]>
26922
26923 * mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
26924 * mpn/alpha/gmp-mparam.h: Tune for 21064.
26925
26926 * longlong.h: Reformat to avoid newlines within strings.
26927
26928 * gmp-impl.h (inline): Disable if GCC has defined __STRICT_ANSI__.
26929
26930 * configure.in: Do a `mkdir tune' before creating tune/sqr_basecase.c.
26931
26932 * Makefile.am: Treat mp.h analogously to gmp.h.
26933
26934 configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc.
26935
26936 * mp-h.in: Renamed from mp.h.
26937 Add #define for _LONG_LONG_LIMB.
26938 Move some other fixes from gmp-h.in.
26939 * mp.h: Removed.
26940 * configure.in: Generate mp.h from mp-h.in like we handle
26941 gmp-h.in/gmp.h.
26942
26943 2000-12-04 Torbjorn Granlund <[email protected]>
26944
26945 * acinclude.m4: Fix typo testing for bad HP compiler.
26946
26947 2000-12-03 Torbjorn Granlund <[email protected]>
26948
26949 * mpbsd/tests/t-misc.c (check_itom): Exclude some tests for Cray
26950 CFP systems.
26951
26952 * longlong.h (CRAYIEEE umul_ppmm): New.
26953
26954 * mpn/cray/gmp-mparam.h (BITS_PER_SHORTINT): 32 => 64.
26955 (*_THRESHOLD): Tune.
26956
26957 * configure.in: Disable shared libs for *-*-unicos*.
26958
26959 2000-12-03 Kevin Ryde <[email protected]>
26960
26961 * configure.in, tune/Makefile.am: Create tune/sqr_basecase.c during
26962 configure, and use it unconditionally in $(nodist_tuneup_SOURCES).
26963 Fixes a problem with sqr_basecase.lo under --disable-static.
26964
26965 2000-12-01 Torbjorn Granlund <[email protected]>
26966
26967 * mpf/tests/t-get_d.c (LOW_BOUND,HIGH_BOUND): #define for non-IEEE
26968 Cray systems.
26969
26970 * gmp-impl.h (union ieee_double_extract): Test for _CRAYIEEE.
26971
26972 2000-11-30 Torbjorn Granlund <[email protected]>
26973
26974 * mpz/tests/t-mul.c (base_mul): Fix re-evaluation problems in macro
26975 invocations.
26976 (ref_mpz_mul): New name from mpz_refmul. Make static.
26977 (base_mul): New name for _mpn_mul_classic.
26978
26979 2000-11-30 Kevin Ryde <[email protected]>
26980
26981 * configure.in: Rewrite of CC/CFLAGS selection scheme, introduce a
26982 notion of ABI, merge compiler and mpn path selection, add flags
26983 selection for AR and NM, let CC without CFLAGS work.
26984 (AC_PROG_CC): Use this, not GMP_SELECT_CC.
26985 * acinclude.m4 (GMP_PROG_CC_WORKS): Don't use AC_TRY_COMPILE, combine
26986 cc/cflags parameter.
26987 (GMP_PROG_CC_FIND, GMP_CHECK_CC_64BIT, GMP_PROG_CC_SELECT): Remove.
26988 * gmp.texi (Installing GMP): Updates for new scheme.
26989
26990 * configure.in (AC_CANONICAL_HOST): Use this and $host, not $target.
26991 * acinclude.m4, acconfig.h, longlong.h, mpn/x86/x86-defs.m4,
26992 mpn/x86/k7/mmx/popham.asm: Ditto, renaming HAVE_TARGET_CPU to
26993 HAVE_HOST_CPU.
26994 * gmp.texi (Build Options, and elsewhere): Update.
26995
26996 * acinclude.m4 (GMP_COMPARE_GE): New macro.
26997 (GMP_GCC_MARCH_PENTIUMPRO): Use it, add CC parameter, check for GCC.
26998 (GMP_HPC_HPPA_2_0): New macro, adapted from GMP_CHECK_CC_64BIT.
26999
27000 * acinclude.m4 (GMP_PROG_AR): New macro, using AC_CHECK_TOOL, adding
27001 GMP flags.
27002 * configure.in: Use it
27003
27004 * gmp-h.in: Renamed from gmp.h.
27005 (@define_LONG_LONG_LIMB@): Placeholder for instantiation.
27006 (__GNU_MP__): Bump to 3.
27007 * acinclude.m4 (GMP_VERSION): Get version from gmp-h.in.
27008 * configure.in: Create gmp.h from gmp-h.in to set _LONG_LONG_LIMB.
27009 * gmp.texi.h (ABI and ISA): Mention this.
27010 * acconfig.h (_LONG_LONG_LIMB): Remove undef.
27011 * Makefile.am: Distribute gmp-h.in, not gmp.h.
27012
27013 * configure.in (AC_PROG_CPP, AC_PROG_INSTALL, AC_PROG_LN_S): Remove,
27014 dragged in by other macros.
27015 (gmp_asm_syntax_testing): Renamed from gmp_no_asm_syntax_testing.
27016 (AC_EXEEXT, AC_OBJEXT): Remove, done automatically by libtool.
27017 * configure.in, acinclude.m4: Remove "" from "`foo`", being
27018 unnecessary and not portable.
27019
27020 * configure.in (GMP_LDFLAGS): New AC_SUBST flags for libtool link.
27021 (powerpc64*-*-aix*): Use for -Wc,-maix to fix shared library creation,
27022 but can't build shared and static at the same time.
27023 * Makefile.am (libgmp_la_LDFLAGS, libmp_la_LDFLAGS): Use
27024 $(GMP_LDFLAGS).
27025 * gmp.texi (Notes for Particular Systems): Update AIX problem
27026
27027 * configure.in (AC_CONFIG_LINKS): Use where needed, not via gmp_links.
27028 (gmp_srclinks): Build up as needed, not via gmp_links.
27029
27030 * acinclude.m4 (GMP_INIT): Do CONFIG_TOP_SRCDIR and asm-defs.m4 here.
27031 * configure.in (asm-defs.m4): Consequent changes.
27032
27033 * acinclude.m4 (GMP_INCLUDE_MPN): Using include_mpn(), replacing
27034 GMP_INCLUDE and GMP_SINCLUDE.
27035 * configure.in (gmp_m4postinc): Remove this scheme, use
27036 GMP_INCLUDE_MPN instead.
27037
27038 * configure.in (*-*-sco3.2v5*): Force ac_cv_archive_cmds_need_lc=no,
27039 until libtool does this itself.
27040 * gmp.texi (Known Build Problems): Remove SCO -lc problem.
27041
27042 * configure, INSTALL.autoconf, etc: Update to autoconf 2000-11-29.
27043 * acinclude.m4 (GMP_C_SIZES): Use AC_CHECK_SIZEOF.
27044 * gmp.texi (Known Build Problems): Remove version.c sed/config.h
27045 problem, fixed.
27046
27047 * ltmain.sh, aclocal.m4: Update to libtool 2000-11-25.
27048 * ltconfig: No longer required, but leave an empty dummy for automake.
27049 * gmp.texi (Known Build Problems): Remove SunOS native ar ranlib
27050 problem, fixed.
27051
27052 * */Makefile.in, aclocal.m4: Update to automake 2000-11-25.
27053 * mpbsd/tests/Makefile.am, mpfr/tests/Makefile.am (check_PROGRAMS):
27054 Remove dummy, no longer required.
27055 * mpbsd/tests/dummy.c, mpfr/tests/dummy.c: Remove files.
27056 * depcomp: Remove file, no longer required (with no-dependencies).
27057
27058 * texinfo.tex: Update to 2000-11-09.
27059 * gmp.texi (Build Options): Mention PDF from gmp.texi.
27060 * Makefile.am (MOSTLYCLEANFILES): Add gmp.tmp, from new texinfo.tex.
27061
27062 * gmp.texi (Build Options): List alphaev56, alphapca56, alphaev67,
27063 hppa2.0n and power among supported CPUs.
27064
27065 2000-11-30 Torbjorn Granlund <[email protected]>
27066
27067 * mpz/tests/t-mul.c: Increase max operand size from 2^17 bits
27068 to 2^19 bits. Misc cleanups.
27069
27070 2000-11-26 Kevin Ryde <[email protected]>
27071
27072 * tune/tuneup.c (FIB_THRESHOLD): Cope better with different speeds of
27073 odd and even sizes.
27074
27075 * longlong.h (alpha): Use udiv_qrnnd and count_leading_zeros on all
27076 compilers, not just gcc.
27077
27078 * pre_mod_1.c: Use conditional subtract to always skip a division.
27079 (UMUL_TIME, UDIV_TIME): Remove defaults, now in longlong.h.
27080
27081 2000-11-22 Torbjorn Granlund <[email protected]>
27082
27083 * mpn/pa64w/gmp-mparam.h: Retune.
27084 * mpn/pa64/gmp-mparam.h: Retune.
27085 * mpn/sparc64/gmp-mparam.h: Retune.
27086
27087 2000-11-22 Kevin Ryde <[email protected]>
27088
27089 * gmp-impl.h (ABOVE_THRESHOLD, BELOW_THRESHOLD): New macros.
27090 * mpn/generic/gcdext.c: Use them.
27091
27092 * mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Force only one step.
27093 * tune/gcdextos.c, tune/gcdextod.c: New files, one step gcdext, single
27094 and double.
27095 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
27096 (TUNE_MPN_SRCS): Remove gcdext.c.
27097 * tune/speed.h, tune/common.c, tune/speed.c: Add measuring.
27098 * tune/tuneup.c: Use for GCDEXT_THRESHOLD, plus check if double limb
27099 is ever better. Should be more accurate, and hopefully faster.
27100
27101 * tune/gcdext_single.c: New file, gcdext forced to single limbs.
27102 * tune/Makefile.am: Add it.
27103 * tune/speed.h, tune/common.c, tune/speed.c: Add measuring, and of
27104 invert_limb.
27105
27106 * tune/speed.h (speed_params r): Use mp_limb_t, not long.
27107 * tune/speed.h, tune/common.c: Don't "switch" on "r".
27108 * tune/speed.c (r_string): Accept limb sized constants.
27109 (choice scale): Add a scale factor (eg. "2.33*mpn_add_n").
27110 * tune/common.c (SPEED_ROUTINE_UDIV_QRNND_A): Default r to
27111 __mp_bases[10].big_base, being a full limb value.
27112
27113 * configure.in (alphapca56*-*-*): Use ev5 mpn path.
27114 (am29000*-*-*): Remove this, leave the canonical a29k.
27115 (z8k*-*-*, z8kx*-*-*): Changed from z8000, since z8k is canonical.
27116 (gmp_mpn_functions_optional): Add invert_limb, use for alpha and ia64.
27117
27118 * configure.in (alloca): Accept yes/no/detect, generate an error if
27119 "yes" but not available.
27120 * gmp.texi (Build Options): Update.
27121
27122 * acinclude.m4 (GMP_TRY_ASSEMBLE): Make conftest.out available.
27123 (GMP_ASM_ALIGN_FILL_0x90): Use it.
27124
27125 * acinclude.m4 (GMP_ASM_X86_MMX) [*-*-solaris*]: Check for solaris
27126 2.6 "as" movq bug.
27127 * gmp.texi (Notes for Particular Systems): Update x86 MMX note.
27128
27129 2000-11-21 Torbjorn Granlund <[email protected]>
27130
27131 * tune/Makefile.am (EXTRA_DIST): List hppa2w.asm.
27132
27133 * tune/hppa2.asm: Change level directive to "2.0n".
27134 * tune/hppa2w.asm: New file.
27135 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Separate out hppa2.0w.
27136
27137 * mpn/pa64/gmp-mparam.h (BITS_PER_LONGINT): 64 => 32.
27138
27139 2000-11-21 Kevin Ryde <[email protected]>
27140
27141 * urandom.h (random): No prototype if glibc stdlib.h has already
27142 provided it (avoids an int32_t/long conflict).
27143
27144 * tune/Makefile.am (LDFLAGS): Use -all-static.
27145 (speed-dynamic): Dynamic linked version of speed.c.
27146 * tune/README: Update.
27147
27148 * mpn/generic/gcd.c (find_a): Use native version if available.
27149 * acconfig.h (HAVE_NATIVE_mpn_gcd_finda): Add #undef.
27150 * gmp-impl.h (mpn_gcd_finda): Add prototype and define.
27151 * mpn/asm-defs.m4 (mpn_gcd_finda): New define_mpn.
27152 * tune/gcd_finda_gen.c: #undef any HAVE_NATIVE_mpn_gcd_finda.
27153 * configure.in (gmp_mpn_functions_optional): Add gcd_finda.
27154 * mpn/x86/k6/gcd_finda.asm: New file.
27155
27156 * tune/tuneup.c (POWM_THRESHOLD): Slightly bigger size steps.
27157
27158 * gmp-impl.h (__GMP_IMPL_H__): Protect against multiple inclusion.
27159 * tune/gcd_bin.c, tune/powm_mod.c, tune/powm_redc.c: Use #undef after
27160 gmp-impl.h to force thresholds.
27161 * tune/tuneup.c (print_define, fft): No need for #ifndefs on
27162 thresholds any more.
27163
27164 2000-11-20 Torbjorn Granlund <[email protected]>
27165
27166 * mpz/tests/t-powm.c: Analogous changes as made 2000-11-12 to t-mul.c.
27167 * mpz/tests/t-powm_ui.c: Likewise.
27168 * mpz/tests/t-pow_ui.c: Likewise.
27169 * mpz/tests/t-root.c: Likewise.
27170
27171 * configure.in [compiler switch]: Pass "-Aa -D_HPUX_SOURCE" to cc for
27172 all hppa versions.
27173
27174 * mpn/hppa/hppa1_1/udiv_qrnnd.S: Reference data using PC relative
27175 addressing (was r19 relative addressing).
27176
27177 2000-11-18 Torbjorn Granlund <[email protected]>
27178
27179 * rand.c: (__gmp_rand_lc_scheme): Convert strings to hexadecimal.
27180 (gmp_randinit): Expect strings in hexadecimal.
27181
27182 2000-11-18 Kevin Ryde <[email protected]>
27183
27184 * configfsf.guess, configfsf.sub: Update to 2000-11-16.
27185 * config.guess (alpha*-*-openbsd*): Do exact cpu detection.
27186
27187 2000-11-14 Torbjorn Granlund <[email protected]>
27188
27189 * mpz/tests/t-fdiv.c: Analogous changes as made 2000-11-12 to t-mul.c.
27190 * mpz/tests/t-tdiv_ui.c: Likewise.
27191 * mpz/tests/t-fdiv_ui.c: Likewise.
27192 * mpz/tests/t-sqrtrem.c: Likewise.
27193 * mpz/tests/t-gcd.c: Likewise.
27194
27195 2000-11-13 Kevin Ryde <[email protected]>
27196
27197 * mpn/Makeasm.am: New file, splitting out assembler rules.
27198 * mpn/Makefile.am, tune/Makefile.am: Use it.
27199
27200 * mpn/Makefile.am (@CPP@): Remove this, automake already gives it.
27201
27202 * configure.in (AC_CHECK_LIBM): New test, and AC_SUBST it.
27203 * Makefile.am (MPFR_LIBADD_OPTION): Use it.
27204 * demos/Makefile.am (qcn_LDADD): Ditto.
27205 * tune/Makefile.am (libspeed_la_LIBADD): Ditto.
27206 * tests/rand/Makefile.am (libstat_la_LIBADD): Ditto.
27207
27208 * tune/time.c (timeval_diff_secs): Better calculation.
27209 (read_real_time): New measuring method for AIX power/powerpc.
27210 (speed_endtime): Protect against negative times.
27211 * tune/common.c (speed_measure): Protect against big reps.
27212 * tune/freq.c (speed_cpu_frequency_measure_one): Better timeval diff.
27213 * tune/speed.h (TIMEVAL_DIFF_SEC,USEC): Remove macros.
27214 * configure.in: (sys/systemcfg.h, read_real_time): New tests.
27215
27216 2000-11-13 Torbjorn Granlund <[email protected]>
27217
27218 * mpz/tests/t-mul.c: Remove #include urandom.h.
27219 * mpz/tests/t-tdiv.c: Likewise.
27220
27221 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]:
27222 Declare hppa.asm as just 32 bits (cyclecounter_size=1).
27223
27224 2000-11-12 Torbjorn Granlund <[email protected]>
27225
27226 * mpz/tests/t-mul.c
27227 (main): Generate random numbers using gmp_rand* functions.
27228 (main): Distribute random numbers non-uniformly.
27229 (main): Seed by current time if GMP_CHECK_RANDOMIZE is set.
27230 (_mpn_mul_classic): Streamline.
27231 * mpz/tests/t-tdiv.c: Analogous changes.
27232
27233 * demos/pexpr.c (HAVE_sigaltstack): Fix typo in testing for _UNICOS.
27234 Also test for __hpux.
27235
27236 2000-11-11 Torbjorn Granlund <[email protected]>
27237
27238 * mpn/alpha/ev5/gmp-mparam.h: Retune.
27239
27240 * mpn/alpha/ev6/gmp-mparam.h: Retune.
27241
27242 * mpn/alpha/ev6/add_n.asm: Misc cleanups.
27243
27244 * mpn/alpha/ev6/sub_n.asm: New file.
27245
27246 2000-11-10 Torbjorn Granlund <[email protected]>
27247
27248 * configure.in [path switch] (alphaev6*-*-*): Add alpha/ev5 to path.
27249
27250 * mpn/alpha/ev6/add_n.asm: New file.
27251
27252 2000-11-10 Kevin Ryde <[email protected]>
27253
27254 * mpz/powm.c (redc): Make global under WANT_REDC_GLOBAL.
27255 * tune/powm_mod.c, tune/powm_redc.c: New files.
27256 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
27257 * tune/*: Add measuring of redc, mpz_mod, mpz_powm_mod, mpz_powm_redc.
27258
27259 * tune/tuneup.c (POWM_THRESHOLD): Determine from redc and mpz_mod.
27260 * tune/Makefile.am (TUNE_MPZ_SRCS): Remove powm.
27261
27262 2000-11-10 Torbjorn Granlund <[email protected]>
27263
27264 * mpn/mips3/gmp-mparam.h: Retune.
27265
27266 * configure.in (os_64bit): Rename to check_64bit_compiler.
27267
27268 2000-11-09 Torbjorn Granlund <[email protected]>
27269
27270 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Choose hppa/hppa2 code
27271 depending on $CC64.
27272
27273 2000-11-09 Kevin Ryde <[email protected]>
27274
27275 * mpn/x86/pentium/mul_1.asm: Unroll 2x, saving 1 c/l when in L1.
27276 Add 1c entrypoint.
27277 * mpn/x86/pentium/aorsmul_1.asm: Add 1c entrypoints, shave a couple
27278 of cycles at entry and exit.
27279
27280 * configure.in (power1,2,2sc): Support these as synonyms for plain
27281 power.
27282
27283 * acinclude.m4 (GMP_ASM_X86_SHLDL_CL): GMP_DEFINE WANT_SHLDL_CL here.
27284 (GMP_ASM_X86_MMX, GMP_ASM_X86_SHLDL_CL): Add X86 into the names.
27285 * configure.in: Consequent changes.
27286
27287 * gmp.texi (Notes for Particular Systems): Remarks about power/powerpc.
27288 (Reentrancy): Remarks about simultaneous writing.
27289 (Reporting Bugs): Ask for configfsf.guess.
27290
27291 2000-11-08 Kevin Ryde <[email protected]>
27292
27293 * acinclude.m4 (GMP_FUNC_ALLOCA): New macro.
27294 * configure.in: Use it.
27295 * gmp-impl.h (alloca): Conditionals and setups as per autoconf
27296 (should make alloca available on more non-gcc compilers).
27297
27298 * acinclude.m4: Misc reformatting, simplify some quoting.
27299 (GMP_ASM_UNDERSCORE, GMP_ASM_X86_MCOUNT): Use $CC $CFLAGS $CPPFLAGS.
27300 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_FILL_0x90, GMP_ASM_RODATA): Put
27301 AC_REQUIREs outside AC_CACHE_CHECK.
27302 (GMP_C_SIZES): Use $srcdir/gmp.h, not -I; use $CPPFLAGS.
27303 (GMP_ASM_UNDERSCORE): Use "gmp_compile" variable, and only rm
27304 conftes1* conftes2*.
27305 (GMP_PROG_NM): New macro, require it in appropriate GMP_ASM_*.
27306 (GMP_TRY_ASSEMBLE): New macro, use it in various GMP_ASM_*.
27307 * configure.in: Use GMP_PROG_NM.
27308
27309 * mpn/tests/spinner.c (spinner_signal): Use RETSIGTYPE.
27310 (spinner_init): Force output to unbuffered.
27311
27312 * mpn/x86/README.family: Notes about GOT table and imul, misc updates.
27313 * mpn/x86/k7/diveby3.asm: Change to 3 operands for immediate imul.
27314 * mpn/x86/k6/diveby3.asm: Ditto.
27315
27316 2000-11-06 Torbjorn Granlund <[email protected]>
27317
27318 * urandom.h: Simplify and make it work properly for 64-bit
27319 machines also in environments without `random'.
27320
27321 2000-11-04 Torbjorn Granlund <[email protected]>
27322
27323 * configure.in [path switch]: Don't match rs6000-*-*, in
27324 particular don't assume POWER.
27325
27326 * tune/tuneup.c (fft): Remove usleep calls.
27327
27328 * config.guess: Don't pass "$@" when it is known to be empty.
27329
27330 * Makefile.am (EXTRA_DIST): List configfsf.guess and configfsf.sub.
27331
27332 2000-11-04 Kevin Ryde <[email protected]>
27333
27334 * configfsf.guess, configfsf.sub: Moved from config.guess and
27335 config.sub.
27336 * config.guess, config.sub: New files, wrappers around around
27337 configfsf versions.
27338 * configfsf.guess: Update to FSF 2000-10-23.
27339 * configfsf.sub: Update to FSF 2000-10-25.
27340
27341 * acinclude.m4 (GMP_ASM_POWERPC_R_REGISTERS): New macro.
27342 * mpn/powerpc32/powerpc-defs.m4: New file, regmap.m4 r0 etc macros
27343 conditionalized by GMP_ASM_POWERPC_R_REGISTERS.
27344 * mpn/powerpc32/regmap.m4: Remove file.
27345 * configure.in (powerpc*-*-*): Use all this.
27346
27347 * mpz/divegcd.c: New file, providing mpz_divexact_gcd.
27348 * Makefile.am, mpz/Makefile.am: Add it.
27349 * gmp-impl.h (mpz_divexact_gcd): Add prototype.
27350 * mpq/aors.c,canonicalize.c,div.c,mul.c: Use it.
27351
27352 * longlong.h [pentium] (count_leading_zeros): New macro.
27353 (__clz_tab): Always provide prototype.
27354 * acconfig.h (HAVE_TARGET_CPU_): Add x86s.
27355
27356 * tune/speed.[ch],common.c (count_leading_zeros,
27357 count_trailing_zeros, __udiv_qrnnd_c): Add measuring.
27358
27359 * configure.in (X86_PATTERN): Move from here ...
27360 * acinclude.m4 (X86_PATTERN): ... to here.
27361 (GMP_ASM_RODATA): Use it.
27362
27363 * configure.in (srandom): New test.
27364 * mpn/tests/try.c: Use it.
27365 * tune/speed.c: Ditto, and conditionalize getrusage and headers.
27366
27367 2000-11-02 Kevin Ryde <[email protected]>
27368
27369 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add udiv_qrnnd.c
27370 and udiv_w_sdiv.c.
27371
27372 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove a duplicate
27373 subtract at the evaluate stage.
27374
27375 2000-11-01 Torbjorn Granlund <[email protected]>
27376
27377 * configure.in [compiler switch] (sparc64-*-linux*): Spell
27378 gmp_xoptcflags_gcc properly, and pass same options as for other
27379 sparcv9 configs.
27380
27381 * tune/speed.h (SPEED_ROUTINE_MPN_GET_STR): Fix type of wsize.
27382
27383 2000-10-31 Torbjorn Granlund <[email protected]>
27384
27385 * configure.in [compiler switch] (sparc64-*-linux*): Remove -mvis
27386 from gmp_xoptflags_gcc, this might not be an ultrasparc.
27387 Remove -m32 from gmp_cflags_gcc; add -Wa,-xarch=v8plus.
27388
27389 2000-10-29 Torbjorn Granlund <[email protected]>
27390
27391 * mpn/ia64/lorrshift.asm: New file.
27392
27393 * configure.in: New mulfunc `lorrshift' for lshift and rshift.
27394
27395 2000-10-29 Kevin Ryde <[email protected]>
27396
27397 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Delete code performing
27398 superfluous mpn_sub_n calls.
27399
27400 * configure.in (found_asm, M4): Account for SPEED_CYCLECOUNTER_OBJ,
27401 for the benefit of targets whose only .asm is a cycle counter.
27402
27403 * tune/tuneup.c (fft): Remove bogus usleep calls.
27404
27405 2000-10-28 Torbjorn Granlund <[email protected]>
27406
27407 * mpn/ia64/invert_limb.asm: Get return value for 0x800...00 right.
27408
27409 * tune/Makefile.am (EXTRA_DIST): Add ia64.asm.
27410
27411 * tune/ia64.asm: Fix typo.
27412
27413 * add_n.asm addmul_1.asm mul_1.asm popcount.asm sub_n.asm:
27414 Preserve ar.lc as required by ABI.
27415 * longlong.h (ia64 udiv_qrnnd): New.
27416
27417 * configure.in [path switch] (ia64*-*-*): Set extra_functions.
27418 * mpn/ia64/invert_limb.asm: New file.
27419
27420 2000-10-27 Torbjorn Granlund <[email protected]>
27421
27422 * configure.in [compiler switch]:
27423 Get rid of c89 for all hppa flavours--it is an evil compiler!
27424
27425 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix type of xp.
27426 (SPEED_ROUTINE_MPN_GET_STR): Fix type of wp.
27427
27428 2000-10-27 Kevin Ryde <[email protected]>
27429
27430 * gmp.texi (Fibonacci Number Algorithm): New section.
27431
27432 * mpz/tests/t-fib_ui.c: New file.
27433 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
27434
27435 * mpz/fib_ui.c: Rewrite, same formulas but using mpn functions and
27436 some lookup tables, much faster at small to moderate sizes.
27437 * gmp-impl.h (MPZ_FIB_SIZE): New macro.
27438 (FIB_THRESHOLD): Establish default here.
27439 * tune/tuneup.c (FIB_THRESHOLD): Start search after the new table
27440 data.
27441
27442 * mpn/x86/x86-defs.m4 (mcount_movl_GOT_ebx): Rename from movl_GOT_ebx,
27443 and don't use GSYM_PREFIX with _GLOBAL_OFFSET_TABLE_.
27444
27445 * tune/freq.c (speed_cpu_frequency_measure): New test comparing
27446 gettimeofday and speed_cyclecounter, should cover many systems.
27447
27448 2000-10-27 Torbjorn Granlund <[email protected]>
27449
27450 * mpn/ia64/gmp-mparam.h: Retune.
27451
27452 2000-10-26 Torbjorn Granlund <[email protected]>
27453
27454 * longlong.h (ia64): Set UMUL_TIME and UDIV_TIME.
27455
27456 * mpn/ia64/submul_1.c: Fix typo.
27457
27458 2000-10-25 Kevin Ryde <[email protected]>
27459
27460 * tune/freq.c (speed_cpu_frequency_sysctl): New test, supporting
27461 hw.model for BSD flavours.
27462 * configure.in (sysctl, sys/param.h): New tests.
27463
27464 2000-10-24 Torbjorn Granlund <[email protected]>
27465
27466 * tune/freq.c: Explicitly #include config.h before other include files.
27467
27468 * mpz/tests/reuse.c (FAIL2): New #define.
27469 (main): Use FAIL2. Now this test properly returns non-zero exit
27470 status when it fails.
27471
27472 * mpn/powerpc32/gmp-mparam.h: Retune.
27473 * mpn/powerpc64/gmp-mparam.h: Retune.
27474
27475 2000-10-24 Kevin Ryde <[email protected]>
27476
27477 * mpn/x86/k6/cross.pl: Support 8 and 16 byte code alignment.
27478
27479 * mpq/aors.c, mpq/canonicalize.c: Skip two mpz_divexact calls if
27480 gcd gives 1, which should be 60% of the time.
27481 * gmp-impl.h (MPZ_EQUAL_1_P): New macro.
27482 * mpq/mul.c, mpq/div.c: Use it, and a new DIV_OR_SET.
27483
27484 * tune/tuneup.c (xp_block, yp_block): Initialize these with random
27485 data. Fixes GCD_ACCEL and GCDEXT thresholds, and latest POWM.
27486
27487 2000-10-23 Torbjorn Granlund <[email protected]>
27488
27489 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Add ia64 case.
27490
27491 * mpn/ia64/gmp-mparam.h: Fill in some parameters.
27492
27493 * mpn/ia64/submul_1.c: New file.
27494
27495 * tune/ia64.asm: New file.
27496
27497 * gmp-impl.h (union ieee_double_extract): Handle ia64.
27498
27499 * mpn/mp_bases.c: Decrease chars_per_bit_exactly for entry 1 to
27500 work around buggy ia64-linux.
27501
27502 * longlong.h (ia64 umul_ppmm): Update register flags to match new GCC.
27503
27504 2000-10-22 Torbjorn Granlund <[email protected]>
27505
27506 * mpn/alpha/ev6/gmp-mparam.h (DC_THRESHOLD): Update.
27507 * mpn/alpha/ev6/submul_1.asm: New file.
27508
27509 2000-10-22 Kevin Ryde <[email protected]>
27510
27511 * tune/gcd_bin.c: New file.
27512 * tune/gcd_finda_gen.c: New file.
27513 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
27514 * tune/speed.[ch],common.c (mpn_gcd_binary, find_a): Add measuring.
27515
27516 * * (__gmp_allocate_func etc): Rename from _mp_allocate_func etc.
27517 (__gmp_default_allocate etc): Rename from _mp_default_allocate etc.
27518 * gmp-impl.h (__GMP_REALLOCATE_FUNC_TYPE,
27519 __GMP_REALLOCATE_FUNC_LIMBS): New macros.
27520
27521 * gmp-impl.h (DC_THRESHOLD): Establish default here, set to 3*KARA
27522 since that's the measured average.
27523 * mpn/generic/dc_divrem_n.c, mpn/generic/tdiv_qr.c (DC_THRESHOLD):
27524 Remove default.
27525
27526 2000-10-21 Torbjorn Granlund <[email protected]>
27527
27528 * mpn/Makefile.am (TARG_DIST): Add ia64.
27529
27530 2000-10-21 Kevin Ryde <[email protected]>
27531
27532 * *: Change BZ -> DC.
27533 * mpn/generic/dc_divrem_n.c: Renamed from bz_divrem_n.c.
27534
27535 * doc/multiplication: Remove file, now in the manual.
27536 * doc/assembly_code: Ditto.
27537 * tune/README: Remove some parts now in the manual.
27538
27539 * gmp.texi (@m etc): Add and use some new macros.
27540 (Integer Division - mpz_[cft]div_*): Merge descriptions, for brevity
27541 and to emphasise similarities.
27542 (Low-Level Functions - mpn_[lr]shift): Specify count as 1 to
27543 mp_bits_per_limb-1.
27544 (Algorithms): New chapter.
27545 (References): Add some papers.
27546
27547 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove some
27548 unused variables.
27549 * mpn/generic/mul_fft.c (mpn_fft_best_k): Ditto.
27550
27551 * tune/freq.c: New file, split from time.c.
27552 * tune/time.c: Rewrite, now more automated.
27553 * configure.in, tune/*: Consequent changes.
27554
27555 2000-10-20 Torbjorn Granlund <[email protected]>
27556
27557 * mpn/ia64/default.m4: New file.
27558 * configure.in [config.m4 switch] (ia64*-*-*): Use ia64/default.m4.
27559
27560 * mpn/ia64/mul_1.asm: New file.
27561 * mpn/ia64/addmul_1.asm: New file.
27562 * mpn/ia64/add_n.asm: New file.
27563 * mpn/ia64/sub_n.asm: New file.
27564 * mpn/ia64/popcount.asm: New file.
27565 * mpn/ia64/README: New file.
27566
27567 * mpn/alpha/cntlz.asm: Override `.set noat' from ASM_START.
27568
27569 * configure.in (HAVE_TARGET_CPU_*): Support hppa1.0, hppa1.1, hppa2.0
27570 by sed'ing the period into `_'.
27571
27572 * acconfig.h: Add #undefs for hppa targets.
27573
27574 * longlong.h (udiv_qrnnd): Fix typo in last change.
27575
27576 * mpz/tstbit.c: Rewrite (partly to work around GCC 2.95.2 HPPA bug).
27577
27578 * configure.in [path switch]:
27579 (hppa2.0*-*-*): For non-CC64 case, update path.
27580
27581 * configure.in [compiler switch]:
27582 (hppa2.0w-*-*): Match with same regexp in both places.
27583 (hppa*-*-*): New case.
27584 (all hppa alternatives): Don't inherit default gmp_cflags_cc,
27585 gmp_cflags_c89.
27586
27587 2000-10-18 Torbjorn Granlund <[email protected]>
27588
27589 * configure.in (alpha*-*-*): Define gmp_xoptcflags_gcc like for
27590 alpha*-*-osf*.
27591
27592 * longlong.h (x86 udiv_qrnnd): Change `d' => `dx' to avoid K&R C
27593 stringification.
27594
27595 2000-10-15 Kevin Ryde <[email protected]>
27596
27597 * doc/configuration: Updates.
27598
27599 * demos/calc.y: Remove some comments.
27600
27601 2000-10-14 Kevin Ryde <[email protected]>
27602
27603 * gmp.texi (Parameter Conventions, Memory Management): New sections
27604 split from "Variable Conventions".
27605 (Efficiency, Debugging, Profiling): New sections in "GMP Basics".
27606 (Reentrancy): Some rewording, add note on standard I/O.
27607 (Build options): Add --enable-assert and --enable-profiling.
27608
27609 * configure.in (--enable-profiling): New option.
27610 * acinclude.m4 (GMP_ASM_X86_MCOUNT): New macro, finding how to profile.
27611 * mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_mcount): Profiling support.
27612
27613 * acinclude.m4, configure.in (GMP_ASM_*): Rename from GMP_CHECK_ASM_*,
27614 to follow autoconf conventions.
27615
27616 * configure.in: Run GMP_CHECK_ASM tests only if needed.
27617 * acinclude.m4 (GMP_CHECK_ASM_MMX): Don't use GMP_CHECK_ASM_TEXT.
27618
27619 * mpn/x86/x86-defs.m4 (ASSERT): Allow no condition, to just emit code.
27620
27621 2000-10-13 Kevin Ryde <[email protected]>
27622
27623 * mpq/md_2exp.c: New file.
27624 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
27625 * Makefile.am (MPQ_OBJECTS): Ditto.
27626 * gmp.h (mpq_mul_2exp, mpq_div_2exp): Add prototypes.
27627 * gmp.texi (Rational Arithmetic): Add documentation.
27628
27629 * mpq/tests/t-md_2exp.c: New file.
27630 * mpq/tests/Makefile.am (check_PROGRAMS): Add it.
27631
27632 * mpn/generic/perfsqr.c: Add/amend some comments.
27633
27634 * gmp.texi (Known Build Problems): Note VERSION problem with old
27635 sed, do some minor rewording.
27636 (Build Options): Add cygwin and djgpp URLs, mention INSTALL.autoconf,
27637 mention HTML.
27638 (Getting the Latest Version of GMP): Move this ...
27639 (Introduction to GMP): ... to here.
27640 (Compatibility with older versions): Just refer to 2.x and 3.x, not
27641 every minor version.
27642 (Initializing Integers): Note restrictions on mpz_array_init'ed
27643 variables.
27644 (Integer Logic and Bit Fiddling): Note bits are numbered from 0.
27645
27646 * INSTALL.autoconf: New file.
27647 * Makefile.am (EXTRA_DIST): Add it.
27648
27649 * tune/Makefile.am, tune/tuneup.c, configure.in, gmp-impl.h: New
27650 scheme for recompiled objects used by tune program. Don't use
27651 libgmptune.a, make better use of libtool, work with ansi2knr.
27652
27653 * tune/speed.h,common.c (SPEED_ROUTINE_MPZ_POWM): Use s->yp and
27654 s->xp_block, make exponent a fixed size.
27655
27656 2000-10-07 Torbjorn Granlund <[email protected]>
27657
27658 * mpn/mips3/gmp-mparam.h: Retune.
27659
27660 * mpn/generic/mul_n.c (USE_MORE_MPN): Revert last change.
27661
27662 2000-10-06 Torbjorn Granlund <[email protected]>
27663
27664 * mpn/mips3/add_n.s: Decrease carry recurrence from 4 to 3 cycles.
27665 * mpn/mips3/sub_n.s: Likewise.
27666
27667 2000-10-04 Torbjorn Granlund <[email protected]>
27668
27669 * configure.in (sparc64-*-linux*): Set path according to CC64.
27670
27671 2000-10-04 Kevin Ryde <[email protected]>
27672
27673 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Use LABEL_SUFFIX, not a
27674 hard-coded ":".
27675
27676 * config.sub: Don't demand "86" in CPU name for SCO.
27677
27678 * configure.in (supersparc-*-*): Remove -DSUPERSPARC.
27679 * longlong.h: Use HAVE_TARGET_CPU_supersparc.
27680
27681 * configure.in (HAVE_TARGET_CPU_*): AC_DEFINE from $target_cpu.
27682 * acconfig.h: Add #undefs, but only for targets of interest.
27683
27684 2000-10-03 Torbjorn Granlund <[email protected]>
27685
27686 * mpn/alpha/cntlz.asm: Rewrite.
27687
27688 * mp_clz_tab.c (__clz_tab): Half table size to 128 entires.
27689 * longlong.h (count_leading_zeros): Demand just 128 entries from
27690 __clz_tab.
27691
27692 * configure.in (mips-sgi-irix6.*): Pass -mips3 in addition to options
27693 for n32 ABI.
27694
27695 * longlong.h: Move NO_ASM test around all assembly code.
27696 From gcc:
27697 * longlong.h (count_leading_zeros): Sparclite scan instruction was
27698 being invoked incorrectly.
27699 Replace __mc68332__ with __mcpu32__.
27700 Add ARC support.
27701
27702 2000-10-02 Torbjorn Granlund <[email protected]>
27703
27704 * mpn/mips3/gmp-mparam.h: Retune for both gcc and cc.
27705
27706 * mpn/generic/mul_n.c (USE_MORE_MPN): Remove exception for __mips.
27707 (interpolate3): Cast mp_limb_t variables to mp_limb_signed_t
27708 when testing sign bit.
27709
27710 * mpn/alpha/ev6/gmp-mparam.h: Retune.
27711 * mpn/powerpc32/gmp-mparam.h: Retune.
27712 * mpn/powerpc64/gmp-mparam.h: Retune.
27713 * mpn/x86/pentium/gmp-mparam.h: Retune.
27714 * mpn/x86/pentium/mmx/gmp-mparam.h: Retune.
27715 * mpn/sparc32/v9/gmp-mparam.h: Retune.
27716 * mpn/x86/k6/gmp-mparam.h: Retune.
27717 * mpn/x86/p6/gmp-mparam.h: Retune.
27718 * mpn/x86/k7/gmp-mparam.h: Retune.
27719 * mpn/sparc64/gmp-mparam.h: Retune.
27720
27721 * mpn/m68k/gmp-mparam.h: New file.
27722 * mpn/alpha/ev5/gmp-mparam.h: New file.
27723
27724 * gmp-impl.h (default MPN_COPY): Remove final `;'.
27725
27726 * tune/time.c (speed_endtime): Rewrite.
27727
27728 * tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Set base to a large value,
27729 not 2.
27730
27731 * demos/pexpr.c (setup_error_handler): Fix typo.
27732
27733 * mpz/powm.c (redc): New function, based on old mpz_redc. Don't
27734 multiply here.
27735 (mpz_redc): Remove.
27736 (mpz_powm): Major changes, partially reverting to mpn calls.
27737 Multiply before calling redc.
27738 (mpz_powm): Use TMP_ allocation.
27739 (mpz_powm): Refine calculation of k (width of exponent window).
27740 (mpz_powm): Cast constants to mp_limb_t before left shifting.
27741
27742 * longlong.h: Use ia64 count_leading_zeros just when __GNUC__.
27743
27744 2000-09-29 Kevin Ryde <[email protected]>
27745
27746 * acinclude.m4 (GMP_C_SIZES): New macro.
27747 * configure.in: Use it.
27748 * acconfig.in (BYTES_PER_MP_LIMB etc): Add #undefs.
27749 * mpn/generic/gmp-mparam.h (BYTES_PER_MP_LIMB etc): Remove #defines.
27750 * gmp.texi (Known Build Problems): Remove 64-bit generic C
27751 gmp-mparam.h problem, now fixed.
27752
27753 * configure.in: Only run GMP_PROG_M4 if it's actually needed.
27754
27755 2000-09-27 Torbjorn Granlund <[email protected]>
27756
27757 * demos/pexpr.c: Clean up code for systems not supporting
27758 sigaltstack. Handle old Linux without sigaltstack. Properly
27759 disable all stuff related to sigaltstack under Unicos.
27760
27761 * mpn/alpha/ev6/addmul_1.asm: Use explicit offset for all load and
27762 store insns. Helps old gas.
27763
27764 * longlong.h (count_leading_zeros): Define for ia64.
27765
27766 2000-09-27 Paul Zimmermann <[email protected]>
27767
27768 * mpn/generic/bz_divrem_n.c: Fix qhl handling, simplify.
27769
27770 2000-09-27 Kevin Ryde <[email protected]>
27771
27772 * mpn/Makefile.in (.SUFFIXES): Regenerate with patched automake to
27773 get .s before .c, which is needed to override ansi2knr .c rules.
27774
27775 * gmp.texi (mpn_sqrtrem): Fix r2p==NULL return value description
27776 to match the code (change by Torbjorn).
27777 (mpn_gcd, mpn_gcdext, mpn_sqrtrem, mpn_tdiv_qr): Note most
27778 significant limbs must be non-zero.
27779 (mpn_gcd, mpn_gcdext, mpn_sqrtrem): Clarify destination size
27780 requirements.
27781 (mpn_gcd_1): Clarify value must be non-zero, not just size.
27782
27783 * gmp-impl.h (mpn_zero_p): New inline function.
27784 * mpn/generic/inlines.c: Add gmp-impl.h.
27785 * mpf/integer.c, mpz/get_d.c, mpn/generic/mul_fft.c: Use it.
27786
27787 * mpn/generic/gcd.c: Use MPN_COPY_INCR not MPN_COPY.
27788 * mpf/add_ui.c: Ditto.
27789 * mpf/add.c: Ditto, and fix test to skip copy.
27790
27791 2000-09-26 Kevin Ryde <[email protected]>
27792
27793 * gmp-impl.h, longlong.h, mpn/generic/*.c: Add ASSERTs for various
27794 parameter restrictions.
27795
27796 * gmp-impl.h (UDIV_PREINV_TIME): New macro.
27797 * mpn/generic/sb_divrem_mn.c: Use it.
27798 * mpn/generic/perfsqr.c: Ditto.
27799 * mpn/x86/*/gmp-mparam.h (UDIV_PREINV_TIME): Add values.
27800
27801 * macos/Makefile.in: Add mpz/tests/t-get_si.c, mpf/tests/t-set_f.c,
27802 and new multi-function mpz and mpq files.
27803
27804 2000-09-25 Kevin Ryde <[email protected]>
27805
27806 * randlc.c, randlc2x.c, randsd.c, mpz/urandomb.c, mpz/urandomm.c:
27807 Use mpz_ptr and mpz_srcptr for parameters.
27808 * gmp.h (gmp_randinit_lc, gmp_randinit_lc_2exp, gmp_randseed,
27809 mpz_urandomb, mpz_urandomm): Corresponding change to prototypes.
27810 * randsdui.c: Remove wrong K&R parameters part.
27811
27812 2000-09-12 Kevin Ryde <[email protected]>
27813
27814 * gmp-impl.h (mpn_tdiv_qr): Move prototype from here ...
27815 * gmp.h (mpn_tdiv_qr): ... to here.
27816
27817 * gmp.texi (Miscellaneous Rational Functions): Comment-out and
27818 move version 1 compatibility note to "Compatibility" section.
27819 (Rational Number Functions): Ditto for canonicalization note.
27820
27821 2000-09-10 Kevin Ryde <[email protected]>
27822
27823 * mpn/x86/pentium/com_n.asm: New file.
27824
27825 * gmp.texi (Rational Arithmetic): Add mpq_abs.
27826 (Miscellaneous Rational Functions): Merge and simplify descriptions of
27827 mpq_get_num, mpq_get_den, mpq_set_num, mpq_set_den.
27828
27829 * mpq/abs.c: New file.
27830 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
27831 * Makefile.am (MPQ_OBJECTS): Add it.
27832 * gmp.h (mpq_abs): Add prototype.
27833
27834 * mpq/set_den.c: Don't discard sign when copying, this makes the
27835 code match the manual.
27836
27837 2000-09-07 Torbjorn Granlund <[email protected]>
27838
27839 * tune/alpha.asm: Rewrite to actually work right.
27840
27841 2000-09-07 Kevin Ryde <[email protected]>
27842
27843 * tune/common.c,speed.[ch]: Add measuring of mpn_sqrtrem,
27844 mpn_get_str, mpn_set_str.
27845 * tune/README: Various updates.
27846
27847 2000-09-06 Torbjorn Granlund <[email protected]>
27848
27849 * mpz/fits.c: Correct type of `data'.
27850
27851 2000-09-06 Kevin Ryde <[email protected]>
27852
27853 * gmp.texi (Build Options): Clarify where to find CFLAGS.
27854 (Known Build Problems): Note SCO -lc problem.
27855
27856 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Fix for sizes > 512 limbs.
27857
27858 * doc/multiplication: Corrections and additions suggested by Paul.
27859
27860 * tune/modlinv.c: New file with alternate modlimb_inverts.
27861 * tune/Makefile.am, tune/speed.[ch]: Add measuring of them.
27862 * tune/speed.c (FLAG_NODATA): New attribute, use for mpz_bin_uiui,
27863 mpz_fib_ui, mpz_fac_ui.
27864
27865 * mpn/x86/t-zdisp.sh: New file.
27866
27867 * tests/t-modlinv.c: New file.
27868 * tests/Makefile.am (check_PROGRAMS): Add it.
27869
27870 * mpq/tests/t-set_f.c: New file.
27871 * mpq/tests/Makefile.am (check_PROGRAMS): Add it.
27872
27873 * gmp-impl.h (MPQ_CHECK_FORMAT): New macro.
27874 * mpq/tests/t-get_d.c: Use it.
27875
27876 * mpq/set_f.c: New file.
27877 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
27878 * Makefile.am (MPQ_OBJECTS): Ditto.
27879 * gmp.h: Add prototype.
27880 * gmp.texi (Miscellaneous Rational Functions): Document mpq_set_f,
27881 correct return type of mpq_set_d.
27882
27883 2000-09-03 Kevin Ryde <[email protected]>
27884
27885 * mpz/aors_ui.c: New file merging add_ui.c and sub_ui.c, no object
27886 code changes.
27887 * mpz/add_ui.c, mpz/sub_ui.c: Remove files.
27888 * mpz/Makefile.am: Update.
27889
27890 * gmp-impl.h (MPZ_FITS_STYPE_SDT, MPZ_FITS_UTYPE_SDT): New macros.
27891 * mpz/fits.c: New file merging six separate fits*.c.
27892 * mpz/fits_sshort_p.c, fits_sint_p.c, fits_slong_p.c, fits_ushort_p.c,
27893 fits_uint_p.c, fits_ulong_p.c: Remove files
27894 * mpz/Makefile.am: Use new fits.c, change object names from
27895 fits_*_p.lo to fits_*.lo to avoid SunOS 4 native "ar" warnings.
27896 * Makefile.am (MPZ_OBJECTS): Change from fits_*_p.lo to fits_*.lo.
27897
27898 * acinclude.m4 (GMP_CHECK_ASM_RODATA): New macro, defining RODATA.
27899 * configure.in: Use it.
27900 * mpn/x86/k[67]/mmx/popham.asm: Use it.
27901
27902 * mpn/x86/*/*.asm: Use "TEXT" not ".text".
27903
27904 2000-09-02 Kevin Ryde <[email protected]>
27905
27906 * mpq/aors.c: New file merging add.c and sub.c, no object code changes.
27907 * mpq/add.c, mpq/sub.c: Remove files.
27908 * mpq/Makefile.am: Update.
27909
27910 * mpz/aors.c: New file merging add.c and sub.c, no object code changes.
27911 * mpz/add.c, mpz/sub.c: Remove files.
27912 * mpz/Makefile.am, mpbsd/Makefile.am: Update.
27913
27914 * configure.in: Re-apply "PROLOGUE.*" regexp change for the
27915 benefit of alpha PROLOGUE_GP, lost in path search reorganisation.
27916
27917 * mpn/x86/x86-defs.m4 (jadcl0, cmov_simulate, ASSERT,
27918 movl_text_address): Don't use "1:" style labels.
27919 (Zdisp): Rearrange a bit, switch to all hex.
27920 * mpn/x86/README.family: Note SCO "as" doesn't support "1:" style
27921 local labels, misc rewordings.
27922
27923 2000-08-29 Torbjorn Granlund <[email protected]>
27924
27925 * demos/primes.c: Include string.h.
27926
27927 * config.guess (x86 variant recog code): Remove dummy*.o files
27928 generated by some compilers.
27929
27930 2000-08-28 Kevin Ryde <[email protected]>
27931
27932 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix Solaris 2.8
27933 warning message suppression, add notes about SCO.
27934
27935 * Makefile.am (MPZ_OBJECTS etc): Move some comments.
27936
27937 2000-08-25 Kevin Ryde <[email protected]>
27938
27939 * mpz/pprime_p.c (mpz_millerrabin): Fix a TMP_FREE.
27940
27941 * gmp.texi (Copying): Refer to Lesser not Library GPL.
27942 (GMP and Reentrancy): Note stack-alloc.c is not reentrant, and
27943 that SCO <ctype.h> is potentially not reentrant.
27944
27945 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Test by attempting to
27946 link with or without an underscore.
27947 * gmp.texi (Known Build Problems): Remove SunOS 4 native grep
27948 GSYM_PREFIX problem, now fixed.
27949
27950 * gmp-impl.h (MODLIMB_INVERSE_3): New constant.
27951 * mpn/generic/diveby3.c: Use it instead of own INVERSE_3.
27952 * mpn/generic/mul_n.c: Ditto.
27953 * tests/t-constants.c: Check it, and PP_INVERTED too.
27954
27955 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): New macro.
27956 * configure.in [p6 and athlon] (gmp_optcflags_gcc): Use it to
27957 possibly add -march=pentiumpro.
27958
27959 * gmp-impl.h (MPZ_SET_STR_OR_ABORT, MPF_SET_STR_OR_ABORT): New macros.
27960 * mpz/tests/t-bin.c, mpz/tests/t-get_si.c, mpz/tests/t-jac.c,
27961 mpz/tests/t-misc.c: Use them.
27962 * mpf/tests/t-conv.c, mpf/tests/t-misc.c: Ditto.
27963 * mpz/tests/convert.c: Ditto and amend diagnostics slightly.
27964 * mpz/tests/t-misc.c (check_mpz_set_si): Remove a superfluous init.
27965 * mpz/tests/io.c: Differentiate between I/O and data conversion errors.
27966
27967 * mpn/generic/aors_n.c: New file merging add_n and sub_n, no
27968 object code changes.
27969 * mpn/generic/add_n.c: Remove file.
27970 * mpn/generic/sub_n.c: Remove file.
27971
27972 * mpn/generic/aorsmul_1.c: New file merging addmul_1 and submul_1,
27973 no object code changes.
27974 * mpn/generic/addmul_1.c: Remove file.
27975 * mpn/generic/submul_1.c: Remove file.
27976
27977 * mpn/generic/popham.c: New file merging popcount and hamdist, no
27978 object code changes.
27979 * mpn/generic/popcount.c: Remove file.
27980 * mpn/generic/hamdist.c: Remove file.
27981
27982 2000-08-24 Torbjorn Granlund <[email protected]>
27983
27984 * gmp-impl.h (mpn_com_n): Fix typo.
27985
27986 2000-08-23 Torbjorn Granlund <[email protected]>
27987
27988 * demos/primes.c (main): Don't call mpz_probab_prime_p for numbers
27989 that are known to be prime after sieving.
27990 (main): Declare and initialize max_s_prime_squared.
27991 (MAX_S_PRIME): Increase.
27992 (ST_SIZE): Increase.
27993
27994 2000-08-23 Kevin Ryde <[email protected]>
27995
27996 * gmp-impl.h (ASSERT_ALWAYS): Change to statement style.
27997 (JACOBI_TWO_U_BIT1): Remove ASSERT.
27998 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS as a statement.
27999
28000 2000-08-21 Torbjorn Granlund <[email protected]>
28001
28002 * gmp-impl.h (ASSERT): Use do..while for dummy version.
28003
28004 * mpf/get_str.c: Don't set n_digits from digits_computed_so_far
28005 when the converted operand becomes zero. Misc cleanups.
28006
28007 2000-08-21 Kevin Ryde <[email protected]>
28008
28009 * mpz/fdiv_r_2exp.c, mpz/lcm.c, mpz/urandomm.c: Add missing
28010 TMP_MARK/FREE, avoiding memory leak when using stack-alloc.c.
28011
28012 2000-08-20 Kevin Ryde <[email protected]>
28013
28014 * mpz/set.c [BERKELEY_MP] (move): Add conditionals to build as
28015 "move" for libmp.
28016 * mpbsd/Makefile.am: Use mpz/set.c, not move.c.
28017 * Makefile.am (MPBSD_OBJECTS): Corresponding change.
28018 * mpbsd/move.c: Remove file.
28019
28020 * mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am,
28021 mpbsd/Makefile.am (-DOPERATION_foo): Use "foo" even for ansi2knr
28022 "foo_" objects. Do this with the makefiles to keep the sources
28023 cleaner.
28024 * mpz/mul_siui.c, mpf/integer.c: Revert to plain OPERATION_* forms.
28025
28026 * mpn/lisp/gmpasm-mode.el (gmpasm-remove-from-list): Renamed from
28027 gmpasm-delete-from-list, because it's non-destructive.
28028 (gmpasm-font-lock-keywords): Add some more keywords.
28029
28030 2000-08-16 Kevin Ryde <[email protected]>
28031
28032 * tune/mul_n_mpn.c, tune/mul_n_open.c: New files, being forced
28033 open-coded and mpn #includes of mpn/generic/mul_n.c.
28034 * tune/*: Add measuring of them.
28035 * tune/speed.c: Print command line into *.gnuplot file.
28036
28037 * mpn/generic/mul_n.c (USE_MORE_MPN): Change to #if not #ifdef for
28038 using the value, add #ifndef for providing the default.
28039 * mpn/sparc64/gmp-mparam.h (USE_MORE_MPN): Add #ifndef.
28040
28041 * tests/t-constants.c: New file.
28042 * tests/Makefile.am (check_PROGRAMS): Add it.
28043
28044 * mpz/get_si.c: Use LONG_MAX, not BITS_PER_MP_LIMB, so the result
28045 doesn't depend on limb size when outside the range of a long
28046 (though such results are not actually documented).
28047 * mpz/tests/t-get_si.c: New file.
28048 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
28049
28050 * mpn/tests/try.c (call): Cast popcount and hamdist calls,
28051 for the benefit of long long limb.
28052
28053 2000-08-15 Kevin Ryde <[email protected]>
28054
28055 * mp.h (mp_set_memory_functions): Add missing #define.
28056 * mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its
28057 existence.
28058
28059 * mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying
28060 reverted behaviour of mpf_get_prec.
28061
28062 * mpn/tests/ref.c (refmpn_strip_twos): Use refmpn_copyi, not
28063 MPN_COPY_INCR.
28064
28065 * mpz/mul_siui.c, mpf/integer.c: Recognise OPERATION_*_ forms
28066 produced under ansi2knr.
28067
28068 * configure.in (mpn_objects, mpn_objs_in_libgmp): Add $U to .c
28069 objects when ansi2knr in use.
28070
28071 * mpn/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
28072 (libdummy.la): Add this, not built, to create ansi2knr style rules
28073 for all potential .c files.
28074 * mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpfr/Makefile.am,
28075 mpbsd/Makefile.am, mpq/tests/Makefile.am, tests/Makefile.am
28076 (AUTOMAKE_OPTIONS): Enable ansi2knr (now everywhere).
28077 * Makefile.am (MPZ_OBJECTS, MPQ_OBJECTS, MPF_OBJECTS, MPFR_OBJECTS,
28078 MPBSD_OBJECTS, libmp_la_DEPENDENCIES): Add $U to all .lo filenames.
28079
28080 2000-08-03 Torbjorn Granlund <[email protected]>
28081
28082 * mpn/alpha/ev6/addmul_1.asm: Correct number of cycles to 3.5/28.
28083
28084 2000-08-02 Torbjorn Granlund <[email protected]>
28085
28086 * Version 3.1 released.
28087
28088 * gmp.texi: Rephrase mpf_urandomb documentation.
28089
28090 * mpn/alpha/ev6: New directory with ev6/21264 optimized code.
28091 * mpn/alpha/ev6/addmul_1.asm: New file.
28092 * mpn/alpha/ev6/gmp-mparam.h: New file.
28093
28094 2000-08-02 Kevin Ryde <[email protected]>
28095
28096 * demos/factorize.c (random): Don't use "inline".
28097
28098 * mpfr/log.c, mpfr/mul_ui.c, mpfr/round.c, mpfr/set.c, mpfr/set_d.c:
28099 Corrections to K&R parts.
28100
28101 * Makefile.am (EXTRA_HEADERS): Omit $(MPFR_HEADERS_OPTION).
28102 * mpfr/Makefile.am (EXTRA_DIST): Add mpfr.h.
28103
28104 * gmp.texi (Known Build Problems): Note problem stripping libgmp.a.
28105
28106 2000-08-02 Kent Boortz <[email protected]>
28107
28108 * mpfr: Integrated experimental version of mpfr-0.4.
28109 * configure.in: Changes for option --enable-mpfr.
28110 * Makefile.am: Changes for option --enable-mpfr.
28111
28112 2000-08-01 Torbjorn Granlund <[email protected]>
28113
28114 * mpn/generic/popcount.c: Disable SPARC v9 popc_limb pattern.
28115 * mpn/generic/hamdist.c: Likewise.
28116
28117 2000-08-01 Kevin Ryde <[email protected]>
28118
28119 * mpn/tests/try.c (try_init): Account for ALIGNMENTS when sizing
28120 source and dest regions.
28121
28122 2000-07-31 Torbjorn Granlund <[email protected]>
28123
28124 * mpf/get_str.c: Develop three extra digits, not just one.
28125
28126 2000-07-31 Kevin Ryde <[email protected]>
28127
28128 * gmp.texi (References): Add URL for invariant division.
28129
28130 2000-07-30 Kevin Ryde <[email protected]>
28131
28132 * tune/time.c (speed_cpu_frequency_proc_cpuinfo): Add support for
28133 alpha linux "cycle frequency".
28134
28135 * mpn/sparc64/gmp-mparam.h: Re-run tune program for FFT thresholds.
28136
28137 2000-07-29 Kevin Ryde <[email protected]>
28138
28139 * gmp.texi (ABI and ISA): Add sparc64-*-linux*.
28140 * configure.in [sparc64-*-linux*] (gmp_cflags64_gcc): Same flags
28141 as under solaris.
28142
28143 * configure.in (--enable-fft): New option, default "no".
28144 * gmp.texi (Build Options): Describe it.
28145 * mpn/generic/mul.c, mpn/generic/mul_n.c [WANT_FFT]: Use it.
28146 * tune/tuneup.c [WANT_FFT]: By default don't probe FFTs if not enabled.
28147 * NEWS: Multiplication optionally using FFT.
28148
28149 * tune/README: Notes on FFT and GCD thresholds, other minor updates.
28150
28151 * Makefile.am: Expunge the macos generated files update stuff.
28152
28153 2000-07-28 Kevin Ryde <[email protected]>
28154
28155 * mpn/x86/*/gmp-mparam.h: Add some FFT thresholds.
28156
28157 2000-07-28 Kent Boortz <[email protected]>
28158
28159 * macos/Asm*, macos/CmnObj, macos/Mp*: Delete directories.
28160 * macos/Makefile: Delete file.
28161 * macos/Makefile.cw: Delete file.
28162 * macos/config.h: Delete file.
28163 * macos/Asm/*.s: Delete files.
28164 * macos/configure: Create target directories. Don't transform
28165 '(C)' to '(;)' in a 'dnl' line comment in .asm file.
28166 * Makefile.am: Delete macos targets.
28167 * macos/README: Reflect that we reverted back to a build
28168 process that require ""macos/configure" to run on MacOS.
28169 This imply that MacPerl is needed for a build in MacOS.
28170
28171 2000-07-27 Kevin Ryde <[email protected]>
28172
28173 * mpn/generic/mul_fft.c: New file, by Paul Zimmermann, minor mods
28174 applied.
28175 * configure.in (gmp_mpn_functions): Add it.
28176 * mpn/generic/mul.c, mpn/generic/mul_n.c: Use it.
28177 * doc/multiplication: Describe it (briefly).
28178
28179 * gmp-impl.h (FFT_MUL_THRESHOLD etc): New thresholds.
28180 (mpn_fft_best_k, mpn_fft_next_size, mpn_mul_fft, mpn_mul_fft_full):
28181 New functions.
28182 (numberof, TMP_ALLOC_TYPE etc, _MP_ALLOCATE_FUNC_TYPE etc,
28183 UNSIGNED_TYPE_MAX etc): New macros.
28184
28185 * tune/*: Add FFT threshold tuning and speed measuring.
28186 * tune/common.c: Avoid huge macro expansions for umul and udiv.
28187
28188 * mpz/tests/t-bin.c, mpz/tests/t-jac.c, mpz/tests/t-misc.c,
28189 mpbsd/tests/t-misc.c, mpf/tests/t-misc.c, mpn/tests/try.c,
28190 mpn/tests/spinner.c: Use new gmp-impl.h macros.
28191
28192 * demos/Makefile.am (BUILT_SOURCES): Don't need calc.c etc under this.
28193
28194 2000-07-27 Torbjorn Granlund <[email protected]>
28195
28196 * mpn/ia64/gmp-mparam.h: New file.
28197
28198 2000-07-26 Torbjorn Granlund <[email protected]>
28199
28200 * demos/isprime.c: Handle any number of arguments and print
28201 classification for each. Add `-q' option for old behaviour.
28202
28203 2000-07-26 Kevin Ryde <[email protected]>
28204
28205 * gmp.texi (Build Options): Mention djgpp stack size.
28206 (Notes for Package Builds): New section.
28207 (Compatibility with older versions): Update for 3.1, add mpf_get_prec.
28208
28209 * demos/factorize.c [__GLIBC__]: Don't declare random() under glibc.
28210
28211 * gmp.h (gmp_version): Add prototype and define.
28212
28213 * Makefile.am: Keep macos directory generated files up-to-date
28214 during development and on a "make dist".
28215
28216 2000-07-25 Torbjorn Granlund <[email protected]>
28217
28218 * mpn/hppa/gmp-mparam.h: Update threshold values from new `tune' run.
28219
28220 * mpn/pa64/gmp-mparam.h: Fill in values from `make tune' run.
28221 * mpn/pa64w/gmp-mparam.h: Likewise.
28222 * mpn/mips3/gmp-mparam.h: Likewise.
28223
28224 * tune/hppa2.asm: Fix typo in .level directive.
28225
28226 * configure.in: Add sparc64-*-linux* support (from Jakub Jelinek).
28227 * configure: Regenerate.
28228
28229 * mpn/sparc64/rshift.asm: Use %g5 instead of volatile stack frame area
28230 for return value (from Jakub Jelinek).
28231 * mpn/sparc64/lshift.asm: Likewise.
28232
28233 * mpf/get_prc.c: Revert Aug 8, 1996 change.
28234
28235 * version.c: No longer static.
28236
28237 * mpn/pa64/gmp-mparam.h: Only #define *_THRESHOLD if not already
28238 defined.
28239 * mpn/pa64w/gmp-mparam.h: Likewise.
28240 * mpn/arm/gmp-mparam.h: Likewise.
28241 * mpn/mips3/gmp-mparam.h: Likewise.
28242
28243 2000-07-25 Kevin Ryde <[email protected]>
28244
28245 * INSTALL: It's "info -f ./gmp.info" to be sure of hitting the
28246 gmp.info in the current directory.
28247
28248 * Makefile.am (libmp_la_DEPENDENCIES): Add mpz/cmp.lo, for last
28249 mpz/powm.c fix.
28250
28251 * mpn/sparc64/addmul1h.asm, mpn/sparc64/submul1h.asm: Renamed from
28252 addmul_1h.asm, submul_1h.asm to avoid name conflicts on an 8.3
28253 filesystem.
28254 * mpn/sparc64/addmul_1.asm, mpn/sparc64/submul_1.asm,
28255 mpn/sparc64/mul_1.asm: Update include_mpn()s.
28256
28257 2000-07-24 Torbjorn Granlund <[email protected]>
28258
28259 * Update header of all files previously under the Library GPL
28260 to instead be under the Lesser GPL.
28261
28262 * COPYING.LIB: Now Lesser GPL.
28263 * demos/primes.c: Change license to GPL (was Library GPL).
28264 * demos/isprime.c: Change license to GPL (was Library GPL).
28265
28266 * gmp.h (error code enum): Add GMP_ERROR_BAD_STRING (currently unused).
28267
28268 * mpz/tests/t-mul.c: Default SIZE to a function of TOOM3_MUL_THRESHOLD.
28269 Improve error messages. Decrease reps.
28270
28271 2000-07-22 Kevin Ryde <[email protected]>
28272
28273 * tune/speed.h: Decrease the amount of data used for gcd and powm
28274 measuring, to make the tune go a bit faster.
28275
28276 2000-07-21 Kent Boortz <[email protected]>
28277
28278 * macos/Asm*, macos/CmnObj, macos/Mp*: Directories no longer created
28279 from configure script, now part of dist.
28280 * macos/Makefile
28281 * macos/Makefile.cw
28282 * macos/config.h
28283 * macos/Asm/*.s
28284 New files and directories that is the output from configure. This way
28285 no Perl installation is required to build on MacOS, just MPW.
28286 * macos/configure: Added prefix '__g' to exported assembler labels.
28287 Changed to handle new m4 syntax instead of the old cpp syntax in asm.
28288 * macos/Makefile.in: Corrected 'clean' target, added 'distclean'
28289 and 'maintainer_clean'. Added "mpn/mp_bases.c" to build.
28290 * macos/README: Reflect the new build process without configure.
28291 Corrected the file structure for Apple MPW installation.
28292
28293 2000-07-21 Torbjorn Granlund <[email protected]>
28294
28295 * mpf/tests/t-muldiv.c: Relax error limit. Make precision depend
28296 on SIZE. Misc changes.
28297
28298 * configure: Regenerate.
28299
28300 2000-07-20 Kent Boortz <[email protected]>
28301
28302 * macos/Makefile.in: Removed hard coded targets, added special
28303 targets found in Makefile.am files.
28304 * macos/configure: Generate targets from top configure script and
28305 Makefile.am files. Made script runnable from Unix for testing.
28306 * macos/README: Notes about search paths for includes, contributed
28307 by Marco Bambini.
28308 * configure.in: Added comment about lines that the "macos/configure"
28309 script depend on.
28310
28311 2000-07-20 Torbjorn Granlund <[email protected]>
28312
28313 * mpz/powm.c (mpz_powm): After final mpz_redc call, subtract `mod'
28314 from result if it is greater than `mod'.
28315
28316 2000-07-19 Torbjorn Granlund <[email protected]>
28317
28318 * mpn/hppa/gmp-mparam.h: Fill in values from `make tune' run.
28319 * mpn/alpha/gmp-mparam.h: Likewise.
28320 * mpn/powerpc32/gmp-mparam.h: Likewise.
28321
28322 * tune/hppa.asm: New file.
28323 * tune/hppa2.asm: New file.
28324 * configure.in (SPEED_CYCLECOUNTER_OBJS): Set for hppa2*-*-* and
28325 hppa*-*-*.
28326 * tune/Makefile.am (EXTRA_DIST): Add hppa.asm and hppa2.asm.
28327
28328 * tune/speed.h (SPEED_ROUTINE_MPN_BZ_DIVREM_CALL): Declare `marker';
28329 invoke TMP_FREE.
28330
28331 * mpn/hppa/hppa1_1/udiv_qrnnd.S: Use "%" instead of "'" for
28332 reloc/symbol delimiter.
28333
28334 2000-07-16 Torbjorn Granlund <[email protected]>
28335
28336 * mpn/powerpc64/gmp-mparam.h: Update with output from tune utility.
28337 * mpn/powerpc64/copyi.asm: New file.
28338 * mpn/powerpc64/copyd.asm: New file.
28339
28340 2000-07-16 Kevin Ryde <[email protected]>
28341
28342 * tune/*: Add measuring for umul_ppmm and udiv_qrnnd.
28343
28344 2000-07-14 Kevin Ryde <[email protected]>
28345
28346 * mpn/x86/k6/k62mmx: New directory.
28347 * configure.in (k6[23]*-*-*): Use it.
28348 * mpn/x86/k6/k62mmx/copyi.asm, mpn/x86/k6/k62mmx/copyd.asm: Move from
28349 mmx directory, improve code alignment a bit.
28350 * mpn/x86/k6/k62mmx/lshift.asm, mpn/x86/k6/k62mmx/rshift.asm: Ditto,
28351 and improve addressing modes for pre-CXT cores.
28352 * mpn/x86/x86-defs.m4 (Zdisp): Add an instruction.
28353 * mpn/x86/k6/mmx/lshift.asm, mpn/x86/k6/mmx/rshift.asm: New files,
28354 suiting plain K6.
28355 * mpn/x86/README, mpn/x86/k6/README: Updates.
28356 * mpn/x86/k6/mmx/*.asm: Update some comments.
28357
28358 * mpn/tests/Makefile.am: Use $(MAKE) in .asm rules, not "m".
28359 * tune/Makefile.am: Use $(EXEEXT) and libtool --config objdir, for
28360 the benefit of djgpp.
28361
28362 * */Makefile.in: Regenerate with patched automake that adds
28363 $(EXEEXT) to EXTRA_PROGRAMS.
28364
28365 * mpn/tests/try.c: Add #ifdef to SIGBUS, for the benefit of djgpp.
28366 * config.guess: Recognise pc:*:*:* as an x86, for djgpp.
28367
28368 * configure: Regenerate with patched autoconf to fix temp file
28369 ".hdr" which is invalid on a DOS 8.3 filesystem, and to fix two
28370 sed substitutes that clobbered a ":" in $srcdir (eg. a DOS drive
28371 spec).
28372
28373 * mpz/tests/io.c: Use one fp opened "w+", since separately opened
28374 input and output doesn't work on MS-DOS 6.21.
28375
28376 * tests/rand/Makefile.am (allprogs): Pseudo-target to build everything.
28377 (CLEANFILES): Add EXTRA_PROGRAMS and EXTRA_LTLIBRARIES.
28378 (manual-test, manual-bigtest): Add $(EXEEXT) to dependencies.
28379
28380 * tests/rand/*/Makefile.in: Regenerate with patched automake that adds
28381 $(EXEEXT) to EXTRA_PROGRAMS.
28382
28383 2000-07-13 Torbjorn Granlund <[email protected]>
28384
28385 * mpz/tests/t-root.c: Also test mpz_perfect_power_p.
28386 Generate `nth' so that there will be fewer trivial values.
28387
28388 * mpz/root.c: Reverse return value in tests for detecting root of +1
28389 and -1.
28390
28391 * mpz/perfpow.c: Use TMP_ALLOC interface.
28392
28393 2000-07-12 Torbjorn Granlund <[email protected]>
28394
28395 * mpz/perfpow.c (primes): Make it const.
28396
28397 2000-07-06 Kevin Ryde <[email protected]>
28398
28399 * mpn/x86/k6/cross.pl: New file.
28400
28401 * mpn/x86/*/gmp-mparam.h: Updates to thresholds, conditionalize
28402 all _TIME defines.
28403 * mpn/x86/pentium/mmx/gmp-mparam.h: New file.
28404 * mpn/sparc64/gmp-mparam.h: Update thresholds.
28405 * mpn/sparc32/v9/gmp-mparam.h: Ditto.
28406
28407 2000-07-04 Kevin Ryde <[email protected]>
28408
28409 * NEWS: Updates.
28410 * mpn/x86/*/README: Miscellaneous updates.
28411
28412 * tune/speed-ext.c: New file.
28413 * tune/Makefile.am: Add it.
28414 * tune/README: Updates.
28415 * tune/speed.h (SPEED_ROUTINE_MPN_DIVREM_2): Bug fixes.
28416
28417 * demos/calc.y,calclex.l: New files.
28418 * demos/calc.c,calc.h,calclex.c: New files, generated from .y and .l.
28419 * demos/Makefile.am: Add them.
28420
28421 * gmp.h (mpq_swap, mpf_swap): Add prototypes and defines.
28422
28423 2000-07-01 Kevin Ryde <[email protected]>
28424
28425 * gmp.texi (ABI and ISA): New section, bringing together ABI notes.
28426 (Build Options): Add MPN_PATH, various updates.
28427 (Build Options): Add note on setting CFLAGS when setting CC.
28428 (Notes for Particular Systems): Add -march=pentiumpro problem.
28429 (Known Build Problems): Note on gmp-mparam.h for 64-bit generic C.
28430 (GMP Variable Conventions): Add some info on user defined functions.
28431 (Reporting Bugs): Minor rewording.
28432
28433 * configure.in (MPN_PATH): Renamed from mpn_path.
28434
28435 * gmp-impl.h (ULONG_MAX,ULONG_HIGHBIT,...,SHORT_MAX): New defines.
28436 * mp[zf]/tests/t-misc.c: Use them.
28437
28438 * mpbsd/tests/t-misc.c: New file.
28439 * mpbsd/tests/Makefile.am: Add it.
28440
28441 * Makefile.am (LIBGMP_LT_*, LIBMP_LT_*): Bump version info.
28442 * gmp.h (__GNU_MP_VERSION_*): Bump to 3.1.
28443
28444 * mpf/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
28445
28446 * Makefile.am (libmp_la_SOURCES): Add mp_set_fns.c, accidentally
28447 omitted in gmp 3.0.x.
28448 * gmp.texi (Custom Allocation): Note this is available in mpbsd,
28449 and some minor rewording.
28450
28451 2000-06-30 Torbjorn Granlund <[email protected]>
28452
28453 * demos/factorize.c (random): New function, defined conditionally.
28454 (factor_using_pollard_rho): Use it, not mrand48.
28455
28456 * mpn/cray/README: New file.
28457
28458 2000-06-30 Kevin Ryde <[email protected]>
28459
28460 * mpn/x86/pentium/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
28461
28462 * mpz/tests/t-jac.c: Test limbs on mpn_jacobi_base, not just ulongs.
28463
28464 * gmp-impl.h, mpn/tests/try.c, mpn/tests/spinner.c, tune/speed.c:
28465 Use config.h unconditionally, not under HAVE_CONFIG_H.
28466
28467 * demos/pexpr.c [__DJGPP__]: Patch by Richard Dawe to not use
28468 setup_error_handler on djgpp.
28469
28470 * tune/*: Locate data to help direct-mapped caches, add measuring
28471 of mpz_init/clear, mpz_add and mpz_bin_uiui, various cleanups.
28472 * configure.in (AC_CHECK_FUNCS): Add popen.
28473
28474 2000-06-29 Torbjorn Granlund <[email protected]>
28475
28476 * mpf/mul_2exp.c: Streamline criterion for whether to use mpn_lshift or
28477 mpn_rshift. Increase precision when exp is a multiple of
28478 BITS_PER_MP_LIMB primarily to make exp==0 be a noop.
28479 * mpf/div_2exp.c: Analogous changes.
28480
28481 * mpf/tests/t-dm2exp.c: Set u randomly in loop. Perform more
28482 mpf_mul_2exp testing.
28483
28484 * configure.in: Recognize cray vector processors with a broad `*';
28485 move after alpha* not to match that.
28486
28487 2000-06-28 Kevin Ryde <[email protected]>
28488
28489 * mpz/tests/io.c: Use a disk file, not a pipe, switch to ansi2knr
28490 style, switch from MP_INT to mpz_t, add a couple of error checks.
28491 * mpz/tests/Makefile.am (CLEANFILES): Add io.tmp, in case io.c fails.
28492
28493 2000-06-27 Torbjorn Granlund <[email protected]>
28494
28495 * mpf/tests/t-get_d.c: Be more lax about relative error, to handle Cray
28496 floating point format.
28497
28498 * mpq/tests/t-get_d.c: Decrease default reps to 1000.
28499
28500 * mpf/tests/t-conv.c: Correct type of `bexp'.
28501
28502 * configure.in (cray vector machines): Don't inherit gmp_cflags_cc.
28503
28504 * tune/Makefile.am (EXTRA_DIST): Delete sparc64.asm.
28505
28506 * configure.in (cray vector machines): Set extra_functions.
28507
28508 * mpn/cray/mulww.f: New file with vectorizing cray code.
28509 * mpn/cray/mulww.s: Generated from mulww.f.
28510 * mpn/cray/mul_1.c: New file.
28511 * mpn/cray/addmul_1.c: New file.
28512 * mpn/cray/submul_1.c: New file.
28513 * mpn/cray/add_n.c: New file.
28514 * mpn/cray/sub_n.c: New file.
28515
28516 2000-06-26 Kevin Ryde <[email protected]>
28517
28518 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix so it actually
28519 detects solaris 2.6, and also suppress warning on solaris 2.8.
28520 * configure.in (SPEED_CYCLECOUNTER): Remove spurious "athlon" from
28521 sparc case.
28522
28523 * mpn/lisp/gmpasm-mode.el: Move keymap to the top of the docstring.
28524
28525 2000-06-21 Kevin Ryde <[email protected]>
28526
28527 * mpn/generic/mul_n.c (mpn_kara_mul_n, mpn_kara_sqr_n): Use
28528 mp_size_t for n2.
28529 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Use mp_size_t for size
28530 parameters and "l" variables.
28531 * gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Update prototypes.
28532
28533 * mpbsd/itom.c, mpbsd/sdiv.c: Add casts for correct handling of
28534 -0x80...00 on systems with sizeof(short)==sizeof(int).
28535
28536 * mpz/tests/t-misc.c: Move "bin" test from here ...
28537 * mpz/tests/t-bin.c: ... to here, and add a new (2k,k) test too.
28538 * mpz/tests/Makefile.am (check_PROGRAMS): Add t-bin.
28539
28540 * mpz/bin_ui.c [_LONG_LONG_LIMB]: Use mpn_divrem_1, since kacc is
28541 a limb not a ulong.
28542 * mpz/bin_uiui.c [_LONG_LONG_LIMB]: Ditto, and use mpn_mul_1 too,
28543 since nacc is a limb.
28544
28545 * mpf/tests/t-misc.c (check_mpf_set_si, check_mpf_cmp_si):
28546 New file, testing mpf_set_si, mpf_init_set_si, and mpf_cmp_si.
28547 * mpf/tests/Makefile.am (check_PROGRAMS): Add it.
28548
28549 * mpz/tests/t-misc.c (check_mpz_set_si, check_mpz_cmp_si):
28550 New tests, for mpz_set_si, mpz_init_set_si, and mpz_cmp_si.
28551
28552 * mpz/set_si.c, mpz/iset_si.c, mpz/cmp_si.c [_LONG_LONG_LIMB]: Fix
28553 handling of -0x80..00.
28554 * mpf/set_si.c, mpf/iset_si.c, mpf/cmp_si.c [_LONG_LONG_LIMB]: Ditto.
28555
28556 2000-06-19 Torbjorn Granlund <[email protected]>
28557
28558 * demos/primes.c: Properly handle arguments `m +n'.
28559
28560 2000-06-17 Torbjorn Granlund <[email protected]>
28561
28562 * config.sub: Recognize k5 and k6 with common pattern.
28563
28564 * mpq/tests/t-get_d.c: Also test mpq_set_d. Misc improvements.
28565
28566 * mpq/set_d.c: Special case 0.0. Don't call mpn_rshift with 0 count.
28567 Allocate correct amount of memory for numerator. Delete spurious
28568 ASSERT_ALWAYS(1).
28569
28570 2000-06-17 Kevin Ryde <[email protected]>
28571
28572 * mpz/perfsqr.c: Fix so that zero is considered a perfect square.
28573 (Was wrongly calling mpn_perfect_square_p with size==0.)
28574
28575 2000-06-16 Kevin Ryde <[email protected]>
28576
28577 * configure.in: Set k5*-*-* to use basic i386 code until there's
28578 something specific. Add path=x86 as a default for x86s.
28579
28580 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_LOG): Generate
28581 ALIGN_LOGARITHMIC setting, not a full ALIGN definition.
28582 (GMP_CHECK_ASM_ALIGN_FILL_0x90): New test.
28583 * configure.in [x86-*-*]: Use GMP_CHECK_ASM_ALIGN_FILL_0x90.
28584 * mpn/asm-defs.m4 (ALIGN): New macro.
28585 * mpn/x86/x86-defs.m4 (ALIGN): Remove supplementary definition.
28586
28587 * tune/*: Plain "unsigned" for speed_cyclecounter.
28588 * configure.in: Use tune/sparcv9.asm for 32 and 64 bit modes.
28589 * tune/sparc64.asm: Remove file.
28590
28591 2000-06-15 Torbjorn Granlund <[email protected]>
28592
28593 * mpn/x86/k7/mmx/copyi.asm: Use `testb' instead of `test'.
28594 * mpn/x86/k7/mmx/copyd.asm: Likewise.
28595
28596 * mpn/x86/k7/mmx/lshift.asm: Avoid using `~' (Solaris as problems).
28597 * mpn/x86/k7/mmx/rshift.asm: Likewise.
28598 * mpn/x86/k6/aors_n.asm: Likewise.
28599 * mpn/x86/k7/aors_n.asm: Likewise.
28600 * mpn/x86/k7/mul_basecase.asm: Likewise.
28601
28602 2000-06-13 Torbjorn Granlund <[email protected]>
28603
28604 * tune/sparcv9.asm: Tune, deleting two instructions.
28605
28606 * tune/alpha.asm: Update to unified speed_cyclecounter.
28607
28608 2000-06-11 Kevin Ryde <[email protected]>
28609
28610 * mpz/tests/reuse.c (FAIL): Add a K&R version.
28611 Use _PROTO on some typedefs.
28612 * mpz/tests/t-misc.c: Add gmp-impl.h for "const".
28613
28614 * configure.in: Rework mpn multi-function and optional files.
28615 Names standardized, no need for explicit declarations, all picked
28616 up in one $path traversal.
28617 * doc/configuration: Updates.
28618
28619 * tests/rand/t-rand.c (main): Change "usage" to work with K&R.
28620
28621 2000-06-10 Kevin Ryde <[email protected]>
28622
28623 * mpn/x86/pentium/mmx/popham.asm, mpn/x86/p6/mmx/popham.asm,
28624 mpn/x86/p6/p3mmx/popham.asm, mpn/x86/p6/diveby3.asm: Add
28625 MULFUNC_PROLOGUE for correct HAVE_NATIVE_* matching.
28626
28627 * mpn/x86/x86-defs.m4 (cmov_bytes_tttn): Use eval() on expressions.
28628 (cmov_available_p): Switch to list CPUs which do have cmov.
28629 * mpn/x86/p6/sqr_basecase.asm, mpn/x86/k6/sqr_basecase.asm,
28630 mpn/x86/k7/sqr_basecase.asm: Use eval() for multiplication.
28631 * mpn/x86/README.family: Various updates.
28632
28633 2000-06-09 Kevin Ryde <[email protected]>
28634
28635 * mpbsd/tests/allfuns.c (main): Call exit() instead of doing return.
28636
28637 * doc/tasks.html, doc/projects.html: Moved from projects directory.
28638 * doc/multiplication: New file.
28639 * Makefile.am (EXTRA_DIST): Remove projects, add doc.
28640
28641 * Makefile.am (libgmp_la_LIBADD, libmp_la_LIBADD): Remove
28642 unnecessary -lm.
28643 * INSTALL: Remove -lm from instructions.
28644 * demos/Makefile.am (qcn_LDADD): Add -lm.
28645
28646 * tune/*: Add measuring for mpn_divrem_2 and modlimb_invert,
28647 improve addsub_n. Switch to unified speed_cyclecounter.
28648 * configure.in: Update configs for speed_cyclecounter.
28649
28650 * gmp-impl.h (MP_LIMB_T_MAX, MP_LIMB_T_HIGHBIT): New macros.
28651 * mpn/generic/diveby3.c, mpn/generic/mul_n.c, mpn/generic/gcd.c,
28652 tune/speed.c, mpn/tests/ref.c: Use them.
28653
28654 * mpn/tests/spinner.c: Remove setitimer, just alarm is enough.
28655 * configure.in (AC_CHECK_FUNCS): Remove setitimer.
28656 * mpn/tests/x86call.asm: Start with junk in %eax, %ecx, %edx.
28657 * mpn/tests/ref.[ch] (refmpn_addsub_nc): New function.
28658 * mpn/tests/try.c: Add some support for mpn_addsub_nc.
28659 * mpn/tests/Makefile.am (EXTRA_PROGRAMS): Remove addsub_n and
28660 addsub_n_2 which don't currently build.
28661 * mpn/tests/copy.c: Test MPN_COPY_INCR, not __gmpn_copy.
28662
28663 * tests/rand/Makefile.am (libstat_la_LIBADD): Add -lm, no longer on
28664 libgmp.la.
28665 (findlc_LDADD): Use libstat.la.
28666 (AUTOMAKE_OPTIONS): Use ansi2knr.
28667
28668 2000-06-08 Torbjorn Granlund <[email protected]>
28669
28670 * configure.in (alpha*-*-osf*): Default `flavour' to ev6 for ev6 and
28671 higher.
28672 (alpha*-*-*): Likewise.
28673 (alpha*-*-osf*: gmp_optcflags_cc): Move -arch/-tune flags from
28674 gmp_xoptcflags_gcc.
28675
28676 * mpn/Makefile.am (TARG_DIST): Add pa64w.
28677
28678 * longlong.h: Wrap 64-bit hppa code in #ifndef LONGLONG_STANDALONE.
28679
28680 2000-06-07 Torbjorn Granlund <[email protected]>
28681
28682 * mpz/remove.c: Fail for `src' being zero.
28683
28684 * mpz/tests/reuse.c: Test more functions.
28685 (FAIL): New define.
28686
28687 * mpz/tests/t-powm.c: Loop during operand generation while they
28688 are mathematically ill-defined (used to just skip such tests).
28689
28690 * mpz/powm.c (mpz_redc): Clean up argument declarations.
28691
28692 * configure.in (gmp_cflags64_gcc): Don't add bogus -mWHAT option.
28693 (sparcv9-*-solaris2.[7-9]], gmp_cflags64_gcc):
28694 Inherit from previous gmp_cflags64_gcc; pass `-m64 -mptr64'.
28695 (ia64*-*-*): New.
28696
28697 * mpn/generic/dump.c: Make it work when an mp_limb_t is not `long'.
28698
28699 * mpf/set_prc.c: MPN_COPY => MPN_COPY_INCR.
28700
28701 2000-06-06 Torbjorn Granlund <[email protected]>
28702
28703 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n):
28704 Use mpn_incr_u for final carry propagation.
28705
28706 * mpz/tests/t-gcd.c: Add calls to mpz_gcdext with argument t == NULL.
28707
28708 * mpz/tests/reuse.c: Major rewrite; test many more functions.
28709
28710 * mpz/powm_ui.c: When exp is 0, change res assign order in order
28711 to handle argument overlap.
28712 * mpz/powm.c: When exp is 0, change res assign order in order
28713 to handle argument overlap. Handle negative exp and mod arguments.
28714
28715 * mpz/gcdext.c: Rework code after mpn_gcdext call to handle
28716 argument overlap.
28717
28718 * mpz/fdiv_qr.c: Read dividend->_mp_size before calling mpz_tdiv_qr
28719 in order to handle argument overlap.
28720 * mpz/cdiv_qr.c: Likewise.
28721
28722 * mpf/tests/reuse.c: Fix typo that effectively disabled `dis_funcs'
28723 tests. Clean up test for mpf_ui_div.
28724
28725 2000-06-06 Kevin Ryde <[email protected]>
28726
28727 * mpn/x86/p6/sqr_basecase.asm: New file.
28728 * mpn/x86/mod_1.asm: Avoid one conditional jump.
28729 * mpn/x86/p6/gmp-mparam.h: Update thresholds, #ifndef UMUL_TIME
28730 and UDIV_TIME, add COUNT_TRAILING_ZEROS_TIME.
28731
28732 * mp_minv_tab.c: New file.
28733 * Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
28734 * gmp-impl.h (modlimb_invert): New macro.
28735 * mpz/powm.c: Remove mpz_dmprepare, use modlimb_invert instead.
28736 * mpn/generic/bdivmod.c: Use modlimb_invert instead of a loop.
28737 * mpn/generic/gcd.c: Inline two small mpn_bdivmod calls, use
28738 MPN_COPY_INCR not MPN_COPY in one place.
28739
28740 2000-06-05 Torbjorn Granlund <[email protected]>
28741
28742 * mpf/tests/reuse.c (dsi_funcs): Add mpf_mul_2exp and mpf_div_2exp.
28743 (main): Clean up test for mpf_div_ui.
28744
28745 * mpf/mul_2exp.c: Correct criterion for whether to use mpn_lshift or
28746 mpn_rshift. MPN_COPY => MPN_COPY_INCR. Coerce the two assignments to
28747 r->_mp_size.
28748
28749 * mpf/div_2exp.c: Use mpn_rshift instead of mpn_lshift when overlap
28750 so requires. MPN_COPY => MPN_COPY_INCR.
28751
28752 * mpf/tests/t-dm2exp.c: Correct type of res_prec.
28753
28754 2000-06-04 Kevin Ryde <[email protected]>
28755
28756 * mpz/bin_uiui.c: Fix result for n==0 and n==k.
28757 * mpz/bin_ui.c: Fix result for k>n, add support for n<0.
28758 * gmp.texi (Number Theoretic Functions): Update mpz_bin_ui to
28759 note n<0 is supported.
28760
28761 * mpz/tests/t-misc.c: New file.
28762 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
28763
28764 2000-05-31 Kevin Ryde <[email protected]>
28765
28766 * tune/speed.* (FLAG_R_OPTIONAL): New option for routines, use on
28767 mpn_gcd_1 and mpn_mul_basecase.
28768 * tune/README: Update.
28769
28770 * tune/alpha.asm: New file, by Torbjorn.
28771 * tune/Makefile.am (EXTRA_DIST): Add it.
28772 * configure.in (alpha*-*-*): Use it.
28773
28774 2000-05-31 Linus Nordberg <[email protected]>
28775
28776 * doc/configuration: New file.
28777
28778 2000-05-30 Torbjorn Granlund <[email protected]>
28779
28780 * mpn/generic/mul_basecase.c: Call mpn_mul_2 and mpn_addmul_2
28781 if available. Don't include longlong.h.
28782
28783 * doc/isa_abi_headache: New file.
28784
28785 2000-05-30 Linus Nordberg <[email protected]>
28786
28787 * configure.in (NM): Use AC_PROG_NM rather than AC_CHECK_TOOL to
28788 find `nm'. (AC_PROG_NM comes with Libtool and is needed to get
28789 the `-B' option (BSD compatible output) included in $NM.)
28790 (AR): Use AC_CHECK_PROG rather than AC_CHECK_TOOL to find `ar'.
28791 (Now that NM isn't a cross compilation tool, don't give the
28792 impression that we know how to cross compile.)
28793 (CCAS): Remove spurious comment.
28794
28795 * gmp.texi (Notes for Particular Systems): Remove comment about
28796 using GNU `nm' on AIX since system nm now works.
28797
28798 2000-05-29 Torbjorn Granlund <[email protected]>
28799
28800 * mpn/power/mul_1.s: Remove [PR] from first word in function
28801 descriptor.
28802 * mpn/power/addmul_1.s: Likewise.
28803 * mpn/power/submul_1.s: Likewise.
28804
28805 2000-05-28 Kevin Ryde <[email protected]>
28806
28807 * configure.in, tune/*: Change pentium rdtsc cycle scheme to
28808 HAVE_SPEED_CYCLECOUNTER and SPEED_CYCLECOUNTER_OBJS.
28809 * tune/pentium.asm: Renamed and converted from rdtsc.asm.
28810 * tune/sparcv9.asm: New file, by Torbjorn.
28811 * tune/sparc64.asm: New file.
28812 * tune/tuneup.c: Put a limit on gcdext search.
28813
28814 * gmp.h (mp_set_memory_functions): Add extern "C".
28815 * mp.h (__GNU_MP__): Bump to "3".
28816 * mpz/add.c,mul.c,powm.c,sub.c,sqrtrem.c,tdiv_qr.c [BERKELEY_MP]:
28817 Include mp.h for mpbsd compile.
28818 * mpz/gcd.c: Ditto, and remove _mpz_realloc declaration.
28819
28820 * gmp.texi (Integer Functions): Flatten @subsections into @sections.
28821 (Floating-point Functions): Ditto.
28822 (Integer Random Numbers): Split from miscellaneous as a sep section.
28823 (Installing GMP): Make nodes for the sections.
28824 Add more "@cindex"s.
28825 (Known Build Problems): Remove SunOS get_d problem, believed fixed.
28826 (Notes for Particular Systems): Remove HPPA note since now PIC.
28827 (References): URL for Jebelean.
28828
28829 2000-05-27 Torbjorn Granlund <[email protected]>
28830
28831 * mpn/pa64w: New directory, contents based on corresponding mpn/pa64
28832 files.
28833 * configure.in (hppa2.0w-*-*): New.
28834 * mpz/tests/io.c (_INCLUDE_POSIX_SOURCE): Define when __hpux before
28835 including stdio.h.
28836 * gmp-impl.h: Always define DItype and UDItype.
28837
28838 2000-05-27 Kevin Ryde <[email protected]>
28839
28840 * tune/common.c (speed_measure): Correction to array sorting,
28841 better diagnostic when measuring fails.
28842 * tune/time.c: Add microsecond accurate getrusage method.
28843
28844 * tune/time.c (speed_cpu_frequency_processor_info): New function.
28845 * configure.in (AC_CHECK_FUNCS): Add processor_info.
28846
28847 2000-05-26 Linus Nordberg <[email protected]>
28848
28849 * gmp.texi (Installing GMP): Shared libraries work for AIX < 4.3
28850 if using GNU nm.
28851
28852 2000-05-26 Torbjorn Granlund <[email protected]>
28853
28854 * tune/tuneup.c (SIGNED_TYPE_MAX): Shift `-1' instead of `1' to
28855 avoid signed overflow.
28856
28857 * demos/pexpr.c (setup_error_handler): Don't call sigaltstack on
28858 Unicos.
28859
28860 2000-05-25 Torbjorn Granlund <[email protected]>
28861
28862 * insert-dbl.c: Work around GCC 2.8 bug.
28863 * extract-dbl.c: Likewise.
28864
28865 * config.sub: Allow i586, i686, i786 again.
28866
28867 * config.guess: Use X86CPU for lots more systems.
28868
28869 2000-05-25 Linus Nordberg <[email protected]>
28870
28871 * mpbsd/tests/dummy.c (main): Call exit() instead of doing return
28872 (some old SysV machines don't get this correct, I've heard.)
28873
28874 2000-05-25 Kevin Ryde <[email protected]>
28875
28876 * mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
28877 digits in string, so it's the same as a separate init and set_str.
28878
28879 2000-05-24 Torbjorn Granlund <[email protected]>
28880
28881 * mpz/tests/reuse.c: Use mpz_random2 instead of mpz_random.
28882
28883 * mpz/divexact.c: Read pointers after reallocation.
28884 Compare `quot' and `den' instead of `qp' and `dp' in overlap check.
28885 Use MPN_COPY_INCR for copying from `np'.
28886
28887 (*-*-aix4.[3-9]*): Disable shared libs just for problematic AIX
28888 versions.
28889 * configure.in (*-cray-unicos*): Disable asm syntax checking; set
28890 compiler explicitly.
28891 * configure.in (hppa*-*-*): Remove code disabling shared libs.
28892
28893 2000-05-24 Linus Nordberg <[email protected]>
28894
28895 * acinclude.m4 (GMP_PROG_CC_WORKS): Don't report progress to user
28896 when doing the AIX specific test to avoid "nested output".
28897
28898 2000-05-22 Kevin Ryde <[email protected]>
28899
28900 * mp.h (_PROTO): Copy from gmp.h, use on prototypes.
28901 Add extern "C" too.
28902 * mpbsd/tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
28903 * mpbsd/tests/allfuns.c: Don't execute mout, just link to it.
28904 (main): ANSI style definition.
28905
28906 * gmp-impl.h (MP_BASE_AS_DOUBLE): Change the expression to
28907 something that works on SunOS native cc. Seems to fix the
28908 mp*_get_d problems.
28909
28910 * mpn/tests/ref.c (refmpn_strip_twos): Use MPN_COPY_INCR.
28911 * mpn/tests/Makefile.am: Let .asm.o rules work with absolute $srcdir.
28912
28913 2000-05-21 Kevin Ryde <[email protected]>
28914
28915 * mpn/x86/k7/sqr_basecase.asm: Replace file with K7 specific code.
28916 * mpn/x86/k7/README: Update.
28917 * mpn/x86/k7/gmp-mparam.h: Tune thresholds.
28918 (COUNT_TRAILING_ZEROS_TIME): New define.
28919 * mpn/x86/k6/gmp-mparam.h: Ditto.
28920
28921 * mpn/x86/pentium/mmx/popham.asm: New file (include_mpn of K6 version).
28922 * mpn/x86/p6/diveby3.asm: New file (include_mpn of P5 version).
28923 * mpn/x86/p6/mmx/popham.asm: New file (include_mpn of K6 version).
28924 * mpn/x86/p6/p3mmx/popham.asm: New file (include_mpn of K7 version).
28925 * configure.in (pentium3-*-*): Add p3mmx to $path.
28926
28927 * gmp.texi (Integer Arithmetic): Clarify mpz_jacobi op2; add
28928 mpz_*_kronecker_*.
28929 (Miscellaneous Integer Functions): Add mpz_odd_p and mpz_even_p.
28930 (Low-level Functions): Put mpn_divmod_1 with mpn_divrem_1 and note
28931 it's now a macro.
28932 (References): Add Henri Cohen.
28933
28934 * gmp.h (mpn_addmul_1c, mpn_divrem_1c, mpn_mod_1c, mpn_mul_1c,
28935 mpn_submul_1c): Add prototypes.
28936 (mpz_odd_p, mpz_even_p): New macros.
28937
28938 * mpn/asm-defs.m4 (m4wrap_prepend): New macro.
28939 (m4_error): Use it.
28940 (m4_not_for_expansion): Corrections to OPERATION symbols.
28941 More comments about variations between m4 versions.
28942 * mpn/x86/x86-defs.m4 (PROLOGUE): Use m4wrap_prepend (fixes error
28943 exit under BSD m4, previously m4_error printed the message but the
28944 exit code was 0).
28945
28946 * gmp.h (mpn_divmod_1): Change to a macro calling mpn_divrem_1.
28947 * mpn/generic/divrem_1.c: Move divmod_1.c code to here, make it
28948 static and call it __gmpn_divmod_1_internal.
28949 * mpn/generic/divmod_1.c: Remove file.
28950 * configure.in (gmp_mpn_functions): Remove divmod_1.
28951 * mpn/asm-defs.m4 (define_mpn): Remove divmod_1 and divmod_1c.
28952 * compat.c (mpn_divmod_1): Add compatibility function.
28953 * tune/*: Remove mpn_divmod_1 measuring (leave just divrem_1).
28954
28955 * acconfig.h (HAVE_NATIVE_mpn_*): Add some missing carry-in
28956 variants, remove divmod_1.
28957
28958 * mpn/x86/diveby3.asm: Use imul, update comments.
28959
28960 * demos/qcn.c: New file.
28961 * demos/Makefile.am (EXTRA_PROGRAMS): Add it.
28962
28963 * mpz/tests/t-jac.c: New file.
28964 * mpz/tests/Makefile.am (check_PROGRAMS): Add it. Enable ansi2knr.
28965
28966 * mpz/kronsz.c: New file.
28967 * mpz/kronuz.c: New file.
28968 * mpz/kronzs.c: New file.
28969 * mpz/kronzu.c: New file.
28970 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
28971 * Makefile.am (MPZ_OBJECTS): Add them.
28972 * gmp-impl.h (JACOBI_*, MPN_STRIP_LOW_ZEROS_NOT_ZERO): New macros.
28973 * gmp.h (mpz_*_kronecker_*): New defines and prototypes.
28974
28975 * mpn/generic/jacbase.c: New file.
28976 * mpn/generic/mod_1_rs.c: New file.
28977 * configure.in (gmp_mpn_functions): Add them.
28978 * gmp.h (mpn_jacobi_base, mpn_mod_1_rshift): New defines and
28979 prototypes.
28980 * longlong.h (COUNT_TRAILING_ZEROS_TIME): New define.
28981 * mpn/tests/ref.c (refmpn_mod_1_rshift): New function.
28982 * mpn/tests/try.c: Add mpn_mod_1_rshift.
28983 * tune/*: Add measuring for mpn_jacobi_base.
28984
28985 * acinclude.m4 (GMP_FINISH): Add ifdefs to allow multiple
28986 inclusion of config.m4.
28987 (GMP_PROG_M4): Put "good" message through to config.log.
28988
28989 * mpz/powm.c: Use a POWM_THRESHOLD for where redc stops.
28990 * tune/*: Add mpz_powm measuring, and tune POWM_THRESHOLD.
28991 * gmp-impl.h [TUNE_PROGRAM_BUILD] (POWM_THRESHOLD): Conditional
28992 redefinition for use when tuning.
28993
28994 * mpz/powm_ui.c: Use DIVIDE_BY_ZERO.
28995
28996 * mpz/iset_str.c: Initialize _mp_size to 0, in case no digits in
28997 string; this makes it the same as a separate init and set_str.
28998
28999 2000-05-20 Kevin Ryde <[email protected]>
29000
29001 * mpn/asm-defs.m4: Note &,|,^ aren't bitwise in BSD m4 eval().
29002 * mpn/x86/k6/sqr_basecase.asm: Use "%" not "&" in m4 eval()s.
29003
29004 * mpn/x86/x86-defs.m4 (Zdisp): Yet more instruction forms.
29005
29006 2000-05-19 Linus Nordberg <[email protected]>
29007
29008 * acinclude.m4 (GMP_CHECK_CC_64BIT): Don't use shell variable
29009 `ac_compile' for our own compile command string since other
29010 Autoconf macros may depend on it.
29011
29012 2000-05-19 Kevin Ryde <[email protected]>
29013
29014 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Fix
29015 carry propagation in final coefficient additions.
29016
29017 2000-05-18 Linus Nordberg <[email protected]>
29018
29019 * configure.in: Set NM before looking for compiler since
29020 GMP_CHECK_CC_64BIT needs it.
29021
29022 * acinclude.m4 (GMP_CHECK_CC_64BIT): Don't execute on target.
29023 (GMP_PROG_CC_FIND): Before checking if the compiler knows how to
29024 produce 64-bit code, verify that it works at all. The background
29025 is that /usr/ucb/cc on Solaris 7 successfully compiles in 64-bit
29026 mode but fails when doing final link.
29027 (GMP_PROG_CC_WORKS): Report to user what's happening.
29028
29029 2000-05-17 Linus Nordberg <[email protected]>
29030
29031 * config.guess: Use X86CPU for x86 Cygwin.
29032
29033 2000-05-16 Kevin Ryde <[email protected]>
29034
29035 * mpn/x86/p6/mmx/divrem_1.asm: New file.
29036 * mpn/x86/p6/mmx/mod_1.asm: New file.
29037 * mpn/x86/p6/README: Update.
29038 * mpn/x86/divrem_1.asm: Update comments.
29039 * mpn/x86/mod_1.asm: Ditto.
29040
29041 2000-05-14 Kevin Ryde <[email protected]>
29042
29043 * tune/speed.h: Run gcd functions on a set of data.
29044
29045 * mpn/tests/try.c: New file.
29046 * mpn/tests/try.h: New file.
29047 * mpn/tests/spinner.c: New file.
29048 * mpn/tests/trace.c: New file.
29049 * mpn/tests/x86call.asm: New file.
29050 * mpn/tests/x86check.c: New file.
29051 * mpn/tests/ref.c (refmpn_hamdist): Allow size==0.
29052 (refmpn_gcd): New function, and other additions supporting it.
29053 * mpn/tests/ref.h: More prototypes.
29054 * mpn/tests/Makefile.am: Add try program, use ansi2knr.
29055
29056 * mpn/x86/k7/mmx/popham.asm: New file.
29057 * mpn/x86/k6/mmx/popham.asm: New file.
29058 * mpn/x86/k6/sqr_basecase.asm: Unroll the addmul, for approx 1.3x
29059 speedup above 15 limbs.
29060 * mpn/x86/k7/README: Update.
29061 * mpn/x86/k6/README: Update, and add notes on plain K6 and pre-CXT
29062 K6-2 problems.
29063 * configure.in (k6*-*-*, athlon-*-*): Add popham.
29064
29065 * mpn/x86/pentium/diveby3.asm: New file.
29066 * mpn/x86/pentium/README: Update.
29067
29068 * gmp.texi (Installing GMP): Add note on bad OpenBSD 2.6 m4.
29069 (Reporting Bugs): Ask for config.m4 if asm file related.
29070 (I/O of Rationals): New section, add mpq_out_str.
29071 (References): Add url for on-line gcc manuals.
29072 A few node and menu updates.
29073
29074 * INSTALL: Better command line argument checking for test progs.
29075 Change MP -> GMP.
29076
29077 * configure.in (WANT_ASSERT, USE_STACK_ALLOC, HAVE_PENTIUM_RDTSC):
29078 Put descriptions here, not in acconfig.h.
29079 (CALLING_CONVENTIONS_OBJS): New AC_SUBST (for mpn/tests/try).
29080 (HAVE_CALLING_CONVENTIONS): New AC_DEFINE.
29081 (AC_CHECK_HEADERS): Add sys/time.h.
29082 (AC_CHECK_FUNCS): Add getpagesize, setitimer.
29083 (KARATSUBA_SQR_THRESHOLD): Strip trailing comments from the
29084 #define when passing through to config.m4.
29085 * acconfig.h (PACKAGE, VERSION, WANT_ASSERT, USE_STACK_ALLOC,
29086 HAVE_PENTIUM_RDTSC): No need for #undefs, autoheader gets them
29087 from configure.in.
29088
29089 * acinclude.m4 (GMP_PROG_M4): Check for broken OpenBSD 2.6 m4
29090 eval(), put messages into config.log.
29091 * mpn/asm-defs.m4: Add notes and test for OpenBSD 2.6 m4.
29092
29093 * mpq/out_str.c: New file.
29094 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
29095 * Makefile.am (MPQ_OBJECTS): Ditto.
29096 * gmp.h (mpq_out_str): New define and prototype.
29097
29098 2000-05-12 Kevin Ryde <[email protected]>
29099
29100 * configure.in (CONFIG_TOP_SRCDIR): Fix to use $srcdir not
29101 $top_srcdir (which doesn't exist).
29102 * acinclude.m4 (GMP_C_ANSI2KNR): Fix setting U=_.
29103 * gmp-impl.h (mpn_com_n, MPN_LOGOPS_N_INLINE): Fix missing "do"
29104 (not currently used, probably no ill effect anyway).
29105
29106 2000-05-11 Torbjorn Granlund <[email protected]>
29107
29108 * randraw.c (lc): Major overhaul (pending rewrite).
29109 (_gmp_rand): Rewrite.
29110
29111 2000-05-08 Torbjorn Granlund <[email protected]>
29112
29113 * mpz/tests/convert.c: Call free via _mp_free_func.
29114 * mpf/tests/t-conv.c: Likewise.
29115
29116 * memory.c: Add code enabled for DEBUG that adds special patterns
29117 around allocated blocks.
29118
29119 2000-05-05 Linus Nordberg <[email protected]>
29120
29121 * gmp.texi (Miscellaneous Float Functions): Correct parameter list
29122 for mpf_urandomb().
29123
29124 * configure.in: Invoke AC_REVISION.
29125
29126 2000-05-05 Kevin Ryde <[email protected]>
29127
29128 * gmp.texi: Use @dircategory and @direntry.
29129 (Installing GMP): Clarification for --target, updates on SunOS
29130 problems.
29131 (Integer Arithmetic): Add mpz_mul_si.
29132 (Initializing Rationals): Add mpq_swap.
29133 (Assigning Floats): Add mpf_swap.
29134 (Low-level Functions): Add mpn_divexact_by3c, and details of what
29135 the calculation actually gives.
29136 (Low-level Functions): Note extra space needed by mpn_gcdext,
29137 clarify the details a bit.
29138
29139 * compat.c: New file, entry points for upward binary compatibility.
29140 (mpn_divexact_by3): Compatibility function.
29141 * Makefile.am (libgmp_la_SOURCES): Add compat.c.
29142
29143 * mpn/tests/ref.c: Rearrange macros for ansi2knr.
29144 (div1): Renamed from div to avoid library function.
29145 (refmpn_divexact_by3c, refmpn_gcd_1, refmpn_popcount,
29146 refmpn_hamdist): New functions.
29147 * mpn/tests/ref.h: Add extern "C", add new prototypes.
29148
29149 * gmp.h (gmp_randinit, etc): Add extern "C".
29150 (_mpq_cmp_ui): Fix prototype name from mpq_cmp_ui.
29151 (mpn_divexact_by3): Now a macro calling mpn_divexact_by3c.
29152 (mpn_divexact_by3c): New prototype and define.
29153
29154 * mpn/x86/diveby3.asm: Change to mpn_divexact_by3c.
29155 * mpn/x86/k6/diveby3.asm: Ditto.
29156 * mpn/generic/diveby3.c: Ditto.
29157 * mpn/asm-defs.m4: Ditto on the define_mpn.
29158 * acconfig.h (HAVE_NATIVE_mpn_divexact_by3c): New define.
29159
29160 * mpq/swap.c: New file, derived from mpz/swap.c.
29161 * mpf/swap.c: Ditto.
29162 * mpq/Makefile.am: Add swap.c.
29163 * mpf/Makefile.am: Ditto.
29164 * Makefile.am: Add two new "swap.lo"s.
29165
29166 * mpn/x86/k6/mmx/com_n.asm: Fix an addressing bug (fortunately
29167 this code hasn't been used anywhere yet).
29168
29169 * mpn/x86/k7/mmx/divrem_1.asm: New file.
29170 * mpn/x86/k7/mmx/mod_1.asm: New file.
29171 * mpn/x86/k7/diveby3.asm: New file.
29172 * mpn/x86/k7/README: Update.
29173
29174 * mpn/x86/k7/aorsmul_1.asm: Use new cmovCC, no object code change.
29175 * mpn/x86/k7/mul_basecase.asm: Ditto.
29176 * mpn/x86/p6/aorsmul_1.asm: Ditto.
29177
29178 * mpn/x86/x86-defs.m4 (defframe_empty_if_zero): Eval the argument.
29179 (cmovCC): New macros, replacing individual cmovCC_reg_reg forms.
29180 (Zdisp): Recognise more instructions.
29181 (shldl,etc): Use m4_instruction_wrapper().
29182 (ASSERT, movl_text_address): New macros.
29183
29184 * mpn/asm-defs.m4: Add remarks on SunOS /usr/bin/m4 and new
29185 OpenBSD m4.
29186 (m4_assert_numargs_internal_check): Remove a spurious parameter.
29187 (m4_empty_if_zero): Eval the argument.
29188 (m4_assert, m4_assert_numargs_range, m4_config_gmp_mparam,
29189 m4_instruction_wrapper): New macros.
29190
29191 2000-05-04 Linus Nordberg <[email protected]>
29192
29193 * gmp.texi (Reporting Bugs): Be explicit about output from running
29194 a command.
29195
29196 2000-05-02 Torbjorn Granlund <[email protected]>
29197
29198 * mpn/generic/bz_divrem_n.c (mpn_bz_divrem_n): Handle non-zero return
29199 from first mpn_bz_div_3_halves_by_2 call.
29200 (mpn_bz_divrem_aux): Likewise.
29201
29202 2000-04-30 Kevin Ryde <[email protected]>
29203
29204 * tune/* (GCD_ACCEL_THRESHOLD, GCDEXT_THRESHOLD): Tune these.
29205
29206 * mpn/generic/gcdext.c (GCDEXT_THRESHOLD): Rename from THRESHOLD,
29207 use with >=, adjust default to 17 accordingly.
29208 Use new *_SWAP macros.
29209
29210 * mpn/generic/gcd.c (GCD_ACCEL_THRESHOLD): Rename from
29211 ACCEL_THRESHOLD, use with >=, adjust default to 5 accordingly.
29212 Use new *_SWAP macros.
29213
29214 * mpf/get_str.c, mpf/set_str.c, mpf/sub.c, mpz/add.c, mpz/ior.c,
29215 mpz/and.c, mpz/sub.c, mpz/xor.c, mpz/ui_pow_ui.c,
29216 mpn/generic/mul.c: Use new *_SWAP macros.
29217
29218 * stack-alloc.h: Add extern "C" around prototypes.
29219
29220 * gmp-impl.h: (MP_PTR_SWAP, etc): New macros.
29221 (_mp_allocate_func, etc): Use _PROTO.
29222 [TUNE_PROGRAM_BUILD]: More changes in tune program build part.
29223
29224 2000-04-28 Torbjorn Granlund <[email protected]>
29225
29226 * mpn/pa64/add_n.s: Add `,entry' to export directive.
29227 * mpn/pa64/addmul_1.S, mpn/pa64/lshift.s, mpn/pa64/mul_1.S,
29228 mpn/pa64/rshift.s, mpn/pa64/sub_n.s, mpn/pa64/submul_1.S,
29229 mpn/pa64/umul_ppmm.S: Likewise.
29230 * mpn/hppa/hppa1_1/udiv_qrnnd.S: New name for udiv_qrnnd.s.
29231 Add PIC support.
29232
29233 2000-04-29 Kevin Ryde <[email protected]>
29234
29235 * gmp-impl.h [TUNE_PROGRAM_BUILD] (TOOM3_MUL_THRESHOLD_LIMIT): New
29236 define.
29237 * mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Use
29238 TOOM3_MUL_THRESHOLD_LIMIT, not a hard coded 500.
29239
29240 * memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
29241 * stack-alloc.c: Don't use C++ reserved word "this".
29242 * urandom.h: Put extern "C" around prototypes.
29243 * mpz/powm.c: Switch a couple of parameters to "const", which they
29244 are, to satisfy g++.
29245
29246 * randraw.c, stack-alloc.c, mpbsd/mout.c, mpbsd/mtox.c: Add casts to
29247 help g++.
29248
29249 * stack-alloc.c: Provide dual ANSI/K&R function definitions.
29250 * mpz/addmul_ui.c,get_d.c,inp_str.c,perfpow.c,powm.c,pprime_p.c,
29251 rrandomb.c,set_str.c,ui_pow_ui.c: Ditto.
29252 * mpf/integer.c,set_str.c: Ditto.
29253 * mpbsd/min.c,xtom.c: Ditto.
29254 * mpn/generic/bz_divrem_n.c,dump.c,gcd_1.c,get_str.c,hamdist.c,
29255 popcount.c,random.c,random2.c,set_str.c: Ditto.
29256
29257 * rand.c: Use <stdio.h> for NULL.
29258 * mpz/gcd_ui.c,gcdext.c,mul.c,perfpow.c,powm_ui.c,root.c,sqrt.c,
29259 sqrtrem.c: Ditto
29260 * mpf/sqrt.c,sqrt_ui.c: Ditto.
29261 * mpn/generic/perfsqr.c,sqrtrem.c: Ditto.
29262
29263 * gmp-impl.h (NULL, malloc, realloc, free): Don't define/declare.
29264 (extern "C"): Add around function prototypes.
29265 (mpn_kara_mul_n, mpn_kara_sqr_n, mpn_toom3_mul_n, mpn_toom3_sqr_n):
29266 Add prototypes.
29267 [TUNE_PROGRAM_BUILD] (FIB_THRESHOLD): Add necessary redefinitions for
29268 use by tune program.
29269 * mpn/generic/mul_n.c: Remove mpn_toom3_mul_n prototype.
29270
29271 * acinclude.m4 (GMP_C_ANSI2KNR): New macro.
29272 (GMP_CHECK_ASM_MMX, GMP_CHECK_ASM_SHLDL_CL): Fix to use
29273 $gmp_cv_check_asm_text which is what GMP_CHECK_ASM_TEXT sets.
29274 * configure.in (GMP_C_ANSI2KNR): Use this instead of AM_C_PROTOTYPES,
29275 for reasons described with its definition.
29276
29277 * demos/Makefile.am (ansi2knr): Use $(top_builddir) nor $(top_srcdir).
29278
29279 * mpz/fib_ui.c (FIB_THRESHOLD): Rename from FIB_THRES, for consistency.
29280 (FIB_THRESHOLD): Conditionalize so gmp-mparam.h can define a value.
29281 (mpz_fib_bigcase): Use >= FIB_THRESHOLD, same as main mpz_fib_ui.
29282 * tune/tuneup.c,Makefile.am (FIB_THRESHOLD): Tune this.
29283
29284 * configure.in (*-*-aix* gmp_m4postinc): Fix setting (don't overwrite
29285 a value just stored).
29286
29287 2000-04-26 Kevin Ryde <[email protected]>
29288
29289 * mpn/sparc32/udiv_fp.asm: Use mpn_udiv_qrnnd macro.
29290 * mpn/sparc32/udiv_nfp.asm: Ditto.
29291 * mpn/sparc32/v8/supersparc/udiv.asm: Ditto.
29292 * mpn/sparc32/umul.asm: Name the function mpn_umul_ppmm.
29293 * mpn/sparc32/v8/umul.asm: Ditto.
29294 * mpn/powerpc32/umul.asm: Ditto.
29295
29296 * mpn/x86/syntax.h: Remove file, since now unused.
29297
29298 * configure.in (x86): Remove -DBROKEN_ALIGN and -DOLD_GAS
29299 previously used by .S files.
29300 (x86 extra_functions): Add udiv and umul.
29301 (GMP_PROG_M4): Use this instead of AC_CHECK_PROG(M4,m4,...)
29302 (HAVE_NATIVE_*): Loosen up the regexp to "PROLOGUE.*" so as to
29303 accept PROLOGUE_GP on alpha.
29304
29305 * acconfig.h (HAVE_NATIVE_mpn_umul_ppmm, udiv_qrnnd, invert_limb):
29306 New template defines.
29307 * mpn/asm-defs.m4 (mpn_umul_ppmm, mpn_udiv_qrnnd): New define_mpn()s.
29308 * longlong.h (umul_ppmm, udiv_qrnnd): Use a library version if
29309 it's available and an asm macro isn't.
29310 * gmp-impl.h (invert_limb): Ditto.
29311
29312 * gmp-impl.h (ASSERT_NOREALLOC): Not a good idea, remove it.
29313
29314 * acinclude.m4 (GMP_PROG_M4): New macro.
29315
29316 2000-04-25 Linus Nordberg <[email protected]>
29317
29318 * gmp.texi (Random State Initialization): Correct arguments to
29319 `gmp_randinit'.
29320
29321 * acinclude.m4 (GMP_VERSION): Change `eval' --> `m4_eval'. Fix
29322 from Kevin.
29323 * aclocal.m4: Regenerate.
29324
29325 2000-04-25 Kevin Ryde <[email protected]>
29326
29327 * mpn/x86/aors_n.asm: Remove parentheses around an immediate that
29328 Solaris "as" doesn't like, change by Torbjorn.
29329
29330 2000-04-24 Kevin Ryde <[email protected]>
29331
29332 * configure.in (AC_CHECK_FUNCS): Add strtoul.
29333
29334 * mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Bigger
29335 array for karatsuba temporary space for tune program build.
29336 (mpn_toom3_sqr_n) Remove an unused variable.
29337
29338 * demos/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
29339 Add "allprogs:" pseudo-target.
29340 * demos/factorize.c, demos/isprime.c: Switch to ANSI functions,
29341 rely on ansi2knr.
29342
29343 * gmp.texi (Getting the Latest Version of GMP): Add reference to
29344 ftp.gnu.org mirrors list.
29345 * INSTALL: Add arg count check to example programs.
29346
29347 * mpn/x86/*/*.asm: Convert to FORTRAN ... or rather to
29348 FORTRAN-style "C" commenting to support Solaris "as".
29349 * mpn/x86/x86-defs.m4: Ditto, and add another Zdisp insn.
29350 * mpn/asm-defs.m4 (C): Update comments.
29351 * mpn/x86/README.family: Add a note on commenting, remove
29352 description of .S files.
29353
29354 * mpn/sparc64/addmul_1.asm, mul_1.asm, submul_1.asm: Use
29355 include_mpn().
29356
29357 2000-04-23 Torbjorn Granlund <[email protected]>
29358
29359 * config.sub: Merge with FSF version of April 23.
29360
29361 * mpn/powerpc32: Use dnl/C instead of `#' for comments.
29362
29363 * config.guess: Get "model" limit between pentium 2 and pentium3 right.
29364 Get rid of code determining `_' prefix; use double labels instead.
29365 * config.guess: Partially merge with FSF version of April 22.
29366 (Don't bring over NetBSD changes for now.)
29367
29368 2000-04-23 Kevin Ryde <[email protected]>
29369
29370 * tune/Makefile.am, tune/README, tune/common.c, tune/rdtsc.asm,
29371 tune/speed.c, tune/speed.h, tune/time.c, tune/tuneup.c: New files.
29372 * tune/Makefile.in: New file, generated from Makefile.am.
29373
29374 * gmp-impl.h (ASSERT_NOREALLOC,TMP_ALLOC_LIMBS): New macros.
29375 [TUNE_PROGRAM_BUILD] Further mods for tune program builds.
29376
29377 * mpz/Makefile.am: Add -DOPERATION_$* for new mul_siui.c.
29378 Add rules to build mul_si and mul_ui from a common mul_siui.c.
29379 * mpz/mul_siui.c: New file, derived from and replacing mul_ui.c.
29380 * gmp.h (mpz_mul_si): New prototype and define.
29381
29382 * mpn/tests/*.c [__i386__] (CLOCK): Don't use floating point in
29383 CLOCK because cpp can't handle floats in #if's (TIMES is derived
29384 from CLOCK by default).
29385
29386 * mpn/asm-defs.m4 (include_mpn): New macro.
29387 (m4_assert_numargs) Changes to implementation.
29388
29389 * mpf/Makefile.am: Add -DOPERATION_$* for new integer.c.
29390 Remove explicit rules for floor.o etc.
29391 * mpf/integer.c: Use OPERATION_$* for floor/ceil/trunc.
29392
29393 * mpn/Makefile.am: Put "tests" in SUBDIRS.
29394 * mpn/tests/Makefile.am: New file providing rules to build test
29395 programs, nothing done in a "make all" or "make check" though.
29396 * mpn/tests/README: New file.
29397
29398 * acconfig.h (HAVE_PENTIUM_RDTSC): New define.
29399
29400 * configure.in (x86): Rearrange target cases.
29401 Add mulfunc aors_n and aorsmul_1 for x86 and pentium (now all x86s).
29402 Remove asm-syntax.h generation not needed.
29403 Remove now unused family=x86.
29404 (sparc) Remove unused family=sparc.
29405 (HAVE_PENTIUM_RDTSC) New AC_DEFINE and AM_CONDITIONAL.
29406 (AM_C_PROTOTYPES) New test, supporting ansi2knr.
29407 (AC_CHECK_HEADERS) Add getopt.h, unistd.h and sys/sysctl.h for
29408 tune progs.
29409 (AC_CHECK_FUNCS) Add getopt_long, sysconf and sysctlbyname for
29410 tune progs.
29411 (config.m4 CONFIG_TOP_SRCDIR) Renamed from CONFIG_SRCDIR.
29412 (config.m4 asm-defs.m4) Use CONFIG_TOP_SRCDIR and include().
29413 (gmp_m4postinc) Use include_mpn().
29414 (gmp_links) Omit asm-defs.m4/asm.m4 and gmp_m4postinc's.
29415 (MULFUNC_PROLOGUE) Fix regexps so all functions get AC_DEFINE'd.
29416 (PROLOGUE) Ditto (native copyi and copyd were unused in gmp 3).
29417 (KARATSUBA_SQR_THRESHOLD) Copy from gmp-mparam.h into config.m4.
29418 (AC_OUTPUT) Add tune/Makefile, mpn/tests/Makefile.
29419
29420 * Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
29421 (SUBDIRS): Add tune, reorder directories.
29422 (MPZ_OBJECTS): Add mpz/mul_si.lo.
29423 (libmp_la_SOURCES): Use this for top-level objects, not .lo's.
29424 * ansi2knr.c, ansi2knr.1: New files, provided by automake.
29425
29426 * mpn/x86/aors_n.asm: Convert add_n.S and sub_n.S to a
29427 multi-function aors_n.asm, no object code change.
29428 * mpn/x86/pentium/aors_n.asm: Ditto.
29429 * mpn/x86/aorsmul_1.asm: Ditto for addmul/submul.
29430 * mpn/x86/pentium/aorsmul_1.asm: Ditto.
29431
29432 * mpn/x86/lshift.asm, mpn/x86/mul_1.asm, mpn/x86/mul_basecase.asm,
29433 mpn/x86/rshift.asm: Convert from .S, no object code change.
29434 * mpn/x86/pentium/lshift.asm, mpn/x86/pentium/mul_1.asm,
29435 mpn/x86/pentium/mul_basecase.asm, mpn/x86/pentium/rshift.asm: Ditto.
29436
29437 * gmp.texi (Reporting Bugs): Itemize the list of things to include.
29438 (Miscellaneous Float Functions): Correct typo in mpf_ceil etc
29439 argument types.
29440 Change @ifinfo -> @ifnottex for benefit of makeinfo --html.
29441 Remove unnecessary @iftex's around @tex.
29442
29443 2000-04-22 Torbjorn Granlund <[email protected]>
29444
29445 * config.guess: Generalize x86 cpu determination code.
29446 Now works on Solaris.
29447
29448 * mpz/nextprime.c: Rewrite still disabled code.
29449
29450 * configure.in: Specifically match freebsd[3-9].
29451
29452 2000-04-21 Torbjorn Granlund <[email protected]>
29453
29454 * rand.c: Call mpz_clear for otherwise leaking mpz_t.
29455
29456 * mpz/pprime_p.c (mpz_probab_prime_p): Merge handling of negative
29457 n into code for handling small positive n. Merge variables m and n.
29458 After dividing, simply call mpz_millerrabin.
29459 (isprime): Local variables now use attribute `long'.
29460 (mpz_millerrabin): New static function, based on code from
29461 mpz_probab_prime_p.
29462 (millerrabin): Now simple workhorse for mpz_millerrabin.
29463
29464 2000-04-19 Torbjorn Granlund <[email protected]>
29465
29466 * gmp-impl.h: Fix parenthesis error in test for __APPLE_CC__.
29467
29468 2000-04-18 Linus Nordberg <[email protected]>
29469
29470 * NEWS: Add info about shared libraries. Remove reference to
29471 gmp_randinit_lc.
29472
29473 2000-04-17 Torbjorn Granlund <[email protected]>
29474
29475 * Version 3.0 released.
29476
29477 * mpn/arm/add_n.S: New version from Robert Harley.
29478 * mpn/arm/addmul_1.S: Likewise.
29479 * mpn/arm/mul_1.S: Likewise.
29480 * mpn/arm/sub_n.S: Likewise.
29481
29482 * gmp.h (__GNU_MP_VERSION_PATCHLEVEL): Now 0.
29483
29484 2000-04-17 Linus Nordberg <[email protected]>
29485
29486 * configure.in (hppa2.0*-*-*): Pass `+O3' to cc/c89 in 64-bit mode
29487 to avoid compiler bug.
29488 (ns32k*-*-*): Fix typo in path. Change by Kevin.
29489 (alpha*-*-osf*): New case. Pass assembly flags for architecture
29490 to gcc.
29491 (alpha*-*-*): Don't bother searching for cc.
29492 * configure: Regenerate.
29493
29494 * Makefile.am (EXTRA_DIST): Add `macos', `.gdbinit'.
29495 * Makefile.in: Regenerate.
29496 * mpn/Makefile.am (EXTRA_DIST): Add `m88k', `lisp'.
29497 * mpn/Makefile.in: Regenerate.
29498
29499 2000-04-16 Kevin Ryde <[email protected]>
29500
29501 * README: Updates, and don't duplicate the example in INSTALL.
29502 * INSTALL: Minor updates.
29503 * gmp.texi (Installing MP): Minor edits, restore CC/CFLAGS description.
29504
29505 2000-04-16 Linus Nordberg <[email protected]>
29506
29507 * configure.in (*-*-cygwin*): Select BSD_SYNTAX to avoid
29508 .type/.size in PROLOGUE for ELF_SYNTAX. Override ALIGN definition
29509 from x86/syntax.h.
29510 (gmp_xoptcflags_${CC}): New set of variables, indicating
29511 ``exclusive optional cflags''.
29512 (most sparcs): Use gmp_xoptcflags instead of gmp_optcflags to
29513 ensure that we pass CPU type to older gcc.
29514 (CFLAGS): CFLAGS on the command line was spoiled.
29515 * configure: Regenerate.
29516
29517 2000-04-16 Linus Nordberg <[email protected]>
29518
29519 * configure.in: Invoke AC_PROG_LIBTOOL directly.
29520
29521 * acinclude.m4 (GMP_PROG_CC_FIND): Quote source variable when
29522 setting CC64 and CFLAGS64.
29523 (GMP_PROG_CC_SELECT): Cache result.
29524 (GMP_PROG_LIBTOOL): Remove.
29525
29526 * aclocal.m4: Regenerate.
29527 * configure: Regenerate.
29528
29529 2000-04-16 Linus Nordberg <[email protected]>
29530
29531 * tests/rand/t-rand.c (main): Add non-ANSI function declaration.
29532 Don't use `const'.
29533
29534 2000-04-16 Torbjorn Granlund <[email protected]>
29535
29536 * mpn/generic/dump.c: Suppress output of leading zeros.
29537
29538 * mpz/inp_str.c: Fix memory leakage.
29539
29540 * mpz/tests/reuse.c (dss_func_division): Add a final 1.
29541
29542 * longlong.h (alpha count_leading_zeros): Wrap in __MPN.
29543 * mpn/alpha/cntlz.asm: Use __gmpn prefix (by means of __MPN).
29544
29545 * longlong.h (__umul_ppmm, __udiv_qrnnd): Wrap in __MPN.
29546 * mpn/alpha/udiv_qrnnd.S: Use __gmpn prefix.
29547 * mpn/hppa/udiv_qrnnd.s: Likewise.
29548 * mpn/hppa/hppa1_1/udiv_qrnnd.s: Likewise.
29549 * mpn/pa64/udiv_qrnnd.c: Likewise (by means of __MPN).
29550 * mpn/pa64/umul_ppmm.S: Likewise.
29551 * mpn/sparc32/udiv_fp.asm: Likewise (by means of MPN).
29552 * mpn/sparc32/udiv_nfp.asm: Likewise (by means of MPN).
29553 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise (by means of MPN).
29554
29555 * mpn/generic/tdiv_qr.c: Work around gcc 2.7.2.3 i386 register handling
29556 bug.
29557
29558 * mpn/generic/tdiv_qr.c: Use udiv_qrnnd instead of mpn_divrem_1
29559 when computing appropriate quotient; mpn_divrem_1 writes too
29560 many quotient limbs.
29561
29562 * mpn/asm-defs.m4: invert_normalized_limb => invert_limb.
29563 * mpn/alpha/invert_limb.asm: mpn_invert_normalized_limb =>
29564 mpn_invert_limb.
29565 * gmp.h: Likewise.
29566 * gmp-impl.h (alpha specific): invert_normalized_limb => invert_limb;
29567 wrap with __MPN.
29568 * longlong.h (alpha udiv_qrnnd): Likewise.
29569
29570 2000-04-16 Kevin Ryde <[email protected]>
29571
29572 * gmp.h (mp_set_memory_functions,mp_bits_per_limb,gmp_errno): Add
29573 #defines so the library symbols are __gmp_*.
29574 * errno.c: Include gmp.h.
29575 * gmp-impl.h (_mp_allocate_func,etc): Add #defines to __gmp_*.
29576 (__clz_tab): New #define to __MPN(clz_tab).
29577 * stack-alloc.c (__gmp_allocate_func,etc): Change from _mp_*.
29578
29579 * Makefile.am (libmp_la_DEPENDENCIES): Add some mpz files needed
29580 for new mpz_powm (pow in libmp).
29581 (EXTRA_DIST): Add projects directory.
29582
29583 * mpn/*: Change __mpn to __gmpn.
29584 * gmp.h (__MPN): Ditto.
29585 * stack_alloc.c,stack-alloc.h: Change __tmp to __gmp_tmp.
29586
29587 * mpn/generic/sb_divrem_mn.c (mpn_sb_divrem_mn): Avoid gcc 2.7.2.3
29588 i386 register handling bug (same as previously in mpn_divrem_classic).
29589
29590 * mpn/generic/divrem.c: Now contains mpn_divrem, which is not an
29591 internal function, so remove warning comment.
29592
29593 * gmp.texi (Compatibility with Version 2.0.x): Source level only.
29594
29595 2000-04-16 Linus Nordberg <[email protected]>
29596
29597 * configure.in (hppa1.0*): Prefer c89 to cc.
29598 * configure: Regenerate.
29599
29600 2000-04-15 Linus Nordberg <[email protected]>
29601
29602 * configure.in: If `mpn_path' is set by user on configure command
29603 line, use that as path.
29604 * configure: Regenerate.
29605
29606 2000-04-15 Linus Nordberg <[email protected]>
29607
29608 * configure.in (hppa2.0*): Use path "hppa/hppa1_1 hppa" if no
29609 64-bit compiler was found.
29610 * configure: Regenerate.
29611
29612 2000-04-15 Linus Nordberg <[email protected]>
29613
29614 * configure.in: Honor `CC' and `CFLAGS' set by user on configure
29615 command line.
29616 * acinclude.m4: (GMP_PROG_CC_SELECT): Set CFLAGS if not set already.
29617 * aclocal.m4: Regenerate.
29618 * configure: Regenerate.
29619
29620 2000-04-15 Linus Nordberg <[email protected]>
29621
29622 * acinclude.m4 (GMP_PROG_CC_FIND): Remove debug output. Remove
29623 commented out code.
29624 * aclocal.m4: Regenerate.
29625 * configure: Regenerate.
29626
29627 * configure.in: Make all `-mcpu' options to gcc optional.
29628 * configure: Regenerate.
29629
29630 * tests/rand/Makefile.am: Don't do anything for target 'all'.
29631 * tests/rand/Makefile.in: Regenerate.
29632
29633 2000-04-15 Kevin Ryde <[email protected]>
29634
29635 * README: Small updates.
29636 * NEWS: Add some things about 3.0.
29637
29638 * mpz/Makefile.am (EXTRA_DIST): Remove dmincl.c.
29639
29640 * Makefile.am: Use -version-info on libraries, not -release.
29641
29642 * mpz/tdiv_qr.c: Add mdiv function header #ifdef BERKELEY_MP.
29643 * mpbsd/Makefile.am: Use mpz/tdiv_qr.c, not mdiv.c.
29644 * Makefile.am (MPBSD_OBJECTS): Change mdiv.lo to tdiv_qr.lo.
29645 (libmp_la_DEPENDENCIES): Add mp_clz_tab.lo.
29646 * mpbsd/mdiv.c: Remove file.
29647
29648 * config/mt-linux,mt-m68k,mt-m88110,mt-ppc,mt-ppc64-aix,mt-pwr,
29649 mt-sprc8-gcc,mt-sprc9-gcc,mt-supspc-gcc,mt-vax,mt-x86,
29650 mpn/config/mt-pa2hpux,mt-sprc9,t-oldgas,t-ppc-aix,t-pwr-aix:
29651 Remove configure fragments not used since change to autoconf.
29652
29653 * mpn/generic/bz_divrem_n.c,sb_divrem_mn.c: Add comment that
29654 internal functions are changeable and shouldn't be used directly.
29655
29656 2000-04-15 Linus Nordberg <[email protected]>
29657
29658 * configure.in: Remove debug output.
29659 * configure: Regenerate.
29660
29661 2000-04-15 Torbjorn Granlund <[email protected]>
29662
29663 * mpn/generic/tdiv_qr.c: Don't use alloca directly.
29664
29665 * mpz/tdiv_qr.c: Fix typo.
29666 * mpz/tdiv_r.c: Fix typo.
29667 * mpz/tdiv_q.c: Fix typo.
29668
29669 * configure.in: Disable -march=pentiumpro due to apparent compiler
29670 problems.
29671
29672 * mpz/powm.c: Replace with new code from Paul Zimmermann.
29673
29674 * mpz/tdiv_q.c: Remove debug code.
29675
29676 * mpn/generic/divrem.c: Remove C++ style `//' commented-out code.
29677 * mpn/generic/sb_divrem_mn.c: Likewise.
29678
29679 2000-04-14 Torbjorn Granlund <[email protected]>
29680
29681 * mpz/cdiv_q.c: Change temp allocation for new requirements of
29682 mpz_tdiv_qr.
29683 * mpz/fdiv_q.c: Likewise.
29684
29685 * mpn/sparc64/gmp-mparam.h: Set up parameters for TOOM3.
29686
29687 * mpz/dmincl.c: Delete file.
29688 * mpz/tdiv_qr.c: Rewrite using mpn_tdiv_qr.
29689 * mpz/tdiv_r.c: Likewise.
29690 * mpz/tdiv_q.c: Likewise.
29691
29692 * mpn/generic/tdiv_qr.c: New file.
29693 * mpn/generic/bz_divrem_n.c: New file.
29694 * mpn/generic/sb_divrem_mn.c: New file.
29695
29696 * gmp-impl.h (MPZ_REALLOC): New macro.
29697 (mpn_sb_divrem_mn): Declare.
29698 (mpn_bz_divrem_n): Declare.
29699 (mpn_tdiv_qr): Declare.
29700
29701 * configure.in (gmp_mpn_functions): Delete divrem_newt and divrem_1n;
29702 add tdiv_qr, bz_divrem_n, and sb_divrem_mn.
29703 * mpn/generic/divrem_newt.c: Delete file.
29704 * mpn/generic/divrem_1n.c: Delete file.
29705
29706 * gmp.h (mpn_divrem_newton): Remove declaration.
29707 (mpn_divrem_classic): Remove declaration.
29708
29709 * gmp.h (mpn_divrem): Remove function definition.
29710 * mpn/generic/divrem.c: Replace mpn_divrem_classic with a
29711 mpn_divrem wrapper.
29712
29713 2000-04-14 Kevin Ryde <[email protected]>
29714
29715 * mpf/dump.c, mpz/dump.c, mpn/generic/dump.c,
29716 mpn/generic/divrem.c, mpn/generic/divrem_1n.c,
29717 mpn/generic/divrem_2.c, mpn/generic/divrem_newt.c,
29718 mpn/generic/mul.c, mpn/generic/mul_basecase.c,
29719 mpn/generic/mul_n.c, mpn/generic/sqr_basecase.c,
29720 mpn/generic/udiv_w_sdiv.c: Add comment that internal functions are
29721 changeable and shouldn't be used directly.
29722
29723 * mpq/div.c: Use DIVIDE_BY_ZERO (previously didn't get an
29724 exception on zero divisor).
29725
29726 * mpf/tests/t-get_d.c, mpz/tests/reuse.c: Add K&R function
29727 definitions.
29728 * mpz/tests/t-2exp.c: Don't use ANSI-ism 2ul.
29729
29730 * gmp.texi (Installing MP): Build problem notes for GSYM_PREFIX
29731 and ranlib on native SunOS.
29732 Particular systems notes about AIX and HPPA shared libraries
29733 disabled.
29734 (MP Basics): Add that undocumented things shouldn't be used.
29735 (Introduction to MP): Add to CPUs listed.
29736
29737 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Don't depend on C
29738 having "void".
29739
29740 2000-04-13 Linus Nordberg <[email protected]>
29741
29742 * mpn/pa64/udiv_qrnnd.c (__udiv_qrnnd64): Add K&R function
29743 definition.
29744
29745 * configure.in: Disable shared libraries for hppa*.
29746 (mips-sgi-irix6.*): Fix flags for 64-bit gcc.
29747 (hppa2.0*-*-*): Prefer c89 to cc.
29748 * configure: Regenerate.
29749
29750 * gmp.h (gmp_randalg_t): Remove comma after last element.
29751
29752 * tests/rand/t-rand.c: Add copyright notice.
29753
29754 2000-04-13 Kevin Ryde <[email protected]>
29755
29756 * mpn/generic/mul_n.c, mpn/generic/gcdext.c, mpz/nextprime.c,
29757 mpz/remove.c, mpz/root.c: Add K&R function definitions.
29758 * mpz/rrandomb.c: Fix typo in K&R part.
29759 * stack-alloc.c: Add K&R style function pointer declarations.
29760
29761 * mpz/root.c: Use SQRT_OF_NEGATIVE on even roots of negatives.
29762 Use DIVIDE_BY_ZERO on a "zero'th" root.
29763
29764 * configure: Regenerate with autoconf backpatched to fix --srcdir
29765 absolute path wildcards that bash doesn't like, change by Linus.
29766
29767 * gmp.texi (Integer Arithmetic): Document mpz_nextprime.
29768 (Miscellaneous Integer Functions): Fix mpz_fits_* formatting.
29769 (Installing MP): Comment-out CC and CFLAGS description.
29770
29771 2000-04-13 Linus Nordberg <[email protected]>
29772
29773 * rand.c (gmp_randinit): Don't combine va_alist with ordinary
29774 arguments for non STDC.
29775
29776 2000-04-13 Torbjorn Granlund <[email protected]>
29777
29778 * mpz/nextprime.c: Use proper names of new random types and functions.
29779
29780 * mpz/rrandomb.c: New file.
29781 * mpz/Makefile.am: List it.
29782 * mpz/Makefile.in: Regenerate.
29783 * Makefile.am: Here too.
29784 * Makefile.in: Regenerate.
29785 * gmp.h: Declare mpz_rrandomb.
29786
29787 2000-04-12 Linus Nordberg <[email protected]>
29788
29789 * Makefile.am, demos/Makefile.am, mpbsd/Makefile.am,
29790 mpbsd/tests/Makefile.am, mpf/Makefile.am, mpf/tests/Makefile.am,
29791 mpn/Makefile.am, mpq/Makefile.am, mpq/tests/Makefile.am,
29792 mpz/Makefile.am, mpz/tests/Makefile.am, tests/Makefile.am,
29793 tests/rand/Makefile.am (AUTOMAKE_OPTIONS): Add 'no-dependencies'.
29794
29795 * Makefile.in, demos/Makefile.in, mpbsd/Makefile.in,
29796 mpbsd/tests/Makefile.in, mpf/Makefile.in, mpf/tests/Makefile.in,
29797 mpn/Makefile.in, mpq/Makefile.in, mpq/tests/Makefile.in,
29798 mpz/Makefile.in, mpz/tests/Makefile.in, tests/Makefile.in,
29799 tests/rand/Makefile.in: Regenerate.
29800
29801 2000-04-12 Linus Nordberg <[email protected]>
29802
29803 * randlc.c (gmp_randinit_lc): Disable function.
29804 * gmp.texi (Random State Initialization): Remove gmp_randinit_lc.
29805
29806 * acinclude.m4 (GMP_CHECK_CC_64BIT): Compiling an empty main
29807 successfully with `-n32' will have to suffice on irix6.
29808 * aclocal.m4: Regenerate.
29809
29810 * configure.in (sparc): Don't pass -D_LONG_LONG_LIMB to compiler.
29811 (mips-sgi-irix6.*): Use compiler option `-n32' rather than `-64'
29812 for 64-bit `cc'. Add options for gcc.
29813 * configure: Regenerate.
29814
29815 * mpf/urandomb.c (mpf_urandomb): Add third parameter 'nbits'. If
29816 'nbits' doesn't make even limbs, shift up result before
29817 normalizing.
29818
29819 * gmp.h (mpf_urandomb): Add parameter to prototype.
29820
29821 * mpf/urandom.c: Rename file to ...
29822 * mpf/urandomb.c: ... this.
29823 * Makefile.am (MPF_OBJECTS): Change urandom.lo --> urandomb.lo.
29824 * Makefile.in: Regenerate.
29825 * mpf/Makefile.am (libmpf_la_SOURCES): Change urandom.c --> urandomb.c.
29826 * mpf/Makefile.in: Regenerate.
29827
29828 * config.in: Regenerate for HAVE_DECL_OPTARG.
29829
29830 * randraw.c (_gmp_rand): Fix bug with _LONG_LONG_LIMB.
29831 (lc): Change return type.
29832 Use one temporary storage instead of two.
29833 Handle seed of size 0.
29834 Avoid modulus operation in some cases.
29835 Abort if M is not a power of 2.
29836 Fix bug with 64-bit limbs.
29837 Fix bug with small seed, small A and large M.
29838
29839 * tests/rand/gen.c (main): Include gmp.h. Remove macros MIN, MAX. Add
29840 option '-q'. Don't demand argument N. Change parameters in call
29841 to mpf_urandomb.
29842
29843 * tests/rand/t-rand.c: New file for testing random number generation.
29844
29845 * tests/rand/Makefile.am: Run t-rand for 'make check'.
29846 (test, bigtest): Rename to manual-test, manual-bigtest.
29847 * tests/rand/Makefile.in: Regenerate.
29848
29849 2000-04-12 Kevin Ryde <[email protected]>
29850
29851 * gmp-impl.h: Include config.h before TMP_ALLOC, so
29852 --disable-alloca works.
29853
29854 * mpbsd/Makefile.am: Don't recompile top-level sources here.
29855 * Makefile.am (libmp_la_DEPENDENCIES): Put objects here instead,
29856 add errno.lo and stack-alloc.lo.
29857
29858 * mpn/asm-defs.m4: Add a test and message for the unsuitable SunOS m4.
29859 * gmp.texi (Installing MP): Update note on SunOS m4 failure.
29860
29861 * acconfig.h: Add copyright notice using @TOP@.
29862
29863 * stack-alloc.c: Use _mp_allocate_func, not malloc.
29864 * gmp.texi (Installing MP): Note this under --disable-alloca.
29865
29866 * gmp.texi (Comparison Functions): mpz_cmp_abs => mpz_cmpabs.
29867 (Integer Arithmetic): mpz_prime_p not yet implemented, comment out.
29868 (Float Arithmetic): mpf_pow_ui now implemented, uncomment-out.
29869 (Miscellaneous Float Functions): Add mpf_ceil, mpf_floor, mpf_trunc.
29870 (Low-level Functions): Add mpn_random2, with mpn_random.
29871
29872 * mpn/m68k/mc68020/udiv.S: Rename from udiv.s.
29873 * mpn/m68k/mc68020/umul.S: Ditto.
29874
29875 * mpn/alpha/umul.asm: Rename from umul.s, remove .file and
29876 compiler identifiers.
29877
29878 * mpn/powerpc32/syntax.h: Removed, no longer used.
29879
29880 * mpn/a29k/udiv.s: Remove .file and compiler identifiers.
29881 * mpn/a29k/umul.s: Ditto.
29882
29883 * mpn/tests/ref.c: Use WANT_ASSERT.
29884 * mpn/tests/ref.h: Use _PROTO.
29885
29886 * mpbsd/configure.in: Removed, no longer required.
29887
29888 * mpf/div.c: Use DIVIDE_BY_ZERO.
29889 * mpf/div_ui.c: Ditto.
29890 * mpf/ui_div.c: Ditto.
29891 * mpq/inv.c: Ditto.
29892 * mpf/sqrt.c: Use SQRT_OF_NEGATIVE.
29893 * mpz/sqrt.c: Ditto.
29894 * mpz/sqrtrem.c: Ditto.
29895
29896 * gmp-impl.h (GMP_ERROR,SQRT_OF_NEGATIVE): New macros.
29897 (DIVIDE_BY_ZERO): Use GMP_ERROR.
29898 (__mp_bases): #define to __MPN(mp_bases).
29899
29900 2000-04-11 Linus Nordberg <[email protected]>
29901
29902 * tests/rand/stat.c (main): Initialize `l1runs' at declaration.
29903
29904 2000-04-11 Kevin Ryde <[email protected]>
29905
29906 * mpz/fib_ui.c: Add K&R function definitions.
29907
29908 * mpbsd/tests/Makefile.am (TESTS): Add a dummy test to avoid a
29909 shell problem with an empty "for tst in $(TESTS) ; ...".
29910 * mpbsd/tests/dummy.c: New file.
29911
29912 2000-04-10 Torbjorn Granlund <[email protected]>
29913
29914 * mpz/bin_uiui.c: Delete several unused variables.
29915 Add copyright notice.
29916 * mpz/bin_ui.c: Add copyright notice.
29917
29918 * longlong.h: Declare __count_leading_zeros for alpha.
29919
29920 2000-04-10 Linus Nordberg <[email protected]>
29921
29922 * rand.c (gmp_randinit): Change parameter list to (rstate, alg, ...).
29923 * gmp.h: Change prototype accordingly.
29924 * mpz/pprime_p.c (millerrabin): Change call accordingly.
29925
29926 * configure.in: Check for `optarg'.
29927 * configure: Regenerate.
29928
29929 * mpn/Makefile.am: Remove incorrect comment.
29930 * mpn/Makefile.in: Regenerate.
29931
29932 * gmp.h: Rename most of the random number functions, structs and some
29933 of the struct members.
29934 * rand.c (gmp_randinit): Likewise.
29935 * randclr.c (gmp_randclear): Likewise.
29936 * randlc.c (gmp_randinit_lc): Likewise.
29937 * randlc2x.c (gmp_randinit_lc_2exp): Likewise.
29938 * randraw.c (lc): Likewise.
29939 (_gmp_rand_getraw): Likewise.
29940 * randsd.c (gmp_randseed): Likewise.
29941 * randsdui.c (gmp_randseed_ui): Likewise.
29942 * gmp.texi: Likewise.
29943
29944 * gmp.texi: Use three hyphens for a dash.
29945 (Low-level Functions): Remove documentation for gmp_rand_getraw.
29946 (Random Number Functions): Add info on where to find documentation
29947 on the random number functions.
29948
29949 * tests/rand/Makefile.am (test, bigtest): Quote argument to grep.
29950 * tests/rand/Makefile.in: Regenerate.
29951
29952 * tests/rand/gen.c: Declare optarg, optind, opterr if not already
29953 declared.
29954 (main): Use new names for the random stuff.
29955 (main): Don't use strtoul() if we don't have it. Use strtol()
29956 instead, if we have it. Otherwise, use atoi().
29957 (main): Use srandom/srandomdev for __FreeBSD__ only.
29958 (main): Use new parameter order to gmp_randinit().
29959
29960 * tests/rand/stat.c: Declare optarg, optind, opterr if not already
29961 declared.
29962
29963 2000-04-10 Torbjorn Granlund <[email protected]>
29964
29965 * mpz/pprime_p.c: Pass 0L for mpz_scan1. mpz_mmod => mpz_mod.
29966 (millerrabin): Use new random interface.
29967 (millerrabin): ... and don't forget to call gmp_randclear.
29968
29969 * mpz/nextprime.c: New file.
29970 * gmp.h: Declare mpz_nextprime.
29971 * mpz/Makefile.am: List nextprime.c.
29972 * mpz/Makefile.in: Regenerate.
29973 * Makefile.am: List mpz/nextprime.lo.
29974 * Makefile.in: Regenerate.
29975
29976 2000-04-10 Kevin Ryde <[email protected]>
29977
29978 * move-if-change, mpz/tests/move-if-change, mpq/tests/move-if-change,
29979 mpf/tests/move-if-change: Remove, no longer used.
29980
29981 * Makefile.am (SUBDIRS): Add tests, demos, mpbsd.
29982 (libmp.la): New target, conditional on WANT_MPBSD.
29983 (libgmp_la_LIBADD): Add -lm.
29984 (AUTOMAKE_OPTIONS): Add check-news.
29985 (include_HEADERS): Setup to install gmp.h and possibly mp.h.
29986 (DISTCLEANFILES): Add generated files.
29987 (check): Remove explicit target (now uses check-recursive).
29988
29989 * configure.in: Use AM_CONFIG_HEADER.
29990 Add --enable-mpbsd setting automake conditional WANT_MPBSD.
29991 Output demos/Makefile, mpbsd/Makefile and mpbsd/tests/Makefile.
29992
29993 * mpz/Makefile.am: Add SUBDIRS=tests, shorten INCLUDES since now
29994 using AM_CONFIG_HEADER.
29995 * mpq/Makefile.am: Ditto.
29996 * mpf/Makefile.am: Ditto, and add DISTCLEANFILES.
29997 * mpn/Makefile.am: Shorten INCLUDES, amend some comments.
29998 * mpz/tests/Makefile.am: Use TESTS and $(top_builddir).
29999 * mpf/tests/Makefile.am: Ditto.
30000 * mpq/tests/Makefile.am: Ditto.
30001 * demos/Makefile.am: New file.
30002
30003 * mpbsd/Makefile.am: New file, derived from old mpbsd/Makefile.in.
30004 * mpbsd/Makefile.in: Now generated from Makefile.am.
30005 * mpbsd/realloc.c: Removed, use mpz/realloc.c instead.
30006 * mpbsd/tests/Makefile.am: New file.
30007 * mpbsd/tests/Makefile.in: New file, generated from Makefile.am.
30008 * mpbsd/tests/allfuns.c: New file.
30009
30010 * gmp.texi (Top): Use @ifnottex, to help makeinfo --html.
30011 (Installing MP): Describe --enable-mpbsd and demo programs.
30012
30013 * tests/rand/statlib.c: mpz_cmp_abs => mpz_cmpabs.
30014
30015 * tests/rand/Makefile.am (LDADD): Don't need -lm (now in libgmp.la).
30016 (EXTRA_PROGRAMS): Not noinst_PROGRAMS.
30017 (INCLUDES): Shorten to -I$(top_srcdir) now using AM_CONFIG_HEADER.
30018
30019 2000-04-09 Torbjorn Granlund <[email protected]>
30020
30021 * mpz/urandomm.c: Get type of count right.
30022 Simplify computation of nbits.
30023
30024 2000-04-08 Torbjorn Granlund <[email protected]>
30025
30026 * mpz/urandomb.c: Fix reallocation condition.
30027 Simplify size computation.
30028
30029 2000-04-08 Linus Nordberg <[email protected]>
30030
30031 * acinclude.m4 (GMP_CHECK_CC_64BIT): Add special handling for
30032 HPUX.
30033 (GMP_CHECK_ASM_W32): Ditto.
30034 * aclocal.m4: Regenerate.
30035
30036 * mpn/Makefile.am: Use $(CCAS) for assembling.
30037 (.asm.obj): Add rule.
30038 * mpn/Makefile.in: Regenerate.
30039
30040 * gmp.texi (Miscellaneous Integer Functions): Fix typos.
30041
30042 * configure.in: Never pass `-h' to grep.
30043 (mips-sgi-irix6.[2-9]*): Try to find 64-bit compiler.
30044 (hppa1.0*-*-*): New flag for cc.
30045 (hppa2.0*-*-*): Try to find 64-bit compiler. Chose path, set
30046 CCAS.
30047 * configure: Regenerate.
30048
30049 2000-04-08 Torbjorn Granlund <[email protected]>
30050
30051 * mpz/bin_ui.c: Don't depend on ANSI C features.
30052 * mpz/bin_uiui.c: Likewise.
30053
30054 * Makefile.am (MPZ_OBJECTS): mpz/cmp_abs* => mpz/cmpabs*.
30055 (MPQ_OBJECTS): Add mpq/set_d.lo.
30056 (MPZ_OBJECTS): Add mpz/fits*.lo.
30057 * Makefile.in: Regenerate.
30058
30059 * mpz/cmpabs.c: New name for mpz/cmp_abs.c.
30060 * mpz/cmpabs_ui.c: New name for mpz/cmp_abs_ui.c.
30061 * mpz/Makefile.am: Corresponding changes.
30062 * mpz/Makefile.in: Regenerate.
30063 * gmp.h: mpz_cmp_abs* => mpz_cmpabs*.
30064
30065 * mpz/addmul_ui.c (mpn_neg1): Don't depend on ANSI C features.
30066
30067 * mpz/invert.c: Use TMP_MARK since we invoke MPZ_TMP_INIT.
30068
30069 * gmp.h (mpq_set_d): Declare correctly.
30070 (mpz_root): Use _PROTO.
30071 (mpz_remove): Use _PROTO.
30072 (mpf_pow_iu): Use _PROTO.
30073
30074 * mpn/asm-defs.m4 (MPN_PREFIX): Revert previous change.
30075 * gmp.h (__MPN): Revert previous change.
30076
30077 * mpz/perfpow.c: De-ANSI-fy. Add copyright notice.
30078
30079 * mpz/set_d.c: Misc cleanups.
30080
30081 * mpq/set_d: New file.
30082 * gmp.h: Declare mpq_set_d.
30083 * mpq/Makefile.am: List set_d.c.
30084 * mpq/Makefile.in: Regenerate.
30085
30086 2000-04-07 Torbjorn Granlund <[email protected]>
30087
30088 * mpz/fits_sint_p.c: New file.
30089 * mpz/fits_slong_p.c: New file.
30090 * mpz/fits_sshort_p.c: New file.
30091 * mpz/fits_uint_p.c: New file.
30092 * mpz/fits_ulong_p.c: New file.
30093 * mpz/fits_ushort_p.c: New file.
30094 * gmp.h: Declare mpz_fits_*.
30095 * mpz/Makefile.am: List fits_* files.
30096 * mpz/Makefile.in: Regenerate.
30097
30098 2000-04-06 Kevin Ryde <[email protected]>
30099
30100 * gmp.texi (Installing MP): Add known build problem SunOS 4.1.4 m4
30101 failure.
30102
30103 * mpn/x86/pentium/gmp-mparam.h: Tune thresholds.
30104 * mpn/x86/p6/gmp-mparam.h: Ditto.
30105 * mpn/x86/k6/gmp-mparam.h: Tune thresholds, add UMUL_TIME, UDIV_TIME.
30106 * mpn/x86/k7/gmp-mparam.h: Tune thresholds, amend UMUL_TIME.
30107
30108 * mpn/generic/mul_n.c (mpn_kara_mul_n): Add an ASSERT.
30109 (mpn_kara_sqr_n): Add an ASSERT, use KARATSUBA_SQR_THRESHOLD.
30110 (mpn_toom3_sqr_n): Eliminate second evaluate3.
30111
30112 * gmp-impl.h (mpn_com_n,MPN_LOGOPS_N_INLINE): Don't allow size==0.
30113 (tune_mul_threshold,tune_sqr_threshold): Conditionalize
30114 declarations on TUNE_PROGRAM_BUILD.
30115
30116 * mpn/generic/sqr_basecase.c: Add an assert.
30117
30118 2000-04-05 Torbjorn Granlund <[email protected]>
30119
30120 * gmp.h, mpn/asm-defs.m4: List the same functions for __MPN, but
30121 leave some commented out.
30122
30123 * gmp-impl.h (MPN_LOGOPS_N_INLINE): Optimize.
30124 (mpn_com_n): Optimize.
30125
30126 * gmp.h (__MPN): Make it use __gmpn instead of __mpn for consistency.
30127 * mpn/asm-defs.m4 (MPN_PREFIX): Likewise.
30128
30129 * gmp.h (GMP_ERROR_ALLOCATE): New errcode.
30130
30131 * gmp-impl.h (MPN_MUL_N_RECURSE): Delete.
30132 (MPN_SQR_RECURSE): Delete.
30133
30134 * gmp-impl.h (TARGET_REGISTER_STARVED): New define.
30135
30136 * gmp-impl.h (mpn_kara_sqr_n): Remap with __MPN.
30137 (mpn_toom3_sqr_n): Likewise.
30138 (mpn_kara_mul_n): Likewise.
30139 (mpn_toom3_mul_n): Likewise.
30140 (mpn_reciprocal): Likewise.
30141
30142 * gmp-impl.h (__gmpn_mul_n): Remove declaration.
30143 (__gmpn_sqr): Likewise.
30144 * gmp.h (mpn_sqr_n): Declare/remap.
30145 * mpn/generic/mul.c (mpn_sqr_n): New name for mpn_sqr.
30146
30147 * gmp.h (mpn_udiv_w_sdiv): Move __MPN remap from here...
30148 * gmp-impl.h: ...to here.
30149
30150 2000-04-05 Linus Nordberg <[email protected]>
30151
30152 * gmp.texi (Top): Add `Random Number Functions' to menu.
30153 (Introduction to MP): Fix typo.
30154 (MP Basics): Create menu for all sections. Move `Random Number
30155 Functions' to its own chapter. Add nodes for all sections.
30156 (Function Classes): Mention random generation functions under
30157 miscellaneous.
30158 (Miscellaneous Integer Functions): Update mpz_urandomb,
30159 mpz_urandomm.
30160 (Low-level Functions): Remove mpn_rawrandom.
30161 (Random State Initialization): Update.
30162
30163 * mpf/urandom.c (mpf_urandomb): Remove SIZE parameter. Normalize
30164 result correctly.
30165
30166 * gmp.h (mpf_urandomb): Remove SIZE parameter.
30167
30168 * randraw.c (gmp_rand_getraw): Handle the case where (1) the LC
30169 scheme doesn't generate even limbs and (2) more than one LC
30170 invocation is necessary to produce the requested number of bits.
30171
30172 2000-04-05 Torbjorn Granlund <[email protected]>
30173
30174 * mpn/generic/mul_n.c (INVERSE_3): New name for THIRD, define for
30175 any BITS_PER_MP_LIMB.
30176 (MP_LIMB_T_MAX): New.
30177 (mpn_divexact3_n): Remove.
30178 (interpolate3): Use mpn_divexact_by3 instead of mpn_divexact3_n.
30179
30180 2000-04-05 Kevin Ryde <[email protected]>
30181
30182 * gmp-impl.h (KARATSUBA_MUL_THRESHOLD<2): Remove cpp test.
30183 (tune_mul_threshold,tune_sqr_threshold): Add declarations, used in
30184 development only.
30185
30186 * mpn/x86/k7/sqr_basecase.asm: New file, only a copy of k6 for now.
30187
30188 2000-04-04 Torbjorn Granlund <[email protected]>
30189
30190 * gmp-impl.h (TOOM3_MUL_THRESHOLD): Provide default.
30191 (TOOM3_SQR_THRESHOLD): Provide default.
30192
30193 * mpn/generic/mul_n.c: Rewrite (mostly by Robert Harley).
30194 * mpn/generic/mul.c: Rewrite (mostly by Robert Harley).
30195
30196 * configure.in (sparcv9 64-bit OS): Set extra_functions.
30197
30198 2000-04-04 Linus Nordberg <[email protected]>
30199
30200 * mpn/generic/rawrandom.c: Remove file and replace with randraw.c
30201 on top level.
30202 (mpn_rawrandom): Rename to gmp_rand_getraw.
30203
30204 * randraw.c: New file; essentially a copy of
30205 mpn/generic/rawrandom.c.
30206 (gmp_rand_getraw): New function (formerly known as mpn_rawrandom).
30207
30208 * mpz/urandomb.c (mpz_urandomb): Change mpn_rawrandom -->
30209 gmp_rand_getraw.
30210 * mpz/urandomm.c (mpz_urandomb): Ditto.
30211 * mpf/urandom.c (mpf_urandomb): Ditto.
30212
30213 * gmp.h (gmp_rand_getraw): Add function prototype.
30214 (mpn_rawrandom): Remove function prototype.
30215
30216 * Makefile.am (libgmp_la_SOURCES): Add randraw.c.
30217 * Makefile.in: Regenerate.
30218
30219 * configure.in (gmp_mpn_functions): Remove rawrandom.
30220 * configure: Regenerate.
30221
30222 2000-04-04 Linus Nordberg <[email protected]>
30223
30224 * gmp.h (GMP_ERROR enum): Remove comma after last enumeration
30225 since the AIX compiler (xlc) doesn't like that.
30226
30227 * randlc.c (gmp_rand_init_lc): Allocate enough space for seed to
30228 hold any upcoming seed.
30229 * randlc2x.c (gmp_rand_init_lc_2exp): Likewise.
30230
30231 * mpn/generic/rawrandom.c: Remove debugging code.
30232 (mpn_lc): Don't reallocate seed.
30233
30234 * mpz/urandomm.c (mpz_urandomm): Implement function.
30235
30236 * mpz/urandomb.c (mpz_urandomb): Fix typo in function definition.
30237
30238 2000-04-04 Kevin Ryde <[email protected]>
30239
30240 * make.bat: Removed (no longer works, no longer supported).
30241 * mpn/msdos/asm-syntax.h: Removed (was used only by make.bat).
30242
30243 2000-04-03 Torbjorn Granlund <[email protected]>
30244
30245 * mpn/generic/brandom.c: New file, replacing random2.
30246
30247 2000-04-02 Torbjorn Granlund <[email protected]>
30248
30249 * mpn/sparc32/v9/submul_1.asm: Change some carry-form instructions
30250 into their plain counterparts.
30251
30252 * mpn/sparc64/copyi.asm: Avoid executing ALIGN.
30253
30254 * mpn/sparc64/mul_1.asm: Handle overlap of rp/sp.
30255 * mpn/sparc64/addmul_1.asm: Likewise.
30256 * mpn/sparc64/submul_1.asm: Likewise.
30257
30258 2000-04-01 Linus Nordberg <[email protected]>
30259
30260 * gmp.h: Fix function prototypes for randomization functions.
30261 (__gmp_rand_lc_scheme_struct): Replace `m' with `m2exp'. Remove
30262 unused `bits'.
30263 (__gmp_rand_data_lc): Add `m2exp' as another way of representing
30264 the modulus.
30265 (__gmp_rand_state_struct): Remove unused `size'.
30266
30267 * rand.c (__gmp_rand_scheme): Use better multipliers. Remove test
30268 schemes. Replace `m' with `m2exp'.
30269 (gmp_rand_init): Change parameters and return type. Use `m2exp'
30270 instead of `m'. Set `gmp_errno' on error. Disable BBS algorithm.
30271
30272 * randlc.c (gmp_rand_init_lc): Don't use malloc(). Change
30273 parameters.
30274
30275 * randclr.c (gmp_rand_clear): Don't use free(). Disable BBS
30276 algorithm. Set `gmp_errno' on error.
30277
30278 * randlc2x.c (gmp_rand_init_lc_2exp): New function.
30279 * randsd.c (gmp_rand_seed): New function.
30280 * randsdui.c (gmp_rand_seed_ui): New function.
30281 * randlcui.c: Remove unused file.
30282
30283 * mpn/generic/rawrandom.c (mpn_rawrandom): Rewrite.
30284 (mpn_lc): New static function.
30285
30286 * mpz/urandomb.c (mpz_urandomb): Use ABSIZ() instead of SIZ() for
30287 determining size of ROP.
30288
30289 * mpf/urandom.c (mpf_urandomb): Add third parameter, nbits. (Not
30290 used yet!)
30291 Change parameter order to mpn_rawrandom().
30292
30293 * Makefile.am (libgmp_la_SOURCES): Add errno.c, randlc2x.c,
30294 randsd.c, randsdui.c. Remove randui.c.
30295 (MPZ_OBJECTS): Rename urandom.lo --> urandomb.lo. Add urandomm.lo.
30296 * Makefile.in: Regenerate.
30297
30298 * mpz/Makefile.am (libmpz_la_SOURCES): Change urandom.c -->
30299 urandomb.c. Add urandomm.c.
30300 * mpz/Makefile.in: Regenerate.
30301
30302 * tests/rand/Makefile.am (noinst_PROGRAMS): Change findcl --> findlc.
30303 Add gen.static.
30304 * tests/rand/Makefile.in: Regenerate.
30305
30306 * tests/rand/gen.c (main): Add mpz_urandomm. Add command line options
30307 `-C', `-m', extend `-a'. Use *mp*_*rand*() with new parameters. Call
30308 gmp_rand_seed().
30309
30310 2000-04-01 Kevin Ryde <[email protected]>
30311
30312 * acinclude.m4 (GMP_CHECK_ASM_DATA): Plain .data for hpux.
30313 * configure.in (CCAS): No CFLAGS, they're added when it's used.
30314 (CONFIG_SRCDIR): New define for config.m4.
30315 * mpn/sparc64/addmul_1.asm: Use it for an include().
30316 * mpn/sparc64/submul_1.asm: Ditto.
30317 * mpn/sparc64/mul_1.asm: Ditto.
30318
30319 2000-03-31 Linus Nordberg <[email protected]>
30320
30321 * mpz/urandom.c: Rename to...
30322 * mpz/urandomb.c: ...this.
30323
30324 * mpz/urandomb.c (mpz_urandomb): Change operand order in call to
30325 mpn_rawrandom(). Use ABSIZ() instead of SIZ() when checking size
30326 of ROP.
30327
30328 * mpz/urandomm.c: New file.
30329
30330 2000-03-31 Kevin Ryde <[email protected]>
30331
30332 * acinclude.m4 (GMP_CHECK_ASM_MMX): Give a warning when mmx code
30333 will be omitted.
30334
30335 2000-03-30 Torbjorn Granlund <[email protected]>
30336
30337 * mpn/sparc64/mul_1h.asm: New file.
30338 * mpn/sparc64/addmul_1h.asm: New file.
30339 * mpn/sparc64/submul_1h.asm: New file.
30340 * mpn/sparc64/mul_1.asm: Rewrite.
30341 * mpn/sparc64/addmul_1.asm: Rewrite.
30342 * mpn/sparc64/submul_1.asm: Rewrite.
30343
30344 2000-03-28 Torbjorn Granlund <[email protected]>
30345
30346 * mpn/sparc32/v9/mul_1.asm: Fix typo in branch prediction.
30347 * mpn/sparc32/v9/addmul_1.asm: Likewise.
30348 * mpn/sparc32/v9/submul_1.asm: Likewise.
30349
30350 2000-03-25 Kevin Ryde <[email protected]>
30351
30352 * mpn/lisp/gmpasm-mode.el: Fix some comment detection, use custom,
30353 fontify more keywords, turn into a standalone mode.
30354
30355 * stamp-vti: New file, generated together with version.texi.
30356
30357 * acinclude.m4 (GMP_VERSION,GMP_HEADER_GETVAL): New macros.
30358 * configure.in (AM_INIT_AUTOMAKE): Use GMP_VERSION.
30359
30360 2000-03-24 Kevin Ryde <[email protected]>
30361
30362 * INSTALL: Updates for new configure system.
30363
30364 * configure.in: Add gmp_optcflags_gcc for the x86s, setting -mcpu
30365 and -march.
30366
30367 2000-03-23 Torbjorn Granlund <[email protected]>
30368
30369 * demos/pexpr.c (mpz_eval_expr): Properly initialize rhs/lhs
30370 for ROOT.
30371
30372 2000-03-23 Kevin Ryde <[email protected]>
30373
30374 * config.guess (i?86:*:*:*): Use uname -m if detection program fails.
30375
30376 * mpn/x86/README: Remove remarks on the now implemented MMX shifts.
30377 * mpn/x86/k6/README: Add speed of mpn_divexact_by3, update mpn_mul_1.
30378
30379 * gmp.texi (Installing MP): Corrections to target CPUs.
30380
30381 * version.c: Use VERSION from config.h, add copyright comment,
30382 restore "const" somehow lost.
30383
30384 * configure.in (a29k*-*-*): Fix directory name.
30385
30386 2000-03-22 Torbjorn Granlund <[email protected]>
30387
30388 * demos/pexpr.c (op_t): Add ROOT.
30389 (fns): Add ROOT.
30390 (mpz_eval_expr): Add ROOT.
30391
30392 * mpz/root.c: Handle roots of negative numbers.
30393 Fix other border cases.
30394 Fix rare memory leakage.
30395
30396 * errno.c: New file.
30397
30398 2000-03-21 Torbjorn Granlund <[email protected]>
30399
30400 * gmp.h (error number enum): New anonymous enum.
30401 (gmp_errno): New.
30402
30403 * gmp.h (__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR): Bump for GMP 3.0.
30404
30405 2000-03-20 Torbjorn Granlund <[email protected]>
30406
30407 * mpn/alpha/unicos.m4 (FLOAT64): New define.
30408 * mpn/alpha/default.m4 (FLOAT64): New define.
30409 * mpn/alpha/invert_limb.asm (C36): Use FLOAT64.
30410
30411 2000-03-21 Kevin Ryde <[email protected]>
30412
30413 * mpn/x86/k6/diveby3.asm: Tiny speedup.
30414
30415 * acinclude.m4 (GMP_CHECK_ASM_SHLDL_CL): New macro.
30416 * configure.in: Use it, set WANT_SHLDL_CL in config.m4.
30417 * mpn/x86/x86-defs.m4 (shldl,shrdl,shldw,shrdw): New macros, using
30418 WANT_SHLDL_CL.
30419 * mpn/x86/k6/mmx/lshift.asm: Use shldl macro.
30420 * mpn/x86/k7/mmx/lshift.asm: Ditto.
30421 * mpn/x86/pentium/mmx/lshift.asm: Ditto.
30422 * mpn/x86/k6/mmx/rshift.asm: Use shrdl macro.
30423 * mpn/x86/k7/mmx/rshift.asm: Ditto.
30424 * mpn/x86/pentium/mmx/rshift.asm: Ditto.
30425 * mpn/x86/README.family: Add a note about this.
30426
30427 2000-03-20 Linus Nordberg <[email protected]>
30428
30429 * mpn/generic/rawrandom.c (mpn_rawrandom): Handle seed value of 0
30430 correctly.
30431
30432 * configure.in: Fix detection of alpha flavour.
30433 Set compiler options for `sparcv8'.
30434 * configure: Regenerate.
30435
30436 * rand.c (__gmp_rand_scheme): Clean up some. Use slightly better
30437 multipliers.
30438
30439 * configure.in (AC_OUTPUT): Add tests/Makefile and
30440 tests/rand/Makefile.
30441
30442 * acinclude.m4 (AC_CANONICAL_BUILD): Define to
30443 `_AC_CANONICAL_BUILD' to deal with incompatibilities between
30444 Autoconf and Libtool.
30445 (AC_CHECK_TOOL_PREFIX): Likewise.
30446
30447 * Makefile.am (EXTRA_DIST): Add directory `tests'.
30448
30449 * mkinstalldirs: Update (Automake 2000-03-17).
30450 * ltconfig: Update (Libtool 2000-03-17).
30451 * ltmain.sh: Ditto.
30452
30453 * configure: Regenerate with new autoconf/-make/libtool suite.
30454 * aclocal.m4: Ditto.
30455 * config.in: Ditto.
30456 * all Makefile.in's: Ditto.
30457
30458 2000-03-20 Torbjorn Granlund <[email protected]>
30459
30460 * demos/pexpr.c (main): Don't allow `-N' for base, require `-bN'.
30461
30462 * mpn/alpha/unicos.m4 (cvttqc): New define.
30463 * mpn/alpha/invert_limb.asm: Use new define for cvttqc.
30464
30465 2000-03-19 Kevin Ryde <[email protected]>
30466
30467 * mpn/x86/k6/sqr_basecase.asm: Tiny amendments for 3x3 case.
30468
30469 * gmp.texi: Use @include version.texi.
30470 Use @email and @uref.
30471 (Installing MP): Rewrite for new configure.
30472 (Low-level Functions): Add mpn_divexact_by3.
30473
30474 * configure.in (--enable-alloca): New option.
30475 * acconfig.h (USE_STACK_ALLOC): For --disable-alloca.
30476
30477 2000-03-18 Kent Boortz <[email protected]>
30478
30479 * macos: New directory with macos port files.
30480
30481 2000-03-17 Torbjorn Granlund <[email protected]>
30482
30483 * gmp-impl.h (union ieee_double_extract): Check _CRAYMPP.
30484
30485 * mpn/asm-defs.m4 (invert_normalized_limb): Define.
30486
30487 * mpn/alpha: Translate `.s' files to `.asm'.
30488
30489 * configure: Regenerate.
30490
30491 * mpn/alpha/invert_limb.asm: Replace dash in file name with underscore.
30492 * configure.in: Corresponding change.
30493
30494 * configure.in: Assign special "path" for alphaev6.
30495
30496 * mpn/alpha/unicos.m4: New file.
30497 * configure.in (alpha*-cray-unicos*): [This part of the change
30498 commited 2000-03-13 by linus]
30499 * mpn/alpha/default.m4: New file.
30500 * configure.in (alpha*-*-*): Use it.
30501
30502 2000-03-17 Kevin Ryde <[email protected]>
30503
30504 * mpn/x86/pentium/rshift.S: Use plain rcrl (not rcrl $1) for
30505 shift-by-1 case, significant speedup.
30506 * mpn/x86/pentium/README: Add shift-by-1 speed.
30507
30508 2000-03-16 Torbjorn Granlund <[email protected]>
30509
30510 * config.guess: Handle Cray T3D/E.
30511
30512 2000-03-15 Kevin Ryde <[email protected]>
30513
30514 * mpn/generic/diveby3.c: New file.
30515 * mpn/x86/diveby3.asm: New file.
30516 * mpn/x86/k6/diveby3.asm: New file.
30517 * gmp.h (mpn_divexact_by3): Prototype and define.
30518 * mpn/asm-defs.m4: define_mpn(divexact_by3).
30519 * configure.in (gmp_mpn_functions): Add diveby3.
30520
30521 * mpn/x86/pentium/sqr_basecase.asm: A few better addressing modes.
30522
30523 * configure.in: Add AC_C_STRINGIZE and AC_CHECK_TYPES((void)).
30524 * gmp-impl.h (ASSERT): Use them.
30525
30526 * mpn/x86/k7/mmx/lshift.asm: New file.
30527 * mpn/x86/k7/mmx/rshift.asm: Rewrite simple loop and return value
30528 handling, add some pictures.
30529
30530 2000-03-14 Torbjorn Granlund <[email protected]>
30531
30532 * mpn/sparc32/v8/mul_1.asm: Make PIC actually work.
30533 * mpn/sparc32/v8/addmul_1.asm: Likewise.
30534
30535 * mpn/sparc32/v8/mul_1.asm: Use m4 ifdef, not cpp #if.
30536 * mpn/sparc32/v8/addmul_1.asm: Likewise.
30537
30538 * mpn/asm-defs.m4 (C): New define for comments.
30539 * mpn/sparc32: Start comments with `C'.
30540
30541 * config.guess: Remove `SunOS 6' handling.
30542 Recognize sun4m and sun4d architectures under old SunOS.
30543
30544 2000-03-14 Linus Nordberg <[email protected]>
30545
30546 * configure.in (gmp_srclinks): Set to list of links created by
30547 configure.
30548 * configure: Regenerate.
30549
30550 * Makefile.am (libgmp_la_LDFLAGS): Set version info.
30551 (DISTCLEANFILES): Include @gmp_srclinks@.
30552 * Makefile.in: Regenerate.
30553
30554 2000-03-13 Linus Nordberg <[email protected]>
30555
30556 * configure.in: Remove some changequote's by quoting the strings
30557 containing `[]'.
30558 Add support for `alpha*-cray-unicos*'.
30559 AC_DEFINE `_LONG_LONG_LIMB' instead of passing it in CFLAGS.
30560 Conditionalize the assembler syntax checks.
30561 * configure: Regenerate.
30562 * config.in: Regenerate.
30563
30564 * acinclude.m4 (GMP_PROG_CCAS): Remove macro.
30565 * aclocal.m4: Regenerate.
30566
30567 2000-03-13 Kevin Ryde <[email protected]>
30568
30569 * mpn/x86/p6/README: New file.
30570
30571 * mpn/x86/k6/mul_1.asm: Rewrite, smaller and slightly faster.
30572
30573 * mpn/lisp/gmpasm-mode.el: Rewrite assembler comment detection and
30574 handling.
30575
30576 * configure.in: Separate mmx directories for each x86 flavour.
30577 * configure: Regenerate.
30578
30579 2000-03-12 Kevin Ryde <[email protected]>
30580
30581 * mpn/x86/x86-defs.m4 (ALIGN): Supplement definition from
30582 config.m4 so as to pad with nops not zeros on old gas.
30583
30584 * mpn/x86/k7/mmx/copyd.asm: Use plain emms (femms is just an alias
30585 for emms now).
30586 * mpn/x86/k7/mmx/copyi.asm: Ditto.
30587 * mpn/x86/k7/mmx/rshift.asm: Ditto.
30588 * mpn/x86/x86-defs.m4: Amend comments.
30589
30590 * mpn/x86/mod_1.asm: Add comments on speeds.
30591
30592 * mpn/x86/pentium/mmx/lshift.asm: New file.
30593 * mpn/x86/pentium/mmx/rshift.asm: New file.
30594 * mpn/x86/pentium/README: Add speeds of various routines.
30595
30596 2000-03-10 Linus Nordberg <[email protected]>
30597
30598 * configure.in: Reorganize.
30599 Use AC_CHECK_TOOL to find `ar'.
30600 Add post-includes `regmap.m4' and `aix.m4' for AIX targets.
30601 asm-syntax.h is not needed for PPC or sparc anymore.
30602 (powerpc64-*-aix*): Compiler is always 64-bit. Use `-q64
30603 -qtune=pwr3' to xlc and `-maix64 -mpowerpc64' to gcc. Pass `-X
30604 64' to `ar' and `nm'.
30605 (pentiummmx): Use GMP_CHECK_ASM_MMX and avoid MMX assembly path if
30606 assembler is not MMX capable.
30607 (pentium[23]): Likewise.
30608 (athlon): Likewise.
30609 (k6*): Likewise.
30610 * configure: Regenerate.
30611
30612 * acinclude.m4 (GMP_PROG_CC_WORKS): New macro.
30613 (GMP_PROG_CC_FIND): Use GMP_PROG_CC_WORKS instead of
30614 AC_TRY_COMPILER. Make sure that the *first* working 32-bit
30615 compiler is used if no 64-bit compiler is found.
30616 (GMP_CHECK_ASM_MMX): New macro.
30617 * aclocal.m4: Regenerate.
30618
30619 * Makefile.in: Regenerate. (CC_TEST removed.)
30620 * mpf/Makefile.in: Likewise.
30621 * mpn/Makefile.in: Likewise.
30622 * mpq/Makefile.in: Likewise.
30623 * mpz/Makefile.in: Likewise.
30624 * mpf/tests/Makefile.in: Likewise.
30625 * mpq/tests/Makefile.in: Likewise.
30626 * mpz/tests/Makefile.in: Likewise.
30627
30628 * acconfig.h (_LONG_LONG_LIMB): Add.
30629
30630 * gmp-impl.h: Include config.h only if HAVE_CONFIG_H is defined.
30631
30632 2000-03-09 Kevin Ryde <[email protected]>
30633
30634 * mpn/x86/pentium/mul_basecase.S: Small speedup by avoiding an AGI.
30635
30636 * mpn/x86/k7/mmx/copyd.asm: Tiny speedup by avoiding popl.
30637 * mpn/x86/k7/mmx/copyi.asm: Ditto.
30638 * mpn/x86/k7/mul_basecase.asm: Ditto.
30639
30640 2000-03-07 Torbjorn Granlund <[email protected]>
30641
30642 * config.guess: Better recognize POWER/PowerPC processor type.
30643
30644 2000-03-07 Kevin Ryde <[email protected]>
30645
30646 * mpn/generic/addsub_n.c: Use HAVE_NATIVE_* now in config.h.
30647
30648 * mpn/asm-defs.m4: Add comments about SysV m4.
30649 (m4_log2): Don't use <<.
30650 (m4_lshift,m4_rshift): New macros.
30651
30652 2000-03-06 Torbjorn Granlund <[email protected]>
30653
30654 * mpn/powerpc32/regmap.m4: Map cr0 => `0', etc.
30655
30656 2000-03-06 Kevin Ryde <[email protected]>
30657
30658 * mpn/tests/ref.c (refmpn_divexact_by3): New function.
30659 * mpn/tests/ref.h: Prototype.
30660
30661 * acconfig.h (WANT_ASSERT): New define.
30662 * configure.in (--enable-assert): Turn on WANT_ASSERT.
30663 * assert.c: New file.
30664 * Makefile.am: Add to build.
30665 * gmp-impl.h (ASSERT): New macro.
30666 (ASSERT_NOCARRY) Renamed from assert_nocarry.
30667 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS.
30668 * mpn/tests/ref.c: Use ASSERT.
30669 * mpf/get_str.c: Use ASSERT_ALWAYS.
30670 * mpf/set_str.c: Remove old assert macro.
30671
30672 * mpn/x86/x86-defs.m4 (cmovnz_ebx_ecx): New macro.
30673 * mpn/x86/p6/aorsmul_1.asm: Use cmov.
30674
30675 * mpn/x86/lshift.S: Use %dl with testb, not %edx. No object code
30676 change, testb was still getting generated.
30677 * mpn/x86/rshift.S: Ditto.
30678
30679 2000-03-03 Torbjorn Granlund <[email protected]>
30680
30681 * longlong.h: Add IA-64 support.
30682
30683 * mpn/powerpc32: Misc cleanups.
30684 * mpn/powerpc32/aix.m4: New file (mainly by Linus).
30685 * mpn/powerpc64/aix.m4: New file (mainly by Linus).
30686 * mpn/powerpc64: Translate `.S' files to `.asm'.
30687
30688 * configure.in: Fix tyops.
30689 * configure: Regenerate.
30690
30691 2000-03-02 Torbjorn Granlund <[email protected]>
30692
30693 * mpn/powerpc32/regmap.m4: New file.
30694 * mpn/powerpc32: Translate `.S' files to `.asm'.
30695 * configure.in: Use mpn/powerpc32/regmap.m4 for powerpc targets
30696 except some weird ones.
30697
30698 2000-03-03 Kevin Ryde <[email protected]>
30699
30700 * mpn/lisp/gmpasm-mode.el: Suppress postscript comment prefixes in
30701 filladapt.
30702
30703 * mpn/x86/pentium/sqr_basecase.asm: New file.
30704 * mpn/x86/pentium/gmp-mparam.h (KARATSUBA_SQR_THRESHOLD): Update.
30705
30706 * configure.in: Add --enable-assert, enable k6 logops functions.
30707
30708 * mpn/x86/k6/mmx/copyi.asm: Use m4 for divide, not as.
30709 * mpn/x86/k6/mmx/copyd.asm: Ditto.
30710 * mpn/x86/README.family: Add a note on this.
30711
30712 2000-03-02 Kevin Ryde <[email protected]>
30713
30714 * mpn/x86/k6/aors_n.asm: Don't use stosl.
30715 * mpn/x86/copyi.asm: Use cld to clear direction flag.
30716 * mpn/x86/divrem_1.asm: Ditto.
30717 * mpn/x86/README.family: Add a note on this.
30718
30719 * mpn/x86/k6/mmx/copyi.asm: Rewrite.
30720 * mpn/x86/k6/mmx/copyd.asm: New file.
30721 * mpn/x86/k6/README: Update, and small amendments.
30722
30723 * mpn/x86/x86-defs.m4 (Zdisp): New macro.
30724 * mpn/asm-defs.m4 (m4_stringequal_p): New macro.
30725
30726 * mpn/x86/p6/aorsmul_1.asm: Use Zdisp to force zero displacements.
30727 * mpn/x86/k6/aorsmul_1.asm: Ditto.
30728 * mpn/x86/k6/mul_1.asm: Ditto.
30729 * mpn/x86/k6/mul_basecase.asm: Ditto.
30730 * mpn/x86/k7/aors_n.asm: Ditto.
30731 * mpn/x86/k7/aorsmul_1.asm: Ditto.
30732 * mpn/x86/k7/mul_1.asm: Ditto.
30733 * mpn/x86/k7/mul_basecase.asm: Ditto.
30734 * mpn/x86/README.family: Add a note on this.
30735
30736 2000-02-27 Kevin Ryde <[email protected]>
30737
30738 * mpn/generic/divrem.c (mpn_divrem_classic): Patch to avoid gcc
30739 2.7.2.3 i386 register handling bug.
30740
30741 * mpn/x86/k6/aors_n.asm: Rewrite.
30742 * mpn/x86/k6/mmx/lshift.asm: Rewrite.
30743 * mpn/x86/k6/mmx/rshift.asm: Rewrite.
30744 * mpn/x86/k6/README: Update.
30745
30746 * mpn/x86/k7/mmx/copyd.asm: Support size==0.
30747 * mpn/x86/k7/mmx/copyi.asm: Ditto.
30748 * mpn/x86/k6/mmx/copyi.asm: Ditto.
30749 * gmp-impl.h: Comment size==0 allowed in MPN_COPY_INCR and
30750 MPN_COPY_DECR.
30751 * configure.in: Enable x86 copyi, copyd; add k6 com_n.
30752
30753 2000-02-25 Torbjorn Granlund <[email protected]>
30754
30755 * demos/pexpr.c (power): Move factorial handing code from `factor'
30756 to `power'.
30757
30758 * demos/factorize.c (factor_using_pollard_rho): Move resetting of `c'
30759 to before checking for a non-zero gcd.
30760
30761 2000-02-25 Kevin Ryde <[email protected]>
30762
30763 * mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro by Linus.
30764 * mpn/x86/k6/aors_n.asm: Use MULFUNC_PROLOGUE.
30765 * mpn/x86/k6/aorsmul_1.asm: Ditto.
30766 * mpn/x86/k7/aors_n.asm: Ditto.
30767 * mpn/x86/k7/aorsmul_1.asm: Ditto.
30768 * mpn/x86/p6/aorsmul_1.asm: Ditto.
30769
30770 * mpn/tests/ref.c (refmpn_copyi,refmpn_copyd): Allow size==0.
30771
30772 * gmp-impl.h: Move mpn_and_n, mpn_andn_n, mpn_com_n, mpn_ior_n,
30773 mpn_iorn_n, mpn_nand_n, mpn_nior_n, mpn_xor_n and mpn_xorn_n here
30774 from gmp.h. Use HAVE_NATIVE_mpn_* to make these functions or
30775 inlines.
30776
30777 * gmp-impl.h: Move mpn_copyd, mpn_copyi here from gmp.h.
30778 * gmp-impl.h (MPN_COPY_INCR): Use mpn_copyi if available.
30779 * gmp-impl.h (MPN_COPY_DECR): Use mpn_copyd if available.
30780
30781 * mpn/x86/k6/mmx/com_n.asm: Moved into mmx subdirectory.
30782 * mpn/x86/k6/mmx/copyi.asm: Ditto.
30783 * mpn/x86/k6/mmx/lshift.asm: Ditto.
30784 * mpn/x86/k6/mmx/rshift.asm: Ditto.
30785 * mpn/x86/k7/mmx/rshift.asm: Ditto.
30786 * mpn/x86/k6/mmx/logops_n.asm: New file.
30787 * configure.in (k6*-*-*): Add logops_n.asm.
30788 * mpn/x86/k6/README: Update.
30789
30790 * mpn/x86/k7/mmx/copyi.asm: New file.
30791 * mpn/x86/k7/mmx/copyd.asm: New file.
30792 * mpn/x86/k7/README: Update.
30793
30794 2000-02-24 Kevin Ryde <[email protected]>
30795
30796 * mpn/x86/x86-defs.m4 (femms): Generate emms if 3dnow not available.
30797 * mpn/x86/x86-defs.m4 (FRAME_popl): New macro.
30798
30799 * Makefile.am: Add info_TEXINFOS = gmp.texi
30800
30801 * mpn/x86/divrem_1.asm: Moved from mpn/x86/k6, allow size==0,
30802 conditionalize loop versus decl/jnz.
30803 * mpn/x86/mod_1.asm: Ditto.
30804 * mpn/x86/divmod_1.asm: Removed.
30805 * gmp.texi (mpn_divrem_1,mpn_mod_1): Add that size==0 is allowed.
30806 * mpn/tests/ref.c (refmpn_divrem_1c,etc): Allow size==0.
30807
30808 * mpn/x86/k6/aors_n.asm: Avoid gas 1.92.3 leal displacement
30809 expression problem.
30810 * mpn/x86/k6/aorsmul_1.asm: Ditto.
30811 * mpn/x86/k6/mul_1.asm: Ditto.
30812 * mpn/x86/k6/mul_basecase.asm: Ditto
30813 * mpn/x86/k7/aors_n.asm: Ditto.
30814 * mpn/x86/k7/aorsmul_1.asm: Ditto.
30815 * mpn/x86/k7/mul_1.asm: Ditto.
30816 * mpn/x86/k7/mul_basecase.asm: Ditto.
30817 * mpn/x86/k7/rshift.asm: Ditto.
30818 * mpn/x86/p6/aorsmul_1.asm: Ditto.
30819 * mpn/x86/README.family: Describe problem.
30820
30821 2000-02-24 Linus Nordberg <[email protected]>
30822
30823 * acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Add dummy symbol to
30824 testcase to avoid nm failure. Try nm before piping to grep.
30825
30826 * acconfig.h: Undef HAVE_NATIVE_func for every mpn function found
30827 in gmp.h.
30828
30829 * configure.in: Invoke AC_CONFIG_HEADERS.
30830 Don't invoke AM_CONFIG_HEADER; it makes autoconf confused.
30831 Dig out entry points declared in assembly code and AC_DEFINE proper
30832 HAVE_NATIVE_func.
30833
30834 * mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro.
30835
30836 * mpn/x86/p6/aorsmul_1.asm: Use MULFUNC_PROLOGUE.
30837 * mpn/x86/k6/aors_n.asm: Likewise.
30838
30839 * Makefile.am (EXTRA_DIST): Add config.in; needed when we don't
30840 use AM_CONFIG_HEADER in configure.in.
30841
30842 * mpn/Makefile.am (INCLUDES): Add `-I..' for config.h and
30843 gmp-mparam.h.
30844 * mpf/Makefile.am: Likewise.
30845 * mpq/Makefile.am: Likewise.
30846 * mpz/Makefile.am: Likewise.
30847
30848 * mpf/tests/Makefile.am (INCLUDES): Add `-I../..' for config.h and
30849 gmp-mparam.h.
30850 * mpq/tests/Makefile.am: Likewise.
30851 * mpz/tests/Makefile.am: Likewise.
30852
30853 * configure: Regenerate.
30854 * aclocal.m4: Regenerate.
30855 * config.in: Regenerate.
30856 * Makefile.in: Regenerate.
30857 * mpf/Makefile.in: Regenerate.
30858 * mpn/Makefile.in: Regenerate.
30859 * mpq/Makefile.in: Regenerate.
30860 * mpz/Makefile.in: Regenerate.
30861 * mpf/tests/Makefile.in: Regenerate.
30862 * mpq/tests/Makefile.in: Regenerate.
30863 * mpz/tests/Makefile.in: Regenerate.
30864
30865 2000-02-23 Kevin Ryde <[email protected]>
30866
30867 * mpn/x86/addmul_1.S: Amend comments, this code no longer used by
30868 PentiumPro.
30869 * mpn/x86/submul_1.S: Ditto.
30870
30871 * mpn/x86/k6/com_n.asm: Rewrite, smaller but same speed.
30872
30873 * mpn/x86/addmul_1.S: Add PROLOGUE and EPILOGUE to get .type and
30874 .size for ELF. Rename #define size to n to avoid .size.
30875 * mpn/x86/lshift.S: Ditto.
30876 * mpn/x86/mul_1.S: Ditto.
30877 * mpn/x86/mul_basecase.S: Ditto.
30878 * mpn/x86/rshift.S: Ditto.
30879 * mpn/x86/submul_1.S: Ditto.
30880 * mpn/x86/udiv.S: Ditto.
30881 * mpn/x86/umul.S: Ditto.
30882 * mpn/x86/pentium/add_n.S: Ditto.
30883 * mpn/x86/pentium/addmul_1.S: Ditto.
30884 * mpn/x86/pentium/lshift.S: Ditto.
30885 * mpn/x86/pentium/mul_1.S: Ditto.
30886 * mpn/x86/pentium/mul_basecase.S: Ditto.
30887 * mpn/x86/pentium/rshift.S: Ditto.
30888 * mpn/x86/pentium/sub_n.S: Ditto.
30889 * mpn/x86/pentium/submul_1.S: Ditto.
30890
30891 2000-02-22 Linus Nordberg <[email protected]>
30892
30893 * acinclude.m4 (GMP_INIT): Use temporary file cnfm4p.tmp for
30894 post-defines.
30895 (GMP_FINISH): Ditto.
30896 (GMP_DEFINE): Add third optional argument specifying location in
30897 outfile.
30898 (GMP_DEFINE_RAW): New macro.
30899 * aclocal.m4: Regenerate.
30900
30901 * configure.in: Add `HAVE_TARGET_CPU_$target_cpu' using
30902 GMP_DEFINE_RAW.
30903 * configure: Regenerate.
30904
30905 * mpz/tests/Makefile.am: New test t-root.
30906 * mpz/tests/Makefile.in: Regenerate.
30907
30908 2000-02-22 Torbjorn Granlund <[email protected]>
30909
30910 * mpz/root.c: Complete rewrite; still primitive, but at least correct.
30911 * mpz/tests/t-root.c: New test.
30912
30913 2000-02-22 Kevin Ryde <[email protected]>
30914
30915 * mpn/x86/k7/mul_basecase.asm: New file.
30916 * mpn/x86/k7/README: Add mpn_mul_basecase speed.
30917 * mpn/x86/k7/gmp-mparam.h: New file.
30918
30919 * mpn/x86/x86-defs.m4 (loop_or_decljnz,cmov_bytes): New macros.
30920 * mpn/asm-defs.m4 (m4_ifdef_anyof_p): New macro.
30921
30922 * mpn/x86/k6/aorsmul_1.asm: New file.
30923 * mpn/x86/k6/addmul_1.S: Removed (was a copy of pentium version).
30924 * mpn/x86/k6/submul_1.S: Removed (was a copy of pentium version).
30925
30926 * mpn/x86/p6/aorsmul_1.asm: Use OPERATION_addmul_1 and
30927 OPERATION_submul_1.
30928 * mpn/x86/k6/aors_n.asm: Use OPERATION_add_n and OPERATION_sub_n.
30929 * configure.in: Declare multi-function files for k6 and p6.
30930
30931 * configure.in: Add HAVE_TARGET_CPU_$target_cpu for config.m4.
30932 * mpn/asm-defs.m4 (define_not_for_expansion): New macro.
30933
30934 * mpn/generic/divrem_1n.c (__gmpn_divrem_1n): New file, split from
30935 mpn/generic/divrem_1.c.
30936 * mpn/generic/divrem_1.c: Ditto.
30937 * configure.in (gmp_mpn_functions): Ditto.
30938
30939 2000-02-21 Torbjorn Granlund <[email protected]>
30940
30941 * gmp.h: Undo 1996-10-06 NeXT change, it was clearly improperly
30942 written.
30943
30944 2000-02-21 Linus Nordberg <[email protected]>
30945
30946 * configure.in: Link <src>/mpn/asm-defs.m4 to <build>mpn/asm.m4.
30947 * configure: Regenerate.
30948
30949 2000-02-21 Linus Nordberg <[email protected]>
30950
30951 * mpn/x86/k7/aorsmul_1.asm: Change OPERATION_ADDMUL -->
30952 OPERATION_addmul_1. Change OPERATION_SUBMUL -->
30953 OPERATION_submul_1.
30954
30955 * mpn/x86/k7/aors_n.asm: Change OPERATION_ADD --> OPERATION_add_n.
30956 Change OPERATION_SUB --> OPERATION_sub_n.
30957
30958 * mpn/Makefile.am: Pass -DOPERATION_$* to preprocessors.
30959 * mpn/Makefile.in: Regenerate.
30960
30961 * configure.in: Symlink mpn/asm-defs.m4 to build-dir/mpn. Link
30962 multi-function files to mpn/<function>.asm and remove function
30963 name from `gmp_mpn_functions'.
30964 * configure: Regenerate.
30965
30966 * acinclude.m4 (GMP_FINISH): Tell user what we're doing.
30967 * aclocal.m4: Regenerate.
30968
30969 2000-02-21 Kevin Ryde <[email protected]>
30970
30971 * gmp-impl.h: Rename __gmpn_mul_basecase to mpn_mul_basecase and
30972 __gmpn_sqr_basecase to mpn_sqr_basecase, remove __gmpn prototypes.
30973 * mpn/x86/mul_basecase.S: Ditto.
30974 * mpn/x86/pentium/mul_basecase.S: Ditto.
30975
30976 * configure.in (gmp_m4postinc): Use x86-defs.m4 on athlon-*-* too.
30977
30978 2000-02-20 Kevin Ryde <[email protected]>
30979
30980 * acinclude.m4 (GSYM_PREFIX): Drop $1, change by Linus.
30981 * mpn/asm-defs.m4 (PROLOGUE,EPILOGUE): Use GSYM_PREFIX as a
30982 string, change by Linus.
30983 * mpn/x86/x86-defs.m4: Use GSYM_PREFIX as a string.
30984
30985 * mpn/x86/k6/gmp-mparam.h: New file.
30986 * mpn/asm-defs.m4 (m4_warning): New macro.
30987
30988 * mpn/x86/README: Amendments per new code and directories.
30989 * mpn/x86/README.family: New file.
30990 * mpn/x86/k6/README: New file.
30991 * mpn/x86/k7/README: New file.
30992
30993 * mpn/generic/mul_n.c: Rename __gmpn_mul_basecase to
30994 mpn_mul_basecase and __gmpn_sqr_basecase to mpn_sqr_basecase.
30995 * mpn/generic/mul_basecase.c: Ditto.
30996 * mpn/generic/sqr_basecase.c: Ditto.
30997 * mpn/generic/mul.c: Ditto.
30998
30999 2000-02-19 Linus Nordberg <[email protected]>
31000
31001 * configure.in: Don't try to symlink more than one multi-func
31002 file.
31003 * configure: Regenerate.
31004
31005 2000-02-18 Linus Nordberg <[email protected]>
31006
31007 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): GMP_DEFINE
31008 `GSYM_PREFIX'. Run ACTIONs even when value is found in cache.
31009 (GMP_CHECK_ASM_ALIGN_LOG): GMP_DEFINE `ALIGN'. Run ACTIONs even
31010 when value is found in cache.
31011 * aclocal.m4: Regenerate.
31012
31013 * configure.in: Don't define GSYM_PREFIX or ALIGN.
31014 Add mechanism for multi-function files.
31015 * configure: Regenerate.
31016
31017 2000-02-18 Kevin Ryde <[email protected]>
31018
31019 * configure.in (gmp_m4postinc): Enable x86-defs.m4.
31020 * mpn/x86/k7/mul_1.asm: Fix include.
31021 * mpn/x86/k6/mul_basecase.S: Removed (copy of the pentium version).
31022 * mpn/x86/k6/mul_basecase.asm: New file.
31023 * mpn/x86/k6/sqr_basecase.asm: New file.
31024 * mpn/x86/k6/com_n.asm: New file.
31025 * mpn/x86/k6/copyi.asm: New file.
31026 * gmp.texi (Low-level Functions): Clarify mpn overlaps permitted.
31027 * gmp-impl.h (MPN_OVERLAP_P): New macro.
31028 * gmp-impl.h (assert_nocarry): New macro.
31029 * mpn/tests/ref.c: New file, based in part on other mpn/tests/*.c.
31030 * mpn/tests/ref.h: New file.
31031
31032 2000-02-17 Linus Nordberg <[email protected]>
31033
31034 * Makefile.am (dist-hook): Don't include any emacs backup files
31035 (*.~*) in dist.
31036 * Makefile.in: Regenerate.
31037
31038 2000-02-17 Torbjorn Granlund <[email protected]>
31039
31040 * mpn/sparc32/v9/mul_1.asm: Use `rd' to get current PC; get rid of
31041 getpc function.
31042 * mpn/sparc32/v9/addmul_1.asm: Likewise.
31043 * mpn/sparc32/v9/submul_1.asm: Likewise.
31044
31045 2000-02-17 Kevin Ryde <[email protected]>
31046
31047 * gmp.h: Add prototypes and defines for mpn_and_n, mpn_andn_n,
31048 mpn_com_n, mpn_copyd, mpn_copyi, mpn_ior_n, mpn_iorn_n,
31049 mpn_mul_basecase, mpn_nand_n, mpn_nior_n, mpn_sqr_basecase,
31050 mpn_xor_n, mpn_xorn_n.
31051
31052 * mpn/asm-defs.m4: Many additions making up initial version.
31053 * mpn/asm-defs.m4 (L): Use defn(`LSYM_PREFIX').
31054 * mpn/x86/x86-defs.m4: New file.
31055 * mpn/x86/k6/aors_n.asm: New file.
31056 * mpn/x86/k6/divmod_1.asm: New file.
31057 * mpn/x86/k6/divrem_1.asm: New file.
31058 * mpn/x86/k6/lshift.S: Removed (was a copy of the pentium version).
31059 * mpn/x86/k6/lshift.asm: New file.
31060 * mpn/x86/k6/mod_1.asm: New file.
31061 * mpn/x86/k6/mul_1.S: Removed (was a copy of the pentium version).
31062 * mpn/x86/k6/mul_1.asm: New file.
31063 * mpn/x86/k6/rshift.S: Removed (was a copy of the pentium version).
31064 * mpn/x86/k6/rshift.asm: New file.
31065 * mpn/x86/k7/aors_n.asm: New file.
31066 * mpn/x86/k7/aorsmul_1.asm: New file.
31067 * mpn/x86/k7/mul_1.asm: New file.
31068 * mpn/x86/k7/rshift.asm: New file.
31069 * mpn/x86/p6/aorsmul_1.asm: New file.
31070 * mpn/x86/copyi.asm: New file.
31071 * mpn/x86/copyd.asm: New file.
31072 * mpn/lisp/gmpasm-mode.el: New file.
31073
31074 2000-02-16 Torbjorn Granlund <[email protected]>
31075
31076 * mpn/sparc32/v9/mul_1.asm: Conditionalize for PIC.
31077 * mpn/sparc32/v9/addmul_1.asm: Likewise.
31078 * mpn/sparc32/v9/submul_1.asm: Likewise.
31079 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
31080 * mpn/sparc32/udiv_fp.asm: Likewise.
31081
31082 2000-02-16 Linus Nordberg <[email protected]>
31083
31084 * configure.in: Add mechanism for including target specific
31085 m4-files in config.m4.
31086 * configure: Regenerate.
31087
31088 * acinclude.m4 (GMP_PROG_CCAS): Begin assembly lines (except
31089 labels) with a tab character. HP-UX demands it.
31090 (GMP_CHECK_ASM_SIZE): Ditto.
31091 (GMP_CHECK_ASM_LSYM_PREFIX): Ditto.
31092 (GMP_CHECK_ASM_LABEL_SUFFIX): Set to empty string for HP-UX.
31093 (GMP_CHECK_ASM_GLOBL): Change `.xport' --> `.export'.
31094 * aclocal.m4: Regenerate.
31095
31096 2000-02-16 Linus Nordberg <[email protected]>
31097
31098 * acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Define LSYM_PREFIX as
31099 the prefix only, no argument.
31100 * aclocal.m4: Regenerate.
31101 * configure: Regenerate.
31102
31103 * mpn/asm-defs.m4 (L): No argument to LSYM_PREFIX.
31104
31105 2000-02-15 Linus Nordberg <[email protected]>
31106
31107 * acinclude.m4: Prefix all temporary shell variables with
31108 `gmp_tmp_'.
31109 (GMP_PROG_CC_FIND): Use defaults if no arguments are passed.
31110 Quote use of arguments.
31111 (GMP_PROG_CCAS): New macro.
31112 (GMP_INIT): New macro.
31113 (GMP_FINISH): New macro.
31114 (GMP_INCLUDE): New macro.
31115 (GMP_SINCLUDE): New macro.
31116 (GMP_DEFINE): New macro.
31117 (GMP_CHECK_ASM_LABEL_SUFFIX): New macro.
31118 (GMP_CHECK_ASM_TEXT): New macro.
31119 (GMP_CHECK_ASM_DATA): New macro.
31120 (GMP_CHECK_ASM_GLOBL): New macro.
31121 (GMP_CHECK_ASM_TYPE): New macro.
31122 (GMP_CHECK_ASM_SIZE): New macro.
31123 (GMP_CHECK_ASM_LSYM_PREFIX): New macro.
31124 (GMP_CHECK_ASM_W32): New macro.
31125 * aclocal.m4: Regenerate.
31126
31127 * configure.in: Find m4 and nm for target.
31128 Use new macros to create config.m4.
31129 Prefix all temporary shell variables with `tmp_'.
31130 Pass `-X 64' to nm for 64-bit PPC target with 64-bit compiler.
31131 * configure: Regenerate.
31132
31133 * Makefile.am (dist-hook): *Really* remove all CVS dirs in
31134 dist.
31135 * Makefile.in: Regenerate.
31136
31137 * mpn/Makefile.am: Add target for building .lo and .o from
31138 .asm.
31139 Pass -DPIC to preprocessor (CPP/m4) when building .lo.
31140 Build .o a second time for target .lo, without -DPIC to
31141 preprocessor.
31142 (SUFFIX): Add `.asm'.
31143 (EXTRA_DIST): Add asm-defs.m4.
31144 * mpn/Makefile.in: Regenerate.
31145
31146 * mpf/Makefile.in: Regenerate.
31147 * mpf/tests/Makefile.in: Regenerate.
31148 * mpq/Makefile.in: Regenerate.
31149 * mpq/tests/Makefile.in: Regenerate.
31150 * mpz/Makefile.in: Regenerate.
31151 * mpz/tests/Makefile.in: Regenerate.
31152
31153 2000-02-15 Torbjorn Granlund <[email protected]>
31154
31155 * mpn/sparc32/udiv_fp.asm: Change `RODATA' to `DATA'.
31156 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
31157 * mpn/sparc32/v9/addmul_1.asm: Likewise.
31158 * mpn/sparc32/v9/submul_1.asm: Likewise.
31159 * mpn/sparc32/v9/mul_1.asm: Likewise.
31160
31161 * mpn/sparc32/add_n.asm: Rename `size' -> `n'.
31162 * mpn/sparc32/sub_n.asm: Likewise.
31163
31164 * sparc32: Rename `.s' and `.S' files to `.asm'.
31165 * sparc64: Rename `.s' and `.S' files to `.asm'.
31166
31167 2000-02-11 Torbjorn Granlund <[email protected]>
31168
31169 * config.sub: Adopt to new config.guess sparc naming conventions.
31170
31171 * config.guess (sun4u:SunOS:5.*:*): Change `sparc9' to `sparcv9'.
31172 * config.guess (sun4m:SunOS:5.*:*): Change to sun4[md]:SunOS:5.*:* and
31173 change `sparc8' to `sparcv8'.
31174
31175 * mpn/x86/add_n.S: Use PROLOGUE/EPILOGUE.
31176 * mpn/x86/sub_n.S: Likewise.
31177
31178 * mpn/x86/syntax.h (PROLOGUE): New name for PROLOG.
31179 * mpn/x86/syntax.h (EPILOGUE): New name for EPILOG.
31180
31181 2000-02-11 Linus Nordberg <[email protected]>
31182
31183 * configure.in: Better path for 64-bit sparc without 64-bit cc.
31184 Change sparc8 --> sparcv8.
31185 Change sparc9 --> sparcv9.
31186 * configure: Regenerate.
31187
31188 2000-02-10 Linus Nordberg <[email protected]>
31189
31190 * configure.in: Use Autoconf.
31191 * Makefile.am: New file.
31192
31193 * AUTHORS: New file.
31194 * COPYING: New file.
31195 * acinclude.m4: New file.
31196 * acconfig.h: New file.
31197
31198 * configure: Generate.
31199 * Makefile.in: Generate.
31200 * aclocal.m4: Generate.
31201 * config.in: Generate.
31202
31203 * install.sh: Remove.
31204 * install-sh: New file from Automake.
31205 * missing: New file from Automake.
31206 * ltconfig: New file from Libtool.
31207 * ltmain.sh: New file from Libtool.
31208
31209 * mpf/Makefile.am: New file.
31210 * mpf/Makefile.in: Generate.
31211 * mpf/configure.in: Remove.
31212 * mpf/tests/Makefile.am: New file.
31213 * mpf/tests/Makefile.in: Generate.
31214 * mpf/tests/configure.in: Remove.
31215
31216 * mpn/Makefile.am: New file.
31217 * mpn/Makefile.in: Generate.
31218 * mpn/configure.in: Remove.
31219
31220 * mpq/Makefile.am: New file.
31221 * mpq/Makefile.in: Generate.
31222 * mpq/configure.in: Remove.
31223 * mpq/tests/Makefile.am: New file.
31224 * mpq/tests/Makefile.in: Generate.
31225 * mpq/tests/configure.in: Remove.
31226
31227 * mpz/Makefile.am: New file.
31228 * mpz/Makefile.in: Generate.
31229 * mpz/configure.in: Remove.
31230 * mpz/tests/Makefile.am: New file.
31231 * mpz/tests/Makefile.in: Generate.
31232 * mpz/tests/configure.in: Remove.
31233
31234 2000-02-10 Torbjorn Granlund <[email protected]>
31235
31236 * mpn/x86/add_n.S: Don't use label L0 twice.
31237 * mpn/x86/sub_n.S: Likewise.
31238
31239 2000-01-20 Linus Nordberg <[email protected]>
31240
31241 * demos/pexpr.c: Don't use setup_error_handler() in windoze.
31242
31243 2000-01-19 Torbjorn Granlund <[email protected]>
31244
31245 * demos/pexpr.c (sigaltstack): #define to sigstack for AIX.
31246 (setup_error_handler): Don't write to ss_size and ss_flags
31247 on AIX.
31248
31249 2000-01-11 Torbjorn Granlund <[email protected]>
31250
31251 * mpn/configure.in (hppa2.0*-*-*): Move assignment of
31252 target_makefile_frag to where it belongs.
31253
31254 1999-12-21 Torbjorn Granlund <[email protected]>
31255
31256 * longlong.h (v9 umul_ppmm): New #define.
31257 (v9 udiv_qrnnd): New #define.
31258
31259 1999-12-14 Torbjorn Granlund <[email protected]>
31260
31261 * mpn/generic/divmod_1.c: Use invert_limb.
31262 * mpn/generic/mod_1.c: Use invert_limb.
31263
31264 * gmp-impl.h (invert_limb): Put definition here.
31265 * mpn/generic/divrem.c (invert_limb): Delete definition.
31266 * mpn/generic/divrem_2.c (invert_limb): Delete definition.
31267
31268 * gmp.h (mpn_divrem): Inhibit for non-gcc.
31269 But declare (undo 1999-11-22 change).
31270
31271 * gmp-impl.h (DItype,UDItype): Do these also if _LONG_LONG_LIMB.
31272
31273 * longlong.h: Move 64-bit hppa code out of __GNUC__ conditional.
31274
31275 * stack-alloc.c (HSIZ): New #define.
31276 (__tmp_alloc): Use HSIZ instead of sizeof(tmp_stack).
31277
31278 1999-12-10 Torbjorn Granlund <[email protected]>
31279
31280 * config.sub: Clean up handling of x86 CPUs: Properly recognize
31281 Amd CPUs as unique entities. Use manufacturer's names of
31282 processors ("pentium", etc); still match ambiguous names like
31283 "i586", "i686", "p6" but be conservative in interpreting them.
31284
31285 * configure.in: Recognize x86 CPU types known by config.guess.
31286 * mpn/configure.in: Likewise. Add x86/mmx path component as
31287 appropriate.
31288 (athlon-*-*): Fix typo.
31289
31290 * config.guess: Update x86 recog code to initially match
31291 more than just i386.
31292 Call K6-2 and K6-III for "k62" and "k63" respectively.
31293
31294 * config.guess: Recognize x86 CPU types.
31295 Update code for FreeBSD, NetBSD, OpenBSD, Linux.
31296
31297 1999-12-08 Torbjorn Granlund <[email protected]>
31298
31299 * mpf/pow_ui.c: Avoid final squaring in loop.
31300
31301 1999-12-07 Torbjorn Granlund <[email protected]>
31302
31303 * gmp-impl.h (udiv_qrnnd_preinv2gen): Prefix local variables with `_'.
31304 (udiv_qrnnd_preinv2norm): Likewise.
31305 From Kevin Ryde:
31306 (HAVE_ALLOCA): #define also if defined (alloca).
31307
31308 1999-12-04 Torbjorn Granlund <[email protected]>
31309
31310 * mpn/tests/add_n.c: Set OPS from CLOCK.
31311 * mpn/tests/sub_n.c: Likewise.
31312 * mpn/tests/mul_1.c: Likewise.
31313 * mpn/tests/addmul_1.c: Likewise.
31314 * mpn/tests/submul_1.c: Likewise.
31315
31316 * mpn/tests/lshift.c: Update from add_n.c.
31317 * mpn/tests/rshift.c: Likewise.
31318
31319 1999-12-03 Torbjorn Granlund <[email protected]>
31320
31321 * mpn/powerpc64/copy.S: New file.
31322
31323 1999-12-02 Torbjorn Granlund <[email protected]>
31324
31325 * mpn/sparc64/copy.s: New file.
31326
31327 * mpn/tests/copy.c: New file.
31328
31329 * mpn/configure.in: Recognize more Amd CPUs; Set special paths for
31330 k7 CPU.
31331
31332 * configure.in: Recognize Amd x86 CPUs.
31333
31334 * mpz/fdiv_r_2exp.c: In rounding code, read in->_mp_size before
31335 writing to res->_mp_size.
31336
31337 * mpn/powerpc64/*.S: Clean up assembly syntax, add function headers.
31338 * mpn/powerpc64/gmp-mparam.h: (KARATSUBA_MUL_THRESHOLD): #define.
31339 (KARATSUBA_SQR_THRESHOLD): #define.
31340
31341 * mpn/tests/add_n.c (main): Only print test number if TIMES==1
31342 and not printing.
31343 (main): Don't run reference code if NOCHECK.
31344 * mpn/tests/sub_n.c: Likewise.
31345 * mpn/tests/mul_1.c: Likewise.
31346 * mpn/tests/addmul_1.c: Likewise.
31347 * mpn/tests/submul_1.c: Likewise.
31348
31349 * mpn/tests/lshift.c: (main): Only print test number if TIMES==1
31350 and not printing.
31351 * mpn/tests/rshift.c: Likewise.
31352
31353 1999-11-22 Torbjorn Granlund <[email protected]>
31354
31355 * gmp.h (mpz_init_set_str): Declare using __gmp_const.
31356 (mpz_set_str): Likewise.
31357 (mpf_init_set_str): Likewise.
31358 (mpf_set_str): Likewise.
31359 (mpn_set_str): Likewise.
31360 (__gmp_0): Likewise.
31361 (mpn_divrem): Remove separate declaration; it's defined later in
31362 this file.
31363
31364 * gmp.h: Replace "defined (__STD__)' by (__STDC__-0) in
31365 expressions involving more than one term, to handle Sun's compiler
31366 that most helpfully sets __STDC__ to 0.
31367 * gmp-impl.h: Likewise.
31368 * longlong.h: Likewise.
31369
31370 1999-11-21 Torbjorn Granlund <[email protected]>
31371
31372 * mpn/sparc64/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
31373 (KARATSUBA_SQR_THRESHOLD): #define.
31374
31375 * mpn/sparc64/lshift.s: Compensate stack references for odd stack ptr.
31376 * mpn/sparc64/rshift.s: Likewise.
31377
31378 * mpn/sparc64/addmul_1.s: Propagate carry properly.
31379 * mpn/sparc64/submul_1.s: Likewise.
31380
31381 * mpn/sparc64/sub_n.s: Rewrite.
31382
31383 * mpn/sparc64/sub_n.s: Get operand order for main subcc right
31384 (before scrapping this code for new code).
31385
31386 1999-11-20 Torbjorn Granlund <[email protected]>
31387
31388 * mpn/sparc64/add_n.s: Rewrite.
31389
31390 1999-11-17 Torbjorn Granlund <[email protected]>
31391
31392 * mpn/x86/syntax.h (PROLOG): New #define.
31393 (EPILOG): New #define.
31394
31395 * gmp.h (mpn_addsub_n): Declare.
31396 * gmp.h (mpn_add_nc): Declare.
31397 * gmp.h (mpn_sub_nc): Declare.
31398 * mpn/powerpc64/addsub_n.S: New file.
31399
31400 1999-11-17 Torbjorn Granlund <[email protected]>
31401
31402 * mpn/alpha/gmp-mparam.h
31403 (KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
31404 (KARATSUBA_SQR_THRESHOLD): Likewise.
31405
31406 1999-11-14 Torbjorn Granlund <[email protected]>
31407
31408 * mpn/x86/mul_1.S: Unroll and optimize for P6 and K7.
31409
31410 1999-11-09 Torbjorn Granlund <[email protected]>
31411
31412 * mpn/x86/p6/gmp-mparam.h
31413 (KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
31414 (KARATSUBA_SQR_THRESHOLD): Likewise.
31415
31416 1999-11-05 Torbjorn Granlund <[email protected]>
31417
31418 * mpn/generic/addsub_n.c: New file.
31419
31420 1999-11-02 Torbjorn Granlund <[email protected]>
31421
31422 * config.guess: Handle alpha:FreeBSD with alpha:NetBSD.
31423
31424 * configure.in (vax*-*-*): New case.
31425 * config/mt-vax: New file.
31426 * mpn/vax/add_n.s: Rewrite.
31427 * mpn/vax/sub_n.s: Rewrite.
31428
31429 1999-10-31 Torbjorn Granlund <[email protected]>
31430
31431 * mpn/vax/rshift.s: New file.
31432 * mpn/vax/lshift.s: New file.
31433
31434 1999-10-29 Torbjorn Granlund <[email protected]>
31435
31436 * config.sub: Handle k5 and k6.
31437 * mpn/configure.in: Recognize k6.
31438
31439 * mpf/tests/t-get_d.c (LOW_BOUND, HIGH_BOUND): New #defines.
31440 (main): Tighten error bounds to 14 digits.
31441
31442 * longlong.h (default umul_ppmm, when smul_ppmm exists):
31443 Rename __m0 => __xm0, __m1 => __xm1.
31444 (default smul_ppmm): Likewise.
31445
31446 1999-10-11 Torbjorn Granlund <[email protected]>
31447
31448 * config.guess: Reverse the test for POWER vs PowerPC.
31449 * config.guess (sun4m:SunOS:5.*:*): New case.
31450 * config.guess (sun4u:SunOS:5.*:*): New case.
31451
31452 1999-09-29 Torbjorn Granlund <[email protected]>
31453
31454 * mpn/generic/divrem_2.c: Clean up comments.
31455
31456 1999-09-23 Torbjorn Granlund <[email protected]>
31457
31458 * mpz/tests/Makefile.in: Use move-if-change when generating binaries.
31459 * mpf/tests/Makefile.in: Likewise.
31460 * mpq/tests/Makefile.in: Likewise.
31461 * mpz/tests/move-if-change: New file.
31462 * mpf/tests/move-if-change: New file.
31463 * mpq/tests/move-if-change: New file.
31464
31465 * gmp.h (mpn_incr_u): New macro (from mpn/generic/mul_n.c).
31466 (mpn_decr_u): New macro.
31467
31468 * mpn/generic/mul_n.c (mpn_incr): Delete.
31469 * mpn/generic/mul_n.c: Update usages mpn_incr => mpn_incr_u.
31470 * mpn/generic/divrem_newt.c: Use mpn_incr_u and mpn_decr_u instead of
31471 mpn_add_1 and mpn_sub_1.
31472 * mpn/generic/sqrtrem.c: Likewise.
31473 * mpz/cdiv_q_ui.c: Likewise.
31474 * mpz/cdiv_qr_ui.c: Likewise.
31475 * mpz/fdiv_q_ui.c: Likewise.
31476 * mpz/fdiv_qr_ui.c: Likewise.
31477
31478 * mpn/generic/sqrtrem.c: Start single-limb Newton iteration from 18
31479 bits.
31480
31481 1999-07-27 Torbjorn Granlund <[email protected]>
31482
31483 * mpn/generic/divrem_1.c (__gmpn_divrem_1n): New function.
31484
31485 * mpn/generic/divrem_2.c: New file, code from divrem.c, `case 2:'.
31486 * mpn/Makefile.in: Compile divrem_2.c.
31487 * make.bat: Compile divrem_2.c.
31488 * mpn/configure.in (functions): Add divrem_2.
31489 * gmp.h: Declare mpn_divrem_2.
31490
31491 * mpn/generic/divrem.c: Delete special cases, handle just divisors
31492 of more than 2 limbs.
31493 * gmp.h (mpn_divrem): Call mpn_divrem_1, mpn_divrem_2, as appropriate.
31494
31495 * mpn/generic/divrem.c: Rework variable usage for better register
31496 allocation.
31497
31498 1999-07-26 Torbjorn Granlund <[email protected]>
31499
31500 * mpn/alpha/ev5/add_n.s: Rewrite for better ev6 speed.
31501 * mpn/alpha/ev5/sub_n.s: Likewise.
31502
31503 1999-07-21 Torbjorn Granlund <[email protected]>
31504
31505 * longlong.h (alpha): Define umul_ppmm for cc.
31506
31507 * gmp-impl.h (DItype, UDItype): Define for non-gcc if _LONGLONG is
31508 defined.
31509
31510 1999-07-15 Torbjorn Granlund <[email protected]>
31511
31512 * longlong.h (powerpc64 count_leading_zeros): Fix typo.
31513 (powerpc64 add_ssaaaa): Fix typos.
31514 (powerpc64 sub_ddmmss): Fix typos.
31515
31516 1999-07-14 Torbjorn Granlund <[email protected]>
31517
31518 * mpz/tests/Makefile.in: Pass XCFLAGS when linking.
31519 * mpf/tests/Makefile.in: Likewise.
31520 * mpq/tests/Makefile.in: Likewise.
31521 * mpn/Makefile.in (.S.o): Pass XCFLAGS.
31522
31523 * longlong.h: Add support for 64-bit PowerPC.
31524 * config.sub: Handle "powerpc64".
31525 * configure.in: Likewise.
31526 * mpn/configure.in: Suppress use of config/t-ppc-aix for now,
31527 it seems compiler passes proper options.
31528 * mpn/powerpc64/*.S: New files.
31529
31530 * Makefile.in (FLAGS_TO_PASS): Pass "AR=$(AR)".
31531
31532 1999-07-07 Torbjorn Granlund <[email protected]>
31533
31534 * demos/pexpr.c (factor): Change alloca call to a malloc/free pair.
31535
31536 * mpn/powerpc32/syntax.h: Add #define's for crN.
31537
31538 * gmp.h (gmp_rand_algorithm): Remove spurious `,'.
31539
31540 1999-07-05 Torbjorn Granlund <[email protected]>
31541
31542 * mpn/generic/divrem_1.c: Normalize divisor when needed.
31543
31544 1999-07-02 Torbjorn Granlund <[email protected]>
31545
31546 * mpn/configure.in (powerpc*-apple-mach): New configuration.
31547 * mpn/powerpc32/*: Add support for apple-macho syntax.
31548 * mpn/powerpc32/syntax.h: New file.
31549 * gmp-impl.h: Don't use `__attribute__' syntax for Apple's perversion
31550 of GCC.
31551
31552 1999-05-26 Linus Nordberg <[email protected]>
31553
31554 * rand.c (gmp_rand_init): Fix typo.
31555
31556 * mpn/generic/rawrandom.c (mpn_rawrandom): Count bits, not limbs,
31557 to keep track of how many rounds to do in loop. Clean up
31558 temporary allocation. Update `seedsize' inside loop. Mask off
31559 the correct number of bits from final result. Init `mcopyp' even
31560 when not normalizing `m'.
31561
31562 * randlc.c (gmp_rand_init_lc): Fix typo (don't call
31563 mpz_init_set_ui()).
31564
31565 * mpn/generic/rawrandom.c (mpn_rawrandom): Set SIZ(s->seed) when
31566 reallocating.
31567
31568 * tests/rand/Makefile (test, bigtest): Add 33-bit tests.
31569
31570 * tests/rand/gen.c (main): Set precision of variable passed to
31571 mpf_urandomb(). Add option `-p'.
31572
31573 1999-05-25 Linus Nordberg <[email protected]>
31574
31575 * randcm.c: Remove.
31576 * randcmui.c: Remove.
31577 * Makefile.in: Remove randcm and randcmui.
31578 * make.bat: Ditto.
31579 * gmp-impl.h: Remove prototypes for __gmp_rand_init_common() and
31580 __gmp_rand_init_common_ui().
31581 * randlc.c (gmp_rand_init_lc): Don't call
31582 __gmp_rand_init_common().
31583
31584 * randlcui.c (gmp_rand_init_lc_ui): Don't call
31585 __gmp_rand_init_common_ui().
31586
31587 * gmp.h (__gmp_rand_state_struct): Remove unused member `maxval'.
31588 * randclr.c (gmp_rand_clear): Remove reference to s->maxval.
31589 * randcm.c (__gmp_rand_init_common): Ditto
31590
31591 * mpn/generic/rawrandom.c (mpn_rawrandom): Don't calculate nlimbs
31592 twice.
31593
31594 * gmp.h (__gmp_rand_dist): Remove.
31595
31596 1999-05-24 Linus Nordberg <[email protected]>
31597
31598 * mpn/generic/rawrandom.c: Clean up comments.
31599
31600 * gmp.texi: Add documentation for random number generation.
31601
31602 1999-05-21 Linus Nordberg <[email protected]>
31603
31604 * gmp.h: Typedef `gmp_rand_state' as an array with one element.
31605 Change prototypes accordingly.
31606 * gmp-impl.h: Change prototypes using `gmp_rand_state'.
31607 * rand.c (gmp_rand_init): Take `gmp_rand_state' as argument
31608 instead of a pointer to a `gmp_rand_state'.
31609 * mpf/urandom.c (mpf_urandomb): Ditto.
31610 * mpz/urandom.c (mpz_urandomb): Ditto.
31611 * mpn/generic/rawrandom.c (mpn_rawrandom): Ditto.
31612 * randcmui.c (__gmp_rand_init_common_ui): Ditto.
31613 * randlc.c (gmp_rand_init_lc): Ditto.
31614 * randlcui.c (gmp_rand_init_lc_ui): Ditto.
31615 * randui.c (gmp_rand_init_ui): Ditto.
31616 * randcm.c (__gmp_rand_init_common): Ditto.
31617 * randclr.c (gmp_rand_clear): Ditto.
31618
31619 * tests/rand/gen.c (main): Pass `s' to rand-funcs instead of address
31620 of `s'.
31621
31622 1999-05-20 Linus Nordberg <[email protected]>
31623
31624 * Makefile.in: Rename randi.c --> rand.c, randi_lc.c --> randlc.c,
31625 randicom.c --> randcm.c. Add randui.c, randcmui.c, randlcui.c.
31626 * make.bat: Ditto.
31627
31628 * gmp.h: Add prototypes for gmp_rand_init_ui() and
31629 gmp_rand_init_lc_ui().
31630 * gmp-impl.h: Add prototypes for __gmp_rand_init_common() and
31631 __gmp_rand_init_common_ui().
31632
31633 * randlc.c, randcm.c, randclr.c, rand.c: Change #include of
31634 <gmp.h> to "gmp.h".
31635 * randclr.c: Include stdlib.h for free().
31636 * rand.c: Include gmp-impl.h.
31637
31638 1999-05-12 Torbjorn Granlund <[email protected]>
31639
31640 * mpn/configure.in: Put generic m68k alternative last.
31641
31642 1999-05-04 Torbjorn Granlund <[email protected]>
31643
31644 * demos/pexpr.c (setup_error_handler): Use sigemptyset to create
31645 empty set (for portability).
31646 (fns): Fix typo '#if #if'.
31647 (mpz_eval_expr): Implement FERMAT and MERSENNE.
31648
31649 * demos/pexpr.c: Cast longjmp argument via long to silent warnings on
31650 64-bit hosts.
31651
31652 1999-05-03 Torbjorn Granlund <[email protected]>
31653
31654 * demos/pexpr.c: Add #defines for GMP 1.x and 2.0 compatibility.
31655
31656 * demos/pexpr.c (setup_error_handler): New function; take signal
31657 handler setup code from main(), with major modifications to use modern
31658 signal interface.
31659 (main): Remove signal handler setup code; call setup_error_handler.
31660
31661 1999-04-29 Linus Nordberg <[email protected]>
31662
31663 * tests/rand/findcl.c (main): Add option '-i' for interval factor.
31664 Separate v and merit lose figures. Add '-v' for version.
31665
31666 1999-04-28 Linus Nordberg <[email protected]>
31667
31668 * tests/rand/statlib.c: Change debugging stuff.
31669
31670 * tests/rand/gmpstat.h: Add debug values definitions.
31671
31672 * tests/rand/findcl.c (main): Print low and high merit on startup.
31673 Print version string on startup. Catch SEGV and HUP. Add option -d
31674 for debug. Fix bug making test for v too hard.
31675 (sh_status): New function.
31676 (sh_status): Flush stdout. Add RCSID.
31677
31678 1999-04-27 Linus Nordberg <[email protected]>
31679
31680 * tests/rand/Makefile (clean): Add target.
31681
31682 1999-04-27 Linus Nordberg <[email protected]>
31683
31684 * tests/rand/stat.c: Include gmpstat.h.
31685 Add global int g_debug.
31686
31687 * tests/rand/spect.c: Include <unistd.h>.
31688
31689 * tests/rand/findcl.c (main): Input is `m', not all factors of `m'.
31690 Print only the very first matching multiplier. Include <unistd.h>.
31691 Flush stdout. Print "done." when done.
31692
31693 * tests/rand/spect.c: Move everything but main() to statlib.c.
31694
31695 * tests/rand/findcl.c: New file.
31696
31697 * tests/rand/gmpstat.h: New file.
31698
31699 * tests/rand/statlib.c (merit, merit_u, f_floor, vz_dot,
31700 spectral_test): New functions.
31701
31702 1999-04-27 Torbjorn Granlund <[email protected]>
31703
31704 * mpn/configure.in: Fix typo, "sparc-*)" was "sparc)".
31705
31706 1999-04-21 Torbjorn Granlund <[email protected]>
31707
31708 * config.sub: Recognize ev6.
31709
31710 1999-04-12 Linus Nordberg <[email protected]>
31711
31712 * urandom.c: Split up into randclr.c, randi.c, randi_lc.c,
31713 randicom.c.
31714 * randclr.c, randi.c, randi_lc.c, randicom.c: New files.
31715 * Makefile.in: Remove urandom. Add randclr, randi, randi_lc,
31716 randicom.
31717 * make.bat: Ditto
31718
31719 1999-03-31 Torbjorn Granlund <[email protected]>
31720
31721 * configure.in (sparc9-*-solaris2.[789]*, etc): New alternative.
31722 * mpn/configure.in: Use mt-sprc9 also for ultrasparc*-*-solaris2*.
31723
31724 1999-03-30 Linus Nordberg <[email protected]>
31725
31726 * urandom.c (__gmp_rand_scheme): Change NULL->0.
31727 Include "gmp.h" instead of <gmp.h>.
31728
31729 1999-03-29 Linus Nordberg <[email protected]>
31730
31731 * gmp.h (__gmp_rand_data_lc): Now holds a, c, m instead of scheme
31732 struct.
31733 (__gmp_rand_lc_scheme_struct): Remove mpz_t's `a' and `m'.
31734
31735 * tests/rand/stat.c (f_freq): Don't print 2nd level results if doing
31736 1st level.
31737
31738 * tests/rand/gen.c (main): Set default algorithm to mpz_urandomb.
31739 (main): Add option -c.
31740
31741 1999-03-24 Linus Nordberg <[email protected]>
31742
31743 * tests/rand/Makefile (GMPINC): Rename to GMPH.
31744 (GMPH): Add gmp-mparam.h.
31745 (CFLAGS): Add -I$(GMPLIBDIR)/mpn
31746
31747 1999-03-23 Linus Nordberg <[email protected]>
31748
31749 * Makefile.in: Compile top-dir/urandom.c.
31750 * make.bat: Ditto.
31751
31752 * mpn/Makefile.in: Compile rawrandom.c.
31753 * make.bat: Ditto.
31754
31755 * mpn/configure.in (functions): Add rawrandom.
31756
31757 * gmp.h (__gmp_rand_scheme_struct): Rename to
31758 __gmp_rand_lc_scheme_struct.
31759 (__gmp_rand_data_lc): Remove member 'n'. Allocate a
31760 __gmp_rand_lc_scheme_struct instead of a pointer to one.
31761 Add prototype for gmp_rand_init_lc(), mpn_rawrandom().
31762 New prototype for mpz_urandomb().
31763
31764 * urandom.c: New file.
31765 (__gmp_rand_init_common): New function.
31766 (gmp_rand_init_lc): New function.
31767 (gmp_rand_init): Don't init data_lc->n. Call gmp_rand_init_lc()
31768 and __gmp_rand_init_common().
31769 (gmp_rand_clear): Remove reference to data_lc->n.
31770
31771 * mpz/urandom.c (gmp_rand_init, gmp_rand_clear): Move to new file
31772 urandom.c in top-dir.
31773 (mpz_urandomb): Add function parameter nbits. Call mpn_rawrandom().
31774
31775 * mpf/urandom.c (mpf_urandomb): Call mpn_rawrandom().
31776
31777 * mpn/generic/rawrandom.c: New file.
31778 (mpn_rawrandom): New function.
31779
31780 1999-03-17 Torbjorn Granlund <[email protected]>
31781
31782 * extract-dbl.c: When packing result, adjust exp when sc == 0.
31783
31784 * mpf/tests/t-get_d.c: New file.
31785 * mpf/tests/Makefile.in: Compile t-get_d.c.
31786
31787 1999-03-16 Linus Nordberg <[email protected]>
31788
31789 * mpz/urandom.c (__gmp_rand_scheme): Add extra braces around the
31790 mpz_t members.
31791
31792 * make.bat: Compile mpz/urandom.c and mpf/urandom.c
31793
31794 * tests/rand/statlib.c (ks_table): Use mpf_pow_ui() and exp().
31795
31796 * tests/rand/gen.c: Include unistd.h for getopt.
31797
31798 1999-03-15 Linus Nordberg <[email protected]>
31799
31800 * mpz/urandom.c (gmp_rand_init): New function.
31801 (gmp_rand_clear): New function.
31802 (mpz_urandomb): New function.
31803
31804 * mpz/Makefile.in: Compile urandom.c
31805
31806 * mpf/urandom.c (mpf_urandomb): New function.
31807
31808 * mpf/Makefile.in: Compile urandom.c.
31809
31810 * gmp.h (__gmp_rand_state_struct, __gmp_rand_scheme_struct): New
31811 structs for randomization functions.
31812 (gmp_rand_dist, gmp_rand_alogrithm): New enums for randomization
31813 functions.
31814 (mpz_urandomb, mpf_urandomb): Add prototype.
31815 (gmp_rand_init, gmp_rand_clear): Add prototype.
31816
31817 * tests/rand/gen.c, stat.c, statlib.c, statlib.h: New files.
31818 * tests/rand/Makefile, tests/rand/ChangeLog: New files.
31819
31820 1999-03-15 Torbjorn Granlund <[email protected]>
31821
31822 * .gdbinit: New file.
31823
31824 * mpz/dump.c: New file.
31825 * mpz/Makefile.in: Compile dump.c.
31826 * make.bat: Likewise.
31827 * gmp.h (mpz_dump): Declare.
31828
31829 1999-03-14 Torbjorn Granlund <[email protected]>
31830
31831 * mpz/tests/reuse.c: Also test mpz_invert and mpz_divexact.
31832
31833 * mpz/tests/convert.c: Update to GMP 2 variable syntax.
31834
31835 1999-03-13 Torbjorn Granlund <[email protected]>
31836
31837 * mpf/README: New file.
31838 * mpz/README: New file.
31839
31840 * mpf/pow_ui.c: New file.
31841 * mpf/Makefile.in: Compile pow_ui.c.
31842 * make.bat: Likewise.
31843 * gmp.h (mpf_pow_ui): Declare.
31844
31845 1999-03-12 Torbjorn Granlund <[email protected]>
31846
31847 * mpn/configure.in: Stage 1 of rewrite.
31848 * mpn/underscore.h: New name for bsd.h.
31849 * mpn/sysv.h: Deleted.
31850
31851 * mpn/m68k/*: Don't include sysdep.h.
31852
31853 * mpn/pa64/README: New file.
31854
31855 1999-03-11 Torbjorn Granlund <[email protected]>
31856
31857 * mpn/powerpc32/add_n.S: Add support for both AIX and ELF syntax.
31858 Renamed from `.s'.
31859 * mpn/powerpc32/sub_n.S: Likewise.
31860 * mpn/powerpc32/lshift.S: Likewise.
31861 * mpn/powerpc32/rshift.S: Likewise.
31862 * mpn/powerpc32/mul_1.S: Likewise.
31863 * mpn/powerpc32/addmul_1.S: Likewise.
31864 * mpn/powerpc32/submul_1.S: Likewise.
31865
31866 * mpn/powerpc32/umul.S: New file.
31867 * mpn/sparc32/v8/umul.S: New file.
31868 * mpn/sparc32/umul.S: New file.
31869 * mpn/x86/umul.S: New file.
31870 * mpn/x86/udiv.S: New file.
31871
31872 * mpn/Makefile.in (mul_basecase.o): Delete rule.
31873
31874 1999-02-22 Torbjorn Granlund <[email protected]>
31875
31876 * configure.in (hppa2.0*-*-*): Force use of GCC.
31877
31878 * extract-dbl.c: Handle IEEE denormalized numbrs. Clean up.
31879
31880 1998-12-02 Torbjorn Granlund <[email protected]>
31881
31882 * mpn/Makefile.in (CCAS): New macro.
31883 (.s.o): Use CCAS.
31884 (.S.o): Likewise.
31885
31886 * mpn/Makefile.in (mul_basecase.o): Add dependency.
31887 (sqr_basecase.o): Likewise.
31888 (mod_1.o): Likewise.
31889
31890 * demos/pexpr.c (cputime): Test also __hpux.
31891 (cleanup_and_exit): Check SIGXCPU only #ifdef LIMIT_RESOURCE_USAGE.
31892
31893 * mpz/tests/t-2exp.c: Use urandom, not random.
31894
31895 * mpn/configure.in (arm*-*-*): New alternative.
31896
31897 1998-11-30 Torbjorn Granlund <[email protected]>
31898
31899 * gmp-impl.h (union ieee_double_extract): Special case for
31900 little-endian arm.
31901 (LIMBS): Alias for PTR.
31902
31903 1998-11-26 Torbjorn Granlund <[email protected]>
31904
31905 * longlong.h (m68000 umul_ppmm): Use `muluw', not `mulu'.
31906 (m68k stuff): Clean up; add coldfire support.
31907
31908 1998-11-23 Torbjorn Granlund <[email protected]>
31909
31910 * mpn/mips3/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
31911 (KARATSUBA_SQR_THRESHOLD): #define.
31912
31913 * mpn/sparc32/v9/README: New file.
31914
31915 1998-11-20 Torbjorn Granlund <[email protected]>
31916
31917 * mpn/x86/README: New file.
31918
31919 * mpn/arm/gmp-mparam.h: New file.
31920 * mpn/pa64/gmp-mparam.h: New file.
31921 * mpn/hppa/gmp-mparam.h: New file.
31922 * mpn/x86/pentium/gmp-mparam.h: New file.
31923 * mpn/sparc32/v9/gmp-mparam.h: New file.
31924 * mpn/powerpc32/gmp-mparam.h: New file.
31925 * mpn/x86/p6/gmp-mparam.h: New file.
31926
31927 * mpn/alpha/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
31928 (KARATSUBA_SQR_THRESHOLD): #define.
31929
31930 * mpn/configure.in: Point to x86/p6 when appropriate.
31931
31932 * mpn/power/umul.s: New file.
31933 * mpn/power/sdiv.s: New file.
31934 * mpn/pa64/addmul_1.S: New file.
31935 * mpn/pa64/submul_1.S: New file.
31936 * mpn/pa64/mul_1.S: New file.
31937 * mpn/pa64/udiv_qrnnd.c: New file.
31938 * mpn/pa64/umul_ppmm.S: New file.
31939 * mpn/mips2/umul.s: New file.
31940 * mpn/m68k/mc68020/umul.s: New file.
31941 * mpn/m68k/mc68020/udiv.s: New file.
31942 * mpn/hppa/hppa1_1/umul.s: New file.
31943 * mpn/alpha/umul.s: New file.
31944 * mpn/a29k/udiv.s: New file.
31945 * mpn/a29k/umul.s: New file.
31946
31947 1998-11-17 Torbjorn Granlund <[email protected]>
31948
31949 * mpn/x86/mul_basecase.S: New file for non-pentiums.
31950 * mpn/x86/mul_basecase.S: Move to mpn/x86/pentium.
31951
31952 1998-11-16 Torbjorn Granlund <[email protected]>
31953
31954 * make.bat: Compile mul_basecase.c and sqr_basecase.c.
31955
31956 1998-11-10 Torbjorn Granlund <[email protected]>
31957
31958 * mpz/invert.c: Defer writing to parameter `invert' until
31959 end.
31960
31961 1998-11-03 Torbjorn Granlund <[email protected]>
31962
31963 * mpn/pa64/udiv_qrnnd.c: Handle more border cases.
31964
31965 1998-10-29 Torbjorn Granlund <[email protected]>
31966
31967 * insert-dbl.c: Special case biased exponents < 1; Get boundary for
31968 Inf right.
31969
31970 * longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB): New #define.
31971
31972 1998-10-28 Torbjorn Granlund <[email protected]>
31973
31974 * mpn/powerpc32/submul_1.s: Rewrite, optimizing for PPC604.
31975 * mpn/powerpc32/addmul_1.s: Likewise.
31976 * mpn/powerpc32/lshift.s: Likewise.
31977
31978 1998-10-23 Torbjorn Granlund <[email protected]>
31979
31980 * config/mt-sprc9-gcc (XCFLAGS): Add -Wa,-xarch=v8plus.
31981
31982 * mpn/sparc32/v9/submul_1.s: New file.
31983
31984 1998-10-21 Torbjorn Granlund <[email protected]>
31985
31986 * mpn/config/mt-pa2hpux: New file.
31987 * mpn/configure.in (hppa2.0*-*-*): Use new 64-bit code.
31988
31989 * config.sub: Recognize hppa2.0 as CPU type.
31990
31991 * longlong.h (64-bit hppa): Add umul_ppmm and udiv_qrnnd.
31992 * mpn/pa64/mul_1.S: New file.
31993 * mpn/pa64/addmul_1.S: New file.
31994 * mpn/pa64/submul_1.S: New file.
31995 * mpn/pa64/umul_ppmm.S: New file.
31996 * mpn/pa64/udiv_qrnnd.c: New file.
31997
31998 1998-10-20 Torbjorn Granlund <[email protected]>
31999
32000 * mpz/pprime_p.c: Pass 1L, not 1, to mpz_cmp_ui.
32001
32002 * mpz/fdiv_q_2exp.c: Cast `long' argument to `mp_limb_t' for mpn calls.
32003 * mpz/gcd_ui.c: Likewise.
32004 * mpz/add_ui.c: Likewise.
32005 * mpz/sub_ui.c: Likewise.
32006
32007 1998-10-19 Torbjorn Granlund <[email protected]>
32008
32009 * mpn/generic/bdivmod.c: Avoid using switch statement with mp_limb_t
32010 index.
32011
32012 1998-10-17 Torbjorn Granlund <[email protected]>
32013
32014 * mpn/sparc32/v9/mul_1.s: Misc cleanups.
32015 * mpn/sparc32/v9/addmul_1.s: Misc cleanups.
32016
32017 1998-10-16 Torbjorn Granlund <[email protected]>
32018
32019 * mpn/tests/{add,sub,}mul_1.c: Print xlimb using mpn_print.
32020
32021 * mpz/tests/t-powm.c (SIZE): Increase to 50.
32022 (EXP_SIZE): New parameter; use it for computing exp_size.
32023
32024 1998-10-15 Torbjorn Granlund <[email protected]>
32025
32026 * mpn/generic/divrem_newt.c: Use TMP_ALLOC interface.
32027
32028 * mpn/generic/sqrtrem.c: Check BITS_PER_MP_LIMB before defining
32029 assembly variants of SQRT.
32030
32031 1998-10-14 Torbjorn Granlund <[email protected]>
32032
32033 * mpn/tests: Clean up timing routines. Don't include longlong.h
32034 where it is not needed.
32035 (mpn_print): Handle printing when _LONG_LONG_LIMB.
32036 * mpn/tests/{add,sub,}mul_1.c: Generate xlimb with mpn_random2
32037 and do it whether TIMES != 1 or not.
32038
32039 * mpn/generic/mul_n.c: Delay assignment of `sign' for lower
32040 register pressure.
32041
32042 * mpn/sparc32/v9/mul_1.s: New file.
32043
32044 * config/mt-sprc9-gcc: New file.
32045 * configure.in: Use it.
32046
32047 * mpn/configure.in: Use sparc64 for Solaris 2.7 and later with a
32048 sparc v9 CPU.
32049 * mpn/configure.in: Use sparc32/v9 for Solaris 2.6 or earlier with
32050 a sparc v9 CPU.
32051
32052 * mpf/sub.c: In initial code for ediff == 0, limit precision
32053 before jumping to `normalize'.
32054
32055 1998-10-13 Torbjorn Granlund <[email protected]>
32056
32057 * mpn/hppa/hppa2_0/add_n.s: New file.
32058 * mpn/hppa/hppa2_0/sub_n.s: New file.
32059 * mpn/configure.in: Handle hppa2.0 (32-bit code for now).
32060
32061 * config.guess: Update from egcs 1.1.
32062 (9000/[3478]??:HP-UX:*:*): Properly return 2.0 for all known 2.0
32063 machines.
32064
32065 1998-10-07 Torbjorn Granlund <[email protected]>
32066
32067 * mpz/root.c (mpz_root): New file.
32068 * mpz/Makefile.in: Compile it.
32069 * make.bat: Likewise.
32070 * gmp.h (mpz_root): Declare.
32071
32072 * mpz/perfpow.c: New file.
32073 * mpz/Makefile.in: Compile it.
32074 * make.bat: Likewise.
32075 * gmp.h (mpz_perfect_power_p): Declare.
32076
32077 * mpz/remove.c: New file.
32078 * mpz/Makefile.in: Compile it.
32079 * make.bat: Likewise.
32080 * gmp.h (mpz_remove): Declare.
32081
32082 * mpz/bin_ui.c: New file.
32083 * mpz/Makefile.in: Compile it.
32084 * make.bat: Likewise.
32085 * gmp.h (mpz_bin_ui): Declare.
32086
32087 * mpz/bin_uiui.c: New file.
32088 * mpz/Makefile.in: Compile it.
32089 * make.bat: Likewise.
32090 * gmp.h (mpz_bin_uiui): Declare.
32091
32092 1998-09-16 Torbjorn Granlund <[email protected]>
32093
32094 * longlong.h: Test for __powerpc__ in addition to _ARCH_PPC.
32095
32096 Sat Sep 5 17:22:28 1998 Torbjorn Granlund <[email protected]>
32097
32098 * mpf/cmp_si.c: Compare most significant mantissa limb before
32099 trying to deduce anything from the limb count.
32100 * mpf/cmp_ui.c: Likewise.
32101
32102 Tue Aug 18 10:24:39 1998 Torbjorn Granlund <[email protected]>
32103
32104 * mpz/pprime_p.c (mpz_probab_prime_p): Add new code block
32105 for doing more dividing.
32106
32107 Sat Aug 15 18:43:17 1998 Torbjorn Granlund <[email protected]>
32108
32109 * mpn/generic/divrem_newt.c: New name for divrem_newton.c.
32110 * mpn/Makefile.in: Corresponding changes.
32111 * mpn/configure.in: Likewise.
32112
32113 Wed Aug 12 23:07:09 1998 Torbjorn Granlund <[email protected]>
32114
32115 * config.guess: Handle powerpc for NetBSD.
32116
32117 Tue Jul 28 23:10:55 1998 Torbjorn Granlund <[email protected]>
32118
32119 * mpz/fib_ui.c: New file.
32120 * mpz/Makefile.in: Compile it.
32121 * make.bat: Likewise.
32122 * gmp.h (mpz_fib_ui): Declare.
32123
32124 Wed Jun 17 22:52:58 1998 Torbjorn Granlund <[email protected]>
32125
32126 * make.bat: Fix typo, `asm-synt.h' => `asm-syntax.h'.
32127
32128 Wed Jun 3 11:27:32 1998 Torbjorn Granlund <[email protected]>
32129
32130 * config/mt-pwr: New file.
32131 * config/mt-ppc: New file.
32132 * configure.in: Use the new files.
32133
32134 Tue Jun 2 13:04:17 1998 Torbjorn Granlund <[email protected]>
32135
32136 * mpn/sparc32/v9/addmul_1.s: New file.
32137 * mpn/config/mt-sprc9: New file.
32138 * mpn/configure.in: Use mt-sprc9.
32139
32140 Tue May 26 11:24:18 1998 Torbjorn Granlund <[email protected]>
32141
32142 * demos/factorize.c (factor_using_pollard_rho): Pass correct
32143 parameters in recursive calls; join the two recursion arms.
32144
32145 * mpf/set_q.c: Set result sign.
32146 When normalizing the numerator, don't allow it to increase in size
32147 beyond prec.
32148
32149 Tue May 19 17:28:14 1998 Torbjorn Granlund <[email protected]>
32150
32151 * demos/factorize.c (factor_using_division): Call fflush
32152 also for the factor 2.
32153
32154 Mon May 18 15:51:01 1998 Torbjorn Granlund <[email protected]>
32155
32156 * make.bat: Pass -fomit-frame-pointer. Do not pass -g.
32157
32158 Tue May 5 01:42:50 1998 Torbjorn Granlund <[email protected]>
32159
32160 * mpz/Makefile.in (LOCAL_CC): Remove definition.
32161
32162 * gmp.h: Get rid of GMP_SMALL stuff.
32163 * mpz/Makefile.in: Likewise.
32164 * mpq/Makefile.in: Likewise.
32165 * mpf/Makefile.in: Likewise.
32166
32167 * mpz/invert.c: Fix typo in comment.
32168
32169 Mon May 4 23:05:32 1998 Torbjorn Granlund <[email protected]>
32170
32171 * mpn/generic/sqrtrem.c: Check that __arch64__ is not defined
32172 before defining sparc SQRT.
32173
32174 Mon Apr 20 19:16:17 1998 Torbjorn Granlund <[email protected]>
32175
32176 * mpn/generic/gcdext.c: Allow gp to be NULL.
32177
32178 1998-04-03 Torbjorn Granlund <[email protected]>
32179
32180 * mpn/configure.in: Recognize `alphaev5*', not `alphaev5'.
32181
32182 * config.guess: Handle CPU variants for NetBSD.
32183
32184 Mon Mar 16 13:07:54 1998 Torbjorn Granlund <[email protected]>
32185
32186 * mpz/pprime_p.c: Use mpn_mod_1/mpn_preinv_mod_1 for computing mod PP,
32187 not mpz_tdiv_r_ui (which expects an `unsigned long').
32188 (mpz_probab_prime_p): Change type of `r' to mp_limb_t.
32189
32190 Thu Mar 12 17:19:04 1998 Torbjorn Granlund <[email protected]>
32191
32192 * gmp.h (mpf_ceil, mpf_floor, mpf_trunc): Add declarations.
32193
32194 * config.guess: Update from FSF version.
32195 * config.sub: Likewise.
32196
32197 * config.guess: Add special handling of alpha-*-NetBSD.
32198
32199 Wed Mar 11 00:55:34 1998 Torbjorn Granlund <[email protected]>
32200
32201 * mpz/inp_str.c: Update from set_str.c.
32202 Properly increment `nread' when skipping minus sign.
32203
32204 * mpz/set_str.c: Check for empty string after having skipped
32205 leading zeros.
32206
32207 Mon Mar 9 19:28:00 1998 Torbjorn Granlund <[email protected]>
32208
32209 * mpz/set_str.c: Skip leading zeros.
32210
32211 Wed Mar 4 19:29:16 1998 Torbjorn Granlund <[email protected]>
32212
32213 * gmp.h (mpz_cmp_si): Cast argument before calling mpz_cmp_ui.
32214
32215 * demos/factorize.c: Rewrite.
32216
32217 1998-02-04 Torbjorn Granlund <[email protected]>
32218
32219 * configure.in (i[3456]86* etc): Check if using gcc before
32220 choosing mt-x86.
32221
32222 * configure.in (m68*-*-*): New alternative.
32223 * config/mt-m68k: New file.
32224
32225 * mpn/alpha/invert-limb.s: Put tables in text segment,
32226 since not all systems support "rdata".
32227
32228 Wed Feb 4 02:20:57 1998 Torbjorn Granlund <[email protected]>
32229
32230 * gmp.h (__GNU_MP_VERSION_SNAP): New #define.
32231 (__GNU_MP_VERSION_MINOR): Now 1.
32232
32233 Wed Jan 28 22:29:36 1998 Torbjorn Granlund <[email protected]>
32234
32235 * longlong.h (alpha udiv_qrnnd): #define UDIV_NEEDS_NORMALIZATION.
32236
32237 Wed Jan 28 20:28:19 1998 Torbjorn Granlund <[email protected]>
32238
32239 * mpz/pprime_p.c (mpz_probab_prime_p): Delete 59 from tried divisors.
32240
32241 Mon Jan 26 01:39:02 1998 Torbjorn Granlund <[email protected]>
32242
32243 * mpz/pprime_p.c (mpz_probab_prime_p): Major overhaul: Check small
32244 numbers specifically; check small factors, then perform a fermat test.
32245
32246 Tue Jan 13 14:58:28 1998 Torbjorn Granlund <[email protected]>
32247
32248 * longlong.h (alpha udiv_qrnnd): Call __mpn_invert_normalized_limb
32249 and udiv_qrnnd_preinv.
32250
32251 Wed Jan 7 01:52:54 1998 Torbjorn Granlund <[email protected]>
32252
32253 * mpn/configure.in (alpha*, extra_functions): Add invert-limb and
32254 remove udiv_qrnnd.
32255
32256 * mpn/tests/divrem.c: Get allocations right.
32257
32258 * mpn/generic/divrem.c: Conditionally pre-invert most significant
32259 divisor limb.
32260
32261 Tue Jan 6 23:08:54 1998 Torbjorn Granlund <[email protected]>
32262
32263 * mpn/generic/divrem_1.c: Rename variables to comply to conventions.
32264 Make `i' have type `mp_size_t'.
32265
32266 Tue Dec 30 22:21:42 1997 Torbjorn Granlund <[email protected]>
32267
32268 * mpz/tdiv_qr_ui.c: Return the remainder.
32269 * mpz/tdiv_r_ui.c: Likewise.
32270 * mpz/tdiv_q_ui.c: Likewise.
32271 * gmp.h: Change return type of mpz_tdiv_qr_ui, mpz_tdiv_r_ui,
32272 mpz_tdiv_q_ui.
32273
32274 * mpz/tdiv_ui.c: New file.
32275 * mpz/Makefile.in: Compile it.
32276 * make.bat: Likewise.
32277 * gmp.h (mpz_tdiv_ui): Declare.
32278
32279 Fri Nov 7 04:21:15 1997 Torbjorn Granlund <[email protected]>
32280
32281 * mpf/integer.c (FUNC_NAME): Fix bogus test for mpf_trunc.
32282
32283 * demos/isprime.c: New file.
32284
32285 Sat Nov 1 19:32:25 1997 Torbjorn Granlund <[email protected]>
32286
32287 * mpz/cmp_abs.c: New file.
32288 * mpz/Makefile.in: Compile it.
32289 * make.bat: Likewise.
32290 * gmp.h (mpz_cmp_abs): Declare.
32291
32292 * mpz/cmp_abs_ui.c: New file.
32293 * mpz/Makefile.in: Compile it.
32294 * make.bat: Likewise.
32295 * gmp.h (mpz_cmp_abs_ui): Declare.
32296
32297 Sat Sep 27 04:49:52 1997 Torbjorn Granlund <[email protected]>
32298
32299 * mpz/fdiv_r_2exp.c: Get allocation for `tmp' right.
32300
32301 * mpz/fdiv_q_2exp.c: In final result adjustment code, handle
32302 that intermediate result is zero.
32303
32304 * mpz/tests/t-2exp.c: New file.
32305 * mpz/tests/Makefile.in: Handle t-2exp.c.
32306
32307 Fri Sep 26 16:29:21 1997 Torbjorn Granlund <[email protected]>
32308
32309 * mpz/divexact.c: Fix typo in test for whether to copy numerator to
32310 quotient and move that statement to after handling quotient and
32311 denominator overlap. Misc cleanups.
32312
32313 * mpn/generic/gcd.c: Change count argument of mpn_lshift/mpn_rshift
32314 calls to `unsigned int'.
32315 * mpz/divexact.c: Likewise.
32316
32317 Mon Sep 22 02:19:52 1997 Torbjorn Granlund <[email protected]>
32318
32319 * mpz/tests/t-powm.c: Decrease `reps' to 2500.
32320
32321 * mpz/tests/t-pow_ui.c: New file.
32322 * mpz/tests/Makefile.in: Handle t-pow_ui.c.
32323
32324 * mpz/ui_pow_ui.c: Get special cases for exponent and base right.
32325
32326 * mpz/pow_ui.c: Increase temp space allocation by 1 limb.
32327 Split `rsize' into two variables; compute space allocation into
32328 `ralloc'.
32329
32330 Sun Sep 7 04:15:12 1997 Torbjorn Granlund <[email protected]>
32331
32332 * mpn/pa64/lshift.s: New file.
32333 * mpn/pa64/rshift.s: New file.
32334 * mpn/pa64/sub_n.s: New file.
32335
32336 Sat Sep 6 19:14:13 1997 Torbjorn Granlund <[email protected]>
32337
32338 * mpn/pa64/add_n.s: New file.
32339 * mpn/pa64: New directory.
32340
32341 Tue Aug 19 16:17:09 1997 Torbjorn Granlund <[email protected]>
32342
32343 * mpz/swap.c: New file.
32344 * mpz/Makefile.in: Compile it.
32345 * make.bat: Likewise.
32346 * gmp.h (mpz_swap): Declare.
32347
32348 * mpn/generic/mul_n.c: Push assignment of x and y pointers into the
32349 if/else clauses in several places. (Decreases register pressure.)
32350
32351 Mon Aug 18 03:29:50 1997 Torbjorn Granlund <[email protected]>
32352
32353 * mpn/thumb/add_n.s: New file.
32354 * mpn/thumb/sub_n.s: New file.
32355 * mpn/arm/add_n.s: New file.
32356 * mpn/arm/sub_n.s: New file.
32357
32358 * mpz/powm.c: After mpn_mul_n and mpn_mul calls, adjust product size
32359 if most significant limb is zero.
32360 * mpz/powm_ui.c: Likewise.
32361
32362 Fri Aug 15 02:13:57 1997 Torbjorn Granlund <[email protected]>
32363
32364 * mpn/arm/m/mul_1.s: New file.
32365 * mpn/arm/m/addmul_1.s: New file.
32366
32367 * mpn/powerpc32/mul_1.s: Rewrite.
32368
32369 * mpn/alpha/mul_1.s: Prefix labels with `.'.
32370
32371 Mon Aug 11 02:37:16 1997 Torbjorn Granlund <[email protected]>
32372
32373 * mpn/powerpc32/add_n.s: Rewrite.
32374 * mpn/powerpc32/sub_n.s: Rewrite.
32375
32376 Sun Aug 10 17:07:15 1997 Torbjorn Granlund <[email protected]>
32377
32378 * mpn/powerpc32/addmul_1.s: Delete obsolete comments.
32379 * mpn/powerpc32/submul_1.s: Likewise.
32380
32381 Fri Jul 25 20:07:54 1997 Torbjorn Granlund <[email protected]>
32382
32383 * mpz/addmul_ui.c: New file.
32384 * mpz/Makefile.in: Compile it.
32385 * make.bat: Likewise.
32386 * gmp.h (mpz_addmul_ui): Declare.
32387
32388 * mpz/setbit.c: Add missing code after final `else'.
32389
32390 Tue Jul 22 17:45:01 1997 Torbjorn Granlund <[email protected]>
32391
32392 * mpn/sh/add_n.s: Fix typo.
32393 * mpn/sh/sub_n.s: Likewise.
32394
32395 * longlong.h (ns32k count_trailing_zeros): Fix typo.
32396
32397 * insert-dbl.c: Check for exponent overflow and return Inf.
32398
32399 * mpz/get_d.c: Rewrite to avoid rounding errors.
32400
32401 Thu May 29 11:51:07 1997 Torbjorn Granlund <[email protected]>
32402
32403 * mpq/add.c: Swap some usages of tmp1 and tmp2 to make sure
32404 their allocation suffices.
32405 * mpq/sub.c: Likewise.
32406
32407 Wed Apr 16 02:24:25 1997 Torbjorn Granlund <[email protected]>
32408
32409 * demos/pexpr.c: New file.
32410
32411 * mpn/generic/mul_n.c: Misc optimizations from Robert Harley.
32412
32413 * gmp-impl.h (MPZ_PROVOKE_REALLOC): New #define.
32414
32415 Sat Apr 12 17:54:04 1997 Torbjorn Granlund <[email protected]>
32416
32417 * mpz/tstbit.c: New file.
32418 * mpz/Makefile.in: Compile it.
32419 * make.bat: Likewise.
32420 * gmp.h (mpz_tstbit): Declare.
32421
32422 * mpz/tests/logic.c: Use MPZ_CHECK_FORMAT.
32423 * mpz/tests/bit.c: New test.
32424 * mpz/tests/Makefile.in: Handle bit.c.
32425
32426 * mpz/ior.c: In -OP2,+OP1 case, normalize OP2 after call to mpn_sub_1.
32427
32428 * gmp-impl.h (MPZ_CHECK_FORMAT): New #define.
32429
32430 Thu Apr 10 00:30:14 1997 Torbjorn Granlund <[email protected]>
32431
32432 * longlong.h (POWER/PowerPC): Test _ARCH_PWR instead of _IBMR2.
32433
32434 Wed Apr 9 18:23:31 1997 Torbjorn Granlund <[email protected]>
32435
32436 * gmp-impl.h: Move defaulting of UMUL_TIME and UDIV_TIME from here...
32437 * longlong.h: ...to here.
32438
32439 Sun Mar 30 12:16:23 1997 Torbjorn Granlund <[email protected]>
32440
32441 * mpn/generic/next_prime.c: New file.
32442
32443 * mpn/generic/perfsqr.c: Remove definitions of PP and PP_INVERTED.
32444 * gmp-impl.h: Put them here.
32445
32446 Fri Mar 28 08:18:05 1997 Torbjorn Granlund <[email protected]>
32447
32448 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Define as inline asm for
32449 for x86, but leave disabled for now.
32450
32451 Fri Feb 28 02:39:47 1997 Torbjorn Granlund <[email protected]>
32452
32453 * mpn/Makefile.in (.S.o): Pass SFLAGS and CFLAGS also to compiler
32454 for assembly phase.
32455 (.s.o): Pass SFLAGS.
32456
32457 Wed Feb 26 06:46:08 1997 Torbjorn Granlund <[email protected]>
32458
32459 * mpn/configure.in: For Pentium Pro, use default code, not Pentium
32460 optimized code.
32461
32462 * mpn/x86/addmul_1.S: Unroll and optimize for Pentium Pro.
32463 * mpn/x86/submul_1.S: Likewise.
32464
32465 Thu Feb 13 08:26:09 1997 Torbjorn Granlund <[email protected]>
32466
32467 * mpf/Makefile.in: Compile floor.o, ceil.o and trunc.o (from
32468 integer.c).
32469 * make.bat: Likewise.
32470
32471 Wed Feb 5 05:58:44 1997 Torbjorn Granlund <[email protected]>
32472
32473 * mpn/configure.in (alpha*): Add cntlz to extra_functions.
32474
32475 Wed Feb 4 03:30:45 1997 Torbjorn Granlund <[email protected]>
32476
32477 * mpf/integer.c: New file (supporting mpf_floor, mpf_ceil, mpf_trunc).
32478
32479 Mon Feb 3 14:21:36 1997 Torbjorn Granlund <[email protected]>
32480
32481 * make.bat: Fix typo, set_dfl_prc => set_dfl_prec.
32482
32483 Sun Feb 2 02:34:33 1997 Torbjorn Granlund <[email protected]>
32484
32485 * mpf/out_str.c: After outputting `-', decrement n_digits.
32486
32487 Wed Jan 8 02:50:20 1997 Torbjorn Granlund <[email protected]>
32488
32489 * mpn/generic/divrem.c: qextra_limbs => qxn.
32490
32491 Wed Dec 18 07:50:46 1996 Torbjorn Granlund <[email protected]>
32492
32493 * mpz/tests/t-tdiv.c (SIZE): Increase to 200.
32494
32495 Tue Dec 17 19:32:48 1996 Torbjorn Granlund <[email protected]>
32496
32497 * mpn/generic/divrem.c (mpn_divrem_classic): New name for mpn_divrem.
32498 * gmp.h (mpn_divrem): New function.
32499 * mpn/generic/divrem_newton.c: New file.
32500 * mpn/configure.in (functions): Add divrem_newton.
32501 * make.bat: Likewise.
32502
32503 Thu Dec 12 17:55:13 1996 Torbjorn Granlund <[email protected]>
32504
32505 * gmp.h (_GMP_H_HAVE_FILE): Test also __dj_include_stdio_h_.
32506
32507 Sat Dec 7 09:40:06 1996 Torbjorn Granlund <[email protected]>
32508
32509 * mpn/alpha/invert-limb.s: New file.
32510
32511 Thu Dec 5 01:25:31 1996 Torbjorn Granlund <[email protected]>
32512
32513 * mpz/ui_pow_ui.c (mpz_pow2): New (static) function.
32514 (mpz_ui_pow_ui): Rewrite.
32515
32516 * make.bat: `pre_mod_1.c' => `pre_mod_.c'. Fix typo in path to
32517 gmp-mpar.h.
32518
32519 Fri Nov 15 00:49:55 1996 Torbjorn Granlund <[email protected]>
32520
32521 * mpz/ui_pow_ui.c: Rewrite for better speed.
32522
32523 Fri Nov 1 16:36:56 1996 Torbjorn Granlund <[email protected]>
32524
32525 * Makefile.in (recursive make rules): Use `&&' instead of `;' as
32526 delimiter.
32527
32528 Fri Oct 25 17:12:36 1996 Torbjorn Granlund <[email protected]>
32529
32530 * gmp-impl.h (Cray/uxp MPN_COPY): Really declare as inline.
32531
32532 Thu Oct 24 15:08:19 1996 Torbjorn Granlund <[email protected]>
32533
32534 * mpn/fujitsu/rshift.c: Fix typo in loop boundaries.
32535
32536 Fri Oct 18 03:13:54 1996 Torbjorn Granlund <[email protected]>
32537
32538 * mpn/configure.in: Recognize `nextstep' for m68k variants; likewise
32539 for x86 variants.
32540
32541 * mpn/x86/syntax.h (INSND): New macro.
32542 * mpn/x86/[lr]shift.S: Use INSND.
32543 * mpn/x86/pentium/[lr]shift.S: Likewise.
32544 * mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS.
32545
32546 * gmp-impl.h: In code for determining endianness, test also
32547 __BIG_ENDIAN__ and __hppa__. Remove test of __NeXT__.
32548
32549 Wed Oct 16 03:50:34 1996 Torbjorn Granlund <[email protected]>
32550
32551 * mpf/set_str.c: Let `prec' determine precision used in
32552 exponentiation code; decrease allocation accordingly.
32553
32554 * mpn/vax: Change `jsob*' to `sob*' in all files.
32555
32556 Tue Oct 15 03:54:06 1996 Torbjorn Granlund <[email protected]>
32557
32558 * longlong.h (m88110 udiv_qrnnd): Change type of intermediate quotient
32559 to DImode (divu.d generates a 64-bit quotient).
32560
32561 * configure.in (m88110*): Fix typo.
32562
32563 * mpf/get_str.c: Compute exp_in_base using `double' to avoid overflow.
32564
32565 * gmp-impl.h (struct bases): Change type of chars_per_bit_exactly from
32566 float to double.
32567 * mpn/mp_bases.c (__mp_bases): Give 17 digits for chars_per_bit_exactly
32568 field.
32569
32570 * mpf/get_str.c: Let `prec' determine precision used in
32571 exponentiation code; decrease allocation accordingly.
32572
32573 Sun Oct 13 03:31:53 1996 Torbjorn Granlund <[email protected]>
32574
32575 * longlong.h: Major cleanup.
32576 (__udiv_qrnnd_c): Compute remainders using multiply and subtract,
32577 not explicit `%' operator.
32578 (C umul_ppmm): Get rid of a redundant __ll_lowpart.
32579
32580 * mpz/invert.c: Properly detect all operands that would yield an
32581 undefined inverse; make sure the inverse is always positive.
32582
32583 * mpz/xor.c: New file.
32584 * mpz/Makefile.in: Compile it.
32585 * make.bat: Likewise.
32586 * gmp.h (mpz_xor): Declare.
32587
32588 * mpz/tests/logic.c: Also test mpz_xor.
32589
32590 * mpz/lcm.c: Special case for when either operand equals 0.
32591
32592 Sat Oct 12 01:57:09 1996 Torbjorn Granlund <[email protected]>
32593
32594 * mpn/generic/gcd.c (find_a): Don't inline on x86.
32595
32596 * Makefile.in (CFLAGS): Default to just `-g'.
32597
32598 * configure.in: Recognize 386 and 486 wherever other x86 cpus are
32599 recognized.
32600 * configure.in: Use mt-x86 for all x86 cpus.
32601 * config/mt-x86: New file.
32602
32603 * mpn/alpha/cntlz.s: New file.
32604
32605 Tue Oct 8 00:16:18 1996 Torbjorn Granlund <[email protected]>
32606
32607 * longlong.h: Define smul_ppmm for Fujitsu vpp/uxp.
32608 Rewrite umul_ppmm to actually work on the hardware.
32609
32610 * mpn/x86/sub_n.S: Avoid parens around displacement of `leal'.
32611 * mpn/x86/add_n.S: Likewise.
32612
32613 * mpn/x86/syntax.h (R): Define differently depending on __STDC__.
32614
32615 Mon Oct 7 16:48:08 1996 Torbjorn Granlund <[email protected]>
32616
32617 * longlong.h: Don't test for __NeXT__ in outer 68k conditional;
32618 add test for __m68k__.
32619
32620 Sun Oct 6 00:59:09 1996 Torbjorn Granlund <[email protected]>
32621
32622 * gmp.h: Declare mpn_random.
32623 * make.bat: Compile mpn/generic/random.c.
32624
32625 * longlong.h: Define umul_ppmm for Fujitsu vpp/uxp.
32626
32627 * gmp-impl.h: Protect definitions using `__attribute__ ((mode (...)))'
32628 with test also for __GNUC_MINOR__.
32629
32630 * gmp.h: Don't define macros using __builtin_constant_p when using
32631 NeXT's compiler.
32632
32633 Fri Oct 4 16:53:50 1996 Torbjorn Granlund <[email protected]>
32634
32635 * mpz/lcm.c: New file.
32636 * mpz/Makefile.in: Compile it.
32637 * make.bat: Likewise.
32638 * gmp.h (mpz_lcm): Declare.
32639
32640 Wed Sep 25 00:06:21 1996 Torbjorn Granlund <[email protected]>
32641
32642 * mpq/tests/t-cmp_ui.c: Make sure numerator and denominator of `b' is
32643 within limits of an `unsigned long int'.
32644
32645 * mpz/tests/t-powm_ui.c: Change type of exp2 to `unsigned long int'.
32646
32647 Tue Sep 24 18:58:20 1996 Torbjorn Granlund <[email protected]>
32648
32649 * mpz/powm_ui.c: Make result always positive.
32650
32651 * urandom.h (urandom): Make it return mp_limb_t.
32652
32653 * gmp-impl.h (CNST_LIMB): New macro.
32654 * mpn/mp_bases.c: Use CNST_LIMB.
32655 * mpn/generic/hamdist.c (popc_limb): Likewise.
32656 * mpn/generic/popcount.c (popc_limb): Likewise.
32657 * mpn/generic/perfsqr.c: Likewise.
32658
32659 Fri Sep 20 03:08:10 1996 Torbjorn Granlund <[email protected]>
32660
32661 * mpz/pprime_p.c: When n <= 3, don't clear out n before using it.
32662
32663 Wed Sep 18 11:22:45 1996 Torbjorn Granlund <[email protected]>
32664
32665 * mpn/fujitsu/mul_1.c: New file.
32666 * mpn/fujitsu/addmul_1.c: New file.
32667 * mpn/fujitsu/sub_n.c: New file.
32668 * mpn/fujitsu/add_n.c: Mew file.
32669
32670 Sun Sep 15 03:13:02 1996 Torbjorn Granlund <[email protected]>
32671
32672 * mpn/generic/random.c: New file.
32673 * mpn/configure.in (functions): Add `random'.
32674
32675 * gmp-impl.h (MPN_COPY): Define as annotated inline function for
32676 Crays and Fujitsu VPPs.
32677
32678 * gmp.h (mp_size_t): Define as `int' for non-MPP Cray.
32679 (mp_exp_t): Likewise.
32680
32681 * configure.in: Add support for Fujitsu VPP machines.
32682 * mpn/configure.in: Likewise.
32683 * config.guess: Likewise.
32684 * config.sub: Likewise.
32685
32686 * mpn/fujitsu/rshift.c: New file.
32687 * mpn/fujitsu/lshift.c: New file.
32688 * mpn/fujitsu: New directory, for Fujitsu VPP machines.
32689
32690 Wed Sep 11 11:34:38 1996 Torbjorn Granlund <[email protected]>
32691
32692 * mpn/generic/mul_n.c (__gmpn_mul_n): New name for impn_mul_n.
32693 Call __gmpn_mul_basecase, not impn_mul_n_basecase; update parameter
32694 list to work with __gmpn_mul_basecase.
32695 (__gmpn_sqr): New name for impn_sqr_n.
32696 Call __gmpn_sqr_basecase, not impn_sqr_n_basecase; update parameter
32697 list to work with __gmpn_sqr_basecase.
32698 (mpn_mul_n): Update calls to match new names and parameter conventions.
32699 * gmp-impl.h (MPN_MUL_N_RECURSE): Likewise.
32700 (MPN_SQR_RECURSE): New name for MPN_SQR_N_RECURSE.
32701 Update calls to match new names and parameter conventions.
32702 * mpn/generic/mul.c: Never perform multiply explicitly here, call
32703 __gmpn_mul_basecase instead.
32704 Update calls to match new names and parameter conventions.
32705
32706 * mpn/x86/mul_basecase.S: New file.
32707 * mpn/generic/mul_basecase.c: New file.
32708 * mpn/generic/sqr_basecase.c: New file.
32709
32710 Wed Sep 4 02:59:21 1996 Torbjorn Granlund <[email protected]>
32711
32712 * mpz/set_str.c: Let `0b' and `0B' mean base 2.
32713
32714 Fri Aug 30 00:44:00 1996 Torbjorn Granlund <[email protected]>
32715
32716 * longlong.h (x86 umul_ppmm): Work around GCC bug that was
32717 triggered by Aug 28 change.
32718
32719 * mpbsd/min.c (digit_value_in_base): New function.
32720
32721 * mpz/set_str.c: Refine allocation size computation, use
32722 chars_per_bit_exactly instead of chars_per_limb.
32723
32724 * mpbsd/Makefile.in (.c.o): Add -D_mpz_realloc=_mp_realloc.
32725
32726 Wed Aug 28 02:52:14 1996 Torbjorn Granlund <[email protected]>
32727
32728 * longlong.h (x86 umul_ppmm): Don't cast result operands.
32729 (x86 udiv_qrnnd): Likewise.
32730 (default smul_ppmm): Fix typo, umul_ppmm => smul_ppmm.
32731 (default umul_ppmm): New #define using smul_ppmm.
32732 (vax smul_ppmm): New #define.
32733 (vax umul_ppmm): Delete.
32734 (POWER umul_ppmm): Delete.
32735 (IBM 370 smul_ppmm): New #define.
32736 (IBM 370 umul_ppmm): Delete.
32737 (IBM RT/ROMP smul_ppmm): New #define.
32738 (IBM RT/ROMP umul_ppmm): Delete.
32739
32740 Tue Aug 27 01:03:25 1996 Torbjorn Granlund <[email protected]>
32741
32742 * gmp-impl.h (__gmp_0): Make it `const'.
32743
32744 * mpn/Makefile.in (clean mostlyclean): Comment out recursive clean
32745 of `tests'.
32746
32747 * mpn/generic/mul.c: Identify when we do squaring, and call
32748 impn_sqr_n_basecase/impn_sqr_n as appropriate. Use
32749 KARATSUBA_MUL_THRESHOLD and KARATSUBA_SQR_THRESHOLD.
32750 Don't #define KARATSUBA_THRESHOLD.
32751
32752 * mpn/generic/mul_n.c: Don't #define KARATSUBA_THRESHOLD.
32753 (impn_mul_n, impn_sqr_n): Rewrite, based on code contributed by
32754 Robert Harley.
32755 (impn_sqr_n_basecase): Rewrite.
32756
32757 * gmp-impl.h (KARATSUBA_MUL_THRESHOLD): New #define.
32758 (KARATSUBA_SQR_THRESHOLD): Likewise.
32759 (MPN_SQR_N_RECURSE): Use KARATSUBA_SQR_THRESHOLD.
32760 (MPN_MUL_N_RECURSE): Use KARATSUBA_MUL_THRESHOLD.
32761
32762 * configure.in: Fix typo in last change.
32763
32764 Mon Aug 26 22:25:18 1996 Torbjorn Granlund <[email protected]>
32765
32766 * mpn/generic/random2.c: Fix typo, `alpha__' => `__alpha'.
32767 * mpf/random2.c: Likewise.
32768
32769 Sun Aug 25 00:07:09 1996 Torbjorn Granlund <[email protected]>
32770
32771 * mpz/tests/t-mul.c: Also test squaring.
32772
32773 Fri Aug 16 05:12:08 1996 Torbjorn Granlund <[email protected]>
32774
32775 * mp_clz_tab.c (__clz_tab): Declare as `const'.
32776 * version.c (gmp_version): Likewise.
32777 * mpn/generic/sqrtrem.c (even_approx_tab, odd_approx_tab): Likewise.
32778
32779 Thu Aug 15 02:34:47 1996 Torbjorn Granlund <[email protected]>
32780
32781 * gmp.h: Fix typo, `mips__' => `__mips'.
32782
32783 * mpf/set_str.c: Allow a number to start with a period, if next
32784 position contains a digit.
32785
32786 Tue Aug 13 18:41:25 1996 Torbjorn Granlund <[email protected]>
32787
32788 * mpz/gcdext.c: Get cofactor sign right for negative input operands.
32789 Clean up code for computing tt.
32790
32791 * mpz/invert.c: Get rid of variable `rv'.
32792
32793 * mpz/divexact.c: Test for zero divisor in special case for zero
32794 dividend.
32795
32796 Mon Aug 12 18:04:07 1996 Torbjorn Granlund <[email protected]>
32797
32798 * mpz/?div_*_ui.c: Special case for division by 0.
32799 * mpz/tdiv_q.c: Likewise.
32800
32801 Sat Aug 10 14:45:26 1996 Torbjorn Granlund <[email protected]>
32802
32803 * mpz/dmincl.c: Special case for division by 0.
32804
32805 * mpz/tdiv_*_ui.c: Delete special case for dividend being 0; handle
32806 it when computing size after mpn_divmod_1 call.
32807
32808 * mp_bpl.c: (__gmp_junk): New variable.
32809 (__gmp_0): New constant.
32810
32811 * gmp-impl.h (DIVIDE_BY_ZERO): New #define.
32812
32813 Fri Aug 9 20:03:27 1996 Torbjorn Granlund <[email protected]>
32814
32815 * mpz/divexact.c: Test for dividend being zero before testing
32816 for small divisors.
32817
32818 Thu Aug 8 13:20:23 1996 Torbjorn Granlund <[email protected]>
32819
32820 * configure.in: Require operating system specification for cpus
32821 where assembly syntax differs between system.
32822
32823 * Makefile.in (many targets): Change `-' action prefix to `@'.
32824
32825 * mpn/Makefile.in: (distclean): Fix typo.
32826
32827 * mpq/cmp_ui.c: Rename function to _mpq_cmp_ui.
32828 (mpq_cmp_ui): #undef deleted.
32829 * mpz/cmp_si.c: Rename function to _mpz_cmp_si.
32830 (mpz_cmp_si): #undef deleted.
32831 * mpz/cmp_ui.c: Rename function to _mpz_cmp_ui.
32832 (mpz_cmp_ui): #undef deleted.
32833 * Makefile.in: Corresponding changes.
32834
32835 * mpf/get_prc.c: Return the *highest* precision achievable.
32836
32837 * mpf/get_str.c: Complete rewrite.
32838
32839 * mpf/set_str.c (swapptr): New #define.
32840 (assert): New #define.
32841 * mpf/set_str.c: Set prec to one more than the saved _mp_prec.
32842 Misc cleanups.
32843
32844 * mpz/set_str.c: #include string.h.
32845 * mpf/out_str.c: #include string.h.
32846 * mpbsd/xtom.c: #include string.h and ctype.h.
32847 * mpbsd/mout.c: #include string.h.
32848
32849 Wed Aug 7 11:46:04 EDT 1996 Ken Weber <[email protected]>
32850
32851 * mpn/generic/gcd.c: Reorder mpn_gcd argument list.
32852 * mpz/gcd.c: Change call to mpn_gcd.
32853 * gmp.texi: Update manual entry on mpn_gcd.
32854 * mpn/generic/bdivmod.c: Delete limb cache to make mpn_bdivmod
32855 reentrant.
32856
32857 Wed Aug 7 02:15:38 1996 Torbjorn Granlund <[email protected]>
32858
32859 * mpf/get_str.c: Rewrite code for converting integral part of a
32860 number with both an integral and fractional part.
32861
32862 * mpf/set_str.c: Get rid of variable xxx. New variables madj and radj.
32863 In exp_in_base==0 case, add madj to msize for EXP field.
32864
32865 * mpz/tests/t-gcd.c: Test deleted. Rename t-gcd2.c to t-gcd.c.
32866 Increase reps to 2000.
32867 * mpz/tests/t-gcd2.c: Get rid of mpz_refgcd.
32868
32869 * mpf/set_str.c: Ignore excess limbs in MP,MSIZE.
32870
32871 Thu Jul 25 04:39:10 1996 Torbjorn Granlund <[email protected]>
32872
32873 * mpn/configure.in: Fix typo in setting path, "sparc" => "sparc32".
32874
32875 Wed Jul 24 02:27:02 1996 Torbjorn Granlund <[email protected]>
32876
32877 * mpn/generic/gcdext.c: Reorganize and clean up. Get rid of all
32878 signed limb arithmetic.
32879
32880 Mon Jul 22 02:39:56 1996 Torbjorn Granlund <[email protected]>
32881
32882 * mpn/generic/gcdext.c (mpn_gcdext): For large enough operands,
32883 work with most significant *two* limbs.
32884 (div2): New function (two variants).
32885 (THRESHOLD): New #define.
32886
32887 * mpz/gcdext.c: Fix typo in MPZ_TMP_INIT call.
32888
32889 * longlong.h (alpha UMUL_TIME): Now 30.
32890 (alpha UDIV_TIME): Now 350.
32891 (x86 UMUL_TIME): Now 10 (let Pentium decide).
32892 (SuperSPARC UDIV_TIME): Override default.
32893
32894 * extract-dbl.c (MP_BASE_AS_DOUBLE): Don't redefine here.
32895
32896 * extract-dbl.c: New name for extract-double.c.
32897 * insert-dbl.c: New name for insert-double.c.
32898 * Makefile.in: Corresponding changes.
32899 * make.bat: Likewise.
32900
32901 * mpz/Makefile.in (.c.o): Don't pass non-portable `-f' to cp.
32902 * mpq/Makefile.in: Likewise.
32903 * mpf/Makefile.in: Likewise.
32904
32905 Sat Jul 20 01:35:18 1996 Torbjorn Granlund <[email protected]>
32906
32907 * mpz/getlimbn.c: Take ABS of integer->_mp_size.
32908
32909 * mpz/divexact.c: Use mpn_divmod_1 if divisor is a single limb.
32910
32911 Thu Jul 18 00:31:15 1996 Torbjorn Granlund <[email protected]>
32912
32913 * mpn/generic/popcount.c (popc_limb): Use different masking trick
32914 for first step (due to David Seal).
32915 * mpn/generic/hamdist.c (popc_limb): Likewise.
32916
32917 Wed Jul 17 23:21:48 1996 Torbjorn Granlund <[email protected]>
32918
32919 * mpn/generic/divrem.c: In MPN_COPY_DECR call, copy dsize - 1 limbs.
32920
32921 Sun Jul 14 17:47:46 1996 Torbjorn Granlund <[email protected]>
32922
32923 * configure.in: Handle sparc9, sparc64, and ultrasparc like sparc8.
32924
32925 Thu Jul 11 14:05:54 1996 J.T. Conklin <[email protected]>
32926
32927 * longlong.h (mc680x0): Define umul_ppmm, udiv_qrnnd, sdiv_qrnnd
32928 for the '020, '030, '040, and '332. Define count_leading_zeros
32929 for the '020, '030, '040, and '060.
32930
32931 Sun Jul 14 15:24:53 1996 Torbjorn Granlund <[email protected]>
32932
32933 From Joe Keane:
32934 * mpq/equal.c: Take ABS of num1_size before passing it to mpn_cmp.
32935
32936 Fri Jul 12 17:11:17 1996 Torbjorn Granlund <[email protected]>
32937
32938 * mpn/generic/sqrtrem.c (SQRT): New asm for x86, but leave it
32939 disabled for now.
32940
32941 * mpn/generic/sqrtrem.c: Use MP_BASE_AS_DOUBLE.
32942
32943 Wed Jul 10 03:17:45 1996 Torbjorn Granlund <[email protected]>
32944
32945 * cre-mparam.c: Delete obsolete file.
32946
32947 * gmp.h: #define _LONG_LONG_LIMB if __mips && _ABIN32.
32948 * longlong.h: Test __mips instead of __mips__.
32949
32950 Sun Jul 7 23:19:13 1996 Torbjorn Granlund <[email protected]>
32951
32952 * longlong.h (_PROTO): Define, unless already defined.
32953 (alpha __udiv_qrnnd): Declare using _PROTO.
32954 (hppa __udiv_qrnnd): Likewise.
32955 (sparc __udiv_qrnnd): Likewise.
32956
32957 Mon Jul 1 01:44:30 1996 Torbjorn Granlund <[email protected]>
32958
32959 * config.guess: Update from master version; add Cray x90 handling.
32960
32961 Wed Jun 26 05:35:02 1996 Torbjorn Granlund <[email protected]>
32962
32963 * mpn/power/add_n.s (__mpn_add_n): Work around GAS bug.
32964 * mpn/power/sub_n.s (__mpn_sub_n): Likewise.
32965
32966 * insert-double.c: Rework loop to avoid potential overflow.
32967
32968 * mpq/get_d.c: For vax, if qsize > N_QLIMBS, ignore excess limbs.
32969
32970 * mpq/tests/t-get_d.c (SIZE): Special case for vax.
32971
32972 * gmp.h (mpX_cmp_ui): #define also when ! __GNUC__.
32973
32974 Mon Jun 24 17:13:21 1996 Torbjorn Granlund <[email protected]>
32975
32976 * longlong.h (vax sdiv_qrnnd): Fix typo.
32977
32978 Sat Jun 15 01:33:33 1996 Torbjorn Granlund <[email protected]>
32979
32980 * gmp.h: Support `small' and `large' type and function variants,
32981 controlled by GMP_SMALL.
32982
32983 * mpz/Makefile.in (.c.o): Compile each function twice, for small and
32984 large variant.
32985 (MPZS_OBJS): New variable.
32986 (libmpz.a): Include MPZS_OBJS in archive.
32987 * mpf/Makefile.in: Analogous changes.
32988 * mpq/Makefile.in: Analogous changes.
32989
32990 * gmp.h: Prefix all functions with __gmp, to allow namespace-clean
32991 internal calls.
32992
32993 * mp.h: Rip out __MP_SMALL__ stuff.
32994 (__mpz_struct): mp_size_t => int.
32995
32996 * mpz/invert.c: #include "gmp-impl.h".
32997 Use MPZ_TMP_INIT, not mpz_init.
32998
32999 * mpz/gcdext.c: Rewrite to call mpn_gcdext.
33000
33001 Fri Jun 14 18:05:29 1996 Torbjorn Granlund <[email protected]>
33002
33003 * mpn/generic/gcdext.c (s0size): New parameter.
33004 * gmp.h (mpn_gcdext): Update prototype.
33005
33006 * mpn/generic/gcdext.c: Major rewrite.
33007
33008 Mon Jun 10 00:14:27 1996 Torbjorn Granlund <[email protected]>
33009
33010 * mpn/generic/dump.c: Add missing `else'.
33011
33012 Fri Jun 7 03:35:12 1996 Torbjorn Granlund <[email protected]>
33013
33014 * Makefile.in (gmp_toc.html): Pass -expandinfo to texi2html.
33015
33016 Thu Jun 6 19:00:53 1996 Torbjorn Granlund <[email protected]>
33017
33018 * Version 2.0.2 released.
33019
33020 * install.sh: New file.
33021 * Makefile.in (INSTALL): Use install.sh.
33022 (install-normal): New name for target `install'.
33023 (install): New dummy target.
33024
33025 * mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
33026 * mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
33027
33028 * config/mt-linux (AR_FLAGS): New file.
33029 * configure.in: Use config/mt-linux for all linux systems.
33030
33031 Tue Jun 4 03:42:18 1996 Torbjorn Granlund <[email protected]>
33032
33033 * Version 2.0.1 released.
33034
33035 * mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
33036
33037 * extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
33038
33039 * insert-double.c: Don't #include stdlib.h.
33040
33041 * gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
33042 Do not test __sparc__.
33043
33044 * mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
33045 * mpq/equal.c: Likewise.
33046
33047 * mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
33048
33049 * mpn/generic/gcdext.c: Add K&R declaration syntax.
33050 * stack-alloc.h: Likewise.
33051 * insert-double.c: Likewise.
33052 * extract-double.c: Likewise.
33053 * mpf/tests/reuse.c: Likewise.
33054 * mpz/tests/reuse.c: Likewise.
33055 * mpf/tests/t-sub.c: Likewise.
33056 * mpf/tests/t-add.c: Likewise.
33057 * mpf/tests/t-muldiv.c: Likewise.
33058 * mpf/tests/t-conv.c: Likewise.
33059 * mpf/tests/ref.c: Likewise.
33060
33061 * mpn/config/t-oldgas: Renamed from t-freebsd.
33062 * mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
33063 configurations.
33064
33065 * mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
33066 * mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
33067
33068 * mpn/config/t-ppc-aix: New file.
33069 * mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
33070
33071 Wed May 29 02:07:31 1996 Torbjorn Granlund <[email protected]>
33072
33073 * gmp.h (mp_bits_per_limb): Change qualifier from `const' to
33074 __gmp_const.
33075
33076 * gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
33077 * mpf/iset_str.c: Likewise.
33078
33079 Mon May 27 00:15:58 1996 Torbjorn Granlund <[email protected]>
33080
33081 * gmp-impl.h: Declare __gmp_extract_double.
33082
33083 * mpz/set_q.c: Delete unused variables.
33084
33085 * gmp.h (mpq_equal): Declare.
33086
33087 * mpf/eq.c: mpf_cmp2 -> mpf_eq.
33088
33089 Fri May 24 03:20:44 1996 Torbjorn Granlund <[email protected]>
33090
33091 * mpz/iset_d.c: Don't include <math.h>.
33092
33093 * insert-double.c (__gmp_scale2): New name for scal2.
33094 * mpz/get_d.c: Corresponding change.
33095 * mpf/get_d.c: Likewise.
33096 * mpq/get_d.c: Likewise.
33097 * gmp-impl.h: Declare __gmp_scale2.
33098
33099 * mpn/generic/scan0.c: Clarify comment.
33100
33101 * mpz/set_q.c: New file.
33102 * Makefile.in: Compile it.
33103 * make.bat: Likewise.
33104 * gmp.h: Declare mpz_set_q.
33105
33106 * insert-double.c: New file.
33107 * Makefile.in: Compile it.
33108 * make.bat: Likewise.
33109
33110 * mpz/get_d.c: New file.
33111 * mpz/Makefile.in: Compile it.
33112 * make.bat: Likewise.
33113 * gmp.h: Declare mpz_get_d.
33114
33115 * mpf/get_d.c: New file.
33116 * mpf/Makefile.in: Compile it.
33117 * make.bat: Likewise.
33118 * gmp.h: Declare mpf_get_d.
33119
33120 * make.bat: Compile things in alphabetical order.
33121
33122 * gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
33123 (LIMBS_PER_DOUBLE): New #define.
33124
33125 * extract-double.c: New file.
33126 * Makefile.in: Compile it.
33127 * make.bat: Likewise.
33128 * mpz/set_d.c: Rewrite to use __gmp_extract_double.
33129 * mpf/set_d.c: Likewise.
33130
33131 * mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
33132
33133 Wed May 22 02:48:35 1996 Torbjorn Granlund <[email protected]>
33134
33135 * gmp-impl.h: Rework code for defining ieee_double_extract.
33136 (IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
33137 (_GMP_IEEE_FLOATS): New macro.
33138 * mpn/vax/gmp-mparam.h: Delete.
33139
33140 * mpn/config/t-pwr-aix: New file.
33141 * mpn/configure.in: Use t-pwr-aix for aix 4 and later.
33142
33143 Mon May 20 16:30:31 1996 Torbjorn Granlund <[email protected]>
33144
33145 * gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
33146
33147 * mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
33148 * mpf/tests/t-sub.c (oo): Likewise.
33149 * mpf/tests/t-conv.c (oo): Likewise.
33150 * mpf/tests/t-sqrt.c (oo): Likewise.
33151
33152 * mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
33153
33154 * mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
33155
33156 Fri May 17 02:24:43 1996 Torbjorn Granlund <[email protected]>
33157
33158 * mpz/set_d.c: Call _mpz_realloc.
33159
33160 * mpq/set_z.c: New file.
33161 * mpq/Makefile.in: Compile it.
33162 * make.bat: Likewise.
33163 * gmp.h: Declare mpq_set_z.
33164
33165 * mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
33166 * mpf/Makefile.in (test): Delete spurious target.
33167 * mpq/Makefile.in (test): Likewise.
33168
33169 * mpf/out_str.c: Use `e' to separate exponent when base <= 10.
33170
33171 * mpn/configure.in: Treat ultrasparc just like sparc v8,
33172 until 64-bit compilers are ready.
33173
33174 * mpf/set_d.c: Make it work for 64-bit machines.
33175
33176 Thu May 16 20:53:57 1996 Torbjorn Granlund <[email protected]>
33177
33178 * gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
33179 machines.
33180 * mpn/x86/gmp-mparam.h: Delete file.
33181
33182 * configure.in: Treat microsparc like sparc8.
33183
33184 * urandom.h: Test __alpha instead of __alpha__, since the former
33185 is the standard symbol.
33186 * mpn/generic/random2.c: Likewise.
33187 * mpf/random2.c: Likewise.
33188
33189 Tue May 14 13:42:39 1996 Torbjorn Granlund ([email protected])
33190
33191 * mpz/set_f.c: New file.
33192 * mpz/Makefile.in: Compile it.
33193 * gmp.h: Declare mpz_set_f.
33194
33195 * mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
33196
33197 Tue May 14 13:03:07 1996 Torbjorn Granlund ([email protected])
33198
33199 * make.bat: Add all new files.
33200
33201 Sun May 12 22:24:36 1996 Torbjorn Granlund <[email protected]>
33202
33203 * mpf/set_z.c: New file.
33204 * mpf/Makefile.in: Compile it.
33205 * gmp.h: Declare mpf_set_z.
33206
33207 Sat May 11 19:26:25 1996 Torbjorn Granlund <[email protected]>
33208
33209 * gmp.h: Declare mpf_set_q.
33210
33211 * mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
33212
33213 Fri May 10 17:37:38 1996 Torbjorn Granlund <[email protected]>
33214
33215 * mpf/set_q.c: New file.
33216 * mpf/Makefile.in: Compile it.
33217
33218 * config.sub: Recognize sparc8.
33219
33220 Wed May 8 09:19:11 1996 Torbjorn Granlund <[email protected]>
33221
33222 * mpf/tests/t-dm2exp.c: New file.
33223
33224 * mpf/tests/t-add.c: Correct header comment.
33225 * mpf/tests/t-sub.c: Likewise.
33226 * mpf/tests/t-sqrt.c: Likewise.
33227
33228 * mpf/div.c: Misc variable name cleanups.
33229 * mpf/div_ui.c: Base more closely on mpf/div.c.
33230 * mpf/ui_div.c: Likewise.
33231
33232 * mpz/tests/Makefile.in (check): Depend on Makefile.
33233 * mpq/tests/Makefile.in (check): Likewise.
33234 * mpf/tests/Makefile.in (check): Likewise.
33235
33236 * mpf/tests/t-muldiv.c: New file.
33237 * mpf/tests/Makefile.in: Compile and run `t-muldiv'.
33238 (t-ref.o): Delete spurious rule.
33239
33240 * mpf/sqrt.c: Properly detect negative input operand.
33241
33242 * mpf/sqrt_ui.c: Delete spurious header comment.
33243 * mpf/sqrt.c: Likewise.
33244 * mpz/sqrt.c: Likewise.
33245
33246 * mpz/tests/reuse.c (main): Read `reps' from command line.
33247
33248 * mpf/tests/reuse.c: New file.
33249 * mpf/tests/Makefile.in: Compile and run `reuse'.
33250
33251 * mpf/mul_ui.c: Disable code for removing low zero limbs.
33252
33253 * mpf/div.c: Fix condition for when vp and qp overlaps.
33254
33255 * mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
33256
33257 * mpf/out_str.c: Don't output '\n' after exponent.
33258
33259 * mpf/add_ui.c: New special case for when U is completely cancelled.
33260
33261 Wed Apr 24 05:33:28 1996 Torbjorn Granlund <[email protected]>
33262
33263 * Version 2.0 released.
33264
33265 * All files: Update FSF's address.
33266
33267 * Makefile.in (gmp_toc.html): New name for gmp.html.
33268 (TAGS): Depend on force.
33269
33270 * mpf/tests/t-conv.c: Pass -base to mpf_set_str.
33271
33272 Sat Apr 20 03:54:06 1996 Torbjorn Granlund <[email protected]>
33273
33274 * Makefile.in (ps): New target, depend on gmp.ps.
33275
33276 Fri Apr 19 14:03:15 1996 Torbjorn Granlund <[email protected]>
33277
33278 * mpf/out_str.c: Print `@' before exponent, not `e'.
33279
33280 * make.bat: Update from Makefiles.
33281
33282 Thu Apr 18 01:22:05 1996 Torbjorn Granlund <[email protected]>
33283
33284 * mpf/set_str.c: If parameter `base' is negative, expect exponent
33285 to be decimal, otherwise in the same base as the mantissa.
33286
33287 Wed Apr 17 17:28:36 1996 Torbjorn Granlund <[email protected]>
33288
33289 * mpf/set_dfl_prec.c: Don't return anything.
33290 * gmp.h: Corresponding changes.
33291
33292 * mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
33293 * mpf/init2.c: Likewise.
33294 * mpf/get_prc.c: Likewise.
33295 * mpf/set_prc.c: Likewise.
33296 * mpf/set_prc_raw.c: Likewise.
33297 * mpz/popcount.c: Likewise.
33298 * mpz/hamdist.c: Likewise.
33299 * mpz/scan1.c: Likewise.
33300 * mpz/scan0.c: Likewise.
33301 * mpn/generic/popcount.c: Likewise.
33302 * mpn/generic/hamdist.c: Likewise.
33303 * mpn/generic/scan1.c: Likewise.
33304 * mpn/generic/scan0.c: Likewise.
33305 * gmp.h: Likewise.
33306
33307 * mpf/eq.c: New file, based on mpf/diff.c.
33308 * mpf/diff.c: Delete.
33309 * mpf/Makefile.in: Corresponding changes.
33310 * gmp.h: Likewise.
33311
33312 * mpf/reldiff.c: New file.
33313 * mpf/Makefile.in: Compile it.
33314 * gmp.h: Declare mpf_reldiff.
33315
33316 * mpz/iset_d.c: New file.
33317 * mpz/Makefile.in: Compile it.
33318 * gmp.h: Declare mpz_init_set_d.
33319
33320 Tue Apr 16 16:28:31 1996 Torbjorn Granlund <[email protected]>
33321
33322 * Makefile.in (gmp.html): Pass -acc to texi2html.
33323
33324 Mon Apr 15 16:20:24 1996 Torbjorn Granlund <[email protected]>
33325
33326 * mpf/set_str.c: Switch off code for defaulting the base from the
33327 leading characters.
33328
33329 * gmp.h (mp?_sign): Delete.
33330 (mp?_sgn): New macros.
33331
33332 Fri Apr 12 17:23:33 1996 Torbjorn Granlund <[email protected]>
33333
33334 * Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
33335
33336 Wed Apr 10 22:52:02 1996 Torbjorn Granlund ([email protected])
33337
33338 * mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
33339 * gmp.h: Corresponding change.
33340
33341 * gmp.h (mp_bits_per_limb): Make it const.
33342
33343 Sat Mar 30 01:20:23 1996 Torbjorn Granlund <[email protected]>
33344
33345 * configure.in: Re-enable recognition of with_gcc.
33346
33347 * mpf/Makefile.in (.c.o): Pass XCFLAGS.
33348 * mpn/Makefile.in (.c.o): Likewise.
33349 * mpz/Makefile.in (.c.o): Likewise.
33350 * mpq/Makefile.in (.c.o): Likewise.
33351 * mpbsd/Makefile.in (.c.o): Likewise.
33352 * mpf/tests/Makefile.in (.c.o): Likewise.
33353 * mpz/tests/Makefile.in (.c.o): Likewise.
33354 * mpq/tests/Makefile.in (.c.o): Likewise.
33355
33356 * Makefile.in (XCFLAGS): Default to empty.
33357 (FLAGS_TO_PASS): Pass on XCFLAGS.
33358 (.c.o): Pass XCFLAGS.
33359
33360 * config/mt-m88110 (XCFLAGS): Define instead of CC.
33361 * config/mt-sprc8-gcc (XCFLAGS): Likewise.
33362 * config/mt-supspc-gcc (XCFLAGS): Likewise.
33363
33364 * configure: Don't default CC to "gcc -O2" is -with-gcc=no was
33365 specified.
33366
33367 Mon Mar 25 01:07:54 1996 Torbjorn Granlund <[email protected]>
33368
33369 * urandom.h: Test for __SVR4 in addition to __svr4__.
33370
33371 * mp_bpl.c (mp_bits_per_limb): Declare as `const'.
33372
33373 * Makefile.in (CFLAGS): `-O2' => `-O'.
33374 * mpn/Makefile.in (CFLAGS): Likewise.
33375
33376 * gmp-impl.h: Get rid of obsolete field access macros.
33377
33378 * mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
33379 cc compiler bug.
33380
33381 * gmp.h (__MPN): Make it work also for non-ANSI compilers.
33382
33383 Thu Mar 21 01:07:54 1996 Torbjorn Granlund <[email protected]>
33384
33385 * mpf/sub.c: New special case for ediff <= 1 before generic code.
33386 Simplify generic code for ediff == 0.
33387 Rename uexp => exp.
33388
33389 Mon Mar 11 18:24:57 1996 Torbjorn Granlund <[email protected]>
33390
33391 * mpf/tests/*.c: Use ref_mpf_sub for error calculation.
33392 * mpf/tests/Makefile.in: Link ref.o to all executables.
33393
33394 * mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
33395
33396 Sun Mar 10 21:03:17 1996 Torbjorn Granlund ([email protected])
33397
33398 * mpf/get_str.c: In digit development loop for fractions, change
33399 loop condition from `<' to `<='.
33400
33401 Thu Mar 7 04:58:11 1996 Torbjorn Granlund <[email protected]>
33402
33403 * mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
33404
33405 Wed Mar 6 01:10:42 1996 Torbjorn Granlund <[email protected]>
33406
33407 * mpf/tests/t-sqrt.c: New file.
33408 * mpf/tests/Makefile.in: Corresponding changes.
33409
33410 * mpf/sqrt.c: Special case for square root of zero.
33411
33412 * mpq/add.c: Clean up variable names.
33413 * mpq/sub.c: Update from mpq/add.c.
33414
33415 * mpz/divexact.c: abs => ABS.
33416 * mpz/gcd.c: Likewise. Rewrite final fixup code, to decrease
33417 allocation. Misc cleanups.
33418
33419 Tue Mar 5 22:24:56 1996 Torbjorn Granlund <[email protected]>
33420
33421 * mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
33422
33423 * gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
33424
33425 * mpn/configure.in: Use t-freebsd also for netbsd.
33426
33427 Mon Mar 4 15:13:28 1996 Torbjorn Granlund <[email protected]>
33428
33429 * mpq/Makefile.in (cmp.o): Depend on longlong.h.
33430
33431 * mpq/equal.c: New file.
33432 * mpq/Makefile.in: Corresponding changes.
33433
33434 * mpf/tests/t-add.c: New file.
33435 * mpf/tests/t-sub.c: Renamed from t-addsub.c.
33436 * mpf/tests/ref.c: New file.
33437 * mpf/tests/Makefile.in: Corresponding changes.
33438
33439 * gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
33440
33441 Sun Mar 3 07:45:46 1996 Torbjorn Granlund <[email protected]>
33442
33443 * mpf/set_str.c: In exponentiation code, allocate 3 extra
33444 limbs, not just 2.
33445
33446 * mpf/get_str.c: Allocate sufficient space for tstr.
33447 When calculating exp_in_base, round result down.
33448
33449 * mpf/tests/t-conv.c: New file.
33450 * mpf/tests/Makefile.in: Corresponding changes.
33451
33452 * mp_bpl.c: New file.
33453 * gmp.h: Declare it.
33454 * Makefile.in: Corresponding changes.
33455
33456 Sat Mar 2 06:27:56 1996 Torbjorn Granlund <[email protected]>
33457
33458 * mpf/set_prc_raw.c: New file.
33459 * mpf/set_prc.c: Renamed from set_prec.c.
33460 * mpf/get_prc.c: New file.
33461 * mpf/Makefile.in: Corresponding changes.
33462 * gmp.h: Declare new functions.
33463
33464 * mpn/generic/gcdext.c: Add copyright header.
33465
33466 Fri Mar 1 01:22:24 1996 Torbjorn Granlund <[email protected]>
33467
33468 * mpn/configure.in: For ppc601, search "power" before "powerpc32".
33469
33470 * mp?/Makefile.in (AR_FLAGS): New variable.
33471 (libmp?.a): Use it.
33472
33473 * make.bat: New file.
33474 * mpn/msdos: New directory.
33475 * mpn/msdos/asm-syntax.h: New file.
33476
33477 * mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
33478
33479 * config.sub: Recognize [ctj]90-cray.
33480
33481 * mpn/configure.in: Recognize [ctj]90-cray-unicos*.
33482
33483 * mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
33484
33485 * mpn/generic/gcd.c: Split increment from use of USIZE to avoid
33486 undefined behaviour.
33487
33488 Thu Feb 29 04:11:24 1996 Torbjorn Granlund <[email protected]>
33489
33490 * Makefile.in (install-info-files): Update for new install-info
33491 behaviour.
33492
33493 * mpn/power/add_n.s: Rewrite.
33494 * mpn/power/sub_n.s: Rewrite.
33495
33496 Wed Feb 28 01:34:30 1996 Torbjorn Granlund <[email protected]>
33497
33498 * mpz/pow_ui.c: Compute allocation more aggressively for small bases.
33499 * mpz/ui_pow_ui.c: Likewise.
33500
33501 * mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
33502
33503 * mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
33504 * mpn/generic/gcd.c: Likewise.
33505 (SIGN_BIT): Compute differently.
33506
33507 Mon Feb 26 00:07:36 1996 Torbjorn Granlund <[email protected]>
33508
33509 * All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
33510
33511 * Makefile.in (install, install-bsdmp, install-info-files): Depend
33512 on installdirs. chmod all installed files.
33513
33514 Sun Feb 25 01:47:41 1996 Torbjorn Granlund <[email protected]>
33515
33516 * mpbsd/configure.in: Delete debugging code.
33517
33518 * All Makefile.in: Update clean targets.
33519
33520 * Makefile.in (AR_FLAGS): New variable.
33521 (libgmp.a): Use it.
33522 (libmp.a): Likewise.
33523
33524 * VERSION: Delete file.
33525
33526 * Makefile.in (installdirs): New target.
33527 * mkinstalldirs: New file (from the texinfo package).
33528
33529 * Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
33530 (MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
33531 (install-info): New target.
33532 (install, install-bsdmp): Depend on install-info.
33533 ($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
33534 into source directory.
33535 (distclean, mostlyclean): New targets.
33536 (maintainer-clean): New name for realclean.
33537 (uninstall): New target.
33538 (TAGS): New target.
33539 (info, dvi): New targets.
33540 (.PHONY): Assign.
33541
33542 * Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
33543
33544 * mp{n,z,f,bsd}/move-if-change: Delete.
33545
33546 * mpbsd/Makefile.in (stamp-stddefh): Delete target.
33547
33548 * Makefile.in (.c.o): Pass CFLAGS last.
33549 * mpbsd/Makefile.in (.c.o): Likewise.
33550 * mpf/Makefile.in (.c.o): Likewise.
33551 * mpq/Makefile.in (.c.o): Likewise.
33552 * mpz/Makefile.in (.c.o): Likewise.
33553 * mpn/Makefile.in (.c.o): Likewise.
33554 (.S.o): Likewise.
33555
33556 * memory.c: Change allocation error message.
33557
33558 * Makefile.in (install): Prefix gmp.h with $(srcdir).
33559 (install-bsdmp): Prefix mp.h with $(srcdir).
33560
33561 * mp{n,z,f,bsd}/{configure,config.sub}: Delete.
33562
33563 * Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
33564 (install targets): Install gmp.info-N.
33565
33566 Sat Feb 24 03:36:52 1996 Torbjorn Granlund <[email protected]>
33567
33568 * mpf/get_str.c: Fix typo.
33569
33570 * mpz/legendre.c: Clarify expression with extra parens.
33571
33572 * version.c (gmp_version): Not static.
33573
33574 * mpf/iset_str.c: Properly return error code.
33575
33576 * mpf/add.c: Delete unused variables.
33577 * mpf/inp_str.c: Likewise.
33578 * mpq/get_d.c: Likewise.
33579
33580 * mpn/generic/dump.c: #include <stdio.h>.
33581 * mpf/dump.c: Likewise.
33582 * mpf/set_str.c: #include <ctype.h>.
33583 (strtol): Declare.
33584
33585 * gmp.h: mpn_sqrt => mpn_sqrtrem.
33586
33587 * Makefile.in (clean, realclean): Clean in mpbsd.
33588 (check): Test in mpf.
33589
33590 * mpf/Makefile.in (clean): Clean in tests.
33591 * mpq/Makefile.in (clean): Clean in tests.
33592
33593 * mpf/tests/Makefile.in: New file.
33594 * mpf/tests/configure.in: New file.
33595 * mpf/tests/t-addsub.c: New file.
33596
33597 * mpf/sub_ui.c: Simply call mpf_sub for now.
33598
33599 * mpf/sub.c: Increase prec by 1.
33600 * mpf/ui_sub.c: Likewise.
33601
33602 Fri Feb 23 00:59:54 1996 Torbjorn Granlund <[email protected]>
33603
33604 * mpf/ui_sub.c: Fix typos.
33605
33606 * mpf/get_str.c: When allocating space for tmp, allow for an extra
33607 limb. In code for fraction conversion, add special case for bases
33608 that are a power of 2.
33609
33610 * mpf/out_str.c: Output leading "0.".
33611 Default base to 10, before computing string allocation.
33612
33613 * mpf/get_str.c: Make variables for string size have type size_t.
33614 * gmp.h: Corresponding change.
33615
33616 * mpf/random2.c: Allow creation of prec+1 large mantissas.
33617
33618 * mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
33619 Fix typo in MPN_COPY offset.
33620 * mpf/sub_ui.c: Analogous changes.
33621
33622 * mpf/set_prec.c: Rewrite.
33623
33624 * mpf/init2.c: Compute precision as in set_prec.c.
33625
33626 * mpf/div_2exp.c: Special case for u == 0.
33627 * mpf/mul_2exp.c: Likewise. Write r->_mp_size always.
33628
33629 * mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
33630 * mpf/sqrt.c: Likewise. When computing new exponent, round quotient
33631 towards -infinity.
33632
33633 * mpf/add.c: Fix typos.
33634 * mpf/sub.c: Fix typos.
33635
33636 Thu Feb 22 00:24:48 1996 Torbjorn Granlund <[email protected]>
33637
33638 * mpz/Makefile.in (stamp-stddefh): Delete target.
33639 (test): Delete target.
33640 * Makefile.in (stamp-stddefh): Delete target.
33641 (cre-stddefh.o): Delete target.
33642 (gmp.dvi): Set TEXINPUTS before invoking tex.
33643
33644 * cre-stddefh.c: Delete.
33645
33646 * mpz/sqrt.c: Fix typo.
33647
33648 * mpz/powm.c: Special case for mod == 0.
33649 * mpz/powm_ui.c: Likewise.
33650
33651 * mpz/get_si.c: Handle -0x80000000 correctly.
33652
33653 * mpz/inp_str.c: Now returns size_t.
33654 Make it return number of bytes read or error indication.
33655 * mpf/inp_str.c: Likewise.
33656
33657 * mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
33658 * mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
33659 * mpz/inp_binary.c: Delete.
33660
33661 * mpn/Makefile.in (XCFLAGS): Remove variable.
33662 (.c.o): Don't pass XCFLAGS.
33663 (SFLAGS): Set to nothing.
33664 (.S.o): Pass SFLAGS, not XCFLAGS.
33665
33666 * mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
33667
33668 * mpf/out_str.c: Make return number of bytes written or error
33669 indication.
33670 * mpz/out_str.c: Likewise.
33671 * gmp.h: Corresponding changes.
33672
33673 * gmp.h (__mpz_struct): mp_size_t => int.
33674 (__mpq_struct): Likewise.
33675 (__mpf_struct): Likewise.
33676 (mp_size_t): int => long int.
33677
33678 * mpn/cray: New directory.
33679 * mpn/cray/gmp-mparam.h: New file.
33680 * mpn/configure.in: Recognize cray variants.
33681
33682 * Makefile.in: Set defaults for prefix, libdir, etc.
33683 (install): New target.
33684 (install-bsdmp): New target.
33685 (gmp.html): New target.
33686
33687 * stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
33688
33689 Wed Feb 21 04:35:02 1996 Torbjorn Granlund <[email protected]>
33690
33691 * gmp.h: Sort mpn declarations.
33692 (mpn_gcdext): Add declaration.
33693
33694 * mpn/generic/divrem_1.c: New file.
33695 * mpn/Makefile.in (divrem_1.o): New rule.
33696 * configure.in (functions): Add divrem_1.
33697
33698 * mpn/generic/divmod.c: Delete file.
33699 * mpn/configure.in (functions): Delete divmod.
33700 * Makefile.in (divmod.o): Delete rule.
33701 * gmp.h (mpn_divmod): New #define.
33702
33703 * gmp.h (mpn_next_bit_set): Delete spurious declaration.
33704
33705 * mpn/generic/divrem.c (default case): In code assigning
33706 most_significant_q_limb, move reassignment of n0 into if statement.
33707
33708 * gmp.h (mpf_inp_str): Fix typo.
33709 (mpf_out_str): Make prototype match reality.
33710 * mpf/inp_str.c: New file.
33711 * mpf/out_str.c: New file.
33712 * mpf/Makefile.in: Compile new files.
33713
33714 * mpn/Makefile.in (dump.o): Fix dependency path.
33715 (inlines.o): Likewise.
33716
33717 * mpn/configure.in: Make m68060 be the same as m68000. Clean up
33718 m68k configs.
33719
33720 Tue Feb 20 01:35:11 1996 Torbjorn Granlund <[email protected]>
33721
33722 * mpn/generic/sqrtrem.c: Renamed from sqrt.
33723 * mpn/configure.in (functions): Corresponding change.
33724 * mpn/Makefile.in: Likewise.
33725 * mpz/sqrtrem.c: Likewise.
33726 * mpz/sqrt.c: Likewise.
33727 * mpn/generic/perfsqr.c: Likewise.
33728
33729 * Makefile.in (clean): Also remove libmp.a.
33730 Don't compile cre-conv-tab.c or mp_bases.c.
33731 cre-conv-tab.c: Delete file.
33732 (gmp.ps): New rule.
33733
33734 * mpn/mp_bases.c: New file.
33735 * mpn/Makefile.in: Compile mp_bases.c.
33736
33737 * mpz/set_str.c: Skip initial whitespace.
33738 * mpf/set_str.c: Likewise.
33739 * mpbsd/xtom.c: Likewise.
33740
33741 * gmp.h: Add missing mpz declarations.
33742 Delete all formal parameter names from declarations.
33743
33744 * mpn/Makefile.in: Add dependencies for .c files.
33745
33746 * Makefile.in (check): Write recursive make calls separately, not as
33747 a loop.
33748 (FLAGS_TO_PASS): New variable. Use it for most recursive makes.
33749
33750 Mon Feb 19 01:02:20 1996 Torbjorn Granlund <[email protected]>
33751
33752 * mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
33753 lines starting with #.
33754 (CPP): Set to $(CC) -E to avoid gcc dependency.
33755
33756 * mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
33757
33758 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
33759 code.
33760 * mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
33761
33762 * gmp.h: Fix typos in #defines of recently added mpn functions.
33763
33764 * mpz/inp_str.c: Skip all whitespace, not just plain space.
33765 * mpbsd/min.c: Likewise.
33766
33767 * mpn/configure.in (functions): Add gcdext.
33768 * mpn/generic/gcdext.c: New file.
33769
33770 * mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
33771
33772 * gmp.h: Surround mpn declarations with extern "C" { ... }.
33773
33774 * Makefile.in (check): New target.
33775
33776 * mpq/get_d.c: Update comments. Use rsize instead of dsize + N_QLIMBS
33777 when possible. Add special case for nsize == 0.
33778
33779 * gmp.h (mpq_get_d): Add declaration.
33780 (mpq_canonicalize): Likewise.
33781 (mpq_cmp_ui): Likewise.
33782 (mpf_diff): Likewise.
33783 (mpf_ui_sub): Likewise.
33784 (mpf_set_prec): Likewise.
33785 (mpf_random2): Likewise.
33786
33787 * gmp.h (mpz_cmp_ui): New #define.
33788 (mpz_cmp_si): New #define.
33789 (mpq_cmp_ui): New #define.
33790 (mpz_sign): New #define.
33791 (mpq_sign): New #define.
33792 (mpf_sign): New #define.
33793 (mpq_numref): New #define.
33794 (mpq_denref): New #define.
33795
33796 * mpq/set_z.c: File deleted.
33797 * mpq/Makefile.in: Corresponding changes.
33798
33799 Sun Feb 18 01:34:47 1996 Torbjorn Granlund <[email protected]>
33800
33801 * mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
33802
33803 * mpz/inp_binary.c: Default stream to stdin.
33804 * mpz/inp_str.c: Likewise.
33805 * mpz/inp_raw.c: Likewise.
33806 * mpz/out_binary.c: Default stream to stdout.
33807 * mpz/out_raw.c: Likewise.
33808 * mpz/out_str.c: Likewise.
33809
33810 * mpbsd/realloc.c: New file.
33811 * mpbsd/Makefile.in: Corresponding changes.
33812
33813 * mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
33814 * mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
33815
33816 * mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
33817 spaces in each 10th position.
33818 * mpbsd/xtom.c: Rewrite (base on mpz/set_str).
33819
33820 * mpq/tests/Makefile.in (st-cmp): New file.
33821 * mpq/tests/configure.in (srcname): New file.
33822
33823 * mpz/tests/configure.in (srcname): Fix typo.
33824
33825 * mpq/cmp.c: Add check using number of significant bits, to avoid
33826 general multiplication.
33827
33828 Sat Feb 17 11:58:30 1996 Torbjorn Granlund <[email protected]>
33829
33830 * mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
33831
33832 * mpq/tests: New directory.
33833 * mpq/tests/t-cmp.c: New file.
33834 * mpq/tests/t-cmp_ui.c: New file.
33835
33836 * mpz/tests/dive.c (main): Generate zero numerator.
33837 (get_random_size) : Delete.
33838
33839 * mpz/divexact.c: Add special case for 0/x.
33840
33841 * gmp.h (mpz_mod): Add declaration.
33842
33843 Fri Feb 16 18:18:39 1996 Andreas Schwab <[email protected]>
33844
33845 * mpn/m68k/*: Rewrite code not to use the INSN macros.
33846 (L): New macro to properly prefix local labels for ELF.
33847
33848 Fri Feb 16 00:20:56 1996 Torbjorn Granlund <[email protected]>
33849
33850 * gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
33851 fields.
33852 * mpn/generic/inlines.c (_FORCE_INLINES): New #define. Delete
33853 conditional __GNUC__.
33854 * gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
33855 Only define these if __GNUC__ || _FORCE_INLINES.
33856 * mpf/random2.c: Add missing parameter in non-ANSI header.
33857 * mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
33858 in AIX compilers.
33859 * mpq/get_d.c: #define N_QLIMBS.
33860 * mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
33861 * stack-alloc.c: Cast void* pointer to char* before doing arithmetic
33862 on it.
33863
33864 * Makefile.in (mpbsd/libmpbsd.a): New rule.
33865 * configure.in (configdirs): Add mpbsd.
33866
33867 * gmp.h: Add declarations for a few missing mpn functions.
33868
33869 * Makefile.in (libmp.a): New rule.
33870
33871 * mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
33872 * gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
33873 * mp.h: Likewise. Update typedefs from gmp.h.
33874 * mpbsd/configure.in: New file.
33875 * mpbsd/Makefile.in: New file.
33876 * mpbsd/configure: Link to master configure.
33877 * mpbsd/config.sub: Link to master config.sub.
33878
33879 * Makefile.in: Set RANLIB_TEST.
33880 * (libgmp.a): Use it.
33881 * (libgmp.a): Do ranlib before moving the libgmp.a to the build
33882 directory.
33883 * mp?/Makefile.in: Don't use or set RANLIB.
33884
33885 Thu Feb 15 16:38:41 1996 Torbjorn Granlund <[email protected]>
33886
33887 * mpz/add_ui.c: MP_INT => mpz_t.
33888 * mpz/cmp_ui.c: Likewise.
33889 * mpz/fac_ui.c: Likewise.
33890 * mpz/inp_binary.c: Likewise.
33891 * mpz/inp_raw.c: Likewise.
33892 * mpz/legendre.c: Likewise.
33893 * mpz/jacobi.c: Likewise.
33894 * mpz/out_binary.c: Likewise.
33895 * mpz/out_raw.c: Likewise.
33896 * mpz/random2.c: Likewise.
33897 * mpz/random.c: Likewise.
33898 * mpz/realloc.c: Likewise.
33899
33900 * mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
33901 __mpz_odd_less1_2factor => mpz_scan1(X,1).
33902 * mpz/ntsup.c: File deleted.
33903 * mpz/Makefile.in: Corresponding changes.
33904
33905 * mpz/pprime_p: Use mpz_scan1 to avoid looping.
33906
33907 * mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
33908 * mpz/pprime_p.c: Pass long to *_ui functions.
33909 * mpz/gcdext.c: Likewise.
33910 * mpz/fdiv_r_2exp.c: Likewise.
33911 * mpz/fac_ui.c: Likewise.
33912
33913 * mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
33914
33915 * mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
33916
33917 * mpz/cmp_ui.c: #undef mpz_cmp_ui.
33918 * mpz/cmp_si.c: #undef mpz_cmp_si.
33919 * gmp.h (mpz_cmp_ui): New #define.
33920 (mpz_cmp_si): New #define.
33921
33922 Wed Feb 14 22:11:24 1996 Torbjorn Granlund <[email protected]>
33923
33924 * gmp.h: Test __cplusplus in addition to __STDC__.
33925 * gmp-impl.h: Likewise.
33926
33927 * gmp.h: Surround declarations with extern "C" { ... }.
33928
33929 Tue Feb 13 15:20:45 1996 Torbjorn Granlund <[email protected]>
33930
33931 * mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
33932 * mpz/tdiv_r_2exp.c: Likewise.
33933
33934 * mpz/fdiv_r_2exp.c: New file.
33935 * mpz/fdiv_q_2exp.c: New file.
33936 * mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
33937 * mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
33938 * mpz/Makefile.in: Corresponding changes.
33939
33940 * mpz/scan0.c,scan1.c: New files.
33941 * mpz/Makefile.in: Compile them.
33942
33943 * gmp.h (mpn_normal_size): Delete.
33944
33945 * config.guess: Update from Cygnus version.
33946
33947 * mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
33948 * mpn/m68k/lshift.S: Likewise.
33949
33950 * mpn/configure.in: Fix configuration for plain 68000.
33951
33952 Mon Feb 12 01:06:06 1996 Torbjorn Granlund <[email protected]>
33953
33954 * mpz/tests/t-powm.c: Generate negative BASE operand.
33955
33956 * mpz/powm.c: Make result always positive.
33957
33958 Sun Feb 11 01:44:56 1996 Torbjorn Granlund <[email protected]>
33959
33960 * mpz/tests/*.c: Add t- prefix.
33961 * mpz/tests/Makefile.in: Corresponding changes.
33962 * mpz/tests/configure.in: Update srctrigger.
33963
33964 * mpz/tests/gcd.c: Generate negative operands.
33965 * mpz/tests/gcd2.c: Likewise.
33966
33967 * mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
33968
33969 Thu Feb 8 17:16:12 UTC 1996 Ken Weber <[email protected]>
33970
33971 * mp{z,n}/gcd.c: Change mpn_gcd interface.
33972 * gmp.h: Ditto.
33973 * gmp.texi: update documentation.
33974
33975 Mon Feb 7 23:58:43 1996 Andreas Schwab <[email protected]>
33976
33977 * mpn/m68k/{lshift,rshift}.S: New files.
33978 * mpn/m68k/syntax.h: New ELF_SYNTAX macros.
33979 (MEM_INDX, R, PROLOG, EPILOG): New macros.
33980 * mpn/m68k/*.S: Use R macro with register name. Use PROLOG and EPILOG
33981 macros. Rename `size' to `s_size' or s1_size to avoid clash with ELF
33982 .size directive.
33983 * mpn/configure.in: New target m68k-*-linux*.
33984
33985 Wed Feb 7 07:41:31 1996 Torbjorn Granlund <[email protected]>
33986
33987 * Makefile.in (cre-conv-tab): Workaround for SunOS make.
33988
33989 * mpz/tests/reuse.c: New file.
33990 * mpz/tests/Makefile.in: Handle reuse.c.
33991
33992 Tue Feb 6 11:56:24 UTC 1996 Ken Weber <[email protected]>
33993
33994 * mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
33995
33996 Tue Feb 6 01:36:39 1996 Torbjorn Granlund <[email protected]>
33997
33998 * gmp.h (mpz_divexact): Delete parameter names.
33999 (mpz_lcm): Delete spurious declaration.
34000
34001 * mpz/dmincl.c: Fix typo.
34002
34003 Mon Feb 5 01:11:56 1996 Torbjorn Granlund <[email protected]>
34004
34005 * mpn/generic/gcd.c (gcd_2): Declare consistently.
34006
34007 * mpz/tdiv_q.c: Optimize division by a single-limb divisor.
34008 * mpz/dmincl.c: Likewise.
34009
34010 * mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
34011 * mpz/sub.c: Likewise.
34012 * mpn/generic/sqrt.c: Likewise.
34013
34014 * mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
34015 destination arrays.
34016
34017 Fri Feb 2 02:21:27 1996 Torbjorn Granlund <[email protected]>
34018
34019 * mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
34020 * mpz/Makefile.in: Compile them.
34021
34022 * mpn/Makefile.in (INCLUDES): Don't search in `generic'.
34023
34024 Thu Feb 1 02:15:11 1996 Torbjorn Granlund <[email protected]>
34025
34026 Change from Ken Weber:
34027 * mpz/divexact.c: Make it work when quot is identical to either input.
34028
34029 * mpf/ui_sub.c: New file.
34030 * mpf/Makefile.in: Compile it.
34031
34032 * gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
34033 * mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
34034 these use MPZ_TMP_INIT.
34035 * mpz/mod.c: Likewise.
34036 * mpq/{add,sub}.c: Likewise.
34037 * mpq/canonicalize: Likewise.
34038
34039 * mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
34040 * mpq/canonicalize.c: Likewise.
34041
34042 Wed Jan 31 01:45:00 1996 Torbjorn Granlund <[email protected]>
34043
34044 * mpn/generic/gcd.c: Misc changes from Ken.
34045
34046 * mpz/tests/gcd2.c: New file.
34047 * mpz/tests/Makefile.in: Handle gcd2.c.
34048
34049 * mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
34050 not orig_vsize. Fix parameter declaration.
34051
34052 * mpz/mod_ui.c: Delete file.
34053 * mpz/Makefile.in: Don't try to compile mod_ui.
34054
34055 * mpz/cdiv_*_ui.c): Make them work right.
34056 * gmp.h: Declare cdiv*.
34057
34058 Tue Jan 30 02:22:56 1996 Torbjorn Granlund <[email protected]>
34059
34060 * mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
34061 cdiv_r_ui.c,cdiv_ui.c}: New files.
34062 * mpz/Makefile.in: Compile them.
34063
34064 * All files: Make file permissions right.
34065
34066 Changes from Ken Weber:
34067 * mpn/generic/accelgcd.c: Delete.
34068 * mpn/generic/bingcd.c: Delete.
34069 * mpn/generic/numbits.c: Delete.
34070 * mpn/generic/gcd.c: New file.
34071 * mpn/configure.in (functions): Update accordingly.
34072 * mpz/divexact.c: New file.
34073 * mpz/Makefile.in: Compile divexact.c.
34074 * mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
34075 * gmp.h: declare new functions, delete obsolete declarations.
34076 * mpz/tests/dive.c: New file.
34077 * mpz/tests/Makefile.in: Handle dive.c.
34078
34079 Mon Jan 29 03:53:24 1996 Torbjorn Granlund <[email protected]>
34080
34081 * mpz/random.c: Handle negative SIZE parameter.
34082
34083 * mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
34084 * mpz/tests/tst-mdm(_ui).c: Delete.
34085 * mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
34086 * mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
34087 * mpz/tests/Makefile.in: Corresponding changes.
34088 * mpz/tests/configure.in: Update srctrigger.
34089
34090 * mpn/generic/divmod.c: Update from divrem.
34091 * mpn/generic/divrem.c: Misc cleanups.
34092
34093 Sun Jan 28 03:25:08 1996 Torbjorn Granlund <[email protected]>
34094
34095 * All files: Use new TMP_ALLOC interface.
34096
34097 * mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
34098
34099 * mpz/tests/powm_ui.c: New file.
34100 * mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
34101
34102 * Makefile.in: Update dependency list.
34103 * mpf/Makefile.in: Likewise.
34104 * mpz/Makefile.in: Likewise.
34105 * mpq/Makefile.in: Likewise.
34106 * Makefile.in: Set RANLIB simply to ranlib, and allow configure
34107 to override it.
34108
34109 * mpz/Makefile.in (conf): Delete spurious target.
34110 (mp_bases.c): Delete.
34111 (cre-conv-tab rules): Delete.
34112
34113 * Makefile.in (cre-conv-tab): Greatly simplify.
34114
34115 Sat Jan 27 13:38:15 1996 Torbjorn Granlund <[email protected]>
34116
34117 * stack-alloc.c: New file.
34118 * stack-alloc.h: New file.
34119
34120 * gmp.h (__gmp_inline): Define using __inline__.
34121
34122 Thu Jan 25 00:28:37 1996 Torbjorn Granlund <[email protected]>
34123
34124 * mpn/generic/scan0.c: New file.
34125 * mpn/generic/scan1.c: Renamed from next_bit.c.
34126 * mpn/configure.in (functions): Include scan0 and scan1.
34127
34128 * mpn/m68k/*: #include sysdep.h. Use C_GLOBAL_NAME.
34129
34130 * configure: Update from Cygnus version.
34131 * config.guess: Likewise.
34132 * config.sub: Likewise.
34133 * configure: Pass --nfp to recursive configures.
34134
34135 * mpz/tests/tst-*.c: Adjust SIZE and reps.
34136
34137 * mpz/powm.c: Move esize==0 test earlier.
34138 In final reduction of rp,rsize, don't call mpn_divmod unless
34139 reduction is really needed.
34140
34141 * mpz/tests/tst-powm.c: Fix thinko in checking code.
34142
34143 * All files: Get rid of `__' prefix from mpn_* calls and declarations.
34144 * gmp.h: #define __MPN.
34145 * gmp.h: Use __MPN in #defines for mpn calls.
34146
34147 * mpn/generic/mul_n.c: Prepend `i' to internal routines.
34148 * gmp-impl.h: Add #defines using __MPN for those internal routines.
34149
34150 * mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
34151
34152 Wed Jan 24 13:28:19 1996 Torbjorn Granlund <[email protected]>
34153
34154 * mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
34155 * mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
34156 * mpn/sparc32/v8/supersparc: New directory.
34157 * mpn/sparc32/v8/supersparc/udiv.S: New file.
34158
34159 Tue Jan 23 01:10:11 1996 Torbjorn Granlund <[email protected]>
34160
34161 This major contribution is from Ken Weber:
34162 * mpn/generic/accelgcd.c: New file.
34163 * mpn/generic/bdivmod.c: New file.
34164 * mpn/generic/bingcd.c: New file.
34165 * mpn/generic/gcd_1.c: Rewrite.
34166 * mpn/generic/numbits.c: New file (to go away soon).
34167 * mpz/gcd.c: Rewrite.
34168 * mpz/tests/tst-gcd.c (SIZE): Now 128.
34169 * gmp.h: Declare new functions.
34170 * mpn/configure.in (functions): List new files.
34171 * gmp-impl.h (MPN_SWAP): Delete.
34172 (MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
34173 (MPN_COMPL_INCR, MPN_COMPL): Delete.
34174
34175 Mon Jan 22 02:04:59 1996 Torbjorn Granlund <[email protected]>
34176
34177 * gmp.h (mpn_name): New #define.
34178
34179 * mpn/m88k/mc88110/addmul_1.s: New file.
34180 * mpn/m88k/mc88110/add_n.S: New file.
34181 * mpn/m88k/mc88110/sub_n.S: New file.
34182
34183 * mpn/m88k/sub_n.s: Correctly initialize carry.
34184
34185 * mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
34186
34187 Sun Jan 21 00:04:35 1996 Torbjorn Granlund <[email protected]>
34188
34189 * mpn/sparc64/addmul_1.s: New file.
34190 * mpn/sparc64/submul_1.s: New file.
34191 * mpn/sparc64/rshift.s: New file.
34192
34193 Sat Jan 20 00:32:54 1996 Torbjorn Granlund <[email protected]>
34194
34195 * mpz/iset.c: Fix typo introduced Dec 25.
34196
34197 Wed Jan 17 13:16:44 1996 Torbjorn Granlund <[email protected]>
34198
34199 * config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
34200 * config/mt-sparcv8-gcc: Delete.
34201 * configure.in: Corresponding changes.
34202
34203 Tue Jan 16 16:31:01 1996 Torbjorn Granlund <[email protected]>
34204
34205 * gmp-impl.h: #include alloca.h when necessary.
34206
34207 * longlong.h: Test __alpha instead of __alpha__, since the former
34208 is the standard symbol.
34209
34210 Mon Jan 15 18:06:57 1996 Torbjorn Granlund <[email protected]>
34211
34212 * mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
34213 * mpn/sparc64/lshift.s: New file.
34214
34215 Fri Dec 29 17:34:03 1995 Torbjorn Granlund <[email protected]>
34216
34217 * mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
34218 * mpn/x86/pentium/sub_n.S: Likewise.
34219
34220 Thu Dec 28 03:16:57 1995 Torbjorn Granlund <[email protected]>
34221
34222 * mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
34223 of loop induction variable and load insn at beginning of loop.
34224 * mpn/x86/pentium/addmul_1.S: Likewise.
34225 * mpn/x86/pentium/submul_1.S: Likewise.
34226
34227 Mon Dec 25 23:22:55 1995 Torbjorn Granlund <[email protected]>
34228
34229 * All files: Prefix user-visible structure fields with _mp_.
34230
34231 Fri Dec 22 20:42:17 1995 Torbjorn Granlund <[email protected]>
34232
34233 * mpn/configure.in (m68k configs): Terminate path variable with
34234 plain "m68k".
34235
34236 Fri Dec 22 03:29:33 1995 Torbjorn Granlund <[email protected]>
34237
34238 * mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
34239 clean things up.
34240
34241 * mpn/configure.in (m68k configs): Update #include path for new
34242 mpn directory organization.
34243
34244 Tue Dec 12 02:53:02 1995 Torbjorn Granlund <[email protected]>
34245
34246 * gmp.h: Prefix all structure field with _mp_.
34247 * gmp-impl.h: Define access macros for these fields.
34248
34249 Sun Dec 10 00:47:17 1995 Torbjorn Granlund <[email protected]>
34250
34251 * mpn/alpha/addmul_1.s: Prefix labels with `.'.
34252 * mpn/alpha/submul_1.s: Likewise.
34253 * mpn/alpha/[lr]shift.s: Likewise.
34254 * mpn/alpha/udiv_qrnnd.S: Likewise.
34255 * mpn/alpha/ev5/[lr]shift.s: Likewise.
34256
34257 * mpn/alpha/ev5/lshift.s: Fix typos.
34258
34259 Fri Dec 1 14:28:20 1995 Torbjorn Granlund <[email protected]>
34260
34261 * mpn/Makefile.in (.SUFFIXES): Define.
34262
34263 Wed Nov 29 23:11:57 1995 Torbjorn Granlund <[email protected]>
34264
34265 * mpn/sparc64/{add_n.s, sub_n.s}: New files.
34266
34267 Tue Nov 28 06:03:13 1995 Torbjorn Granlund <[email protected]>
34268
34269 * mpn/x86/syntax.h: Handle ELF_SYNTAX.
34270 Rename GAS_SYNTAX => BSD_SYNTAX.
34271
34272 * mpn/configure.in: Handle linuxelf and SysV for x86 variants.
34273
34274 Mon Nov 27 01:32:12 1995 Torbjorn Granlund <[email protected]>
34275
34276 * mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
34277
34278 Sun Nov 26 04:30:47 1995 Torbjorn Granlund <[email protected]>
34279
34280 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
34281
34282 * mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
34283 * mpn/sparc32/sub_n.S: Likewise.
34284
34285 Fri Nov 17 00:18:46 1995 Torbjorn Granlund <[email protected]>
34286
34287 * mpn/configure.in: Handle m68k on NextStep.
34288
34289 Thu Nov 16 02:30:26 1995 Torbjorn Granlund <[email protected]>
34290
34291 * mpn: Reorganize machine-specific directories.
34292 * mpn/configure.in: Corresponding changes.
34293 (sh, sh2): Handle these.
34294 (m68k targets): Create asm-syntax.h.
34295
34296 Thu Nov 9 02:20:50 1995 Torbjorn Granlund <[email protected]>
34297
34298 * mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
34299 (____mpn_mul_n): Likewise.
34300
34301 Tue Nov 7 03:25:12 1995 Torbjorn Granlund <[email protected]>
34302
34303 * mpf/get_str.c: In exponentiation code (two places), don't swap
34304 input and output areas when calling mpn_mul_1.
34305 * mpf/set_str.c: Likewise.
34306
34307 Fri Nov 3 02:35:58 1995 Torbjorn Granlund <[email protected]>
34308
34309 * mpf/Makefile.in: Make sure all objects are listed in dependency list;
34310 delete spurious entries.
34311
34312 * mpf/mul.c: Handle U or V being 0. Allow prec+1 for result precision.
34313
34314 * mpf/set_prec.c: New computation of limb precision.
34315 * mpf/set_dfl_prec.c: Likewise.
34316
34317 * mpf/random2.c: Fix typo computing exp.
34318 * mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
34319 the user-requested number of digits, n_digits.
34320
34321 Thu Nov 2 16:25:07 1995 Torbjorn Granlund <[email protected]>
34322
34323 * mpn/generic/divrem.c (case 2): Don't move np vector back, it is
34324 never read.
34325 (default case): Put most significant limb from np in new variable n2;
34326 decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
34327
34328 Wed Nov 1 02:59:53 1995 Torbjorn Granlund <[email protected]>
34329
34330 * mpn/sparc/[lr]shift.S: New files.
34331
34332 Tue Oct 31 00:08:12 1995 Torbjorn Granlund <[email protected]>
34333
34334 * mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
34335
34336 * gmp-impl.h (assert): Delete definition.
34337
34338 * mpf/sub.c: Delete all assert calls. Delete variable `cy'.
34339
34340 * mpf/neg.c: Use prec+1 as precision. Optimize for when arguments
34341 are the same.
34342 * mpf/abs.c: Likewise.
34343 * mpf/{set,neg,abs}.c: Make structure and variable names similar.
34344
34345 Mon Oct 30 12:45:26 1995 Torbjorn Granlund <[email protected]>
34346
34347 * mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
34348 * mpn/generic/random2.c (random): Likewise.
34349
34350 Sun Oct 29 01:54:28 1995 Torbjorn Granlund <[email protected]>
34351
34352 * mpf/div.c: Special handle U or V being 0.
34353
34354 * mpf/random2.c: New file.
34355
34356 * longlong.h (i860 rshift_rhlc): Define.
34357 (i960 udiv_qrnnd): Define.
34358 (i960 count_leading_zeros): Define.
34359 (i960 add_ssaaaa): Define.
34360 (i960 sub_ddmmss): Define.
34361 (i960 rshift_rhlc): Define.
34362
34363 Sat Oct 28 19:09:15 1995 Torbjorn Granlund <[email protected]>
34364
34365 * mpn/pentium/rshift.S: Fix and generalize condition for when to use
34366 special code for shift by 1.
34367 * mpn/pentium/lshift.S: Likewise.
34368
34369 Thu Oct 26 00:02:56 1995 Torbjorn Granlund <[email protected]>
34370
34371 * gmp.h: #undef __need_size_t.
34372 * mp.h: Update from gmp.h.
34373
34374 Wed Oct 25 00:17:27 1995 Torbjorn Granlund <[email protected]>
34375
34376 * mpf/Makefile.in: Compile set_prec.c.
34377 * mpf/realloc.c: Delete this file.
34378 * mpf/Makefile.in: Delete mentions of realloc.c.
34379
34380 * gmp.h (__mpf_struct): Get rid of `alloc' field.
34381 * mpf/clear.c: Likewise.
34382 * mpf/init*.c: Likewise.
34383 * mpf/set_prec.c: Likewise.
34384 * mpf/iset*.c: Likewise.
34385
34386 * mpf/iset_str.c: New file.
34387
34388 * mpn/configure.in: Handle pyramid.
34389
34390 * mpf/set.c: Use prec+1 as precision.
34391
34392 * mpf/set_prec.c: New file.
34393
34394 Tue Oct 24 00:56:41 1995 Torbjorn Granlund <[email protected]>
34395
34396 * mpn/generic/divrem.c: New file. Will replace mpn/generic/divmod.c
34397 when rest of source is converted.
34398 * mpn/configure.in (functions): Add `divrem'
34399 * mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
34400
34401 * mpf/get_str.c: Completely rewritten.
34402 * mpf/add.c: Fix several problems.
34403 * mpf/sub.c: Compare operands from most significant end until
34404 first difference, exclude skipped limbs from computation.
34405 Accordingly simplify normalization code.
34406 * mpf/set_str.c: Fix several problems.
34407 * mpf/dump.c: New file.
34408 * mpf/Makefile.in: Compile dump.c.
34409 * mpf/init2.c: Set prec field correctly.
34410
34411 Sun Oct 22 03:02:09 1995 Torbjorn Granlund <[email protected]>
34412
34413 * cre-conv-tab.c: #include math.h; don't declare log and floor.
34414
34415 Sat Oct 21 23:04:10 1995 Torbjorn Granlund <[email protected]>
34416
34417 * mpf/mul_ui.c: Handle U being 0.
34418
34419 Wed Oct 18 19:39:27 1995 Torbjorn Granlund <[email protected]>
34420
34421 * mpn/generic/set_str.c: Correctly handle input like "000000000000".
34422 Misc cleanups.
34423
34424 Tue Oct 17 15:14:13 1995 Torbjorn Granlund <[email protected]>
34425
34426 * longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
34427 appropriate.
34428
34429 Mon Oct 16 19:14:43 1995 Torbjorn Granlund <[email protected]>
34430
34431 * mpf/add.c: Rewrite.
34432 * mpf/set_str.c: New file. Needs more work.
34433
34434 Sat Oct 14 00:14:04 1995 Torbjorn Granlund <[email protected]>
34435
34436 * mpf/div_2exp.c: Vastly simplify.
34437 * mpf/mul_2exp.c: Likewise.
34438
34439 * mpf/sub.c: Rewrite.
34440
34441 * gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
34442
34443 * mpf/dump.c: Free allocated memory.
34444
34445 * gmp-impl.h (assert): Define.
34446
34447 Wed Oct 11 13:31:00 1995 Torbjorn Granlund <[email protected]>
34448
34449 * mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
34450
34451 Tue Oct 10 00:37:21 1995 Torbjorn Granlund <[email protected]>
34452
34453 * mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
34454
34455 * mpn/powerpc32/{lshift.s,rshift.s}: New files.
34456
34457 * configure.in: Fix typo.
34458
34459 Sat Oct 7 08:17:09 1995 Torbjorn Granlund <[email protected]>
34460
34461 * longlong.h (smul_ppmm): Correct type of __m0 and __m1.
34462
34463 Wed Oct 4 16:31:28 1995 Torbjorn Granlund <[email protected]>
34464
34465 * mpn/configure.in: Handle alphaev5.
34466 * mpn/ev4: New name for alpha subdir.
34467 * mpn/ev5: New subdir.
34468 * mpn/ev5/lshift.s: New file.
34469
34470 Tue Oct 3 15:06:45 1995 Torbjorn Granlund <[email protected]>
34471
34472 * mpn/alpha/mul_1.s: Avoid static increments of pointers; use
34473 corresponding offsets in ldq and stq instructions instead.
34474 (Loop): Swap cmpult and stq to save one cycle on EV5.
34475
34476 * mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
34477 submul_1.s}: Don't check results if NOCHECK is defined.
34478
34479 Mon Oct 2 11:40:18 1995 Torbjorn Granlund <[email protected]>
34480
34481 * longlong.h (mips umul_ppmm [32 and 64 bit versions]):
34482 Make new variants, based on GCC version number, that use `l' and `h'
34483 constraints instead of explicit mflo and mfhi instructions
34484
34485 Sun Oct 1 00:17:47 1995 Torbjorn Granlund <[email protected]>
34486
34487 * mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
34488 * mpn/mc88100/sub_n.s: Likewise.
34489
34490 * config/mt-m88110: New file.
34491 * configure.in: Use it.
34492
34493 * mpn/mc88110/mul_1.s: Fix thinko.
34494
34495 Sat Sep 30 21:28:19 1995 Torbjorn Granlund <[email protected]>
34496
34497 * mpz/set_d.c: Declare `size' at function start.
34498
34499 * experimental: New directory for mpx and mpz2.
34500
34501 * mpz/tdiv_q.c: Clarify comments.
34502 * mpz/{mod.c,mod_ui.c}: New file, for math mod function.
34503
34504 * mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
34505
34506 * mpn/sh/{add_n.s,sub_n.s}: New files.
34507
34508 * mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
34509
34510 * mpn/i960/{add_n.s,sub_n.s}: New files.
34511
34512 * mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
34513 to save cycles on EV5.
34514 * mpn/alpha/submul_1.s: Ditto.
34515 * mpn/alpha/mul_1.s: Ditto.
34516
34517 Thu Sep 28 02:48:59 1995 Torbjorn Granlund <[email protected]>
34518
34519 * gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
34520 _LONG_LONG_LIMB is defined.
34521
34522 * longlong.h (m88110): Test __m88110__, not __mc88110__
34523
34524 * mpn/mc88110/mul_1.s: Rewrite.
34525
34526 Tue Sep 26 23:29:05 1995 Torbjorn Granlund <[email protected]>
34527
34528 * config.sub: Update from current Cygnus version.
34529
34530 * mpn/configure.in: Recognize canonical m88*, not mc88*.
34531
34532 Fri Sep 22 14:58:05 1995 Torbjorn Granlund <[email protected]>
34533
34534 * mpz/set_d.c: New file.
34535 * mpz/Makefile.in: Build new files.
34536
34537 * mpq/get_d.c: Replace usage of scalbn with ldexp.
34538
34539 * mpn/{vax,i386}/gmp-mparam.h: New files.
34540 * gmp-impl.h (ieee_double_extract): Define here.
34541 * mpf/set_d.c (ieee_double_extract): Not here.
34542
34543 Thu Sep 21 00:56:36 1995 Torbjorn Granlund <[email protected]>
34544
34545 * longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
34546 (udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
34547 protect with new symbol LONGLONG_STANDALONE.
34548 (68000 umul_ppmm): Use %# prefix for immediate constants.
34549
34550 Wed Sep 20 15:36:23 1995 Torbjorn Granlund <[email protected]>
34551
34552 * mpn/generic/divmod_1.c: Handle
34553 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
34554 specifically also when normalization_steps != 0.
34555
34556 Mon Sep 18 15:42:30 1995 Torbjorn Granlund <[email protected]>
34557
34558 * mpq/get_d.c: New file.
34559
34560 Sun Sep 17 02:04:36 1995 Torbjorn Granlund <[email protected]>
34561
34562 * longlong.h (pyr): Botch up for now.
34563
34564 Sat Sep 16 00:11:50 1995 Torbjorn Granlund <[email protected]>
34565
34566 * mpn/clipper/mul_1.s: New file.
34567 * mpn/clipper/add_n.s: New file.
34568 * mpn/clipper/sub_n.s: New file.
34569 * mpn/configure.in: Handle clipper*-*-*.
34570
34571 * mpn/configure.in: Recognize rs6000-*-*.
34572
34573 Fri Sep 15 00:41:34 1995 Torbjorn Granlund <[email protected]>
34574
34575 * mpn/alpha/add_n.s: New file.
34576 * mpn/alpha/sub_n.s: New file.
34577
34578 * mpn/mips3: New name for mpn/r4000.
34579 * mpn/mips2: New name for mpn/r3000.
34580 * mpn/configure.in: Corresponding changes.
34581
34582 * mpn/generic/perfsqr.c (primes): Delete.
34583 (residue_map): Delete.
34584
34585 Thu Sep 14 00:07:58 1995 Torbjorn Granlund <[email protected]>
34586
34587 * mpn/r3000/sub_n.s: Fix typo.
34588
34589 * dm_trunc.c: Delete spurious file.
34590
34591 * mpz/out_binary.c: Fix typo.
34592
34593 * mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
34594
34595 * gmp-impl.h: For sparc and sgi, include alloca.h.
34596
34597 * mpn/z8000/mul_1.s: Replace `test r' with `and r,r'. Replace
34598 `ldk r,#0' with `xor r,r'.
34599
34600 Wed Sep 6 00:58:38 1995 Torbjorn Granlund <[email protected]>
34601
34602 * mpz/inp_binary.c: New file.
34603 * mpz/out_binary.c: New file.
34604 * mpz/Makefile.in: Build new files.
34605
34606 Tue Sep 5 22:53:51 1995 Torbjorn Granlund <[email protected]>
34607
34608 * gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
34609 and size fields.
34610
34611 Sat Sep 2 17:47:59 1995 Torbjorn Granlund <[email protected]>
34612
34613 * mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
34614 * mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
34615 derived from r4000 code.
34616
34617 Fri Sep 1 05:35:52 1995 Torbjorn Granlund <[email protected]>
34618
34619 * mpn/r3000/mul_1.s: Fix typo.
34620
34621 * mpn/powerpc32: Fix some old vs new mnemonic issues.
34622
34623 * mpn/powerpc32/{add_n.s,sub_n.s}: New files.
34624 * mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
34625
34626 Wed Aug 30 10:43:47 1995 Torbjorn Granlund <[email protected]>
34627
34628 * mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
34629 * mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
34630
34631 * config.guess: Update to latest FSF revision.
34632
34633 Mon Aug 28 02:18:13 1995 Torbjorn Granlund <[email protected]>
34634
34635 * mpz/out_str.c: Cast str to char * in fputs call.
34636
34637 * gmp-impl.h: Define UQItype, SItype, and USItype also
34638 when not __GNUC__.
34639
34640 Fri Aug 25 01:45:04 1995 Torbjorn Granlund <[email protected]>
34641
34642 * mpn/i386/syntax.h: Renamed from asm-syntax.h.
34643 * mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
34644 * mpn/configure.in: Corresponding changes.
34645
34646 Sun Aug 13 19:20:04 1995 Torbjorn Granlund <[email protected]>
34647
34648 * mpn/generic/random2.c: Test __hpux, not hpux.
34649
34650 Sat Apr 15 20:50:33 1995 Torbjorn Granlund ([email protected])
34651
34652 * mpn/sparc/add_n.S: Make it work for PIC.
34653 * mpn/sparc/sub_n.s: Likewise.
34654 * mpn/sparc8/addmul_1.S: Likewise.
34655 * mpn/sparc8/mul_1.S: Likewise.
34656 * mpn/i386/add_n.S: Likewise.
34657 * mpn/i386/sub_n.S: Likewise.
34658
34659 Thu Apr 13 23:15:03 1995 Torbjorn Granlund ([email protected])
34660
34661 * mpn/configure.in: Don't search power subdir for generic ppc configs.
34662 Add some ppc cpu-specific configs. Misc clean up.
34663
34664 Mon Apr 10 00:16:35 1995 Torbjorn Granlund ([email protected])
34665
34666 * mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
34667
34668 Sun Apr 9 12:38:11 1995 Torbjorn Granlund ([email protected])
34669
34670 * longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
34671 not in asm.
34672
34673 * mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
34674
34675 Tue Mar 28 00:19:52 1995 Torbjorn Granlund ([email protected])
34676
34677 * mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
34678
34679 Fri Mar 17 23:29:22 1995 Torbjorn Granlund ([email protected])
34680
34681 * longlong.h (SH umul_ppmm): Define.
34682
34683 Thu Mar 16 16:40:44 1995 Torbjorn Granlund ([email protected])
34684
34685 * mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
34686 to help CSE.
34687
34688 Fri Mar 10 20:03:49 1995 Torbjorn Granlund ([email protected])
34689
34690 * mpn/powerpc32/mul_1.s: Clear cy before entering loop.
34691 Rearrange loop to save a cycle.
34692 * mpn/powerpc32/addmul_1.s: New file.
34693 * mpn/powerpc32/submul_1.s: New file.
34694
34695 Fri Feb 17 22:44:45 1995 Torbjorn Granlund ([email protected])
34696
34697 * mpn/configure.in: Set target_makefile_frag for freebsd
34698 in new case stmt.
34699 * mpn/config/t-freebsd: New file.
34700 * mpn/Makefile.in: Add #### for frag insertion.
34701 (XCFLAGS): Clear by default.
34702 (.c.o, .S.o rules): Pass XCFLAGS.
34703
34704 Tue Feb 7 16:27:50 1995 Torbjorn Granlund ([email protected])
34705
34706 * longlong.h (68000 umul_ppmm): Merge improvements from henderson.
34707
34708 Tue Jan 24 04:23:20 1995 Torbjorn Granlund ([email protected])
34709
34710 * longlong.h (default umul_ppmm): Store input parameters in temporaries
34711 to avoid reading them twice.
34712 (default smul_ppmm): New definition.
34713
34714 Thu Dec 29 04:20:07 1994 Jim Meyering ([email protected])
34715
34716 * generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
34717 of unused variable.
34718 * generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
34719 * mpz/powm.c (pow): Likewise.
34720
34721 * mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
34722 to placate `gcc -Wall'.
34723 * mpz/ior.c (mpz_ior): Likewise.
34724
34725 Wed Dec 28 13:31:40 1994 Torbjorn Granlund ([email protected])
34726
34727 * mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
34728
34729 Mon Dec 26 17:15:36 1994 Torbjorn Granlund ([email protected])
34730
34731 * longlong.h: Test for more symbols, in __mc68000__ case.
34732
34733 * mpn/mpn/config.sub: Recognize m68060.
34734 * mpn/configure.in: Change mc* to m* for 68k targets.
34735 * mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
34736
34737 Mon Dec 19 01:56:30 1994 Torbjorn Granlund ([email protected])
34738
34739 * config.sub: Recognize pentium as a valid CPU.
34740 * mpn/configure.in: Handle pentium specifically, to use new assembly
34741 code.
34742
34743 Mon Dec 19 00:13:01 1994 Jim Meyering ([email protected])
34744
34745 * gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
34746 is defined.
34747 * gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
34748
34749 Mon Dec 19 00:04:54 1994 Kent Boortz ([email protected])
34750
34751 * Makefile.in (recursive makes): Pass CFLAGS.
34752
34753 Sun Dec 18 22:34:49 1994 Torbjorn Granlund ([email protected])
34754
34755 * mpn/pentium: New directory.
34756
34757 * mpz/pprime.c: Make sure to mpz_clear all temporaries.
34758
34759 * longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
34760 * configure.in: Handle supersparc*-.
34761 * config/mt-supspc-gcc: New file.
34762 * config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
34763
34764 Mon Dec 12 22:22:10 1994 Torbjorn Granlund ([email protected])
34765
34766 * mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
34767 #include sysdep.h before asm-syntax.h.
34768
34769 * mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
34770 * mpn/i386/asm-syntax.h: Likewise.
34771
34772 * mpn/mc68020/asm-syntax.h: New name for asm.h.
34773 * mpn/i386/asm-syntax.h: New name for asm.h.
34774
34775 Tue Dec 6 21:55:25 1994 Torbjorn Granlund ([email protected])
34776
34777 * mpz/array_init.c: Fix typo in declaration.
34778
34779 Fri Nov 18 19:50:52 1994 Torbjorn Granlund ([email protected])
34780
34781 * mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
34782
34783 Mon Nov 14 00:34:12 1994 Torbjorn Granlund ([email protected])
34784
34785 * mpn/generic/random2.c (random): Test for __svr4__.
34786
34787 Wed Oct 12 23:28:16 1994 Torbjorn Granlund ([email protected])
34788
34789 * cre-conv-tab.c (main): Avoid upper-case X in printf format string.
34790
34791 Tue Aug 23 17:16:35 1994 Torbjorn Granlund ([email protected])
34792
34793 * mpz/perfsqr.c: Use mpn_perfect_square_p.
34794 * mpn/generic/perfsqr.c: New file.
34795
34796 Wed Jul 6 13:46:51 1994 Torbjorn Granlund ([email protected])
34797
34798 * mpz/array_init.c: New file.
34799 * mpz/Makefile.in: Compile array_init.
34800 * gmp.h: Declare mpz_array_init.
34801
34802 Mon Jul 4 01:10:03 1994 Torbjorn Granlund ([email protected])
34803
34804 * mpz/add.c: Fix bogus comment.
34805 * mpz/sub.c: Likewise.
34806
34807 Sat Jul 2 02:14:56 1994 Torbjorn Granlund ([email protected])
34808
34809 * mpn/generic/pre_mod_1.c: New file.
34810 * mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
34811
34812 Fri Jul 01 22:10:19 1994 Richard Earnshaw ([email protected])
34813
34814 * longlong.h (arm umul_ppmm): Fix typos in last change. Mark
34815 hard-coded registers with "%|"
34816
34817 Thu Jun 30 03:59:33 1994 Torbjorn Granlund ([email protected])
34818
34819 * mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
34820 Use __mpn_mod_1.
34821 * mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
34822
34823 Wed Jun 29 18:45:41 1994 Torbjorn Granlund ([email protected])
34824
34825 * mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
34826
34827 * mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
34828
34829 * gmp.h: Use "defined (__STDC__)" consistently.
34830
34831 Tue Jun 28 18:44:58 1994 Torbjorn Granlund ([email protected])
34832
34833 * gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
34834
34835 * mpz/tests/Makefile.in: Use CFLAGS for linking.
34836
34837 * Makefile.in (CFLAGS): Use -O2 here.
34838 * mpn/Makefile (CFLAGS): Not here.
34839
34840 * mpq/cmp_ui.c: Fix typo.
34841 * mpq/canonicalize.c: Fix typo.
34842 * mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
34843 * mpn/generic/gcd_1.c: Fix braino in last change.
34844
34845 Mon Jun 27 16:10:27 1994 Torbjorn Granlund ([email protected])
34846
34847 * mpz/gcd_ui.c: Change return type and return result.
34848 Allow destination param to be NULL.
34849 * gmp.h: Corresponding change.
34850 * mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
34851
34852 Tue Jun 14 02:17:43 1994 Torbjorn Granlund ([email protected])
34853
34854 * mpn/i386/asm.h (ALIGN): Make it take a parameter.
34855 * mpn/i386/*.S: Use ALIGN to align all loops.
34856
34857 * mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
34858 (Makes old versions of GAS happy.)
34859
34860 Sat May 28 01:43:54 1994 Torbjorn Granlund ([email protected])
34861
34862 * Many files: Delete unused variables and labels.
34863 * mpn/generic/dump.c: cast printf width argument to int.
34864
34865 Wed May 25 00:42:37 1994 Torbjorn Granlund ([email protected])
34866
34867 * mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
34868 (xmod): Ignore return value of __mpn_divmod.
34869 (xmod): Improve normalization code.
34870
34871 Sat May 21 01:30:09 1994 Torbjorn Granlund ([email protected])
34872
34873 * mpz/gcdext.c: Cosmetic changes.
34874
34875 * mpz/fdiv_ui.c: New file.
34876
34877 Fri May 20 00:24:53 1994 Torbjorn Granlund ([email protected])
34878
34879 * mpz/tests/Makefile.in: Use explicit rules for running tests,
34880 not a shell loop.
34881 (clean): Delete stmp-*.
34882
34883 * mpz/Makefile.in: Update.
34884
34885 * mpz/div_ui.c: Don't include longlong.h.
34886 * mpz/dm_ui.c: Likewise.
34887
34888 * mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
34889 mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files. Code partly from deleted
34890 mdm.c, mdm_ui.c, etc, partly rewritten.
34891 * mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
34892 * mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
34893 mpz/mmod_ui.c: Delete.
34894
34895 * mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
34896 mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
34897 New names for files implementing truncating division.
34898 * mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
34899
34900 * mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
34901 instead.
34902 (clean): Delete tmp-*.
34903
34904 Thu May 19 01:37:44 1994 Torbjorn Granlund ([email protected])
34905
34906 * mpz/cmp.c: Call __mpn_cmp.
34907
34908 * mpz/popcount.c: Fix typo.
34909
34910 * mpz/powm_ui.c: Simplify main loop. Keep principal operand size
34911 smaller than MSIZE when possible.
34912 * mpz/powm.c: Likewise.
34913
34914 * mpn/generic/sqrt.c: Move alloca calls into where the memory is
34915 needed. Simplify.
34916
34917 * gmp.h: (_PROTO): New macro.
34918 Add many function declarations; use _PROTO macro in all declarations.
34919
34920 * mpf/*.c: Prepend mpn calls with __.
34921
34922 Wed May 18 20:57:06 1994 Torbjorn Granlund ([email protected])
34923
34924 * mpf/*ui*.c: Make ui argument `long' for consistency with mpz
34925 functions.
34926
34927 * mpf/div_ui.c: Simplify.
34928
34929 Tue May 17 01:05:14 1994 Torbjorn Granlund ([email protected])
34930
34931 * mpz/*.c: Prepend mpn calls with __.
34932
34933 * mpz/mul_ui.c: Use mpn_mul_1.
34934
34935 Mon May 16 17:19:41 1994 Torbjorn Granlund ([email protected])
34936
34937 * mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
34938 * mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
34939 Nuke use of LAB.
34940
34941 Sat May 14 14:21:02 1994 Torbjorn Granlund ([email protected])
34942
34943 * gmp-impl.h: Don't define abort here.
34944
34945 * mpz/pow_ui.c: Increase temporary allocation.
34946 * mpz/ui_pow_ui.c: Likewise.
34947
34948 * gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
34949
34950 * All Makefile.in: Delete spurious -I arguments.
34951 Update dependencies.
34952
34953 * mpz/popcount.c: New file.
34954 * mpz/hamdist.c: New file.
34955
34956 * All configure: Latest version from Cygnus.
34957
34958 * mpq/Makefile.in: New file.
34959 * mpq/configure.in: New file.
34960 * Makefile.in, configure.in: Enable compilation of mpq.
34961
34962 * mpq/set_z.c: Fix typos.
34963 * mpq/canonicalize.c: Fix typos.
34964 * mpq/cmp_ui.c: Fix typos.
34965
34966 * mpf/add_ui.c: Read U->D into UP always. Delete spurious MPN_COPY.
34967 * mpf/sub_ui.c: Likewise.
34968
34969 * gmp-impl.h: Don't redefine alloca.
34970
34971 * COPYING.LIB: Renamed from COPYING.
34972
34973 Wed May 11 01:45:44 1994 Torbjorn Granlund ([email protected])
34974
34975 * mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
34976 shift counts. Fix typo when testing negative_result.
34977 * mpz/powm.c: Likewise.
34978
34979 * mpz/ui_pow_ui.c: New file.
34980 * mpz/Makefile.in: Update.
34981
34982 * mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
34983
34984 * mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
34985 * mpz/gcd.c: Declare mpn_xmod.
34986
34987 * mpz/powm.c: Major changes to accommodate changed mpn semantics.
34988 * mpz/powm_ui.c: Update from mpz/powm.c.
34989
34990 * mpz/tests/tst-io.c: New file.
34991 * mpz/tests/tst-logic: New file.
34992 * mpz/tests/Makefile.in: Update.
34993
34994 * mpz/inp_str.c: Get base right when checking for first digit.
34995 * mpz/inp_str.c: Allocate more space for DEST when needed.
34996
34997 * mpz/com.c: Use mpn_add_1 and mpn_sub_1.
34998 * mpz/and.c, mpz/ior.c: Likewise. Simplify somewhat.
34999
35000 * mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
35001 Rename parameters to be consistent with mpz/sub_ui.
35002 General simplifications.
35003 * mpz/sub_ui.x: Likewise.
35004
35005 Tue Aug 10 19:41:16 1993 Torbjorn Granlund ([email protected])
35006
35007 * mpf: New directory.
35008 * mpf/*.c: Merge basic set of mpf functions.
35009
35010 * Many logs missing...
35011
35012 Sun Apr 25 18:40:26 1993 Torbjorn Granlund ([email protected])
35013
35014 * memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
35015 * bsd/xtom.c: Likewise.
35016
35017 * mpz/div.c: Remove free_me and free_me_size and their usage.
35018 Use mpn_divmod for division; corresponding changes in return value
35019 convention.
35020 * mpz/powm.c: `carry_digit' => `carry_limb'.
35021 * bsd/sdiv.c: Clarify comment.
35022
35023 Sun Apr 25 00:31:28 1993 Torbjorn Granlund ([email protected])
35024
35025 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
35026
35027 Sat Apr 24 16:23:33 1993 Torbjorn Granlund ([email protected])
35028
35029 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
35030
35031 * gmp-impl.h: #define ABS.
35032 * (Many files): Use ABS instead of abs.
35033
35034 * mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
35035 mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
35036
35037 * mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
35038 non-32-bit machines.
35039
35040 Tue Apr 20 13:13:58 1993 Torbjorn Granlund ([email protected])
35041
35042 * mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
35043 rounding them down to fit.
35044
35045 * mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
35046
35047 * mpz/inp_str.c (char_ok_for_base): New function.
35048 (mpz_inp_str): Use it.
35049
35050 Sun Mar 28 21:54:06 1993 Torbjorn Granlund ([email protected])
35051
35052 * mpz/inp_raw.c: Allocate x_index, not xsize limbs.
35053
35054 Mon Mar 15 11:44:06 1993 Torbjorn Granlund ([email protected])
35055
35056 * mpz/pprime.c: Declare param `const'.
35057 * gmp.h: Add declarations for mpz_com.
35058
35059 Thu Feb 18 14:10:34 1993 Torbjorn Granlund ([email protected])
35060
35061 * mpq/add.c, mpq/sub.c: Call mpz_clear for t.
35062
35063 Fri Feb 12 20:27:34 1993 Torbjorn Granlund ([email protected])
35064
35065 * mpz/inp_str.c: Recog minus sign as first character.
35066
35067 Wed Feb 3 01:36:02 1993 Torbjorn Granlund ([email protected])
35068
35069 * mpz/iset.c: Handle 0 size.
35070
35071 Tue Feb 2 13:03:33 1993 Torbjorn Granlund ([email protected])
35072
35073 * mpz/mod_ui.c: Initialize dividend_size before it's used.
35074
35075 Mon Jan 4 09:11:15 1993 Torbjorn Granlund ([email protected])
35076
35077 * bsd/itom.c: Declare param explicitly 'signed'.
35078 * bsd/sdiv.c: Likewise.
35079
35080 * mpq/cmp.c: Remove unused variable tmp_size.
35081 * mpz/powm_ui.c: Fix typo in esize==0 if stmt.
35082 * mpz/powm.c: Likewise.
35083
35084 Sun Nov 29 01:16:11 1992 Torbjorn Granlund ([email protected])
35085
35086 * mpn/generic/divmod_1.c (mpn_divmod_1): Handle
35087 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
35088 specifically.
35089
35090 * Reorganize sources. New directories mpn, mpn/MACH, mpn/generic,
35091 mpz, mpq, bsd. Use full file name for change logs hereafter.
35092
35093 Wed Oct 28 17:40:04 1992 Torbjorn Granlund ([email protected])
35094
35095 * longlong.h (__hppa umul_ppmm): Fix typos.
35096 (__hppa sub_ddmmss): Swap input arguments.
35097
35098 * mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
35099 initializator.
35100
35101 Sun Oct 25 20:30:06 1992 Torbjorn Granlund ([email protected])
35102
35103 * mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
35104 specifically (used to consider all negative numbers prime).
35105
35106 * mpz_powm_ui: `carry_digit' => `carry_limb'.
35107
35108 * sdiv: Handle zero dividend specifically. Replace most code in
35109 this function with a call to mpn_divmod_1.
35110
35111 Fri Sep 11 22:15:55 1992 Torbjorn Granlund ([email protected])
35112
35113 * mpq_clear: Don't free the MP_RAT!
35114
35115 * mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
35116
35117 Thu Sep 3 01:47:07 1992 Torbjorn Granlund ([email protected])
35118
35119 * All files: Remove leading _ from mpn function names.
35120
35121 Wed Sep 2 22:21:16 1992 Torbjorn Granlund ([email protected])
35122
35123 Fix from Jan-Hein Buhrman:
35124 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
35125
35126 * mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
35127 life.
35128
35129 Sun Aug 30 18:37:15 1992 Torbjorn Granlund ([email protected])
35130
35131 * _mpz_get_str: Use mpz_sizeinbase for computing out_len.
35132 * _mpz_get_str: Don't remove leading zeros. Abort if there are some.
35133
35134 Wed Mar 4 17:56:56 1992 Torbjorn Granlund ([email protected])
35135
35136 * gmp.h: Change definition of MP_INT to make the & before params
35137 optional. Use typedef to define it.
35138 * mp.h: Use typedef to define MINT.
35139
35140 Tue Feb 18 14:38:39 1992 Torbjorn Granlund ([email protected])
35141
35142 longlong.h (hppa umul_ppmm): Add missing semicolon. Declare type
35143 of __w1 and __w0.
35144
35145 Fri Feb 14 21:33:21 1992 Torbjorn Granlund ([email protected])
35146
35147 * longlong.h: Make default count_leading_zeros work for machines >
35148 32 bits. Prepend `__' before local variables to avoid conflicts
35149 with users' variables.
35150
35151 * mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
35152 * gmp-impl.h: ... and put it here.
35153 * mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
35154
35155 Tue Feb 11 17:20:12 1992 Torbjorn Granlund ([email protected])
35156
35157 * mpn_mul: Enhance base case by handling small multiplicands.
35158 * mpn_dm_1.c: Revert last change.
35159
35160 Mon Feb 10 11:55:15 1992 Torbjorn Granlund ([email protected])
35161
35162 * mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
35163
35164 Fri Feb 7 16:26:16 1992 Torbjorn Granlund ([email protected])
35165
35166 * mpn_mul: Replace code for base case.
35167
35168 Thu Feb 6 15:10:42 1992 Torbjorn Granlund ([email protected])
35169
35170 * mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
35171 pre-inverting divisor.
35172
35173 Sun Feb 2 11:10:25 1992 Torbjorn Granlund ([email protected])
35174
35175 * longlong.h: Make __LLDEBUG__ work differently.
35176 (_IBMR2): Reinsert old code.
35177
35178 Sat Feb 1 16:43:00 1992 Torbjorn Granlund ([email protected])
35179
35180 * longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
35181 using floating point operations. Don't define
35182 UDIV_NEEDS_NORMALIZATION any longer.
35183
35184 Fri Jan 31 15:09:13 1992 Torbjorn Granlund ([email protected])
35185
35186 * longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
35187 * longlong.h (#ifdef __hppa): Define umul_ppmm.
35188
35189 Wed Jan 29 16:41:36 1992 Torbjorn Granlund ([email protected])
35190
35191 * mpn_cmp: Only one length parameter, assume operand lengths are
35192 the same. Don't require normalization.
35193 * mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
35194 new mpn_cmp definition.
35195
35196 Tue Jan 28 11:18:55 1992 Torbjorn Granlund ([email protected])
35197
35198 * _mpz_get_str: Fix typo in comment.
35199
35200 Mon Jan 27 09:44:16 1992 Torbjorn Granlund ([email protected])
35201
35202 * Makefile.in: Add new files.
35203
35204 * mpn_dm_1.c: New file with function _mpn_divmod_1.
35205 * mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
35206 * mpz_div_ui: Likewise.
35207
35208 * mpn_mod_1.c: New file with function _mpn_mod_1.
35209 * mpz_mod_ui: Use _mpn_mod_1.
35210
35211 Thu Jan 23 18:54:09 1992 Torbjorn Granlund ([email protected])
35212
35213 Bug found by Paul Zimmermann ([email protected]):
35214 * mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
35215 Handle dividend == 0.
35216
35217 Wed Jan 22 12:02:26 1992 Torbjorn Granlund ([email protected])
35218
35219 * mpz_pprime.c: Use "" for #include.
35220
35221 Sun Jan 19 13:36:55 1992 Torbjorn Granlund ([email protected])
35222
35223 * mpn_rshiftci.c (header): Correct comment.
35224
35225 Wed Jan 15 18:56:04 1992 Torbjorn Granlund ([email protected])
35226
35227 * mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
35228 to make space for ignored quotient at the end. (The quotient might
35229 always be an extra limb.)
35230
35231 Tue Jan 14 21:28:48 1992 Torbjorn Granlund ([email protected])
35232
35233 * mpz_powm_ui: Fix comment.
35234 * mpz_powm: Likewise.
35235
35236 Mon Jan 13 18:16:25 1992 Torbjorn Granlund ([email protected])
35237
35238 * tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
35239
35240 Sun Jan 12 13:54:28 1992 Torbjorn Granlund ([email protected])
35241
35242 Fixes from Kazumaro Aoki:
35243 * mpz_out_raw: Take abs of size to handle negative values.
35244 * mpz_inp_raw: Reallocate before reading ptr from X.
35245 * mpz_inp_raw: Store, don't read, size to x->size.
35246
35247 Tue Jan 7 17:50:25 1992 Torbjorn Granlund ([email protected])
35248
35249 * gmp.h, mp.h: Remove parameter names from prototypes.
35250
35251 Sun Dec 15 00:09:36 1991 Torbjorn Granlund ([email protected])
35252
35253 * tests/Makefile.in: Prepend "./" to file names when executing
35254 tests.
35255
35256 * Makefile.in: Fix many problems.
35257
35258 Sat Dec 14 01:00:02 1991 Torbjorn Granlund ([email protected])
35259
35260 * mpn_sqrt.c: New file with _mpn_sqrt.
35261 * mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
35262 * msqrt.c: Delete. Create from mpz_sqrtrem.c in Makefile.in.
35263 * mpz_do_sqrt.c: Delete.
35264 * Makefile.in: Update to reflect these changes.
35265
35266 * Makefile.in, configure, configure.subr: New files
35267 (from [email protected]).
35268 * dist-Makefile: Delete.
35269
35270 * mpz_fac_ui: Fix comment.
35271
35272 * mpz_random2: Rewrite a bit to make it possible for the most
35273 significant limb to be == 1.
35274
35275 * mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
35276
35277 Fri Dec 13 23:10:02 1991 Torbjorn Granlund ([email protected])
35278
35279 * mpz_do_sqrt: Simplify special case for U == 0.
35280 * m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
35281 Rename _mpz_impl_sqrt to _mpz_do_sqrt.
35282
35283 Fri Dec 13 12:52:28 1991 Torbjorn Granlund ([email protected])
35284
35285 * gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
35286
35287 Thu Dec 12 22:17:29 1991 Torbjorn Granlund ([email protected])
35288
35289 * mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
35290 variables to mp_size.
35291
35292 Wed Dec 11 22:00:34 1991 Torbjorn Granlund ([email protected])
35293
35294 * mpn_rshift.c: Fix header comments.
35295
35296 Mon Dec 9 17:46:10 1991 Torbjorn Granlund ([email protected])
35297
35298 Released 1.2.
35299
35300 * gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
35301
35302 * dist-Makefile: Add missing dependency for cre-mparam.
35303
35304 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
35305 mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
35306
35307 * dist-Makefile (clean): clean in tests subdir too.
35308 * tests/Makefile: Define default values for ROOT and SUB.
35309
35310 * longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
35311 2 constraint.
35312
35313 Mon Nov 11 00:06:05 1991 Torbjorn Granlund ([email protected])
35314
35315 * mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
35316
35317 Sat Nov 9 23:47:38 1991 Torbjorn Granlund ([email protected])
35318
35319 Released 1.1.94.
35320
35321 * dist-Makefile, Makefile, tests/Makefile: Merge tests into
35322 distribution.
35323
35324 Fri Nov 8 22:57:19 1991 Torbjorn Granlund ([email protected])
35325
35326 * gmp.h: Don't use keyword `signed' for non-ANSI compilers.
35327
35328 Thu Nov 7 22:06:46 1991 Torbjorn Granlund ([email protected])
35329
35330 * longlong.h: Cosmetic changes to keep it identical to gcc2 version
35331 of longlong.h.
35332 * longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
35333 sub_ddmmss.
35334
35335 Mon Nov 4 00:36:46 1991 Torbjorn Granlund ([email protected])
35336
35337 * mpn_mul: Fix indentation.
35338
35339 * mpz_do_sqrt: Don't assume 32 bit limbs (had constant
35340 4294967296.0).
35341 * mpz_do_sqrt: Handle overflow in conversion from double returned
35342 by SQRT to mp_limb.
35343
35344 * gmp.h: Add missing function definitions.
35345
35346 Sun Nov 3 18:25:25 1991 Torbjorn Granlund ([email protected])
35347
35348 * mpz_pow_ui: Change type of `i' to int.
35349
35350 * ChangeLog: Add change log entry.
35351 * ChangeLog: Add change log entry.
35352 * ChangeLog: Add change log entry.
35353 * ChangeLog: Add change log entry.
35354 * ChangeLog: Add change log entry.
35355 * ChangeLog: Add change log entry.
35356 * ChangeLog: Add change log entry.
35357 * ChangeLog: Add change log entry.
35358 Stack overflow.
35359
35360 * mpz_pow_ui.c: Fix typo in comment.
35361
35362 * dist-Makefile: Create rpow.c from mpz_powm_ui.c.
35363 * mpz_powm_ui.c: Add code for rpow.
35364 * rpow.c: Delete this file. The rpow function is now implemented
35365 in mpz_powm_ui.c.
35366
35367 * mpz_fac_ui.c: New file.
35368 * gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
35369
35370 Bug found by John Amanatides ([email protected]):
35371 * mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
35372 the first argument not smaller than the second.
35373
35374 Tue Oct 29 13:56:55 1991 Torbjorn Granlund ([email protected])
35375
35376 * cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
35377 header text.
35378
35379 Mon Oct 28 00:35:29 1991 Torbjorn Granlund ([email protected])
35380
35381 * mpz_random2: Handle size == 0.
35382
35383 * gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
35384 chars_per_bit_exactly, and change its definition.
35385 * cre-conv-tab.c (main): Output field according to its new
35386 definition.
35387 * mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
35388 Use chars_per_bit_exactly.
35389
35390 * mpz_random2: Change the loop termination condition in order to
35391 get a large most significant limb with higher probability.
35392
35393 * gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
35394 * mpz_get_si.c: New file.
35395 * dist-Makefile: Add mpz_random2 and mpz_get_si.
35396
35397 * mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
35398 power of 2, giving exact result.
35399
35400 * mpn_mul: Fix MPN_MUL_VERIFY in various ways.
35401 * mpn_mul: New macro KARATSUBA_THRESHOLD.
35402 * mpn_mul (karatsuba's algorithm): Don't write intermediate results
35403 to prodp, use temporary pp instead. (Intermediate results can be
35404 larger than the final result, possibly writing into hyperspace.)
35405 * mpn_mul: Make smarter choice between Karatsuba's algorithm and the
35406 shortcut algorithm.
35407 * mpn_mul: Fix typo, cy instead of xcy. Unify carry handling code.
35408
35409 Sun Oct 27 19:57:32 1991 Torbjorn Granlund ([email protected])
35410
35411 * mpn_mul: In non-classical case, choose Karatsuba's algorithm only
35412 when usize > 1.5 vsize.
35413
35414 * mpn_mul: Break between classical and Karatsuba's algorithm at
35415 KARATSUBA_THRESHOLD, if defined. Default to 8.
35416
35417 * mpn_div: Kludge to fix stray memory read.
35418
35419 Sat Oct 26 20:06:14 1991 Torbjorn Granlund ([email protected])
35420
35421 * mpz_gcdext: Handle a = b = 0. Remove memory leakage by calling
35422 mpz_clear for all temporary variables.
35423
35424 * mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
35425 function's argument constraints. Compute wsize correctly.
35426
35427 * mpz_gcd: Fix typo in comment.
35428
35429 * memory.c (_mp_default_allocate, _mp_default_reallocate): Call
35430 abort if allocation fails, don't just exit.
35431
35432 Fri Oct 25 22:17:20 1991 Torbjorn Granlund ([email protected])
35433
35434 * mpz_random2.c: New file.
35435
35436 Thu Oct 17 18:06:42 1991 Torbjorn Granlund ([email protected])
35437
35438 Bugs found by Pierre-Joseph Gailly ([email protected]):
35439 * mpq_cmp: Take sign into account, don't just compare the
35440 magnitudes.
35441 * mpq_cmp: Call _mpn_mul in the right way, with the first argument
35442 not smaller than the second.
35443
35444 Wed Oct 16 19:27:32 1991 Torbjorn Granlund ([email protected])
35445
35446 * mpz_random: Ensure the result is normalized.
35447
35448 Tue Oct 15 14:55:13 1991 Torbjorn Granlund ([email protected])
35449
35450 * mpz_clrbit: Support non-ANSI compilers.
35451
35452 Wed Oct 9 18:03:28 1991 Torbjorn Granlund ([email protected])
35453
35454 * longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
35455
35456 Tue Oct 8 17:42:59 1991 Torbjorn Granlund ([email protected])
35457
35458 * mpz_mdm_ui: Add comments.
35459
35460 * mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
35461 * mpz_init_ui: Change spacing and header comment.
35462
35463 Thu Oct 3 18:36:13 1991 Torbjorn Granlund ([email protected])
35464
35465 * dist-Makefile: Prepend `./' before some filenames.
35466
35467 Sun Sep 29 14:02:11 1991 Torbjorn Granlund ([email protected])
35468
35469 Released 1.1 (public).
35470
35471 * mpz_com: New name of mpz_not.
35472 * dist-Makefile: Change mpz_not to mpz_com.
35473
35474 Tue Sep 24 12:44:11 1991 Torbjorn Granlund ([email protected])
35475
35476 * longlong.h: Fix header comment.
35477
35478 Mon Sep 9 15:16:24 1991 Torbjorn Granlund ([email protected])
35479
35480 Released 1.0.92.
35481
35482 * mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
35483 case.
35484
35485 * longlong.h (m68000 umul_ppmm): Clobber one register less by
35486 slightly rearranging the code.
35487
35488 Sun Sep 1 18:53:25 1991 Torbjorn Granlund ([email protected])
35489
35490 * dist-Makefile (stamp-stddefh): Fix typo.
35491
35492 Sat Aug 31 20:41:31 1991 Torbjorn Granlund ([email protected])
35493
35494 Released 1.0.91.
35495
35496 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
35497 mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
35498 * gmp.h, gmp.texi: Define the new functions.
35499
35500 Fri Aug 30 08:32:56 1991 Torbjorn Granlund ([email protected])
35501
35502 * mpz_gcdext: Compute t argument from the other quantities at the
35503 end, of the function, not in the loop. New feature: Allow t to be
35504 NULL.
35505
35506 * mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
35507 include "mp.h". Use type name `MP_INT' always.
35508
35509 * dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
35510
35511 Wed Aug 28 00:45:11 1991 Torbjorn Granlund ([email protected])
35512
35513 * dist-Makefile (documentation): Go via tmp.texi to avoid the
35514 creation of gmp.dvi if any errors occur. Make tex read input
35515 from /dev/null.
35516
35517 Fri Aug 23 15:58:52 1991 Torbjorn Granlund ([email protected])
35518
35519 * longlong.h (68020, i386): Don't define machine-dependent
35520 __umulsidi3 (so the default definition is used).
35521 * longlong.h (all machines): Cast all operands, sources and
35522 destinations, to `unsigned long int'.
35523 * longlong.h: Add gmicro support.
35524
35525 Thu Aug 22 00:28:29 1991 Torbjorn Granlund ([email protected])
35526
35527 * longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
35528 * longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
35529 * longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
35530 * _mpz_get_str.c: Add code to do division by big_base using only
35531 umul_qrnnd, if that is faster. Use UMUL_TIME and UDIV_TIME to
35532 decide which variant to use.
35533
35534 Wed Aug 21 15:45:23 1991 Torbjorn Granlund ([email protected])
35535
35536 * longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
35537 nops. (Saves two insn.)
35538
35539 * longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
35540 branch, and to permit input/output register overlap.
35541
35542 * longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
35543 * longlong.h (__29k__ umul_ppmm): Split asm instructions into two
35544 asm statements (gives better code if either the upper or lower
35545 part of the product is unused.
35546
35547 Tue Aug 20 17:57:59 1991 Torbjorn Granlund ([email protected])
35548
35549 * _mpz_get_str.c (outside of functions): Remove
35550 num_to_ascii_lower_case and num_to_ascii_upper_case. Use string
35551 constants in the function instead.
35552
35553 Mon Aug 19 00:37:42 1991 Torbjorn Granlund ([email protected])
35554
35555 * cre-conv-tab.c (main): Output table in hex. Output 4 fields, not
35556 3, for components 0 and 1.
35557
35558 * gmp.h: Add declaration of mpq_neg.
35559
35560 Released 1.0beta.13.
35561
35562 * _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
35563 comparing to enum literals SPC and EOF. This makes the code work
35564 for compilers where `char' is unsigned. (Bug found by Brian
35565 Beuning).
35566
35567 Released 1.0beta.12.
35568
35569 * mpz_mod_ui: Remove references to quot. Remove quot_ptr, quot_size
35570 declarations and assignment code.
35571
35572 Sun Aug 18 14:44:26 1991 Torbjorn Granlund ([email protected])
35573
35574 * mpz_mod_ui: Handle dividend < 0.
35575
35576 Released 1.0beta.11.
35577
35578 * mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
35579 general structure, variable names, etc.
35580
35581 * sdiv: Un-normalize the remainder in n1 before it is negated.
35582
35583 * longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
35584 udiv_qrnnd.
35585
35586 * mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
35587 the quotient size if the dividend size is incremented. (Bug found
35588 by Brian Beuning.)
35589
35590 * mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
35591 (Bug found by Brian Beuning.)
35592
35593 * mpz_mod_ui: Replace "digit" by "limb".
35594
35595 * mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
35596 for non-32-bit machines (PP is hardwired for such machines).
35597 * mpz_perfsqr.c (outside of functions): Define PP value with an L.
35598
35599 * mpn_mul.c (_mpn_mul): Add verification code that is activated if
35600 DEBUG is defined. Replace "digit" by "limb".
35601 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
35602 after the addition.
35603 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
35604 and v0_size, and according to the result, swap arguments in
35605 recursive call. (Don't violate mpn_mul's own argument
35606 constraints.)
35607
35608 Fri Aug 16 13:47:12 1991 Torbjorn Granlund ([email protected])
35609
35610 Released 1.0beta.10.
35611
35612 * longlong.h (IBMR2): Add udiv_qrnnd.
35613
35614 * mpz_perfsqr: Remove unused variables.
35615
35616 * mpz_and (case for different signs): Initialize loop variable i!
35617
35618 * dist-Makefile: Update automatically generated dependencies.
35619 * dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
35620 etc to dependency file lists.
35621
35622 * longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
35623 `unsigned long int'.
35624 * longlong.h: Add `int' after `unsigned' and `long' everywhere.
35625
35626 Wed Aug 14 18:06:48 1991 Torbjorn Granlund ([email protected])
35627
35628 * longlong.h: Add ARM, i860 support.
35629
35630 * mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
35631
35632 Tue Aug 13 21:57:43 1991 Torbjorn Granlund ([email protected])
35633
35634 * _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
35635 mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
35636 * gmp-impl.h: Put it here, and make it `const'.
35637 * cre-conv-tab.c (main): Make struct __mp_bases `const'.
35638
35639 Mon Aug 12 17:11:46 1991 Torbjorn Granlund ([email protected])
35640
35641 * cre-conv-tab.c (main): Use %lu in printf for long ints.
35642
35643 * dist-Makefile: Fix cre-* dependencies.
35644
35645 * cre-conv-tab.c (main): Output field big_base_inverted.
35646
35647 * gmp-impl.h (struct bases): New field big_base_inverted.
35648 * gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
35649 to float (in order to keep the structure smaller).
35650
35651 * mp.h, gmp.h: Change names of macros for avoiding multiple
35652 includes.
35653
35654 Fri Aug 9 18:01:36 1991 Torbjorn Granlund ([email protected])
35655
35656 * _mpz_get_str: Only shift limb array if normalization_steps != 0
35657 (optimization).
35658
35659 * longlong.h (sparc umul_ppmm): Use __asm__, not asm.
35660 * longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
35661 and m1 (overlap between output and input operands did not work).
35662 * longlong.h: Add VAX, ROMP and HP-PA support.
35663 * longlong.h: Sort the machine dependent code in alphabetical order
35664 on the CPU name.
35665 * longlong.h: Hack comments.
35666
35667 Thu Aug 8 14:13:36 1991 Torbjorn Granlund ([email protected])
35668
35669 Released 1.0beta.9.
35670
35671 * longlong.h: Define BITS_PER_LONG to 32 if it's not already
35672 defined.
35673 * Define __BITS4 to BITS_PER_LONG / 4.
35674 * Don't assume 32 bit word size in "count_leading_zeros" C macro.
35675 Use __BITS4 and BITS_PER_LONG instead.
35676
35677 * longlong.h: Don't #undef internal macros (reverse change of Aug 3).
35678
35679 * longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
35680 even for plain mc68000.
35681
35682 * mpq_div: Flip the sign of the numerator *and* denominator of the
35683 result if the intermediate denominator is negative.
35684
35685 * mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
35686
35687 * mpz_and.c: Compute the result size more conservatively.
35688 * mpz_ior.c: Likewise.
35689
35690 * mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
35691
35692 * dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
35693 BSDMP_SRCS.
35694
35695 * dist-Makefile: Create mult.c from mpz_mul.c.
35696 * mult.c: Delete this file.
35697
35698 * _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
35699 not done properly if the input string had many leading zeros).
35700
35701 Sun Aug 4 16:54:14 1991 Torbjorn Granlund ([email protected])
35702
35703 * dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
35704 work with VPATH and GNU MP.
35705
35706 * mpz_gcd: Don't call mpz_set; inline its functionality.
35707
35708 * mpq_mul, mpq_div: Fix several serious typos.
35709
35710 * mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
35711 zero.
35712
35713 * mpq_neg.c: New file.
35714
35715 * dist-Makefile: Remove obsolete dependencies.
35716
35717 * mpz_sub: Fix typo.
35718
35719 Bugs found by Pierre-Joseph Gailly ([email protected]):
35720 * mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
35721 is just 1.
35722 * mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
35723
35724 Sat Aug 3 23:45:28 1991 Torbjorn Granlund ([email protected])
35725
35726 * longlong.h: Clean up comments.
35727 * longlong.h: #undef internal macros.
35728
35729 Fri Aug 2 18:29:11 1991 Torbjorn Granlund ([email protected])
35730
35731 * mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
35732 * mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
35733
35734 * mpz_dmincl.c: Normalize the remainder before shifting it back.
35735
35736 * mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
35737
35738 * mpn_div.c: Fix comment.
35739
35740 * mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
35741 type, in order to work for both GNU and Berkeley functions.
35742
35743 * dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
35744 madd.c from mpz_add.c, msub.c from mpz_sub.c.
35745 respectively.
35746 * pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
35747 * mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
35748 Berkeley function name variants.
35749 * dist-Makefile: Add created files to "clean" target.
35750
35751 Tue Jul 16 15:19:46 1991 Torbjorn Granlund ([email protected])
35752
35753 * mpq_get_den: No need for absolute value of the size, the
35754 denominator is always positive.
35755
35756 * mpz_get_ui: If the operand is zero, return zero. Don't read the
35757 limb array!
35758
35759 * mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
35760 is the size of the remainder.
35761
35762 Mon Jul 15 11:08:05 1991 Torbjorn Granlund ([email protected])
35763
35764 * Several files: Remove unused variables and functions.
35765
35766 * gmp-impl.h: Declare _mpz_impl_sqrt.
35767
35768 * mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
35769 UDIV_NEEDS_NORMALIZATION. (Fix from Brian Beuning.)
35770
35771 * mpz_dm_ui.c, sdiv: Replace *digit with *limb.
35772
35773 * mpz_ior: Add missing else statement in -OP1 | -OP2 case.
35774 * mpz_ior: Add missing else statement in OP1 | -OP2 case.
35775 * mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
35776 * mpz_ior: Duplicate _mpz_realloc code.
35777
35778 * mpz_and: Add missing else statement in -OP1 & -OP2 case.
35779 * mpz_and: Rewrite OP1 & -OP2 case.
35780 * mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
35781
35782 * mpz_gcdext: Loop in d1.size (not b->size). (Fix from Brian
35783 Beuning.)
35784
35785 * mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call. (Fix from
35786 Brian Beuning.)
35787
35788 Fri Jul 12 17:10:33 1991 Torbjorn Granlund ([email protected])
35789
35790 * mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
35791 mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
35792 New files.
35793
35794 * mpz_dmincl.c: Remove second re-allocation of rem->d. It
35795 was never executed.
35796
35797 * dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
35798 some unixes' test doesn't have the -r option).
35799
35800 * *.*: Cast allocated pointers to the appropriate type (makes old C
35801 compilers happier).
35802
35803 * cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
35804 after conversion to double. (Kludge for broken C compilers.)
35805
35806 * dist-Makefile (stamp-stddefh): New target. Test if "stddef.h"
35807 exists in the system and creates a minimal one if it does not
35808 exist.
35809 * cre-stddefh.c: New file.
35810 * dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
35811 * dist-Makefile (clean): Add some more.
35812 * gmp.h, mp.h: Unconditionally include "stddef.h".
35813
35814 Thu Jul 11 10:08:21 1991 Torbjorn Granlund ([email protected])
35815
35816 * min: Do ungetc of last read character.
35817 * min.c: include stdio.h.
35818
35819 * dist-Makefile: Go via tmp- files for cre* redirection.
35820 * dist-Makefile: Add tmp* to "clean" target.
35821
35822 * dist-Makefile: Use LOCAL_CC for cre*, to simplify cross
35823 compilation.
35824
35825 * gmp.h, mp.h: Don't define NULL here.
35826 * gmp-impl.h: Define it here.
35827
35828 Wed Jul 10 14:13:33 1991 Torbjorn Granlund ([email protected])
35829
35830 * mpz_mod_2exp: Don't copy too much, overwriting most significant
35831 limb.
35832
35833 * mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
35834 reallocating res, if op[12]_ptr got their value from alloca.
35835
35836 * mpz_and, mpz_ior: Clear up comments.
35837
35838 * cre-mparam.c: Output parameters for `short int' and `int'.
35839
35840 * mpz_and, mpz_ior: Negate negative op[12]_size in several places.
35841
35842 Tue Jul 9 18:40:30 1991 Torbjorn Granlund ([email protected])
35843
35844 * gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
35845 (Fix for Sun lossage.)
35846
35847 * gmp.h: Add declaration of mpq_clear.
35848
35849 * dist-Makefile: Check if "ranlib" exists, before using it.
35850 * dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
35851 * mpz_powm: Fix typo, "pow" instead of "mpz_powm".
35852
35853 Fri Jul 5 19:08:09 1991 Torbjorn Granlund ([email protected])
35854
35855 * move: Remove incorrect comment.
35856
35857 * mpz_free, mpq_free: Rename to *_clear.
35858 * dist-Makefile: Likewise.
35859 * mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
35860
35861 * mpz_dmincl.c: Don't call "move", inline its functionality.
35862
35863 Thu Jul 4 00:06:39 1991 Torbjorn Granlund ([email protected])
35864
35865 * Makefile: Include dist-Makefile. Fix dist target to include
35866 dist-Makefile (with the name "Makefile" in the archive).
35867
35868 * dist-Makefile: New file made from Makefile. Add new mpz_...
35869 functions.
35870
35871 * mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
35872 functionality. Avoids code duplication.
35873 * pow.c, mpz_powm.c: Include mpz_powincl.c
35874
35875 * mpz_dmincl.c: New file containing general division code. Avoids
35876 code duplication.
35877 * mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
35878 mpz_dmincl.c.
35879
35880 * _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
35881 Instead, write the overlapping memory copying inline.
35882
35883 * mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
35884
35885 * longlong.h: Don't use #elif.
35886 * mpz_do_sqrt.c: Likewise.
35887
35888 * longlong.h: Use __asm__ instead of asm.
35889 * longlong.h (sparc udiv_qrnnd): Make it to one string over several
35890 lines.
35891
35892 * longlong.h: Preend __ll_ to B, highpart, and lowpart.
35893
35894 * longlong.h: Move array t in count_leading_zeros to the new file
35895 mp_clz_tab.c. Rename the array __clz_tab.
35896 * All files: #ifdef for traditional C compatibility.
35897
35898 Wed Jul 3 11:42:14 1991 Torbjorn Granlund ([email protected])
35899
35900 * mpz_and: Initialize res_ptr always (used to be initialized only
35901 when reallocating).
35902
35903 * longlong.h (umul_ppmm [C variant]): Make __ul...__vh
35904 `unsigned int', and cast the multiplications. This way
35905 compilers more easily can choose cheaper multiplication
35906 instructions.
35907
35908 * mpz_mod_2exp: Handle input argument < modulo argument.
35909 * mpz_many: Make sure mp_size is the type for sizes, not int.
35910
35911 * mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
35912 mpq_div: Change mpz_init* interface. Structure pointer as first
35913 arg to initialization function, no longer *return* struct.
35914
35915 Sun Jun 30 19:21:44 1991 Torbjorn Granlund ([email protected])
35916
35917 * Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
35918 character file name length limit.
35919
35920 * Most files: Rename MINT to MP_INT. Rename MRAT to MP_RAT.
35921 * mpz_sizeinb.c: New file with function mpz_sizeinbase.
35922 * mp_bases.c: New file, with array __mp_bases.
35923 * _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
35924 __mp_bases instead.
35925 * mout, mpz_out_str: Use array __mp_bases instead of function
35926 _mpz_get_cvtlen.
35927 * mpz_get_cvtlen.c: Remove.
35928 * Makefile: Update.
35929
35930 Sat Jun 29 21:57:28 1991 Torbjorn Granlund ([email protected])
35931
35932 * longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
35933 * longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
35934 * longlong.h (__sparc__): Don't call .umul; expand asm instead.
35935 Don't define __umulsidi3 (i.e. use default definition).
35936
35937 Mon Jun 24 17:37:23 1991 Torbjorn Granlund ([email protected])
35938
35939 * _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
35940 Swap 't' and 's'.
35941
35942 Sat Jun 22 13:54:01 1991 Torbjorn Granlund ([email protected])
35943
35944 * mpz_gcdext.c: New file.
35945
35946 * mpn_mul: Handle carry and unexpected operand sizes in last
35947 additions/subtractions. (Bug trigged when v1_size == 1.)
35948
35949 * mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
35950 * mpq_*: Call mpz_init*.
35951
35952 * mpz_pow_ui, rpow: Use _mpn_mul instead of mult. Restructure.
35953
35954 Wed May 29 20:32:33 1991 Torbjorn Granlund ([email protected])
35955
35956 * mpz_get_cvtlen: multiply by size.
35957
35958 Sun May 26 15:01:15 1991 Torbjorn Granlund ([email protected])
35959
35960 Alpha-release 0.95.
35961
35962 Fixes from Doug Lea ([email protected]):
35963 * mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE). Adjust PROD_SIZE
35964 correctly.
35965 * mpz_div: Prepend _ to mpz_realloc.
35966 * mpz_set_xs, mpz_set_ds: Fix typos in function name.
35967
35968 Sat May 25 22:51:16 1991 Torbjorn Granlund ([email protected])
35969
35970 * mpz_divmod_ui: New function.
35971
35972 * sdiv: Make the sign of the remainder correct.
35973
35974 Thu May 23 15:28:24 1991 Torbjorn Granlund ([email protected])
35975
35976 * Alpha-release 0.94.
35977
35978 * mpz_mul_ui: Include longlong.h.
35979
35980 * mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
35981 of msqrt.
35982
35983 * mpz_impl_sqrt: Don't call "move", inline its functionality.
35984
35985 * mdiv: Use MPN_COPY instead of memcpy.
35986 * rpow, mpz_mul, mpz_mod_2exp: Likewise.
35987 * pow.c: Likewise, and fix bug in the size arg.
35988
35989 * xtom: Don't use mpz_alloc, inline needed code instead. Call
35990 _mpz_set_str instead of mpz_set_str.
35991
35992 * Makefile: Make two libraries, libmp.a and libgmp.a.
35993
35994 Thu May 22 20:25:29 1991 Torbjorn Granlund ([email protected])
35995
35996 * Add manual to distribution.
35997 * Fold in many missing routines described in the manual.
35998 * Update Makefile.
35999
36000 Wed May 22 13:48:46 1991 Torbjorn Granlund ([email protected])
36001
36002 * mpz_set_str: Make it handle 0x prefix OK.
36003
36004 Sat May 18 18:31:02 1991 Torbjorn Granlund ([email protected])
36005
36006 * memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
36007 arguments.
36008 * mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
36009 * min: Likewise.
36010
36011 Thu May 16 20:43:05 1991 Torbjorn Granlund ([email protected])
36012
36013 * memory.c: Make the default allocations functions global.
36014 * mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
36015 default memory function.
36016
36017 Wed May 8 20:02:42 1991 Torbjorn Granlund ([email protected])
36018
36019 * mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
36020 even if no normalization is needed.
36021 * mpz_div: Rework reallocation scheme, to avoid excess copying.
36022
36023 * mpz_sub_ui.c, mpz_add_ui.c: New files.
36024
36025 * mpz_cmp.c, mpz_cmp_ui.c: New files.
36026
36027 * mpz_mul_2exp: Handle zero input MINT correctly.
36028
36029 * mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
36030
36031 * mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
36032
36033 Tue May 7 15:44:58 1991 Torbjorn Granlund ([email protected])
36034
36035 * mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
36036 * mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
36037 * gcd, mpz_gcd: Likewise.
36038
36039 * gcd, mpz_gcd: Handle common 2 factors correctly.
36040
36041 Mon May 6 20:22:59 1991 Torbjorn Granlund ([email protected])
36042
36043 * gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
36044
36045 * gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
36046
36047 Sun May 5 15:16:23 1991 Torbjorn Granlund ([email protected])
36048
36049 * mpz_div: Remove test for QUOT == 0.
36050
36051 Sun Apr 28 20:21:04 1991 Torbjorn Granlund ([email protected])
36052
36053 * pow: Don't make MOD normalization in place, as it's a bad idea to
36054 write on an input parameter.
36055 * pow: Reduce BASE if it's > MOD.
36056 * pow, mult, mpz_mul: Simplify realloc code.
36057
36058 Sat Apr 27 21:03:11 1991 Torbjorn Granlund ([email protected])
36059
36060 * Install multiplication using Karatsuba's algorithm as default.
36061
36062 Fri Apr 26 01:03:57 1991 Torbjorn Granlund ([email protected])
36063
36064 * msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
36065
36066 * mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
36067 left, respectively.
36068 * gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
36069
36070 * mlshift.c, mrshift.c: Remove.
36071
36072 Wed Apr 24 21:39:22 1991 Torbjorn Granlund ([email protected])
36073
36074 * mpn_mul: Check only for m2_size == 0 in function header.
36075
36076 Mon Apr 22 01:31:57 1991 Torbjorn Granlund ([email protected])
36077
36078 * karatsuba.c: New file for Karatsuba's multiplication algorithm.
36079
36080 * mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
36081
36082 * mpn_cmp: Fix header comment.
36083
36084 Sun Apr 21 00:10:44 1991 Torbjorn Granlund ([email protected])
36085
36086 * pow: Switch off initial base reduction.
36087
36088 Sat Apr 20 22:06:05 1991 Torbjorn Granlund ([email protected])
36089
36090 * mpz_get_str: Don't generate initial zeros for initial word.
36091 Used to write outside of allocated storage.
36092
36093 Mon Apr 15 15:48:08 1991 Torbjorn Granlund ([email protected])
36094
36095 * _mpz_realloc: Make it accept size in number of mp_digits.
36096 * Most functions: Use new _mpz_realloc definition.
36097
36098 * mpz_set_str: Remove calls _mp_free_func.
36099
36100 * Most functions: Rename mpn_* to _mpn_*. Rename mpz_realloc to
36101 _mpz_realloc.
36102 * mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
36103 * mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
36104 * msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
36105
36106 Sat Apr 6 14:05:16 1991 Torbjorn Granlund ([email protected])
36107
36108 * mpn_mul: Multiply by the first digit in M2 in a special
36109 loop instead of zeroing the product area.
36110
36111 * mpz_abs.c: New file.
36112
36113 * sdiv: Implement as mpz_div_si for speed.
36114
36115 * mpn_add: Make it work for second source operand == 0.
36116
36117 * msub: Negate the correct operand, i.e. V before swapping, not
36118 the smaller of U and V!
36119 * madd, msub: Update abs_* when swapping operands, and not after
36120 (optimization).
36121
36122 Fri Apr 5 00:19:36 1991 Torbjorn Granlund ([email protected])
36123
36124 * mpn_sub: Make it work for subtrahend == 0.
36125
36126 * madd, msub: Rewrite to minimize mpn_cmp calls. Ensure
36127 mpn_cmp is called with positive sizes (used to be called
36128 incorrectly with negative sizes sometimes).
36129
36130 * msqrt: Make it divide by zero if fed with a negative number.
36131 * Remove if statement at end of precision calculation that was
36132 never true.
36133
36134 * itom, mp.h: The argument is of type short, not int.
36135
36136 * mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
36137
36138 * mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
36139
36140 * Add COPYING to distribution.
36141
36142 * mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
36143
36144 Fri Mar 15 00:26:29 1991 Torbjorn Granlund ([email protected])
36145
36146 * Add Copyleft headers to all files.
36147
36148 * mpn_mul.c, mpn_div.c: Add header comments.
36149 * mult.c, mdiv.c: Update header comments.
36150
36151 * mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
36152 mpq_free.c: New files for rational arithmetics.
36153
36154 * mpn_lshift.c: Avoid writing the most significant word if it is 0.
36155
36156 * mdiv.c: Call mpn_lshift for the normalization.
36157 * mdiv.c: Remove #ifdefs.
36158
36159 * Makefile: Add ChangeLog to DISTFILES.
36160
36161 * mpn_div.c: Make the add_back code work (by removing abort()).
36162 * mpn_div.c: Make it return if the quotient is size as compared
36163 with the difference NSIZE - DSIZE. If the stored quotient is
36164 larger than that, return 1, otherwise 0.
36165 * gmp.h: Fix mpn_div declaration.
36166 * mdiv.c: Adopt call to mpn_div.
36167 * mpz_div.c: New file (developed from mdiv.c).
36168
36169 * README: Update routine names.
36170
36171 Thu Mar 14 18:45:28 1991 Torbjorn Granlund ([email protected])
36172
36173 * mpq_mul.c: New file for rational multiplication.
36174
36175 * gmp.h: Add definitions for rational arithmetics.
36176
36177 * mpn_div: Kludge the case where the high numerator digit > the
36178 high denominator digit. (This code is going to be optimized later.)
36179
36180 * New files: gmp.h for GNU specific functions, gmp-common.h for
36181 definitions common for mp.h and gmp.h.
36182
36183 * Ensure mp.h just defines what BSD mp.h defines.
36184
36185 * pow.c: Fix typo for bp allocation.
36186
36187 * Rename natural number functions to mpn_*, integer functions to
36188 mpz_*.
36189
36190 Tue Mar 5 18:47:04 1991 Torbjorn Granlund ([email protected])
36191
36192 * mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
36193 "n0 >= r" to "n0 > r".
36194
36195 * msqrt: Tune the increasing precision scheme, to do fewer steps.
36196
36197 Tue Mar 3 18:50:10 1991 Torbjorn Granlund ([email protected])
36198
36199 * msqrt: Use the low level routines. Use low precision in the
36200 beginning, and increase the precision as the result converges.
36201 (This optimization gave a 6-fold speedup.)