12012-05-06  Torbjorn Granlund  <tege@gmplib.org>
2
3	* Version 5.0.5 released.
4
5	* mpn/Makefile.am (TARG_DIST): Remove thumb, since directory now empty.
6
72012-04-28  Torbjorn Granlund  <tege@gmplib.org>
8
9	* mpn/thumb/add_n.s: Remove broken code.
10	* mpn/thumb/sub_n.s: Likewise.
11
122012-04-02  Torbjorn Granlund  <tege@gmplib.org>
13
14	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
15
16	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
17	Bump version info.
18
19	* gmp-h.in (_GMP_H_HAVE_FILE): Test also __STDIO_LOADED (for VMS).
20
212012-03-27  Torbjorn Granlund  <tege@gmplib.org>
22
23	* config.guess: Fix typo in coreisbr recognition.
24
252012-03-07  Torbjorn Granlund  <tege@gmplib.org>
26
27	* config.guess: Handle AMD 11h correctly.
28
292012-03-04 Marco Bodrato <bodrato@mail.dm.unipi.it>
30
31	* tests/mpz/t-invert.c: Avoid testing mod 0.
32	* doc/gmp.texi (mpz_invert): Specify mod 0 is not handled.
33
342012-02-24  Torbjorn Granlund  <tege@gmplib.org>
35
36	* tests/mpn/logic.c: New file.
37	* tests/mpn/Makefile.am (check_PROGRAMS): Add logic.
38
39	* tests/mpz/t-invert.c: New file.
40	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-invert.
41
422012-02-11 Marco Bodrato <bodrato@mail.dm.unipi.it>
43
44	* doc/gmp.texi (Multiplication Algorithms): Add Toom[68]'n'half.
45
462012-02-10  Torbjorn Granlund  <tege@gmplib.org>
47
48	* Version 5.0.4 released.
49
502012-02-09 Marco Bodrato <bodrato@mail.dm.unipi.it>
51
52	* gmp-impl.h (mpn_toom3*_itch): Support any recursion depth.
53	* tests/refmpn.c (refmpn_mul): Restore tight allocations.
54
552012-02-09  Marc Glisse  <marc.glisse@inria.fr>
56
57	* gmp-impl.h (ABS_CAST): New macro.
58	* mpf/cmp_si.c: Use ABS_CAST.
59	* mpf/get_si.c: Use ABS_CAST.
60	* mpf/iset_si.c: Use ABS_CAST.
61	* mpf/set_si.c: Use ABS_CAST.
62	* mpq/set_si.c: Use ABS_CAST.
63	* mpz/cmp_si.c: Use ABS_CAST.
64	* mpz/get_si.c: Use ABS_CAST.
65	* mpz/iset_si.c: Use ABS_CAST.
66	* mpz/mul_i.h: Use ABS_CAST.
67	* mpz/set_si.c: Use ABS_CAST.
68
692012-02-09  Torbjorn Granlund  <tege@gmplib.org>
70
71	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
72
73	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
74	Bump version info.
75
762012-02-08  Torbjorn Granlund  <tege@gmplib.org>
77
78	* mpn/powerpc32/divrem_2.asm: Fix off-by-one condition in invert_limb
79	code.
80
812012-02-08  Niels M�ller  <nisse@lysator.liu.se>
82
83	* doc/gmp.texi (mpz_gcdext): Describe cofactor canonicalization.
84	(mpn_gcdext): Copied doc updates from main repo.
85
862012-02-07  Niels M�ller  <nisse@lysator.liu.se>
87
88	* mpn/generic/gcdext.c (mpn_gcdext): Fixed assert, related to the
89	special case A = (2k+1) G, B = 2 G.
90
912012-02-06  Niels M�ller  <nisse@lysator.liu.se>
92
93	* mpn/generic/hgcd.c (hgcd_matrix_update_q): Fixed carry handling
94	bug.
95
96	* tests/mpz/t-gcd.c (main): Omit tests with urandomb operands.
97	* tests/mpn/t-hgcd.c (main): Likewise.
98
992012-02-05  Niels M�ller  <nisse@lysator.liu.se>
100
101	* tests/mpz/t-gcd.c (main): Add tests with rrandomb operands.
102	* tests/mpn/t-hgcd.c (main): Likewise.
103
104	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step):
105	Bugfix, in u1 += q * u0, handle carry in all cases. Also normalize
106	the product q * u0.
107
1082012-02-04 Marco Bodrato <bodrato@mail.dm.unipi.it>
109
110	* tests/refmpn.c (refmpn_mul): More conservative allocations.
111
1122012-02-03  Torbjorn Granlund  <tege@gmplib.org>
113
114	* mpn/x86_64/bd1/gmp-mparam.h: New file.
115
116	* longlong.h (udiv_qrnnd from sdiv_qrnnd): Declare udiv_w_sdiv.
117
118	* mpn/generic/udiv_w_sdiv.c: Use c89 function header.
119
1202012-02-02 Marco Bodrato <bodrato@mail.dm.unipi.it>
121
122	* mpn/generic/toom_interpolate_16pts.c: Correct an unlikely 32-bit bug.
123
1242012-02-02  Torbjorn Granlund  <tege@gmplib.org>
125
126	* mpn/generic/toom63_mul.c: Allow s+t==n by adjusting an ASSERT.
127	* mpn/generic/toom_interpolate_8pts.c: Perform final incr iff s+t!=n.
128
129	* tests/mpn/t-toom6h.c (MIN_BN): Make more consistent with ASSERT in
130	tested function.
131
1322012-02-01  Torbjorn Granlund  <tege@gmplib.org>
133
134	* tests/mpn/t-mul.c: New file.
135	* tests/mpn/Makefile.am: Compile it.
136
1372012-01-31  Torbjorn Granlund  <tege@gmplib.org>
138
139	* mpn/generic/powm_sec.c (SQR_BASECASE_LIM): New name for
140	SQR_BASECASE_MAX.
141	(SQR_BASECASE_LIM, fat variant): Define to read __gmpn_cpuvec.
142	(SQR_BASECASE_LIM, native variant): Define to SQR_TOOM2_THRESHOLD
143	straight, without arithmetic.
144	(mpn_local_sqr): Use BELOW_THRESHOLD as per Marco's suggestion.
145
1462012-01-30  Torbjorn Granlund  <tege@gmplib.org>
147
148	* tests/mpz/t-powm.c: Ensure all sizes are seen.
149
1502012-01-27  Torbjorn Granlund  <tege@gmplib.org>
151
152	* Version 5.0.3 released.
153
154	* Upgrade to libtool 2.4.2.
155
1562012-01-25  Torbjorn Granlund  <tege@gmplib.org>
157
158	* tune/tuneup.c: Remove unused tuneup variables.
159
1602012-01-23  Torbjorn Granlund  <tege@gmplib.org>
161
162	* mpn/powerpc64/mode64/p6/gmp-mparam.h: New file.
163	* mpn/powerpc64/mode64/p7/gmp-mparam.h: New file.
164	* mpn/x86_64/bobcat/gmp-mparam.h: New file.
165
1662012-01-18  Marc Glisse  <marc.glisse@inria.fr>
167
168	* doc/gmp.texi (mpf_class::mpf_class): Use mp_bitcnt_t.
169
1702012-01-17  Torbjorn Granlund  <tege@gmplib.org>
171
172	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
173
174	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
175	Bump version info.
176
177	* configure.in: Add ultrasparc T4 support.
178
179	* demos/isprime.c (main): Run 25 millerrabin tests.
180
1812012-01-15  Niels M�ller  <nisse@lysator.liu.se>
182
183	* mpz/scan0.c (mpz_scan0): Use ~(mp_bitcnt_t) 0, rather than
184	ULONG_MAX, when returning "infinity".
185	* mpz/scan1.c (mpz_scan1): Likewise.
186
1872011-12-30  Torbjorn Granlund  <tege@gmplib.org>
188
189	* mpz/hamdist.c: Fix typo in a return statement.
190
1912011-12-08  Torbjorn Granlund  <tege@gmplib.org>
192
193	* mpn/generic/powm_sec.c: Handle fat binaries better.
194
1952011-12-07  Torbjorn Granlund  <tege@gmplib.org>
196
197	* configure.in: Fix typo making HAVE_NATIVE_mpn_X fail for fat
198	functions.
199
200	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Add a missing break.
201
2022011-12-01  Torbjorn Granlund  <tege@gmplib.org>
203
204	* mpn/x86_64/fat/fat.c: Copy fake cpuid code from x86/fat/fat.c.
205
206	* gmp-impl.h (DECL_divexact_1): Fix typo in return type.
207
2082011-11-28  Torbjorn Granlund  <tege@gmplib.org>
209
210	* mpn/generic/udiv_w_sdiv.c: Use CNST_LIMB for some constants.
211
2122011-11-25  Torbjorn Granlund  <tege@gmplib.org>
213
214	* configure.in: Overhaul x86/x86_64 support, merging three case
215	statements into one.
216
2172011-11-24  Torbjorn Granlund  <tege@gmplib.org>
218
219	* doc/gmp.texi (Formatted Output Strings): Clarify rules for mpf_t
220	precision.
221
2222011-11-21  Torbjorn Granlund  <tege@gmplib.org>
223
224	* gmp-h.in (__GNU_MP_RELEASE): Renamed from typo name.
225
2262011-11-20  Torbjorn Granlund  <tege@gmplib.org>
227
228	* configure.in: Split x86 CPUs into more subtypes for more accurate
229	passing of gcc flags.
230
231	* configure.in: Pass -m32 for powerpc64 with abi=32, using via _maybe
232	mechanism.
233
2342011-11-15  Torbjorn Granlund  <tege@gmplib.org>
235
236	* mpn/generic/powm_sec.c (mpn_local_sqr): Remove forgotten TMP_* calls.
237	(redcify): Likewise.
238	(mpn_powm_sec): Likewise.
239
240	* mpn/generic/powm_sec.c (mpn_powm_sec): Use mpn_tabselect also in
241	initialisation.
242
2432011-10-15  Torbjorn Granlund  <tege@gmplib.org>
244
245	* configure.in (s390): Rewrite support to handle known CPUs.
246	* config.guess: Recognise s390 CPUs.
247	* config.sub: Match s390 CPUs.
248	* acinclude.m4 (S390_PATTERN, S390X_PATTERN): New defines.
249
2502011-10-14  Torbjorn Granlund  <tege@gmplib.org>
251
252	From Per Olofsson:
253	* mpn/generic/popham.c: Add __GMP_NOTHROW to make it match gmp.h.
254
255	* configure.in: AC_DEFINE HAVE_HOST_CPU_s390_zarch.
256	* longlong.h (s390): Use it.
257	(s390 umul_ppmm): Fix typo in pure C variant.
258
2592011-10-13  Torbjorn Granlund  <tege@gmplib.org>
260
261	* longlong.h (s390): Put back an accidentally deleted #else.
262
263	* configure.in (s390): Unset extra_functions for s390x.
264
2652011-10-12  Torbjorn Granlund  <tege@gmplib.org>
266
267	* longlong.h (s390 umul_ppmm): With new-enough gcc, avoid asm.
268
269	From Andreas Krebbel:
270	* longlong.h (s390 umul_ppmm): Support 32-bit limbs with gcc using
271	64-bit registers.
272	(s390 udiv_qrnnd): Likewise.
273
2742011-10-11  Torbjorn Granlund  <tege@gmplib.org>
275
276	* configure.in (s390x): Pass -mzarch to gcc in 32-bit mode.
277
278	* longlong.h (s390x): Add __CLOBBER_CC for relevant asm patterns.
279
2802011-10-10  Torbjorn Granlund  <tege@gmplib.org>
281
282	From Marco Trudel:
283	* tests/mpz/t-scan.c (check_ref): Fix loop end bound.
284
2852011-10-09  Torbjorn Granlund  <tege@gmplib.org>
286
287	* longlong.h (s390x): Put back UDItype casts to make gcc reloading use
288	right more for constants.
289	(s390x count_leading_zeros): Disable until we support z10 specifically.
290	(s390x add_ssaaaa): Remove algsi/slgsi until we support z10.
291
2922011-10-07  Torbjorn Granlund  <tege@gmplib.org>
293
294	* longlong.h (s390): Add 32-bit zarch umul_ppmm and udiv_qrnnd.
295	(s390): Overhaul 32-bit and 64-bit code.
296
2972011-10-04  Torbjorn Granlund  <tege@gmplib.org>
298
299	* mpn/Makefile.am (TARG_DIST): Add s390_32 and s390_64, remove s390.
300
301	* doc/gmp.texi (Custom Allocation): Rephrase a paragraph.
302
303	* demos/factorize.c: Run 25 Miller-Rabin tests.
304
305	* mpz/nextprime.c: Run 25 mpz_millerrabin tests (was 10).
306
3072011-10-03  Torbjorn Granlund  <tege@gmplib.org>
308
309	* configure.in: Support s390x.
310
311	* longlong.h: Add support for 64-bit s390x.
312
313	* mpn/s390_64: New directory.
314	* mpn/s390_32: Directory renamed from mpn/s390.
315
3162011-09-26  Torbjorn Granlund  <tege@gmplib.org>
317
318	* mpn/sh/sh2/submul_1.s: Make this old submul_1 implementation
319	actually compute intended function.
320
3212011-09-25  Torbjorn Granlund  <tege@gmplib.org>
322
323	* mpn/sh: Migrate files to '.asm'.
324	* configure.in: Recognise sh3 and sh4.
325
3262011-08-18  Torbjorn Granlund  <tege@gmplib.org>
327
328	* printf/doprntf.c (__gmp_doprnt_mpf): For DOPRNT_CONV_FIXED, ask for
329	one more digit.
330
3312011-08-17  Torbjorn Granlund  <tege@gmplib.org>
332
333	* mpf/sub.c: Fix typo in copy condition.  Delay an allocation.
334
3352011-08-10  Torbjorn Granlund  <tege@gmplib.org>
336
337	* tests/rand/t-lc2exp.c (check_bigc): Call abort after reporting error.
338
3392011-07-15  Torbjorn Granlund  <tege@gmplib.org>
340
341	* mpn/arm/invert_limb.asm: Swap around some registers to silence 'as'
342	warnings.
343
3442011-07-14  Torbjorn Granlund  <tege@gmplib.org>
345
346	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q): Get mpn_sub_1 size
347	argument right.
348
3492011-07-04  Torbjorn Granlund  <tege@gmplib.org>
350
351	* tests/misc/t-locale.c: Disable test for mingw.
352
353	* configure.in (x86_64 *-*-mingw*): Handle also cygwin here; clear out
354	extra_functions_64.
355
3562011-07-02  Torbjorn Granlund  <tege@gmplib.org>
357
358	* config.guess: Don't print newline in x86 cpuid function.
359	Rewrite x86-64 cpu recognition asm code to work under Windoze.
360
3612011-06-16  Torbjorn Granlund  <tege@gmplib.org>
362
363	* acinclude.m4 (GMP_ASM_RODATA): Fix typo in 2011-04-10 change.
364
365	* configure.in: Surround tr ranges with [] for portability.
366
3672011-05-08  Marc Glisse  <marc.glisse@inria.fr>
368
369	* doc/gmp.texi (gmp_randclass::get_f): Replace unsigned long
370	with mp_bitcnt_t.
371
3722011-05-07  Torbjorn Granlund  <tege@gmplib.org>
373
374	* Version 5.0.2 released.
375
376	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
377
378	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
379	Bump version info.
380
3812011-05-05  Marc Glisse  <marc.glisse@inria.fr>
382
383	[These changes were made after the 5.0.2 release, but inserted here to
384	match the change chronology of the main repository.]
385
386	* mpn/x86_64/fat/fat.c: Update for Sandy Bridge.
387	* config.guess: warning to keep it in sync with fat.c.
388
3892011-05-05  Torbjorn Granlund  <tege@gmplib.org>
390
391	* mpn/x86_64/fat/fat_entry.asm: (PIC_OR_DARWIN): New symbol.  Use it to
392	work around Darwin problems.
393
3942011-05-02  Marc Glisse  <marc.glisse@inria.fr>
395
396	* configfsf.guess: Update to version of 2011-02-02.
397	* configfsf.sub: Update to version of 2011-03-23.
398
3992011-04-30  Marc Glisse  <marc.glisse@inria.fr>
400
401	* gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition
402	and the documentation.
403	(mpz_remove): Likewise.
404	(mpf_eq): Likewise.
405
406	* ltmain.sh: Remove.
407	* .bootstrap: Let libtoolize generate ltmain.sh.
408
409	* doc/gmp.texi (mpf_urandomb): Explicit the fact that it does not
410	change the precision.
411
4122011-04-28  Torbjorn Granlund  <tege@gmplib.org>
413
414	[This change was made after the 5.0.2 release, but inserted here to
415	match the change chronology of the main repository.]
416
417	* configure.in (x86_64): Support bobcat specifically.
418	(x86): Match bobcat and bulldozer, handle like k10.
419
4202011-04-27  Torbjorn Granlund  <tege@gmplib.org>
421
422	* tune/speed.h (speed_cyclecounter): Always use PIC variant when
423	compiled with Apple's GCC.
424
4252011-04-26  Torbjorn Granlund  <tege@gmplib.org>
426
427	* mpn/sparc32/sparc-defs.m4 (changecom): Don't redefine '!' as it
428	interferes with expressions.
429
4302011-04-10  Niels M�ller  <nisse@lysator.liu.se>
431
432	[This change was made after the 5.0.2 release, but inserted here to
433	match the change chronology of the main repository.]
434
435	* configure.in: Add invert_limb_table to extra_functions_64 on
436	x86_64.
437
4382011-04-10  Torbjorn Granlund  <tege@gmplib.org>
439
440	* acinclude.m4 (GMP_ASM_RODATA): Make 'foo' larger to avoid clang
441	problems.
442
4432011-03-28  Torbjorn Granlund  <tege@gmplib.org>
444
445	* mpn/x86/invert_limb.asm: Protect movzwl register parameters from
446	being interpreted as m4 macro parameters.
447
4482011-03-21  Torbjorn Granlund  <tege@gmplib.org>
449
450	* configure.in (hppa): Under linux, treat 64-bit processors as if they
451	were 32-bit processors.
452
4532011-03-15 Marco Bodrato <bodrato@mail.dm.unipi.it>
454
455	* mpn/generic/toom_interpolate_16pts.c: Remove ambiguity.
456
4572011-03-12  Torbjorn Granlund  <tege@gmplib.org>
458
459	* tune/powerpc.asm: Use powerpc syntax, not power syntax.
460
4612011-03-09  Marc Glisse  <marc.glisse@inria.fr>
462
463	* doc/gmp.texi: Remove void return type from constructors. Document
464	explicit constructors. Document mpf_class::mpf_class(mpf_t).
465
4662011-02-24  Torbjorn Granlund  <tege@gmplib.org>
467
468	* mpn/x86/p6/sse2/mod_1_4.asm: Fix typo in MULFUNC_PROLOGUE.
469
4702011-02-04  Torbjorn Granlund  <tege@gmplib.org>
471
472	* mpn/x86_64/core2/popcount.asm: Add a MULFUNC_PROLOGUE.
473	* mpn/x86_64/pentium4/popcount.asm: Likewise.
474
4752011-01-31  Torbjorn Granlund  <tege@gmplib.org>
476
477	[These changes were made after the 5.0.2 release, but inserted here to
478	match the change chronology of the main repository.]
479
480	* config.guess: Recognise new Intel processors.
481
482	* config.guess: Support 'coreinhm' and 'coreisbr'.
483	* config.sub: Likewise.
484	* configure.in: Likewise.
485
4862011-01-25 Marco Bodrato <bodrato@mail.dm.unipi.it>
487
488	* mpz/mul.c: Remove redundant size computation.
489
4902010-11-11  Torbjorn Granlund  <tege@gmplib.org>
491
492	* mpn/x86_64/atom/aors_n.asm: Don't rely on ZF after 'bt' insn.
493	Use 64-bit 'test' to support operands of 2^32 limbs and more.
494
4952010-11-10  Torbjorn Granlund  <tege@gmplib.org>
496
497	[These changes were made after the 5.0.2 release, but inserted here to
498	match the change chronology of the main repository.]
499
500	* mp_get_fns.c: Add a __GMP_NOTHROW for coherency with prototype.
501	* mp_set_fns.c: Likewise.
502	* mpf/cmp.c: Likewise.
503	* mpf/cmp_si.c: Likewise.
504	* mpf/cmp_ui.c: Likewise.
505	* mpf/fits_s.h: Likewise.
506	* mpf/fits_u.h: Likewise.
507	* mpf/get_dfl_prec.c: Likewise.
508	* mpf/get_prc.c: Likewise.
509	* mpf/get_si.c: Likewise.
510	* mpf/get_ui.c: Likewise.
511	* mpf/int_p.c: Likewise.
512	* mpf/set_dfl_prec.c: Likewise.
513	* mpf/set_prc_raw.c: Likewise.
514	* mpf/size.c: Likewise.
515	* mpf/swap.c: Likewise.
516	* mpq/equal.c: Likewise.
517	* mpq/swap.c: Likewise.
518	* mpz/cmp.c: Likewise.
519	* mpz/cmp_si.c: Likewise.
520	* mpz/cmp_ui.c: Likewise.
521	* mpz/cmpabs.c: Likewise.
522	* mpz/cmpabs_ui.c: Likewise.
523	* mpz/cong_2exp.c: Likewise.
524	* mpz/divis_2exp.c: Likewise.
525	* mpz/fits_s.h: Likewise.
526	* mpz/get_si.c: Likewise.
527	* mpz/hamdist.c: Likewise.
528	* mpz/scan0.c: Likewise.
529	* mpz/scan1.c: Likewise.
530	* mpz/sizeinbase.c: Likewise.
531	* mpz/swap.c: Likewise.
532	* mpz/tstbit.c: Likewise.
533
5342010-11-09  Torbjorn Granlund  <tege@gmplib.org>
535
536	[This change was made after the 5.0.2 release, but inserted here to
537	match the change chronology of the main repository.]
538
539	* configure.in (AC_INIT): Amend bug reporting address with manual
540	reference.
541
5422010-11-06  Torbjorn Granlund  <tege@gmplib.org>
543
544	* mpn/x86_64/aors_n.asm: Rewrite not to rely on ZF after 'bt' insn.
545
5462010-10-04  Torbjorn Granlund  <tege@gmplib.org>
547
548	* mpn/x86_64/gcd_1.asm: Use m4_lshift to avoid << operator.
549	* mpn/x86/k7/gcd_1.asm: Likewise.
550
5512010-08-20  Niels M�ller  <nisse@lysator.liu.se>
552
553	Suggested by Ozkan Sezer:
554	* configure.in: If $M4 is already set in the environment, don't
555	touch it. Fixed the case that no assembler files are used, and
556	GMP_PROG_M4 is omitted.
557
5582010-06-15  Niels M�ller  <nisse@lysator.liu.se>
559
560	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-mod_1.
561	* tests/mpn/t-mod_1.c: New file.
562
5632010-05-24  Torbjorn Granlund  <tege@gmplib.org>
564
565	* mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): New function.
566	* gmp-impl.h: Declare it.
567	* tune/common.c (speed_mpn_mupi_div_qr): Use new itch function.
568	* tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Pass parameters right
569	for new itch function.
570
5712010-05-14  Torbjorn Granlund  <tege@gmplib.org>
572
573	* mpn/generic/redc_2.c: Use asm code just for GNU C.
574
5752010-05-06  Torbjorn Granlund  <tege@gmplib.org>
576
577	[This change was made after the 5.0.2 release, but inserted here to
578	match the change chronology of the main repository.]
579
580	* tune/tuneup.c (tune_mod_1): Fix typo.
581
5822010-05-05  Torbjorn Granlund  <tege@gmplib.org>
583
584	[These changes were made after the 5.0.2 release, but inserted here to
585	match the change chronology of the main repository.]
586
587	* longlong.h: Undo 2009-03-01 change for powerpc64, it gives poor code.
588
589	* tune/tuneup.c (tune_mod_1): Use more typical divisor, for the benefit
590	of machines with early-out multipliers.
591
5922010-05-04  Torbjorn Granlund  <tege@gmplib.org>
593
594	[This change was made after the 5.0.2 release, but inserted here to
595	match the change chronology of the main repository.]
596
597	* tune/tuneup.c (tune_mod_1): Fix typo.
598
5992010-05-03  Torbjorn Granlund  <tege@gmplib.org>
600
601	[This change was made after the 5.0.2 release, but inserted here to
602	match the change chronology of the main repository.]
603
604	* tune/tuneup.c (tune_mod_1): Measure MOD_1_1_TO_MOD_1_2_THRESHOLD and
605	MOD_1_2_TO_MOD_1_4_THRESHOLD before MOD_1U_TO_MOD_1_1_THRESHOLD for
606	correctness.
607
6082010-04-12  Torbjorn Granlund  <tege@gmplib.org>
609
610	* tests/mpn/t-toom6h.c (SIZE_LOG): Define.
611	* tests/mpn/t-toom8h.c (SIZE_LOG): Likewise.
612
6132010-04-10  Torbjorn Granlund  <tege@gmplib.org>
614
615	* mpn/x86/divrem_2.asm: Use "orb" instead of "or" to work around
616	Solaris assembler bug.
617	* mpn/x86_64/mpn/x86_64/divrem_2.asm: Likewise.
618
6192010-03-25  Torbjorn Granlund  <tege@gmplib.org>
620
621	* mpn/generic/toom33_mul.c: Fix mpn_add_n_sub_n usage.
622	* mpn/generic/toom3_sqr.c: Likewise.
623	* mpn/generic/toom63_mul.c: Likewise.
624
6252010-03-19  Torbjorn Granlund  <tege@gmplib.org>
626
627	* mpn/generic/toom_interpolate_6pts.c: Call mpn_sublsh2_n and
628	mpn_sublsh_n with correct args.
629
6302010-03-06  Torbjorn Granlund  <tege@gmplib.org>
631
632	* tests/tests.h (TESTS_REPS): Fix typo.
633
6342010-02-26  Torbjorn Granlund  <tege@gmplib.org>
635
636	* mpn/pa64/aors_n.asm: Fix typo in last change.
637
6382010-02-25  Torbjorn Granlund  <tege@gmplib.org>
639
640	* tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb
641	variables.
642
643	* tests/mpn/t-div.c: Cast a switch index to placate HP's cc.
644	* tests/mpn/t-bdiv.c: Likewise.
645
646	* mpn/pa64/aors_n.asm: Fix support of the 2.0n ABI.
647
6482010-02-23  Torbjorn Granlund  <tege@gmplib.org>
649
650	* mpn/generic/mod_1_3.c: Cast a switch index.
651
652	* mpn/generic/sqrtrem.c: Use CNST_LIMB.
653
6542010-02-07  Torbjorn Granlund  <tege@gmplib.org>
655
656	* tune/tuneup.c (tune_redc): Set min_size and min_is_always when
657	measuring REDC_1_TO_REDC_2_THRESHOLD.
658	(tune_mod_1): Set min_size for PREINV_MOD_1_TO_MOD_1_THRESHOLD.
659
660	* mpn/x86_64/aorrlsh_n.asm (cnt): Fix a typo.
661	* mpn/x86_64/lshsub_n.asm: Likewise.
662
6632010-02-05  Torbjorn Granlund  <tege@gmplib.org>
664
665	* Version 5.0.1 released.
666
667	* mpn/generic/powm.c: Use rp target area for power table computation in
668	order to use less scratch.
669
670	* mpn/generic/binvert.c (mpn_binvert_itch): Enable more economical
671	mpn_mulmod_bnm1_itch call.
672
673	* mpn/generic/mu_div_qr.c: Remove always true #if.
674	* mpn/generic/mu_divappr_q.c: Likewise.
675	* mpn/generic/mu_bdiv_q.c: Likewise.
676	* mpn/generic/mu_bdiv_qr.c: Likewise.
677
6782010-02-01  Torbjorn Granlund  <tege@gmplib.org>
679
680	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
681	Bump version info.
682
683	* mpn/powerpc64/mode64/gmp-mparam.h: Remove {MUL,SQR}_FFT_TABLE2.
684	* mpn/x86/p6/gmp-mparam.h: Likewise.
685	* mpn/x86/p6/mmx/gmp-mparam.h: Likewise.
686	* mpn/generic/mul_fft.c: Don't depend on FFT_TABLE2, it was broken.
687
6882010-01-29  Torbjorn Granlund  <tege@gmplib.org>
689
690	* mpn/generic/mul_fft.c (mpn_mul_fft_internal): Remove arguments n, m,
691	k and rec; add argument sqr.  Don't call mpn_mul_fft_decompose here,
692	instead do that in all callers.
693	(mpn_mul_fft): Trim allocation when squaring, and use TMP_ALLOC*, not
694	explicit alloc/free.
695	(mpn_fft_div_2exp_modF): Avoid a scalar division.
696	(mpn_fft_mul_modF_K): Replace some multiplies by K with shifting by k.
697	(mpn_fft_mul_2exp_modF): Make function more symmetrical.
698
6992010-01-27  Torbjorn Granlund  <tege@gmplib.org>
700
701	* mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): Rewrite.
702	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Re-enable
703	better mulmod itch estimate.
704	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
705	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
706	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
707
7082010-01-27 Marco Bodrato <bodrato@mail.dm.unipi.it>
709
710	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Disabled guessed
711	estimate, enabled a conservative one.
712	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
713	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
714	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
715
7162010-01-26 Marco Bodrato <bodrato@mail.dm.unipi.it>
717
718	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Partial rewrite to
719	reduce memory usage.
720	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
721	(mpn_sqrmod_bnm1_next_size): New function.
722
723	* gmp-impl.h (mpn_mulmod_bnm1_itch): Accepts 3 parameters now.
724	(mpn_sqrmod_bnm1_itch): New inline function.
725	(mpn_sqrmod_bnm1_next_size): Declaration and mangling.
726	* mpn/generic/nussbaumer_mul.c: Use the new functions.
727
728	* mpn/generic/invertappr.c (mpn_ni_invertappr): Use new syntax for
729	mpn_mulmod_bnm1_itch.
730	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
731	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
732	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
733	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Likewise.
734	* mpn/generic/binvert.c (mpn_binvert_itch): Likewise.
735	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): Likewise.
736	(SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Likewise.
737
738	* tests/mpn/t-sqrmod_bnm1.c, tests/mpn/t-mulmod_bnm1.c: Test
739	reduced memory usage.
740
7412010-01-25  Torbjorn Granlund  <tege@gmplib.org>
742
743	* tune/tuneup.c (INSERT_FFTTAB): New macro, like old insertion code but
744	also inserting a sentinel.
745	(fftmes): Use INSERT_FFTTAB for inserting new measurements.
746	Limit k range to best_k - 4 ... best_k + 4.
747
7482010-01-23  Torbjorn Granlund  <tege@gmplib.org>
749
750	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
751	(__GMP_MP_RELEASE): New macro.
752
753	* mpf/div.c: Rewrite to use mpn_div_q.
754
7552010-01-21  Torbjorn Granlund  <tege@gmplib.org>
756
757	* Add FFT_TABLE3 tables for a basic set of machines.
758
759	* configure.in: Use -mtune=nocona for 64-bit pentium4.
760
761	* config.guess: Recognise many more Intel processors.
762
763	* tune/common.c: Whitespace cleanup.
764	(speed_mpn_matrix22_mul): Rewrite.
765
7662010-01-21  Niels M�ller  <nisse@lysator.liu.se>
767
768	* mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Take
769	advantage of new mpn_mulmod_bnm1 interface, to reduce allocation.
770
771	* tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1, main): Adapted to
772	mpn_mulmod_bnm1 interface change.
773
774	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Interface change,
775	in case an + bn < rn, only write an + bn output limbs. New input
776	requirement, an + bn > rn/2.
777	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Corresponding
778	changes.
779
7802010-01-19  Torbjorn Granlund  <tege@gmplib.org>
781
782	* tune/tuneup.c (fftmes): Round up initial n according to initial k.
783	Limit k to 24 in loop.  Remove an obsolete always-true condition.
784	Remove a redundant trace printout.
785
7862010-01-18  Torbjorn Granlund  <tege@gmplib.org>
787
788	* tune/tuneup.c (fftmes): New function
789	(fft): Rewrite.
790	(mpn_mul_fft_lcm): New function, copied from mpn/generic/mul_fft.c.
791	(fftfill): New function, code taken from mul_fft.c (mpn_mul_fft).
792	(cached_measure): New function.
793
794	* gmp-impl.h (struct fft_table_nk): Moved from mul_fft.c.
795	(MUL_FFT_TABLE3, SQR_FFT_TABLE3): Provide dummy versions for tuneup
796	builds.
797	(FFT_TABLE3_SIZE): Increase value for tuneup builds.
798
799	* mpn/generic/mul_fft.c: Handle a new FFT threshold table type ("3").
800	Misc cleanups to old table type code.
801
8022010-01-16  Torbjorn Granlund  <tege@gmplib.org>
803
804	* mpn/x86_64/darwin.m4: Fix typo in last change.
805
8062010-01-15  Torbjorn Granlund  <tege@gmplib.org>
807
808	* gmp-h.in (__GMP_EXTERN_INLINE): Remove "extern" for newer Sun C.
809
810	* gmp-impl.h (GMP_LIMB_BYTES): New define.
811
812	* mpn/x86_64/darwin.m4 (LEA): New define.
813
814	* mpn/x86/invert_limb.asm (approx_tab): Use DEF_OBJECT.
815	Rename and globalise it to work around Mac OS bug.
816
817	With Philip McLaughlin:
818	* mpn/x86_64/gcd_1.asm (ctz_table): Don't use local prefix, but
819	use DEF_OBJECT...END_OBJECT.
820	Keep stack pointer at ABI mandated alignment over call.
821
8222010-01-12  Torbjorn Granlund  <tege@gmplib.org>
823
824	* tune/speed.c (routine): Remove obsolete mpn_dc_tdiv_qr and
825	mpn_dc_div_qr_n.
826	* tune/common.c (speed_mpn_dc_tdiv_qr, speed_mpn_dcpi1_div_qr_n):
827	Remove now unused functions.
828	* tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_N,
829	SPEED_ROUTINE_MPN_DC_DIVREM_SB, SPEED_ROUTINE_MPN_DC_TDIV_QR): Remove
830	now unused macros.
831
832	* mpn/x86_64/fat/fat_entry.asm (mpn_cpuid_available): Remove function.
833
834	* ltmain.sh: Upgrade from 1.5.24 to 2.2.6b.
835	* ylwrap: New file.
836	* .bootstrap: Remove explicit versions.
837
838	* doc/gmp.texi (Block-wise Barrett Division): New node.
839
840	* mpn/generic/powm.c: Change some #if to plain 'if' to avoid fat build
841	problems.
842
8432010-01-11  Torbjorn Granlund  <tege@gmplib.org>
844
845	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): Accept arguments for size
846	restrictions.
847	* tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
848	(speed_mpn_sbpi1_divappr_q, speed_mpn_dcpi1_divappr_q): Pass size
849	limits for SPEED_ROUTINE_MPN_PI1_DIV.
850
851	* tune/speed.c (routine): Allow .r argument for mpn_sbpi1_divappr_q and
852	mpn_dcpi1_divappr_q.
853
8542010-01-08  Torbjorn Granlund  <tege@gmplib.org>
855
856	* Version 5.0.0 released.
857
858	* mpn/generic/div_q.c: Handle mpn_*_divappr_q returning high limb
859	everywhere.
860
8612010-01-07  Torbjorn Granlund  <tege@gmplib.org>
862
863	* Update MUL_FFT_TABLE2 and SQR_FFT_TABLE2 for many machines.
864
865	* mpn/generic/mu_div_q.c: Account for divisor truncation error as well
866	as mpn_mu_divappr_q's error.
867
868	* mpn/generic/mu_div_q.c: Handle mpn_preinv_mu_divappr_q returning a
869	high limb.
870
871	* tests/mpn/t-bdiv.c: Move a random call for debugability.
872	* tests/mpn/t-div.c: Likewise.
873
874	* mpn/generic/mu_divappr_q.c: Rewrite quotient round-up code.
875
876	* mpn/generic/mu_div_qr.c: Handle carry-out from a carry propagation
877	subtract.
878	* mpn/generic/mu_divappr_q.c: Likewise.
879
880	* mpn/generic/mu_divappr_q.c
881	(mpn_preinv_mu_divappr_q, mpn_mu_divappr_q): Declare dividend constant.
882	* gmp-impl.h: Likewise.
883
884	* perfpow.c (mpn_perfect_power_p): Call mpn_divexact instead of
885	mpn_bdiv_q (with too little scratch space!).
886
887	From Niels M�ller:
888	* tests/mpn/t-div.c (check_one): Get rid of the poorly managed variable
889	tn.
890
891	* mpn/minithres/gmp-mparam.h: Add all lately defined thresholds.
892
893	* mpn/generic/div_q.c: Use SB division for small quotients as well as
894	small divisors.  Fix typo in itch call.
895
8962010-01-06  Niels M�ller  <nisse@lysator.liu.se>
897
898	* tests/mpn/t-div.c (check_one): Checking based on multiplication,
899	refmpn_mul, rather than refmpn_tdiv_qr.
900
9012010-01-06 Marco Bodrato <bodrato@mail.dm.unipi.it>
902
903	* mpn/generic/toom8h_mul.c: Avoid overflows of mp_size_t.
904
9052010-01-06  Torbjorn Granlund  <tege@gmplib.org>
906
907	* gmp-h.in (__GNU_MP__): Bump.
908	(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL):
909	Bump version info.
910	* mp-h.in (__GNU_MP__): Bump.
911	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
912	Bump version info.
913
914	* doc/gmp.texi: Rewrite mpn_gcdext text.  Remove some out-of-date
915	text in Algorithms chapter.
916
917	* mpn/generic/div_q.c: Properly handle np=scratch.  Fix critical typo
918	in final adjustment code.  Misc cleanups.
919
920	* mpn/generic/rootrem.c: Use mpn_div_q.
921	* mpz/tdiv_q.c: Likewise.
922
923	* tests/mpn/t-div.c: Test mpn_div_q.
924	(SIZE_LOG): Up to 17.
925
926	* mpn/generic/div_q.c: New file.
927	* configure.in (gmp_mpn_functions): Add div_q.
928
929	* mpn/generic/mu_div_q.c: Actually declare dividend constant.
930
9312010-01-04  Torbjorn Granlund  <tege@gmplib.org>
932
933	* tune/tuneup.c (fft): Separate tuning of modf and full products.
934	(struct fft_param_t): New field, mul_modf_function.
935	(tune_fft_sqr): Fix typo.
936	(tune_fft_mul, tune_fft_sqr): Initialise mul_modf_function field.
937	* tune/common.c (speed_mpn_fft_mul, speed_mpn_fft_sqr): New functions.
938
939	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.
940
941	* mpn/generic/mul.c: Simplify rational expression.
942
943	* gmp-impl.h: Cleanup threshold variables; remove obsolete ones and
944	make all possibly needed definitions for existing ones.
945	* tune/tuneup.c (tune_mul): Write fractions-compensated values to
946	threshold variables.
947
9482010-01-03 Marco Bodrato <bodrato@mail.dm.unipi.it>
949
950	* tune/common.c, tune/speed.c, tune/speed.h: Support measuring
951	mpn_toom43_mul.
952
953	* mpn/generic/toom_interpolate_6pts.c: Small reorganisation.
954
9552010-01-03  Torbjorn Granlund  <tege@gmplib.org>
956
957	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
958	INV_MULMOD_BNM1_THRESHOLD/2 instead.
959
960	* gmp-impl.h (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default
961	here...
962	* mpn/generic/invert.c, mpn/generic/invertappr.c: ...not here.
963
964	* tests/mpn/t-div.c: Rewrite operand generation code.
965
9662010-01-02  Torbjorn Granlund  <tege@gmplib.org>
967
968	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
969	INV_MULMOD_BNM1_THRESHOLD.
970
9712010-01-02  Marco Bodrato <bodrato@mail.dm.unipi.it>
972
973	* mpn/generic/dcpi1_div_q.c: Handle divappr approximation problem more
974	efficiently.
975	* mpn/generic/mu_div_q.c: Likewise.
976
977	* mpn/generic/invert.c: Remove duplicated code.
978
9792010-01-01  Torbjorn Granlund  <tege@gmplib.org>
980
981	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to 0.
982
983	* mpn/generic/mu_div_qr.c: Rewrite to use mpn_mulmod_bnm1.  Clean up
984	scratch usage.  Improve itch functions.
985	* mpn/generic/mu_divappr_q.c: Likewise.
986	* mpn/generic/mu_bdiv_qr.c: Likewise.
987	* mpn/generic/mu_div_q.c: Likewise.
988
989	* mpn/generic/dcpi1_bdiv_qr.c: Add parameter ASSERTs.
990	* mpn/generic/dcpi1_bdiv_q.c: Likewise.
991
992	* tests/mpn/t-bdiv.c: Replace with unit testing code, based on t-div.c.
993	Increase COUNT to 500.
994
995	* tests/mpn/t-div.c: Avoid generating too small test operands.
996	Move SB suppression limit downwards.  Increase COUNT to 200.
997
9982009-12-31  Torbjorn Granlund  <tege@gmplib.org>
999
1000	* mpn/generic/tdiv_qr.c: Handle numerator/remainder overlap in MU case.
1001
1002	* tests/tests.h (TESTS_REPS): New macro.
1003	* tests/mpz/dive.c: Use larger operands, decrease default reps, use
1004	TESTS_REPS.
1005	* tests/mpz/convert.c: Likewise.
1006	* tests/mpz/t-sqrtrem.c: Likewise.
1007	* tests/mpz/reuse: Likewise.
1008	* tests/mpz/t-root.c: Likewise.
1009	* tests/mpz/t-tdiv.c: Likewise.
1010	* tests/mpz/t-gcd.c: Likewise.
1011	* tests/mpz/t-powm.c: Likewise.
1012
10132009-12-31  Marco Bodrato <bodrato@mail.dm.unipi.it>
1014
1015	* mpn/generic/toom8_sqr.c (SQR_TOOM8_MAX): Avoid overflow.
1016	* mpn/generic/toom6_sqr.c (SQR_TOOM6_MAX): Likewise.
1017
1018	* mpn/generic/mulmod_bnm1.c: Don't mention MISUSE any more,
1019	simply consider UNLIKELY any unexpected size.
1020
10212009-12-31  Torbjorn Granlund  <tege@gmplib.org>
1022
1023	* tune/tuneup.c (speed_mpn_sbordcpi1_div_qr): New function.
1024	(tune_mu_div): Use it.
1025
10262009-12-30  Torbjorn Granlund  <tege@gmplib.org>
1027
1028	* tune/tuneup.c (tune_mu_bdiv, tune_dc_bdiv, tune_mu_div)
1029	(tune_dc_div): Clear global s.r to make speed functions do 2n/n.
1030
1031	* tune/speed.c (routine): New entries for mpn_mu_div_qr and
1032	mpn_mupi_div_qr.  Allow .r parameter for mpn_sbpi1_div_qr,
1033	mpn_dcpi1_div_qr.
1034	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV, SPEED_ROUTINE_MPN_MU_DIV_QR)
1035	(SPEED_ROUTINE_MPN_MUPI_DIV_QR): Handle .r parameter.
1036
1037	* tests/mpz/t-tdiv.c: Increase operands size again.
1038
1039	* mpn/generic/tdiv_qr.c: Attempt to choose between DC and MU cleverer.
1040
1041	* mpn/generic/tdiv_qr.c: Don't overwrite rp with unnecessary temporary
1042	alloc.
1043
10442009-12-29  Torbjorn Granlund  <tege@gmplib.org>
1045
1046	* tune/tuneup.c (tune_mu_div): Tune MUPI_DIV_QR_THRESHOLD.
1047	* tune/speed.h (struct speed_params): Allow 3 source operands.
1048	(SPEED_ROUTINE_MPN_MUPI_DIV_QR): New macro.
1049	* tune/common.c (speed_mpn_mupi_div_qr): New function.
1050
1051	* mpn/generic/tdiv_qr.c: Call mpn_mu_div_qr.
1052
1053	* tests/mpz/t-tdiv.c: Use larger test operands.
1054
1055	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr2): Remove code for dn==1.
1056
1057	* mpz/mul.c: Call mpn_sqr directly.  Use PTR,SIZ,ALLOC.
1058
1059	* tune/tuneup.c (tune_mu_div): Set min_size to 6, DC functions require
1060	this.
1061
1062	* tests/mpn/t-div.c: Call mu_div functions with operands that generate
1063	a high quotient limb.
1064
1065	* mpn/generic/mu_div_qr.c: Rewrite to return a high quotient limb,
1066	to let dividend argument be constant, and as a general cleanup.
1067	* mpn/generic/mu_divappr_q.c: Likewise.
1068	* mpn/generic/mu_div_q.c: Likewise.
1069	* gmp-impl.h: Update declarations of changed functions.
1070
1071	* mpn/generic/invertappr.c (mpn_invertappr): Allocate scratch space
1072	when caller passed NULL.
1073
10742009-12-28  Torbjorn Granlund  <tege@gmplib.org>
1075
1076	* mpn/generic/toom_couple_handling.c: Prefix name with mpn_.
1077	* gmp-impl.h: Likewise.
1078	* mpn/generic/toom63_mul.c: Likewise.
1079	* mpn/generic/toom6_sqr.c: Likewise.
1080	* mpn/generic/toom6h_mul.c: Likewise.
1081	* mpn/generic/toom8_sqr.c: Likewise.
1082	* mpn/generic/toom8h_mul.c: Likewise.
1083
1084	* configure.in (gmp_mpn_functions_optional) Move "com" from here...
1085	(gmp_mpn_functions): ...to here.
1086	* mpn/generic/com.c: New file.
1087	* (mpn_com): New name for mpn_com_n.  Make public.
1088	* (mpn_neg): Analogous changes.
1089
1090	* tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Set step_factor.
1091
1092	* tune/common.c, tune/speed.c, tune/speed.h: Support measuring
1093	mpn_lshiftc.
1094
1095	* tests/devel/try.c: Test mpn_lshiftc.
1096	* tests/refmpn.c (refmpn_com): New function.
1097	(refmpn_lshiftc): Likewise.
1098
1099	* configure.in (gmp_mpn_functions_optional) Move lshiftc from here...
1100	(gmp_mpn_functions): ...to here.
1101	* mpn/generic/lshiftc.c: New file.
1102	* mpn/x86_64/lshiftc.asm: New file.
1103	* mpn/x86_64/core2/lshiftc.asm: New file.
1104	* mpn/generic/mul_fft.c (mpn_lshiftc): Remove.
1105
1106	* mpn/x86_64/core2/lshift.asm: Tweak for better Core iN performance.
1107	* mpn/x86_64/core2/rshift.asm: Likewise.
1108
11092009-12-27  Marco Bodrato <bodrato@mail.dm.unipi.it>
1110
1111	* mpn/generic/mul.c: Use toom6h and toom8h for almost balanced.
1112
1113	* mpn/generic/mullo_n.c (mpn_dc_mullo_n): New ratio, to be used in
1114	Toom-8 range.
1115
11162009-12-27  Torbjorn Granlund  <tege@gmplib.org>
1117
1118	* (mpn_sqr): New name for mpn_sqr_n.  Many files affected.
1119
1120	* tune/tuneup.c (tune_mullo): Up step_factor for MULLO_MUL_N_THRESHOLD.
1121	(tune_invertappr, tune_invert, tune_binvert): Let max_size default.
1122
1123	* tune/tuneup.c (tune_mu_div, tune_mu_bdiv) New functions.
1124	* tune/speed.h (SPEED_ROUTINE_MPN_MU_DIV_Q): New macro.
1125	(SPEED_ROUTINE_MPN_MU_DIV_QR): Likewise.
1126	(SPEED_ROUTINE_MPN_MU_BDIV_Q): Likewise.
1127	(SPEED_ROUTINE_MPN_MU_BDIV_QR): Likewise.
1128	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add bdiv_q.c and bdiv_qr.c.
1129	* tune/common.c (speed_mpn_mu_div_qr): New function.
1130	(speed_mpn_mu_divappr_q): Likewise.
1131	(speed_mpn_mu_div_q): Likewise.
1132	(speed_mpn_mu_bdiv_q): Likewise.
1133	(speed_mpn_mu_bdiv_qr): Likewise.
1134
1135	* mpn/*/gmp-mparam.h: Fix incorrect MOD_1U_TO_MOD_1_1_THRESHOLD 0
1136	values.
1137
1138	* gmp-impl.h (MODEXACT_1_ODD_THRESHOLD): Remove.
1139	(BMOD_1_TO_MOD_1_THRESHOLD): New parameter, with the reverse meaning of
1140	MODEXACT_1_ODD_THRESHOLD.
1141	(MPN_MOD_OR_MODEXACT_1_ODD): Use BMOD_1_TO_MOD_1_THRESHOLD.
1142	* mpn/generic/divis.c, mpz/{cong.c,cong_ui.c,divis_ui.c}: Likewise.
1143	* tune/tuneup.c (tune_modexact_1_odd): Tune BMOD_1_TO_MOD_1_THRESHOLD;
1144	Do not assume native mpn_modexact_1_odd is faster than mpn_mod_1.
1145	(tuned_speed_mpn_mod_1): Remove variable.
1146	(tune_mod_1): Fix thinkos.  Suppress printing of "always" etc.
1147	(all): Measure for divrem_1, mod_1, divexact_1, etc first, since Toom
1148	depends on some of them.
1149
1150	* mpn/generic/toom22_mul.c (TOOM22_MUL_REC): New name for
1151	TOOM22_MUL_MN_REC.
1152
11532009-12-26  Niels M�ller  <nisse@lysator.liu.se>
1154
1155	* tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Relax
1156	requirements a bit.
1157
1158	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Relax requirement on
1159	input sizes, to support s+t>=n (used to be s+t>=n+2). Keep high
1160	limbs of the evaluated values in scalar variables.
1161
1162	* mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Remove
1163	unused variables.
1164
1165	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Fixed left-over use
1166	of mpn_addsub_n which should be mpn_add_n_sub_n.
1167
11682009-12-26  Marco Bodrato <bodrato@mail.dm.unipi.it>
1169
1170	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add new toom files (spotted by Torbjorn).
1171
1172	* gmp-impl.h (mpn_toom6_sqr_itch): Rename to mpn_toom6_mul_n_itch and redefine.
1173	(mpn_toom8_sqr_itch): Rename to mpn_toom8_mul_n_itch and redefine.
1174	* mpn/generic/mul_n.c: Use renamed _itch macros.
1175
11762009-12-25  Niels M�ller  <nisse@lysator.liu.se>
1177
1178	* tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Tightened requirements.
1179	* gmp-impl.h (mpn_toom32_mul_itch): Updated. Less scratch needed
1180	by toom32 itself, and also the pointwise multiplications are
1181	currently mpn_mul_n with no supplied scratch.
1182	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Reorganized
1183	interpolation to use less scratch space. No longer supports the
1184	most extreme size ratios.
1185
11862009-12-25  Torbjorn Granlund  <tege@gmplib.org>
1187
1188	* tune/tuneup.c (tune_preinv_mod_1): Purge.
1189	(tune_mod_1): Use speed_mpn_mod_1_tune for
1190	PREINV_MOD_1_TO_MOD_1_THRESHOLD
1191
1192	* mpn/generic/dcpi1_divappr_q.c: Handle 2n/n properly.  Don't use full
1193	precision in mpn_sbpi1_divappr_q call.  Misc cleanup.
1194
1195	* tune/tuneup.c (tune_mod_1): Add a check_size for
1196	PREINV_MOD_1_TO_MOD_1_THRESHOLD.
1197
11982009-12-24  Torbjorn Granlund  <tege@gmplib.org>
1199
1200	* tune/mod_1_div.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
1201	(MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
1202	* tune/mod_1_inv.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
1203	(MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
1204
1205	* gmp-impl.h (USE_PREINV_MOD_1): Remove.
1206	(MPN_MOD_OR_PREINV_MOD_1): Define to choose functions dynamically in
1207	terms of PREINV_MOD_1_TO_MOD_1_THRESHOLD (used to choose statically
1208	using USE_PREINV_MOD_1).
1209	* mpn/generic/perfsqr.c (PERFSQR_MOD_PP): Corresponding updates.
1210
1211	* tune/tuneup.c (tune_mod_1): Rewrite.
1212	* gmp-impl.h (MOD_1N_TO_MOD_1_1_THRESHOLD): New.
1213	(MOD_1U_TO_MOD_1_1_THRESHOLD): New name for MOD_1_1_THRESHOLD.
1214	(MOD_1_1_TO_MOD_1_2_THRESHOLD): Mew name for MOD_1_2_THRESHOLD.
1215	(MOD_1_2_TO_MOD_1_4_THRESHOLD): New name for MOD_1_4_THRESHOLD.
1216	* mpn/generic/mod_1.c: Corresponding updates.
1217
12182009-12-24  Marco Bodrato <bodrato@mail.dm.unipi.it>
1219
1220	* mpn/generic/mul_n.c: Use also toom6h and toom8h.
1221	* mpn/generic/sqr_n.c: Use also toom6 and toom8.
1222	* gmp-impl.h: Initial support for tuning of Toom-6half and Toom-8half.
1223	* tune/tuneup.c: Tune Toom-6half and Toom-8half thresholds.
1224
12252009-12-24  Torbjorn Granlund  <tege@gmplib.org>
1226
1227	* mpn/generic/mod_1_4.c: Get ASSERT right.
1228	* mpn/generic/mod_1_3.c: Likewise.
1229	* mpn/generic/mod_1_2.c: Likewise.
1230
1231	* mpn/generic/powm_sec.c: Use SQR_TOOM2_THRESHOLD as limit for a native
1232	mpn_sqr_basecase, not TUNE_SQR_TOOM2_MAX.
1233
12342009-12-23  Marco Bodrato <bodrato@mail.dm.unipi.it>
1235
1236	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
1237	mpn_toom8h_mul and mpn_toom8_sqr speed.
1238
1239	* mpn/generic/toom_eval_pm2exp.c: Fix ASSERTs.
1240
1241	* mpn/generic/toom8h_mul.c: New file.
1242	* mpn/generic/toom8_sqr.c: New file.
1243	* mpn/generic/toom_interpolate_16pts.c: New file.
1244	* gmp-impl.h: Provide corresponding declarations.
1245	* configure.in (gmp_mpn_functions): List toom_interpolate_16pts,
1246	toom8h_mul, and toom8h_sqr.
1247	* tests/mpn/t-toom8h.c: New test program.
1248
1249	* mpn/generic/toom6_sqr.c: New file, was part of toom6h_mul.
1250	* mpn/generic/toom6h_mul.c: Removed _sqr.
1251
1252	* mpn/generic/mulmod_bnm1.c: Nailify CRT.
1253	* mpn/generic/sqrmod_bnm1.c: Likewise.
1254
1255	* mpn/generic/mullo_n.c: Split dc_mullo_n function;
1256	ALLOC memory at once.
1257
1258	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Update.
1259
1260	* mpn/generic/toom6h_mul.c: Add prefix to toom_interpolate_12pts.
1261	* mpn/generic/toom_interpolate_12pts.c: Likewise.
1262
1263	* mpn/generic/invertappr.c (mpn_bc_invertappr): Use mpn_divrem_2.
1264	* mpn/generic/invert.c: Faster basecase, use mpn_sbpi1_div_q.
1265
1266	* mpn/generic/toom_eval_pm2exp.c: Assert support for degree 3.
1267	* mpn/generic/toom6h_mul.c: Avoid obsolete _itch function.
1268
12692009-12-23  Torbjorn Granlund  <tege@gmplib.org>
1270
1271	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
1272	mpn_mod_1_1p, mpn_mod_1s_2p, mpn_mod_1s_3p, mpn_mod_1s_4p.
1273
1274	* tests/mpz/t-powm.c: Test mpz_powm_sec.
1275
1276	* mpz/powm_sec.c: New file.
1277	* gmp-h.in: Declare it.
1278	* Makefile.am, mpz/Makefile.am: Compile it.
1279	* doc/gmp.texi: Document it.
1280
1281	* mpn/generic/powm_sec.c (mpn_powm_sec_itch): New function.
1282	(mpn_powm_sec): Use passed scratch, no local allocation.
1283	Allow exp argument = 1.
1284	(win_size): Start loop from 1.
1285
1286	* mpn/generic/powm.c (win_size): Start loop from 1.
1287
12882009-12-22  Torbjorn Granlund  <tege@gmplib.org>
1289
1290	* tests/mpn/t-div.c: New file.
1291	* tests/mpn/Makefile.am: Compile it.
1292
1293	* mpn/generic/mu_divappr_q.c: Handle quotient overflow.
1294
1295	* mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): New function.
1296
12972009-12-22  Niels M�ller  <<nisse@lysator.liu.se>>
1298
1299	* mpn/generic/sbpi1_div_q.c: Use udiv_qr_3by2.  Intended to change
1300	nothing after preprocessing.
1301
1302	* mpn/generic/sbpi1_divappr_q.c: For the last call to udiv_qr_3by2,
1303	avoid using memory locations as output parameters, and revert to
1304	explicitly copying n1 and n0 to memory.
1305
1306	* gmp-impl.h (udiv_qr_3by2): Tweaked to expand to precisely the
1307	same code as was used before the introduction of this macro.
1308	Eliminated some local variables, instead do multiple updates to
1309	the output parameters.
1310
13112009-12-22  Torbjorn Granlund  <tege@gmplib.org>
1312
1313	* tests/mpn/t-toom6h.c (MIN_AN): Set to MUL_TOOM6H_THRESHOLD to avoid
1314	invalid recursive sizes.
1315
1316	* tests/mpn/t-bdiv.c: Get itch function calls right.
1317
1318	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Rewrite.
1319	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify.
1320
1321	* mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Simplify, don't allocate.
1322	(mpn_bdiv_qr_itch): Conditionalise on MU_BDIV_QR_THRESHOLD.
1323
13242009-12-18  Niels M�ller  <nisse@lysator.liu.se>
1325
1326	* tests/mpn/t-bdiv.c: Add red-zones.
1327
13282009-12-21  Torbjorn Granlund  <tege@gmplib.org>
1329
1330	* mpn/generic/sbpi1_div_q.c: Fix fixup code to work for qn = 0.
1331
1332	* mpn/generic/dcpi1_divappr_q.c: Handle qn = 1 and qn = 2 for initial
1333	quotient block (code block copied from dcpi1_div_qr.c).
1334
1335	* mpn/generic/dcpi1_div_qr.c: Rewrite singular case giving q limb of
1336	GMP_NUMB_MAX.  Remove an impossible qn = 0 case.
1337
1338	* mpn/generic/dcpi1_bdiv_q.c: Remove a spurious mpn_sub_1.
1339
1340	* mpn/generic/mul.c: Put back call to mpn_mul_n.
1341
1342	* tune/tuneup.c (all): Call tune_mulmod_bnm1 before tuning fft due to
1343	dependency on mulmod_bnm1 from both mul_fft_mul and from mullo_n.
1344
1345	* mpn/generic/dcpi1_divappr_q.c: ASSERT that dn >= 6 and nn > dn.
1346	* mpn/generic/dcpi1_div_q.c: ASSERT that dn >= 6 and nn-dn >= 3.
1347	* mpn/generic/dcpi1_div_qr.c: ASSERT that dn >= 6 and nn-dn >= 3.
1348
1349	* mpn/generic/bdiv_q_1.c (mpn_pi1_bdiv_q_1): Renamed from
1350	mpn_bdiv_q_1_pi1.
1351	* All references changed.
1352
1353	* configure.in: Add --enable-old-fft-full.
1354	* tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on
1355	WANT_OLD_FFT_FULL.
1356	* tune/common.c (speed_mpn_mul_fft_full)
1357	(speed_mpn_mul_fft_full_sqr): Likewise.
1358	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Include iff
1359	WANT_OLD_FFT_FULL.
1360
13612009-12-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
1362
1363	* gmp-impl.h (mpn_toom6h_mul_itch): New inline function.
1364	(MUL_TOOM6H_THRESHOLD): Default value.
1365	(SQR_TOOM6_THRESHOLD): Default value.
1366	* mpn/generic/toom6h_mul.c: Remove definitions moved to gmp-impl.h.
1367	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
1368	mpn_toom6h_mul and mpn_toom6_sqr speed.
1369
1370	* mpn/generic/toom63_mul.c: Remove unused TMP_*.
1371
1372	* mpn/generic/toom_eval_pm2rexp.c: New file.
1373	* gmp-impl.h: Provide corresponding declaration.
1374	* configure.in (gmp_mpn_functions): List toom_eval_pm2rexp.
1375	* mpn/generic/toom6h_mul.c: Use shared toom_eval_pm2rexp.
1376
1377	* mpn/generic/toom_couple_handling.c: New file, helper function
1378	for high degree Toom.
1379	* gmp-impl.h: Provide corresponding declaration.
1380	* configure.in (gmp_mpn_functions): List toom_couple_handling.
1381	* mpn/generic/toom6h_mul.c: Use shared toom_couple_handling.
1382	* mpn/generic/toom63_mul.c: Likewise.
1383
1384	* mpn/generic/toom6h_mul.c: New file.
1385	* mpn/generic/toom_interpolate_12pts.c: New file.
1386	* gmp-impl.h: Provide corresponding declarations.
1387	* configure.in (gmp_mpn_functions): List toom_interpolate_12pts,
1388	toom6h_mul.
1389	* tests/mpn/t-toom6h.c: New test program.
1390
1391	* tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1): Use ref_mul.
1392	* tests/mpn/t-sqrmod_bnm1.c (ref_sqrmod_bnm1): Likewise.
1393
13942009-12-20  Marco Bodrato <bodrato@mail.dm.unipi.it>
1395
1396	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): New CRT.
1397	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
1398
13992009-12-20  Torbjorn Granlund  <tege@gmplib.org>
1400
1401	* Change all bit counts for bignums to use mp_bitcnt_t.
1402
1403	* mpn/generic/bdivmod.c: File removed.  All references purged.
1404
1405	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Disable.
1406
1407	* gmp-impl.h: Define mpn_fft_mul as an alias for mpn_nussbaumer_mul.
1408	* mpn/generic/mul.c: Refer mpn_fft_mul.
1409	* mpn/generic/mul_n.c: Likewise.
1410	* mpn/generic/sqr_n.c: Likewise.
1411	* mpn/generic/mullo_n.c: Likewise.
1412
1413	* mpn/generic/mul.c: Loop also over mpn_nussbaumer_mul, as suggested by
1414	Marco.  Use TMP_SALLOC_LIMBS in more places.  Clean up ws allocation.
1415
14162009-12-19  Marco Bodrato <bodrato@mail.dm.unipi.it>
1417
1418	* mpn/generic/toom_interpolate_8pts.c: Nailify.
1419
14202009-12-19  Torbjorn Granlund  <tege@gmplib.org>
1421
1422	* mpn/generic/mul.c: Major rewrite.  Use toom43, toom53, toom63.
1423	Call mpn_nussbaumer_mul for largest operands.
1424
1425	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL): New macro.
1426	(SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL): New macro.
1427	(SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL): New macro.
1428	(SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL): New macro.
1429	(SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL): New macro.
1430	(SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL): New macro.
1431	* tune/common.c (speed_mpn_toom63_mul): New function.
1432	(speed_mpn_toom32_for_toom43_mul): New function.
1433	(speed_mpn_toom43_for_toom32_mul): New function.
1434	(speed_mpn_toom32_for_toom53_mul): New function.
1435	(speed_mpn_toom53_for_toom32_mul): New function.
1436	(speed_mpn_toom42_for_toom53_mul): New function.
1437	(speed_mpn_toom53_for_toom42_mul): New function.
1438	* tune/tuneup.c (tune_mul_n): New name for old tune_mul.
1439	(tune_sqr_n): New name for old tune_sqr.
1440	(tune_mul): New function, for unbalanced multiplication.
1441	* gmp-impl.h: Provide declarations for corresponding threshold vars.
1442
1443	* gmp-impl.h (mpn_rsh1add_nc, mpn_rsh1sub_nc): Declare.
1444	* mpn/asm-defs.m4: Likewise.
1445	* configure.in: Add corresponding HAVE_NATIVEs.
1446	* mpn/x86_64/rsh1aors_n.asm: Add _nc entry point.
1447
14482009-12-18  Niels M�ller  <nisse@lysator.liu.se>
1449
1450	* mpz/divexact.c: Rewrite to use mpn_divexact.
1451
1452	* mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Deleted some unused
1453	variables.
1454
1455	* mpn/generic/toom52_mul.c (mpn_toom52_mul)
1456	[HAVE_NATIVE_mpn_add_n_sub_n]: Moved declaration of cy to avoid a
1457	compiler warning.
1458
1459	* gmp-impl.h (gmp_pi1_t): Eliminated inv21 member.
1460	(invert_pi1): ...and don't store it here.
1461
1462	* mpn/generic/toom63_mul.c (mpn_toom63_mul): Simplified
1463	calculation of block size n.
1464	* gmp-impl.h (mpn_toom63_mul_itch): Likewise.
1465
1466	* mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Fixed
1467	output asserts.
1468
14692009-12-18  Torbjorn Granlund  <tege@gmplib.org>
1470
1471	* tests/mpn/t-toom63.c: New test program.
1472
14732009-12-18  Marco Bodrato <bodrato@mail.dm.unipi.it>
1474
1475	* mpn/generic/invert.c: Nailify.
1476	* mpn/generic/invertappr.c: Nailify.
1477	* mpn/generic/mulmod_bnm1.c: Nailify.
1478	* mpn/generic/sqrmod_bnm1.c: Nailify.
1479
1480	* tests/mpn/t-invert.c: New test program.
1481
1482	* mpn/generic/toom63_mul.c: New file.
1483	* mpn/generic/toom_interpolate_8pts.c: New file.
1484	* gmp-impl.h: Provide corresponding declarations.
1485	* configure.in (gmp_mpn_functions): List toom_interpolate_8pts and
1486	toom63_mul.
1487
14882009-12-17  Torbjorn Granlund  <tege@gmplib.org>
1489
1490	* mpn/generic/mul.c: Move allocation of ws to where it is used.
1491	Identify toom22, 32, 42, in that order (in two places).  Use midline
1492	between toom22, 32, 42.
1493	* mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): Call also
1494	mpn_toom32_mul.
1495
1496	* doc/gmp.texi: Update References section.  Update Contributors
1497	section.  Misc updates.
1498
1499	* gmp-impl.h: Renew default values for all THRESHOLDs.
1500
15012009-12-17  Niels M�ller  <nisse@lysator.liu.se>
1502
1503	* mpn/generic/divexact.c (mpn_divexact): Don't require that the
1504	dividend is normalized. Use MPN_DIVREM_OR_PREINV_DIVREM_1. When
1505	shifting, allocate and process only the low qn+1 limbs. Eliminated
1506	code for the impossible case nn < qn.
1507
1508	* mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): Added some input
1509	asserts.
1510
1511	* mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): In the case that
1512	the initial quotient block is a single limb, use 3/2 division,
1513	thereby eliminating the only use of gmp_pi1_t->inv21.
1514
15152009-12-17  Marco Bodrato <bodrato@mail.dm.unipi.it>
1516
1517	* mpn/generic/invert.c: Added some comment.
1518	* mpn/generic/invertappr.c: Slightly better threshold handling.
1519	* gmp-impl.h (INV_NEWTON_THRESHOLD): Default to 200.
1520
1521	* mpn/generic/nussbaumer_mul.c: New file.
1522	* configure.in (gmp_mpn_functions): Add nussbaumer_mul.
1523	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add nussbaumer_mul.
1524	* gmp-impl.h (mpn_nussbaumer_mul): Added prototype and name-mangling.
1525	* tune/speed.h (speed_mpn_nussbaumer_mul): Declare function.
1526	* tune/common.c (speed_mpn_nussbaumer_mul): New function.
1527	* tune/speed.c (routine): Add speed_mpn_nussbaumer_mul.
1528
1529	* mpn/generic/sqrmod_bnm1.c: New file.
1530	* configure.in (gmp_mpn_functions): Add sqrmod_bnm1.
1531	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrmod_bnm1.
1532	* gmp-impl.h (mpn_sqrmod_bnm1): Added prototype and name-mangling.
1533	(SQRMOD_BNM1_THRESHOLD): support for the new threshold.
1534	* tune/speed.h (speed_mpn_sqrmod_bnm1): Declare function.
1535	* tune/common.c (speed_mpn_sqrmod_bnm1): New function.
1536	* tune/speed.c (routine): Add speed_mpn_sqrmod_bnm1.
1537	* tests/mpn/t-mulmod_bnm1.c: Attribution.
1538	* tests/mpn/t-sqrmod_bnm1.c: New test file.
1539	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-sqrmod_bnm1.
1540
1541	* tune/tuneup.c: Tune SQRMOD_BNM1_THRESHOLD.
1542
1543	* mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Mimic fft_mul,
1544	use squaring if operands coincide.
1545	* tune/speed.h (speed_mpn_nussbaumer_mul_sqr): Declare function.
1546	* tune/common.c (speed_mpn_nussbaumer_mul_sqr): New function.
1547	* tune/speed.c (routine): Add speed_mpn_nussbaumer_mul_sqr.
1548
15492009-12-17  Torbjorn Granlund  <tege@gmplib.org>
1550
1551	* mpn/generic/bdiv_q.c (mpn_bdiv_q_itch): Rewrite.
1552
15532009-12-16  Torbjorn Granlund  <tege@gmplib.org>
1554
1555	* tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul
1556	instead of refmpn_mul_basecase.
1557	* tests/mpn/toom-shared.h: Likewise.
1558	* tests/refmpn.c (refmpn_mullo_n,refmpn_sqr,refmpn_mul_any): Likewise.
1559
1560	* minithres/gmp-mparam.h: Add new thresholds, trim old values.
1561
1562	* mpn/generic/powm.c: Use mp_bitcnt_t for bit counts.
1563	Handle REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD in
1564	non-WANT_REDC_2 INNERLOOP expansion code.
1565	* mpn/generic/powm_sec.c: Use mp_bitcnt_t for bit counts.
1566
15672009-12-16  Niels M�ller  <nisse@lysator.liu.se>
1568
1569	* tests/mpz/t-gcd.c (main): Added test case to exercise the
1570	unlikely u0 == u1 case in mpn_gcdext_lehmer_n.
1571
1572	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Get ASSERT
1573	right.
1574
15752009-12-16  Torbjorn Granlund  <tege@gmplib.org>
1576
1577	* tests/mpz/t-mul.c: Misc cleanups.
1578	(mul_basecase): Remove.
1579	(ref_mpn_mul): Remove.
1580	* tests/refmpn.c (refmpn_mul): New function, mainly from t-mul.c's
1581	ref_mpn_mul.
1582	(refmpn_mullo_n): Add a missing free.
1583
1584	* tune/speed.c (routine): Measure speed_mpn_{sb,dc}pi1_div_qr,
1585	mpn_{sb,dc}pi1_divappr_q, mpn_{sb,dc}pi1_bdiv_qr, and
1586	mpn_{sb,dc}pi1_bdiv_q.
1587
1588	* mpn/generic/invertappr.c: New file, meat from invert.c.
1589	* mpn/generic/invert.c: Leave just mpn_invert.c.
1590	* configure.in (gmp_mpn_functions): Add invertappr.
1591	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invertappr.c.
1592	* gmp-impl.h (mpn_invert_itch, mpn_invertappr_itch): New macros.
1593
15942009-12-15  Torbjorn Granlund  <tege@gmplib.org>
1595
1596	* mpn/generic/gcdext_subdiv_step.c: Get an ASSERT right.
1597
15982009-12-15  Niels M�ller  <nisse@lysator.liu.se>
1599
1600	* mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): A very small step
1601	towards nail support.
1602
16032009-12-15  Marco Bodrato <bodrato@mail.dm.unipi.it>
1604
1605	* gmp-impl.h (mpn_ni_invertappr): Added prototype and name-mangling.
1606	* mpn/generic/mulmod_bnm1.c: Comment representation of class [0].
1607
16082009-12-14  Niels M�ller  <nisse@lysator.liu.se>
1609
1610	* mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Use
1611	udiv_qr_3by2.
1612
16132009-12-14  Torbjorn Granlund  <tege@gmplib.org>
1614
1615	* tune/tuneup.c (tune_binvert): Remove BINV_MULMOD_BNM1_THRESHOLD
1616	tuning, it was always zero and caused BINV_NEWTON_THRESHOLD to be
1617	wrong (as pointed out by Marco).
1618	* (BINV_MULMOD_BNM1_THRESHOLD): Clean from other files too.
1619
16202009-12-14  Marco Bodrato <bodrato@mail.dm.unipi.it>
1621
1622	* mpn/generic/invert.c: Improved comments.
1623	(mpn_bc_invertappr): Conditionally re-enable mpn_dcpi1_divappr_q.
1624
16252009-12-14  Niels M�ller  <nisse@lysator.liu.se>
1626
1627	* gmp-impl.h (udiv_qr_3by2): Fix typo in argument list.
1628
16292009-12-13  Niels M�ller  <nisse@lysator.liu.se>
1630
1631	* gmp-impl.h (udiv_qr_3by2): New macro.
1632	* mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): Use udiv_qr_3by2.
1633
16342009-12-13  Torbjorn Granlund  <tege@gmplib.org>
1635
1636	* mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q): Avoid a buffer
1637	overrun.
1638
1639	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Handle carry-out from 2nd
1640	mpn_mul_fft, add an ASSERT for the 1st mpn_mul_fft.  Replace some
1641	comments on cc's range with ASSERTs.
1642
1643	* mpn/generic/gcdext.c (compute_v): Normalise tp[] after mpn_mul.
1644
1645	* mpz/powm.c: Rework buffer handling.
1646
16472009-12-13  Niels M�ller  <nisse@lysator.liu.se>
1648
1649	* tests/mpn/toom-shared.h (main): Use refmpn_mul_basecase to check
1650	results (slow!). Iteration counts of all toom tests reduced
1651	considerably.
1652
16532009-12-13  Marco Bodrato <bodrato@mail.dm.unipi.it>
1654
1655	* mpn/generic/invert.c (mpn_invertapp): Split in _bc and _ni.
1656	(mpn_bc_invertappr): New function, the basecase.
1657	(mpn_ni_invertapp): New function, Newton iteration.
1658	(mpn_invert): Use mpn_ni_invertapp.
1659	* tune/tuneup.c (tune_invert): Min for INV_APPR_THRESHOLD.
1660	(tune_invertappr): Min for INV_NEWTON_THRESHOLD.
1661
1662	* tune/speed.h (SPEED_ROUTINE_MPN_NI_INVERTAPPR): New macro.
1663	(speed_mpn_ni_invertappr): Declare function.
1664	* tune/common.c (speed_mpn_ni_invertappr): New function.
1665	* tune/speed.c (routine): Add speed_mpn_ni_invertappr.
1666
1667	* tune/tuneup.c (tune_invertappr): Use speed_mpn_ni_invertappr to
1668	tune INV_MULMOD_BNM1_THRESHOLD.
1669
16702009-12-12  Torbjorn Granlund  <tege@gmplib.org>
1671
1672	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Rewrite.
1673
16742009-12-12  Marco Bodrato <bodrato@mail.dm.unipi.it>
1675
1676	* tests/mpn/t-mulmod_bnm1.c (main): Disable B^n+1 stressing test
1677	for odd sizes.
1678
1679	* mpn/generic/invert.c: Complete rewrite. Uses Newton iterations.
1680	* gmp-impl.h (mpn_invertappr): Added prototype and name-mangling.
1681	(mpn_invertappr_itch): Added prototype and name-mangling.
1682	(INV_APPR_THRESHOLD): Support for a new tunable const.
1683	* tune/speed.h (SPEED_ROUTINE_MPN_INVERTAPPR): New macro.
1684	(speed_mpn_invertappr): Declare function.
1685	* tune/common.c (speed_mpn_invertappr): New function.
1686	* tune/speed.c (routine): Add speed_mpn_invertappr.
1687	* tune/tuneup.c (tune_invertappr): New function: was tune_invert.
1688	(tune_invert): Now tune only INV_APPR_THRESHOLD.
1689	(all): Enable call to tune_invert and tune_invertappr.
1690
16912009-12-11  Torbjorn Granlund  <tege@gmplib.org>
1692
1693	* mpn/generic/binvert.c: Use mpn_mulmod_bnm1 instead of FFT wrapping.
1694	Old, evidently broken wrapping code removed.
1695	* tune/tuneup.c (tune_binvert): Tune BINV_MULMOD_BNM1_THRESHOLD.
1696	* gmp-impl.h: Provide declarations for corresponding threshold var.
1697
1698	* tests/mpn/t-bdiv.c (COUNT): Decrease to keep run time reasonable.
1699
1700	* tune/tuneup.c (tune_invert): Tune INV_MULMOD_BNM1_THRESHOLD.
1701	* gmp-impl.h: Provide declarations for corresponding threshold var.
1702
1703	* tests/mpn/t-mulmod_bnm1.c: Avoid a division by zero.
1704
1705	* configure.in: Set up different paths for different 64-bit sparc
1706	processors.
1707	* mpn/sparc64/ultrasparc34/gmp-mparam.h: New file.
1708
17092009-12-10  Torbjorn Granlund  <tege@gmplib.org>
1710
1711	* mpn/*/gmp-mparam.h: Regenerate many of these files.
1712
17132009-12-10  Niels M�ller  <nisse@lysator.liu.se>
1714
1715	* gmp-impl.h (mpn_divexact): Removed scratch pointer from
1716	prototype.
1717	* mpn/generic/gcdext.c (divexact): Deleted, moved to...
1718	* mpn/generic/divexact.c (mpn_divexact): New implementation (moved
1719	from gcdext.c). The bidirectional divexact is kept but #if:ed out.
1720	Interface change, since the new code doesn't take a scratch
1721	argument.
1722
1723	* tests/mpn/t-mulmod_bnm1.c (main): Ensure that an >= bn. Lowered
1724	MIN_N to 1. Various fixes to handle n == 1 properly.
1725
1726	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Small interface
1727	change, require an >= bn.
1728
1729	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Fixed non-recursive
1730	case to not write beyond end of result area.
1731
17322009-12-09  Torbjorn Granlund  <tege@gmplib.org>
1733
1734	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): New macro, made
1735	from now deleted SPEED_ROUTINE_MPN_MULMOD_BNM1.
1736	* tune/common.c (speed_mpn_bc_mulmod_bnm1): New function.
1737	(speed_mpn_mulmod_bnm1): Use SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL.
1738	* tune/speed.c (routine): Add mpn_bc_mulmod_bnm1.
1739
1740	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
1741
1742	* tune/tuneup.c (tune_mulmod_bnm1): Rewrite.
1743
17442009-12-08  Marco Bodrato <bodrato@mail.dm.unipi.it>
1745
1746	* mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnm1,
1747	mpn_bc_mulmod_bnp1): Added a parameter for scratch area, possibly
1748	same as result area (as suggested by Niels M�ller).
1749	(mpn_mulmod_bnm1): Calls changed accordingly.
1750
17512009-12-08  Niels M�ller  <nisse@lysator.liu.se>
1752
1753	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Use
1754	table lookup for count_trailing_zeros. Binary algorithm still
1755	disabled by default.
1756
1757	* mpn/generic/gcdext.c (divexact): Local definition of divexact,
1758	using mpn_bdiv_q.
1759	(compute_v): Use it.
1760
1761	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-bdiv.
1762
1763	* tests/mpn/t-bdiv.c: New file.
1764
1765	* mpn/generic/bdiv_q.c (mpn_bdiv_q): Fixed bad quotient length,
1766	should have qn == nn.
1767
1768	* mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Pass correct nn length to
1769	the lower-level functions.
1770
17712009-12-08  Torbjorn Granlund  <tege@gmplib.org>
1772
1773	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): New define.
1774	* tune/common.c (speed_mpn_mulmod_bnm1_rounded): New function.
1775	* tune/speed.c (routine): Add mpn_mulmod_bnm1_rounded for measuring
1776	mpn_mulmod_bnm1 at recommended sizes.
1777
1778	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
1779	(mpn_bc_mulmod_bnm1): Use mpn_add_n instead of mpn_add.
1780
1781	* tune/speed.c (routine): Add mpn_invert.
1782
1783	* tune/tuneup.c (tune_invert): New function.
1784	* tune/speed.h (SPEED_ROUTINE_MPN_INVERT): New macro.
1785	* tune/common.c (speed_mpn_invert): New function.
1786	* gmp-impl.h: Provide declarations for corresponding threshold var.
1787	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invert.c.
1788
17892009-12-08  Marco Bodrato <bodrato@mail.dm.unipi.it>
1790
1791	* tests/devel/try.c: Test mpn_addlsh2_n and mpn_{add,sub}lsh_n;
1792	mpn_rsblsh_n now tests all shift values.
1793	* tests/refmpn.c (refmpn_addlsh_n, refmpn_sublsh_n): New functions.
1794	(refmpn_addlsh1_n): Use generic refmpn_addlsh_n.
1795	(refmpn_sublsh1_n): Use generic refmpn_sublsh_n.
1796	(refmpn_addlsh2_n): New function.
1797	* tests/tests.h: Declare new functions.
1798
17992009-12-06  Torbjorn Granlund  <tege@gmplib.org>
1800
1801	* tune/tuneup.c (tune_mulmod_bnm1): Up min_size to 12.
1802
1803	* Globally: Rename *mullow* to *mullo*, *MULLOW* to *MULLO*.
1804
1805	* configure.in: Don't include ev5 directory for ev6* and ev7.  Misc
1806	alpha path cleanups.
1807	* mpn/alpha/add_n.asm: Replaced by mpn/alpha/ev5/add_n.asm.
1808	* mpn/alpha/sub_n.asm: Replaced by mpn/alpha/ev5/sub_n.asm.
1809	* mpn/alpha/lshift.asm: Replaced by mpn/alpha/ev5/lshift.asm.
1810	* mpn/alpha/rshift.asm: Replaced by mpn/alpha/ev5/rshift.asm.
1811	* mpn/alpha/com_n.asm: New, moved from mpn/alpha/ev5/rshift.asm.
1812	* mpn/alpha/ev5/diveby3.asm: New, moved from mpn/alpha/diveby3.asm.
1813
1814	* mpn/powerpc64/mode64/diveby3.asm: Remove, it is slower than
1815	mpn_bdiv_dbm1c on all hardware.
1816
1817	* mpn/generic/powm_sec.c: Rework logic for mpn_sqr_basecase size limit.
1818
1819	* gmp-impl.h (mpn_redc_1_sec): Declare.
1820	* configure.in (gmp_mpn_functions): Add redc_1_sec.
1821
18222009-12-06  Marco Bodrato <bodrato@mail.dm.unipi.it>
1823
1824	* tests/devel/try.c (try_one): DATA_SRC0_HIGHBIT sets the high bit.
1825
18262009-12-05  Marco Bodrato <bodrato@mail.dm.unipi.it>
1827
1828	* mpn/generic/toom_eval_dgr3_pm1.c: Change return value: 0 or ~0.
1829	* mpn/generic/toom_eval_dgr3_pm2.c: Likewise.
1830	* mpn/generic/toom_eval_pm1.c: Likewise.
1831	* mpn/generic/toom_eval_pm2exp.c: Likewise.
1832	* mpn/generic/toom_eval_pm2.c: Rewrite to use mpn_addlsh2_n.
1833
1834	* mpn/generic/toom_interpolate_5pts.c: Param sa is a flag, not a sign.
1835
1836	* mpn/generic/toom33_mul.c: Adapt to changes above.
1837	* mpn/generic/toom3_sqr.c: Likewise.
1838	* mpn/generic/toom42_mul.c: Likewise.
1839	* mpn/generic/toom43_mul.c: Reduce branches.
1840	* mpn/generic/toom44_mul.c: Likewise.
1841	* mpn/generic/toom53_mul.c: Likewise.
1842	* mpn/generic/toom62_mul.c: Likewise.
1843
1844	* mpn/generic/toom52_mul.c: Use toom_eval_ functions.
1845
1846	* mpn/generic/toom4_sqr.c: Avoid C99 construct.
1847	* mpn/generic/toom_interpolate_7pts.c: Likewise.
1848
18492009-12-05  Torbjorn Granlund  <tege@gmplib.org>
1850
1851	* mpn/generic/redc_1_sec.c: New file.
1852	* mpn/generic/powm_sec.c: Use redc_1_sec.  Use dummy full subtract
1853	instead of mpn_cmp since the latter leaks to the side channel.
1854	(mpn_local_sqr_n): New function, with associated macros.
1855	(mpn_powm_sec): Use mpn_local_sqr_n.
1856
1857	* configure.in (HAVE_NATIVE): Add missing functions, then sort.
1858
18592009-12-04  Torbjorn Granlund  <tege@gmplib.org>
1860
1861	* tune/tuneup.c (tune_dc_div): Up min_size to 6.
1862	(tune_mod_1): Set MOD_1_1_THRESHOLD min_size to 2.
1863
1864	* tune/speed.h: Negate "binvert"-type inverses, as required.
1865
1866	* mpn/generic/redc_1.c: Add ASSERTs.
1867	* mpn/generic/redc_2.c: Likewise.
1868
1869	* mpn/generic/sbpi1_bdiv_q.c: Simplify loops, indexing.
1870
18712009-12-03  Yann Droneaud  <yann@droneaud.fr>
1872
1873	* acinclude.m4 ([long long reliability test 1]): Add a "static" for C99
1874	inline semantics compatibility.
1875
18762009-12-03  Torbjorn Granlund  <tege@gmplib.org>
1877
1878	* configure.in: Move intptr_t test into common AC_CHECK_TYPES.
1879
1880	* mpn/generic/gcdext.c: Add a TMP_FREE.
1881
18822009-12-03  Niels M�ller  <nisse@lysator.liu.se>
1883
1884	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
1885	Added various masking tricks.
1886
1887	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
1888	Reimplemented binary gcdext, with proper canonicalization.
1889
1890	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Handle v == 0
1891	from mpn_gcdext_1.
1892	* mpn/generic/gcdext_1.c (mpn_gcdext_1): Allow inputs with a < b,
1893	assertions fixed accordingly.
1894
18952009-12-03  Torbjorn Granlund  <tege@gmplib.org>
1896
1897	* tune/tuneup.c: Tune DC_DIVAPPR_Q_THRESHOLD.  Rewrite
1898	DC_DIV_QR_THRESHOLD tuning code.
1899	(tune_dc_div): Rewrite.
1900	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): New macro.
1901	* tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
1902	speed_mpn_sbpi1_divappr_q, speed_mpn_sbpi1_bdiv_qr): New functions.
1903	* gmp-impl.h: Provide declarations for corresponding threshold vars.
1904	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_divappr_q.c.
1905
1906	* tune/tuneup.c (tune_binvert): Up max_size.
1907
19082009-12-02  Marco Bodrato <bodrato@mail.dm.unipi.it>
1909
1910	* tests/devel/try.c: Test mpn_rsblsh2_n and mpn_rsblsh_n.
1911	* tests/refmpn.c (refmpn_rsblsh_n, refmpn_rsblsh2_n): New functions.
1912	(refmpn_rsblsh1_n): Use generic refmpn_rsblsh_n.
1913	* tests/tests.h: Declare new functions.
1914
19152009-12-03  Niels M�ller  <nisse@lysator.liu.se>
1916
1917	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step):
1918	Select the right cofactor in the cases A == B or A == 2B.
1919
1920	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Deleted
1921	handling of ap[0] == 0 and bp[0] == 0; these cases don't happen.
1922	Select the right cofactor in the case ap[0] == bp[0].
1923	* mpn/generic/gcdext.c (mpn_gcdext): Analogous changes.
1924
19252009-12-02  Niels M�ller  <nisse@lysator.liu.se>
1926
1927	* gmp-h.in (mpn_gcdext_1): Updated prototype.
1928	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
1929	signed cofactors from gcdext_1.
1930	* mpn/generic/gcdext_1.c (mpn_gcdext_1): Use Euclid's algorithm,
1931	and return signed cofactors.
1932
19332009-12-02  Torbjorn Granlund  <tege@gmplib.org>
1934
1935	* doc/gmp.texi (Low-level Functions): Document mpn_sqr_n.
1936
1937	* tune/speed.c (routine): Add mpn_binvert.
1938
1939	* tune/tuneup.c: Tune BINV_NEWTON_THRESHOLD.
1940	(tune_binvert): New function.
1941	* tune/speed.h (SPEED_ROUTINE_MPN_BINVERT): New macro.
1942	* tune/common.c (speed_mpn_binvert): New function.
1943	* gmp-impl.h: Provide declarations for corresponding threshold var.
1944	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add binvert.c.
1945
1946	* tune/tuneup.c: Tune DC_BDIV_QR_THRESHOLD and DC_BDIV_Q_THRESHOLD.
1947	(tune_dc_bdiv): New function.
1948	(tune_dc_div): New name for tune_dc.
1949	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_BDIV_QR,
1950	SPEED_ROUTINE_MPN_PI1_BDIV_Q): New macros.
1951	* tune/common.c (speed_mpn_sbpi1_bdiv_qr, speed_mpn_dcpi1_bdiv_qr,
1952	speed_mpn_sbpi1_bdiv_q, speed_mpn_dcpi1_bdiv_q): New functions.
1953	* gmp-impl.h: Provide declarations for corresponding threshold vars.
1954	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_bdiv_qr.c and
1955	dcpi1_bdiv_q.c.
1956
19572009-12-01  Marco Bodrato <bodrato@mail.dm.unipi.it>
1958
1959	* mpn/generic/toom53_mul.c: Removed double computation of vinf.
1960
1961	* mpn/x86_64/aorrlsh_n.asm: Correct return value for rsblsh_n.
1962	* mpn/asm-defs.m4 (define_mpn): Add rsblsh_n.
1963	* gmp-impl.h (mpn_rsblsh_n): Added prototype and name-mangling.
1964
1965	* mpn/generic/fib2_ui.c: Reduce the amount of temporary storage.
1966	Use mpn_rsblsh_n.
1967
19682009-12-01  Torbjorn Granlund  <tege@gmplib.org>
1969
1970	* mpn/generic/redc_n.c: Rework temp allocation.
1971
1972	* mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n_itch): Add pi1 also
1973	to this function.
1974
1975	* mpn/generic/dcpi1_bdiv_q.c: Get the mpn_sbpi1_bdiv_q call right.
1976	Misc cleanups.
1977
1978	* tune/speed.c (routine): Fix typo in last change.
1979	Add mpn_redc_2.
1980
1981	* tune/speed.h (SPEED_ROUTINE_REDC_N): Set min size properly.
1982
19832009-12-01  Niels M�ller  <nisse@lysator.liu.se>
1984
1985	* tune/speed.c (routine): Added mpn_toom42_mul and mpn_redc_n.
1986	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM42_MUL): New macro.
1987	(speed_mpn_toom42_mul): Declare function.
1988	* tune/common.c (speed_mpn_toom42_mul): New function.
1989	* gmp-impl.h (MPN_TOOM42_MUL_MINSIZE): New constant.
1990
19912009-11-30  Marco Bodrato <bodrato@mail.dm.unipi.it>
1992
1993	* mpn/generic/fib2_ui.c: Use mpn_rsblsh2_n.
1994
19952009-11-29  Torbjorn Granlund  <tege@gmplib.org>
1996
1997	* mpn/x86_64/pentium4/gmp-mparam.h
1998	(HAVE_NATIVE_mpn_addlsh1_n, HAVE_NATIVE_mpn_sublsh1_n): Don't undef.
1999
2000	* Makefile.am (EXTRA_DIST): Remove macos.
2001
20022009-11-28  Torbjorn Granlund  <tege@gmplib.org>
2003
2004	* tune/tuneup.c (tune_redc): Set min_size to 16 for redc_n tuning.
2005
2006	* mpn/x86_64/sqr_basecase.asm (SQR_TOOM2_THRESHOLD_MAX): Avoid quoting
2007	to allow configure.in parse it more easily.  Trim from 120 to 80.
2008
20092009-11-28  Marco Bodrato <bodrato@mail.dm.unipi.it>
2010
2011	* mpn/generic/mulmod_bnm1.c: Basecases made simpler, this also corrects
2012	a bug affecting previous version.
2013
20142009-11-28  Torbjorn Granlund  <tege@gmplib.org>
2015
2016	* configure.in: Handle atom also in 32-bit mode.
2017	* mpn/x86/atom/gmp-mparam.h: New file.
2018
2019	* gmp-impl.h (MULMOD_BNM1_THRESHOLD): Default.
2020
2021	* mpn/generic/redc_n.c: Use mpn_mulmod_bnm1 instead of mpn_mul_n.
2022
2023	* Use TMP_ALLOC_LIMBS consistently.
2024	* Finish renaming BITS_PER_MP_LIMB to GMP_LIMB_BITS.
2025
2026	* macos: Remove entire directory.
2027
20282009-11-27  Torbjorn Granlund  <tege@gmplib.org>
2029
2030	* mpn/x86_64/corei/gmp-mparam.h: New file.
2031	* mpn/x86_64/core2/gmp-mparam.h: Now for just core2.
2032	* mpn/powerpc64/mode64/p3/gmp-mparam.h: New file.
2033	* mpn/powerpc64/mode64/p4/gmp-mparam.h: New file.
2034	* mpn/powerpc64/mode64/p5/gmp-mparam.h: New file.
2035
2036	* config.guess: Return "corei" for core i7 and core i5.
2037	* config.sub: Recognise "corei".
2038	* acinclude.m4 (X86_64_PATTERN): Add corei.
2039	* configure.in (powerpc): Set up more CPU-specific paths.
2040	(x86): Handle corei.
2041
2042	* mpz/powm.c: Allow input operand overlap also when exponent = 1.
2043	Misc cleanups.
2044
20452009-11-26  Marco Bodrato <bodrato@mail.dm.unipi.it>
2046
2047	* tests/mpn/t-mulmod_bnm1.c: New test file.
2048	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-mulmod_bnm1.
2049
2050	* mpn/generic/mullow_n.c: Comments on Mulders' trick implementation.
2051
20522009-11-26  Torbjorn Granlund  <tege@gmplib.org>
2053
2054	* mpn/generic/powm.c: Make comments reflect current code state.
2055
2056	* tests/devel/try.c: Make mpn_mullow_n testing actually work.
2057
20582009-11-25  Torbjorn Granlund  <tege@gmplib.org>
2059
2060	* mpz/powm.c: Clean up unused defs.
2061
20622009-11-24  Torbjorn Granlund  <tege@gmplib.org>
2063
2064	* tune/tuneup.c (tune_redc): Rewrite.
2065	* mpn/generic/powm.c: Use REDC_1_TO_REDC_2_THRESHOLD,
2066	REDC_1_TO_REDC_N_THRESHOLD, and REDC_2_TO_REDC_N_THRESHOLD.
2067	Get rid of previous REDC params, including LOCAL_REDC_N_THRESHOLD.
2068	(WANT_REDC_2): Define.
2069	* gmp-impl.h: Corresponding changes.
2070
20712009-11-23  Torbjorn Granlund  <tege@gmplib.org>
2072
2073	* mpn/generic/powm.c: Fix typo.
2074	Define LOCAL_REDC_N_THRESHOLD, use in REDC_2_THRESHOLD...
2075	REDC_N_THRESHOLD chain.
2076
20772009-11-22  Torbjorn Granlund  <tege@gmplib.org>
2078
2079	* tune/tuneup.c (tune_mullow): Set min_size to 1.
2080
2081	* mpn/generic/powm_sec.c: Use just mpn_mul_basecase and
2082	mpn_sqr_basecase for multiplication and squaring.
2083
2084	* tune/tuneup.c: Tune REDC_2_THRESHOLD and REDC_N_THRESHOLD.
2085	(tune_redc): New function.
2086	(tune_powm): Remove function.
2087	* tune/speed.h (SPEED_ROUTINE_REDC_2, SPEED_ROUTINE_REDC_N): New.
2088	* tune/common.c (speed_mpn_redc_2, speed_mpn_redc_n): New.
2089
2090	* mpz/powm.c: Complete rewrite.  Use mpn_powm and mpn_powlo.
2091	* mpn/generic/powm.c: Rewrite.
2092	* mpn/generic/redc_n.c: New file.
2093	* configure.in (gmp_mpn_functions): Add redc_n.
2094	* gmp-impl.h (REDC_2_THRESHOLD, REDC_N_THRESHOLD): Default, and define
2095	for tuneup.
2096
20972009-11-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
2098
2099	* mpn/generic/mullow_n.c: Disable Mulders' trick for small operands,
2100	use fft for bigger ones.
2101	* tests/mpn/t-mullo.c: New test file.
2102
21032009-11-22  Torbjorn Granlund  <tege@gmplib.org>
2104
2105	* tune/tuneup.c (tune_mullow): Rewrite.
2106
21072009-11-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
2108
2109	* gmp-impl.h: Removed unused macros (CACHED_ABOVE_THRESHOLD and
2110	CACHED_BELOW_THRESHOLD).
2111
2112	* mpn/generic/mullow_n.c: Use Mulders' trick.
2113	* tune/tuneup.c (tune_mullow): MULLOW_MUL_N_THRESHOLD range of
2114	search depends on FFT tuning;
2115	(all): Anticipate tune_fft_{mul,sqr}.
2116
2117	* tune/speed.c (routine): Add entry related to mpn_mulmod_bnm1.
2118
21192009-11-19  Niels M�ller  <nisse@lysator.liu.se>
2120
2121	* mpn/generic/toom_eval_dgr3_pm2.c (mpn_toom_eval_dgr3_pm2)
2122	[HAVE_NATIVE_mpn_add_n_sub_n]: Fixed typo in mpn_add_n_sub_n call
2123	(spotted by Marco Bodrato).
2124	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): Likewise.
2125	* mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Likewise.
2126
2127	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2) [HAVE_NATIVE_mpn_addlsh_n]:
2128	Fixed missing declaration.
2129
2130	* mpn/asm-defs.m4 (define_mpn): Add addlsh_n.
2131	* gmp-impl.h (mpn_addlsh_n): Added prototype and name-mangling.
2132
21332009-11-19  Niels M�ller  <nisse@lysator.liu.se>
2134
2135	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): New file.
2136	* mpn/generic/toom53_mul.c (mpn_toom53_mul): Use mpn_toom_eval_pm2.
2137	* mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
2138	* configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
2139
21402009-11-18  Torbjorn Granlund  <tege@gmplib.org>
2141
2142	* gmp-impl.h (mpn_and_n, etc): Adapt to now-public logic functions.
2143
2144	* config.guess: Recognise VIA nano.
2145	* config.sub: Likewise.
2146	* configure.in: Generalise x86_64 support; recognise VIA nano.
2147
21482009-11-16  Torbjorn Granlund  <tege@gmplib.org>
2149
2150	* tune/speed.c (routine): Add measurement of mpn_addlsh2_n,
2151	mpn_sublsh2_n, mpn_rsblsh2_n.
2152	* tune/common.c: Add speed routines for lsh2 functions.
2153
2154	* mpn/generic/divis.c: Use MU_BDIV_QR_THRESHOLD.
2155
2156	* configure.in (gmp_mpn_functions_optional): Add *lsh_n functions.
2157
2158	* mpn/generic/toom_eval_pm2exp.c: Make HAVE_NATIVE_mpn_addlsh_n code
2159	work.
2160
2161	* mpn/x86_64/aorrlsh2_n.asm: Optimise inner loop.
2162
2163	* configure.in (gmp_mpn_functions_optional): Remove copyi,copyd, they
2164	are now in gmp_mpn_functions.  Analogously move logical functions.
2165
21662009-11-16  Marco Bodrato <bodrato@mail.dm.unipi.it>
2167
2168	* mpn/generic/toom53_mul.c: Use addlsh2 for evaluation (and fix typo).
2169	* mpn/generic/toom_eval_dgr3_pm2.c: Likewise (affects toom44 and 43).
2170
2171	* mpn/asm-defs.m4: Fix comments for op_lsh2 new functions.
2172	* gmp-impl.h: Likewise.
2173	* tests/mpz/t-fac_ui.c: Fix a comment.
2174
21752009-11-15  Torbjorn Granlund  <tege@gmplib.org>
2176
2177	* mpn/x86_64/aorrlsh2_n.asm: New file.
2178	* configure.in: Add support for addlsh2_n, sublsh2_n, and rsblsh2_n,
2179	including mulfuncs.
2180	* gmp-impl.h (mpn_addlsh2_n, mpn_sublsh2_n, mpn_rsblsh2_n): Declare.
2181	* mpn/asm-defs.m4: Likewise.
2182
2183	* mpn/generic/copyi.c: New file.
2184	* mpn/generic/copyd.c: Likewise.
2185	* mpn/generic/zero.c: Likewise.
2186	* gmp-h.in: Declare new functions.
2187	* configure.in (gmp_mpn_functions): Add new functions.
2188
21892009-11-15  Marco Bodrato <bodrato@mail.dm.unipi.it>
2190
2191	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): fix typo
2192
2193	* mpn/generic/toom33_mul.c: Use rsblsh1 for evaluation.
2194	* mpn/generic/toom3_sqr.c: Likewise.
2195
21962009-11-14  Torbjorn Granlund  <tege@gmplib.org>
2197
2198	* mpn/generic/toom52_mul.c: Use mpn_addlsh1_n.
2199
2200	* mpn/generic/toom52_mul.c: Toggle the right flag bit in an
2201	HAVE_NATIVE_mpn_add_n_sub_n arm.
2202
2203	* tests/mpz/t-remove.c: New file.
2204
2205	* mpn/generic/remove.c: Major overhaul.  Add parameter 'cap'.
2206
2207	* mpn/generic/binvert.c: Fix typo in last change.
2208
2209	* mpn/generic/bdiv_qr.c: Make it actually work.  Also use passed-in
2210	scratch space.
2211
2212	* mpn/generic/mu_bdiv_qr.c: Reset FFT parameters for each call.
2213
22142009-11-12  Torbjorn Granlund  <tege@gmplib.org>
2215
2216	* mpn/x86/k7/gcd_1.asm (MASK): Compute from MAXSHIFT.
2217
22182009-11-11  Torbjorn Granlund  <tege@gmplib.org>
2219
2220	* mpn/generic/binvert.c: Simplify, fix comments.
2221
2222	* tests/devel/try.c: Test mpn_invert and mpn_binvert.
2223
2224	* tests/refmpn.c (refmpn_invert, refmpn_binvert): New functions.
2225	* tests/tests.h: Declare new functions.
2226
22272009-11-10  Torbjorn Granlund  <tege@gmplib.org>
2228
2229	* configure.in: Supply compiler options for atom in 32-bit mode.
2230
2231	* acinclude.m4 (X86_64_PATTERN): New.
2232	* configure.in: Setup and use X86_64_PATTERN.
2233
2234	* mpn/x86_64/fat/fat.c: New file.
2235	* mpn/x86_64/fat/fat_entry.asm: New file.
2236	* mpn/x86_64/fat: Copy C placeholder files from mpn/x86/fat.
2237	* mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): New, copied from
2238	mpn/x86/x86-defs.m4.
2239	* configure.in: Move down x86 fat setup code until after ABI has been
2240	determined; generalise to handle x86_64.
2241
22422009-11-09  Torbjorn Granlund  <tege@gmplib.org>
2243
2244	* mpn/x86/fat/mod_1.c: New file.
2245
2246	* acinclude.m4 (GMP_C_FOR_BUILD_ANSI): Avoid poor quoting.
2247
22482009-11-08  Torbjorn Granlund  <tege@gmplib.org>
2249
2250	* gmp-impl.h (MPN_LOGOPS_N_INLINE): Rewrite, update interface.  Callers
2251	updated.
2252	* mpn/generic/logops_n.c: New file.
2253	* doc/gmp.texi (Low-level Functions): Document logical mpn functions.
2254
22552009-11-07  Torbjorn Granlund  <tege@gmplib.org>
2256
2257	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): Adapt to new
2258	mpn_mulmod_bnm1 interface.
2259
22602009-11-07  Marco Bodrato <bodrato@mail.dm.unipi.it>
2261
2262	* mpn/generic/mulmod_bnm1.c: New interface, with size
2263	specified for all operands in mpn_mulmod_bnm1.
2264	* gmp-impl.h: Changed mpn_mulmod_bnm1 prototype.
2265
22662009-11-05  Torbjorn Granlund  <tege@gmplib.org>
2267
2268	* mpn/x86/k7/gcd_1.asm: Actually use div-reduced value.
2269	Mnemonic cleanup.
2270
2271	* mpn/x86_64/gcd_1.asm: New file.
2272
22732009-11-03  Torbjorn Granlund  <tege@gmplib.org>
2274
2275	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqr_n.c.
2276
22772009-11-03  Marco Bodrato <bodrato@mail.dm.unipi.it>
2278
2279	* mpn/generic/toom_interpolate_6pts.c: removed an addmul_1 and cleanup.
2280
22812009-11-02  Torbjorn Granlund  <tege@gmplib.org>
2282
2283	* configure.in (gmp_mpn_functions): Remove obsolete functions
2284	dc_divrem_n and sb_divrem_mn.
2285	* gmp-impl.h: Misc cleanup.
2286	(mpn_sb_divrem_mn, mpn_dc_divrem_n): Remove.
2287	(DIV_DC_THRESHOLD): Remove.
2288	* mpn/generic/dc_divrem_n.c: Remove.
2289	* mpn/generic/sb_divrem_mn.c: Remove.
2290	* mpn/generic/tdiv_qr.c: Use DC_DIV_QR_THRESHOLD, not DIV_DC_THRESHOLD.
2291
2292	* tests/devel/try.c: Replace mpn_sb_divrem_mn by mpn_sbpi1_div_qr.
2293	* tests/refmpn.c (refmpn_sb_div_qr): New name for refmpn_sb_divrem_mn.
2294
2295	* tune/Makefile.am (libspeed_la_SOURCES): Remove sb_div.c and sb_inv.c.
2296	(TUNE_MPN_SRCS_BASIC): Remove sb_divrem_mn.c.
2297	* tune/common.c (speed_mpn_dcpi1_div_qr_n): New function.
2298	 Remove mpn_sb_divrem_mn related functions.
2299	* tune/speed.c (routine): Remove entries related to mpn_dc_divrem and
2300	mpn_sb_divrem.
2301	(routine): New entry for mpn_dc_div_qr_n.
2302	* tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_CALL): Compute inverse
2303	needed by pi1 calls.
2304	(SPEED_ROUTINE_MPN_SB_DIVREM_M3): Remove.
2305	* tune/tuneup.c (tune_sb_preinv): Remove.
2306	(tune_dc): Update to measure DC_DIV_QR_THRESHOLD.
2307
2308	* mpn/generic/sb_divappr_q.c: Remove.
2309
23102009-11-01  Torbjorn Granlund  <tege@gmplib.org>
2311
2312	* gmp-impl.h: Misc minor cleanups.
2313
23142009-10-31  Torbjorn Granlund  <tege@gmplib.org>
2315
2316	* gmp-impl.h (toom itch functions): Simplify, make some into macros.
2317	(MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Remove.
2318	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove.
2319	* mpn/generic/mul_n.c (mpn_sqr_n): Move from here...
2320	* mpn/generic/sqr_n.c: ...to this new file.
2321	* configure.in (gmp_mpn_functions): Add sqr_n.
2322
2323	* Globally change
2324	  MUL_TOOM3_THRESHOLD => MUL_TOOM33_THRESHOLD,
2325	  MUL_KARATSUBA_THRESHOLD => MUL_TOOM22_THRESHOLD,
2326	  SQR_KARATSUBA_THRESHOLD => SQR_TOOM2_THRESHOLD,
2327	and associated names analogously.
2328
23292009-10-31  Niels M�ller  <nisse@lysator.liu.se>
2330
2331	* mpn/generic/toom_interpolate_7pts.c: Changed evaluation points,
2332	replacing -1/2 by -2.
2333	* mpn/generic/toom44_mul.c: Updated to use new evaluation points,
2334	and use mpn_toom_eval_dgr3_pm2.
2335	* mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Likewise.
2336	* mpn/generic/toom53_mul.c (mpn_toom53_mul): Updated to use new
2337	evaluation points, and use mpn_toom_eval_pm1 and
2338	mpn_toom_eval_pm2exp.
2339	* mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
2340
2341	* mpn/generic/toom_eval_pm2exp.c: New file.
2342	* mpn/generic/toom_eval_pm1.c: New file.
2343
2344	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
2345	mpn_toom_eval_dgr3_pm2.
2346
23472009-10-30  Torbjorn Granlund  <tege@gmplib.org>
2348
2349	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom2* and toom3* files.
2350
23512009-10-30  Niels M�ller  <nisse@lysator.liu.se>
2352
2353	* configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
2354	* gmp-impl.h: Added prototype for mpn_toom_eval_dgr3_pm2.
2355	* mpn/generic/toom_eval_dgr3_pm2.c: New file.
2356
23572009-10-29  Niels M�ller  <nisse@lysator.liu.se>
2358
2359	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
2360	mpn_toom_eval_dgr3_pm1.
2361	* mpn/generic/toom42_mul.c (mpn_toom42_mul): Likewise.
2362
23632009-10-29  Torbjorn Granlund  <tege@gmplib.org>
2364
2365	* mpn/generic/mulmod_bnm1.c: Replace some add_1 by INCR.
2366
2367	* gmp-impl.h (mpn_mulmod_bnm1_itch): New macro.
2368
2369	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Call mpn_mul_fft.
2370	(mpn_mulmod_bnm1_next_size): Adopt to SS FFT.
2371
2372	* mpn/generic/mul_fft.c (mpn_mul_fft): Make it return high limb.
2373	(mpn_mul_fft_internal): Likewise.
2374
2375	* mpn/generic/mulmod_bnm1.c: New file, by Niels M�ller.
2376	* configure.in (gmp_mpn_functions): Add mulmod_bnm1.
2377	* gmp-impl.h: Add related declarations.
2378	* tune/tuneup.c: Tune MULMOD_BNM1_THRESHOLD.
2379	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): New macro.
2380	* tune/common.c (speed_mpn_mulmod_bnm1): New function.
2381	* Makefile.am (TUNE_MPN_SRCS_BASIC): Add mulmod_bnm1.c.
2382
2383	* gmp-impl.h (mpn_kara_mul_n, mpn_kara_sqr_n): Remove declarations.
2384	* tune/common.c: Remove/rename kara functions.
2385	* tune/speed.h: Likewise.
2386
2387	* tests/devel/try.c: Clean up usage of %p printf arguments.
2388
2389	* gmp-impl.h: Update MUL/SQR MINSIZE macros to reflect new function
2390	names and limitations
2391	* tune/tuneup.c: Use updated macro names.
2392	* tune/speed.h: Likewise.
2393	* tests/devel/try.c: Test new mul/sqr functions, remove old tests.
2394
23952009-10-29  Niels M�ller  <nisse@lysator.liu.se>
2396
2397	* tune/speed.c: Added support for mpn_toom4_sqr,
2398
2399	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM4_SQR): New macro.
2400	(SPEED_ROUTINE_MPN_KARA_MUL_N): Deleted.
2401	(SPEED_ROUTINE_MPN_TOOM3_MUL_N): Deleted.
2402	(SPEED_ROUTINE_MPN_TOOM2_SQR): Use mpn_toom2_sqr_itch.
2403
2404	* gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove
2405	declarations.
2406	(mpn_toom2_sqr_itch): Add margin for recursive calls.
2407
24082009-10-28  Niels M�ller  <nisse@lysator.liu.se>
2409
2410	* mpn/generic/mul_n.c (mpn_kara_mul_n): Deleted old Karatsuba
2411	implementation.
2412	(mpn_kara_sqr_n): Likewise deleted.
2413
2414	* mpn/generic/mul_n.c (mpn_sqr_n): Use mpn_toom2_sqr and
2415	mpn_toom3_sqr, not the old implementations.
2416
2417	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE): Deleted, replaced by
2418	mpn_toom33_mul_itch.
2419	(MPN_TOOM3_SQR_N_TSIZE): Deleted, replaced by
2420	mpn_toom3_sqr_itch.
2421	(mpn_toom33_mul_itch): Needs more scratch.
2422	(mpn_toom3_sqr_itch): Likewise.
2423	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Use
2424	mpn_toom33_mul_itch.
2425	(SPEED_ROUTINE_MPN_TOOM3_SQR_N): Use mpn_toom3_sqr_itch.
2426	* mpn/generic/mul_n.c (mpn_mul_n): Use mpn_toom33_mul_itch.
2427	(mpn_sqr_n): Use mpn_toom3_sqr_itch.
2428
2429	* mpn/generic/toom33_mul.c (mpn_toom33_mul): Avoid TMP_ALLOC. Needs
2430	some more supplied scratch instead.
2431	* mpn/generic/toom3_sqr.c (mpn_toom3_sqr): Likewise.
2432
24332009-10-26  Torbjorn Granlund  <tege@gmplib.org>
2434
2435	* gmp-impl.h (invert_pi1): Streamline, as suggested by Niels.
2436
24372009-10-24  Torbjorn Granlund  <tege@gmplib.org>
2438
2439	* mpn/generic/bdiv_q.c: Update to call new functions.
2440	* mpn/generic/bdiv_qr.c: Likewise.
2441	* mpn/generic/binvert.c: Likewise.
2442	* mpn/generic/divexact.c: Likewise.
2443	* mpn/generic/divis.c: Likewise.
2444	* mpn/generic/perfpow.c: Likewise.
2445	* mpn/generic/tdiv_qr.c: Likewise.
2446	* mpn/generic/dcpi1_bdiv_q.c: New file.
2447	* mpn/generic/dcpi1_bdiv_qr.c: New file.
2448	* mpn/generic/dcpi1_div_q.c: New file.
2449	* mpn/generic/dcpi1_div_qr.c: New file.
2450	* mpn/generic/dcpi1_divappr_q.c: New file.
2451	* mpn/generic/sbpi1_bdiv_q.c: New file.
2452	* mpn/generic/sbpi1_bdiv_qr.c: New file.
2453	* mpn/generic/sbpi1_div_q.c: New file.
2454	* mpn/generic/sbpi1_div_qr.c: New file.
2455	* mpn/generic/sbpi1_divappr_q.c: New file.
2456	* mpn/generic/dc_bdiv_q.c: Removed.
2457	* mpn/generic/dc_bdiv_qr.c: Removed.
2458	* mpn/generic/dc_div_q.c: Removed.
2459	* mpn/generic/dc_div_qr.c: Removed.
2460	* mpn/generic/dc_divappr_q.c: Removed.
2461	* mpn/generic/sb_bdiv_q.c: Removed.
2462	* mpn/generic/sb_bdiv_qr.c: Removed.
2463	* mpn/generic/sb_div_q.c: Removed.
2464	* mpn/generic/sb_div_qr.c: Removed.
2465
2466	* configure.in (gmp_mpn_functions): Add new division functions, remove
2467	obsolete division functions.
2468
2469	* gmp-impl.h: Add declarations of new division functions, remove
2470	corresponding obsolete declarations.
2471	(gmp_pi1_t, gmp_pi2_t): New types.
2472	(invert_pi1): New macro for computing 2/1 and 3/2 inverses.
2473
24742009-10-23  Niels M�ller  <nisse@lysator.liu.se>
2475
2476	* gmp-impl.h (mpn_toom62_mul_itch): New function.
2477
2478	* tests/mpn/t-toom53.c: New test program.
2479	* tests/mpn/t-toom62.c: New test program.
2480
24812009-10-23  Torbjorn Granlund  <tege@gmplib.org>
2482
2483	* mpn/generic/get_d.c: Fix code handling denorms for 64-bit machines.
2484	* tests/mpf/t-get_d.c (test_denorms): New function.
2485
24862009-10-23  Niels M�ller  <nisse@lysator.liu.se>
2487
2488	* mpn/generic/toom52_mul.c (mpn_toom52_mul): Use supplied scratch
2489	space, not TMP_ALLOC. Interface change, now requires input sizes
2490	such that s + t >= 5.
2491
2492	* gmp-impl.h (mpn_toom52_mul_itch): New function.
2493
2494	* tests/mpn/t-toom52.c: New test program.
2495
24962009-10-22  Torbjorn Granlund  <tege@gmplib.org>
2497
2498	* mpn/x86_64/sqr_basecase.asm: Tune for speed and a 7% size decrease.
2499
25002009-10-22  Niels M�ller  <nisse@lysator.liu.se>
2501
2502	* tests/mpn/t-toom44.c: New test program.
2503	* tests/mpn/t-toom33.c: New test program.
2504
2505	* tests/mpn/toom-shared.h (main): Reorganized input generation.
2506	Users are now supposed to define macros MAX_AN, MIN_BN and MAX_BN.
2507	Updated existing toom test programs.
2508
25092009-10-22  Torbjorn Granlund  <tege@gmplib.org>
2510
2511	* tests/devel/try.c: Fix typos in last change.
2512
25132009-10-21  Torbjorn Granlund  <tege@gmplib.org>
2514
2515	* mpn/asm-defs.m4 (define_mpn): Add mullow_basecase.
2516
2517	* tests/devel/try.c: Test mpn_mullow_n.
2518
2519	* tests/refmpn.c (refmpn_mullow_n): New function.
2520	* tests/tests.h: Declare it.
2521
25222009-10-21  Niels M�ller  <nisse@lysator.liu.se>
2523
2524	* tests/mpn/toom-shared.h (main): Check for writes outside of the
2525	product or scratch area.
2526
2527	* gmp-impl.h (mpn_toom43_mul_itch): New function.
2528
2529	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use supplied scratch
2530	space, not TMP_ALLOC. Interface change, now requires input sizes
2531	such that s + t >= 5.
2532
25332009-10-20  Niels M�ller  <nisse@lysator.liu.se>
2534
2535	* tests/mpn/toom-shared.h (MIN_BLOCK): New constant, which can be
2536	overridden by users. Needed by t-toom42 and t-toom43.
2537
2538	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom32,
2539	t-toom42 and t-toom43.
2540	* tests/mpn/t-toom43.c: New test program.
2541	* tests/mpn/t-toom42.c: New test program.
2542	* tests/mpn/t-toom32.c: New test program.
2543
2544	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom22.
2545	* tests/mpn/t-toom22.c: New test file.
2546	* tests/mpn/toom-shared.h: New file. Test framework for Toom
2547	functions.
2548
25492009-10-14  Niels M�ller  <nisse@lysator.liu.se>
2550
2551	* mpn/generic/hgcd.c (mpn_hgcd_itch): Thanks to the new
2552	mpn_matrix22_mul_strassen, the scratch need is reduced by 16%.
2553
25542009-10-14  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2555
2556	* mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): New
2557	Strassen-like algorithm, to reduce the amount of temporary
2558	storage.
2559	(mpn_matrix22_mul_itch): Updated to reflect the reduced storage
2560	need.
2561
25622009-10-03  Torbjorn Granlund  <tege@gmplib.org>
2563
2564	* Rename mpn_addsub_n to mpn_add_n_sub_n.
2565
25662009-10-01  Torbjorn Granlund  <tege@gmplib.org>
2567
2568	* mpn/generic/tdiv_qr.c: Call mpn_divrem_1 and mpn_dc_div_qr instead of
2569	old functions.
2570
2571	* mpn/generic/mul_n.c: Call toom22 and toom33 instead of old functions.
2572
2573	* mpn/generic/toom42_mul.c (TOOM42_MUL_N_REC): Renamed from
2574	TOOM22_MUL_N_REC.  Unconditionally call the generic mpn_mul_n.
2575	* mpn/generic/toom32_mul.c: Analogous changes.
2576
25772009-09-28  Niels M�ller  <nisse@lysator.liu.se>
2578
2579	* mpn/x86_64/invert_limb.asm: Rewrite. Exploit cancellation in the
2580	Newton iteration.
2581
25822009-09-27  Niels M�ller  <nisse@lysator.liu.se>
2583
2584	* mpn/x86/invert_limb.asm: Reduce register usage. Eliminated $1
2585	arguments to add, sub and shift.
2586
25872009-09-25  Niels M�ller  <nisse@lysator.liu.se>
2588
2589	* mpn/x86/invert_limb.asm: New file.
2590
25912009-09-24  Torbjorn Granlund  <tege@gmplib.org>
2592
2593	* mpn/generic/toom33_mul.c: Use new toom functions for all recursive
2594	products.
2595	* mpn/generic/toom3_sqr.c: Likewise.
2596	* mpn/generic/toom44_mul.c: Likewise.
2597	* mpn/generic/toom4_sqr.c: Likewise.
2598
2599	* mpn/generic/add_n.c: Relax operand overlap ASSERTs.
2600	* mpn/generic/sub_n.c: Likewise.
2601
26022009-09-15  Torbjorn Granlund  <tege@gmplib.org>
2603
2604	Suggested by Uwe Mueller:
2605	* printf/doprnt.c: Use "%ld" for exponent printing.
2606	* printf/doprntf.c (__gmp_doprnt_mpf): Make expval "long".
2607
26082009-09-14  Torbjorn Granlund  <tege@gmplib.org>
2609
2610	* configure.in: Handle mingw64.
2611	* gmp-impl.h (gmp_intptr_t): Declare.
2612	* tests/amd64check.c (calling_conventions_values): Use CNST_LIMB.
2613	* tests/memory.c: Use gmp_intptr_t; print pointers using C90 "%p".
2614	* tests/misc.c: Use gmp_intptr_t.
2615	* tests/mpq/t-get_str.c: Print pointers using C90 "%p".
2616
26172009-08-12  Torbjorn Granlund  <tege@gmplib.org>
2618
2619	* mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Remove silly ASSERT code.
2620
2621	* mpn/asm-defs.m4 (define_mpn): Remove mod_1s_1p, add mod_1_1p.
2622
2623	* mpn/arm/invert_limb.asm: Complete rewrite.
2624
2625	* longlong.h: Document LONGLONG_STANDALONE and NO_ASM.
2626
26272009-08-05  Torbjorn Granlund  <tege@gmplib.org>
2628
2629	* tests/mpz/dive_ui.c (check_random): Avoid zero divisors.
2630
26312009-07-31  Torbjorn Granlund  <tege@gmplib.org>
2632
2633	* mpn/generic/mod_1_1.c: Tweak to handle any modulus (possibility
2634	pointed out by Per Austrin).
2635	(mpn_mod_1_1p): Renamed from mpn_mod_1s_1p.
2636	(mpn_mod_1_1p_cps): Renamed from mpn_mod_1s_1p_cps.
2637	*mpn/generic/mod_1.c (mpn_mod_1): Reorganise to call mpn_mod_1_1p for
2638	any modulus.
2639
26402009-07-28  Torbjorn Granlund  <tege@gmplib.org>
2641
2642	* configure.in: Pass arch for x86 also in 64-bit mode.
2643
26442009-07-26  Torbjorn Granlund  <tege@swox.com>
2645
2646	* config.guess (_cpuid): Recognise more Intel "Core" processors.
2647
26482009-07-13  Torbjorn Granlund  <tege@gmplib.org>
2649
2650	* mpf/eq.c: Rewrite.
2651
2652	* tests/mpf/t-eq.c: New test.
2653
26542009-07-06  Torbjorn Granlund  <tege@gmplib.org>
2655
2656	* gmp-impl.h (__mp_bases): Remove this alias.
2657
2658	* mpf/get_str.c: Use less overflow prone expression for computing limb
2659	allocation.
2660	* mpz/inp_str.c: Likewise.
2661	* mpf/set_str.c: Likewise.
2662	* mpz/set_str.c: Likewise.
2663
26642009-07-03  Niels M�ller  <nisse@lysator.liu.se>
2665
2666	* mpn/generic/gcd_1.c (mpn_gcd_1): Use masking tricks to reduce
2667	the number of branches in the loop.
2668
26692009-06-28  Torbjorn Granlund  <tege@gmplib.org>
2670
2671	* demos/factorize.c (factor_using_pollard_rho): Rewrite.
2672
2673	* mpz/clears.c: New file.
2674	* mpq/clears.c: New file.
2675	* mpf/clears.c: New file.
2676	* gmp-h.in (mpz_clears, mpq_clears, mpf_clears): Declare.
2677	* mpz/Makefile.am: Add clears.c.
2678	* mpq/Makefile.am: Add clears.c.
2679	* mpf/Makefile.am: Add clears.c.
2680	* Makefile.am: Add these also to respective OBJECTS variables.
2681	* doc/gmp.texi: Document inits function and clears functions.
2682
26832009-06-20  Torbjorn Granlund  <tege@gmplib.org>
2684
2685	* mp-h.in (mp_bitcnt_t): Declare here too.
2686
26872009-06-19  Torbjorn Granlund  <tege@gmplib.org>
2688
2689	* mpq/inits.c: New file.
2690	* mpf/inits.c: New file.
2691	* gmp-h.in (mpz_inits, mpq_inits, mpf_inits): Declare .
2692
2693	* mpn/generic/remove.c: New file.
2694	* configure.in (gmp_mpn_functions): Add remove.
2695	* gmp-impl.h (mpn_remove): Declare.
2696
2697	* gmp-h.in (mp_bitcnt_t): New basic type.
2698	* mpn/generic/perfpow.c (mp_bitcnt_t): Remove private definition.
2699
2700	* mpn/generic/bdiv_qr.c: Make it actually work.
2701
2702	* mpn/x86_64/core2/aorsmul_1.asm: Rewrite to use shorter pipeline and
2703	to need fewer registers.
2704
27052009-06-17  Torbjorn Granlund  <tege@gmplib.org>
2706
2707	* mpn/x86_64/rsh1aors_n.asm: New file.
2708	* mpn/x86_64/rsh1add_n.asm: Remove.
2709	* mpn/x86_64/rsh1sub_n.asm: Remove.
2710
2711	* mpz/inits.c: New file.
2712
2713	* gen-trialdivtab.c: Wrap limb constants into CNST_LIMB.
2714
2715	With Martin Boij:
2716	* mpn/generic/perfpow.c (binv_root, binv_sqroot): Change from being
2717	recursive to being iterative.
2718	(mpn_perfect_power_p): Reorganise temp memory usage to avoid a buffer
2719	overrun.  Trim allocation of next and prev.  Never create oversize
2720	products in the multiplicity binary search.
2721
2722	* mpn/generic/dc_div_q.c: Add missing TMP_FREE.
2723
27242009-06-16  Torbjorn Granlund  <tege@gmplib.org>
2725
2726	Revert:
2727	* mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
2728
27292009-06-16  Martin Boij  <mboij@kth.se>
2730
2731	* mpn/generic/perfpow.c (logs): Use more conservative table.
2732
27332009-06-15  Torbjorn Granlund  <tege@gmplib.org>
2734
2735	* mpn/pa64/aors_n.asm: New file.
2736	* mpn/pa64/add_n.asm: Remove.
2737	* mpn/pa64/sub_n.asm: Remove.
2738
2739	* mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
2740
27412009-06-14  Torbjorn Granlund  <tege@gmplib.org>
2742
2743	* mpn/x86_64/bdiv_q_1.asm: Optimise away a mov insn.
2744	* mpn/x86_64/dive_1.asm: Likewise.
2745
2746	* mpn/generic/perfpow.c (binv_root): Use mpn_bdiv_q_1, not
2747	mpn_divexact_itch for 2-adic division.
2748	(all functions): Micro optimise.
2749
2750	* Makefile.am (libmp_la_SOURCES): Add nextprime.c.
2751
27522009-06-13  Torbjorn Granlund  <tege@gmplib.org>
2753
2754	* gmp-h.in (mpn_perfect_power_p): Declare.
2755	* configure.in (gmp_mpn_functions): Add perfpow.
2756	* mpz/perfpow.c: Now trivial, simply calls mpn_perfect_power_p.
2757
27582009-06-13  Martin Boij  <mboij@kth.se>
2759
2760	* mpn/generic/perfpow.c: New file.
2761	* tests/mpz/t-perfpow.c: Rewrite.
2762
27632009-06-12  Torbjorn Granlund  <tege@gmplib.org>
2764
2765	* mpn/generic/bdiv_qr.c: New file.
2766	* mpn/generic/bdiv_q.c: New file.
2767	* configure.in (gmp_mpn_functions): Add bdiv_qr and bdiv_q.
2768	* gmp-impl.h: Declare new functions.
2769
2770	* nextprime.c: New file.
2771	* gmp-impl.h (gmp_primesieve_t, gmp_init_primesieve, gmp_nextprime):
2772	Declare
2773	* Makefile.am (libgmp_la_SOURCES): Add nextprime.c.
2774
27752009-06-11  Torbjorn Granlund  <tege@gmplib.org>
2776
2777	* mpn/generic/trialdiv.c: New file.
2778	* gen-trialdivtab.c: New file.
2779	* configure.in (gmp_mpn_functions): Add trialdiv.
2780	* gmp-impl.h (mpn_trialdiv): Declare
2781	* Makefile.am: Add rules for gen-trialdivtab and trialdiv.
2782
2783	* longlong.h (arm count_leading_zeros): Define for armv5.
2784
2785	* gmp-impl.h: Move down toom itch functions to after we've #defined
2786	all THRESHOLDs.
2787
2788	* dumbmp.c (isprime): Replace with slightly less inefficient code.
2789	(mpz_tdiv_r): New function.
2790
27912009-06-11  Niels M�ller  <nisse@lysator.liu.se>
2792
2793	Support for mpn_toom32_mul in speed:
2794	* tune/speed.c (routine): Added mpn_toom32_mul.
2795	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_MUL): New macro.
2796	* tune/common.c (speed_mpn_toom32_mul): New function.
2797
2798	* gmp-impl.h (mpn_toom32_mul_itch): Count scratch space needed
2799	for the calls to mpn_toom22_mul.
2800	(ABOVE_THRESHOLD): Moved this and related macros so it can be used
2801	by mpn_toom32_mul_itch.
2802	(mpn_toom22_mul_itch): Count scratch space for recursive calls.
2803
28042009-06-11  Torbjorn Granlund  <tege@gmplib.org>
2805
2806	* mpn/x86/k7/mod_1_4.asm: New file, mainly for k7, but perhaps useful
2807	also for k6 and non-sse p6.
2808
28092009-06-10  Torbjorn Granlund  <tege@gmplib.org>
2810
2811	* mpn/x86_64/mod_1_4.asm: Minor size reducing tweaks.
2812
2813	* mpn/x86/mod_1.asm: Remove obsolete file.
2814	* mpn/x86/k7/mmx/mod_1.asm: Likewise.
2815	* mpn/x86/pentium4/sse2/mod_1.asm: Likewise.
2816	* mpn/x86/p6/mod_1.asm: Likewise.
2817	* mpn/x86/pentium/mod_1.asm: Likewise.
2818
28192009-06-08  Niels M�ller  <nisse@lysator.liu.se>
2820
2821	* mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Reorganized, to reduce
2822	the need for scratch space, and get rid of TMP_ALLOC. Also use
2823	mpn_toom_eval_dgr3_pm1.
2824
2825	* mpn/generic/toom_interpolate_6pts.c (mpn_toom_interpolate_6pts):
2826	Stricter ASSERTs based on maximum size of polynomial coefficients.
2827	Improved comments on the signedness of intermediate values.
2828
28292009-06-07  Torbjorn Granlund  <tege@gmplib.org>
2830
2831	* mpn/generic/toom2_sqr.c: Make it actually work.
2832
2833	* mpn/generic/toom3_sqr.c: Reduce local scratch space.
2834
28352009-06-05  Torbjorn Granlund  <tege@gmplib.org>
2836
2837	* mpn/generic/mul_fft.c (FFT_TABLE2_SIZE): Default to 200.
2838	(MUL_FFT_TABLE2_SIZE, SQR_FFT_TABLE2_SIZE): Let these decide
2839	FFT_TABLE2_SIZE if they are defined.
2840	(struct nk): Use bit field.
2841
28422009-06-05  Niels M�ller  <nisse@lysator.liu.se>
2843
2844	* mpn/generic/toom44_mul.c (mpn_toom44_mult): Use
2845	mpn_toom_eval_dgr3_pm1.
2846
2847	* mpn/generic/toom_eval_dgr3_pm1.c: New file.
2848
2849	* mpn/generic/toom_interpolate_7pts.c (mpn_toom_interpolate_7pts):
2850	Minor cleanup, use mpn_add rather than mpn_add_n + MPN_INCR_U.
2851
2852	* mpn/generic/toom44_mul.c (mpn_toom44_mul): Reorganized, to
2853	reduce the need for scratch space, and get rid of TMP_ALLOC.
2854
28552009-06-05  Torbjorn Granlund  <tege@gmplib.org>
2856
2857	* mpn/generic/toom_interpolate_7pts.c: Fall back mpn_divexact_byN to
2858	mpn_bdiv_q_1_pi1, if the latter is NATIVE.
2859
28602009-06-04  Torbjorn Granlund  <tege@gmplib.org>
2861
2862	* mpn/x86_64/bdiv_q_1.asm: New file.
2863
2864	* configure.in (HAVE_NATIVE): Add recently added functions.
2865	(GMP_MULFUNC_CHOICES): Handle addlsh_n, sublsh_n, rsblsh_n.
2866
2867	* tune/common.c (speed_mpn_bdiv_q_1, speed_mpn_bdiv_q_1_pi1):
2868	New functions.
2869	* tune/speed.c (routine): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
2870	* tune/speed.h (SPEED_ROUTINE_MPN_BDIV_Q_1_PI1): New #define.
2871	(SPEED_ROUTINE_MPN_BDIV_Q_1): Mew #define.
2872
2873	* configure.in (gmp_mpn_functions): Add bdiv_q_1.
2874	* mpn/generic/bdiv_q_1.c: New file.
2875	* mpn/asm-defs.m4 (define_mpn): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
2876	* gmp-impl.h (mpn_bdiv_q_1, mpn_bdiv_q_1_pi1): Declare.
2877
2878	* mpn/x86_64/lshift.asm: Cleanup.
2879	* mpn/x86_64/rshift.asm: Cleanup.
2880
2881	* mpn/x86_64/addlsh1_n.asm: Removed.
2882	* mpn/x86_64/aorrlsh1_n.asm: Generalised addlsh1_n.asm to handle
2883	addlsh1_n and rsblsh1_n functionality.
2884
2885	* tests/refmpn.c (refmpn_rsblsh1_n): New function.
2886	* tests/devel/try.c: Test mpn_rsblsh1_n.
2887	* tests/tests.h: Declare refmpn_rsblsh1_n.
2888	* tune/common.c (speed_mpn_rsblsh1_n): New function.
2889	* tune/speed.c (routine): Add mpn_rsblsh1_n.
2890	* tune/speed.h (mpn_rsblsh1_n): Declare.
2891
2892	* configure.in (gmp_mpn_functions_optional): Add rsblsh1_n.
2893	(GMP_MULFUNC_CHOICES): Handle rsblsh1_n defined with a mulfunc.
2894	* mpn/asm-defs.m4 (define_mpn): Add rsblsh1_n.
2895	* gmp-impl.h (mpn_rsblsh1_n): Declare.
2896
2897	* mpn/generic/toom32_mul.c: Consistently use TOOM22_MUL_N_REC.
2898
28992009-06-03  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2900
2901	* mpn/generic/toom43_mul.c: New file.
2902	* mpn/generic/toom52_mul.c: New file.
2903	* mpn/generic/toom_interpolate_6pts.c: New file.
2904
29052009-06-03  Torbjorn Granlund  <tege@gmplib.org>
2906
2907	* configure.in (gmp_mpn_functions): Add toom43_mul, toom52_mul, and
2908	toom_interpolate_6pts, but also some previously forgotten functions.
2909	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Likewise.
2910	* gmp-impl.h: Declare new functions. Sort toom function declarations.
2911
2912	* gmp-impl.h: Rename  toom4_* flags enum to toom7_*.  Relevant C files
2913	updated.
2914
2915	* mpn/generic/toom_interpolate_7pts (divexact_2exp): Remove.
2916
29172009-06-02  Torbjorn Granlund  <tege@gmplib.org>
2918
2919	* demos/factorize.c: Add -q command line option.
2920
29212009-06-02  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2922
2923	* mpn/generic/toom_interpolate_7pts.c: Streamline, resulting in speed
2924	improvements.
2925
2926	* mpn/generic/toom_interpolate_5pts.c: Likewise, but also completely
2927	do away with explicit scratch space.
2928	* gmp-impl.h (mpn_toom_interpolate_5pts): Update prototype.
2929
2930	* mpn/generic/mul_n.c (mpn_toom3_sqr_n, mpn_toom3_mul_n):
2931	Update toom_interpolate_5pts call without scratch space parameter.
2932	* mpn/generic/toom3_sqr.c: Likewise.
2933	* mpn/generic/toom42_mul.c: Likewise.
2934	* mpn/generic/toom33_mul.c: Likewise.
2935
2936	* mpn/generic/toom33_mul.c: Reduce local scratch space.
2937	* mpn/generic/toom32_mul.c: Rewrite to not use local scratch space.
2938
29392009-06-02  Torbjorn Granlund  <tege@gmplib.org>
2940
2941	* mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): New macro, use it for
2942	oo point.
2943
29442009-06-01  Torbjorn Granlund  <tege@gmplib.org>
2945
2946	* mpn/generic/mul.c: Loop to avoid excessive recursion in toom33 and
2947	toom44 slicing code.
2948
2949	* mpz/remove.c: Correctly handle multiplicity that does not fit an int.
2950
2951	* Makefile.am (dist-hook): Check library version consistency.
2952
2953	* mpn/generic/mul.c: Rewrite.
2954
29552009-05-29  Torbjorn Granlund  <tege@gmplib.org>
2956
2957	* tests/mpz/t-divis.c (check_random): Create huge test operands.
2958
2959	* mpn/generic/toom44_mul.c: Allocate temp space using one TMP_ALLOC
2960	call, not multiple TMP_SALLOC.
2961	* mpn/generic/toom4_sqr.c: Likewise.
2962
2963	* gmp-impl.h (mpn_toom22_mul_itch): Replace totally wrong code.
2964
2965	* mpn/generic/mullow_n.c: Relax overlap requirement implied by ASSERT.
2966
2967	* mpn/generic/divis.c: Rewrite.
2968
2969	* gmp-impl.h (mpn_mu_bdiv_qr): Now returns mp_limb_t.
2970	(mpn_toom2_sqr_itch): Simplify.
2971
2972	* mpn/generic/mu_bdiv_qr.c: Implement properly.
2973
29742009-05-27  Torbjorn Granlund  <tege@gmplib.org>
2975
2976	* mpn/generic/mod_1_1.c: Add proper ASSERT functionality cps function.
2977	* mpn/generic/mod_1_2.c: Likewise.
2978	* mpn/generic/mod_1_3.c: Likewise.
2979	* mpn/generic/mod_1_4.c: Likewise.
2980
2981	* tune: Add speed measuring of toom22, toom33, and toom44.
2982
2983	* mpn/generic/toom22_mul.c: Handle potentially unbalanced coefficient
2984	product better.
2985
29862009-05-26  Torbjorn Granlund  <tege@gmplib.org>
2987
2988	* tests/mpz/t-mul.c (ref_mpn_mul): Use mpn_toom44_mul in FFT range for
2989	better huge-operands performance.
2990
29912009-05-24  Torbjorn Granlund  <tege@gmplib.org>
2992
2993	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Try "$L" too, before "$".
2994
29952009-05-23  Torbjorn Granlund  <tege@gmplib.org>
2996
2997	* gmp-impl.h (mpn_mod_1s_1p,mpn_mod_1s_2p,mpn_mod_1s_3p,mpn_mod_1s_4p):
2998	Declare using __GMP_ATTRIBUTE_PURE.
2999
3000	* tune/tuneup.c (tune_mod_1): Specify check_size for measuring mod_1_N
3001	functions.
3002	(one): Remove redundant size loop exit condition.
3003
30042009-05-20  Torbjorn Granlund  <tege@gmplib.org>
3005
3006	* mpn/x86/pentium4/sse2/mod_1_4.asm: New file.
3007	* mpn/x86/p6/sse2/mod_1_4.asm: New file (grabbing pentium4 code).
3008
30092009-05-18  Torbjorn Granlund  <tege@gmplib.org>
3010
3011	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 4.
3012	(__GNU_MP_VERSION_PATCHLEVEL): Set to -1.
3013
3014	* mpn/x86_64/mod_1_4.asm: New file.
3015
3016	* mpn/asm-defs.m4: Correct names for mod_1_N functions.
3017	Add defines for corresponding cps functions.
3018
3019	* mpn/generic/mod_1_2.c: Support any sizes > 1.
3020	* mpn/generic/mod_1_3.c: Likewise.
3021	* mpn/generic/mod_1_4.c: Likewise.
3022
30232009-05-12  Torbjorn Granlund  <tege@gmplib.org>
3024
3025	* Version 4.3.1 released.
3026
30272009-05-11  Torbjorn Granlund  <tege@gmplib.org>
3028
3029	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
3030
3031	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
3032	Bump version info.
3033
30342009-05-09  Torbjorn Granlund  <tege@gmplib.org>
3035
3036	* tests/mpz: Add MPZ_CHECK_FORMAT to many tests.
3037
30382009-05-07  Torbjorn Granlund  <tege@gmplib.org>
3039
3040	* mpn/x86/pentium4/sse2/mul_basecase.asm: Avoid L(ret), "ret" is
3041	defined in x86-defs.m4.
3042
30432009-05-06  Torbjorn Granlund  <tege@gmplib.org>
3044
3045	* mpn/x86/p6/aors_n.asm: Use L() for labels.
3046	* mpn/x86/pentium4/sse2/addmul_1.asm: Likewise.
3047	* mpn/x86/pentium4/sse2/mul_1.asm: Likewise.
3048	* mpn/x86/pentium4/sse2/mul_basecase.asm: Likewise.
3049	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
3050	* mpn/x86_64/lshift.asm: Likewise.
3051	* mpn/x86_64/rshift.asm: Likewise.
3052
3053	* tests/cxx/t-locale.cc (point_string): Declare as extern "C" to
3054	placate compilers that mangle variable names.
3055
30562009-05-04  Torbjorn Granlund  <tege@gmplib.org>
3057
3058	* tests/mpz/t-gcd.c: Generate operands that are multiple of each other.
3059
30602009-05-01  Torbjorn Granlund  <tege@gmplib.org>
3061
3062	* gmp-h.in (__GMP_EXTERN_INLINE): Support for more systems.
3063	(gmp_randinit_set): Add missing __GMP_DECLSPEC.
3064
30652009-04-28  Torbjorn Granlund  <tege@gmplib.org>
3066
3067	* mpn/generic/neg_n.c: New file.
3068	* configure.in (gmp_mpn_functions): Add neg_n.
3069	* mpn/asm-defs.m4 (define_mpn): Add neg_n.
3070	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add neg_n.c.
3071	* gmp-h.in: Handle mpn_neg_n properly.
3072
3073	* mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Nailify.
3074
3075	* mpn/generic/gcdext.c: Change some MPN_NORMALIZE to
3076	MPN_NORMALIZE_NOT_ZERO.
3077	* mpn/generic/gcdext_lehmer.c: Likewise.
3078	Add a MPN_NORMALIZE_NOT_ZERO.
3079
3080	* mpn/generic/binvert.c: Remove own mpn_neg_n.
3081
3082	* tests/mpz/t-gcd.c: Add some MPZ_CHECK_FORMAT calls.
3083
30842009-04-27  Torbjorn Granlund  <tege@gmplib.org>
3085
3086	* mpn/Makefile.am (TARG_DIST): Add minithres.
3087
3088	* mpn/generic/bdiv_dbm1c.c: Handle nails.
3089
30902009-04-26  Torbjorn Granlund  <tege@gmplib.org>
3091
3092	* config.guess: Recognise more POWER processor types.
3093
30942009-04-25  Torbjorn Granlund  <tege@gmplib.org>
3095
3096	* mpn/x86/pentium4/sse2/popcount.asm: Work around Apple reloc bug.
3097	* mpn/x86/darwin.m4: Define symbol "DARWIN".
3098
30992009-04-19  Torbjorn Granlund  <tege@gmplib.org>
3100
3101	* mpn/generic/powm.c (mpn_redc_n): Use ASSERT_ALWAYS, not abort().
3102	* mpn/generic/powm_sec.c: Likewise.
3103
3104	* mpn/powerpc64/aix.m4 (EXTERN_FUNC): New define.  Add dummy variants
3105	for other m4 files.
3106	* mpn/powerpc64/mode64/divrem_1.asm: Use EXTERN_FUNC.
3107	* mpn/powerpc64/mode64/divrem_1.asm: Likewise.
3108
31092009-04-16  Torbjorn Granlund  <tege@gmplib.org>
3110
3111	* mpn/x86_64/x86_64-defs.m4 (JUMPTABSECT): New define.
3112	* mpn/x86_64/darwin.m4: Likewise.
3113	* mpn/x86_64/sqr_basecase.asm: Rework switch code using JUMPTABSECT.
3114
3115	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
3116	Remove an unused variable.
3117
3118	* mpn/x86/x86-defs.m4 (LEA): Get SIZE arguments right.
3119
31202009-04-14  Torbjorn Granlund  <tege@gmplib.org>
3121
3122	* Version 4.3.0 released.
3123
3124	* scanf/doscan.c (__gmp_doscan): Pad 3-operand scanf call with dummy
3125	argument.
3126	* scanf/sscanffuns.c (scan): Disable vsscanf variant for now.
3127
31282009-04-13  Torbjorn Granlund  <tege@gmplib.org>
3129
3130	* scanf/sscanffuns.c (scan): Rewrite to use stdarg.
3131
3132	* tests/mpz/t-root.c: Rewrite.  Add unconditional gcc 4.3.2 tests.
3133
31342009-04-09  Torbjorn Granlund  <tege@gmplib.org>
3135
3136	* mpn/generic/powm.c: New file.
3137	* mpn/generic/powlo.c: New file.
3138	* mpn/generic/powm_sec.c: New file.
3139	* configure.in (gmp_mpn_functions): List new functions.
3140
31412009-04-08  Torbjorn Granlund  <tege@gmplib.org>
3142
3143	* mpz/urandomm.c: Amend last fix.
3144
31452009-04-06  Torbjorn Granlund  <tege@gmplib.org>
3146
3147	* configure.in: Support Sun cc for x86_64.
3148
3149	* mpz/urandomm.c: Handle operand overlap.
3150
31512009-03-11  Torbjorn Granlund  <tege@gmplib.org>
3152
3153	* configure.in (powerpc): Brave removing -Wa,-mppc64, in the hope that
3154	GCC now passes the proper options.
3155
31562009-03-09  Torbjorn Granlund  <tege@gmplib.org>
3157
3158	* mpn/x86_64/divrem_1.asm: Add a nop to save a cycle in unnormalised
3159	case.
3160
31612009-03-05  Torbjorn Granlund  <tege@gmplib.org>
3162
3163	* ia64/gmp-mparam.h, arm/gmp-mparam.h, x86/p6/mmx/gmp-mparam.h,
3164	pa32/hppa2_0/gmp-mparam.h sparc32/v9/gmp-mparam.h: Update.
3165
31662009-03-03  Torbjorn Granlund  <tege@gmplib.org>
3167
3168	* mpn/ia64/bdiv_dbm1c.asm: Accept/return carry.
3169
31702009-03-02  Torbjorn Granlund  <tege@gmplib.org>
3171
3172	* configure.in (64-bit sparc/solaris): Pass -xO3, not -O3 to solaris
3173	system compiler.
3174
31752009-03-01  Torbjorn Granlund  <tege@gmplib.org>
3176
3177	* longlong.h (mips, powerpc): Provide assembly-free umul_ppmm for newer
3178	gcc.
3179
31802009-02-04  Torbjorn Granlund  <tege@gmplib.org>
3181
3182	* mpn/generic/redc_2.c: Remove code for testing and timing.  Update
3183	to current FSF header.
3184	* mpn/generic/redc_1.c: Update to current FSF header.
3185
31862009-01-21  Torbjorn Granlund  <tege@gmplib.org>
3187
3188	* mpz/powm.c (redc): Remove.
3189	(mpz_powm): Use mpn_redc_1 instead of redc.
3190
3191	* tests/mpz/t-powm.c: Rewrite reference code.
3192
31932009-01-18  Torbjorn Granlund  <tege@gmplib.org>
3194
3195	* tests/mpz: Increase reps for many tests.
3196
3197	* mpn/generic/rootrem.c (mpn_rootrem_internal): Use MPN_DECR_U instead of
3198	mpn_sub_1 (works around gcc 4.3 bugs and is also faster).
3199
32002009-01-16  Torbjorn Granlund  <tege@gmplib.org>
3201
3202	* tests/tests.h: Declare refmpn_divrem_2.
3203
32042009-01-15  Torbjorn Granlund  <tege@gmplib.org>
3205
3206	* mpz/perfpow.c: Add TMP_FREE before every return statement.
3207
3208	* mpn/generic/rootrem.c (mpn_rootrem_internal): Add a missing TMP_FREE.
3209
3210	* configure.in (gcc_cflags, gcc_64_cflags): Revert from -O3 to -O2,
3211	the change was accidental and cause too much miscompilation.
3212
32132009-01-14  Torbjorn Granlund  <tege@gmplib.org>
3214
3215	* tune/tuneup.c (tune_mod_1): Run MOD_1_x_THRESHOLD tests also when
3216	longlong.h specified UDIV_PREINV_ALWAYS.
3217
3218	* mpn/generic/mod_1.c (mpn_mod_1): Properly check for normalisation
3219	divisor.
3220
32212009-01-13  Torbjorn Granlund  <tege@gmplib.org>
3222
3223	* tune/tuneup.c (tune_mod_1): Tune for MOD_1_1_THRESHOLD,
3224	MOD_1_2_THRESHOLD, and MOD_1_4_THRESHOLD.
3225
3226	* mpn/generic/mod_1.c: Rewrite.
3227	* mpn/generic/mod_1_1.c: New file.
3228	* mpn/generic/mod_1_2.c: New file.
3229	* mpn/generic/mod_1_3.c: New file.
3230	* mpn/generic/mod_1_4.c: New file.
3231	* configure.in (gmp_mpn_functions): Add mod_1_*.
3232	* mpn/asm-defs.m4 (define_mpn): Add mod_1_*.
3233	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mod_1_*.c.
3234	* gmp-impl.h: Declare new mpn_mod_1s_* functions and associated
3235	THRESHOLD macros.
3236	(udiv_rnd_preinv): New macro.
3237
32382009-01-12  Torbjorn Granlund  <tege@gmplib.org>
3239
3240	* tune/tuneup.c (tune_gcd_dc,tune_gcdext_dc): Lower step_factor to 0.1.
3241
32422009-01-08  Torbjorn Granlund  <tege@gmplib.org>
3243
3244	* tests/mpz/t-nextprime.c: New test file.
3245	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-nextprime.
3246
3247	From Niels M�ller:
3248	* mpz/nextprime.c: Handle large prime gaps by limiting incr.
3249
32502009-01-04  Torbjorn Granlund  <tege@gmplib.org>
3251
3252	* mpz/and.c, mpz/ior.c, mpz/xor.c: Re-read only necessary source
3253	pointers after reallocation.  Misc cleanup.
3254
3255	* gmp-impl.h (MPN_TOOM44_MAX_N): New define, replaces MPN_TOOM3_MAX_N.
3256
3257	* mpn/x86/fat/diveby3.c: New file.
3258
32592008-12-30  Niels M�ller  <nisse@lysator.liu.se>
3260
3261	* doc/gmp.texi (Greatest Common Divisor Algorithms): Updated
3262	section on GCD algorithms.
3263
32642008-12-29  Torbjorn Granlund  <tege@gmplib.org>
3265
3266	* doc/gmp.texi (Multiplication Algorithms): Add descriptions of Toom-4
3267	and unbalanced multiplication.
3268	(Radix to Binary): Add warning that text is outdated,
3269	(Contributors): Fix typos.
3270
3271	* mpn/generic/toom*.c: Use coherent MAYBE_ macros for trimming
3272	unreachable recursive functions.
3273	* gmp-impl.h: Update toom itch functions.
3274
3275	* mpn/x86_64/sqr_basecase.asm: Slightly increase stack allocation, to
3276	placate tuneup.
3277
32782008-12-28  Torbjorn Granlund  <tege@gmplib.org>
3279
3280	* mpn/x86_64/pentium4/aors_n.asm: Tune prologue code.
3281
3282	* mpn/x86_64/pentium4/aorslsh1_n.asm: New file.
3283
3284	* mpn/x86_64/darwin.m4: Define symbol "DARWIN".
3285	* mpn/x86_64/invert_limb.asm: Work around darwin quirks.
3286
3287	* mpn/x86_64/sqr_basecase.asm: Further optimize, support Darwin.
3288
3289	* mpn/x86_64/invert_limb.asm: New file.
3290
32912008-12-27  Torbjorn Granlund  <tege@gmplib.org>
3292
3293	* mpn/x86_64/core2/aorslsh1_n.asm: New file.
3294
32952008-12-26  Torbjorn Granlund  <tege@gmplib.org>
3296
3297	* mpz/perfpow.c: Handle negative arguments properly.
3298	* tests/mpz/t-perfpow.c: New file.
3299	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-perfpow.
3300
33012008-12-23  Torbjorn Granlund  <tege@gmplib.org>
3302
3303	* tests/mpz/t-mul.c (dump_abort): Improve error message.
3304
3305	* gcd.c gcd_subdiv_step.c gcdext.c gcdext_subdiv_step.c:
3306	Remove private mpn_zero_p.
3307
3308	* tune/tuneup.c (tune_mul): Tune for MUL_TOOM44_THRESHOLD.
3309	(tune_sqr): Tune for SQR_TOOM4_THRESHOLD.
3310
3311	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom44_mul.c and
3312	toom4_sqr.c.
3313
3314	* configure.in (gmp_mpn_functions): Toom function updates.
3315
3316	* Rename mpn/mul_toomMN.c to mpn/toomMN_mul.c.  Function names changed
3317	accordingly.
3318
3319	* mpn/toomMN_mul.c: Add scratch parameter.  Do recursive multiplies
3320	properly.  Misc tuning.  Remove CHECK and TIMING code.
3321
3322	* mpn/toom2_sqr.c, mpn/toom3_sqr.c, mpn/toom4_sqr.c: New files.
3323
3324	* gmp-impl.h (mpn_toomMN_mul_itch): Several new functions.
3325	(mpn_zero_p): New functions.
3326	Add various TOOM4/TOOM44 related parameters.
3327	Update mpn_toomMN_mul prototypes.
3328
3329	* mpn/generic/mul_n.c (mpn_mul_n): Call mpn_toom44_mul.  Use TMP_BALLOC
3330	instead of malloc.
3331	(mpn_sqr_n): Analogous changes.
3332
3333	* mpn/generic/mul.c: Update unbalanced toom code to pass scratch space.
3334
33352008-12-21  Torbjorn Granlund  <tege@gmplib.org>
3336
3337	* mpz/nextprime.c: Add TMP_SDECL/MARK/FREE.
3338
33392008-12-20  Torbjorn Granlund  <tege@gmplib.org>
3340
3341	* mpn/generic/sqrtrem.c (mpn_sqrtrem1): Rewrite, improve interface.
3342	(invsqrttab): New table, remove table approx_tab.
3343	(mpn_sqrtrem2): Optimize, update mpn_sqrtrem1 call.
3344	(mpn_sqrtrem): Update mpn_sqrtrem1 call.
3345
33462008-12-18  Torbjorn Granlund  <tege@gmplib.org>
3347
3348	* mpz/nextprime.c: Run 10 mpz_millerrabin tests (was 5).
3349	Give credit to authors.
3350
3351	* mpn/x86_64/redc_1.asm: Align stack as mandated by ABI.
3352
3353	* mpn/x86_64/divrem_2.asm: Add some comments.
3354
3355	* mpn/x86_64/darwin.m4: New file.
3356	* configure.in: Use x86_64/darwin.m4.
3357
33582008-12-15  Torbjorn Granlund  <tege@gmplib.org>
3359
3360	* doc/projects.html: Remove GCD and division projects, update text on
3361	multiplication.
3362
3363	* doc/tasks.html: Add a caution about that the file is somewhat
3364	outdated.
3365
33662008-12-14  Torbjorn Granlund  <tege@gmplib.org>
3367
3368	* mpn/alpha/ev6/aorsmul_1.asm: New file (same code for mpn_addmul_1,
3369	much improved for mpn_submul_1).
3370	* mpn/alpha/ev6/addmul_1: File removed.
3371	* mpn/alpha/ev6/submul_1: File removed.
3372
33732008-12-09  Torbjorn Granlund  <tege@gmplib.org>
3374
3375	From David Harvey:
3376	* mpn/x86_64/mul_basecase.asm: Further tweaks for code size and speed.
3377
3378	* mpn/powerpc64/mode64/divrem_1.asm: Rewrite.
3379
3380	* mpn/powerpc64/mode64/mul_basecase.asm: New file.
3381
33822008-12-08  Torbjorn Granlund  <tege@gmplib.org>
3383
3384	* mpn/powerpc64/mode64/gmp-mparam.h: New file.
3385
3386	* gmp-impl.h: Additional cleanups.
3387	(mpn_set_str_compute_powtab): New prototype.
3388	(mpn_powm, mpn_powlo): New prototypes.
3389
3390	* mpz/pow_ui.c: Handle some small exponents locally.
3391
33922008-12-07  Torbjorn Granlund  <tege@gmplib.org>
3393
3394	* mpn/generic/set_str.c: Remove prototypes (they are in gmp-impl.h).
3395
3396	* tune/set_strs.c, tune/set_strb.c: Make prototypes effective by moving
3397	the #define mpn_set_str* before including gmp-impl.h.
3398
3399	* All files: Change _PROTO => __GMP_PROTO.
3400
3401	* tune/speed.c (routine): Remove non-working choice mpn_set_str_subquad.
3402	* tune/common.c (speed_mpn_dc_set_str): Remove, it is broken.
3403
3404	* mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Make this static,
3405	and inline it.
3406
3407	* gmp-impl.h: Major cleanup.
3408	(Remove formal parameter names.  Use __GMP_PROTO consistently.  Move
3409	__GMP_PROTO and __MPN use to adjacent lines for declared function.
3410	Fix typos.  Remove code inside #if 0.)
3411
3412	* configure.in (gmp_mpn_functions): Add mul_toom33.  Reformat.
3413
34142008-12-05  Torbjorn Granlund  <tege@gmplib.org>
3415
3416	* mpn/generic/redc_1.c: New file.
3417	* mpn/generic/redc_2.c: New file.
3418
3419	* configure.in (gmp_mpn_functions): List redc_1 and redc_2.
3420	(HAVE_NATIVE): Likewise.
3421
3422	* tune/common.c (speed_mpn_redc_1): Renamed from speed_redc.
3423	* tune/speed.c (routine): Remove "redc", and "mpn_redc_1".
3424	* tune/speed.h (SPEED_ROUTINE_REDC_1): Renamed from SPEED_ROUTINE_REDC.
3425	Updated call.
3426	* tune/tuneup.c (tune_powm): Update redc call.
3427
34282008-12-04  Torbjorn Granlund  <tege@gmplib.org>
3429
3430	* mpn/x86_64/sqr_basecase.asm: Inline a combined diagonal product code
3431	and addlsh1 loop.  Misc cleanup.
3432
34332008-12-02  Torbjorn Granlund  <tege@gmplib.org>
3434
3435	* mpn/x86_64/sqr_basecase.asm: New file.
3436
34372008-11-30  Torbjorn Granlund  <tege@gmplib.org>
3438
3439	* mpn/generic/sqr_basecase.c: Fix typo in mpn_addmul_2s variant.
3440
34412008-11-28  Torbjorn Granlund  <tege@gmplib.org>
3442
3443	* mpn/x86_64/redc_1.asm: Rewrite.
3444
34452008-11-27  Torbjorn Granlund  <tege@gmplib.org>
3446
3447	* tests/refmpn.c (refmpn_redc_1): New function.
3448
34492008-11-25  Torbjorn Granlund  <tege@gmplib.org>
3450
3451	* mpn/x86/k7/aorsmul_1.asm: Actually handle mpn_submul_1.
3452
34532008-11-23  Torbjorn Granlund  <tege@gmplib.org>
3454
3455	* mpn/x86_64/divrem_1.asm: Rewrite.
3456
3457	* alpha/divrem_2.asm: New file.
3458	* powerpc32/divrem_2.asm: New file.
3459	* powerpc64/mode64/divrem_2.asm: New file.
3460	* x86/divrem_2.asm: New file.
3461	* x86_64/divrem_2.asm: New file.
3462	* tests/refmpn.c (refmpn_divrem_2): New function.
3463
34642008-11-22  Torbjorn Granlund  <tege@gmplib.org>
3465
3466	* mpn/x86/k7/mul_1.asm: Rewrite for smaller size and better speed.
3467	* mpn/x86/k7/aorsmul_1.asm: Likewise.
3468
3469	* acinclude.m4 (GMP_VERSION): Include last component even when zero.
3470
34712008-11-21  Torbjorn Granlund  <tege@gmplib.org>
3472
3473	* mpn/x86_64/README: Rewrite.
3474
3475	* tests/devel/try.c (malloc_region, mprotect_maybe): Add casts for
3476	printf type correctness.
3477
3478	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
3479
3480	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
3481	Bump version info.
3482
34832008-11-20  Torbjorn Granlund  <tege@gmplib.org>
3484
3485	* gmp-impl.h: Rename modlimb_invert to binvert_limb.
3486	* tune/speed.h: Likewise.
3487	* tune/modlinv.c: Likewise.
3488	* tune/common.c: Likewise.
3489	* tests/t-modlinv.c: Likewise.
3490	* tests/t-constants.c: Likewise.
3491	* mpn/sparc64/mode1o.c: Likewise.
3492	* mpn/alpha/dive_1.c: Likewise.
3493	* mpn/sparc64/dive_1.c: Likewise.
3494	* mpn/generic/mode1o.c: Likewise.
3495	* mpn/generic/dive_1.c: Likewise.
3496	* mpn/generic/bdivmod.c: Likewise.
3497	* mpn/alpha/mode1o.asm: Likewise.
3498	* mpn/asm-defs.m4: Likewise.
3499	* mpn/ia64/mode1o.asm: Likewise.
3500	* mpn/powerpc32/README: Likewise.
3501	* mpn/powerpc32/mode1o.asm: Likewise.
3502	* mpn/powerpc64/mode64/dive_1.asm: Likewise.
3503	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
3504	* mpn/x86/dive_1.asm: Likewise.
3505	* mpn/x86/k6/mmx/dive_1.asm: Likewise.
3506	* mpn/x86/k6/mode1o.asm: Likewise.
3507	* mpn/x86/k7/dive_1.asm: Likewise.
3508	* mpn/x86/k7/mode1o.asm: Likewise.
3509	* mpn/x86/p6/dive_1.asm: Likewise.
3510	* mpn/x86/p6/mode1o.asm: Likewise.
3511	* mpn/x86/pentium/dive_1.asm: Likewise.
3512	* mpn/x86/pentium/mode1o.asm: Likewise.
3513	* mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
3514	* mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
3515	* mpn/x86_64/dive_1.asm: Likewise.
3516	* mpn/x86_64/mode1o.asm: Likewise.
3517
3518	* mpn/x86_64/aors_n.asm: Replace with slightly faster, more alignment
3519	neutral loop.
3520
35212008-11-18  Torbjorn Granlund  <tege@gmplib.org>
3522
3523	* configure.in: Remove gcd_finda related declarations.
3524	* gmp-impl.h (mpn_gcd_finda): Remove declaration.
3525	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Remove gcd_finda.
3526	* mpn/asm-defs.m4: Remove define_mpn(gcd_finda).
3527	* mpn/x86/k6/gcd_finda.asm: Remove file.
3528	* tests/devel/try.c (param_init): Remove mpn_gcd_finda.
3529	(choice_array): Remove mpn_gcd_finda.
3530	* tests/mpn/t-instrument.c (check): Remove testing of mpn_gcd_finda.
3531	* tests/refmpn.c (refmpn_gcd_finda): Remove.
3532	* tests/tests.h (refmpn_gcd_finda): Remove declaration.
3533	* tune/common.c (speed_mpn_gcd_finda): Remove.
3534	* tune/gcd_finda_gen.c: Remove file.
3535	* tune/speed.h (speed_mpn_gcd_finda): Remove declaration.
3536	* tune/speed.c (routine): Remove mpn_gcd_finda entry.
3537
3538	* tests/mpz/t-powm.c: Print test number when failing a test.
3539
3540	* mpn/x86_64/redc_1.asm (CALL): Move from here...
3541	* mpn/x86_64/x86_64-defs.m4: ...to here.
3542
3543	* gmp-impl.h (mpn_jacobi_base): Remove parameter names.
3544
35452008-11-11  Torbjorn Granlund  <tege@gmplib.org>
3546
3547	* tests/mpf/t-conv.c: Add some specific tests, supplementing the random
3548	tests.
3549
35502008-11-09  Torbjorn Granlund  <tege@gmplib.org>
3551
3552	* mpf/set_str.c: Default 'base' before letting exp_base inherit it.
3553
3554	* tests/cxx/t-prec.cc: Use the right precision for all float constants.
3555
35562008-11-08  Torbjorn Granlund  <tege@gmplib.org>
3557
3558	* doc/gmp.texi (Float Comparison): Update mpf_eq documentation.
3559
3560	* mpf/eq.c: Compare the right number of bits.
3561
35622008-11-02  Torbjorn Granlund  <tege@gmplib.org>
3563
3564	Undo, it made testing too slow:
3565	* tests/mpz/t-mul.c: Use slower geometric progression for operand
3566	sizes.
3567
3568	* mpn/x86/k7/mod_34lsub1.asm: Use movzb for masking low 8 bits.
3569
35702008-10-31  Niels M�ller  <nisse@lysator.liu.se>
3571
3572	* mpn/generic/hgcd2.c (div1): New function (taken from old gcdext
3573	implementation)
3574	(mpn_hgcd2): Use single precision for the second half of the work.
3575
35762008-10-30  Torbjorn Granlund  <tege@gmplib.org>
3577
3578	* mpn/x86/p6/sse2/gmp-mparam.h: New file.
3579
35802008-10-29  Torbjorn Granlund  <tege@gmplib.org>
3581
3582	* configure.in (x86 fat_path): Add "x86/p6/sse2".
3583
3584	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Recognize sse2 capable p6
3585	(pentiumm, core2).
3586
3587	* mpn/x86/p6/sse2/mul_1.asm: New file.
3588	* mpn/x86/p6/sse2/addmul_1.asm: New file.
3589	* mpn/x86/p6/sse2/submul_1.asm: New file.
3590	* mpn/x86/p6/sse2/mul_basecase.asm: New file.
3591	* mpn/x86/p6/sse2/sqr_basecase.asm: New file.
3592	* mpn/x86/p6/sse2/popcount.asm: New file.
3593
3594	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Handle "extended" fields for
3595	model and family.
3596
35972008-10-28  Torbjorn Granlund  <tege@gmplib.org>
3598
3599	From Mickael Gastineau:
3600	* gmp-h.in (gmp_urandomm_ui, gmp_urandomb_ui): Add __GMP_DECLSPEC.
3601
36022008-10-27  Torbjorn Granlund  <tege@gmplib.org>
3603
3604	* gmp-h.in (mpn_gcdext_1): Remove bogus __GMP_ATTRIBUTE_PURE.
3605
36062008-10-27  Niels M�ller  <nisse@lysator.liu.se>
3607
3608	* tune/common.c (speed_mpn_hgcd): Call mpn_hgcd_matrix_init once
3609	for each call to mpn_hgcd.
3610	(speed_mpn_hgcd_lehmer): Likewise.
3611
36122008-10-26  Torbjorn Granlund  <tege@gmplib.org>
3613
3614	* configure.in: Point to p6/sse2 for pentiumm and core2.
3615
3616	* gmp-impl.h (mpn_add_nc, mpn_sub_nc): Move these macros to after fat
3617	definitions.
3618
3619	* tune/common.c, tune/speed.c, tune/speed.h:
3620	Add speed measurement of mpn_bdiv_dbm1c.
3621
36222008-10-24  Torbjorn Granlund  <tege@gmplib.org>
3623
3624	* mpn/x86_64/gmp-mparam.h (MUL_FFT_TABLE2, SQR_FFT_TABLE2): Extend.
3625
3626	* mpz/nextprime.c: Move declarations to function beginning.
3627
36282008-10-23  Niels M�ller  <nisse@lysator.liu.se>
3629
3630	* gmp-impl.h (DECL_gcdext_1): Deleted.
3631
36322008-10-22  Torbjorn Granlund  <tege@gmplib.org>
3633
3634	* mpn/x86_64/atom/aors_n.asm: New file.
3635	* mpn/x86_64/atom/gmp-mparam.h: New file.
3636
36372008-10-21  Torbjorn Granlund  <tege@gmplib.org>
3638
3639	With Neils M�ller:
3640	* mpz/nextprime.c: Rewrite.
3641
3642	* tests/devel/try.c (main): Use strtol for 's' and 'S' optargs.
3643
3644	* mpn/x86_64/pentium4/rshift.asm: Misc cleanups.
3645	* mpn/x86_64/pentium4/lshift.asm: Likewise.
3646
3647	* mpn/x86_64/pentium4/aors_n.asm: Use fewer registers.
3648
3649	* configure.in: Set up specific path for x86_64/atom.
3650
36512008-10-21  Niels M�ller  <nisse@lysator.liu.se>
3652
3653	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Removed
3654	qstack.c.
3655	* mpn/generic/qstack.c: Deleted obsolete file.
3656
36572008-10-20  Torbjorn Granlund  <tege@gmplib.org>
3658
3659	* mpn/x86_64/core2/aorsmul_1.asm: New file.
3660
36612008-10-19  Torbjorn Granlund  <tege@gmplib.org>
3662
3663	* mpn/x86_64/aors_n.asm: Remove redundant MULFUNC_PROLOGUE.
3664
3665	* gmp-impl.h (popc_limb): Remove redundant checks of GMP_LIMB_BITS
3666	inside several of these macros.
3667
36682008-10-17  Torbjorn Granlund  <tege@gmplib.org>
3669
3670	* tests/mpz/t-mul.c: Use slower geometric progression for operand
3671	sizes.  Do every other tests for same size operands.
3672
36732008-10-15  Torbjorn Granlund  <tege@gmplib.org>
3674
3675	* mpn/x86_64/mul_basecase.asm: Simplify addressing in epilogue.
3676
3677	* mpn/mips64/divrem_1.asm: Remove file, it is n32-only, and uses an old
3678	algorithm.
3679
3680	* config.guess, config.sub, configure.in: Support Intel Atom processor.
3681
36822008-10-10  Torbjorn Granlund  <tege@gmplib.org>
3683
3684	* mpq/mul.c: Fix typo in last change.
3685
36862008-10-09  Torbjorn Granlund  <tege@gmplib.org>
3687
3688	* tests/refmpn.c (refmpn_sb_divrem_mn): Work around a gcc bug.
3689
36902008-10-08  Torbjorn Granlund  <tege@gmplib.org>
3691
3692	* mpq/mul.c: Use TMP_ALLOC.  Cleanup.
3693	* mpq/div.c: Likewise.
3694
3695	* mpn/x86_64/mul_basecase.asm: Use lea directly for loading entry point
3696	addresses.
3697
36982008-10-09  Niels M�ller  <nisse@lysator.liu.se>
3699
3700	* mpn/x86/k7/gmp-mparam.h: Updated GCD-related values.
3701
37022008-10-05  Torbjorn Granlund  <tege@gmplib.org>
3703
3704	* mpn/generic/mul_fft.c (mpn_mul_fft_internal): Do store
3705	mpn_fft_norm_modF return value, if (rec).
3706
37072008-10-04  Torbjorn Granlund  <tege@gmplib.org>
3708
3709	* mpn/x86_64/aorsmul_1.asm: Replace with faster code.
3710	* mpn/x86_64/mul_1.asm: Likewise.
3711	* mpn/x86_64/addmul_2.asm: Likewise.
3712	* mpn/x86_64/mul_2.asm: Likewise.
3713	* mpn/x86_64/mul_basecase.asm: Likewise.
3714
37152008-10-02  Torbjorn Granlund  <tege@gmplib.org>
3716
3717	* mpn/minithres/gmp-mparam.h: Update FFT values.
3718
37192008-10-02  Niels M�ller  <nisse@lysator.liu.se>
3720
3721	* hgcd.c (mpn_hgcd_matrix_mul): Fixed normalization bug.
3722
37232008-09-24  Torbjorn Granlund  <tege@gmplib.org>
3724
3725	* configure.in: Handle --enable-minithres.
3726	* mpn/minithres/gmp-mparam.h: Update all values.
3727
37282008-09-22  Torbjorn Granlund  <tege@gmplib.org>
3729
3730	* tune/speed.c (routine): New entry for mpn_mul.
3731	* tune/speed.h (SPEED_ROUTINE_MPN_MUL): Renamed from
3732	SPEED_ROUTINE_MPN_MUL_BASECASE.
3733	(speed_mpn_mul): Renamed from speed_mpn_mul_basecase.
3734	(SPEED_ROUTINE_MPN_MUL): Allocate our own memory of xp operand.
3735
3736	* tune/common.c: Corresponding changes.
3737
37382008-09-22  Niels M�ller  <nisse@lysator.liu.se>
3739
3740	* mpn/generic/gcdext.c (hgcd_mul_matrix_vector): New function,
3741	replaces addmul2_n. Needs less copying.
3742	(mpn_gcdext): Use hgcd_mul_matrix_vector. Updated for interface
3743	change in mpn_gcdext_subdiv_step
3744
3745	* mpn/generic/hgcd.c (hgcd_matrix_mul_1): Rewritten to use
3746	mpn_hgcd_mul_matrix1_vector.
3747	(hgcd_step): Updated for interface change in
3748	mpn_hgcd_mul_matrix1_inverse_vector.
3749
3750	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
3751	interface changes in mpn_hgcd_mul_matrix1_vector,
3752	mpn_hgcd_mul_matrix1_inverse_vector and mpn_gcdext_subdiv_step.
3753
3754	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Updated for
3755	interface change in mpn_hgcd_mul_matrix1_inverse_vector.
3756
3757	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): Use
3758	separate scratch arguments for the quotient and for the cofactor
3759	update.
3760
3761	* mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Interface
3762	change. Store first element in rp and leave ap unmodified. No
3763	additional scratch space or copying needed. Callers that require
3764	modification in place still need to copy one of the inputs.
3765	(mpn_hgcd_mul_matrix1_inverse_vector): Likewise.
3766
37672008-09-22  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3768
3769	* mpn/generic/hgcd.c (hgcd_matrix_mul_1): Use mpn_addaddmul_1msb0.
3770	* mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Likewise.
3771
3772	* mpn/generic/gcd.c: Use libspeed for timing measurements.
3773
3774	* gmp-impl.h: Declare mpn_addaddmul_1msb0.
3775	* mpn/asm-defs.m4: Added addaddmul_1msb0.
3776	* mpn/x86_64/addaddmul_1msb0.asm: New file.
3777	* configure.in (gmp_mpn_functions_optional): Added
3778	addaddmul_1msb0.
3779	(HAVE_NATIVE): List addaddmul_1msb0.
3780
37812008-09-21  Torbjorn Granlund  <tege@gmplib.org>
3782
3783	* mpn/generic/get_str.c (GET_STR_DC_THRESHOLD): Remove default.
3784	(GET_STR_PRECOMPUTE_THRESHOLD): Likewise.
3785	Misc code cleanups.
3786
3787	* gmp-impl.h (mpn_dc_set_str_itch): Allocate GMP_LIMB_BITS more limbs.
3788
3789	Revert:
3790	* mpn/generic/set_str.c:
3791	(mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
3792
37932008-09-18  Torbjorn Granlund  <tege@gmplib.org>
3794
3795	* mpn/alpha/ev6/gmp-mparam.h (DIVEXACT_BY3_METHOD): Define.
3796
3797	* mpn/ia64/diveby3.asm: Remove.
3798	* mpn/x86/diveby3.asm: Remove.
3799	* mpn/x86/k6/diveby3.asm: Remove.
3800	* mpn/x86/k7/diveby3.asm: Remove.
3801	* mpn/x86/p6/diveby3.asm: Remove.
3802	* mpn/x86/pentium/diveby3.asm: Remove.
3803	* mpn/x86_64/diveby3.asm: Remove.
3804	* mpn/x86/pentium4/sse2/diveby3.asm: Remove.
3805
3806	* configure.in (HAVE_NATIVE): List divexact_by3c.
3807
3808	* gmp-impl.h (mpn_divexact_by3c): Override gmp-h.in's definition.
3809	(DIVEXACT_BY3_METHOD): Don't default to 0 if
3810	HAVE_NATIVE_mpn_divexact_by3c.
3811
38122008-09-18  Niels M�ller  <nisse@lysator.liu.se>
3813
3814	* mpn/generic/gcd.c (main): Added code for tuning of CHOOSE_P.
3815
3816	* mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Assert that inputs are
3817	normalized.
3818
38192008-09-17  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3820
3821	* mpn/generic/gcdext.c (mpn_gcdext): p = n/5 caused a
3822	slowdown for large inputs. As a compromise, use p = n/2 for the
3823	first iteration, and p = n/3 for the rest. Handle the first
3824	iteration specially, since the initial u0 and u1 are trivial.
3825
3826	* mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
3827	from 409 to 390.
3828
3829	* mpn/generic/gcdext.c (CHOOSE_P): New macro. Use p = n/5.
3830	(mpn_gcdext): Use CHOOSE_P, and generalized the calculation of
3831	scratch space.
3832
3833	* tune/tuneup.c (tune_hgcd): Use default step factor.
3834
3835	* mpn/x86_64/gmp-mparam.h: (GCD_DC_THRESHOLD): Reduced from 493 to
3836	412.
3837
3838	* mpn/generic/gcd.c (CHOOSE_P): New macro, to determine the
3839	split when calling hgcd. Use p = 2n/3, as that seems better than
3840	the more obvious split p = n/2.
3841	(mpn_gcd): Use CHOOSE_P, and generalized the calculation of
3842	scratch space.
3843
38442008-09-16  Torbjorn Granlund  <tege@gmplib.org>
3845
3846	* mpn/generic/toom_interpolate_7pts.c: Use new mpn_divexact_byN
3847	functions.
3848
3849	* gmp-impl.h (mpn_divexact_by3, mpn_divexact_by5, mpn_divexact_by7,
3850	mpn_divexact_by9, mpn_divexact_by11, mpn_divexact_by13,
3851	mpn_divexact_by15): New macros, defined in terms of mpn_bdiv_dbm1.
3852
3853	* configure.in (gmp_mpn_functions): List bdiv_dbm1c.
3854	(HAVE_NATIVE): Likewise.
3855	* mpn/asm-defs.m4: Define bdiv_dbm1c.
3856	* gmp-impl.h (mpn_bdiv_dbm1c): Declare.
3857	(mpn_bdiv_dbm1): New macro.
3858	* mpn/generic/bdiv_dbm1c.c: New file.
3859	* mpn/alpha/bdiv_dbm1c.asm: New file.
3860	* mpn/ia64/bdiv_dbm1c.asm: New file.
3861	* mpn/powerpc32/bdiv_dbm1c.asm: New file.
3862	* mpn/powerpc64/mode64/bdiv_dbm1c.asm: New file.
3863	* mpn/x86/bdiv_dbm1c.asm: New file.
3864	* mpn/x86_64/bdiv_dbm1c.asm: New file.
3865
3866	* mpn/generic/diveby3.c: Add mpn_bdiv_dbm1c based function.
3867	Choose function depending on DIVEXACT_BY3_METHOD.
3868	* gmp-impl.h (DIVEXACT_BY3_METHOD): Provide default.
3869
38702008-09-16  Niels M�ller  <nisse@lysator.liu.se>
3871
3872	* mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Moved function to
3873	gcdext.c, where it is used.
3874	* mpn/generic/gcdext.c (addmul2_n): Moved and renamed, was
3875	mpn_hgcd_addmul2_n. Made static. Deleted input normalization.
3876	Deleted rn argument.
3877	(mpn_gcdext): Updated calls to addmul2_n, and added assertions.
3878
3879	* gmp-impl.h (MPN_HGCD_MATRIX_INIT_ITCH): Increased storage by four limbs.
3880	(MPN_HGCD_LEHMER_ITCH): Reduced storage by one limb.
3881	(MPN_GCD_SUBDIV_STEP_ITCH): Likewise.
3882	(MPN_GCD_LEHMER_N_ITCH): Likewise.
3883
3884	* mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Use two extra limbs.
3885	(hgcd_step): Use overlapping arguments to mpn_tdiv_qr.
3886	(mpn_hgcd_matrix_mul): Deleted normalization code. Tigher bounds
3887	for the element size of the product. Needs two extra limbs of
3888	storage for the elements.
3889	(mpn_hgcd_itch): Updated storage calculation.
3890
3891	* mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): Use
3892	overlapping arguments to mpn_tdiv_qr. Use mpn_zero_p.
3893
3894	* mpn/generic/gcd.c (mpn_gcd): Use mpn_zero_p.
3895
38962008-09-15  Niels M�ller  <nisse@lysator.liu.se>
3897
3898	* mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Updated for deleted
3899	tp pointer.
3900	(hgcd_matrix_update_q): Likewise.
3901	(mpn_hgcd_matrix_mul): Likewise.
3902	(mpn_hgcd_itch): Updated calculation of scratch space.
3903
3904	* gmp-impl.h (struct hgcd_matrix): Deleted tp pointer.
3905	(MPN_HGCD_MATRIX_INIT_ITCH): Reduced storage.
3906	(mpn_hgcd_step, MPN_HGCD_STEP_ITCH): Deleted declarations.
3907
39082008-09-15  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3909
3910	* mpn/x86_64/gmp-mparam.h (MATRIX22_STRASSEN_THRESHOLD): New
3911	threshold.
3912
3913	* mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Use mpn_matrix22_mul.
3914	(mpn_hgcd_itch): Updated calculation of scratch space. Use
3915	count_leading_zeros to get the recursion depth.
3916
3917	* mpn/generic/gcd.c (mpn_gcd): Fixed calculation of scratch space,
3918	and use mpn_hgcd_itch.
3919
39202008-09-15  Niels M�ller  <nisse@lysator.liu.se>
3921
3922	* tune/tuneup.c (tune_matrix22_mul): New function.
3923	(all): Use it.
3924
3925	* tune/common.c (speed_mpn_matrix22_mul): New function.
3926
3927	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Added matrix22_mul.c.
3928
3929	* tests/mpn/t-matrix22.c: Use MATRIX22_STRASSEN_THRESHOLD to
3930	select sizes for tests.
3931
3932	* gmp-impl.h (MATRIX22_STRASSEN_THRESHOLD): New threshold
3933
3934	* configure.in (gmp_mpn_functions): Added matrix22_mul.
3935	* gmp-impl.h: Added declarations for mpn_matrix22_mul and related
3936	functions.
3937
3938	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added
3939	matrix22_mul.c.
3940	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-matrix22.
3941
3942	* tests/mpn/t-matrix22.c: New file.
3943	* mpn/generic/matrix22_mul.c: New file.
3944
39452008-09-11  Niels M�ller  <nisse@king.swox.se>
3946
3947	* tune/tuneup.c: Updated tuning of gcdext.
3948
3949	* mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
3950	from 713 to 409.
3951
39522008-09-11  Niels M�ller  <nisse@lysator.liu.se>
3953
3954	* gmp-impl.h: Updated for gcdext changes.
3955	(GCDEXT_DC_THRESHOLD): New constant, renamed from
3956	GCDEXT_SCHOENHAGE_THRESHOLD.
3957
3958	* mpn/generic/gcdext.c (compute_v): Accept non-normalized a and b
3959	as inputs.
3960	(mpn_gcdext): Rewrote and simplified. Now uses the new mpn_hgcd
3961	interface.
3962
3963	* mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Renamed from addmul2_n
3964	and made non-static. Changed interface to take non-normalized
3965	inputs, and only two size arguments.
3966	(mpn_hgcd_matrix_mul): Simplified using new mpn_hgcd_addmul2_n.
3967
3968	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): Deleted
3969	function.
3970	(mpn_gcdext_lehmer_n): Renamed from mpn_gcd_lehmer. Now takes
3971	inputs of equal size. Moved the code for the division step to a
3972	separate function...
3973	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): New
3974	file, new function.
3975
3976	* configure.in (gmp_mpn_functions): Added gcdext_subdiv_step.
3977
39782008-09-10  Torbjorn Granlund  <tege@gmplib.org>
3979
3980	* tests/devel/anymul_1.c: Include <string.h>.
3981
3982	* gmp-h.in: Unconditionally include <cstdio>.
3983
39842008-09-10  Niels M�ller  <nisse@lysator.liu.se>
3985
3986	* tune/common.c: #if:ed out speed_mpn_gcd_binary and
3987	speed_mpn_gcd_accel.
3988	* tune/speed.c (routine): #if:ed out mpn_gcd_binary, mpn_gcd_accel
3989	and find_a.
3990	* tune/Makefile.am (libspeed_la_SOURCES): Removed gcd_bin.c
3991	gcd_accel.c gcd_finda_gen.c.
3992	* tune/tuneup.c: Enable tuning of GCD_DC_THRESHOLD.
3993
3994	* mpn/generic/gcd.c (mpn_gcd): Rewrote and simplified. Now uses
3995	the new mpn_hgcd interface.
3996
3997	* */gmp-mparam.h: Renamed GCD_SCHOENHAGE_THRESHOLD to
3998	GCD_DC_THRESHOLD.
3999
4000	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Renamed (was
4001	mpn_gcd_lehmer). Now takes inputs of equal size.
4002
4003	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer): Reintroduced gcd_2,
4004	to get better performance for small inputs.
4005
4006	* mpn/generic/hgcd.c: Don't hardcode small HGCD_THRESHOLD.
4007	* mpn/x86_64/gmp-mparam.h (HGCD_THRESHOLD): Reduced from 145 to
4008	120.
4009	* */gmp-mparam.h: Renamed HGCD_SCHOENHAGE_THRESHOLD to
4010	HGCD_THRESHOLD.
4011
40122008-09-09  Torbjorn Granlund  <tege@gmplib.org>
4013
4014	* doc/gmp.texi: Fix a typo and clarify mpn_gcdext docs.
4015
40162008-09-09  Niels M�ller  <nisse@lysator.liu.se>
4017
4018	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Adapted
4019	to new hgcd interface.
4020
4021	* gmp-impl.h (MPN_HGCD_LEHMER_ITCH): New macro.
4022
4023	* hgcd.c (mpn_hgcd_lehmer): Renamed function, from hgcd_base. Made
4024	non-static.
4025
4026	* gcd_lehmer.c (mpn_gcd_lehmer): Use hgcd2 also for n == 2.
4027
4028	* gcdext_lehmer.c (mpn_gcdext_lehmer): Simplified code for
4029	division step. Added proper book-keeping of swaps, which affect
4030	the sign of the returned cofactor.
4031
4032	* tests/mpz/t-gcd.c (one_test): Display co-factor when mpn_gcdext
4033	fails.
4034
4035	* gcd_lehmer.c (mpn_gcd_lehmer): At end of loop, need to handle
4036	the special case n == 1 correctly.
4037
4038	* gcd_subdiv_step.c (mpn_gcd_subdiv_step): Simplified function.
4039	The special cancellation logic is not needed here.
4040
40412008-09-08  Torbjorn Granlund  <tege@gmplib.org>
4042
4043	* mpn/generic/invert.c: Add working but slow code.
4044
4045	* mpn/x86_64/x86_64-defs.m4 (R32, R8): New macros.
4046
4047	* mpn/ia64/submul_1.asm: Move some labels for broader assembler
4048	compatibility.
4049
4050	* gmp-impl.h (mpn_mul_3, mpn_mul_4): Declare.
4051	* tests/tests.h (refmpn_mul_3, refmpn_mul_4): Declare.
4052	* tests/try.c (param_init): Set things up for mpn_mul_3 and mpn_mul_4.
4053	(choice_array): Likewise.
4054	(call): Likewise.
4055	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES):
4056	Add mul_3.c and mul_4.
4057	* mpn/asm-defs.m4: Define mul_3 and mul_4.
4058	* tests/refmpn.c (refmpn_mul_N): New function.
4059	(refmpn_mul_2): Remove old definition, call refmpn_mul_N.
4060	(refmpn_mul_3, refmpn_mul_4): New functions.
4061	* tune/common.c (speed_mpn_mul_3, speed_mpn_mul_4): New functions.
4062	* tune/speed.h (speed_mpn_mul_3, speed_mpn_mul_4): Declare.
4063	* tune/speed.c (routine): New entries for mpn_mul_2 and mpn_mul_3.
4064
4065	* ltmain.sh: Update to libtool 1.5.24.
4066
4067	* mpn/generic/mul_toom22.c: Compute s and t more cleverly.
4068
40692008-09-08  Niels M�ller  <nisse@lysator.liu.se>
4070
4071	* tests/mpn/t-hgcd.c: Updated tests. Rewrite of hgcd_ref.
4072
4073	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): New function.
4074	(mpn_gcdext_lehmer): Various bugfixes.
4075
4076	* gcdext.c (mpn_gcdext): Allocate scratch space for gcdext_lehmer.
4077
4078	* mpn/generic/gcd_lehmer.c (gcd_2): ASSERT that inputs are odd.
4079	(mpn_gcd_lehmer): Added tp argument, for scratch space. Make both
4080	arguments odd before calling gcd_2.
4081
4082	* mpn/generic/hgcd.c (mpn_hgcd): Allow the trivial case n <= 2,
4083	and return 0 immediately.
4084
4085	* gmp-impl.h (MPN_EXTRACT_NUMB): New macro.
4086
4087	* configure.in (gmp_mpn_functions): Added gcdext_lehmer.
4088
40892008-09-05  Torbjorn Granlund  <tege@gmplib.org>
4090
4091	* mpn/generic/toom_interpolate_7pts.c: Use mpn_divexact_by3c instead of
4092	divexact_odd.
4093
4094	* doc/texinfo.tex: Update to 2007-06-29.13.
4095
4096	* doc/gmp.texi: Update GMP site URL.  Fix some typos.
4097
4098	* demos/pexpr.c (main): Allow bases up to 62.
4099
4100	* gmp-impl.h: Remove formal parameter names from function prototypes.
4101
4102	* config.guess: Recognize recent AMD and Itanium CPUs.
4103	Default X86 CPU recognition to configfsf.guess' value.
4104
4105	* configure.in: Handle core2 separately from athlon64.
4106
41072008-09-05  Niels M�ller  <nisse@lysator.liu.se>
4108
4109	* */Makefile.in, configure, aclocal.m4, config.in: Removed files
4110	from repository. They're instead generated by automake and
4111	autoconf before distribution.
4112
41132008-08-25  Torbjorn Granlund  <tege@gmplib.org>
4114
4115	* mpf/set_str.c: Allocate mantissa space based on mantissa size,
4116	not on destination variable space.
4117	* mpf/set_str.c: Accept unary plus before exponent.
4118
41192008-08-06  Torbjorn Granlund  <tege@gmplib.org>
4120
4121	* mpn/generic/mul_toom22.c: Add statistics gathering functionality,
4122	triggered by cpp predef STAT.
4123
4124	From David Harvey:
4125	* mpn/generic/mul_toom22.c: Decrease scratch space usage.
4126
41272008-08-02  Torbjorn Granlund  <tege@gmplib.org>
4128
4129	* tests/misc/t-scanf.c: Avoid negative arguments to _ui functions.
4130	* tests/misc/t-printf.c: Likewise.
4131
4132	* acinclude.m4 (X86_PATTERN): Add geode.
4133
4134	* acinclude.m4 (CL_AS_NOEXECSTACK): Avoid -q flag to grep.
4135
41362008-08-01  Torbjorn Granlund  <tege@gmplib.org>
4137
4138	* acinclude.m4 (CL_AS_NOEXECSTACK): New.
4139	* configure.in: Use CL_AS_NOEXECSTACK.
4140	* mpn/Makeasm.am: Use ASM_FLAGS (defined by CL_AS_NOEXECSTACK).
4141
4142	* gmpxx.h (__GMP_DBL_LIMBS): Use DBL_MAX_EXP instead of
4143	std::numeric_limits<double>::max_exponent for better portability.
4144
41452008-07-29  Torbjorn Granlund  <tege@gmplib.org>
4146
4147	* gmpxx.h (__GMP_DBL_LIMBS): New #define.
4148	(__GMP_ULI_LIMBS): New #define.
4149	(__GMPXX_TMP_UI): New macro.
4150	(__GMPXX_TMP_SI): New macro.
4151	(__GMPXX_TMP_D): New macro.
4152	(struct __gmp_binary_and): Rewrite, using the new macros.
4153	(struct __gmp_binary_ior): Likewise.
4154	(struct __gmp_binary_xor): Likewise.
4155
41562008-07-28  Torbjorn Granlund  <tege@gmplib.org>
4157
4158	* tests/cxx/t-binary.cc: Add some tests for logical operations.
4159
41602008-07-24  Torbjorn Granlund  <tege@gmplib.org>
4161
4162	* gmpxx.h: Use __GMPZ_* instead of __GMPZZ_* for bitwise ops, remove
4163	__GMPZZ_*.
4164	Remove repeated #undefs.
4165	(__gmp_alloc_cstring): Declare freefunc as extern "C".
4166
41672008-07-23  Torbjorn Granlund  <tege@gmplib.org>
4168
4169	* gmp-h.in (__GMP_CC): New define, undocumented for now.
4170	(__GMP_CFLAGS): Likewise.
4171
41722008-07-21  Torbjorn Granlund  <tege@gmplib.org>
4173
4174	* tests/amd64check.c: Fix a printf type clash.
4175
4176	* mpz/realloc.c: Amend last fix.
4177
4178	* gmp-h.in: Include <cstdlib> for C++.
4179	* gmp-h.in: Handle new gcc 4.3 inline semantics defaults.
4180
4181	* configfsf.guess: Update to version of 2008-04-14.
4182	* configfsf.sub: Update to version of 2008-06-16.
4183
4184	* configure.in: Separate core2 and athlon64 flags handling.
4185
41862008-06-19  Torbjorn Granlund  <tege@gmplib.org>
4187
4188	* config.guess: Recognize pentiumm and AMD geode.
4189	* config.sub: Likewise.
4190	* configure.in: Likewise.
4191
41922008-06-02  Torbjorn Granlund  <tege@gmplib.org>
4193
4194	* configure.in: Disallow odd nails sizes.
4195	* configure.in: Inherit default gcc_cflags/gcc_64_cflags everywhere.
4196
41972008-05-23  Torbjorn Granlund  <tege@gmplib.org>
4198
4199	* mpz/init2.c: Rewrite to avoid internal overflow and to detect mpz_t
4200	overflow.
4201	* mpz/realloc2.c: Likewise.
4202	* mpz/realloc.c: Detect mpz_t overflow.
4203
42042008-05-22  Torbjorn Granlund  <tege@gmplib.org>
4205
4206	* configure.in (sparc): Remove -fast, it causes documented
4207	miscompilation.
4208
4209	* config.guess: Properly handle the "extended" variants of x86 cpuid.
4210
42112008-05-09  Torbjorn Granlund  <tege@gmplib.org>
4212
4213	* gmp-impl.h (mpn_mul_fft): Now void.
4214	(udiv_qrnnd_preinv3): Special case for constant (nl).
4215
42162008-05-08  Torbjorn Granlund  <tege@gmplib.org>
4217
4218	* mpn/generic/mul_fft.c: Clean up types in TRACE (printf (...)).
4219	(TRACE): Redefine to allow command line control.
4220	(mpn_mul_fft_internal): Now void, remove return value.
4221	(mpn_mul_fft): Likewise.
4222	(MPN_FFT_TABLE2_SIZE): Up size fro 256 to 512.
4223	(mpn_fft_fft): Call mpn_fft_mul_2exp_modF just once instead of twice,
4224	then add/subtract result.  Get rid of temp allocation as a result.
4225	Remove some redundant CNST_LIMB.
4226	(mpn_fft_fftinv): Analogous changes.
4227	(mpn_fft_sub_modF): Re-enable, now needed by mpn_fft_fft and
4228	mpn_fft_fftinv.
4229
42302008-03-10  Torbjorn Granlund  <tege@gmplib.org>
4231
4232	* tests/mpz/t-mul.c (main): Let GMP_CHECK_FFT mean largest allowed
4233	power-of-2 of test operands.
4234
42352008-02-28  Torbjorn Granlund  <tege@gmplib.org>
4236
4237	* tests/cxx/t-binary.cc (check_mpz): Expect floor rounding for right
4238	shift.
4239
42402008-02-27  Torbjorn Granlund  <tege@gmplib.org>
4241
4242	* mpz/mul_i.h: Check sml's size (not the signed small_mult).
4243
4244	* longlong.h (umul_ppmm) [alpha]: Define using __builtin_alpha_umulh
4245	when possible.
4246
4247	* longlong.h (count_trailing_zeros): Force destination register mode.
4248
4249	* gmpxx.h (struct __gmp_binary_rshift): Use floor rounding, not
4250	truncation.
4251
4252	* gmpxx.h (__gmp_binary_and, __gmp_binary_ior, __gmp_binary_xor):
4253	Add variants with unsigned long int argument.
4254
4255	* config.sub: Recog geode.
4256	* config.guess: Likewise.
4257	* acinclude.m4 (X86_PATTERN): Likewise.
4258
42592008-02-10  Torbjorn Granlund  <tege@gmplib.org>
4260
4261	* mpn/x86/p6/aors_n.asm: Use Zdisp to work around GNU as bug.
4262	* mpn/x86/x86-defs.m4 (Zdisp): Add more instructions.
4263
42642008-02-08  Torbjorn Granlund  <tege@gmplib.org>
4265
4266	* mpn/x86_64/aors_n.asm: New file.
4267	* mpn/x86_64/add_n.asm: Delete.
4268	* mpn/x86_64/sub_n.asm: Delete.
4269
42702008-02-07  Torbjorn Granlund  <tege@gmplib.org>
4271
4272	* mpn/x86/k6/mmx/dive_1.asm: Fix typo in last change.
4273
42742007-12-10  Torbjorn Granlund  <tege@swox.com>
4275
4276	* mpf/set_str.c (mpf_set_str): Write own code for converting the
4277	exponent, avoids strtol base < 36 limitation.
4278
42792007-10-28  Torbjorn Granlund  <tege@swox.com>
4280
4281	* gmp-impl.h (mpn_dc_get_str_itch): New macro.
4282	(mpn_dc_get_str_powtab_alloc): New macro.
4283	(struct powers): Add field "shift".
4284
4285	* mpn/generic/get_str.c: Compute powers without low zero limbs; all
4286	functions modified.  Correct temporary allocation.  Misc cleanups.
4287
4288	* mpn/generic/set_str.c: Compute powers without low zero limbs; all
4289	functions modified.
4290	(mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
4291
42922007-10-26  Torbjorn Granlund  <tege@swox.com>
4293
4294	* mpn/generic/set_str.c: Remove default thresholds, not in gmp-impl.h.
4295	(mpn_dc_set_str): Insert ASSERT_ALWAYS in a presumably dead code arm.
4296
42972007-10-22  Torbjorn Granlund  <tege@swox.com>
4298
4299	* gmp-impl.h (mpn_add_nc): Define as inline function, unless NATIVE.
4300	(mpn_sub_nc): Likewise.
4301
43022007-10-17  Torbjorn Granlund  <tege@swox.com>
4303
4304	* tests/misc/t-printf.c: Fix a printf type clash.
4305	* tests/mpq/t-get_str.c: Likewise.
4306	* tests/mpz/t-import.c: Likewise.
4307
4308	* acinclude.m4: Conditionally disable some tests when compiled by a C++
4309	compiler.
4310
4311	* gmp-impl.h (udiv_qrnnd_preinv3): Remove an unused variable.
4312
4313	* mpn/generic/hgcd.c: Add some WANT_ASSERTs to shut up warnings.
4314
43152007-10-08  Torbjorn Granlund  <tege@swox.com>
4316
4317	* mpn/powerpc64/elf.m4 (LEAL): Define as an alias for LEA.
4318	* mpn/powerpc32/darwin.m4 (LEAL): Likewise.
4319	* mpn/powerpc64/aix.m4: Likewise.
4320
4321	* mpn/powerpc64/vmx/popcount.asm: Use LEAL.
4322
4323	* mpn/powerpc64/darwin.m4 (LEAL): New name for LEA, since it is only
4324	usable for local symbols.
4325	(LEA): Replace with code for external references.
4326
4327	* mpn/powerpc32/vmx/mod_34lsub1.asm: Use LEAL.
4328
43292007-10-07  Torbjorn Granlund  <tege@swox.com>
4330
4331	* mpn/x86/dive_1.asm: Use LEA, remove explicit movl_eip_*.
4332	* mpn/x86/k6/mode1o.asm: Likewise.
4333	* mpn/x86/k6/mmx/dive_1.asm: Likewise.
4334	* mpn/x86/k7/dive_1.asm: Likewise.
4335	* mpn/x86/k7/mode1o.asm: Likewise.
4336	* mpn/x86/p6/dive_1.asm: Likewise.
4337	* mpn/x86/p6/mode1o.asm: Likewise.
4338	* mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
4339	* mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
4340	* mpn/x86/pentium4/sse2/popcount.asm: Likewise.
4341
4342	* mpn/x86/p6/aors_n.asm: Table cycle counts.
4343
4344	* mpn/x86/k7/mod_34lsub1.asm: Fix over-optimistic cycle count claims.
4345
4346	* mpn/x86/x86-defs.m4 (DEF_OBJECT, END_OBJECT): New define's.
4347
4348	* mpn/x86/darwin.m4 (LEA): Put also movl_eip_XX into EPILOGUE_cpu.
4349	Expect target register to have prepended %.
4350
4351	* mpn/x86_64/add_n.asm: Use L() for labels.
4352	* mpn/x86_64/addlsh1_n.asm: Likewise.
4353	* mpn/x86_64/addmul_2.asm: Likewise.
4354	* mpn/x86_64/aorrlsh_n.asm: Likewise.
4355	* mpn/x86_64/aorsmul_1.asm: Likewise.
4356	* mpn/x86_64/com_n.asm: Likewise.
4357	* mpn/x86_64/copyd.asm: Likewise.
4358	* mpn/x86_64/copyi.asm: Likewise.
4359	* mpn/x86_64/diveby3.asm: Likewise.
4360	* mpn/x86_64/logops_n.asm: Likewise.
4361	* mpn/x86_64/lshsub_n.asm: Likewise.
4362	* mpn/x86_64/mul_1.asm: Likewise.
4363	* mpn/x86_64/mul_2.asm: Likewise.
4364	* mpn/x86_64/mul_basecase.asm: Likewise.
4365	* mpn/x86_64/popham.asm: Likewise.
4366	* mpn/x86_64/redc_1.asm: Likewise.
4367	* mpn/x86_64/rsh1add_n.asm: Likewise.
4368	* mpn/x86_64/rsh1sub_n.asm: Likewise.
4369	* mpn/x86_64/rshift.asm: Likewise.
4370	* mpn/x86_64/sub_n.asm: Likewise.
4371	* mpn/x86_64/sublsh1_n.asm Likewise.
4372	* mpn/x86_64/pentium4/aors_n.asm: Likewise.
4373	* mpn/x86_64/pentium4/lshift.asm: Likewise.
4374	* mpn/x86_64/pentium4/rshift.asm: Likewise.
4375
4376	* mpn/x86_64/x86_64-defs.m4: New file, defining LEA, DEF_OBJECT, and
4377	END_OBJECT.
4378
4379	* mpn/generic/mul.c: Put TMP_DECL as last decl.
4380
43812007-10-06  Torbjorn Granlund  <tege@swox.com>
4382
4383	* mpn/x86/pentium4/sse2/popcount.asm: New file.
4384
43852007-09-26  Torbjorn Granlund  <tege@swox.com>
4386
4387	* mpz/get_str.c: Cast a char index to int to shut up compilers.
4388
4389	* mpn/generic/dc_div_qr.c: Pass dummy scratch argument to mpn_invert.
4390	* mpn/generic/dc_divappr_q.c: Likewise.
4391	* mpn/generic/mu_div_qr.c: Likewise.
4392	* mpn/generic/mu_divappr_q.c: Likewise.
4393	* mpn/generic/mu_div_q.c: Likewise.
4394	* mpn/generic/divexact.c: Likewise.
4395
4396	* mpn/generic/invert.c: New file, placeholder for now.
4397
43982007-09-24  Torbjorn Granlund  <tege@swox.com>
4399
4400	* mpn/generic/toom_interpolate_5pts.c: New file, contents from
4401	mpn/generic/mul_n.c
4402	* mpn/generic/mul_n.c (mpn_toom3_interpolate): Function removed.
4403
4404	* mpn/generic/toom_interpolate_7pts.c: New file.
4405
4406	* mpn/x86/k7/mmx/popham.asm: Table cycle counts.
4407
4408	* mpn/x86/k6/README: Update URLs.
4409
4410	* mpn/powerpc32/README: Update URL's, company names.
4411
4412	* mpn/generic/get_d.c: Complete rewrite.
4413
4414	* mpn/generic/mul_toom33.c: New file.
4415
4416	* mpn/generic/mul_toom22.c: Make orthogonal with other toomXY files.
4417	* mpn/generic/mul_toom32.c: Likewise.
4418	* mpn/generic/mul_toom42.c: Likewise.
4419
4420	* mpn/alpha/invert_limb.asm: Update cycle counts.  Fix a comment typo.
4421
4422	* mpf/get_str.c: Include stdlib.h, not stdio.h for NULL.
4423
4424	* doc/gmp.texi: Fix a typo.
4425
4426	* memory.c (__gmp_default_allocate, __gmp_default_reallocate):
4427	Cast size operands in error fprintf's.
4428
4429	* longlong.h (sub_ddmmss) [powerpc 64]: Add more variants for constant
4430	args.
4431
4432	* gmp-impl.h (udiv_qrnnd_preinv3): New define.
4433	* gmp-impl.h (ULONG_PARITY): Exclude masquerading __INTEL_COMPILER from
4434	ia64 asm.
4435
4436	* gmp-h.in (mpn_neg_n): New function.
4437
44382007-09-18  Torbjorn Granlund  <tege@swox.com>
4439
4440	* demos/pexpr.c (main): Add -v option.
4441	(enum op_t): New tag TIMING.
4442	(mpz_eval_expr): Execute TIMING.
4443	(fns): Add TIMING entry.
4444
4445	* gmp-impl.h: Add decls and THRESHOLDs for new toom multiplication
4446	functions and division functions.
4447
44482007-09-10  Torbjorn Granlund  <tege@swox.com>
4449
4450	* mpn/powerpc32/addlsh1_n.asm: Use L() for labels.
4451	* mpn/powerpc32/sublsh1_n.asm: Likewise.
4452
44532007-09-09  Torbjorn Granlund  <tege@swox.com>
4454
4455	* mpn/x86/x86-defs.m4 (LEA): New define.
4456	* mpn/x86/darwin.m4: New file, for now just defining LEA.
4457	* configure.in: Pick up x86/darwin.m4.
4458	* mpn/x86/*: Use LEA for PIC references.
4459
4460	* configure.in: For X86/32, treat core2 like pentium3.
4461
44622007-09-06  Torbjorn Granlund  <tege@swox.com>
4463
4464	* tests/amd64check.c (calling_conventions_values): Put constants,
4465	dynamic values in this array (was in scalars).
4466	(calling_conventions_check): Corresponding changes.
4467	* tests/amd64call.asm: Rewrite to be PIC, smaller, using amd64check.c's
4468	array.
4469
44702007-09-04  Torbjorn Granlund  <tege@swox.com>
4471
4472	* mpn/x86/pentium4/sse2/mul_basecase.asm: Misc cleanups.
4473	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
4474
4475	* mpn/x86_64/mod_34lsub1.asm: Optimize loop, reduce code size.
4476
4477	* tests/amd64call.asm: Remove bogus no-op moves.
4478
44792007-09-03  Torbjorn Granlund  <tege@swox.com>
4480
4481	From Richard Guenther:
4482	* gmp-h.in (__GMP_EXTERN_INLINE): Declare conditionally on
4483	__GNUC_STDC_INLINE__.
4484
4485	* tests/cxx/t-locale.cc: #include <cstdlib>, for abort.
4486
4487	* mpn/x86_64/core2/popcount.asm: New file.
4488	* mpn/x86_64/pentium4/popcount.asm: New file.
4489
4490	* mpn/x86_64/addmul_2.asm: New file.
4491	* mpn/x86_64/mul_2.asm: New file.
4492
4493	* mpn/x86_64/aorsmul_1.asm: Use 32-bit mov for zeroing registers
4494	(saves space).
4495
44962007-09-01  Torbjorn Granlund  <tege@swox.com>
4497
4498	* configure.in: Handle athlon64, core2, and pentium4 separately for
4499	64-bit ABI.
4500
4501	* config.sub: Recog athlon64, core2, and opteron.
4502
4503	* config.guess: Do two x86 variants, for 32-bit ABI and 64-bit ABI.
4504	Return "athlon64" and "core2", not x86_64.
4505
45062007-08-31  Torbjorn Granlund  <tege@swox.com>
4507
4508	From Patrick Pelissier:
4509	* gmp-h.in: Don't refer to FILE from C++ unless we've seen FILE.
4510
45112007-08-30  Torbjorn Granlund  <tege@swox.com>
4512
4513	* demos/isprime.c: Include string.h for strcmp.
4514
4515	* demos/factorize.c (main): Declare to int.
4516
45172007-06-22  Torbjorn Granlund  <tege@swox.com>
4518
4519	* mpn/x86_64/pentium4/lshift.asm: Minor tuning.
4520	* mpn/x86_64/pentium4/rshift.asm: Likewise.
4521
45222007-05-30  Torbjorn Granlund  <tege@swox.com>
4523
4524	* mpn/powerpc64/mode64/aors_n.asm: Add _nc entry points.
4525
45262007-05-22  Torbjorn Granlund  <tege@swox.com>
4527
4528	* tests/memory.c: Cast calls to new mem* calls to avoid unaligned ops.
4529
45302007-05-16  Torbjorn Granlund  <tege@swox.com>
4531
4532	* tests/mpz/convert.c: Tweak operand sizes for best coverage.
4533
4534	* tests/memory.c: Add red zones around allocations.
4535
45362007-05-15  Torbjorn Granlund  <tege@swox.com>
4537
4538	* mpn/ia64/mul_1.asm: Make mul_1c entry point actually work.
4539
4540	* mpn/generic/set_str.c (mpn_dc_set_str): Avoid calling mpn_add_n when
4541	ln == 0.
4542
4543	* tests/mpz/convert.c (string_urandomb): New function.
4544	(main): Use it by enabling ifdef'ed out code.
4545
45462007-04-30  Torbjorn Granlund  <tege@swox.com>
4547
4548	* mpn/x86_64/mul_basecase.asm: Complete rewrite.
4549
4550	* mpn/x86_64/copyi.asm: Use short shift-by-one form.  Misc cleanups.
4551	* mpn/x86_64/copyi.asm: Likewise.
4552	* mpn/x86_64/popham.asm: Likewise.
4553
4554	* mpn/x86_64/aorsmul_1.asm: Cleanup formatting.
4555
45562007-04-25  Torbjorn Granlund  <tege@swox.com>
4557
4558	* mpz/divexact.c: Handle undefined case of |N| < |D| to avoid segfaults.
4559
45602007-02-24  Torbjorn Granlund  <tege@swox.com>
4561
4562	* doc/gmp.texi (Toom 3-Way Multiplication): Fix typo.
4563	(mpz_scan0, mpz_scan1): Fix typos.
4564	(Float Internals): Rewrite paragraph about struct types.
4565
45662007-02-12  Torbjorn Granlund  <tege@swox.com>
4567
4568	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Complete rewrite (except
4569	diagonal code).
4570
45712007-02-05  Torbjorn Granlund  <tege@swox.com>
4572
4573	* mpn/generic/mul_fft.c (mpn_fft_fft): New name for mpn_fft_fft_sqr,
4574	old mpn_fft_fft removed.
4575	(mpn_mul_fft_internal): Call mpn_fft_fft separately for each operand.
4576	(mpn_fft_add_modF): Rewrite to avoid random branches.
4577	(mpn_fft_sub_modF): Likewise.
4578
4579	* mpn/x86/pentium4/sse2/addmul_1.asm: Complete rewrite.
4580	* mpn/x86/pentium4/sse2/mul_1.asm: Complete rewrite.
4581	* mpn/x86/pentium4/sse2/mul_basecase.asm: Complete rewrite, based on
4582	new addmul and mul code.
4583
45842007-01-31  Torbjorn Granlund  <tege@swox.com>
4585
4586	* mpn/generic/get_str.c (mpn_sb_get_str): Get loop count for frac
4587	development right.
4588
4589	* mpn/powerpc32/vmx/mod_34lsub1.asm: New file.
4590
4591	* mpn/powerpc32/aors_n.asm: New file, complete rewrite.
4592	* mpn/powerpc32/add_n.asm: Remove.
4593	* mpn/powerpc32/sub_n.asm: Remove.
4594
45952007-01-25  Torbjorn Granlund  <tege@swox.com>
4596
4597	* mpn/x86_64/core2/aors_n.asm: Add _nc entry points, minor cleanups.
4598
4599	* mpn/x86_64/core2/lshift.asm: Rewrite.
4600	* mpn/x86_64/core2/rshift.asm: Rewrite.
4601
4602	* mpn/x86_64/pentium4/lshift.asm: Swap some loop insns for a small
4603	speedup.
4604	* mpn/x86_64/pentium4/rshift.asm: New file, based on lshift.asm.
4605
4606	* mpn/x86_64/pentium4/gmp-mparam.h: New file.
4607
4608	* mpn/x86_64/pentium4/aors_n.asm: Complete rewrite of add/subtract
4609	code.
4610	* mpn/x86_64/pentium4/add_n.asm: Remove.
4611	* mpn/x86_64/pentium4/sub_n.asm: Remove.
4612
46132007-01-20  Torbjorn Granlund  <tege@swox.com>
4614
4615	* mpn/x86_64/lshift.asm: Add special case for cnt=1.
4616
46172007-01-19  Torbjorn Granlund  <tege@swox.com>
4618
4619	* mpn/x86_64/aorsmul_1.asm: New file, written from scratch, finally at
4620	3.0 c/l on K8 (addmul_1 was 3.3; submul_1 was 3.5).
4621	* mpn/x86_64/addmul_1.asm: Remove.
4622	* mpn/x86_64/submul_1.asm: Remove.
4623
46242006-12-29  Torbjorn Granlund  <tege@swox.com>
4625
4626	* randmt.c (__gmp_randclear_mt): Initialize ALLOC field, like in
4627	__gmp_randinit_mt_noseed.
4628	(__gmp_randclear_mt, __gmp_randinit_mt_noseed): Make similar functions
4629	look similar.
4630	(__gmp_randclear_mt): Pass actually allocated size.
4631
4632	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mul_toom22.c,
4633	mul_toom32.c, mul_toom42.c.
4634
4635	* configure.in: Recognize athlon64 and core2 as alternatives to x86_64.
4636	Provide special settings for core2.
4637
4638	* configure.in (gmp_mpn_functions): Add mul_toom22, mul_toom32,
4639	mul_toom42.
4640
4641	* mpn/generic/mul_toom22.c: New file.
4642	* mpn/generic/mul.c: Use mpn_mul_toom22.  Trim cutoff points between
4643	the mpn_mul_toomN2 functions.  Handle balanced operands at function
4644	entry.
4645
46462006-12-29  Marco Bodrato  <bodrato@mail.dm.unipi.it>
4647
4648	* mpn/generic/mul_n.c: Rewrite interpolation code.
4649
46502006-12-28  Torbjorn Granlund  <tege@swox.com>
4651
4652	* mpn/generic/mul_toom32.c: New file.
4653	* mpn/generic/mul_toom42.c: New file.
4654	* mpn/generic/mul.c: Use mpn_mul_toom32 and mpn_mul_toom42 for
4655	unbalanced operands.
4656
46572006-12-17  Torbjorn Granlund  <tege@swox.com>
4658
4659	* mpn/x86_64/aorrlsh_n.asm: New file.
4660	* mpn/x86_64/lshsub_n.asm: New file.
4661
4662	* mpn/x86_64/core2/aors_n.asm: New file.
4663	* mpn/x86_64/core2/lshift.asm: New file.
4664	* mpn/x86_64/core2/rshift.asm: New file.
4665
4666	* mpn/x86/p6/aors_n.asm: Replace K7 grabbing code with P6 specific
4667	code.
4668
4669	* mpn/x86/p6/lshsub_n.asm: New file.
4670
46712006-11-23  Torbjorn Granlund  <tege@swox.com>
4672
4673	* tune/speed.h (SPEED_ROUTINE_MPN_MUL_BASECASE): Allocate space for xp
4674	locally, s->xp might be insufficient.
4675
46762006-11-22  Torbjorn Granlund  <tege@swox.com>
4677
4678	* randmt.c (__gmp_randinit_mt_noseed): Initialize ALLOC field of result
4679	param.
4680
46812006-11-06  Torbjorn Granlund  <tege@swox.com>
4682
4683	* tune/set_strp.c: New file.
4684
46852006-11-04  Torbjorn Granlund  <tege@swox.com>
4686
4687	* extract-dbl.c: Rewrite to handle nails better, and for general
4688	optimization.
4689
4690	* mpz/bin_uiui.c: Simplify.
4691
4692	* longlong.h (umul_ppmm) [mmix]: New.
4693
4694	* tune/tuneup.c, tune/common.c, tune/speed.c, tune/speed.h,
4695	tune/set_strb.c, tune/set_strs.c: Add tuning and speed measurements
4696	of separate SET_STR_DC_THRESHOLD and SET_STR_PRECOMPUTE_THRESHOLD.
4697	Add tuning and speed measurement of mpn_addsub_n.
4698
46992006-10-31  Torbjorn Granlund  <tege@swox.com>
4700
4701	* gmpxx.h: Remove ternary stuff, it is hardly an optimization and it
4702	writes to destination before reading all source operands.
4703
47042006-10-25  Torbjorn Granlund  <tege@swox.com>
4705
4706	* mpn/generic/set_str.c: Complete rewrite.
4707	* mpn/generic/get_str.c: Likewise.
4708
4709	* gmp-impl.h (struct powers, powers_t): New types.
4710	Restructure GET_STR_* and SET_STR_* thresholds.
4711
47122006-09-21  Torbjorn Granlund  <tege@swox.com>
4713
4714	* mpn/generic/rootrem.c: Remove some redundant casts.
4715
47162006-07-12  Torbjorn Granlund  <tege@swox.com>
4717
4718	* mpn/alpha/ev6/nails/addmul_2.asm: Make it run at claimed speed.
4719	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
4720
4721	* mpf/get_str.c: Avoid copying result when not needed.  Misc cleanups.
4722
4723	* tests/amd64call.asm: Use jmp instead of jmpq to placate Solaris.
4724
47252006-06-30  Torbjorn Granlund  <tege@swox.com>
4726
4727	* configure.in (powerpc-*): Remove repeated path component.
4728
47292006-06-15  Torbjorn Granlund  <tege@swox.com>
4730
4731	* configure.in: (ia64-*-linux*): Don't use -O3.
4732
47332006-06-14  Torbjorn Granlund  <tege@swox.com>
4734
4735	* mpq/get_str.c: Fix upper base limit boundary in an ASSERT.
4736
4737	* tests/refmpn.c (refmpn_sb_divrem_mn): Use ASSERT_CARRY for add-back.
4738
47392006-05-31  Torbjorn Granlund  <tege@swox.com>
4740
4741	* tests/mpz/t-set_d.c (check_data): Add more data points.
4742
4743	* mpz/set_d.c: Handle negative return values from __gmp_extract_double.
4744
47452006-05-17  Torbjorn Granlund  <tege@swox.com>
4746
4747	* configure.in: Clear out gcc_cflags_cpu and gcc_cflags_arch for a fat
4748	build.
4749
47502006-05-16  Torbjorn Granlund  <tege@swox.com>
4751
4752	* demos/primes.c (find_primes): Increase mpz_probab_prime_p cnt to 10.
4753
4754	* mpn/generic/addsub_n.c: Fix criteria form when to call _nc functions.
4755
47562006-05-12  Torbjorn Granlund  <tege@swox.com>
4757
4758	* config.guess: Recognize more ppc processor types.
4759
47602006-05-11  Torbjorn Granlund  <tege@swox.com>
4761
4762	* tune/speed.c (usage): Update URL for gnuplot and quickplot.
4763
47642006-05-10  Torbjorn Granlund  <tege@swox.com>
4765
4766	* configure.in (powerpc-*-*): Pass -maltivec to assembler for
4767	appropriate CPUs.
4768
47692006-05-08  Torbjorn Granlund  <tege@swox.com>
4770
4771	* mpn/powerpc32/aix.m4 (LEA): Remove [RW] attribute.
4772
47732006-05-03  Torbjorn Granlund  <tege@swox.com>
4774
4775	* mpn/powerpc64/vmx/popcount.asm: Conditionally zero extend n.
4776
47772006-04-27  Torbjorn Granlund  <tege@swox.com>
4778
4779	* mpz/divexact.c: Call mpz_tdiv_q for large operands.
4780
4781	* configure.in (powerpc-*-darwin): Remove -fast, it affects PIC.
4782
47832006-04-26  Torbjorn Granlund  <tege@swox.com>
4784
4785	* config.guess: Try to recognize Ultrasparc T1 (as ultrasparct1).
4786	* config.sub: Handle ultrasparct1.
4787
47882006-04-25  Torbjorn Granlund  <tege@swox.com>
4789
4790	* mpn/sparc64/gmp-mparam.h: Retune, without separation of GNUC and
4791	non-GNUC data.
4792
47932006-04-20  Torbjorn Granlund  <tege@swox.com>
4794
4795	* tests/mpz/convert.c: Increase operands range.
4796
47972006-04-19  Torbjorn Granlund  <tege@swox.com>
4798
4799	* configure.in: Support powerpc eABI.
4800	* mpn/powerpc32/eabi.m4: New file.
4801
4802	* configure.in: Support powerpc *bsd.
4803	* mpn/powerpc64/elf.m4: New name for mpn/powerpc64/linux64.m4.
4804	* mpn/powerpc32/elf.m4: New name for mpn/powerpc32/linux.m4.
4805
4806	* mpn/powerpc64/linux64.m4 (ASM_END): Quote TOC_ENTRY.
4807
48082006-04-18  Torbjorn Granlund  <tege@swox.com>
4809
4810	* configure.in (gmp_mpn_functions_optional): Add lshiftc.
4811	(HAVE_NATIVE): Add lshiftc.
4812
4813	* mpn/powerpc64/mode64/invert_limb.asm: Use LEA, not LDSYM.
4814	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
4815	* mpn/powerpc64/mode64/dive_1.asm: Likewise.
4816
4817	* mpn/powerpc64/linux64.m4 (TOC_ENTRY): Define to empty.
4818	* mpn/powerpc64/aix.m4 (TOC_ENTRY): Likewise.
4819	* mpn/powerpc32/aix.m4 (TOC_ENTRY): Likewise.
4820
4821	* mpn/powerpc32/aix.m4 (EXTERN): New, copied form powerpc64/aix.m4.
4822	* mpn/powerpc32/mode1o.asm: Use EXTERN.
4823	* mpn/powerpc32/linux.m4 (EXTERN): Provide dummy definition.
4824	* mpn/powerpc32/darwin.m4 (EXTERN): Likewise.
4825
48262006-04-13  Torbjorn Granlund  <tege@swox.com>
4827
4828	* mpn/generic/mul_fft.c: Use new thresholds mechanism if MUL_FFT_TABLE2
4829	is defined.
4830	(mpn_lshiftc): New name for mpn_lshift_com (for consistency with some
4831	stuff already in 4.1.4.
4832	(mpn_fft_mul_2exp_modF): Reorganize initial operand reductions to avoid
4833	divisions.
4834
4835	* tests/devel/try.c (choice_array): Add mpn_addsub_n[c].
4836
48372006-04-11  Torbjorn Granlund  <tege@swox.com>
4838
4839	* aclocal.m4: Regenerate with patched libtool.
4840
4841	* mpn/asm-defs.m4 (ASM_END): Provide (empty) default.
4842
48432006-04-08  Torbjorn Granlund  <tege@swox.com>
4844
4845	* configure.in (gmp_mpn_functions_optional): Add addsub.
4846
4847	* gmpxx.h: Remove missed MPFR references.
4848
4849	* gmp-impl.h (LIMBS_PER_DOUBLE): Adjust formula to not be pessimistic.
4850
4851	* gmp-impl.h (TMP_*, WANT_TMP_DEBUG): Don't expect marker argument;
4852	define TMP_SALLOC and TMP_BALLOC.
4853
4854	* mpn/minithres/gmp-mparam.h: New file.
4855
4856	* tests/mpz/t-io_raw.c: Fix printf type/arg mismatches.
4857	* tests/mpz/t-export.c: Likewise.
4858	* tests/mpz/io.c: Likewise.
4859	* tests/t-constants.c: Likewise.
4860
4861	* mpn/ia64/popcount.asm: Append "cond.dptk" to conditional branches to
4862	placate icc.
4863	* mpn/ia64/hamdist.asm: Likewise.
4864	* mpn/ia64/lorrshift.asm: Likewise.
4865	* mpn/ia64/dive_1.asm: Likewise.
4866
48672006-04-05  Torbjorn Granlund  <tege@swox.com>
4868
4869	* tal-notreent.c (__gmp_tmp_mark): Add "struct" tag for tmp_marker.
4870	(__gmp_tmp_free): Likewise.
4871
4872	* mpn/generic/mul_fft.c: Optimize many scalar divisions and mod
4873	operations into masks and shifts.
4874	(mpn_fft_mul_modF_K): Fix a spurious ASSERT_NOCARRY.
4875
48762006-03-26  Torbjorn Granlund  <tege@swox.com>
4877
4878	* Version 4.2 released.
4879
4880	* mpn/powerpc64/aix.m4 (LEA): Renamed from LDSYM.
4881	* mpn/powerpc64/darwin.m4: Likewise.
4882	* mpn/powerpc64/linux64.m4: Likewise.
4883	* mpn/powerpc64/vmx/popcount.asm: Use LEA, not LDSYM.
4884
48852006-03-23  Torbjorn Granlund  <tege@swox.com>
4886
4887	* gmp-impl.h: (class gmp_allocated_string): Prefix strlen with std::.
4888
4889	* gmpxx.h (__GMP_DEFINE_TERNARY_EXPR2): Remove for now.
4890	(struct __gmp_ternary_addmul2): Likewise.
4891	(struct __gmp_ternary_submul2): Likewise.
4892
4893	* gmpxx.h: #include <cstring>.
4894	(struct __gmp_alloc_cstring): Prefix strlen with std::.
4895
4896	* mpn/x86/pentium/com_n.asm: Add TEXT and ALIGN.
4897	* mpn/x86/pentium/copyi.asm: Likewise.
4898	* mpn/x86/pentium/copyd.asm: Likewise.
4899
49002006-03-22  Torbjorn Granlund  <tege@swox.com>
4901
4902	* gmp-h.in: Add a "using std::FILE" for C++.
4903	(_GMP_H_HAVE_FILE): Check also _ISO_STDIO_ISO_H.
4904
4905	* gmpxx.h: Remove mpfr code.
4906	* tests/cxx: Likewise.
4907
4908	* gmp-impl.h (FORCE_DOUBLE): Rename a tempvar to avoid a clash with
4909	GNU/Linux public include file.
4910
4911	* configure.in (powerpc64, darwin): New optional, gcc_cflags_subtype.
4912	Grab powerpc32/darwin.m4 for ABI=mode32.
4913
4914	* configure.in: Use host_cpu whenever just the cpu type is needed.
4915
49162006-03-08  Torbjorn Granlund  <tege@swox.com>
4917
4918	* mpz/get_si.c: Fix a typo.
4919
4920	* tests/mpq/t-get_d.c (check_random): Improve random generation for
4921	nails.
4922
49232006-02-28  Torbjorn Granlund  <tege@swox.com>
4924
4925	* tests/mpq/t-get_d.c (check_random): New function.
4926	(main): Call check_random.
4927
4928	* mpq/set_d.c: Make choices based on LIMBS_PER_DOUBLE, not
4929	BITS_PER_MP_LIMB.  Make it work for LIMBS_PER_DOUBLE == 4.
4930	Use MPZ_REALLOC.
4931
4932	* mpz/set_d.c: Make it work for LIMBS_PER_DOUBLE == 4.
4933
4934	* extract-dbl.c: Make it work for LIMBS_PER_DOUBLE > 3.
4935
49362006-02-27  Torbjorn Granlund  <tege@swox.com>
4937
4938	* mpz/cmp_d.c: Declare `i'.
4939	* mpz/cmpabs_d.c: Likewise.
4940
49412006-02-23  Torbjorn Granlund  <tege@swox.com>
4942
4943	* mpn/powerpc32/vmx/copyd.asm: Set right VRSAVE bits.
4944	* mpn/powerpc32/vmx/copyi.asm: Likewise.
4945
49462006-02-22  Torbjorn Granlund  <tege@swox.com>
4947
4948	* mpn/powerpc32/vmx/logops_n.asm: New file.
4949
4950	* mpn/powerpc32/diveby3.asm: Rewrite.
4951
49522006-02-21  Torbjorn Granlund  <tege@swox.com>
4953
4954	* mpn/powerpc32/vmx/copyi.asm: New file.
4955	* mpn/powerpc32/vmx/copyd.asm: New file.
4956
49572006-02-17  Torbjorn Granlund  <tege@swox.com>
4958
4959	* mpn/alpha/ev6/nails/aors_n.asm (CYSH): Import proper setting from
4960	deleted mpn_sub_n.
4961
49622006-02-16  Torbjorn Granlund  <tege@swox.com>
4963
4964	* mpn/alpha/ev6/addmul_1.asm: Correct slotting comments.
4965
49662006-02-15  Torbjorn Granlund  <tege@swox.com>
4967
4968	* tests/devel/anymul_1.c: Copy error reporting code from addmul_N.c.
4969
4970	* tests/devel/addmul_N.c: New file.
4971	* tests/devel/mul_N.c: New file.
4972
4973	* mpn/alpha/default.m4 (PROLOGUE_cpu): Align functions at 16-byte
4974	boundary.
4975
4976	* mpn/alpha/ev6/nails/aors_n.asm: New file.
4977	* mpn/alpha/ev6/nails/add_n.asm: Remove.
4978	* mpn/alpha/ev6/nails/sub_n.asm: Remove.
4979
4980	* mpn/alpha/ev6/nails/addmul_1.asm: Rewrite.
4981	* mpn/alpha/ev6/nails/submul_1.asm: Likewise.
4982	* mpn/alpha/ev6/nails/mul_1.asm: Likewise.
4983
4984	* mpn/alpha/ev6/nails/addmul_2.asm: Use L() for labels.
4985	* mpn/alpha/ev6/nails/addmul_3.asm: Use L() for labels.
4986	* mpn/alpha/ev6/nails/addmul_4.asm: Use L() for labels.
4987
49882006-02-13  Torbjorn Granlund  <tege@swox.com>
4989
4990	* mpn/powerpc32/diveby3.asm: Trivially reorder loop insns to save
4991	1 c/l.
4992
4993	* mpn/x86_64/dive_1.asm: Use movabsq to support large model non-PIC.
4994
4995	* mpn/x86_64/rsh1add_n.asm: Replace high register with rbx.
4996	* mpn/x86_64/rsh1sub_n.asm: Likewise.
4997
49982006-02-10  Torbjorn Granlund  <tege@swox.com>
4999
5000	* mpn/powerpc64/sqr_diagonal.asm: Software pipeline.
5001
5002	* mpn/powerpc64/vmx/popcount.asm: Add prefetching.
5003
50042006-02-07  Torbjorn Granlund  <tege@swox.com>
5005
5006	* mpn/powerpc64/mode64/diveby3.asm: Rewrite.
5007
50082006-02-04  Torbjorn Granlund  <tege@swox.com>
5009
5010	* mpn/powerpc64/vmx/popcount.asm: Remove mpn_hamdist partial code.
5011	Move compare for huge n so that it is always executed.
5012
50132006-02-03  Torbjorn Granlund  <tege@swox.com>
5014
5015	* mpn/powerpc32/linux.m4 (LEA): Add support for PIC.
5016
5017	* configure.in (powerpc): New optional, gcc_cflags_subtype.
5018
5019	* mpn/x86_64/pentium4/add_n.asm: New file.
5020	* mpn/x86_64/pentium4/sub_n.asm: New file.
5021	* mpn/x86_64/pentium4/lshift.asm: New file.
5022
5023	* mpn/powerpc64/linux64.m4 (PROLOGUE_cpu): Align function start to
5024	16-multiple.
5025	* mpn/powerpc64/aix.m4: Likewise.
5026	* mpn/powerpc64/darwin.m4: Likewise.
5027
5028	* mpn/powerpc64/copyi.asm: Align loop to 16-multiple.
5029	* mpn/powerpc64/copyd.asm: Likewise
5030
5031	* configure.in (powerpc): Add vmx to relevant paths.
5032
5033	* mpn/powerpc64/linux64.m4 (DEF_OBJECT): Accept 2nd argument, for
5034	alignment.
5035	* mpn/powerpc64/aix.m4: Likewise.
5036	* mpn/powerpc64/darwin.m4: Likewise.
5037
5038	* mpn/powerpc32/linux.m4 (DEF_OBJECT, END_OBJECT): New macros,
5039	inherited from powerpc64 versions.
5040	* mpn/powerpc32/aix.m4: Likewise.
5041	* mpn/powerpc32/darwin.m4: Likewise.
5042
5043	* mpn/powerpc64/vmx/popcount.asm: New file, for ppc32 and ppc64.
5044	* mpn/powerpc32/vmx/popcount.asm: New file, grabbing above file.
5045
50462006-01-22  Torbjorn Granlund  <tege@swox.com>
5047
5048	* configure.in: Generalize OS-dependent patterns for powerpcs.
5049
50502006-01-20  Torbjorn Granlund  <tege@swox.com>
5051
5052	* mpn/x86_64/popham.asm: Optimize.
5053
5054	* config.guess: Recognize power4 and up under linux-gnu.
5055	* config.sub: Generalize power recognition code.
5056	* acinclude.m4 (POWERPC64_PATTERN): Add 64-bit powerpc processors.
5057	* configure.in: Recognize powerpc processors masquerading as power
5058	processors.
5059
50602006-01-19  Torbjorn Granlund  <tege@swox.com>
5061
5062	* mpn/x86_64/logops_n.asm: Rewrite for more stable speed and smaller
5063	code.
5064	* mpn/x86_64/com_n.asm: Likewise.
5065
50662006-01-18  Torbjorn Granlund  <tege@swox.com>
5067
5068	* mpn/x86_64/addlsh1_n.asm: Rewrite to use indexed addressing.
5069	* mpn/x86_64/sublsh1_n.asm: Likewise.
5070
50712006-01-17  Torbjorn Granlund  <tege@swox.com>
5072
5073	* mpn/generic/diveby3.c: Use GMP standard parameter names.  Nailify
5074	alternative code.  Use restrict for params.
5075
5076	* configure.in: Recognize andn_n as not needing nailification.
5077
5078	* tests/mpq/t-equal.c (check_various): Disable a test that gives common
5079	factors for GMP_NUMB_BITS == 62.
5080
50812006-01-16  Torbjorn Granlund  <tege@swox.com>
5082
5083	* mpn/generic/get_str.c (mpn_sb_get_str): Fix digit count computation,
5084	was inaccurate for nails.
5085
50862006-01-15  Torbjorn Granlund  <tege@swox.com>
5087
5088	* mpn/x86_64/mode1o.asm: Remove unneeded carry register zeroing.
5089
50902006-01-08  Torbjorn Granlund  <tege@swox.com>
5091
5092	* mpn/alpha/ev6/sqr_diagonal.asm: New file.
5093
50942006-01-06  Torbjorn Granlund  <tege@swox.com>
5095
5096	* mpn/powerpc64/mode64/mod_34lsub1.asm: Tune to 1.5 c/l.
5097
5098	* mpn/generic/mullow_n.c (MUL_BASECASE_ALLOC): New #define.
5099	(mpn_mullow_n): Use it.
5100
5101	* mpn/powerpc64/mode64/dive_1.asm: Use EXTERN.
5102	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
5103
5104	* mpn/powerpc64/aix.m4 (EXTERN): Define to import symbol.
5105	(LDSYM): Remove [RW] attribute.
5106	* mpn/powerpc64/linux64.m4 (EXTERN): Dummy definition.
5107	* mpn/powerpc64/darwin.m4 (EXTERN): Likewise.
5108
51092006-01-05  Torbjorn Granlund  <tege@swox.com>
5110
5111	* mpn/powerpc64/mode64/mode1o.asm: New file.
5112
5113	* mpn/powerpc64/mode64/dive_1.asm: Use L() for labels.  Invoke ASM_END.
5114
5115	* mpn/powerpc64/mode64/invert_limb.asm: Invoke ASM_END.
5116
5117	* mpn/powerpc64/linux64.m4: Move toc entry generation from direct at
5118	DEF_OBJECT to delayed via LDSYM, define ASM_END to output it.
5119	* mpn/powerpc64/aix.m4: Likewise.
5120	* mpn/powerpc64/darwin.m4: Define a dummy ASM_END.
5121
5122	* mpn/powerpc64/mode64/addmul_1.asm: Add POWER5 timings.
5123	* mpn/powerpc64/mode64/mul_1.asm: Likewise.
5124
5125	* mpn/powerpc64/mode64/submul_1.asm: Tweak to save 1.5 c/l for POWER5.
5126
51272006-01-04  Torbjorn Granlund  <tege@swox.com>
5128
5129	* mpn/powerpc64/mode64/dive_1.asm: New file.
5130
5131	* mpn/powerpc64/mode64/invert_limb.asm: Add missing ASM_START.
5132
5133	* mpn/powerpc64/mode64/addmul_1.asm: Fix a comment typo.
5134
5135	* mpn/x86_64/diveby3.asm: Rewrite.
5136
51372006-01-03  Torbjorn Granlund  <tege@swox.com>
5138
5139	* configure.in: Update bugs reporting address.
5140
5141	* mpn/powerpc64/mode64/diveby3.asm: Trim a cycle off of POWER4 timing.
5142	Misc cleanup.
5143
51442006-01-02  Torbjorn Granlund  <tege@swox.com>
5145
5146	* mpn/powerpc64/linux64.m4 (CALL): New macro.
5147	* mpn/powerpc64/aix.m4: Likewise.
5148	* mpn/powerpc64/darwin.m4: Likewise, also define macro "DARWIN".
5149
51502005-12-28  Torbjorn Granlund  <tege@swox.com>
5151
5152	* mpn/powerpc64/mode64/mod_34lsub1.asm: New file.
5153
51542005-12-26  Torbjorn Granlund  <tege@swox.com>
5155
5156	* mpn/x86_64/mod_34lsub1.asm: New file.
5157
51582005-12-20  Torbjorn Granlund  <tege@swox.com>
5159
5160	* mpn/x86_64/submul_1.asm: Save a push/pop by not using register r12.
5161	Use addq instead of leaq for pointer updates; schedule them.  (These
5162	changes shaves one cycle of overhead and 0.25 c/l.)
5163
51642005-12-18  Torbjorn Granlund  <tege@swox.com>
5165
5166	* mpf/ui_div.c: Implement workaround for GCC bug triggered on alpha.
5167	* mpf/set_q.c: Likewise.
5168
51692005-12-16  Torbjorn Granlund  <tege@swox.com>
5170
5171	* mpn/generic/tdiv_qr.c: Remove statement with no effect.
5172	Rename dead variable to `dummy'.
5173
51742005-12-15  Torbjorn Granlund  <tege@swox.com>
5175
5176	* demos/pexpr.c (setup_error_handler): Add a missing ";".
5177
51782005-11-27  Torbjorn Granlund  <tege@swox.com>
5179
5180	* mpn/generic/mul.c: Crudely call mpn_mul_fft_full before checking
5181	for unbalanced operands.
5182
5183	* mpn/generic/mul_fft.c: Remove many scalar divisions.
5184	(mpn_mul_fft_lcm): Simplify.
5185	(mpn_mul_fft_decompose): Rewrite to handle arbitrarily unbalanced
5186	operands.
5187
51882005-11-22  Torbjorn Granlund  <tege@swox.com>
5189
5190	* configure.in: Properly recognize all 32-bit Solaris releases.
5191
51922005-11-10  Torbjorn Granlund  <tege@swox.com>
5193
5194	* mpn/generic/mul_fft.c: Inline mpn_fft_mul_2exp_modF,
5195	mpn_fft_add_modF and mpn_fft_normalize.
5196
51972005-11-02  Torbjorn Granlund  <tege@swox.com>
5198
5199	* tests/mpz/reuse.c: Increase operand size, decrease # of reps.
5200
5201	* mpz/rootrem.c: Adapt to new mpn_rootrem.
5202	* mpz/root.c: Likewise.
5203
5204	* tests/mpz/reuse.c: Test mpz_rootrem.
5205
5206	With Paul Zimmermann:
5207	* mpn/generic/rootrem.c: Complete rewrite.
5208
52092005-10-31  Torbjorn Granlund  <tege@swox.com>
5210
5211	* mpz/pprime_p.c (mpz_probab_prime_p): Considerably limit trial
5212	dividing.
5213
5214	* mpz/perfpow.c (mpz_perfect_power_p): Use mpz_divisible_ui_p instead
5215	of mpz_tdiv_ui.
5216
5217	* mpz/divegcd.c: Correct probability number for GCD == 1.
5218
5219	* mpn/x86_64/mul_basecase.asm: Remove an obsolete comment.
5220
5221	* mpn/x86: Add cycle counts for array of x86 processors.
5222
5223	* mpn/x86/k7/mod_34lsub1.asm: Remove spurious mentions of ebp.
5224
5225	* mpn/powerpc32: Add POWER5 timings.
5226
5227	* mpn/powerpc32/README: Describe global reference variations.
5228
5229	* mpn/ia64/divrem_2.asm: Add some comments.
5230
5231	* mpn/ia64/divrem_1.asm: Reformat.
5232
5233	* mpn/ia64/addmul_2.asm: Correct a comment on slotting.
5234	* mpn/ia64/logops_n.asm: Likewise.
5235
5236	* mpn/ia64/addmul_1.asm: Remove a redundant preg mutex decl.
5237
5238	* mpn/generic/dive_1.c: Whitespace cleanup.
5239
5240	* mpn/alpha/ev6/nails/addmul_1.asm: Correct comments on slotting.
5241	* mpn/alpha/ev6/nails/addmul_2.asm: Likewise.
5242	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
5243
5244	* mpf/out_str.c: List some allocation improvement ideas.
5245
5246	* doc/gmp.texi: Update many URLs and email addresses.
5247
5248	* gmp-h.in (_GMP_H_HAVE_FILE): Check also _STDIO_H_INCLUDED.
5249
52502005-10-26  Torbjorn Granlund  <tege@swox.com>
5251
5252	* tune/tuneup.c (tune_mullow): Update param.max_size for each threshold
5253	measurement.
5254
5255	* configure.in (POWERPC64_PATTERN/*-*-darwin*): Set
5256	SPEED_CYCLECOUNTER_OBJ_mode64 and cyclecounter_size_mode64.
5257	(POWERPC64_PATTERN/*-*-linux*): Likewise.
5258
52592005-10-03  Torbjorn Granlund  <tege@swox.com>
5260
5261	* demos/factorize.c (factor_using_division_2kp): Honor verbose flag.
5262	(factor_using_pollard_rho): Divide out new factor before it's
5263	clobbered.  Don't stop factoring after a composite factor was found.
5264
52652005-09-17  Torbjorn Granlund  <tege@swox.com>
5266
5267	* demos/pexpr.c (fns): Add factorial keywords.
5268
52692005-08-16  Torbjorn Granlund  <tege@swox.com>
5270
5271	* tune/Makefile.am (EXTRA_DIST): Change "amd64" => "x86_64".
5272	* mpn/Makefile.am (TARG_DIST): Change "amd64" => "x86_64".
5273
52742005-08-15  Torbjorn Granlund  <tege@swox.com>
5275
5276	* configure.in: Change "amd64" => "x86_64".
5277
52782005-06-13  Torbjorn Granlund  <tege@swox.com>
5279
5280	* mpn/generic/pre_mod_1.c: Canonicalize variable names.
5281
5282	* mpn/generic/divrem.c: Rate qxn test as UNLIKELY.
5283
5284	* mpn/generic/gcdext.c (sanity_check_row): Invoke TMP_MARK.
5285
5286	* tune/tuneup.c (tune_mullow): Fix all max_size fields.
5287
5288	* gmp-impl.h (SQR_TOOM3_THRESHOLD_LIMIT): New #define.
5289	* tune/tuneup.c (tune_sqr): Use SQR_TOOM3_THRESHOLD_LIMIT.
5290	(sqr_toom3_threshold): Initialize from SQR_TOOM3_THRESHOLD_LIMIT.
5291
5292	* mpn/generic/mul_n.c (mpn_sqr_n): Use SQR_TOOM3_THRESHOLD_LIMIT.
5293
5294	* gmp-impl.h (mpn_nand_n, mpn_iorn_n, mpn_nior_n, mpn_xnor_n):
5295	Handle nails.
5296
52972005-06-13  Niels M�ller  <nisse@lysator.liu.se>
5298
5299	* mpn/generic/gcdext.c (gcdext_schoenhage): Check for the
5300	(unlikely) case that one of the hgcd/euclid steps results in two
5301	remainders of one limb each. Then use gcdext_1.
5302
53032005-06-12  Torbjorn Granlund  <tege@swox.com>
5304
5305	* mpn/alpha/ev6/sub_n.asm: Analogous changes as to add_n.asm last.
5306
53072005-06-11  Torbjorn Granlund  <tege@swox.com>
5308
5309	* mpn/alpha/ev6/add_n.asm: Rewrite inner loop to load later.
5310	Add mpn_add_nc entry.
5311
5312	* mpn/alpha/ev6/addmul_1.asm: Remove redundant initial loads.
5313
53142005-06-09  Torbjorn Granlund  <tege@swox.com>
5315
5316	* mpn/ia64/dive_1.asm: Fix issues with HP-UX.
5317
53182005-06-08  Torbjorn Granlund  <tege@swox.com>
5319
5320	* mpn/ia64/diveby3.asm: Update TODO list.
5321
5322	* mpn/ia64/mode1o.asm: Fix comment typos.
5323
5324	* mpn/ia64/dive_1.asm: New file.
5325
53262005-06-07  Torbjorn Granlund  <tege@swox.com>
5327
5328	* mpn/ia64/mode1o.asm: Add prefetching.
5329
5330	* mpn/generic/dive_1.c: Use variable h for upper umul_ppmm result.
5331
53322005-06-06  Torbjorn Granlund  <tege@swox.com>
5333
5334	* mpn/ia64/hamdist.asm: Complete rewrite.
5335	* mpn/ia64/popcount.asm: Rewrite to use multi-pronged feed-in.
5336
5337	* mpn/ia64/aors_n.asm: Rewrite feed-in code.
5338	* mpn/ia64/rsh1aors_n.asm: Likewise.
5339	* mpn/ia64/aorslsh1_n.asm: Likewise.
5340	* mpn/ia64/lorrshift.asm: Likewise.
5341
53422005-06-04  Torbjorn Granlund  <tege@swox.com>
5343
5344	* tests/devel/try.c (choice_array): Exclude mpn_preinv_mod_1 unless
5345	USE_PREINV_MOD_1.
5346	(choice_array): Exclude mpn_sqr_basecase if SQR_KARATSUBA_THRESHOLD
5347	is zero.
5348
53492005-06-03  Torbjorn Granlund  <tege@swox.com>
5350
5351	* mpn/alpha/ev6/addmul_1.asm: Prefix all labels with "$".
5352	* mpn/alpha/ev6/mul_1.asm: Likewise.
5353
53542005-06-02  Torbjorn Granlund  <tege@swox.com>
5355
5356	* tests/refmpn.c (refmpn_divmod_1c_workaround): Implement workaround
5357	to gcc 3.4.x bug triggered on powerpc64 with 32-bit ABI.
5358
53592005-06-01  Torbjorn Granlund  <tege@swox.com>
5360
5361	* tests/devel/try.c (main): Fix a typo.
5362
53632005-05-31  Torbjorn Granlund  <tege@swox.com>
5364
5365	* mpn/alpha/ev6/addmul_1.asm: Rewrite for L1 cache, add prefetch.
5366
53672005-05-30  Torbjorn Granlund  <tege@swox.com>
5368
5369	* tests/misc.c (tests_rand_start): Mask random seed to 32 bits.
5370
53712005-05-29  Torbjorn Granlund  <tege@swox.com>
5372
5373	* mpn/powerpc64/mode32/mul_1.asm: Handle BROKEN_LONGLONG_PARAM.
5374	* mpn/powerpc64/mode32/addmul_1.asm: Likewise.
5375	* mpn/powerpc64/mode32/submul_1.asm: Likewise.
5376
5377	* mpn/powerpc32/mode1o.asm: Rewrite to actually work.
5378
5379	* mpn/powerpc32/aix.m4 (LEA): New macro.
5380	(ASM_END): New macro.
5381
5382	* mpn/powerpc32/linux.m4: New file.
5383	* mpn/powerpc32/darwin.m4: New file.
5384	* configure.in: Use linux.m4 and darwin.m4.
5385	(powerpc64-linux-gnu): Add support for mode32.
5386
53872005-05-25  Torbjorn Granlund  <tege@swox.com>
5388
5389	* mpn/generic/mullow_n.c: Remove FIXME mentioning fixed flaw.
5390
5391	* tests/mpz/t-cmp_d.c (check_one): Fix printf fmt string typo.
5392
5393	* demos/isprime.c: #include stdlib.h.
5394	* tests/rand/t-urbui.c: Likewise.
5395	* tests/rand/t-urmui.c: Likewise.
5396
5397	* tests/mpz/t-popcount.c (check_random): Remove spurious printf arg.
5398
5399	* mpn/ia64/lorrshift.asm: Cleanup code layout.
5400	* mpn/ia64/popcount.asm: Likewise.
5401
54022005-05-24  Torbjorn Granlund  <tege@swox.com>
5403
5404	* tests/devel/try.c (param_init) [TYPE_GET_STR]: Set retval field.
5405	(compare): Handle SIZE_GET_STR as SIZE_RETVAL.
5406
5407	* tests/refmpn.c (refmpn_get_str): Rewrite to make it work.
5408
54092005-05-23  Torbjorn Granlund  <tege@swox.com>
5410
5411	* mpn/amd64/add_n.asm: Add mpn_add_nc entry point.
5412	* mpn/amd64/sub_n.asm: Add mpn_sub_nc entry point.
5413
5414	* longlong.h (many places): Remove lvalue casts.
5415
5416	* gmp-impl.h (MPF_SIGNIFICANT_DIGITS): Cast prec to avoid overflow
5417	for > 4G digits.
5418
5419	* mpn/alpha/ev6/add_n.asm: Prefetch using ldl.
5420	* mpn/alpha/ev6/sub_n.asm: Likewise.
5421
5422	* mpn/alpha/ev6/slot.pl (optable): Recognize negq and ldl.
5423
5424	* mpn/ia64/aors_n.asm: Prefetch using lfetch.
5425	* mpn/ia64/lorrshift.asm: Likewise.
5426	* mpn/ia64/popcount.asm: Likewise.
5427	* mpn/ia64/diveby3.asm: Likewise.
5428
54292005-05-22  Torbjorn Granlund  <tege@swox.com>
5430
5431	* mpn/alpha/ev67/popcount.asm: Prefetch.
5432	* mpn/alpha/ev67/hamdist.asm: Prefetch.
5433
5434	* longlong.h (add_ssaaaa) [x86]: Remove lvalue casts.
5435	(sub_ddmmss) [x86]: Likewise.
5436
5437	* tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Add DATA_SRC1_ODD.
5438	(param_init) [TYPE_MPZ_KRONECKER]: Clear inherited DATA_SRC1_ODD.
5439	(param_init) [TYPE_DIVEXACT_1]: Use symbolic name DIVISOR_LIMB.
5440
54412005-05-21  Torbjorn Granlund  <tege@swox.com>
5442
5443	* tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Initialize divisor
5444	field according to UDIV_NEEDS_NORMALIZATION.
5445
5446	* mpz/mul_i.h: Remove left-over TMP_XXXX marker arguments.
5447
54482005-05-20  Torbjorn Granlund  <tege@swox.com>
5449
5450	* mpn/x86/pentium4/sse2/addmul_1.asm (mpn_addmul_1c): Put carry in
5451	proper register.
5452
5453	* mpn/generic/sqr_basecase.c (mpn_sqr_basecase, addmul_2 version):
5454	Avoid accesses out-of-bound in MPN_SQR_DIAGONAL applicate code.
5455
54562005-05-19  Torbjorn Granlund  <tege@swox.com>
5457
5458	* mpn/alpha/diveby3.asm: Make it actually work.
5459
5460	* gmp-impl.h (MULLOW_BASECASE_THRESHOLD_LIMIT): New #define.
5461	* mpn/generic/mullow_n.c: Use fixed stack allocation for the smallest
5462	operands; use TMP_S* allocation for medium operands.
5463
5464	* gmp-impl.h: Remove nested TUNE_PROGRAM_BUILD test.
5465
54662005-05-18  Torbjorn Granlund  <tege@swox.com>
5467
5468	* mpn/generic/mul_n.c: Make squaring and multiplication code more
5469	similar.  Use TMP_S* functions.
5470
5471	* gmp-impl.h (TMP_DECL, TMP_MARK, TMP_FREE): Get rid of argument.
5472	(TMP_SALLOC): New macro for "small" allocations.
5473	(TMP_BALLOC): New macro for "big" allocations.
5474	(TMP_SDECL, TMP_SMARK, TMP_SFREE): New macros for functions that use
5475	just TMP_SALLOC.
5476	(WANT_TMP_ALLOCA): Make default functions choose alloca or reentrant
5477	functions, depending on size.
5478
5479	* *.c: Remove TMP_XXXX marker arguments.
5480
5481	* acinclude.m4 (WANT_TMP): Want tal-reent.lo also for alloca case.
5482
54832005-05-16  Torbjorn Granlund  <tege@swox.com>
5484
5485	* mpn/ia64/gmp-mparam.h: Further extend FFT tables.
5486
54872005-05-15  Torbjorn Granlund  <tege@swox.com>
5488
5489	* gmp-impl.h (udiv_qrnnd_preinv2): Pull an add into add_ssaaaa.
5490	(udiv_qrnnd_preinv2gen): Likewise.
5491
54922005-05-14  Torbjorn Granlund  <tege@swox.com>
5493
5494	* longlong.h (add_ssaaaa) [x86_64]: Restrict allowed immediate
5495	operands.
5496	* (sub_ddmmss) [x86_64]: Likewise.
5497
54982005-05-02  Torbjorn Granlund  <tege@swox.com>
5499
5500	* acinclude.m4 (GMP_HPC_HPPA_2_0): Make gmp_tmp_v1 sed pattern handle
5501	version numbers like B.11.X.32509-32512.GP.
5502
5503	* mpn/m68k/aors_n.asm: Correct MULFUNC_PROLOGUE.
5504
5505	* mpn/powerpc64/mode64/aors_n.asm: Add a MULFUNC_PROLOGUE.
5506
5507	* mpf/inp_str.c: Use plain int for mpf_set_str return value (works
5508	around gcc 4 bug).
5509
5510	* acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): Handle darwin's assembly
5511	syntax.
5512	(long long reliability test 1): New GMP_PROG_CC_WORKS_PART test.
5513	(long long reliability test 2): New GMP_PROG_CC_WORKS_PART test.
5514
5515	* configure.in: Add mode64 support for darwin.  Use darwin.m4.
5516	Add cflags_opt flags for mode32 darwin.
5517
5518	* mpn/powerpc64: Use L() for all asm files.
5519
5520	* mpn/asm-defs.m4 (PIC_ALWAYS): Define PIC just iff PIC_ALWAYS = "yes".
5521
5522	* mpn/powerpc64/darwin.m4: New file.
5523
5524	* mpn/powerpc64/linux64.m4: Remove TOCREF, add LDSYM.
5525	Rework DEF_OBJECT to need just one argument.
5526	* mpn/powerpc64/aix.m4: Likewise.
5527
5528	* mpn/powerpc64/mode64/invert_limb.asm: Load approx_tab address with
5529	LDSYM.  Optimize somewhat.  Remove 2nd DEF_OBJECT operand.
5530
55312005-05-01  Torbjorn Granlund  <tege@swox.com>
5532
5533	* mpn/generic/popham.c: Compute final summation differently for 64-bit.
5534
5535	* tests/mpz/t-popcount.c (check_random): New function.
5536	(main): Call it.
5537
55382005-04-28  Torbjorn Granlund  <tege@swox.com>
5539
5540	* mpn/amd64/add_n.asm: Use r9 instead of rbx to save push/pop.
5541	* mpn/amd64/sub_n.asm: Likewise.
5542
55432005-04-09  Torbjorn Granlund  <tege@swox.com>
5544
5545	* mpn/powerpc64/copyi.asm: If HAVE_ABI_mode32, ignore upper 32 bits of
5546	mp_size_t argument.
5547	* mpn/powerpc64/copyd.asm: Likewise.
5548	* mpn/powerpc64/sqr_diagonal.asm: Likewise.
5549	* mpn/powerpc64/lshift.asm: Likewise.
5550	* mpn/powerpc64/rshift.asm: Likewise.
5551	* mpn/powerpc64/logops_n.asm: Likewise.
5552	* mpn/powerpc64/com_n.asm: Likewise.
5553
55542005-04-08  Torbjorn Granlund  <tege@swox.com>
5555
5556	* mpn/generic/rootrem.c: Allocate PP_ALLOC limbs also for qp.
5557
55582005-04-07  Torbjorn Granlund  <tege@swox.com>
5559
5560	* mpn/powerpc32/add_n.asm: Add nc entry point.
5561	* mpn/powerpc32/sub_n.asm: Likewise.
5562
5563	* mpn/amd64/*.asm: Add Prescott/Nocona cycle/limb numbers.
5564
5565	* mpn/alpha/add_n.asm: Add correct cycle/limb numbers.
5566	* mpn/alpha/sub_n.asm: Likewise.
5567	* mpn/alpha/ev5/add_n.asm: Likewise.
5568	* mpn/alpha/ev5/sub_n.asm: Likewise.
5569
55702005-03-31  Torbjorn Granlund  <tege@swox.com>
5571
5572	* mpn/x86/k7/gmp-mparam.h: Fix typo in last change.
5573
55742005-03-19  Torbjorn Granlund  <tege@swox.com>
5575
5576	* mpn/amd64/gmp-mparam.h: Update.
5577
5578	* mpn/alpha/gmp-mparam.h: Update.
5579	* mpn/alpha/ev5/gmp-mparam.h: Update.
5580	* mpn/alpha/ev6/gmp-mparam.h: Update.
5581
5582	* mpn/ia64/gmp-mparam.h: Update.
5583
5584	* mpn/x86/p6/mmx/gmp-mparam.h: Update.
5585	* mpn/x86/pentium4/sse2/gmp-mparam.h: Update.
5586	* mpn/x86/k7/gmp-mparam.h: Update.
5587
5588	* tests/mpz/t-gcd.c (main): Honor command line reps argument.
5589
5590	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Simplify and correct code
5591	for generating test operands.
5592
55932005-03-17  Niels M�ller  <nisse@lysator.liu.se>
5594
5595	* mpn/generic/hgcd.c (qstack_adjust): New argument d, saying how much
5596	to adjust the top quotient.
5597	(hgcd_adjust): The quotient can be off by either 1 or 2.
5598
55992005-03-16  Torbjorn Granlund  <tege@swox.com>
5600
5601	* tests/mpz/t-gcd.c (MAX_SCHOENHAGE_THRESHOLD): Set to largest of
5602	gcd,gcdext thresholds.
5603
56042005-03-15  Niels M�ller  <nisse@lysator.liu.se>
5605
5606	* mpn/generic/gcdext.c (gcdext_schoenhage): When calling gcdext_lehmer,
5607	reuse all temporary limb storage, including the storage used for the
5608	qstack.
5609
56102005-03-09  Torbjorn Granlund  <tege@swox.com>
5611
5612	* mpn/amd64/logops_n.asm: Add MULFUNC_PROLOGUE.
5613
56142005-03-05  Torbjorn Granlund  <tege@swox.com>
5615
5616	* mpn/amd64/gmp-mparam.h: Extend MUL_FFT_TABLE and SQR_FFT_TABLE.
5617	* mpn/ia64/gmp-mparam.h: Likewise.
5618
56192005-02-17  Torbjorn Granlund  <tege@swox.com>
5620
5621	* mpn/ia64/divrem_1.asm: Add preinv entry point.
5622
56232005-01-13  Torbjorn Granlund  <tege@swox.com>
5624
5625	* gmp-impl.h (MPN_SIZEINBASE): Count bits in type size_t.
5626	(MPN_SIZEINBASE_16): Likewise.
5627
56282004-12-17  Torbjorn Granlund  <tege@swox.com>
5629
5630	* tune/speed.c (run_gnuplot): Use lines, not linespoints.
5631	Output a reset gnuplot command initially.
5632
56332004-12-04  Torbjorn Granlund  <tege@swox.com>
5634
5635	* mpn/generic/random2.c (gmp_rrandomb): Rework again.
5636	* mpz/rrandomb.c (gmp_rrandomb): Likewise.
5637
5638	* mpn/amd64/redc_1.asm: Call via PLT when PIC.
5639
56402004-11-29  Torbjorn Granlund  <tege@swox.com>
5641
5642	* mpn/amd64/divrem_1.asm: Add preinv entry point.
5643	* mpn/amd64/gmp-mparam.h: Set USE_PREINV_DIVREM_1 to 1.
5644
56452004-11-24  Torbjorn Granlund  <tege@swox.com>
5646
5647	* mpn/alpha/diveby3.asm: Use correct prefetch instruction.
5648
56492004-11-19  Torbjorn Granlund  <tege@swox.com>
5650
5651	* mpn/alpha/diveby3.asm: Add ",gp" glue in PROLOGUE.
5652	Add r31 dummy operand to `br' instruction.
5653
56542004-11-17  Torbjorn Granlund  <tege@swox.com>
5655
5656	* mpn/powerpc64/mode64/addmul_1.asm: Rewrite.
5657	* mpn/powerpc64/mode64/mul_1.asm: Rewrite.
5658
5659	* configure.in: Invoke AC_C_RESTRICT.
5660
56612004-11-16  Torbjorn Granlund  <tege@swox.com>
5662
5663	* mpn/alpha/diveby3.asm: New file.
5664
56652004-11-13  Torbjorn Granlund  <tege@swox.com>
5666
5667	* mpn/amd64/popham.asm: New file.
5668
56692004-11-12  Torbjorn Granlund  <tege@swox.com>
5670
5671	* mpn/amd64/add_n.asm: Correct cycle count.
5672	* mpn/amd64/sub_n.asm: Likewise.
5673
5674	* mpn/amd64/dive_1.asm: Speed divisors with many factors of 2.
5675
56762004-11-11  Torbjorn Granlund  <tege@swox.com>
5677
5678	* mpn/amd64/dive_1.asm: New file.
5679
56802004-11-10  Torbjorn Granlund  <tege@swox.com>
5681
5682	* mpn/generic/popham.c: Add comment.
5683
56842004-11-09  Torbjorn Granlund  <tege@swox.com>
5685
5686	* mpn/amd64/com_n.asm: New file.
5687
5688	* mpn/amd64/logops_n.asm: New file.
5689
56902004-11-08  Torbjorn Granlund  <tege@swox.com>
5691
5692	* mpn/powerpc64/com_n.asm: New file.
5693
56942004-11-05  Torbjorn Granlund  <tege@swox.com>
5695
5696	* mpn/amd64/diveby3.asm: New file.
5697
5698	* config.guess: Strip any PPC string in /proc/cpuinfo.
5699	Recognize 970 in that code.
5700
57012004-11-01  Torbjorn Granlund  <tege@swox.com>
5702
5703	* mpn/amd64/mul_basecase.asm: New file.
5704
5705	* mpn/amd64/redc_1.asm: New file.
5706
57072004-10-25  Torbjorn Granlund  <tege@swox.com>
5708
5709	* mpn/powerpc64/mode64/addlsh1_n.asm: Correct cycle counts.
5710
5711	* mpn/powerpc64/README: Update POWER5/PPC970 pipeline information.
5712
5713	* mpn/generic/mul_basecase.c (MAX_LEFT): Add comment.
5714
5715	* doc/gmp.texi: Consistently use "x86" denotation.
5716	(Assembler SIMD Instructions): Mention SSE2 usage.
5717
5718	* demos/pexpr.c (main): Handle "negative" base in mpz_sizeinbase call.
5719
57202004-10-18  Torbjorn Granlund  <tege@swox.com>
5721
5722	* mpn/powerpc64/mode64/submul_1.asm: Shave 2 cycles/limb with new carry
5723	inversion trick.
5724
57252004-10-16  Torbjorn Granlund  <tege@swox.com>
5726
5727	* configure.in: Support icc under x86.
5728	(ia64-*-linux*): Pass -no-gcc to icc.
5729
57302004-10-15  Torbjorn Granlund  <tege@swox.com>
5731
5732	* longlong.h (ia64 umul_ppmm): Add version for icc.
5733
5734	* configure.in: Support icc under ia64-*-linux*.
5735
5736	* acinclude.m4: New "compiler works" test for icc 8.1 bug.
5737	(GMP_PROG_CC_IS_GNU): Don't let Intel's icc fool us it is GCC.
5738
57392004-10-14  Torbjorn Granlund  <tege@swox.com>
5740
5741	* mpn/generic/gcdext.c: Add a few missing TMP_MARK.
5742
57432004-10-14  Torbjorn Granlund  <tege@swox.com>
5744
5745	* acinclude.m4 (GMP_ASM_W32): Try also "data4".
5746
5747	* mpn/ia64/logops_n.asm: Don't use naked "br", rejected by Intel
5748	assembler.
5749	* mpn/ia64/aors_n.asm: Likewise.
5750
5751	* mpn/ia64/divrem_2.asm: Add ".prologue".
5752
5753	* mpn/ia64/hamdist.asm: Put alloc first in bundle, enforced by the
5754	Intel assembler.
5755
5756	* longlong.h: Exclude masquerading __INTEL_COMPILER from ia64 asm.
5757	* gmp-impl.h: Likewise.
5758
57592004-10-12  Torbjorn Granlund  <tege@swox.com>
5760
5761	* mpn/ia64/mul_2.asm: Rewrite function entry code, write new code for
5762	n=2.
5763	* mpn/ia64/addmul_2.asm: Likewise.
5764
5765	* tests/devel/try.c: Handle mpn_mul_2 like mpn_addmul_2.
5766
5767	* tune/speed.c (routine): Make R parameter optional for mpn_mul_2.
5768
57692004-10-11  Torbjorn Granlund  <tege@swox.com>
5770
5771	* mpn/sparc64/addmul_1.asm: Update a comment.
5772
5773	* tests/devel/aors_n.c: #include tests.h.
5774	* tests/devel/anymul_1.c: Likewise.
5775	* tests/devel/shift.c: Likewise.
5776	* tests/devel/copy.c: Likewise.
5777
5778	* tests/devel/aors_n.c: Handle also mpn_addlsh1_n, mpn_sublsh1_n,
5779	mpn_rsh1add_n, and mpn_rsh1sub_n.
5780
5781	* mpn/ia64/submul_1.asm: Add TODO item.
5782
5783	* mpn/ia64/aors_n.asm: Rewrite function entry code (again).
5784	* mpn/ia64/aorslsh1_n.asm: Likewise.
5785	* mpn/ia64/logops_n.asm: Likewise.
5786
5787	* mpn/ia64/rsh1aors_n.asm: Tune function entry and feed-in code.
5788	* mpn/ia64/lorrshift.asm: Likewise.  Remove several spurious loads.
5789
5790	* tests/devel/Makefile.am (EXTRA_PROGRAMS): Updates for yesterday's
5791	file removals and additions.
5792
57932004-10-10  Torbjorn Granlund  <tege@swox.com>
5794
5795	* mpn/ia64/copyi.asm: Tune function entry code.
5796	* mpn/ia64/copyd.asm: Likewise.
5797
5798	* mpn/ia64/logops_n.asm: Tune function entry and feed-in code for speed
5799	and size.
5800	* mpn/ia64/aors_n.asm: Likewise.
5801
5802	* mpn/powerpc64/logops_n.asm: Correct cycles counts.
5803	* mpn/powerpc64/mode64/aors_n.asm: Likewise.
5804
5805	* tests/devel/copy.c: Handle both MPN_COPY_INCR and MPN_COPY_DECR.
5806
5807	* tests/devel/logops_n.c: New file, handle all logical operations.
5808
5809	* tests/devel/anymul_1.c: New file, handle mpn_mul_1, mpn_addmul_1, and
5810	mpn_submul_1
5811	* tests/devel/mul_1.c: Remove.
5812	* tests/devel/addmul_1.c: Remove.
5813	* tests/devel/submul_1.c: Remove.
5814
5815	* tests/devel/shift.c: New file, handle mpn_lshift and mpn_rshift.
5816	* tests/devel/lshift.c: Remove.
5817	* tests/devel/rshift.c: Remove.
5818
5819	* tests/devel/aors_n.c: New file, handle mpn_add_n and mpn_sub_n.
5820	* tests/devel/add_n.c: Remove.
5821	* tests/devel/sub_n.c: Remove.
5822
58232004-10-09  Torbjorn Granlund  <tege@swox.com>
5824
5825	* mpn/powerpc64/linux64.m4: Define DEF_OBJECT, END_OBJECT, and TOCREF.
5826	* mpn/powerpc64/aix.m4: Likewise.
5827	* mpn/powerpc64/mode64/invert_limb.asm: Use DEF_OBJECT, END_OBJECT, and
5828	TOCREF for approx_tab.
5829
5830	* mpn/amd64/mul_1.asm: Add mpn_mul_1c entry point.
5831
58322004-10-08  Torbjorn Granlund  <tege@swox.com>
5833
5834	* mpn/powerpc64/copyi.asm: New file.
5835	* mpn/powerpc64/copyd.asm: New file.
5836	* gmp-h.in: Remove PPC MPN_COPY variants.
5837	* gmp-impl.h: Likewise.
5838
5839	* mpn/powerpc64/logops_n.asm: New file.
5840
5841	* mpn/powerpc64/mode64/invert_limb.asm: New file.
5842
58432004-10-07  Torbjorn Granlund  <tege@swox.com>
5844
5845	* mpn/powerpc64/mode64/aors_n.asm: New file, optimized for POWER4 and
5846	its derivatives.
5847	* mpn/powerpc64/mode64/add_n.asm: Delete.
5848	* mpn/powerpc64/mode64/sub_n.asm: Delete.
5849
5850	* configfsf.guess: Patch HP-UX code to accommodate HP compiler's new
5851	inability to read from stdin.
5852
5853	* mpn/powerpc64/mode64/addsub_n.asm: Remove accidentally added file.
5854
58552004-10-02  Torbjorn Granlund  <tege@swox.com>
5856
5857	* mpn/amd64/README: Update for new developments, fix typos.
5858
5859	* mpn/amd64/mul_1.asm: Tweak addressing (3.25 => 3.0 cycles/limb).
5860
5861	* mpn/amd64/addmul_1.asm: Remove unreachable code block.
5862
58632004-09-30  Torbjorn Granlund  <tege@swox.com>
5864
5865	* mpn/amd64/addmul_1.asm: Rewrite, now 3.25 cycles/limb.
5866
5867	* mpn/ia64/addmul_1.asm: Slightly enhance cross-jumping for code
5868	density.
5869	* mpn/ia64/mul_1.asm: Analogous changes.
5870
58712004-09-29  Torbjorn Granlund  <tege@swox.com>
5872
5873	* gmp-impl.h (x86 ULONG_PARITY): Work around GCC change of "q" register
5874	flag.
5875
58762004-09-28  Torbjorn Granlund  <tege@swox.com>
5877
5878	* mpn/ia64/divrem_1.asm: Add cycle counts to loop.
5879
5880	* mpn/ia64/divrem_2.asm: New file.
5881
58822004-09-28  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
5883
5884	* mpn/generic/mul_fft.c (mpn_mul_fft): Fix a bug in the choice of the
5885	recursive fft parameters.
5886
58872004-09-20  Torbjorn Granlund  <tege@swox.com>
5888
5889	* tests/misc.c (tests_rand_start): Default to strtoul for re-seeding.
5890
5891	* tests/mpz/t-mul.c (ref_mpn_mul): Fudge tmp allocation for toom3.
5892
58932004-09-19  Torbjorn Granlund  <tege@swox.com>
5894
5895	* tests/misc.c (tests_rand_start): Shift tv_usec for better seeding.
5896
58972004-09-18  Torbjorn Granlund  <tege@swox.com>
5898
5899	* tests/misc.c (tests_rand_start): Invoke fflush after printing seed.
5900
5901	* tests/mpz/t-mul.c (main): Check environment for GMP_CHECK_FFT, run
5902	extra FFT tests if set.
5903	(ref_mpn_mul): Use library code for kara and toom, but skewded so that
5904	we never use the same algorithm that we're testing.
5905	(mul_kara): Delete.
5906	(debug_mp): Print just one line of large numbers.
5907	(ref_mpn_mul): Rework usage of tp temporary space.
5908
59092004-09-15  Torbjorn Granlund  <tege@swox.com>
5910
5911	* mpn/ia64/mul_2.asm: For HAVE_ABI_32, convert vp.
5912	* mpn/ia64/addmul_2.asm: Likewise.
5913
59142004-09-13  Torbjorn Granlund  <tege@swox.com>
5915
5916	* mpn/ia64/invert_limb.asm: Rewrite.
5917
5918	* mpn/ia64/logops_n.asm: Insert some more stops.
5919
59202004-09-12  Torbjorn Granlund  <tege@swox.com>
5921
5922	* mpn/ia64/gmp-mparam.h: Update.
5923	* mpn/amd64/gmp-mparam.h: Update.
5924
5925	* mpn/ia64/sqr_diagonal.asm: Shave off a few cycles.
5926
59272004-09-11  Torbjorn Granlund  <tege@swox.com>
5928
5929	* mpn/ia64/mul_2.asm: New file.
5930	* mpn/ia64/addmul_2.asm: New file.
5931
5932	* mpn/ia64/addmul_1.asm: Tune a cycle from prologue.
5933
5934	* mpn/ia64/lorrshift.asm: Insert stops after several branches.
5935	* mpn/ia64/aorslsh1_n.asm: Likewise.
5936	* mpn/ia64/rsh1aors_n.asm: Likewise.
5937
5938	* mpn/generic/sqr_basecase.c: In variant for HAVE_NATIVE_mpn_addmul_2,
5939	accumulate carry also for when HAVE_NATIVE_mpn_addlsh1_n.
5940
59412004-09-07  Torbjorn Granlund  <tege@swox.com>
5942
5943	* mpn/ia64/submul_1.asm: Rewrite.
5944
5945	* mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
5946	* mpn/ia64/mul_1.asm: Likewise.
5947
59482004-09-02  Torbjorn Granlund  <tege@swox.com>
5949
5950	* mpn/ia64/mul_1.asm: Optimize feed-in code.
5951	* mpn/ia64/addmul_1.asm: Rewrite feed-in code.
5952
59532004-08-29  Torbjorn Granlund  <tege@swox.com>
5954
5955	* tests/mpz/t-sizeinbase.c: Disable mpz_fake_bits and check_sample.
5956
59572004-07-16  Torbjorn Granlund  <tege@swox.com>
5958
5959	* mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
5960
59612004-06-17  Kevin Ryde  <kevin@swox.se>
5962
5963	* doc/gmp.texi: Use @. when sentence ends with a capital, for good
5964	spacing in tex.
5965	(Language Bindings): Add gmp-d, reported by Ben Hinkle.  Update SWI
5966	Prolog URL, reported by Jan Wielemaker.
5967
59682004-06-09  Torbjorn Granlund  <tege@swox.com>
5969
5970	* configure.in: Handle --enable-fat.  Use that to enable x86 fat
5971	builds, remove magic meaning of i386-*-*.
5972
59732004-06-03  Kevin Ryde  <kevin@swox.se>
5974
5975	* gmp-impl.h (memset): Use a local char* pointer, in case parameter is
5976	something else (eg. tune/common.c).  Reported by Emmanuel Thom�.
5977
59782004-06-01  Kevin Ryde  <kevin@swox.se>
5979
5980	* config.guess (i?86-*-*): Avoid "Illegal instruction" message which
5981	goes to stdout on 80386 freebsd4.9.
5982
59832004-05-23  Niels M�ller  <nisse@lysator.liu.se>
5984
5985	* mpn/generic/gcdext.c (gcdext_1_u): New function.
5986	(mpn_gcdext): Use it.
5987
59882004-05-23  Torbjorn Granlund  <tege@swox.com>
5989
5990	* mpn/generic/gcdext.c (gcdext_1_odd): Use masking to avoid jumps.
5991
59922004-05-22  Torbjorn Granlund  <tege@swox.com>
5993
5994	* mpn/x86/pentium4/sse2/addmul_1.asm: Add Prescott cycle numbers.
5995
5996	* mpn/amd64/divrem_1.asm: Shave a cycle from fraction development code.
5997
5998	* mpn/powerpc32/lshift.asm: Add more cycle numbers.
5999	* mpn/powerpc32/rshift.asm: Likewise.
6000
6001	* mpn/ia64/addmul_1.asm: Reformat.
6002
60032004-05-21  Torbjorn Granlund  <tege@swox.com>
6004
6005	* gmp-impl.h (mpn_mullow_n, mpn_mullow_basecase): Declare.
6006
6007	* tune/Makefile.am: Compile gcdext.c.
6008
6009	* gmp-impl.h (GET_STR_THRESHOLD_LIMIT): Lower outrageous value to 150.
6010	(GCDEXT_SCHOENHAGE_THRESHOLD): Set reasonable default.  Override when
6011	TUNE_PROGRAM_BUILD.
6012	(GCDEXT_THRESHOLD): Remove.
6013
6014	* tune/tuneup.c (gcdext_schoenhage_threshold): New variable.
6015	(gcdext_threshold): Remove variable.
6016	(tune_gcd_schoenhage): Lower step_factor to 0.1.
6017	(tune_gcdext_schoenhage): New function, based on tune_gcd_schoenhage.
6018	(tune_gcdext): Remove function.
6019	(all): Corresponding changes.
6020
60212004-05-21  Niels M�ller  <nisse@lysator.liu.se>
6022
6023	* mpn/generic/gcdext.c: Complete rewrite.  Uses fast Lehmer code for
6024	small operands, and Schoenhage code for large operands.
6025
6026	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Ensure first operand is
6027	not smaller than 2nd operand.
6028
60292004-05-17  Kevin Ryde  <kevin@swox.se>
6030
6031	* gmp-h.in (mpz_get_ui): Use #if instead of plain if, and for nails
6032	use ?: same as normal case, to avoid warnings from Borland C++ 6.0.
6033	Reported by delta trinity.
6034
60352004-05-15  Kevin Ryde  <kevin@swox.se>
6036
6037	* tune/time.c (getrusage_backwards_p): New function
6038	(speed_time_init): Use it to exclude broken netbsd1.4.1 getrusage.
6039	* configure.in (m68*-*-netbsd1.4*): Remove code pretending getrusage
6040	doesn't exist.
6041	* tune/README (NetBSD 1.4.1 m68k): Update notes.
6042
6043	* configure.in (mips*-*-* ABI=n32): Remove gcc_n32_ldflags and
6044	cc_n32_ldflags, libtool knows to put the linker in n32 mode.
6045
60462004-05-15  Torbjorn Granlund  <tege@swox.com>
6047
6048	* config.guess (powerpc*-*-*): Add more processor types to mfpvr code.
6049	* configure.in: Generalize powerpc subtype matching code.
6050
6051	* mpz/fac_ui.c: Misc cleanups, spelling corrections.
6052
60532004-05-14  Kevin Ryde  <kevin@swox.se>
6054
6055	* mpf/sub.c: When one operand cancels high limbs of the other, strip
6056	high zeros on the balance before truncating to destination precision.
6057	Truncating first loses accuracy and can lead to a result 0 despite
6058	operands being not equal.  Reported by John Abbott.
6059	Also, ensure exponent is zero when result is zero, for instance if
6060	operands are exactly equal.
6061	* tests/mpf/t-sub.c (check_data): New function, exercising these.
6062
60632004-05-12  Kevin Ryde  <kevin@swox.se>
6064
6065	* configure.in (AC_PROG_RANLIB): New macro, supposedly required by
6066	automake, though it doesn't complain.
6067
6068	* demos/expr/Makefile.am (ARFLAGS): Add a default setting, to
6069	workaround an automake bug.
6070
60712004-05-10  Kevin Ryde  <kevin@swox.se>
6072
6073	* */Makefile.in, install-sh, aclocal.m4: Update to automake 1.8.4.
6074
6075	* doc/gmp.texi (Demonstration Programs): Add a remark about expression
6076	evaluation in the main gmp library.
6077
6078	* demos/expr/exprfa.c (mpf_expr_a): Correction to mpX_init, use
6079	mpf_init2 to follow requested precision.
6080	* demos/expr/exprza.c, demos/expr/exprqa.c: Use wrappers for mpX_init,
6081	to make parameters match.
6082
6083	* demos/expr/run-expr.c: Don't use getopt, to avoid needing configury
6084	for optarg declaration.  Remove TRY macro, rename foo and bar to var_a
6085	and var_b, for clarity.
6086	* demos/expr/expr-impl.h: Don't use expr-config.h.
6087	* configure.in (demos/expr/expr-config.h): Remove.
6088	* demos/expr/expr-config.in: Remove file.
6089
60902004-05-08  Kevin Ryde  <kevin@swox.se>
6091
6092	* doc/configuration (Configure): Update for current automake not
6093	copying acinclude.m4 into aclocal.m4.
6094
6095	* configure.in, Makefile.am, doc/gmp.texi, doc/configuration,
6096	tests/cxx/Makefile.am, demos/expr/Makefile.am, demos/expr/README,
6097	demos/expr/expr.c, demos/expr/expr.h, demos/expr/expr-config-h.in,
6098	demos/expr/expr-impl.h, demos/expr/run-expr.c, demos/expr/t-expr.c:
6099	MPFR now published separately, remove various bits.
6100	* mpfr/*, tests/cxx/t-headfr.cc, demos/expr/exprfr.c,
6101	demos/expr/exprfra.c: Remove.
6102
61032004-05-07  Kevin Ryde  <kevin@swox.se>
6104
6105	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Amend c++ shared library
6106	path hack, on k62-unknown-dragonfly1.0 /usr/bin/make runs its commands
6107	"set -e", so we need an "|| true" in case there's nothing to copy (for
6108	instance in a static build).
6109
61102004-05-06  Kevin Ryde  <kevin@swox.se>
6111
6112	* mpn/alpha/mode1o.c: Remove, in favour of ...
6113	* mpn/alpha/mode1o.asm: New file.
6114	* mpn/alpha/alpha-defs.m4 (bwx_available_p): New macro.
6115
6116	* tune/amd64.asm: Save rbx in r10 rather than on the stack.
6117
6118	* configure.in (x86_64-*-*): Try also "-march=k8 -mno-sse2", in case
6119	we're in ABI=32 on an old OS not supporting xmm regs.
6120	(GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): Run these tests under
6121	-march=k8 too, and not under ABI=64.
6122
6123	* doc/gmp.texi (Converting Integers): For mpz_get_d, note truncation
6124	and overflows.  For mpz_get_d_2exp note truncation, note result if
6125	OP==0, and cross reference libc frexp.
6126	(Rational Conversions): For mpq_get_d, note truncation and overflows.
6127	(Converting Floats): For mpf_get_d, note truncation and overflows.
6128	For mpf_get_d_2exp, note truncation, note result if OP==0.
6129	(Assembler Code Organisation): Note nails subdirectories.
6130	Clarification of get_d_2exp OP==0 reported by Sylvain Pion.
6131
61322004-05-05  Torbjorn Granlund  <tege@swox.com>
6133
6134	* mpn/generic/mullow_n.c, mpn/generic/mullow_basecase.c: New files
6135	(mainly by Niels M�ller).
6136	* configure.in, mpn/Makefile.am: Add them.
6137
6138	* gmp-impl.h (MULLOW_BASECASE_THRESHOLD, MULLOW_DC_THRESHOLD,
6139	MULLOW_MUL_N_THRESHOLD): Override for TUNE_PROGRAM_BUILD.
6140
6141	* tune/Makefile.am: Compile mullow_n.c.
6142	* tune/common.c (speed_mpn_mullow_n, speed_mpn_mullow_basecase):
6143	New functions.
6144	* tune/speed.c (routine): Add entries for mpn_mullow_n and
6145	mpn_mullow_basecase.
6146	* tune/speed.h (SPEED_ROUTINE_MPN_MULLOW_N_CALL,
6147	SPEED_ROUTINE_MPN_MULLOW_BASECASE): New #defines.
6148	* tune/tuneup.c (tune_mullow): New function.
6149
6150	* gmp-impl.h (invert_limb): Compute branch-freely.
6151
61522004-05-02  Kevin Ryde  <kevin@swox.se>
6153
6154	* mpn/amd64/mode1o.asm: Use movabsq to support large model non-PIC.
6155	Use 32-bit insns to save code bytes, and to save a couple of cycles on
6156	the initial setup multiplies.
6157
61582004-05-01  Kevin Ryde  <kevin@swox.se>
6159
6160	* doc/gmp.texi (References): Update gcc online docs url to
6161	gcc.gnu.org.
6162
6163	* configure.in (mips*-*-irix[6789]*): Correction to m4 quoting of this
6164	pattern.  (Believe the mips64*-*-* part also used picks up all current
6165	irix6 tuples anyway.)  Reported by Rainer Orth.
6166
61672004-04-30  Kevin Ryde  <kevin@swox.se>
6168
6169	* acinclude.m4 (GMP_PROG_CC_X86_GOT_EAX_EMITTED,
6170	GMP_ASM_X86_GOT_EAX_OK): New macros.
6171	(GMP_PROG_CC_WORKS): Use them to detect an old gas bug tickled by
6172	recent gcc.  Reported by David Newman.
6173
6174	* doc/gmp.texi (Reentrancy): Note also gmp_randinit_default as an
6175	alternative to gmp_randinit.
6176
61772004-04-29  Torbjorn Granlund  <tege@swox.com>
6178
6179	* configfsf.guess: Update to 2004-03-12.
6180	* configfsf.sub: Likewise.
6181
61822004-04-27  Torbjorn Granlund  <tege@swox.com>
6183
6184	* mpz/rrandomb.c (gmp_rrandomb): Rework to avoid extra limb allocation
6185	and to generate even numbers.
6186	* mpn/generic/random2.c (gmp_rrandomb): Likewise.
6187
61882004-04-25  Kevin Ryde  <kevin@swox.se>
6189
6190	* gmp-impl.h (FORCE_DOUBLE): Don't use an asm with a match constraint
6191	on a memory output, apparently not supported and provokes a warning
6192	from gcc 3.4.
6193
61942004-04-24  Kevin Ryde  <kevin@swox.se>
6195
6196	* longlong.h (count_leading_zeros_gcc_clz,
6197	count_trailing_zeros_gcc_ctz): New macros.
6198	(count_leading_zeros, count_trailing_zeros) [x86]: Use them on gcc
6199	3.4.
6200
6201	* configure.in (x86-*-* gcc_cflags_cpu): Give a -mtune at the start of
6202	each option list, for use by gcc 3.4 to avoid deprecation warnings
6203	about -mcpu.
6204
6205	* mpz/aorsmul.c, mpz/aorsmul_i.c, mpz/cfdiv_q_2exp.c,
6206	mpz/cfdiv_r_2exp.c, mpq/aors.c, mpf/ceilfloor.c: Give REGPARM_ATTR()
6207	on function definition too, as demanded by gcc 3.4.
6208
62092004-04-22  Kevin Ryde  <kevin@swox.se>
6210
6211	* tests/rand/t-lc2exp.c (check_bigc1): New test.
6212
6213	* doc/fdl.texi: Tweak @appendixsubsec -> @appendixsec to match our
6214	preference for this in an @appendix, and because texi2pdf doesn't
6215	support @appendixsubsec directly within an @appendix.
6216
62172004-04-20  Kevin Ryde  <kevin@swox.se>
6218
6219	* doc/texinfo.tex: Update to 2004-04-07.08 from texinfo 4.7.
6220	* doc/gmp.texi, mpfr/mpfr.texi (@copying): Don't put a line break in
6221	@ref within @copying, recent texinfo.tex doesn't like that.
6222
6223	* demos/perl/GMP.xs (static_functable): Treat cygwin the same as mingw
6224	DLLs.
6225
6226	* */Makefile.in, install-sh: Update to automake 1.8.3.
6227	* ltmain.sh, aclocal.m4, configure: Update to libtool 1.5.6.
6228
6229	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): Use a compile-time constant
6230	expression, rather than a configure test.
6231	* acinclude.m4, configure.in (GMP_C_RIGHT_SHIFT): Remove, no longer
6232	needed.
6233	* tests/t-hightomask.c: New file.
6234	* tests/Makefile.am (check_PROGRAMS): Add it.
6235
6236	* macos/configure (parse_top_configure): Look for PACKAGE_NAME and
6237	PACKAGE_VERSION now used by autoconf.
6238	(what_objects): Only demand 9 object files, as for instance occurs in
6239	the scanf directory.
6240	(asm files): Transform labels L(foo) -> Lfoo.  Take func name from
6241	PROLOGUE to support empty "EPILOGUE()".  Recognise and substitute
6242	register name "define()"s.
6243	* macos/Makefile.in (CmnObjs): Add tal-notreent.o.
6244
62452004-04-19  Torbjorn Granlund  <tege@swox.com>
6246
6247	* tune/speed.h (SPEED_ROUTINE_MPN_ROOTREM): New #define.
6248	(speed_mpn_rootrem): Declare.
6249	* tune/common.c (speed_mpn_rootrem): New function.
6250	* tune/speed.c (routine): Add entry for mpn_rootrem.
6251
62522004-04-16  Kevin Ryde  <kevin@swox.se>
6253
6254	* doc/fdl.texi: Update from FSF, just fixing a couple of typos.
6255
6256	* macos/configure, macos/Makefile.in: Add printf and scanf directories.
6257
6258	* tests/mpz/t-gcd.c (check_data): New function, exercising K6
6259	gcd_finda bug.
6260
62612004-04-14  Kevin Ryde  <kevin@swox.se>
6262
6263	* doc/gmp.texi (Reentrancy, Random State Initialization): Note
6264	gmp_randinit use of gmp_errno is not thread safe.  Reported by Vincent
6265	Lef�vre.
6266
6267	* doc/gmp.texi (Random State Initialization): Add index entries for
6268	gmp_errno and constants.
6269
6270	* mpn/m68k/README: Update _SHORT_LIMB -> __GMP_SHORT_LIMB.
6271
6272	* configure.in (--enable-mpbsd): Typo Berkley -> Berkeley in help msg.
6273
62742004-04-12  Kevin Ryde  <kevin@swox.se>
6275
6276	* demos/perl/GMP.xs (static_functable): New macro, use it for all
6277	function tables, to support mingw DLL builds.
6278	* demos/perl/INSTALL (NOTES FOR PARTICULAR SYSTEMS): Remove note on
6279	DLLs, should be ok now.
6280
6281	* demos/perl/sample.pl: Print the module and library versions in use.
6282
6283	* demos/perl/GMP.pm, Makefile.PL (VERSION): Set to '2.00'.
6284	* demos/perl/GMP.pm (COPYRIGHT): New in the doc section.
6285
6286	* Makefile.am: Note 4.1.3 libtool versioning info, and REVISION policy.
6287
6288	* tal-debug.c: Add <stdlib.h> for abort.
6289
62902004-04-07  Torbjorn Granlund  <tege@swox.com>
6291
6292	* tests/refmpf.c (refmpf_add_ulp): Adjust exponent when needed.
6293
6294	* mpn/generic/random2.c: Rewrite (clone mpz/rrandomb.c).
6295
62962004-04-07  Kevin Ryde  <kevin@swox.se>
6297
6298	* mpn/x86/k6/gcd_finda.asm: Correction jbe -> jb in initial setups.
6299	Zero flag is wrong here, it relects only the high limb of the compare,
6300	leading to n1>=n2 not satisfied and wrong results.  cp[1]==0x7FFFFFFF
6301	with cp[0]>=0x80000001 provokes this.
6302
6303	* doc/gmp.texi (BSD Compatible Functions): Note "pow" name clash under
6304	the pow function description too.
6305	(Language Bindings): Add XEmacs (betas at this stage).  Reported by
6306	Jerry James.
6307
6308	* tests/refmpn.c (refmpn_mod2): Correction to ASSERTs, r==a is allowed.
6309
6310	* gen-psqr.c (generate_mod): Cast mpz_invert_ui_2exp args, for K&R.
6311	* gen-bases.c, gen-fib.c, gen-psqr.c: For mpz_out_str, use stdout
6312	instead of 0, in case a K&R treats int and FILE* params differently.
6313
63142004-04-04  Kevin Ryde  <kevin@swox.se>
6315
6316	* gmp-impl.h (BSWAP_LIMB) [amd64]: New macro.
6317	(FORCE_DOUBLE): Use this for amd64 too.
6318
6319	* tests/amd64check.c, tests/amd64call.asm: New files, derived in part
6320	from x86check.c and x86call.asm.
6321	* tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add them.
6322	* configure.in (x86_64-*-* ABI=64): Use them.
6323
63242004-04-03  Kevin Ryde  <kevin@swox.se>
6325
6326	* mpn/amd64/mode1o.asm: New file.
6327	* mpn/amd64/amd64-defs.m4 (ASSERT): New macro.
6328
6329	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/pentium4/sse2/divrem_1.asm: Add
6330	note on how "dr" part of algorithm is handled.
6331
6332	* mpn/x86/k7/dive_1.asm, mpn/x86/k7/mod_34lsub1.asm,
6333	mpn/x86/k7/mode1o.asm: Note Hammer (32-bit mode) speeds.
6334
63352004-03-31  Kevin Ryde  <kevin@swox.se>
6336
6337	* doc/gmp.texi (Language Bindings): Add GOO, MLGMP and Numerix.
6338
6339	* mpf/mul_2exp.c, mpf/div_2exp.c: Rate u==0 as UNLIKELY.
6340
63412004-03-28  Torbjorn Granlund  <tege@swox.com>
6342
6343	* mpn/amd64/divrem_1.asm: Trim a few cycles.
6344
63452004-03-27  Torbjorn Granlund  <tege@swox.com>
6346
6347	* mpn/amd64/sublsh1_n.asm: Fix typo.
6348
6349	* mpn/generic/divrem_1.c: Fix typo.
6350
6351	* mpn/generic/sqr_basecase.c: Fix typo.
6352
6353	* mpn/amd64/divrem_1.asm: New file.
6354
63552004-03-20  Kevin Ryde  <kevin@swox.se>
6356
6357	* longlong.h (power, powerpc): Add comments on how we select this code.
6358
6359	* gmp-h.in (mpz_get_ui): Use ?: instead of mask style, gcc treats the
6360	two identically but ?: is a bit clearer.
6361
6362	* insert-dbl.c: Remove file, no longer used, scaling is now integrated
6363	in mpn_get_d.
6364	* Makefile.am (libgmp_la_SOURCES): Remove insert-dbl.c.
6365	* gmp-impl.h (__gmp_scale2): Remove prototype.
6366
63672004-03-17  Kevin Ryde  <kevin@swox.se>
6368
6369	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init, fake_cpuid_table): Add x86_64.
6370
6371	* mpq/get_d.c: Use mpn_tdiv_qr, demand den>0 per canonical form.
6372
63732004-03-16  Torbjorn Granlund  <tege@swox.com>
6374
6375	* mpn/generic/sqr_basecase.c: Add versions using mpn_addmul_2 and
6376	mpn_addmul_2s.
6377
63782004-03-14  Kevin Ryde  <kevin@swox.se>
6379
6380	* mpf/mul_ui.c: Incorporate carry from low limbs, for exactness.
6381	* tests/mpf/t-mul_ui.c: New file.
6382	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6383
6384	* mpf/div.c: Use mpn_tdiv_qr.  Use just one TMP_ALLOC.  Use full
6385	divisor, since truncating can lose accuracy.
6386	* tests/mpf/t-div.c: New file.
6387	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6388
6389	* tests/mpf/t-set_q.c, tests/mpf/t-ui_div.c (check_various): Amend
6390	bogus 99/4 test.
6391	* tests/mpf/t-ui_div.c (check_rand): Exercise r==v overlap.
6392
6393	* tests/refmpf.c, tests/tests.h (refmpf_set_overlap): New function.
6394
6395	* mpf/cmp_si.c [nails]: Correction, cast vval in exp comparisons, for
6396	when vval=-0x800..00 and limb==longlong.
6397
6398	* mpf/cmp_si.c [nails]: Correction, return usign instead of 1 when
6399	uexp==2 but value bigger than an mp_limb_t.
6400	* tests/mpf/t-cmp_si.c (check_data): Add test cases.
6401
6402	* tests/trace.c (mpf_trace): Use ABS(mp_trace_base) to allow for
6403	negative bases used for upper case hex in integer traces.
6404
64052004-03-12  Torbjorn Granlund  <tege@swox.com>
6406
6407	* mpn/generic/sb_divrem_mn.c: Correct header comment.
6408
64092004-03-11  Kevin Ryde  <kevin@swox.se>
6410
6411	* aclocal.m4, configure, ltmain.sh: Downgrade to libtool 1.5, version
6412	1.5.2 doesn't remove .libs/*.a files when rebuilding, which is bad for
6413	development when changing contents or with duplicate named files like
6414	we have.
6415
6416	Revert this, ie restore AR_FLAGS=cq:
6417	* acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
6418	does this itself on detecting duplicate object filenames in piecewise
6419	linking mode.
6420
6421	* randbui.c, randmui.c [longlong+nails]: Correction to conditionals
6422	for second limb.
6423
6424	* mpz/aors_ui.h, mpz/cdiv_q_ui.c, mpz/cdiv_qr_ui.c, mpz/cdiv_r_ui.c,
6425	mpz/cdiv_ui.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr_ui.c, mpz/fdiv_r_ui.c,
6426	mpz/fdiv_ui.c, mpz/gcd_ui.c, mpz/iset_ui.c, mpz/lcm_ui.c,
6427	mpz/set_ui.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr_ui.c, mpz/tdiv_r_ui.c,
6428	mpz/tdiv_ui.c, mpz/ui_sub.c, mpf/div_ui.c, mpf/mul_ui.c
6429	[longlong+nails]: Amend #if to avoid warnings about shift amount.
6430
64312004-03-07  Kevin Ryde  <kevin@swox.se>
6432
6433	* mpf/reldiff.c: Use rprec+ysize limbs for d, to ensure accurate
6434	result.  Inline mpf_abs(d,d) and mpf_cmp_ui(x,0), and rate the latter
6435	UNLIKELY.
6436
6437	* mpf/ui_div.c: Use mpn_tdiv_qr.  Use just one TMP_ALLOC.  Use full
6438	divisor, since truncating can lose accuracy.
6439	* tests/mpf/t-ui_div.c: New file.
6440	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6441
6442	* mpf/set_q.c: Expand TMP_ALLOC_LIMBS_2, to make conditional clearer
6443	and avoid 1 limb alloc when not wanted.
6444
6445	* gmp-impl.h (WANT_TMP_DEBUG): Define to 0 if not defined.
6446	(TMP_ALLOC_LIMBS_2): Use "if" within macro rather than "#if", for less
6447	preprocessor conditionals.
6448
6449	* mpf/mul_2exp.c, mpf/div_2exp.c: Add some comments.
6450
6451	* tests/refmpn.c (refmpn_sb_divrem_mn, refmpn_tdiv_qr): Nailify.
6452
64532004-03-04  Kevin Ryde  <kevin@swox.se>
6454
6455	* gen-psqr.c (print): Add CNST_LIMB in PERFSQR_MOD_TEST, for benefit
6456	of K&R.
6457	* tests/mpn/t-perfsqr.c (PERFSQR_MOD_1): Use CNST_LIMB for K&R.
6458
6459	* doc/configuration (Configure): Remove mkinstalldirs, no longer used.
6460
6461	* acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
6462	does this itself on detecting duplicate object filenames in piecewise
6463	linking mode.
6464
6465	* configure.in (hppa2.0*-*-*): Test sizeof(long) == 4 or 8 to verify
6466	ABI=2.0n versus ABI=2.0w.  In particular this lets CC=cc_bundled
6467	correctly fall back to ABI=2.0n (we don't automatically add CC=+DD64
6468	to that compiler, currently).
6469
6470	* doc/gmp.texi (Reentrancy): Note C++ mpf_class constructors using
6471	global default precision.
6472	(Random State Miscellaneous): Describe gmp_urandomb_ui as giving N
6473	bits.
6474	(C++ Interface Floats): Describe operator= copying the value, not the
6475	precision, and what this can mean about copy constructor versus
6476	default constructor plus assignment.
6477
6478	* mpf/set_q.c: Use mpn_tdiv_qr rather than mpn_divrem, so no shifting.
6479	Don't truncate the divisor, it can make the result inaccurate.
6480	* tests/mpf/t-set_q.c: New file.
6481	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6482
6483	* mpf/set.c: Use MPN_COPY_INCR, in case r==u and ABSIZ(u) > PREC(r)+1.
6484	No actual bug here, because MPN_COPY has thusfar been an alias for
6485	MPN_COPY_INCR, only an ASSERT failure.
6486	* tests/mpf/t-set.c: New file.
6487	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6488
6489	* mpf/set.c, mpf/iset.c: Do MPN_COPY last, for possible tail call.
6490
6491	* mpf/set_d.c: Rate d==0 as UNLIKELY.  Store size before extract call,
6492	to shorten lifespan of "negative".
6493
6494	* mpf/init.c, mpf/init2.c, mpf/iset_d.c, mpf/iset_si.c,
6495	mpf/iset_str.c, mpf/iset_ui.c: Store prec before alloc call, for one
6496	less live quantity across that call.
6497	* mpf/init.c, mpf/init2.c, mpf/iset_str.c: Store size and exp before
6498	alloc call, to overlap with other operations.
6499
6500	* tests/refmpf.c, tests/tests.h (refmpf_fill, refmpf_normalize,
6501	refmpf_validate, refmpf_validate_division): New functions.
6502
6503	* tests/refmpn.c, tests/tests.h (refmpn_copy_extend,
6504	refmpn_lshift_or_copy_any, refmpn_rshift_or_copy_any): New functions.
6505
6506	* tal-debug.c: Add <string.h> for strcmp.
6507
6508	* tests/cxx/t-istream.cc (check_mpz, check_mpq, check_mpf): Use size_t
6509	for loop index, to quieten g++ warning.
6510
65112004-03-02  Kevin Ryde  <kevin@swox.se>
6512
6513	* tests/mpn/t-hgcd.c: Use __GMP_PROTO on prototypes.
6514
65152004-03-01  Torbjorn Granlund  <tege@swox.com>
6516
6517	With Karl Hasselstr�m:
6518	* mpn/generic/dc_divrem_n.c (mpn_dc_div_2_by_1): New function, with
6519	meat from old mpn_dc_divrem_n.  Accept scratch parameter.  Rewrite to
6520	avoid a recursive call.
6521	(mpn_dc_div_3_by_2): New function, with meat from old
6522	mpn_dc_div_3_halves_by_2.  Accept scratch parameter.
6523	(mpn_dc_divrem_n): Now just allocate scratch space and call new
6524	mpn_dc_div_2_by_1.
6525
65262004-02-29  Kevin Ryde  <kevin@swox.se>
6527
6528	* longlong.h (count_leading_zeros) [alpha gcc]: New version, inlining
6529	mpn/alpha/cntlz.asm cmpbge technique.
6530
6531	* aclocal.m4, configure, install-sh, missing, ltmain.sh,
6532	*/Makefile.in: Update to automake 1.8.2 and libtool 1.5.2.
6533
6534	* doc/gmp.texi (C++ Interface Integers): Note / and % rounding follows
6535	C99 / and %.
6536	(Exact Remainder): Index entries for divisibility testing algorithm.
6537
6538	* tune/time.c (speed_endtime): Return 0.0 for negative time measured.
6539	Revise usage comments for clarity.
6540	* tune/common.c (speed_measure): Recognise speed_endtime 0.0 for
6541	failed measurement.
6542
6543	* tests/mpn/t-get_d.c (check_rand): Correction to nhigh_mask setup.
6544
65452004-02-27  Torbjorn Granlund  <tege@swox.com>
6546
6547	* tune/tuneup.c (tune_dc, tune_set_str): Up param.step_factor.
6548
6549	* tests/mpz/t-gcd.c: Decrease # of tests to 50.
6550
65512004-02-27  Kevin Ryde  <kevin@swox.se>
6552
6553	* tests/devel/try.c: Add a comment that this is not for Cray systems.
6554
6555	* mpf/set_q.c: Don't support den(q)<0, demand canonical form in the
6556	usual way.
6557
65582004-02-24  Torbjorn Granlund  <tege@swox.com>
6559
6560	From Kevin:
6561	* mpn/generic/mul_fft.c (mpn_fft_add_modF): Loop until normalization
6562	criterion met.
6563
65642004-02-22  Kevin Ryde  <kevin@swox.se>
6565
6566	* acinclude.m4 (GMP_PROG_CC_WORKS, GMP_OS_X86_XMM, GMP_PROG_CXX_WORKS):
6567	Remove files that might look like compiler output, so our "||"
6568	alternatives are not fooled.
6569
6570	* acinclude.m4 (GMP_PROG_CC_WORKS): Add test for lshift_com code
6571	mis-compiled by certain IA-64 HP cc at +O3.
6572
6573	* gmp-impl.h (USE_LEADING_REGPARM): Disable under prof or gprof, for
6574	the benefit of freebsd where .mcount clobbers registers.  Spotted by
6575	Torbjorn.
6576	* configure.in (WANT_PROFILING_PROF, WANT_PROFILING_GPROF): New
6577	AC_DEFINEs.
6578
65792004-02-21  Kevin Ryde  <kevin@swox.se>
6580
6581	* configure.in (sparc64-*-*bsd*): Amend -m32 setup for ABI=32, so it's
6582	not used in ABI=64 on the BSD systems.
6583
65842004-02-18  Niels M�ller  <nisse@lysator.liu.se>
6585
6586	* tests/mpz/t-gcd.c (gcdext_valid_p): New function.
6587	(ref_mpz_gcd): Deleted function.
6588	(one_test): Rearranged to call mpz_gcdext first, so that the
6589	returned value can be validated.
6590	(main): Don't use ref_mpz_gcd.
6591
65922004-02-18  Torbjorn Granlund  <tege@swox.com>
6593
6594	* gmp-impl.h (MPN_TOOM3_MAX_N): Move to !WANT_FFT section.
6595
6596	* tests/mpz/t-mul.c: Exclude special huge operands unless WANT_FFT.
6597
6598	* mpz/rrandomb.c (gmp_rrandomb): Rewrite.
6599
6600	* mpn/generic/mul_n.c (mpn_toom3_sqr_n): Remove write-only variable c5.
6601
66022004-02-18  Kevin Ryde  <kevin@swox.se>
6603
6604	* mpf/iset_si.c, mpf/iset_ui.c, mpf/set_si.c, mpf/set_ui.c [nails]:
6605	Always store second limb, to avoid a conditional.
6606
6607	* tests/mpf/t-get_ui.c: New file.
6608	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6609	* tests/mpf/t-get_si.c (check_limbdata): Further tests.
6610	* gmp-impl.h (MP_EXP_T_MAX, MP_EXP_T_MIN): New defines.
6611
6612	* mpf/get_ui.c, mpf/get_si.c: Remove size==0 test, it's covered by
6613	other conditions.  Attempt greater clarity by expressing conditions as
6614	based on available data range.
6615	* mpf/get_si.c [nails]: Correction, don't bail on exp > abs_size,
6616	since may still have second limb above radix point available.
6617	* mpf/get_ui.c: Nailify.
6618
66192004-02-16  Kevin Ryde  <kevin@swox.se>
6620
6621	* mpz/scan0.c, mpz/scan1.c: Use count_trailing_zeros, instead of
6622	count_leading_zeros on limb&-limb.
6623
6624	* mpf/sqrt.c: Use "/ 2" for exp, avoiding C undefined behaviour on
6625	">>" of negatives.  Correction to comment, exp is rounded upwards.
6626	SIZ(r) always prec now, no need for tsize expression.  Store EXP(r)
6627	and SIZ(r) where calculated to reduce variable lifespans.  Make tsize
6628	mp_size_t not mp_exp_t, though of course those are currently the same.
6629
6630	* gmp-h.in (GMP_ERROR_ALLOCATE, GMP_ERROR_BAD_STRING,
6631	GMP_ERROR_UNUSED_ERROR): Remove, never used or documented, and we
6632	don't want to use globals for communicating error information.
6633
6634	* mpz/gcd_ui.c [nails]: Correction, actually return a value.
6635
6636	* mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails==1]: Add code.
6637
66382004-02-15  Kevin Ryde  <kevin@swox.se>
6639
6640	* tests/mpz/t-jac.c (check_data): Remove unnecessary variable
6641	"answer".
6642
66432004-02-14  Torbjorn Granlund  <tege@swox.com>
6644
6645	* mpn/ia64/aors_n.asm: Break a group with a RAW conflict.
6646
66472004-02-14  Kevin Ryde  <kevin@swox.se>
6648
6649	* acinclude.m4 (GMP_C_RIGHT_SHIFT): Note that it's "long"s which we're
6650	concerned about.
6651
6652	* mpn/generic/mul_n.c: Add some remarks about toom3 high zero
6653	stripping.
6654
6655	* mpn/generic/scan0.c, mpn/generic/scan1.c: Remove design issue
6656	remarks.  What to do about going outside `up' space is a problem, but
6657	anything to address it would be an incompatible change.
6658
66592004-02-12  Torbjorn Granlund  <tege@swox.com>
6660
6661	* tests/mpn/t-hgcd.c: Remove unused variables.
6662
6663	* mpn/ia64/hamdist.asm: Remove bundling incompatible with HP-UX
6664	assembler.  Misc HP-UX changes.
6665	* mpn/ia64/gcd_1.asm: Add some syntax to placid the HP-UX assembler.
6666
66672004-02-11  Kevin Ryde  <kevin@swox.se>
6668
6669	* longlong.h (power, powerpc): Use HAVE_HOST_CPU_FAMILY_power and
6670	HAVE_HOST_CPU_FAMILY_powerpc rather than various cpp defines.
6671
6672	* gmp-impl.h: Add remarks about limits.h and Cray etc.
6673
6674	* mpn/ia64/mul_1.asm: Don't put .pred directives on labelled lines,
6675	hpux 11.23 assembler doesn't like that.
6676	* mpn/ia64/README: Add a note on this.
6677
6678	* dumbmp.c (mpz_mul): Set ALLOC(r) for new data block used.  Reported
6679	by Jason Moxham.
6680
6681	* mpn/pa32/README, mpn/pa64/README (REFERENCES): New sections.
6682
66832004-02-10  Torbjorn Granlund  <tege@swox.com>
6684
6685	* tests/mpz/t-gcd.c: Decrease # of tests run.
6686
6687	* mpn/*/gmp-mparam.h: Add HGCD values, update TOOM values.
6688
66892004-02-01  Torbjorn Granlund  <tege@swox.com>
6690
6691	From Kevin:
6692	* config.guess: Recognize AMD's hammer processors, return x86_64.
6693
66942004-01-31  Niels M�ller  <nisse@lysator.liu.se>
6695
6696	* mpn/generic/hgcd.c (mpn_cmp_sum3): Declare static.
6697
66982004-01-25  Niels M�ller  <nisse@lysator.liu.se>
6699
6700	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-hgcd.
6701
6702	* mpn/generic/hgcd.c (hgcd_jebelean): Simplify, use mpn_cmp_sum3.
6703	(mpn_cmp_sum3): New function.
6704	(mpn_diff_smaller_p): Remove.
6705	(hgcd_final, hgcd_jebelean, hgcd_small_1, hgcd_small_2, euclid_step):
6706	Remove tp,talloc arguments.  Callers changed.
6707
67082004-01-25  Torbjorn Granlund  <tege@swox.com>
6709
6710	* tune/tuneup.c (all): Reenable calls of tune_gcd_schoenhage and
6711	tune_hgcd.
6712
6713	* mpn/generic/gcd.c: Reenable Schoenhage code.
6714
6715	With Niels M�ller:
6716	* mpn/generic/hgcd.c: Add const and inline to several functions.
6717	(qstack_push_start qstack_push_end qstack_push_quotient): Remove.
6718	(euclid_step): Insert removed functions here.
6719	(hgcd_adjust): Simplify, don't handle d != 1.
6720	(qstack_adjust): Corresponding changes.
6721	(mpn_hgcd2_lehmer_step): Remove redundant tests for bh against zero.
6722	(hgcd_start_row_p): Tweak.
6723	(hgcd_final): Shorten life of ralloc.
6724
67252004-01-24  Kevin Ryde  <kevin@swox.se>
6726
6727	* tests/mpf/t-sqrt.c (check_rand1): Further diagnostic printouts.
6728
6729	* mpn/generic/sqrtrem.c (mpn_sqrtrem): Add ASSERT_MPN.
6730	(mpn_dc_sqrtrem): Add casts for K&R.
6731
6732	* mpf/sqrt_ui.c: Nailify.
6733
6734	* mpf/set_z.c: Do MPN_COPY last, for possible tail call.
6735
6736	* doc/gmp.texi (Miscellaneous Float Functions): For mpf_random2, note
6737	exponent is in limbs.
6738
6739	* mpn/ia64/README: Add remark about concentrating on itanium-2.
6740
67412004-01-22  Kevin Ryde  <kevin@swox.se>
6742
6743	* mpf/sqrt.c: Change tsize calculation to get prec limbs result
6744	always, previously got prec+1 when exp was odd.
6745	* tests/mpf/t-sqrt.c (check_rand1): New function, code from main.
6746	(check_rand2): New function.
6747
6748	* mpf/sqrt_ui.c: Change rsize calculation to get prec limbs result,
6749	previously got prec+1.
6750	* tests/mpf/t-sqrt_ui.c: New file.
6751	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6752
6753	* tests/refmpf.c, tests/tests.h (refmpf_add_ulp,
6754	refmpf_set_prec_limbs): New functions.
6755
6756	* mpz/get_d_2exp.c, mpf/get_d_2exp.c: Remove x86+m68k force to double,
6757	mpn_get_d now does this.  Remove res==1.0 check for round upwards,
6758	mpn_get_d now rounds towards zero.  Move exp store to make mpn_get_d a
6759	tail call.
6760
6761	* configure.in (x86-*-*): Use ABI=32 rather than ABI=standard.
6762	Use gcc -m32 when available, to force mode on bi-arch amd64 gcc.
6763	* configure.in, acinclude.m4 (x86_64-*-*): Merge into plain x86 setups
6764	as ABI=64.  Support ABI=32, using athlon code.  Use gcc -mcpu=k8,
6765	-march=k8.
6766	(amd64-*-*): Remove pattern, config.sub only gives x86_64.
6767	* doc/gmp.texi (ABI and ISA): Add x86_64 dual ABIs.
6768
6769	* mpn/amd64/README: Add reference to ABI spec.
6770
67712004-01-17  Niels M�ller  <nisse@lysator.liu.se>
6772
6773	* mpn/generic/hgcd.c (hgcd_adjust): Backed out mpn_addlsh1_n
6774	change for now.
6775
6776	* mpn/generic/hgcd.c (hgcd_adjust): Fixed calls of mpn_addlsh1_n.
6777
67782004-01-17  Kevin Ryde  <kevin@swox.se>
6779
6780	* tune/README: Remove open/mpn versions of toom3, no longer exist.
6781	* tune/powerpc64.asm: Remove unused L(again).
6782	* tune/time.c (mftb): Note single mftb possible for powerpc64.
6783
6784	* mpn/generic/mode1o.c: Use "c<s" to do underflow detection in last
6785	step, for better parallelism.
6786
6787	* mpn/generic/get_d.c: Preserve comments about hppa fcnv,udw,dbl from
6788	previous mpz_get_d code.
6789
6790	* tune/freq.c: Add some comments about systems not covered.
6791
6792	* gmp-h.in (_GMP_H_HAVE_FILE): Add _MSL_STDIO_H for Metrowerks.
6793	Reported by Tomas Zahradnicky.
6794
67952004-01-16  Niels M�ller  <nisse@lysator.liu.se>
6796
6797	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Use MPN_DECR_U.
6798	(hgcd_adjust): Use mpn_addlsh1_n when available.
6799
68002004-01-16  Kevin Ryde  <kevin@swox.se>
6801
6802	* configure.in (powerpc64-*-linux*): Try gcc64.  Try -m64 with
6803	"cflags_maybe" to get it used in all probing.  Add sizeof-long-8 test
6804	to check the mode is right if -m64 is not applicable.
6805
68062004-01-15  Kevin Ryde  <kevin@swox.se>
6807
6808	* configure.in (--with-readline=detect): Check for readline/readline.h
6809	and readline/history.h.  Report result of detection.
6810
68112004-01-14  Niels M�ller  <nisse@lysator.liu.se>
6812
6813	* tune/speed.c (routine): Disabled speed_mpn_hgcd_lehmer.
6814	* tune/common.c (speed_mpn_hgcd_lehmer): Disabled function.
6815
6816	* mpn/generic/hgcd.c (mpn_hgcd_lehmer_itch, mpn_hgcd_lehmer)
6817	(mpn_hgcd_equal): Deleted functions.
6818
6819	* mpn/generic/gcd.c (hgcd_start_row_p): Deleted function.
6820	(gcd_schoenhage): Deleted assertion code using mpn_hgcd_lehmer.
6821
6822	* mpn/generic/hgcd.c (hgcd_final): Fixed ASSERT typos.
6823	(mpn_hgcd): To use Lehmer's algorithm, call hgcd_final directly,
6824	not mpn_hgcd_lehmer.
6825
6826	* mpn/generic/gcd.c (gcd_schoenhage): Updated for changes to
6827	mpn_hgcd and mpn_hgcd_fix. (Schoenhage code is still disabled).
6828
6829	* gmp-impl.h (mpn_hgcd_fix): Updated prototype.
6830
6831	* mpn/generic/hgcd.c (mpn_hgcd_fix): Replaced a bunch of arguments
6832	by a pointer const struct hgcd_row *s. Updated callers.
6833
6834	* mpn/generic/hgcd.c (hgcd_start_row_p): Use const for the input.
6835	Moved function definition before hgcd_jebelean.
6836	(hgcd_jebelean): Interface change, analogous to hgcd2.
6837	(mpn_hgcd_fix): Normalize v. Require that v > 0.
6838	(hgcd_adjust): Fix bug in carry update.
6839	(mpn_hgcd): Reorganized again, to adapt to mpn_hgcd/hgcd_jebelean
6840	now sometimes returning 1. Reintroduced hgcd_adjust.
6841
6842	* mpn/generic/hgcd.c (hgcd_final): Streamlined logic for the first
6843	hgcd2 call.
6844
6845	* mpn/generic/hgcd2.c (mpn_hgcd2): Interface change. Return 1
6846	instead of 2, in the no progress case r0=A, r1=B.
6847
6848	* mpn/generic/hgcd.c (hgcd_adjust): Changed arguments and return
6849	value. Now takes a struct hgcd_row * and the uv size, and returns
6850	updated uvsize.
6851	(hgcd_final): Special handling of the case hgcd2 returning 1. Now
6852	uses hgcd_adjust, instead of a full Euclid division.
6853
68542004-01-13  Niels M�ller  <nisse@lysator.liu.se>
6855
6856	* mpn/generic/hgcd.c (euclid_step, hgcd_case0): Merged into a
6857	single function euclid_step.
6858	(mpn_hgcd): Reorganized the logic for the second recursive call.
6859	Avoid unnecessary Euclid steps.
6860
6861	* tests/mpn/t-hgcd.c (hgcd_values): One more test value.
6862
6863	* tests/mpn/t-hgcd.c (hgcd_values): Added values that trigged the
6864	hgcd_jebelean bug.
6865
6866	* mpn/generic/hgcd.c (hgcd_jebelean): Fixed off by one error.
6867	(mpn_hgcd): Simplified the logic for the first recursive call. Now
6868	it uses only the correct values from the recursive call, and
6869	doesn't do tricks with hgcd_adjust (hgcd_adjust will probably be
6870	reintroduced later, though).
6871
6872	* tests/mpn/t-hgcd.c (mpz_mpn_equal, hgcd_ref_equal)
6873	(hgcd_ref_init, hgcd_ref_clear): New functions.
6874	(hgcd_ref): Reference implementation of hgcd, using mpz.
6875	(one_test): Use hgcd_ref. Don't use mpn_hgcd_lehmer.
6876	(main): Skip one_step if both input values are zero.
6877
68782004-01-12  Niels M�ller  <nisse@lysator.liu.se>
6879
6880	* mpn/generic/hgcd.c (hgcd_final): Rewritten, now uses Lehmer
6881	steps instead of a division loop.
6882	(mpn_hgcd_lehmer): Deleted old Lehmer code, instead just
6883	initialize and then call hgcd_final.
6884
6885	* tests/tests.h: Added refmpn_free_limbs prototype.
6886	* tests/refmpn.c (refmpn_free_limbs): New function.
6887
6888	* tests/mpn/t-hgcd.c: Try the same kind of random inputs as for
6889	mpz/t-gcd.
6890
68912004-01-11  Niels M�ller  <nisse@lysator.liu.se>
6892
6893	* mpn/generic/hgcd.c (mpn_hgcd_lehmer): Rewritten, after some more
6894	analysis of the size reduction for one Lehmer step.
6895
6896	* tests/mpn/t-hgcd.c: New file.
6897
68982004-01-11  Torbjorn Granlund  <tege@swox.com>
6899
6900	With Niels M�ller:
6901	* mpn/generic/hgcd.c (hgcd_normalize): Fix ASSERTs.
6902	(hgcd_mul): Normalize R[1].uvp[1].  Add some more ASSERTs.
6903	(hgcd_update_uv): Streamline.  ASSERT that input and output is
6904	normalized.
6905
69062004-01-11  Kevin Ryde  <kevin@swox.se>
6907
6908	* mpn/alpha/ev6/slot.pl: New file, derived in part from
6909	mpn/x86/k6/cross.pl.
6910
6911	* mpn/alpha/alpha-defs.m4 (ASSERT): New macro.
6912
6913	* mpn/asm-defs.m4 (m4_ifdef): New macro, avoiding OSF 4.0 m4 bug.
6914	(m4_assert_defined): Use it.
6915
6916	* mpn/alpha/default.m4, mpn/alpha/unicos.m4 (LDGP): New macro.
6917	* mpn/alpha/ev67/gcd_1.asm: Use it to re-establish gp after jsr.
6918
6919	* configure.in, demos/calc/Makefile.am: Use -lcurses or -lncurses with
6920	readline, when available.
6921
6922	* longlong.h (sub_ddmmss) [generic]: Use al<bl for the borrow rather
6923	than __x>al, since the former can be done without waiting for __x,
6924	helping superscalar chips, in particular alpha ev5 and ev6.
6925
6926	* longlong.h (sub_ddmmss) [ia64]: New macro.
6927
6928	* tests/t-sub.c: New file.
6929	* tests/Makefile.am (check_PROGRAMS): Add it.
6930	* tests/refmpn.c, tests/tests.h (refmpn_sub_ddmmss): New function.
6931
69322004-01-09  Kevin Ryde  <kevin@swox.se>
6933
6934	* mpn/x86/p6/mod_34lsub1.asm: New file, derived in part from
6935	mpn/x86/mod_34lsub1.asm.
6936
6937	* configure.in (IA64_PATTERN): Use -mtune on gcc 3.4.
6938
69392004-01-07  Kevin Ryde  <kevin@swox.se>
6940
6941	* gmp-h.in, mp-h.in (__GMP_SHORT_LIMB): Renamed from _SHORT_LIMB, to
6942	keep in our namespace.  (Not actually used anywhere currently.)
6943	Reported by Patrick Pelissier.
6944
6945	* mp-h.in: Use "! defined (__GMP_WITHIN_CONFIGURE)" in the same style
6946	as gmp-h.in (though mp-h.in is not actually used during configure).
6947
6948	* mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
6949	Use __dllexport__ and __dllimport__ to keep out of application
6950	namespace.  Same previously done in gmp-h.in.
6951
69522004-01-06  Kevin Ryde  <kevin@swox.se>
6953
6954	* configfsf.sub, configfsf.guess: Update to 2004-01-05.
6955	* configure.in (amd64-*-* | x86_64-*-*): Update comments on what
6956	configfsf.sub does.
6957
69582004-01-04  Kevin Ryde  <kevin@swox.se>
6959
6960	* mpn/alpha/README (REFERENCES): Add tru64 assembly manuals.
6961	(ASSEMBLY RULES): Note what gcc says about !literal! etc.
6962
69632004-01-03  Kevin Ryde  <kevin@swox.se>
6964
6965	* mpn/alpha/ev67/gcd_1.asm: New file.
6966
6967	* mpn/x86/pentium4/sse2/rsh1add_n.asm: New file, derived in part from
6968	mpn/x86/pentium4/sse2/addlsh1_n.asm.
6969
6970	* mpn/x86/p6/p3mmx/popham.asm: Note measured speeds.
6971
6972	* mpn/ia64/hamdist.asm: Correction to inputs vs locals in alloc (makes
6973	no difference to the generated code).  Corrections to a couple of
6974	comments.
6975
6976	* mpn/x86/pentium4/sse2/addlsh1_n.asm (PARAM_CARRY): Remove macro, not
6977	used, no such parameter.
6978
6979	* mpn/generic/gcd.c: Use <stdio.h> for NULL.
6980
6981	* doc/gmp.texi (Single Limb Division): Correction to tex expression
6982	for (1/2)x1.  And minor wording tweaks elsewhere.
6983
6984	* gmp-impl.h (mpn_rsh1add_n, mpn_rsh1sub_n): Correction to comments
6985	about how carries returned.
6986
6987	* longlong.h (umul_ppmm) [generic]: Add comments about squaring
6988	(dropped from tasks list)
6989
69902003-12-31  Kevin Ryde  <kevin@swox.se>
6991
6992	* demos/perl/GMP.xs (scan0, scan1): Return ~0 for not-found.
6993	* demos/perl/GMP.pm: Describe this, remove the note about ULONG_MAX
6994	being the same as ~0 (which is not true in old perl).
6995	* demos/perl/test.pl: Update tests.
6996	* demos/perl/typemap (gmp_UV): New type.
6997
6998	* demos/perl/test.pl (fits_slong_p): Comment out uv_max test, it won't
6999	necessarily exceed a long.
7000
7001	* demos/perl/GMP.pm: Add a remark about get_str to the bugs section.
7002
7003	* mpn/generic/sqrtrem.c, mpz/fac_ui.c, tests/mpf/reuse.c: Add casts
7004	for K&R.
7005	* tests/mpf/t-muldiv.c: Make ulimb, vlimb into ulongs, which is how
7006	they're used, for the benefit of K&R calling.
7007
7008	* doc/gmp.texi (Square Root Algorithm): Add a summary of the algorithm.
7009	And add further index entries in various places.
7010
7011	* mpz/lucnum_ui.c, mpz/lucnum2_ui.c: Use mpn_addlsh1_n when available.
7012
7013	* gmp-impl.h, mpn/generic/mul_n.c (mpn_addlsh1_n, mpn_sublsh1_n,
7014	mpn_rsh1add_n, mpn_rsh1sub_n): Move descriptions to gmp-impl.h with
7015	the prototypes, for ease of locating.
7016
70172003-12-30  Torbjorn Granlund  <tege@swox.com>
7018
7019	* tune/tuneup.c (all): Disable calls of tune_gcd_schoenhage and
7020	tune_hgcd for now.
7021
70222003-12-29  Torbjorn Granlund  <tege@swox.com>
7023
7024	* tests/mpz/t-gcd.c: Rewrite, based on suggestions by Kevin.
7025
7026	* mpn/ia64/mul_1.asm: Amend TODO list.
7027
7028	* mpn/sparc64/README: Remove mpn_Xmul_2, done.
7029	Add blurb about L1 cache conflicts.
7030
7031	* mpn/generic/gcd.c: Disable Schoenhage code for now.
7032
70332003-12-29  Kevin Ryde  <kevin@swox.se>
7034
7035	* mpn/generic/mul_fft.c, mpz/root.c, mpq/cmp_ui.c: Add casts for K&R.
7036
70372003-12-27  Kevin Ryde  <kevin@swox.se>
7038
7039	* tests/mpz/t-mul.c (mul_kara, mul_basecase): Use __GMP_PROTO.
7040
7041	* mpn/generic/gcd.c (NHGCD_SWAP4_2, NHGCD_SWAP3_LEFT),
7042	mpn/generic/hgcd.c (HGCD_SWAP4_LEFT, HGCD_SWAP4_RIGHT, HGCD_SWAP4_2,
7043	HGCD_SWAP3_LEFT): Aggregate initializers for automatics is an
7044	ANSI-ism, avoid.
7045
7046	* Makefile.am (AUTOMAKE_OPTIONS): Restore this, giving no directory on
7047	ansi2knr to avoid a circular build rule.
7048	* configure.in (AM_INIT_AUTOMAKE): Note options also in Makefile.am.
7049
7050	* configure.in (cflags_maybe): Don't loop adding cflags_maybe if the
7051	user has set CFLAGS.
7052
70532003-12-24  Torbjorn Granlund  <tege@swox.com>
7054
7055	* mpn/generic/gcd.c (gcd_schoenhage_itch): Avoid unary "+".
7056	(mpn_gcd): Allocate scratch space on heap for gcd_schoenhage.
7057	(mpn_gcd): Don't invoke MPN_NORMALIZE on input operands.
7058
70592003-12-23  Kevin Ryde  <kevin@swox.se>
7060
7061	* configure.in (*sparc*-*-*): Test sizeof(long)==4 or 8 for ABIs, to
7062	get the right mode when the user sets the CFLAGS.
7063	(testlist): Introduce "any_<abi>_testlist" to apply to all compilers.
7064
7065	* demos/perl/typemap (MPZ_ASSUME, MPQ_ASSUME, MPF_ASSUME): Remove
7066	output rules, these are only meant for inputs.
7067	(MPZ_MUTATE): Remove, not used since changes for magic.
7068
7069	* demos/perl/GMP.xs (mpz_class_hv, mpq_class_hv, mpf_class_hv): New
7070	variables, initialized in BOOT.
7071	* demos/perl/GMP.xs, demos/perl/typemap: Use them and explicit
7072	sv_bless, to save a gv_stashpv for every new object.
7073
70742003-12-22  Kevin Ryde  <kevin@swox.se>
7075
7076	* mpn/alpha/mode1o.c, mpn/alpha/dive_1.c: Moved from ev5/mode1o.c and
7077	ev5/dive_1.c, these are good for ev4, and would like them in a generic
7078	alpha build.
7079
70802003-12-21  Kevin Ryde  <kevin@swox.se>
7081
7082	* doc/gmp.texi (Integer Logic and Bit Fiddling): Say "bitwise" in
7083	mpz_and, mpz_ior and mpz_xor, to avoid any confusion with what C means
7084	by "logical".  Reported by R�diger Sch�tz.
7085
7086	* gmp-h.in (_GMP_H_HAVE_FILE): Note why defined(EOF) is not good.
7087
70882003-12-20  Torbjorn Granlund  <tege@swox.com>
7089
7090	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Use mpn_cmp instead of
7091	mpn_sub_n where possible.  Use mp_size_t for relevant variables.
7092
70932003-12-20  Kevin Ryde  <kevin@swox.se>
7094
7095	* tune/speed.h (SPEED_TMP_ALLOC_LIMBS): Correction to last change,
7096	don't want "- 1" on the TMP_ALLOC_LIMBS.
7097
7098	* demos/expr/expr.h: Test #ifdef MPFR_VERSION_MAJOR for when mpfr.h is
7099	included, not GMP_RNDZ which is now an enum.
7100
7101	* demos/expr/exprfra.c (e_mpfr_ulong_p): Use mpfr_integer_p and
7102	mpfr_fits_ulong_p.
7103	(e_mpfr_get_ui_fits): Use mpfr_get_ui.
7104
7105	* mpfr/*: Update to mpfr cvs head 2003-12-20.
7106
7107	* configure, config.in: Update to autoconf 2.59.
7108	* */Makefile.in, configure, aclocal.m4, ansi2knr.c, install-sh,
7109	doc/mdate-sh: Update to automake 1.8.
7110
7111	* mkinstalldirs: Remove, not required by automake 1.8.
7112	* doc/gmp.texi (Build Options): HTML is a usual target in automake 1.8.
7113
7114	* configure.in (AC_PREREQ): Require autoconf 2.59.
7115	(AM_INIT_AUTOMAKE): Require automake 1.8.
7116	(AC_C_INLINE): Use rather than GMP_C_INLINE, now has #ifndef
7117	__cplusplus we want.
7118	(gettimeofday): Use AC_CHECK_FUNCS rather than our workaround code,
7119	autoconf now ok.
7120
7121	* acinclude.m4 (GMP_C_INLINE): Remove.
7122	(GMP_H_EXTERN_INLINE): Use AC_C_INLINE.
7123	(GMP_PROG_AR): Comment on automake $ARFLAGS.
7124
71252003-12-19  Niels M�ller  <nisse@lysator.liu.se>
7126
7127	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Rewrote function. Tried
7128	to explain how it works.
7129	(slow_diff_smaller_p, wrap_mpn_diff_smaller_p) [WANT_ASSERT]: Use
7130	CPP to wrap assertion checks around all calls to
7131	mpn_diff_smaller_p.
7132
7133	* mpn/generic/hgcd.c (mpn_addmul2_n_1) [nails]: Fixed carry handling.
7134
7135	* mpn/generic/hgcd.c (mpn_diff_smaller_p) [nails]: Use
7136	GMP_NUMB_MAX, not MP_LIMB_T_MAX.
7137	(mpn_hgcd_itch): Improved size calculation.
7138	(mpn_hgcd_max_recursion): Moved function from qstack.c. Should to
7139	be recompiled when HGCD_SCHOENHAGE_THRESHOLD is tuned.
7140
7141	* mpn/generic/qstack.c (mpn_hgcd_max_recursion): ... moved from
7142	here.
7143
71442003-12-19  Torbjorn Granlund  <tege@swox.com>
7145
7146	* tests/mpf/t-get_d.c: Print message before aborting.
7147
7148	* mpn/generic/hgcd2.c (mpn_hgcd2): Substitute always-zero variable
7149	with 0.  Remove bogus comment.
7150
7151	* mpn/generic/get_d.c: Make ONE_LIMB case actually work for nails.
7152
71532003-12-18  Niels M�ller  <niels@lysator.liu.se>
7154
7155	* mpn/generic/hgcd.c (hgcd_update_r): Assert that the output r2 is
7156	smaller than the input r1.
7157
71582003-12-18  Torbjorn Granlund  <tege@swox.com>
7159
7160	* mpz/get_d.c: Don't include longlong.h.
7161
7162	* tests/mpz/t-mul.c (ref_mpn_mul): Handle un == vn specially, to avoid
7163	a dummy r/w outside of allocated area.
7164
71652003-12-18  Kevin Ryde  <kevin@swox.se>
7166
7167	* mpn/alpha/unicos.m4 (ALIGN): Add comments on what GCC does.
7168
7169	* configure.in (fat setups), acinclude.m4 (GMP_INIT): Obscure
7170	include() from automake 1.8 aclocal.
7171	* acinclude.m4: Quote names in AC_DEFUN, for automake 1.8 aclocal.
7172
71732003-12-17  Niels M�ller  <nisse@lysator.liu.se>
7174
7175	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer) [nails]:
7176	Enabled code also for GMP_NAIL_BITS > 0.
7177	* tune/speed.c [nails]: Enable speed_mpn_hgcd and
7178	speed_mpn_hgcd_lehmer.
7179	* tune/tuneup.c (tune_hgcd) [nails]: Likewise.
7180
7181	* mpn/generic/gcd.c [nails]: Use Sch�nhage's algorithm also for
7182	GMP_NAIL_BITS > 0.
7183
7184	* mpn/generic/hgcd.c [nails]: Enable the code for GMP_NAIL_BITS > 0.
7185	(MPN_EXTRACT_LIMB) [nails]: Handle nails.
7186	(__gmpn_hgcd_sanity): Allocate temporaries on the heap, not on the
7187	stack. Also check that r[i] >= r[i+1].
7188	(mpn_hgcd2_lehmer_step) [nails]: Handle nails.
7189	(mpn_hgcd_lehmer): When we temporarily have r3 > r2, avoid
7190	trigging that assert in __gmpn_hgcd_sanity.
7191	(mpn_hgcd): Likewise.
7192
7193	* mpn/generic/hgcd2.c (div2) [nails]: Alternative nail-aware
7194	version.
7195	(SUB_2): New macro of Kevin's, which reduces do sub_ddmmss in the
7196	non-nail case.
7197	(HGCD2_STEP): Use SUB_2, not sub_ddmmss. Added alternative version
7198	for K&R compilers.
7199	(mpn_hgcd2) [nails]: Use SUB_2, not sub_ddmmss. New nail-aware
7200	code for checking Jebelean's condition.
7201
72022003-12-13  Kevin Ryde  <kevin@swox.se>
7203
7204	* mpq/get_d.c: Amend comments per mpn_get_d change.
7205	(limb2dbl): Remove, no longer used.
7206
7207	* gmp-impl.h (DIVREM_1_NORM_THRESHOLD etc) [nails]: Correction to
7208	comments, MP_SIZE_T_MAX means preinv never.
7209
7210	* gmp-impl.h (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD) [nails]:
7211	Remove overrides, divexact_1 and modexact_1 have been nailified.
7212
7213	* mpz/inp_str.c (mpz_inp_str_nowhite): Use ASSERT_ALWAYS for EOF value
7214	requirement.
7215
7216	* tests/refmpn.c (refmpn_rsh1add_n, refmpn_rsh1sub_n): Parens around
7217	GMP_NUMB_BITS - 1 with ">>", to quieten gcc -Wall.
7218	* tests/t-constants.c (main), tests/t-count_zeros.c (check_clz),
7219	tests/t-modlinv.c (one), tests/mpz/t-jac.c (try_si_zi),
7220	tests/mpq/t-get_d.c (check_onebit): : Correction to printfs.
7221	* tests/mpn/t-fat.c: Add <string.h> for memcpy.
7222	* tests/mpz/t-scan.c (check_ref): Remove unused variable "isigned".
7223	* tests/mpq/t-get_d.c (check_onebit): Remove unused variable "limit".
7224	* tests/mpf/t-set_si.c, tests/mpf/t-set_ui.c (check_data): Braces for
7225	initializers.
7226	* tests/devel/try.c (mpn_divexact_by3_fun, mpn_modexact_1_odd_fun):
7227	Correction to return values.
7228
7229	* doc/gmp.texi (Miscellaneous Integer Functions): Note mpz_sizeinbase
7230	can be used to locate the most significant bit.  Reword a bit for
7231	clarity.
7232
72332003-12-12  Niels M�ller  <niels@lysator.liu.se>
7234
7235	* mpn/generic/hgcd.c (__gmpn_hgcd_sanity): Fixed stack buffer
7236	overrun.
7237	* mpn/generic/hgcd.c: Improved comments.
7238
72392003-12-11  Torbjorn Granlund  <tege@swox.com>
7240
7241	* gmp-impl.h: Change asm => __asm__, tabify.
7242	* mpz/get_d_2exp.c: Likewise.
7243	* mpf/get_d_2exp.c: Likewise.
7244
7245	* tests/cxx/t-ops.cc: #if .. #endif out tests that cause ambiguities.
7246
72472003-12-10  Torbjorn Granlund  <tege@swox.com>
7248
7249	* tests/mpz/t-gcd.c: Generate operands with sizes as a geometric
7250	progression, to allow for larger operands and less varying timing.
7251
7252	* tune/tuneup.c (tune_gcd_schoenhage): Set param.step_factor.
7253	(tune_hgcd): Likewise.
7254
72552003-12-10  Kevin Ryde  <kevin@swox.se>
7256
7257	* demos/perl/test.pl: Should be $] for perl version in old perl.
7258
7259	* configure.in (sparc64-*-*): Single block of gcc configs for all
7260	systems, on unknown systems try both ABI 32 and 64.
7261
7262	* configure.in (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New AC_SUBSTs with
7263	options to generate .def files with windows DLLs.
7264	* Makefile.am (libgmp_la_LDFLAGS, libgmpxx_la_LDFLAGS): Use them.
7265
7266	* mpn/generic/gcd.c: Use ABOVE_THRESHOLD / BELOW_THRESHOLD, to follow
7267	convention and cooperate with tune/tuneup.c.
7268
7269	* tune/tuneup.c (tune_gcd_schoenhage): Increase max_size to 3000, side
7270	default 1000 is approx the crossover point on athlon.
7271
7272	* tune/common.c, tune/speed.c, tune/speed.h, tune/speed-ext.c,
7273	tune/tuneup.c (SPEED_TMP_ALLOC_LIMBS): Take variable as parameter
7274	rather than returning a value, avoids alloca in a function call.
7275	* tune/common.c, tune/speed.h (speed_tmp_alloc_adjust): Remove, now
7276	inline in SPEED_TMP_ALLOC_LIMBS, and using ptr-NULL for alignment
7277	extraction.
7278
7279	* gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal,
7280	__gmp_binary_less, __gmp_binary_less_equal, __gmp_binary_greater,
7281	__gmp_binary_greater_equal, __gmp_cmp_function): Use mpfr_cmp_si and
7282	mpfr_cmp_d.
7283	* tests/cxx/t-ops.cc: Exercise this.
7284
7285	* demos/perl/Makefile.PL: Don't install sample.pl and test2.pl.
7286
7287	* demos/perl/GMP.xs (use_sv): Prefer PV over IV or NV to avoid any
7288	rounding.
7289	* demos/perl/test.pl: Exercise this.
7290
7291	* demos/perl/GMP/Mpf.pm (overload_string): Corrections to $# usage.
7292	* demos/perl/test.pl: Exercise this.
7293
72942003-12-08  Kevin Ryde  <kevin@swox.se>
7295
7296	* demos/perl/GMP.pm: Correction to canonicalize example.
7297
7298	* demos/perl/GMP.xs: New type check scheme, support magic scalars,
7299	support UV when available.  Remove some unused local variables.
7300	(coerce_long): Check range of double.
7301	(get_d_2exp): Remove stray printf.
7302
7303	* demos/perl/test.pl: Exercise magic, rearrange to make it clearer
7304	what's being tested.
7305
73062003-12-07  Kevin Ryde  <kevin@swox.se>
7307
7308	* mpn/generic/hgcd.c (mpn_hgcd): Use BELOW_THRESHOLD, to follow the
7309	convention of N<THRESH for the lower algorithm, not <=.  Fixes
7310	algorithm selection in tuneup.c.
7311
7312	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Use intended
7313	align_xp, align_yp.
7314
7315	* tune/tuneup.c (mul_toom3_threshold): Use MUL_TOOM3_THRESHOLD_LIMIT,
7316	for the benefit of ASSERT in mpn_mul_n.
7317
7318	* tune/tuneup.c (tune_mul): Correction to toom3 param.min_size, should
7319	use MPN_TOOM3_MUL_N_MINSIZE.
7320
7321	* tune/speed.c (check_align_option): Correction to printf format.
7322	* tune/freq.c (freq_sysctl_hw_model): Remove unused "i" variable.
7323
7324	* scanf/doscan.c: Correction to a couple of trace printfs.
7325	Add <stdlib.h> for strtol.
7326
7327	* tests/misc/t-scanf.c (test_sscanf_eof_ok): New function.
7328	(check_misc): Use it to suppress tests broken by libc.
7329	And should be EOF rather than -1 in various places.
7330
73312003-12-06  Torbjorn Granlund  <tege@swox.com>
7332
7333	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
7334	Move SPEED_TMP_ALLOC_LIMBS invocations out from calls.
7335
7336	* mpn/generic/get_str.c (mpn_get_str, POW2_P case):
7337	Don't append extra '\0' byte.
7338
73392003-12-05  Niels M�ller  <niels@lysator.liu.se>
7340
7341	* tune/common.c (speed_mpn_hgcd_lehmer, speed_mpn_hgcd):
7342	Updated for the renaming hgcd_sanity -> ASSERT_HGCD.
7343
7344	* mpn/generic/gcd.c (gcd_schoenhage): TMP_DECL must be the final
7345	declaration in the declaration section of a block.
7346
7347	* tune/speed.h (mpn_gcd_accel): Added prototype.
7348
73492003-12-05  Torbjorn Granlund  <tege@swox.com>
7350
7351	* randmt.c (__gmp_mt_recalc_buffer): Put parens around "&" expressions
7352	inside "!=".
7353
7354	* mpf/get_str.c: Remove unused variable "fracn".
7355
73562003-12-03  Kevin Ryde  <kevin@swox.se>
7357
7358	* configure.in, Makefile.am (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New
7359	AC_SUBSTs, use them to create .def files with Windows DLLs.
7360	* doc/gmp.texi (Notes for Particular Systems): Update notes on mingw
7361	DLL with MS C.
7362
7363	* mpz/export.c: Allow NULL for countp.
7364	* doc/gmp.texi (Integer Import and Export): Describe this.
7365	Suggested by Jack Lloyd.
7366
7367	* mpn/x86/p6/aors_n.asm: New file, grabbing the K7 code.
7368	Superiority of this reported by Patrick Pelissier.
7369
73702003-11-30  Kevin Ryde  <kevin@swox.se>
7371
7372	* mpn/alpha/ev67/popcount.asm, mpn/alpha/ev67/hamdist.asm: New files.
7373
7374	* mpn/alpha/ev67: New directory.
7375	* configure.in (alphaev67, alphaev68, alphaev7*): Use it.
7376
7377	* doc/gmp.texi (GMPrefu, GMPpxrefu): Change back to plain ref and
7378	pxref, remove macros.
7379	(GMPreftopu, GMPpxreftopu): Remove URL parameter, rename to GMPreftop
7380	and GMPpxreftop.
7381	(Debugging): Remove debauch, seems to have disappeared.
7382	(Language Bindings): Corrections to URLs for CLN, Omni F77, Pike.
7383
73842003-11-29  Kevin Ryde  <kevin@swox.se>
7385
7386	* demos/perl/GMP/Mpf.pm (overload_string): Use $OFMT to avoid warnings
7387	about $#.
7388
7389	* demos/perl/GMP.xs (fits_slong_p): Use LONG_MAX+1 to avoid possible
7390	rounding of 0x7F..FF in a double on 64-bit systems.
7391
7392	* configure.in (ppc601-*-*): Remove this case, it never matched
7393	anything, the name adopted is powerpc601.
7394	(powerpc601-*-*): Use gcc -mcpu=601, xlc -qarch=601.
7395
7396	* configure.in: Introduce ${cc}_cflags_maybe, used if they work.
7397	(*sparc*-*-*) [ABI=32]: Add gcc_cflags_maybe=-m32 to force that mode.
7398
7399	* doc/gmp.texi (Introduction to GMP): Add AMD64 to optimizations list.
7400	(Build Options): Add cpu types alphaev7 and amd64.  Update texinfo
7401	html cross reference.
7402
74032003-11-28  Niels M�ller  <nisse@lysator.liu.se>
7404
7405	* tune/tuneup.c (tune_hgcd): Disable if GMP_NAIL_BITS > 0.
7406	* tune/speed.c (routine): Likewise.
7407	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Likewise.
7408
7409	* mpn/generic/gcd.c, mpn/generic/hgcd.c, mpn/generic/hgcd2.c
7410	[GMP_NAIL_BITS]: Disabled new code if we have nails.
7411
7412	* mpn/generic/gcd.c (MPN_LEQ_P): Copied macro definition (needed
7413	for compilation with --enable-assert).
7414
7415	* tune/tuneup.c (hgcd_schoenhage_threshold,
7416	gcd_schoenhage_threshold): New variables.
7417	(tune_hgcd, tune_gcd_schoenhage): New functions.
7418	(all): Call tune_hgcd and tune_gcd_schoenhage.
7419
7420	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer)
7421	(speed_mpn_gcd_accel): New functions.
7422	* tune/speed.c (routine): Added mpn_hgcd, mpn_hgcd_lehmer and
7423	mpn_gcd _accel.
7424	* tune/speed.h: Added corresponding prototypes.
7425
7426	* tune/gcd_accel.c: New file.
7427
7428	* tune/gcd_bin.c (GCD_SCHOENHAGE_THRESHOLD): Set to MP_SIZE_T_MAX.
7429
7430	* tune/Makefile.am (libspeed_la_SOURCES): Added gcd_accel.c.
7431	(TUNE_MPN_SRCS_BASIC): Added hgcd.c.
7432
7433	* mpn/x86/k7/gmp-mparam.h (HGCD_SCHOENHAGE_THRESHOLD)
7434	(GCD_SCHOENHAGE_THRESHOLD): Tuned values.
7435
7436	* mpn/generic/gcd.c (mpn_gcd, gcd_binary_odd): Renamed the
7437	old mpn_gcd function (which implements accelerated binary gcd) to
7438	gcd_binary_odd.
7439	(gcd_binary): New function, with the additional book keeping
7440	needed when using gcd_binary_odd to compute the gcd of non-odd
7441	numbers.
7442	(hgcd_tdiv): New function.
7443	(gcd_lehmer): New function, currently #if:ed out.
7444	(hgcd_start_row_p): New function, duplicatd from hgcd.c.
7445	(gcd_schoenhage_itch): New function.
7446	(gcd_schoenhage): New function.
7447	(mpn_gcd): New advertised gcd function, which calls
7448	mpn_gcd_binary_odd or mpn_gcd_schoenhage, depending on the size of
7449	the input.
7450
7451	* mpn/generic/hgcd.c (mpn_hgcd2_lehmer_step): Renamed function
7452	(was lehmer_step), and made non-static. Updated callers.
7453
7454	* gmp-impl.h (GCD_LEHMER_THRESHOLD): #if:ed out this macro.
7455	(mpn_hgcd2_lehmer_step): Added prototype.
7456
74572003-11-27  Niels M�ller  <nisse@lysator.liu.se>
7458
7459	* tests/mpz/t-gcd.c (gcd_values): Moved definition, so that we
7460	don't need to forward declare the array.
7461
74622003-11-26  Niels M�ller  <nisse@lysator.liu.se>
7463
7464	* mpn/generic/hgcd.c (mpn_hgcd2_fix): Deleted duplicate definition
7465	(the function belongs to hgcd2.c).
7466
74672003-11-26  Torbjorn Granlund  <tege@swox.com>
7468
7469	* tests/mpz/t-gcd.c: Generate random operands up to 32767 bits;
7470	decrease # of test to 1000.
7471	(gcd_values): Remove oversize test case.
7472
74732003-11-26  Niels M�ller  <niels@lysator.liu.se>
7474
7475	* gmp-impl.h: Added name mangling for hgcd-related functions. Also
7476	use __GMP_PROTO.
7477	(MPN_LEQ_P, MPN_EXTRACT_LIMB): Moved macros to hgcd.c.
7478	* mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
7479	Adapted to name changes.
7480
7481	* tests/mpz/t-gcd.c (main): Added some tests with non-random
7482	input.
7483
74842003-11-25  Niels M�ller  <nisse@lysator.liu.se>
7485
7486	* gmp-impl.h (MPN_LEQ_P, MPN_EXTRACT_LIMB): New macros.
7487	(struct qstack, struct hgcd2_row, struct hgcd2, struct hgcd_row)
7488	(struct hgcd): New structs. Also added prototypes for new hgcd,
7489	hgcd2, qstack and gcd functions.
7490
7491	* configure.in (gmp_mpn_functions): Added hgcd2, hgcd and qstack.
7492
7493	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added hgcd2.c,
7494	hgcd.c and qstack.c.
7495
7496	* mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
7497	New files, needed for the sub-quadratic gcd.
7498
74992003-11-25  Kevin Ryde  <kevin@swox.se>
7500
7501	* doc/gmp.texi (Language Bindings): Add Axiom.
7502
75032003-11-22  Kevin Ryde  <kevin@swox.se>
7504
7505	* mpn/alpha/README: More notes on assembler syntax variations.
7506
7507	* mpn/alpha/alpha-defs.m4, mpn/alpha/unicos.m4 (unop): Should be ldq_u
7508	not bis, and move to alpha-defs.m4 since it can be happily used
7509	everywhere.
7510
7511	* mpn/alpha/alpha-defs.m4, mpn/alpha/default.m4, mpn/alpha/unicos.m4
7512	(bigend): Move to alpha-defs.m4 and base it on HAVE_LIMB_BIG_ENDIAN or
7513	HAVE_LIMB_LITTLE_ENDIAN, so as not to hard code system endianness.
7514
7515	* mpn/alpha/alpha-defs.m4: New file.
7516	* configure.in (alpha*-*-*): Use it.
7517
75182003-11-21  Kevin Ryde  <kevin@swox.se>
7519
7520	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-21.
7521
7522	* mpn/alpha/ev5/com_n.asm: Change "not" to "ornot r31", since "not"
7523	isn't recognised by on Cray Unicos.  Add missing "gp" to PROLOGUE.
7524	* mpn/alpha/README: Add a note on "not".
7525
75262003-11-19  Torbjorn Granlund  <tege@swox.com>
7527
7528	* mpn/alpha/aorslsh1_n.asm: Slightly rework feed-in code, avoiding
7529	spurious reads beyond operand limits.
7530
7531	* mpn/alpha/ev5/com_n.asm: Add ASM_START/ASM_END.
7532
7533	* mpn/generic/mul_fft.c (mpn_fft_zero_p): Remove unused function.
7534	(mpn_lshift_com): Make static, nailify properly.
7535
75362003-11-19  Kevin Ryde  <kevin@swox.se>
7537
7538	* mpn/generic/diveby3.c: Use a "q" variable to make it clearer what
7539	the code is doing.
7540
7541	* mpn/powerpc32/750/lshift.asm, mpn/powerpc32/750/rshift.asm: New
7542	files.
7543
7544	* mpn/alpha/ev5/com_n.asm: New file.
7545
7546	* doc/gmp.texi (Assembler Functional Units, Assembler Writing Guide):
7547	New sections by Torbjorn, tweaked by me.
7548
75492003-11-17  Torbjorn Granlund  <tege@swox.com>
7550
7551	* mpn/powerpc32: Add power4/powerpc970 cycle counts.
7552	Use cmpwi instead of cmpi to placate darwin.
7553
75542003-11-15  Kevin Ryde  <kevin@swox.se>
7555
7556	* config.guess: Add comments on MacOS "machine" command.
7557
7558	* tests/devel/try.c (main): Use gmp_randinit_default explicitly on
7559	__gmp_rands, since RANDS doesn't allow seeding.
7560
7561	* doc/gmp.texi (Assigning Integers): Remove notes on possible change
7562	to disallow whitespace, this would be an incompatible change and
7563	really can't be made.
7564	(Toom 3-Way Multiplication): Updates for Paul's new code.
7565
7566	* mpn/generic/mul_n.c (toom3_interpolate, mpn_toom3_mul_n): Put
7567	if/else braces around whole of #if code, for readability.
7568
7569	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
7570	refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps
7571	etc.
7572
7573	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-15.
7574
75752003-11-14  Torbjorn Granlund  <tege@swox.com>
7576
7577	* mpn/alpha/aorslsh1_n.asm: Use Cray-friendly syntax for "br".
7578
75792003-11-13  Torbjorn Granlund  <tege@swox.com>
7580
7581	* mpn/alpha/aorslsh1_n.asm: New file.
7582
75832003-11-12  Kevin Ryde  <kevin@swox.se>
7584
7585	* acinclude.m4 (GMP_PROG_CC_WORKS): Add case provoking AIX power2
7586	assembler, test code by Torbjorn.
7587	* configure.in (power*-*-*): Add a comment about -mcpu=rios2 fallback.
7588
7589	* tune/speed.c (main): Use gmp_randinit_default explicitly on
7590	__gmp_rands, since RANDS doesn't allow seeding.
7591
7592	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-12.
7593
7594	* gmp-impl.h, randmt.h (__gmp_randinit_mt_noseed): Move prototype to
7595	gmp-impl.h, for use by RANDS.
7596
7597	* mpn/Makeasm.am (.s, .S, .asm): Quote $< in test -f, per automake.
7598	(.obj): Use test -f and $(CYGPATH_W) as per automake.
7599
76002003-11-11  Kevin Ryde  <kevin@swox.se>
7601
7602	* configure.in: Make umul and udiv standard-optional objects, rather
7603	than under various extra_functions.
7604
7605	* mpn/pa32/hppa1_1/pa7100/add_n.asm,
7606	mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
7607	mpn/pa32/hppa1_1/pa7100/lshift.asm,
7608	mpn/pa32/hppa1_1/pa7100/rshift.asm,
7609	mpn/pa32/hppa1_1/pa7100/sub_n.asm,
7610	mpn/pa32/hppa1_1/pa7100/submul_1.asm: Use LDEF for labels.
7611
7612	* mpf/set_str.c: Don't use memcmp for decimal point testing, just a
7613	loop is enough and avoids any chance of memcmp reading past the end of
7614	the given string.
7615
7616	* randmts.c, randmt.h: New files.
7617	* Makefile.am (libgmp_la_SOURCES): Add them.
7618	* randmt.c: Move seeding to randmts.c, common defines in randmt.h.
7619	* gmp-impl.h (RANDS): Use __gmp_randinit_mt_noseed.
7620	* tests/misc.c (tests_rand_start): Use gmp_randinit_default
7621	explicitly, not RANDS.
7622
7623	* mpn/ia64/ia64-defs.m4 (PROLOGUE_cpu): Use 32-byte alignment, for the
7624	benefit of itanium 2.
7625	* mpn/ia64/gcd_1.asm: Remove own .align 32.
7626
7627	* mpn/ia64/ia64-defs.m4 (ALIGN): New define, using IA64_ALIGN_OK.
7628	* mpn/ia64/hamdist.asm: Use ALIGN instead of .align.
7629
7630	* acinclude.m4 (GMP_ASM_IA64_ALIGN_OK): New macro.
7631	* configure.in (IA64_PATTERN): Use it.
7632	* mpn/ia64/README: Add notes on gas big endian align problem.
7633
76342003-11-10  Torbjorn Granlund  <tege@swox.com>
7635
7636	* mpn/ia64/mul_1.asm: Rewrite.
7637
76382003-11-08  Torbjorn Granlund  <tege@swox.com>
7639
7640	* mpn/x86/aors_n.asm: Align loop to a multiple of 16.  Also align
7641	M4_function_n to a multiple of 16, to minimize alignment padding.
7642	Update P6 cycle counts reflecting improvements with new alignment.
7643
76442003-11-07  Kevin Ryde  <kevin@swox.se>
7645
7646	* gmp-impl.h (HAVE_HOST_CPU_alpha_CIX): New define.
7647	(ULONG_PARITY, popc_limb): Use it, to pick up ev7 as well as 67 and 68.
7648	* longlong.h (count_leading_zeros, count_trailing_zeros): Ditto.
7649
7650	* doc/gmp.texi (Notes for Package Builds): Add notes on multi-ABI
7651	system packaging.
7652	(ABI and ISA): Add GNU/Linux ABI=64.
7653	(Binary GCD): Add notes on 1x1 GCD algorithms.
7654
7655	* mpn/alpha/README: Add some literature references.
7656
7657	* mpn/ia64/mode1o.asm: Various corrections to initial checkin.
7658	* mpn/ia64/ia64-defs.m4 (ASSERT): Correction to arg quoting.
7659
76602003-11-05  Torbjorn Granlund  <tege@swox.com>
7661
7662	* mpn/powerpc64/linux64.m4: New file.
7663	* configure.in (POWERPC64_PATTERN): Handle *-*-linux*.
7664	Use linux64.m4.
7665
7666	* mpn/ia64/logops_n.asm: New file.
7667
76682003-11-05  Kevin Ryde  <kevin@swox.se>
7669
7670	* tune/freq.c (freq_sysctl_hw_model): Relax to just look for "%u MHz",
7671	for the benefit of sparc cypress under netbsd 1.6.1.
7672
7673	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-05.
7674
7675	* mpn/alpha/ev5/dive_1.c: New file.
7676
7677	* configure.in (x86_64-*-*): Accept together with amd64-*-*.
7678
7679	* tune/speed.c: Check range of -x,-y,-w,-W alignment specifiers.
7680	* tune/speed.h (CACHE_LINE_SIZE): Amend comments.
7681
76822003-11-04  Torbjorn Granlund  <tege@swox.com>
7683
7684	* tune/speed.c: Fix typo in testing HAVE_NATIVE_mpn_modexact_1_odd.
7685
76862003-11-03  Kevin Ryde  <kevin@swox.se>
7687
7688	* mpn/ia64/hamdist.asm: New file.
7689	* mpn/ia64/mode1o.asm: New file.
7690	* mpn/ia64/ia64-defs.m4 (ASSERT): New macro.
7691
7692	* tests/mpz/t-set_d.c (check_2n_plus_1): New test.
7693
76942003-11-01  Kevin Ryde  <kevin@swox.se>
7695
7696	* mpz/fac_ui.c (BSWAP_ULONG) [limb==2*long]: Remove this case, it
7697	provokes code gen problems on HP cc.
7698	(BSWAP_ULONG) [generic]: Rename __dst variable to avoid conflicts with
7699	BITREV_ULONG.
7700	Fix by Jason Moxham.
7701
7702	* mpn/powerpc32/mode1o.asm: Use 16-bit i*i for early out, no need to
7703	truncate divisor.  Amend stated 750/7400 speeds, and note operands
7704	that give the extremes.
7705
7706	* mpz/set_d.c: Don't use a special case for d < MP_BASE_AS_DOUBLE, gcc
7707	3.3 -mpowerpc64 on darwin gets ulonglong->double casts wrong.
7708
7709	* mpn/generic/diveby3.c: Show a better style carry handling in the
7710	alternative pipelined sample code.
7711
7712	Revert this, the longlong.h macros need -mpowerpc64:
7713	* acinclude.m4 (GMP_GCC_POWERPC64): New macro.
7714	* configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
7715	when bad.
7716
77172003-10-31  Torbjorn Granlund  <tege@swox.com>
7718
7719	* mpn/powerpc64/mode64/submul_1.asm: Move an instruction to save a
7720	cycle on POWER4.
7721
7722	* mpn/powerpc64/mode64/divrem_1.asm: Fix several syntax problems
7723	revealed on Mac OS X.
7724
7725	* mpn/powerpc64/mode64/*.asm: Add cycle counts for POWER4.
7726
7727	* mpn/powerpc64/sqr_diagonal.asm: Rewrite to save a cycle on POWER4.
7728
77292003-10-31  Kevin Ryde  <kevin@swox.se>
7730
7731	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-31.
7732
7733	* mpn/powerpc64/README: Add subdirectory organisation notes.
7734
7735	* tests/mpn/t-get_d.c: Don't use limits.h, LONG_MIN is wrong on gcc
7736	2.95 with -mcpu=ultrasparc.
7737
7738	* acinclude.m4 (GMP_GCC_POWERPC64): New macro.
7739	* configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
7740	when bad.
7741
7742	* configure.in (powerpc64-*-darwin*) [ABI=mode32]: Use gcc -mcpu flags.
7743
7744	* mpn/ia64/divrem_1.asm, mpn/ia64/gcd_1.asm: Use "C" for comments.
7745	* mpn/ia64/README, mpn/ia64/ia64-defs.m4: Note this.
7746
7747	* mpn/ia64/ia64-defs.m4: Renamed from default.m4, per other defs files.
7748	* configure.in (IA64_PATTERN): Update GMP_INCLUDE_MPN.
7749
7750	* doc/gmp.texi (Notes for Particular Systems): Remove m68k ABI notes
7751	for -mshort and PalmOS, now works.
7752	(References): Correction, GMP Square Root proof already there, just
7753	wanting URL from RRRR 4475.
7754
77552003-10-29  Kevin Ryde  <kevin@swox.se>
7756
7757	* configure.in (sparc*-*-*): Use gcc -m32 when that option works, to
7758	force 32-bit mode on dual 32/64 configurations like GNU/Linux.
7759	(sparc64-*-linux*): Add support for ABI=64.
7760
7761	* mpn/generic/pre_divrem_1.c: In fraction part, use CNST_LIMB(0) with
7762	udiv_qrnnd_preinv to avoid warning about shift > type.
7763
7764	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-29.
7765
7766	* tests/cxx/t-istream.cc: Avoid tellg() checks if putback() doesn't
7767	update that, avoids certain g++ 2.96 problems.
7768
7769	* tests/mpn/t-fat.c: New file.
7770	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
7771
7772	* configure.in (CPUVEC_INSTALL, ITERATE_FAT_THRESHOLDS): New macros
7773	for fat.h.
7774	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Use CPUVEC_INSTALL instead
7775	of memcpy.  Correction to location of "initialized" set.  Improve
7776	various comments.
7777
77782003-10-27  Torbjorn Granlund  <tege@swox.com>
7779
7780	* mpn/sparc64/mul_1.asm: Change addcc => add in a few places.
7781	* mpn/sparc64/addmul_1.asm: Likewise.
7782
7783	* mpn/sparc32/v9/mul_1.asm: Apply cross-jumping.
7784	* mpn/sparc32/v9/addmul_1.asm: Likewise.
7785	* mpn/sparc32/v9/submul_1.asm: Likewise.
7786	* mpn/sparc32/v9/sqr_diagonal.asm: Likewise.
7787
77882003-10-27  Kevin Ryde  <kevin@swox.se>
7789
7790	* tests/cxx/t-misc.cc: Don't use <climits>, on g++ 2.95.4 (debian 3.0)
7791	-mcpu=ultrasparc LONG_MIN is wrong and kills the compile.
7792
7793	* tests/cxx/t-istream.cc: Correction to tellg tests, don't assume
7794	streampos is zero based.
7795
7796	* configure.in (HAVE_HOST_CPU_FAMILY_alpha): New define for config.h.
7797	* mpn/generic/get_d.c: Use it instead of __alpha for alpha workaround,
7798	since Cray cc doesn't define __alpha.
7799
7800	* mpn/x86/README: Revise PIC coding notes a bit, add gcc visibility
7801	attribute.
7802
78032003-10-25  Kevin Ryde  <kevin@swox.se>
7804
7805	* mpn/ia64/gcd_1.asm: New file.
7806
7807	* tune/many.pl: Allow for PROLOGUE(fun,...), as used on alpha.
7808
7809	* doc/gmp.texi (C++ Formatted Input): Describe base indicator handling.
7810
7811	* tests/cxx/t-istream.cc: New file.
7812	* tests/cxx/Makefile.am: Add it.
7813
7814	* cxx/ismpznw.cc: New file, integer input without whitespace ...
7815	* cxx/ismpz.cc: ... from here.
7816	* gmp-impl.h (__gmpz_operator_in_nowhite): Add prototype.
7817	* cxx/ismpq.cc: Rewrite using mpz input routines.  Change to accept a
7818	separate base indicator on numerator and denominator.  Fix base
7819	indicator case where "123/0456" would stop at "123/0".
7820	* Makefile.am, cxx/Makefile.am: Add cxx/ismpznw.cc.
7821
7822	* tests/mpz/t-set_d.c: New file, derived from tests/mpz/t-set_si.c
7823	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
7824
7825	* mpn/m68k/lshift.asm, mpn/m68k/rshift.asm: Support 16-bit int and
7826	stack alignment.
7827	* mpn/m68k/README: Add notes on this.
7828	* configure.in (SIZEOF_UNSIGNED): New define in config.m4.
7829	* mpn/m68k/m68k-defs.m4 (m68k_definsn): Add cmpw, movew.
7830	Reported by Patrick Pelissier.
7831
7832	* mpn/m68k/t-m68k-defs.pl: Don't use -> with hashes, to avoid
7833	deprecation warnings from perl 5.8.
7834
7835	* configure.in (viac3-*-*): Use just x86/pentium in $path not x86/p6.
7836	If gcc is to be believed the old C3s don't have cmov.
7837
7838	* Makefile.am: Amend comments about not building from libtool
7839	convenience libraries.
7840
7841	* mpn/asm-defs.m4 (PROLOGUE): Use m4_file_seen, for correct filename
7842	in missing EPILOGUE error messages.
7843	(m4_file_seen): Amend comments about where used.
7844
7845	* Makefile.am (CXX_OBJECTS): Remove $U, C++ files are not subject to
7846	ansi2knr rules.
7847
7848	* gmp-h.in (mpn_divmod_1): Use __GMP_CAST, to avoid warnings in
7849	applications using g++ -Wold-style-cast.
7850
7851	* mpn/z8000/README: New file.
7852
78532003-10-22  Kevin Ryde  <kevin@swox.se>
7854
7855	* mpn/generic/get_d.c (CONST_1024, CONST_NEG_1023,
7856	CONST_NEG_1022_SUB_53): Replace ALPHA_WORKAROUND with a non-gcc-ism,
7857	and use on Cray Unicos alpha too, which has the same problem.
7858
7859	* configure.in (powerpc64-*-darwin*): Make ABI=32 available as the
7860	final fallback, remove mode64 until we know how it will work.
7861
7862	* doc/gmp.texi (Build Options): Add powerpc970 to available CPUs.
7863	(ABI and ISA): Add mode32 for Darwin.
7864
7865	* configure.in (gettimeofday): Use an explicit AC_TRY_LINK, to avoid
7866	known autoconf 2.57 problems with gettimeofday in AC_CHECK_FUNCS on
7867	HP-UX.
7868
7869	* configure.in (powerpc*-*-*): Use ABI=32 instead of ABI=standard for
7870	the default 32-bit ABI.  Fixes powerpc64-*-aix* which is documented as
7871	choices "aix64 32" but had "aix64 standard".
7872
7873	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-22.
7874
7875	* doc/gmp.texi (Notes for Particular Systems): Note m68k gcc -mshort
7876	and PalmOS calling conventions not supported.  Reported by Patrick
7877	Pelissier.
7878	(References): Add Paul Zimmermann's Inria 4475 paper.
7879
78802003-10-21  Torbjorn Granlund  <tege@swox.com>
7881
7882	* mpn/ia64/submul_1.asm: Slightly reschedule loop to accommodate
7883	Itanium 2 getf.sig latency.
7884
78852003-10-21  Kevin Ryde  <kevin@swox.se>
7886
7887	* tests/mpn/t-instrument.c: Add mpn_addlsh1_n, mpn_rsh1add_n,
7888	mpn_rsh1sub_n, mpn_sub_nc, mpn_sublsh1_n.  Typo in mpn_preinv_divrem_1
7889	conditional.
7890
78912003-10-20  Torbjorn Granlund  <tege@swox.com>
7892
7893	* mpn/powerpc64/mode32/add_n.asm: New file.
7894	* mpn/powerpc64/mode32/sub_n.asm: New file.
7895	* mpn/powerpc64/mode32/mul_1.asm: New file.
7896	* mpn/powerpc64/mode32/addmul_1.asm: New file.
7897	* mpn/powerpc64/mode32/submul_1.asm: New file.
7898
78992003-10-19  Torbjorn Granlund  <tege@swox.com>
7900
7901	* longlong.h (AMD64): __x86_64__ => __amd64__.
7902	(64-bit powerpc): Only define carry-dependent macros if
7903	!_LONG_LONG_LIMB.
7904
7905	* acinclude.m4 (POWERPC64_PATTERN): Add powerpc970-*-*.
7906
7907	* configure.in (POWERPC64_PATTERN): Handle *-*-darwin*.
7908	(POWERPC64_PATTERN, *-*-aix*): Prepend powerpc64/mode64 to path_aix64.
7909
7910	* mpn/powerpc64/mode64/mul_1.asm: Change cal => addi.
7911	* mpn/powerpc64/mode64/addmul_1.asm: Likewise.
7912	* mpn/powerpc64/mode64/submul_1.asm: Likewise.
7913	* mpn/powerpc64/sqr_diagonal.asm: Likewise.
7914
7915	* mpn/powerpc64/mode64/mul_1.asm: Move from "..".
7916	* mpn/powerpc64/mode64/addmul_1.asm: Likewise.
7917	* mpn/powerpc64/mode64/submul_1.asm: Likewise.
7918	* mpn/powerpc64/mode64/divrem_1.asm: Likewise.
7919	* mpn/powerpc64/mode64/rsh1sub_n.asm: Likewise.
7920	* mpn/powerpc64/mode64/add_n.asm: Likewise.
7921	* mpn/powerpc64/mode64/addsub_n.asm: Likewise.
7922	* mpn/powerpc64/mode64/sub_n.asm: Likewise.
7923	* mpn/powerpc64/mode64/addlsh1_n.asm: Likewise.
7924	* mpn/powerpc64/mode64/diveby3.asm: Likewise.
7925	* mpn/powerpc64/mode64/rsh1add_n.asm: Likewise.
7926	* mpn/powerpc64/mode64/sublsh1_n.asm: Likewise.
7927
7928	* mpn/powerpc64/lshift.asm: Handle mode32 ABI.
7929	* mpn/powerpc64/rshift.asm: Likewise.
7930	* mpn/powerpc64/umul.asm: Likewise.
7931
7932	* tune/powerpc64.asm: Make it actually work.
7933
79342003-10-19  Kevin Ryde  <kevin@swox.se>
7935
7936	* mpn/generic/get_d.c: Add a workaround for alpha gcc signed constant
7937	comparison bug.
7938
7939	* gmpxx.h (gmp_randclass gmp_randinit_lc_2exp_size constructor): Throw
7940	std::length_error if size is too big.
7941	* tests/cxx/t-rand.cc (check_randinit): Exercise this.
7942
7943	* mpn/x86/pentium4/sse2/addlsh1_n.asm: New file, derived in part from
7944	mpn/x86/pentium4/sse2/add_n.asm.
7945
7946	* doc/gmp.texi (C++ Interface Integers, C++ Interface Rationals, C++
7947	Interface Floats): Note std::invalid_argument exception for invalid
7948	strings to constructors and operator=.
7949	(C++ Interface Random Numbers): Note std::length_error exception for
7950	size too big in gmp_randinit_lc_2exp_size.
7951
79522003-10-18  Kevin Ryde  <kevin@swox.se>
7953
7954	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-18.
7955
7956	* gmpxx.h (mpz_class, mpq_class, mpf_class, mpfr_class constructors
7957	and operator= taking string or char*): Throw std::invalid_argument if
7958	string cannot be converted.
7959	* tests/cxx/t-constr.cc, tests/cxx/t-assign.cc: Exercise this.
7960
7961	* cxx/ismpz.cc, cxx/ismpq.cc, cxx/ismpf.cc: Use istream std::locale
7962	ctype facet for isspace when available.  Only accept space at the
7963	start of the input, same as g++ libstdc++.  Use ASSERT_NOCARRY to
7964	check result of mpz_set_str etc.
7965	* cxx/ismpf.cc: Don't accept "@" for exponent indicator.
7966
7967	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Remove
7968	_open and _mpn variants of mpn_toom3_mul_n, only one style now.
7969	* tune/mul_n_open.c, tune/mul_n_mpn.c: Remove files.
7970
7971	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
7972	(udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
7973
7974	* tests/mpz/t-import.c, tests/mpz/t-export.c: Use octal for character
7975	constants, hex is an ANSI-ism.
7976
7977	* mpn/alpha/ev5/mode1o.c: Corrections to ASSERTs, as per
7978	mpn/generic/mode1o.c.
7979
7980	* mpn/generic/diveby3.c: Add commented out alternative code and notes
7981	for taking the multiply off the dependent chain.  Amend/clarify some
7982	of the other comments.
7983
7984	* configure.in (powerpc970-*-*): Use gcc -mcpu=970 when available.
7985	(powerpc7400-*-*): Fallback on gcc -mcpu=750 if -mcpu=7400 not
7986	available.
7987
7988	* doc/gmp.texi (C++ Formatted Input): Note locale digit grouping not
7989	supported.
7990	(C++ Formatted Input, C++ Formatted Output): Cross reference class
7991	interface on overloading.
7992
7993	* mpn/m68k/README: Add various ideas from doc/tasks.html.
7994
7995	* mpn/m88k/README: New file.
7996
79972003-10-16  Torbjorn Granlund  <tege@swox.com>
7998
7999	* config.sub: Recognize powerpc970.
8000
80012003-10-15  Torbjorn Granlund  <tege@swox.com>
8002
8003	* config.guess: Recognize powerpc970 under MacOS.
8004
80052003-10-15  Kevin Ryde  <kevin@swox.se>
8006
8007	* configure.in, acinclude.m4 (GMP_C_RIGHT_SHIFT): New test.
8008	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
8009	(udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
8010
8011	* mpn/amd64/amd64-defs.m4: New file, with a non-aligning PROLOGUE.
8012	* configure.in (amd64-*-*): Use it.
8013	* mpn/amd64/addlsh1_n.asm: Add ALIGN(16).
8014
8015	* mpfr/*: Update to mpfr cvs 2003-10-15.
8016
8017	* mpn/generic/get_d.c: Rewrite, simplifying and truncating towards
8018	zero unconditionally.
8019	* tests/mpn/t-get_d.c: Add various further tests.
8020	* gmp-impl.h (FORCE_DOUBLE): New macro.
8021
8022	* gmp-h.in (__mpz_struct): Add comment on __mpz_struct getting into
8023	C++ mangled function names.
8024
8025	* doc/gmp.texi (Build Options): Update notes for new doc subdir.
8026	(Low-level Functions): Note mpn functions don't check for zero limbs
8027	etc, it's up to an application to strip.
8028
8029	* doc/configuration (Configure): mdate-sh now in doc subdir, add
8030	generated fat.h.
8031
80322003-10-14  Torbjorn Granlund  <tege@swox.com>
8033
8034	* mpn/ia64/lorrshift.asm: Rewrite.
8035
8036	* mpn/ia64/diveby3.asm: Remove explicit bundling; add branch hints.
8037
80382003-10-13  Torbjorn Granlund  <tege@swox.com>
8039
8040	* mpn/ia64/diveby3.asm: New file.
8041
80422003-10-13  Kevin Ryde  <kevin@swox.se>
8043
8044	* mpn/powerpc32/mod_34lsub1.asm: New file.
8045
8046	* mpn/powerpc32/diveby3.asm, mpn/powerpc64/diveby3.asm: src[] in
8047	second operand of mullw, to allow possible early-out, which the
8048	0xAA..AB inverse cannot give.  This improvement noticed by Torbjorn.
8049
8050	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Print to config.log whether
8051	local label is purely temporary or appears in object files, for
8052	development purposes.
8053
8054	* doc/gmp.texi, doc/fdl.texi, doc/texinfo.tex, doc/mdate-sh: Moved
8055	from top-level.
8056	* doc/Makefile.am: New file.
8057	* configure.in (AC_OUTPUT): Add doc/Makefile.
8058	* Makefile.am (SUBDIRS): Move doc subdirectory from EXTRA_DIST.
8059	(info_TEXINFOS, gmp_TEXINFOS): Moved to doc/Makefile.am.
8060	* mpfr/Makefile.am (mpfr_TEXINFOS): fdl.texi now in doc subdir.
8061	(TEXINFO_TEX): texinfo.tex now in doc subdir.
8062	(AM_MAKEINFOFLAGS): Set -I to doc subdir.
8063
8064	* mpz/and.c: For positive/positive, use mpn_and_n, rate a realloc as
8065	UNLIKELY.
8066
8067	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Don't test
8068	for high zero limbs.
8069
80702003-10-12  Torbjorn Granlund  <tege@swox.com>
8071
8072	* mpn/powerpc64/diveby3.asm: New file (trivial edits of
8073	powerpc32/diveby3.asm).
8074
8075	* mpn/powerpc32/diveby3.asm: Update cycle counts with more processors.
8076	* mpn/powerpc32/sqr_diagonal.asm: Likewise.
8077
8078	* mpn/pa64/add_n.asm: Correct PA8500 cycle counts.
8079	* mpn/pa64/sub_n.asm: Likewise.
8080
8081	* mpn/m68k/aors_n.asm (INPUT PARAMETERS): Fix typo.
8082	* mpn/m68k/lshift.asm: Likewise.
8083	* mpn/m68k/rshift.asm: Likewise.
8084
8085	* mpn/m68k/README: Correct an URL; add some STATUS comments.
8086
8087	* mpn/ia64/aorslsh1_n.asm: Avoid shrp when shl/shr works just as well.
8088
8089	* mpn/powerpc32/addlsh1_n.asm: New file.
8090	* mpn/powerpc32/sublsh1_n.asm: New file.
8091
80922003-10-12  Kevin Ryde  <kevin@swox.se>
8093
8094	* mpn/sparc64/divrem_1.c, mpn/sparc64/mod_1.c: New files.
8095	* mpn/sparc64/sparc64.h (HALF_ENDIAN_ADJ, count_leading_zeros_32,
8096	invert_half_limb, udiv_qrnnd_half_preinv): New macros.
8097
8098	* gmp-impl.h (udiv_qrnnd_preinv2): Use a ? : for getting the n1 bit,
8099	so as not to depend on signed right shifts being arithmetic.
8100
8101	* mpn/powerpc32/diveby3.asm: New file.
8102
8103	* mpn/generic/divrem_1.c: Use CNST_LIMB(0) to avoid warnings from
8104	udiv_qrnnd_preinv about shift count when int<long.  Do the same with
8105	udiv_qrnnd, for consistency.
8106
8107	* Makefile.am (install-data-hook): Print a warning recommending "make
8108	check" to watch out for compiler bugs.  Proposed by Torbjorn.
8109
8110	* mpn/ia64/README (mpn_lshift, mpn_rshift): Amend prospective itanium2
8111	speed, 0.75 c/l with shrp plus shl/shr.
8112
8113	* mpn/ia64/popcount.asm: Add comment on optimality.
8114
81152003-10-11  Torbjorn Granlund  <tege@swox.com>
8116
8117	* mpn/ia64/rsh1aors_n.asm: New file.
8118
8119	* mpn/asm-defs.m4: Handle rsh1aors_n.
8120
8121	* configure.in (tmp_mulfunc): Handle rsh1aors_n.
8122
81232003-10-11  Kevin Ryde  <kevin@swox.se>
8124
8125	* mpn/x86/pentium4/sse2/diveby3.asm: Remove non-PIC RODATA memory
8126	access for 0xAAAAAAAB constant.
8127
8128	* gmp-impl.h (popc_limb, ULONG_PARITY) [ev67, ev68]: Add gcc asm
8129	versions using ctpop.
8130
8131	* mpn/x86/k6/aorsmul_1.asm: Tweak some comments, remove M4_description
8132	and M4_desc_retval used only in comments.
8133
8134	* mpn/x86/k6/mul_basecase.asm: Add comment on using mpn_mul_1.
8135
81362003-10-09  Torbjorn Granlund  <tege@swox.com>
8137
8138	* mpn/powerpc64/addlsh1_n.asm: Tweak for 0.25 c/l better loop speed.
8139	* mpn/powerpc64/sublsh1_n.asm: Likewise.
8140
81412003-10-09  Kevin Ryde  <kevin@swox.se>
8142
8143	* mpfr/*: Update to mpfr cvs 2003-10-09.
8144
8145	* tests/devel/try.c (_SC_PAGESIZE): Define from _SC_PAGE_SIZE on
8146	systems which use that, eg. hpux 9.
8147
81482003-10-07  Kevin Ryde  <kevin@swox.se>
8149
8150	* tune/freq.c (freq_sysctl_hw_model): Correction to last sscanf change.
8151
8152	* configure.in: Check for psp_iticksperclktick in struct pst_processor.
8153	* tune/freq.c (freq_pstat_getprocessor): Use this.
8154
8155	* tests/devel/try.c (divisor_array): Add a couple of half-limb values.
8156
8157	* acinclude.m4 (GMP_PROG_CC_WORKS): Correction to last change, need to
8158	set result "yes" when cross compiling.
8159
81602003-10-06  Torbjorn Granlund  <tege@swox.com>
8161
8162	* mpn/generic/mul_n.c: Use __GMPN_ADD_1/_GMPN_SUB_1 instead of
8163	mpn_add_1 and mpn_sub_1.
8164
8165	* mpn/pa64/aorslsh1_n.asm: Schedule register save and restore code.
8166
81672003-10-05  Torbjorn Granlund  <tege@swox.com>
8168
8169	* mpn/pa64/mul_1.asm: Misc comment cleanups.
8170	* mpn/pa64/addmul_1.asm: Likewise.
8171	* mpn/pa64/submul_1.asm: Likewise.
8172
8173	* mpn/pa64/README: Correct cycle counts.
8174
8175	* mpn/pa64/aorslsh1_n.asm: New file.
8176
81772003-10-04  Kevin Ryde  <kevin@swox.se>
8178
8179	* tune/freq.c (freq_sysctl_hw_model, freq_sunos_sysinfo,
8180	freq_sco_etchw, freq_bsd_dmesg, freq_irix_hinv): Demand matching of
8181	MHz etc at end of sscanf format string.  In particular need this for
8182	freq_bsd_dmesg on i486-pc-freebsd4.7 to avoid the 486 cpu being used
8183	for the frequency.
8184
8185	* tests/misc.c, tests/tests.h (tests_setjmp_sigfpe,
8186	tests_sigfpe_handler, tests_sigfpe_done, tests_sigfpe_target,
8187	tests_dbl_mant_bits): New.
8188
8189	* configure.in (viac3*-*-*): Add gcc VIA c3 options.
8190
8191	* mpfr/*: Update to mpfr cvs 2003-10-04.
8192
8193	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
8194	refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps.
8195	* tests/tests.h (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
8196	refmpn_rsh1sub_n): Add prototypes.
8197
8198	* tests/devel/try.c, tune/many.pl: Add mpn_addlsh1_n, mpn_sublsh1_n,
8199	mpn_rsh1add_n, mpn_rsh1sub_n.
8200
82012003-10-03  Torbjorn Granlund  <tege@swox.com>
8202
8203	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
8204	refmpn_rsh1sub_n): New functions.
8205
82062003-10-03  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
8207
8208	* mpn/generic/mul_n.c (toom3_interpolate): Use mpn_add_1/mpn_sub_1
8209	instead of MPN_INCR_/MPN_DECR_U.
8210
82112003-10-02  Torbjorn Granlund  <tege@swox.com>
8212
8213	* configure.in (ia64*-*-hpux*): Fall back to +O1, not +O.
8214
82152003-10-02  Kevin Ryde  <kevin@swox.se>
8216
8217	* configure.in (ia64*-*-hpux*): For cc, let +O optimization level
8218	fallback if +O3 doesn't work.
8219
8220	* acinclude.m4 (GMP_PROG_CC_WORKS): Add a test of __builtin_alloca
8221	when available, to pick up Itanium HP-UX cc internal errors in +O2.
8222	Provoking code by Torbjorn.
8223
82242003-10-01  Torbjorn Granlund  <tege@swox.com>
8225
8226	* mpn/ia64/gmp-mparam.h: Retune.
8227
8228	* mpn/asm-defs.m4: Handle aorslsh1_n.
8229
8230	* configure.in (tmp_mulfunc): Handle aorslsh1_n.
8231
8232	* mpn/ia64/aorslsh1_n.asm: New file.
8233
8234	* mpn/ia64/aors_n.asm: New file, complete rewrite of mpn_add_n and
8235	mpn_sub_n.
8236	* mpn/ia64/add_n.asm: Replace by aors_n.asm.
8237	* mpn/ia64/sub_n.asm: Replace by aors_n.asm.
8238
82392003-10-01  Kevin Ryde  <kevin@swox.se>
8240
8241	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Make bad ARM last byte into a
8242	separate case and consider it non-IEEE, since it looks like this is
8243	due to some sort of restricted or incorrect software floats.
8244
8245	* demos/calc/Makefile.am: Use automake yacc/lex support, seems fine in
8246	separate objdir now.
8247
8248	* cxx/dummy.cc: Moved from top-level dummy.cc.
8249	* Makefile.am (libgmpxx_la_SOURCES): Update to cxx/dummy.cc,
8250	correction to comment about this.
8251
82522003-09-30  Torbjorn Granlund  <tege@swox.com>
8253
8254	* demos/pexpr.c: Correct documentation of -split.
8255	(TIME): Remove cast of result to double.
8256	(main): Change timing variables to int.
8257	(main): #ifdef LIMIT_RESOURCE_USAGE, don't convert numbers of more than
8258	100000 digits.
8259
82602003-09-28  Torbjorn Granlund  <tege@swox.com>
8261
8262	* mpn/*/*.asm: Clean up spacing, tabify.
8263
8264	* mpn/alpha/rshift.asm: Table cycle counts.
8265	* mpn/alpha/lshift.asm: Likewise.
8266	* mpn/alpha/ev5/rshift.asm: Likewise.
8267	* mpn/alpha/ev5/lshift.asm: Likewise.
8268	* mpn/alpha/ev6/add_n.asm: Likewise.
8269	* mpn/alpha/ev6/sub_n.asm: Likewise.
8270
8271	* mpn/ia64/lorrshift.asm: Amend comments about performance.
8272
8273	* mpn/pa64/mul_1.asm: Fix comment typo.
8274	* mpn/pa64/addmul_1.asm: Likewise.
8275	* mpn/pa64/submul_1.asm: Likewise.
8276
8277	* mpn/amd64/addlsh1_n.asm: Save/restore carry using two insn to break
8278	recurrency.  Add remarks about possible further speedup.
8279	* mpn/amd64/sublsh1_n.asm: Likewise.
8280
8281	* mpn/amd64/rsh1add_n.asm: Add remarks about possible further speedup.
8282	* mpn/amd64/rsh1sub_n.asm: Likewise.
8283
82842003-09-27  Torbjorn Granlund  <tege@swox.com>
8285
8286	* mpn/powerpc64/README: Update with POWER4/PPC970 pipeline info.
8287
8288	* mpn/powerpc64/rsh1add_n.asm: New file.
8289	* mpn/powerpc64/rsh1sub_n.asm: New file.
8290	* mpn/powerpc64/rshift.asm: Rewrite.
8291	* mpn/powerpc64/lshift.asm: Rewrite.
8292
82932003-09-26  Torbjorn Granlund  <tege@swox.com>
8294
8295	* mpn/powerpc64/addlsh1_n.asm: New file.
8296	* mpn/powerpc64/sublsh1_n.asm: New file.
8297
82982003-09-25  Torbjorn Granlund  <tege@swox.com>
8299
8300	* tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
8301	speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): Conditionalize on
8302	corresponding HAVE_NATIVE_*.
8303
83042003-09-25  Kevin Ryde  <kevin@swox.se>
8305
8306	* mpz/combit.c: Use GMP_NUMB_BITS not BITS_PER_MP_LIMB.
8307
8308	* demos/expr/exprfr.c: Allow for mpfr_inf_p, mpfr_nan_p and
8309	mpfr_number_p merely returning non-zero, rather than 1 or 0.
8310
8311	* demos/expr/exprfr.c, demos/expr/t-expr.c: Add erf, integer_p, zeta.
8312
8313	* demos/expr/Makefile.am (LDADD): Update comments on $(LIBM).
8314
83152003-09-24  Torbjorn Granlund  <tege@swox.com>
8316
8317	* tune/speed.c (routine): Add entires for mpn_addlsh1_n, mpn_sublsh1_n,
8318	mpn_rsh1add_n, and mpn_rsh1sub_n.
8319
8320	* tune/speed.h: Declare speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
8321	speed_mpn_rsh1add_n, and speed_mpn_rsh1sub_n.
8322
8323	* tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
8324	speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): New functions.
8325
8326	* gmp-impl.h: Declare mpn_addlsh1_n, mpn_sublsh1_n, mpn_rsh1add_n, and
8327	mpn_rsh1sub_n.
8328
8329	* mpn/asm-defs.m4: Add define_mpn's for addlsh1_n, sublsh1_n,
8330	rsh1add_n, and rsh1sub_n.
8331
8332	* mpn/powerpc64/*.asm: Add cycle counts in consistent style.  Misc
8333	styling edits.
8334
8335	* mpn/amd64/gmp-mparam.h: Retune.
8336
8337	* configure.in: Add #undefs for HAVE_NATIVE_mpn_addlsh1_n,
8338	HAVE_NATIVE_mpn_sublsh1_n, HAVE_NATIVE_mpn_rsh1add_n,
8339	HAVE_NATIVE_mpn_rsh1sub_n.
8340	(gmp_mpn_functions_optional): List addlsh1_n, sublsh1_n, rsh1add_n,
8341	and rsh1sub_n.
8342
8343	* mpn/amd64/addlsh1_n.asm: New file.
8344	* mpn/amd64/sublsh1_n.asm: New file.
8345	* mpn/amd64/rsh1add_n.asm: New file.
8346	* mpn/amd64/rsh1sub_n.asm: New file.
8347
83482003-09-24  Kevin Ryde  <kevin@swox.se>
8349
8350	* mpfr/*: Update to mpfr cvs 2003-09-24.
8351
8352	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Remove conftest* temporary files.
8353
83542003-09-23  Torbjorn Granlund  <tege@swox.com>
8355
8356	* gmp-impl.h (MUL_TOOM3_THRESHOLD, SQR_TOOM3_THRESHOLD): Now 128.
8357
83582003-09-23  Kevin Ryde  <kevin@swox.se>
8359
8360	* gmp-h.in (gmp_randinit_set): Use __gmp_const rather than const.
8361
83622003-09-22  Torbjorn Granlund  <tege@swox.com>
8363
8364	* tune/mul_n_mpn.c: (__gmpn_sqr_n): New #define.
8365	* tune/mul_n_open.c (__gmpn_sqr_n): New #define.
8366
8367	* mpn/generic/mul.c (mpn_sqr_n): Move from here...
8368	* mpn/generic/mul_n.c (mpn_sqr_n): ...to here.
8369	(mpn_sqr_n): Allocate workspace for toom3 using TMP_* mechanism except
8370	for very large operands when !WANT_FFT.
8371
8372	* mpn/generic/mul_n.c: Add a missing ";". Misc comment fixes.
8373
8374	* mpn/generic/mul.c: Remove spurious #include <stdio.h>.
8375
8376	* mpn/x86/k7/gmp-mparam.h: Retune.
8377
8378	* mpn/generic/mul_n.c (mpn_mul_n): Allocate workspace for toom3 using
8379	TMP_* mechanism except for very large operands when !WANT_FFT.
8380
8381	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE):
8382	Define conditionally on WANT_FFT and HAVE_NATIVE_mpn_sublsh1_n.
8383	(MPN_TOOM3_MAX_N): New #define.
8384
8385	* mpn/amd64/gmp-mparam.h: Retune.
8386
8387	* mpn/Makefile.am (TARG_DIST): Add amd64.
8388
8389	* mpn/generic/sqr_basecase.c: Use mpn_addlsh1_n when available.
8390
8391	* mpn/generic/mul_n.c: Use proper form for HAVE_NATIVE macros.
8392
83932003-09-22  Kevin Ryde  <kevin@swox.se>
8394
8395	* mpfr/*: Update to mpfr cvs 2003-09-22.
8396
83972003-09-21  Kevin Ryde  <kevin@swox.se>
8398
8399	* mpn/x86/pentium4/sse2/gmp-mparam.h (USE_PREINV_DIVREM_1,
8400	USE_PREINV_MOD_1): Set to 1 for new asm versions.
8401
8402	* mpfr/*: Update to mpfr cvs 2003-09-21.
8403
84042003-09-21  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
8405
8406	* mpn/generic/mul_n.c (mpn_toom3_mul_n): Conditionally use
8407	mpn_sublsh1_n, mpn_rsh1add_n and mpn_rsh1sub_n, in addition to
8408	mpn_addlsh1_n.  Avoid all copying, at the expense of some additional
8409	workspace.
8410
8411	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Accomodate
8412	latest toom3 code.
8413
84142003-09-19  Kevin Ryde  <kevin@swox.se>
8415
8416	* mpn/x86/pentium4/sse2/divrem_1.asm, mpn/x86/pentium4/sse2/mod_1.asm:
8417	New files.
8418
84192003-09-16  Kevin Ryde  <kevin@swox.se>
8420
8421	* tune/speed.c (run_one): Don't scale the -1.0 not-available return.
8422	Print "n/a" for times not-available.
8423
84242003-09-13  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
8425
8426	* mpn/generic/mul_n.c (toom3_interpolate): New function.
8427	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Call toom3_interpolate.
8428
84292003-09-12  Torbjorn Granlund  <tege@swox.com>
8430
8431	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove unused
8432	variables.
8433	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Use offset `+ 1', not `+ 2' in last
8434	MPN_DECR_U calls.
8435
84362003-09-12  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
8437
8438	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Rewrite.
8439
84402003-09-12  Torbjorn Granlund  <tege@swox.com>
8441
8442	* gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Reformulate
8443	to use the same form as MPN_TOOM3_MUL_N_TSIZE.
8444	(MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Update for new Toom3
8445	code requirements.
8446	* mpn/generic/mul_n.c (evaluate3, interpolate3, add2Times): Remove.
8447	(USE_MORE_MPN): Remove.
8448
84492003-08-31  Kevin Ryde  <kevin@swox.se>
8450
8451	* mpfr/*: Update to mpfr cvs 2003-08-31.
8452
84532003-08-30  Kevin Ryde  <kevin@swox.se>
8454
8455	* mpfr/*: Update to mpfr cvs 2003-08-30.
8456
84572003-08-29  Torbjorn Granlund  <tege@swox.com>
8458
8459	* mpn/amd64/copyi.asm: New file.
8460	* mpn/amd64/copyd.asm: New file.
8461	* mpn/amd64/README: New file.
8462
84632003-08-28  Torbjorn Granlund  <tege@swox.com>
8464
8465	* mpn/amd64/lshift.asm: New file.
8466	* mpn/amd64/rshift.asm: New file.
8467	* mpn/amd64/gmp-mparam.h: Retune.
8468
84692003-08-23  Kevin Ryde  <kevin@swox.se>
8470
8471	* tune/freq.c (freq_getsysinfo): Correction to speed_cycletime value
8472	established.
8473
8474	* mpz/rootrem.c, gmp-h.in, gmp.texi (mpz_rootrem): Don't return
8475	exactness indication, can get that from testing the remainder.
8476
8477	* mpn/x86/k7/aors_n.asm, mpn/x86/k7/mmx/copyi.asm: Amend to comments
8478	about loads and stores and what speed should be possible.
8479
84802003-08-22  Torbjorn Granlund  <tege@swox.com>
8481
8482	* mpn/amd64/add_n.asm: New file.
8483	* mpn/amd64/sub_n.asm: New file.
8484	* mpn/amd64/mul_1.asm: New file.
8485	* mpn/amd64/addmul_1.asm: New file.
8486	* mpn/amd64/submul_1.asm: New file.
8487
84882003-08-19  Kevin Ryde  <kevin@swox.se>
8489
8490	* longlong.h (add_ssaaaa, sub_ddmmss) [hppa 64]: Move down into main
8491	__GNUC__ block.  Exclude for _LONG_LONG_LIMB (ie. ABI=2.0n) since
8492	these forms are only for ABI=2.0w.
8493
8494	* longlong.h (count_leading_zeros) [__mcpu32__]: Check __mcpu32__ to
8495	avoid bfffo on GCC 3.4 in CPU32 mode.  Reported by Bernardo Innocenti.
8496
8497	* longlong.h (count_trailing_zeros) [x86_64]: Use "%q0" to force
8498	64-bit register destination.  Pointed out by Torbjorn.
8499
8500	* mpz/combit.c: Correction to carry handling when extending a
8501	negative, and use __GMPN_ADD_1.  Correction to complement limb for a
8502	negative when there's a non-zero low limb.
8503	* tests/mpz/bit.c (check_clr_extend, check_com_negs): Exercise these.
8504
8505	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add
8506	get_d_2exp.
8507	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Rand.pm,
8508	demos/perl/test.pl: Add gmp_urandomb_ui, gmp_urandomm_ui.
8509	(GMP::Rand::randstate): Accept a randstate object to copy.
8510	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Mpz.pm,
8511	demos/perl/test.pl: Add combit, rootrem.
8512
85132003-08-19  Torbjorn Granlund  <tege@swox.com>
8514
8515	* tune/Makefile.am (EXTRA_DIST): Add amd64.asm.
8516
85172003-08-17  Kevin Ryde  <kevin@swox.se>
8518
8519	* gmpxx.h [__MPFR_H]: Include full <iostream> for inlines.
8520	* tests/cxx/t-headfr.cc: New file, exercising this.
8521	* tests/cxx/Makefile.am: Add it.
8522
8523	* tests/cxx/t-constr.cc: Include config.h for WANT_MPFR.
8524
8525	* gmpxx.h: Correction to temp variable type in mpf -> mpfr assignment.
8526	Reported by Derrick Bass.
8527	* tests/cxx/t-assign.cc (check_mpfr): Exercise this.
8528
8529	* configure.in (WANT_MPFR): AC_DEFINE this, for the benefit of
8530	tests/cxx/t-*.cc.  (Was always meant to have been defined.)
8531	* tests/cxx/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpfr.
8532
8533	* gmpxx.h: __gmp_default_rounding_mode -> __gmpfr_default_rounding_mode
8534	(struct __gmp_hypot_function): Correction to mpfr_hypot addition.
8535	* tests/cxx/t-misc.cc (check_mpfr_hypot): Corrections to mpfr/long
8536	tests.
8537
85382003-08-16  Torbjorn Granlund  <tege@swox.com>
8539
8540	* configure.in (amd64): New.
8541
8542	* mpn/amd64/gmp-mparam.h: New file.
8543
8544	* tune/amd64.asm: New file, derived in part from tune/pentium.asm.
8545
85462003-08-15  Kevin Ryde  <kevin@swox.se>
8547
8548	* tune/freq.c (freq_irix_hinv): Reinstate, for the benefit of IRIX 6.2.
8549	(freq_attr_get_invent): Conditionalize on INFO_LBL_DETAIL_INVENT too.
8550
85512003-08-14  Kevin Ryde  <kevin@swox.se>
8552
8553	* mpq/get_d.c: Use mpn_get_d.
8554	* tests/mpq/t-get_d.c (check_onebit): New test.
8555
8556	* gmp.texi (Notes for Particular Systems): Under x86 cpu types, note
8557	i386 is a fat binary, remove pentium4 recommendation since i386 is now
8558	quite reasonable for p4.
8559	(Notes for Particular Systems): Under Windows DLLs, remove caveat
8560	about --enable-cxx now ok, update .lib creation for new libtool,
8561	remove .exp not needed for MS C.
8562	(Notes for Package Builds): i386 is a fat binary.
8563	(Reentrancy): Remove SCO ctype.h note, don't want to list every system
8564	misfeature, and was quite possibly for non-threading mode anyway.
8565	(Autoconf): Remove notes on gmp 2 detection, too old to want to
8566	encourage anyone to use.
8567	(Karatsuba Multiplication): Correction to threshold increase/decrease
8568	for a and b terms.  Reported by Richard Brent and Paul Zimmermann.
8569	Also add various further index entries.
8570
8571	* tune/freq.c (freq_attr_get_invent): New function.
8572	(freq_irix_hinv): Remove, in favour or freq_attr_get_invent.
8573	* configure.in (AC_CHECK_FUNCS): Add attr_get.
8574	(AC_CHECK_HEADERS): Add invent.h, sys/attributes.h, sys/iograph.h.
8575
85762003-08-03  Kevin Ryde  <kevin@swox.se>
8577
8578	* tune/tuneup.c (tune_mul): Use MUL_KARATSUBA_THRESHOLD_LIMIT.
8579
85802003-08-02  Kevin Ryde  <kevin@swox.se>
8581
8582	* mpn/asm-defs.m4: Tweak some comments, add hpux11 to m4wrap 0xFF
8583	problem systems.
8584
8585	* configure.in (*-*-sco3.2v5*): Remove lt_cv_archive_cmds_need_lc=no,
8586	since libtool no longer uses it.  This was a workaround fixing ctype.h
8587	in SCO 5 shared libraries; not sure if libtool now gets it right on
8588	its own, let's hope so.
8589
8590	* configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Remove, libtool no
8591	longer demands HOST_CC.
8592
8593	* configure.in: When C or C++ compiler not found, refer user to
8594	config.log.
8595
8596	* configure.in (i386-*-*): Turn i386 into a fat binary build.
8597	* mpn/x86/fat/fat.c, mpn/x86/fat/fat_entry.asm,
8598	mpn/x86/fat/gmp-mparam.h, mpn/x86/fat/gcd_1.c, mpn/x86/fat/mode1o.c:
8599	New files.
8600	* gmp-impl.h (struct cpuvec_t) [x86 fat]: New structure.
8601	* longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB) [x86 fat]: Define.
8602	* mpn/asm-defs.m4 (foreach): New macro.
8603	* mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): New define.
8604	* mpn/x86/sqr_basecase.asm: New file, primarily as a fallback for fat
8605	binaries.
8606	* mpn/x86/p6/gmp-mparam.h, mpn/x86/p6/mmx/gmp-mparam.h: Add comments
8607	about fat binary SQR_KARATSUBA_THRESHOLD for p6 and p6/mmx.
8608
8609	* configure.in: Add various supports for fat binaries, via fat_path,
8610	fat_functions and fat_thresholds variables.
8611	* acinclude.m4 (GMP_STRIP_PATH): Mung $fat_path too.
8612	(GMP_FAT_SUFFIX, GMP_REMOVE_FROM_LIST): New macros.
8613	* gmp-impl.h: Add various supports for fat binaries.
8614	(DECL_add_n etc): New macros.
8615	(mpn_mul_basecase etc): Define only if not already defined.
8616	* mpn/asm-defs.m4 (m4_config_gmp_mparam): Mention fat binary.
8617	(MPN): Use m4_unquote, for the benefit of fat binary name expansion.
8618	* doc/configuration: Notes on fat binaries.
8619	* gmp-impl.h (MUL_TOOM3_THRESHOLD_LIMIT): Define always.
8620	(MUL_KARATSUBA_THRESHOLD_LIMIT): New define.
8621	* mpn/generic/mul.c, mpn/generic/mul_n.c: Use these.
8622	* tune/divrem1div.c, tune/divrem1inv.c, tune/mod_1_div.c,
8623	tune/mod_1_inv.c: Define OPERATION_divrem_1 and OPERATION_mod_1, to
8624	tell fat.h what's being done.
8625
8626	* config.guess (alpha-*-*): Update comments on what configfsf.guess
8627	does and doesn't do for us.
8628
86292003-07-31  Kevin Ryde  <kevin@swox.se>
8630
8631	* config.guess: Remove $dummy.o files everywhere, in case vendor
8632	compilers produce that even when not asked.
8633
8634	* demos/perl/GMP.xs (class_or_croak): Rename "class" parameter to
8635	avoid C++ keyword.
8636	(coerce_ulong, coerce_long): Move croaks to stop g++ 3.3 complaining
8637	about uninitialized variables.
8638
8639	* demos/perl/INSTALL: Add notes on building with a DLL.
8640
8641	* longlong.h (count_trailing_zeros) [x86_64]: Ensure bsfq destination
8642	is a 64-bit register.  Diagnosed by Francois G. Dorais.
8643
86442003-07-31  Torbjorn Granlund  <tege@swox.com>
8645
8646	* longlong.h [ppc]: Remove nested test for vxworks.
8647
86482003-07-24  Kevin Ryde  <kevin@swox.se>
8649
8650	* gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si for
8651	mpz*long and long*mpz.
8652	* tests/cxx/t-ops.cc (check_mpz): Exercise mpz*long and mpz*ulong.
8653
8654	* cxx/ismpf.cc: Use std::locale decimal point when available.  Expect
8655	localeconv available always.
8656	* tests/cxx/t-locale.cc: Enable check_input tests.
8657
8658	* gmpxx.h (struct __gmp_hypot_function): Use mpfr_hypot.
8659	* tests/cxx/t-misc.cc (check_mpfr_hypot): New tests.
8660
8661	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-ops.cc,
8662	tests/cxx/t-prec.cc, tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc:
8663	Include config.h for WANT_MPFR.
8664
8665	* tests/mpz/bit.c (check_single): Correction to a diagnostic print.
8666
86672003-07-24  Niels M�ller  <nisse@lysator.liu.se>
8668
8669	* mpz/combit.c: New file.
8670	* Makefile.am, mpz/Makefile.am: Add it.
8671	* gmp-h.in (mpz_combit): Add prototype.
8672	* tests/mpz/bit.c (check_single): Exercise mpz_combit.
8673
86742003-07-16  Kevin Ryde  <kevin@swox.se>
8675
8676	* mpn/generic/get_d.c: Correction to infinity handling for large exp.
8677
86782003-07-14  Kevin Ryde  <kevin@swox.se>
8679
8680	* mpz/get_d.c, mpz/get_d_2exp.c, mpf/get_d.c, mpf/get_d_2exp.c: Use
8681	mpn_get_d.
8682
8683	* mpn/generic/get_d.c: New file, based on mpz/get_d.c and insert-dbl.c.
8684	* configure.in, mpn/Makefile.am: Add it.
8685	* gmp-impl.h (mpn_get_d): Add prototype.
8686
8687	* tests/mpn/t-get_d.c: New file.
8688	* tests/mpn/Makefile.am: Add it.
8689
8690	* tests/mpz/t-get_d_2exp.c (check_onebit, check_round): Test negatives.
8691	(check_onebit): Add a few more bit sizes.
8692
8693	* tests/misc.c, tests/tests.h (tests_isinf): New function.
8694
86952003-07-12  Kevin Ryde  <kevin@swox.se>
8696
8697	* configure.in (GMP_PROG_CXX_WORKS): Include $CPPFLAGS, same as
8698	automake does in the actual build.
8699
8700	* acinclude.m4 (GMP_PROG_CXX_WORKS): In the namespace test, declare
8701	namespace before trying to use.  In std iostream test, provoke a
8702	failure from Compaq C++ in pre-standard mode.
8703
87042003-07-08  Kevin Ryde  <kevin@swox.se>
8705
8706	* acinclude.m4 (GMP_PROG_CC_WORKS): Use separate compiles for various
8707	known problems, and indicate to the user the reason for rejecting.
8708	(GMP_PROG_CXX_WORKS): Ditto, and insist on being able to execute each
8709	compiled program.
8710
87112003-07-05  Kevin Ryde  <kevin@swox.se>
8712
8713	* config.sub: Add comments to our alias transformations.
8714
8715	* configfsf.sub, configfsf.guess: Update to 2003-07-04.
8716
8717	* acinclude.m4 (GMP_PROG_CC_WORKS, GMP_PROG_CC_WORKS_LONGLONG): Show
8718	failing program in config.log, per other autoconf tests.
8719
8720	* configure.in (i786-*-*): Recognise as pentium4, per configfsf.sub.
8721
87222003-06-28  Kevin Ryde  <kevin@swox.se>
8723
8724	* mpz/get_d_2exp.c, mpf/get_d_2exp.c: Avoid res==1.0 when floats round
8725	upwards.
8726
8727	* tests/mpz/t-get_d_2exp.c: New file.
8728	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
8729	* tests/mpf/t-get_d_2exp.c: New file.
8730	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
8731	* tests/x86call.asm, test/tests.h (x86_fldcw, x86_fstcw): New
8732	functions.
8733	* tests/misc.c, tests/tests.h (tests_hardware_getround,
8734	tests_hardware_setround): New functions.
8735
87362003-06-25  Kevin Ryde  <kevin@swox.se>
8737
8738	* mpn/sparc64/dive_1.c: New file.
8739
8740	* mpn/sparc64/sparc64.h: New file.
8741	* mpn/sparc64/mode1o.c: Remove things now in sparc64.h.
8742
8743	* mpfr/*: Update to mpfr cvs 2003-06-25.
8744
8745	* acinclude.m4 (GMP_PROG_CC_WORKS): In last change provoking gnupro
8746	gcc, don't use ANSI style function definition.
8747
87482003-06-22  Kevin Ryde  <kevin@swox.se>
8749
8750	* mpn/pa32/hppa1_1/udiv.asm: Remove .proc, .entry, .exit and .procend,
8751	handled by PROLOGUE and EPILOGUE.  Comment out .callinfo, per other
8752	asm files.
8753
8754	* gmpxx.h (mpz_class __gmp_binary_divides, __gmp_binary_modulus): Fix
8755	long/mpz and long%mpz for dividend==LONG_MIN divisor==-LONG_MIN.
8756	(mpz_class __gmp_binary_modulus): Fix mpz%long for negative dividend.
8757	* tests/cxx/t-ops.cc (check_mpz): Add test cases for these, merging
8758	operator/ and operator% sections for clarity.
8759
87602003-06-21  Kevin Ryde  <kevin@swox.se>
8761
8762	* mpfr/*: Update to mpfr cvs 2003-06-21.
8763
8764	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code by Torbjorn provoking an
8765	ICE from gcc 2.9-gnupro-99r1 under -O2 -mcpu=ev6.
8766	* configure.in (alpha*-*-* gcc_cflags_cpu): Fallback on -mcpu=ev56 for
8767	this compiler.
8768
8769	* gmpxx.h (get_d): Remove comments about long double, double is
8770	correct for get_d, a future long double form would be get_ld.
8771
87722003-06-19  Kevin Ryde  <kevin@swox.se>
8773
8774	* mpfr/*: Update to mpfr cvs 2003-06-19.
8775
8776	* mpn/generic/dive_1.c: Share src[0] fetch among all cases.  No need
8777	for separate final umul_ppmm in even case, make it part of the loop.
8778
8779	* mpz/get_d_2exp.c, mpq/set_si.c, mpq/set_ui.c: Nailify.
8780
8781	* mpf/iset_si.c: Rewrite using mpf/set_si.c code, in particular this
8782	nailifies it.
8783	* tests/mpf/t-set_si.c: Nailify tests.
8784
8785	* mpf/iset_ui.c: Nailify, as per mpf/set_ui.c
8786	* tests/mpf/t-set_ui.c: New file.
8787	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
8788
87892003-06-15  Kevin Ryde  <kevin@swox.se>
8790
8791	* mpfr/*: Update to mpfr cvs 2003-06-15.
8792
8793	* mpn/x86/k6/mode1o.asm: Remove a bogus ASSERT.
8794
87952003-06-12  Kevin Ryde  <kevin@swox.se>
8796
8797	* configure.in (--enable-assert): Emit WANT_ASSERT to config.m4.
8798	* mpn/powerpc32/powerpc-defs.m4, mpn/x86/x86-defs.m4 (ASSERT): Check
8799	WANT_ASSERT is defined.
8800
8801	* mpn/sparc32/v9/udiv.asm: Amend heading, this file is for sparc v9.
8802
8803	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): In libtool openbsd hack,
8804	disard error messages from cp, for the benefit of --disable-shared or
8805	systems not using names libgmp.so.*.
8806
8807	* tests/devel/try.c (try_one): When overlapping, copy source data
8808	after filling dst.  Previously probably used only DEADVAL in
8809	overlapping cases.
8810
88112003-06-11  Torbjorn Granlund  <tege@swox.com>
8812
8813	* mpf/random2.c: Rewrite.  Ignore sign of exp parameter.
8814
88152003-06-10  Kevin Ryde  <kevin@swox.se>
8816
8817	* mpn/sparc64/mode1o.c: New file.
8818
88192003-06-09  Torbjorn Granlund  <tege@swox.com>
8820
8821	* mpn/powerpc32/lshift.asm: Add more cycle counts.
8822	* mpn/powerpc32/rshift.asm: Add more cycle counts.
8823
8824	* mpn/ia64/addmul_1.asm: Reformat comments for 80 columns.
8825
8826	* gmp-impl.h (udiv_qrnnd_preinv1): New name for udiv_qrnnd_preinv.
8827	(udiv_qrnnd_preinv2): New name for udiv_qrnnd_preinv2norm.
8828	(udiv_qrnnd_preinv): New #define, making udiv_qrnnd_preinv2
8829	the default.
8830	* tune/speed.c: Corresponding changes.
8831	* tune/speed.h: Likewise.
8832	* tune/common.c: Likewise.
8833
8834	* mpf/get_str.c: Simplify `off' computation.
8835
8836	* longlong.h: Tabify.
8837
88382003-06-09  Kevin Ryde  <kevin@swox.se>
8839
8840	* gmp.texi (ABI and ISA): FreeBSD has sparc64 too, just say "BSD" to
8841	cover all flavours.
8842	* configure.in: Ditto in some comments.
8843
8844	* mpfr/*: Update to mpfr cvs 2003-06-09.
8845
8846	* tests/cxx/Makefile.am (LDADD): Add -L$(top_builddir)/$(LIBS), for
8847	the benefit of gcc 3.2 on itanium2-hp-hpux11.22.
8848
8849	* tune/many.pl (mul_2): Add speed routine settings.
8850	(MAKEFILE): Close when done, for the benefit of development hackery.
8851
88522003-06-08  Kevin Ryde  <kevin@swox.se>
8853
8854	* mpfr/*: Update to mpfr cvs 2003-06-08.
8855
8856	* mpn/x86/x86-defs.m4 (femms): Remove fallback to emms.
8857	(cmovCC, psadbw): Remove simulated versions.
8858	(cmov_available_p, psadbw_available_p): Remove.
8859	This trickery was only ever for development purposes on machines
8860	without those instructions.  Removing it simplifies gmp and in
8861	particular avoids complications for fat binary builds.  Development
8862	can be done with a wrapper around "as" if really needed.
8863
8864	* mpn/x86/divrem_1.asm: Don't use loop_or_decljnz, now K6 has its own
8865	mpn/x86/k6/divrem_1.asm.  Amend K6 comments now moved to there.
8866	* mpn/x86/x86-defs.m4 (loop_or_decljnz): Remove, no longer used.
8867
8868	* mpn/x86/k6/divrem_1.asm: New file, derived from mpn/x86/divrem_1.asm.
8869
8870	* mpn/x86/k6/pre_mod_1.asm: Remove comments now in mpn/x86/mod_1.asm.
8871
8872	* mpn/x86/mod_1.asm: Put mpn_mod_1c after mpn_mod_1 for better branch
8873	prediction.  Put done_zero at end for less wastage in alignment.  Use
8874	decl+jnz unconditionally since in fact it's ok on k6.  Amend comments.
8875
88762003-06-07  Kevin Ryde  <kevin@swox.se>
8877
8878	* mpn/generic/mode1o.c: Fix ASSERTs on return value.
8879
8880	* gmp.texi (Build Options): Add viac3 and viac32 cpu types.
8881	(ABI and ISA): Note on sparcv9 ABI=32 vs ABI=64 speed.  More indexing.
8882
8883	* configfsf.guess, configfsf.sub: Update to 2003-06-06.
8884	* config.guess: Remove $RANDOM hack supporting netbsd 1.4, not needed
8885	by new configfsf.guess.
8886
88872003-06-06  Torbjorn Granlund  <tege@swox.com>
8888
8889	* mpn/ia64/submul_1.asm: Add branch over .align block.
8890
88912003-06-05  Torbjorn Granlund  <tege@swox.com>
8892
8893	* longlong.h (add_ssaaaa) [pa64]: Output zero operand as register 0.
8894	Allow more immediate operands.
8895	(sub_ddmmss) [pa64]: Likewise.
8896	(add_ssaaaa) [pa32]: Likewise.
8897	(sub_ddmmss) [pa32]: Likewise.
8898
8899	* mpn/pa64: Change ".level 2.0W" to ".level 2.0w" to please
8900	picky GNU assembler.
8901
89022003-06-05  Kevin Ryde  <kevin@swox.se>
8903
8904	* gmp.texi (Integer Special Functions): In mpz_array_init, fix type
8905	shown for integer_array and give an example use.
8906
89072003-06-04  Torbjorn Granlund  <tege@swox.com>
8908
8909	* mpf/set_str.c (mpf_set_str): Work around gcc 2 bug triggered on
8910	alpha.
8911
89122003-06-03  Kevin Ryde  <kevin@swox.se>
8913
8914	* mpn/x86/pentium/README: Add 7 c/l mmx mul_1, tweak wordings.
8915
8916	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Use octal char constants in test
8917	program, hex is not supported by K&R.
8918
89192003-06-02  Torbjorn Granlund  <tege@swox.com>
8920
8921	* mpn/mips64/divrem_1.asm: New file.
8922
89232003-06-01  Torbjorn Granlund  <tege@swox.com>
8924
8925	* mpn/powerpc32/lshift.asm: Reformat code.
8926	* mpn/powerpc32/rshift.asm: Reformat code.
8927
89282003-05-30  Kevin Ryde  <kevin@swox.se>
8929
8930	* tests/misc.c (tests_start): Set stdout and stderr to unbuffered, to
8931	avoid any chance of losing output on segv etc.
8932
89332003-05-28  Torbjorn Granlund  <tege@swox.com>
8934
8935	* mpf/get_str.c: Move label `done' to match TMP_MARK and TMP_FREE.
8936	Remove redundant variable prec.
8937
89382003-05-26  Torbjorn Granlund  <tege@swox.com>
8939
8940	* tests/mpz/convert.c: Test bases up to 62.
8941
8942	* tests/mpf/t-conv.c: Test bases up to 62.
8943
8944	* demos/pexpr.c: Don't iterate to get accurate timing.
8945
8946	* mpf/set_str.c (mpn_pow_1_highpart): Cleanup.
8947
8948	* mp_dv_tab.c: Fix typo.
8949
8950	* mpf/get_str.c: Rewrite (now sub-quadratic).
8951
89522003-05-22  Kevin Ryde  <kevin@swox.se>
8953
8954	* tests/mpn/t-divrem_1.c: New file.
8955	* tests/mpn/Makefile.am: Add it.
8956
89572003-05-22  Torbjorn Granlund  <tege@swox.com>
8958
8959	* config.sub: Recognize viac3* processors.
8960
89612003-05-20  Torbjorn Granlund  <tege@swox.com>
8962
8963	* mpn/sparc64/addmul_2.asm: New file.
8964
89652003-05-19  Torbjorn Granlund  <tege@swox.com>
8966
8967	* configure.in: Recognize alphaev7* as alphaev67.
8968
8969	* config.guess: Recognize viac3* processors.
8970	* configure.in: Set up path for viac3* processors.
8971	* acinclude.m4 (X86_PATTERN): Include viac3* processors.
8972
89732003-05-19  Kevin Ryde  <kevin@swox.se>
8974
8975	* tune/freq.c (freq_pstat_getprocessor): New function.
8976	(freq_all): Use it.
8977	* configure.in (AC_CHECK_HEADERS): Add sys/pstat.h.
8978	(AC_CHECK_FUNCS): Add pstat_getprocessor.
8979
89802003-05-15  Kevin Ryde  <kevin@swox.se>
8981
8982	* mpn/generic/mul_fft.c (mpn_mul_fft_decompose): Remove "inline",
8983	since the code is a bit too big.  gcc doesn't actually inline when
8984	alloca (TMP_ALLOC) is used anyway.
8985
89862003-05-13  Kevin Ryde  <kevin@swox.se>
8987
8988	* gmp.texi (Notes for Particular Systems): Libtool directory is .libs
8989	not _libs for mingw dll.  Reported by Andreas Fabri.
8990
89912003-05-07  Kevin Ryde  <kevin@swox.se>
8992
8993	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code to generate sse2/xmm code
8994	from gcc -march=pentium4, to check the assembler supports that.
8995	(GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): New macros.
8996	* configure.in (pentium4-*-*): Use them to see if gcc -march=pentium4
8997	(with sse2) is ok.
8998
89992003-05-06  Kevin Ryde  <kevin@swox.se>
9000
9001	* mpz/com.c: Rate size==0 as UNLIKELY, fix comment to mpn_add_1.
9002
9003	* tune/freq.c (<sys/sysinfo.h>): Include only when needed for
9004	getsysinfo(), to avoid a problem with this file on AIX 5.1.
9005
90062003-05-03  Torbjorn Granlund  <tege@swox.com>
9007
9008	* mpf/set_str.c: Do not ignore supposedly superfluous digits (in part
9009	reverting last change).
9010
90112003-05-03  Kevin Ryde  <kevin@swox.se>
9012
9013	* gmp.texi: Use @code for files in @cindex entries, it looks nicer
9014	than @file.
9015
9016	* Makefile.am: Note gmp 4.1.1 and 4.1.2 version info.
9017
9018	* configure.in, acinclude.m4 (GMP_CRAY_OPTIONS): New macro for Cray
9019	system setups, letting AC_REQUIRE do its job instead of a hard coded
9020	AC_PROG_EGREP.
9021
9022	* config.guess: Amend fake RANDOM to avoid ". configfsf.guess" which
9023	segfaults on Debian "ash" 0.4.16.
9024
90252003-05-01  Kevin Ryde  <kevin@swox.se>
9026
9027	* configure.in (AC_CHECK_FUNCS): Add getsysinfo.
9028	(AC_CHECK_HEADERS): Add sys/sysinfo.h and machine/hal_sysinfo.h.
9029	* tune/freq.c (freq_getsysinfo): New function.
9030	(freq_all): Use it.
9031	(freq_sysctlbyname_i586_freq, freq_sysctlbyname_tsc_freq,
9032	freq_sysctl_hw_cpufrequency, freq_sysctl_hw_model): Set
9033	speed_cycletime before trying to print it, when verbose.
9034
90352003-04-28  Torbjorn Granlund  <tege@swox.com>
9036
9037	* mpf/set_str.c: Major overhaul.
9038	(mpn_pow_1_highpart): New helper function, meat extracted from
9039	mpf_set_str.
9040
90412003-04-24  Kevin Ryde  <kevin@swox.se>
9042
9043	* acinclude.m4 (GMP_GCC_ARM_UMODSI): Quote result string against m4.
9044
9045	* configure, ltmain.sh, aclocal.m4: Update to libtool 1.5.
9046
9047	* longlong.h (add_ssaaaa) [all]: Remove first "%" commutative in each,
9048	since gcc only supports one per asm.
9049
9050	* printf/doprnt.c: Add M for mp_limb_t.
9051	* tests/misc/t-printf.c: Exercise this.
9052
9053	* tests/mpz/t-cmp_d.c: Test infinities.
9054	* tests/mpf/t-cmp_d.c: New file.
9055	* tests/mpf/Makefile.am: Add it.
9056
9057	* mpz/cmp_d.c, mpz/cmpabs_d.c, mpf/cmp_d.c: NaN invalid, Inf bigger
9058	than any value.
9059	* mpz/set_d.c, mpq/set_d.c, mpf/set_d.c: Nan or Inf invalid.
9060
9061	* configure.in (AC_CHECK_FUNCS): Add raise.
9062	* invalid.c: New file.
9063	* Makefile.am: Add it.
9064	* gmp-impl.h (__gmp_invalid_operation): Add prototype.
9065	(DOUBLE_NAN_INF_ACTION): New macro.
9066
9067	* tests/trace.c, tests/tests.h (d_trace): New function.
9068	* tests/misc.c, tests/tests.h (tests_infinity_d): New function.
9069	* tests/misc.c (mpz_erandomb, mpz_errandomb): Use gmp_urandomm_ui.
9070
9071	* tune/tuneup.c, tune/common.c, tests/devel/try.c: Cast various
9072	mp_size_t values for printf %ld in case mp_size_t==int.  Use
9073	gmp_printf for mp_limb_t values.
9074
9075	* gmp.texi (Nomenclature and Types): Add mp_exp_t, mp_size_t,
9076	gmp_randstate_t.  Note ulong for bit counts and size_t for byte
9077	counts.  Don't bother with @noindent.
9078	(Debugging): New valgrind is getting MMX/SSE.
9079	(Integer Comparisons): mpz_cmp_d and mpz_cmpabs_d on NaNs and Infs.
9080	(Float Comparison): mpf_cmp_d behaviour on NaNs and Infs.
9081	(Low-level Functions): Note with mpn_hamdist what hamming distance is.
9082	(Formatted Output Strings): Add type M.
9083	(Internals): Remove remarks on ulong bits and size_t bytes.  Move int
9084	field remarks to ...
9085	(Integer Internals, Float Internals): ... here.
9086
90872003-04-19  Kevin Ryde  <kevin@swox.se>
9088
9089	* configure.in (*sparc*-*-* ABI=32): Add umul to extra_functions.
9090
9091	* mpn/x86/p6/mul_basecase.asm: New file.
9092
90932003-04-18  Kevin Ryde  <kevin@swox.se>
9094
9095	* configure.in (m68060-*-*): Fallback to gcc -m68000 when -m68060 not
9096	available, and don't use mpn/m68k/mc68020 asm routines.  (Avoids 32x32
9097	mul and 64/32 div which trap to the kernel on 68060.  Advice by
9098	Richard Zidlicky.)
9099	* mpn/m68k/README: Update notes on directory usage.
9100
9101	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Add a hack to let the
9102	test programs run with a shared libgmpxx on openbsd 3.2.
9103
9104	* gmp.texi (Language Bindings): Add Guile.
9105
91062003-04-12  Kevin Ryde  <kevin@swox.se>
9107
9108	* configure.in (cygwin*, mingw*, pw32*, os2*): Add
9109	-Wl,--export-all-symbols to GMP_LDFLAGS, no longer the default in
9110	latest mingw and libtool.
9111
9112	* acinclude.m4 (GMP_ASM_COFF_TYPE): New macro.
9113	* configure.in (x86s): Use it.
9114	* mpn/x86/x86-defs.m4 (COFF_TYPE): New macro.
9115	(PROLOGUE_cpu): Use it, for the benefit of mingw DLLs.
9116
9117	* gmp-impl.h (mpn_copyi, mpn_copyd): Add __GMP_DECLSPEC.
9118
9119	* gmp.texi (Known Build Problems): Remove windows test program .exe
9120	repeated built, fixed by new libtool.  Remove MacOS C++ shared library
9121	creation, fixed by new libtool.
9122	(Notes for Package Builds, Known Build Problems): Remove DESTDIR notes
9123	on libgmpxx, fixed in new libtool.
9124
91252003-04-10  Torbjorn Granlund  <tege@swox.com>
9126
9127	* configure.in: Match turbosparc.
9128	* config.guess: Recognize turbosparc (just for *bsd for now).
9129
91302003-04-09  Kevin Ryde  <kevin@swox.se>
9131
9132	* mpf/mul_ui.c [nails]: Call mpf_mul to handle v > GMP_NUMB_MAX.
9133
9134	* tests/mpz/t-mul.c (main): Don't try FFT sizes when FFT disabled via
9135	MP_SIZE_T_MAX, eg. for nails.
9136
9137	* tests/cxx/t-ternary.cc: Split up tests to help compile speed and
9138	memory usage.
9139
9140	* tests/devel/try.c: Print seed under -R, add -E to reseed, use ulong
9141	for seed not uint.
9142
9143	* gmp.texi: Add @: after various abbreviations, more index entries.
9144	(leftarrow): New macro, for non-tex.
9145	(Random State Initialization): Remove commented gmp_randinit_lc, not
9146	going to be implemented.
9147	(Random Number Algorithms): New section.
9148	(References): Add Matsumoto and Nishimura on Mersenne Twister, add
9149	Bertot, Magaud and Zimmermann on GMP Square Root.
9150
91512003-04-06  Kevin Ryde  <kevin@swox.se>
9152
9153	* tests/mpz/t-gcd_ui.c: New file.
9154	* tests/mpz/Makefile.am: Add it.
9155
9156	* mpz/gcd_ui.c: Correction to return value on longlong limb systems,
9157	limb might not fit a ulong.
9158
91592003-04-04  Kevin Ryde  <kevin@swox.se>
9160
9161	* configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
9162	2003-04-02.
9163
91642003-04-02  Kevin Ryde  <kevin@swox.se>
9165
9166	* configure.in (*-*-cygwin*): No longer force lt_cv_sys_max_cmd_len,
9167	libtool has addressed this now.
9168	(AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): Remove this, libtool _LT_AC_LOCK
9169	no longer needs it.
9170
9171	* acinclude.m4 (GMP_PROG_AR): Also set ac_cv_prog_AR and
9172	ac_cv_prog_ac_ct_AR when adding flags to AR, so they're not lost by
9173	libtool's call to AC_CHECK_TOOL.
9174
91752003-04-01  Kevin Ryde  <kevin@swox.se>
9176
9177	* configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
9178	2003-03-31.
9179
9180	* configure.in (AC_PROG_F77): Add a dummy AC_PROVIDE to stop libtool
9181	running F77 probes.
9182
9183	* randlc2x.c (gmp_rand_lc_struct): Add comments about what exactly is
9184	in each field.
9185	(randseed_lc): Rename seedp to seedz to avoid confusion with seedp in
9186	the lc function.  Suggested by Pedro Gimeno.
9187	(gmp_randinit_lc_2exp): Use __GMP_ALLOCATE_FUNC_TYPE.  No need for
9188	"+1" in mpz_init2 of _mp_seed.  Don't bother with mpz_init2 for _mp_a.
9189
91902003-03-29  Kevin Ryde  <kevin@swox.se>
9191
9192	* configure.in (m68k-*-*): Use -O2, no longer need to fallback to -O.
9193	* acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): Remove macro.
9194
9195	* configure.in (AC_CHECK_TYPES): Add notes on why tested.
9196
9197	* gmp.texi (GMPrefu, GMPpxrefu, GMPreftopu, GMPpxreftopu): New macros,
9198	use them for all external references to get URLs into HTML output.
9199	(Random State Initialization): Add gmp_randinit_set.
9200	(Random State Miscellaneous): New section.
9201
92022003-03-29  Kevin Ryde  <kevin@swox.se>
9203
9204	* randbui.c, randmui.c: New files.
9205	* Makefile.am: Add them.
9206	* gmp-h.in (gmp_urandomb_ui, gmp_urandomm_ui): Add prototypes.
9207	* tests/rand/t-urbui.c, tests/rand/t-urmui.c: New files.
9208	* tests/rand/Makefile.am: Add them.
9209
9210	* gmp-impl.h (gmp_randstate_srcptr): New typedef.
9211	(gmp_randfnptr_t): Add randiset_fn.
9212	* randiset.c: New file.
9213	* Makefile.am: Add it.
9214	* gmp-h.in (gmp_randinit_set): Add prototype.
9215	* randlc2x.c, randmt.c: Add gmp_randinit_set support.
9216	* tests/rand/t-iset.c: New file.
9217	* tests/rand/Makefile.am: Add it.
9218
9219	* tests/misc.c, tests/tests.h (call_rand_algs): New function.
9220
92212003-03-27  Kevin Ryde  <kevin@swox.se>
9222
9223	* mpz/bin_uiui.c: Use plain "*" for kacc products rather than
9224	umul_ppmm since high not needed, except for an ASSERT now amended.
9225
92262003-03-26  Kevin Ryde  <kevin@swox.se>
9227
9228	* demos/expr/exprfr.c (cbrt, cmpabs, exp2, gamma, nextabove,
9229	nextbelow, nexttoward): New functions.
9230	* demos/expr/t-expr.c: Exercise these.
9231
9232	* mpfr/*: Update to mpfr cvs 2003-03-26.
9233
9234	* gmp-impl.h (MPZ_REALLOC): Use UNLIKELY, to expect no realloc.
9235
9236	* tune/time.c (cycles_works_p): Scope variables down to relevant part
9237	to avoid warnings about unused.
9238
9239	* configfsf.guess, configfsf.sub: Update to 2003-02-22.
9240	* config.guess: Fake a $RANDOM variable when running configfsf.guess,
9241	to workaround a problem on m68k NetBSD 1.4.1.
9242
9243	* mpz/fac_ui.c: Remove unused variable "z1".
9244
9245	* tune/freq.c (freq_irix_hinv): Allow "Processor 0" line from IRIX 6.5.
9246
92472003-03-24  Torbjorn Granlund  <tege@swox.com>
9248
9249	* randlc2x.c (randget_lc): Remove write-only variable rn.
9250	* mpf/eq.c: Remove write-only variable usign.
9251	* gen-psqr.c (main): Remove write-only variable numb_bits.
9252
92532003-03-17  Torbjorn Granlund  <tege@swox.com>
9254
9255	* Makefile.am (libgmp_la_SOURCES): Add mp_dv_tab.c.
9256	(libmp_la_SOURCES): Add mp_dv_tab.c.
9257
9258	* mpn/alpha/invert_limb.asm: Add a few comments.
9259
9260	* mp_dv_tab.c: New file, defining __gmp_digit_value_tab.
9261
9262	* mpz/set_str.c: Get rid of function digit_value_in_base and use table
9263	__gmp_digit_value_tab instead.
9264	* mpz/inp_str.c: Likewise.
9265	* mpf/set_str.c: Likewise.
9266	* mpbsd/min.c: Likewise.
9267	* mpbsd/xtom.c: Likewise.
9268
9269	* mpz/set_str.c: Allow bases <= 62.  Return error for invalid bases.
9270	* mpz/inp_str.c: Likewise.
9271	* mpf/set_str.c: Likewise.
9272	* mpz/out_str.c: Likewise.
9273	* mpz/get_str.c: Likewise.
9274	* mpf/get_str.c: Likewise.
9275
9276	* mpz/inp_str.c: Restucture to allocate more string space just
9277	before needed.
9278	* mpbsd/min.c: Likewise.
9279
9280	* longlong.h (__udiv_qrnnd_c): Remove redundant casts.
9281	(32-bit sparc): Test HAVE_HOST_CPU_supersparc in addition to various
9282	sparc_v8 spellings.
9283
92842003-03-17  Kevin Ryde  <kevin@swox.se>
9285
9286	* mpfr/*: Update to mpfr cvs 2003-03-17.
9287
92882003-03-15  Kevin Ryde  <kevin@swox.se>
9289
9290	* Makefile.am (EXTRA_libgmp_la_SOURCES): Use this for TMP_ALLOC
9291	sources, instead of a libdummy.la.
9292
92932003-03-16  Torbjorn Granlund  <tege@swox.com>
9294
9295	* config.guess: Recognize supersparc and microsparc for *BSD systems.
9296	Generalize some superscalar recognition patterns.
9297
92982003-03-14  Torbjorn Granlund  <tege@swox.com>
9299
9300	* mpn/sparc64/udiv.asm: New file.
9301
93022003-03-13  Torbjorn Granlund  <tege@swox.com>
9303
9304	* mpn/sparc64: Table cycle counts.  Update some comments.
9305
9306	* mpn/powerpc64/divrem_1.asm: New file.
9307
93082003-03-10  Torbjorn Granlund  <tege@swox.com>
9309
9310	* mpn/generic/mul.c (mpn_mul): Don't blindly expect
9311	MUL_KARATSUBA_THRESHOLD to be a constant.
9312
93132003-03-07  Torbjorn Granlund  <tege@swox.com>
9314
9315	* mpn/generic/mul.c (mpn_mul): New operand splitting code for
9316	avoiding cache misses when un >> MUL_KARATSUBA_THRESHOLD > vn.
9317	(MUL_BASECASE_MAX_UN): New #define, default to 500 for now.
9318
93192003-03-07  Kevin Ryde  <kevin@swox.se>
9320
9321	* Makefile.am: Put gmp.h and mp.h under $(exec_prefix)/include.
9322	* gmp.texi (Build Options): Add notes on this.
9323	Reported by Vincent Lef�vre.
9324
93252003-03-06  Kevin Ryde  <kevin@swox.se>
9326
9327	* configure.in (alpha*-*-* gcc): Add asm option before testing -mcpu,
9328	for the benefit of gcc 2.9-gnupro-99r1 on alphaev68-dec-osf5.1 which
9329	doesn't otherwise put the assembler in the right mode for -mcpu=ev6.
9330
93312003-03-05  Torbjorn Granlund  <tege@swox.com>
9332
9333	* mpn/powerpc32/powerpc-defs.m4: Set up renaming for v registers.
9334
9335	* mpz/powm.c (redc): Instead of repeated mpn_incr_u invocations,
9336	accumulate carries and add at the end.
9337	(mpz_powm): Trim tp allocation, now as redc doesn't need carry guard.
9338
93392003-02-25  Torbjorn Granlund  <tege@swox.com>
9340
9341	* mpn/x86/pentium4/copyd.asm: Correct header comment.
9342
9343	* mpn/arm/addmul_1.asm: Correct cycle counts.
9344	* mpn/arm/submul_1.asm: Likewise.
9345
93462003-02-20  Kevin Ryde  <kevin@swox.se>
9347
9348	* demos/factorize.c (factor_using_pollard_rho): Test k>0 to avoid
9349	infinite loop if k=0 and gcd!=1 reveals a factor.  Reported by John
9350	Pongsajapan.
9351
9352	* gmp.texi, fdl.texi: Update to FDL version 1.2.
9353
93542003-02-18  Torbjorn Granlund  <tege@swox.com>
9355
9356	* mpn/arm/mul_1.asm: Fix typo introduced in last change.
9357
93582003-02-17  Torbjorn Granlund  <tege@swox.com>
9359
9360	* mpn/ia64/gmp-mparam.h: Retune.
9361
9362	* mpn/sparc64/copyi.asm: Add some header comments.
9363	* mpn/sparc64/copyd.asm: Likewise.
9364
9365	* mpn/arm/mul_1.asm: Put vl operand last for umull/umlal.
9366	Add some header comments.
9367	* mpn/arm/addmul_1.asm: Rewrite.
9368	* mpn/arm/submul_1.asm: Rewrite.
9369	* mpn/arm/gmp-mparam.h: Retune.
9370
93712003-02-16  Torbjorn Granlund  <tege@swox.com>
9372
9373	* mpn/arm/copyi.asm: New file.
9374	* mpn/arm/copyd.asm: New file.
9375
93762003-02-16  Kevin Ryde  <kevin@swox.se>
9377
9378	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Tolerate incorrect last data
9379	byte seen on an arm system.
9380
93812003-02-15  Torbjorn Granlund  <tege@swox.com>
9382
9383	* mpn/arm/gmp-mparam.h: Retune.
9384
93852003-02-13  Torbjorn Granlund  <tege@swox.com>
9386
9387	* mpn/powerpc32/750/com_n.asm: Add more cycle counts.
9388
93892003-02-13  Kevin Ryde  <kevin@swox.se>
9390
9391	* configure.in (AC_PREREQ): Bump to 2.57.
9392
9393	* configure.in, acinclude.m4 (GMP_GCC_WA_OLDAS): New macro, applying
9394	-Wa,-oldas only when necessary.
9395
9396	* configure.in (powerpc*-*-*): Don't use -Wa,-mppc with gcc, it
9397	overrides options recent gcc adds for -mcpu, making generated code
9398	fail to assemble.
9399
9400	* tune/tuneup.c (mpn_fft_table): Remove definition, it's in mul_fft.c.
9401
94022003-02-12  Torbjorn Granlund  <tege@swox.com>
9403
9404	* mpn/x86/pentium4/sse2/gmp-mparam.h: Retune.
9405	* mpn/x86/k7/gmp-mparam.h: Retune.
9406	* mpn/x86/k6/gmp-mparam.h: Retune.
9407	* mpn/x86/p6/gmp-mparam.h: Retune.
9408	* mpn/x86/p6/mmx/gmp-mparam.h: Retune.
9409
9410	* tests/mpz/t-mul.c (main): Rewrite FFT testing code.
9411
94122003-02-10  Torbjorn Granlund  <tege@swox.com>
9413
9414	* config.guess: Recognize "power2" systems.
9415
9416	* mpn/powerpc64/gmp-mparam.h: Fix indentation.
9417	* mpn/power/gmp-mparam.h: Retune.
9418	* mpn/alpha/ev6/nails/gmp-mparam.h: Retune.
9419	* mpn/sparc64/gmp-mparam.h: Retune.
9420	* mpn/pa64/gmp-mparam.h: Retune.
9421	* mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
9422	* mpn/sparc32/v8/gmp-mparam.h: Retune.
9423	* mpn/mips64/gmp-mparam.h: Retune.
9424	* mpn/alpha/ev6/gmp-mparam.h: Retune.
9425	* mpn/powerpc32/gmp-mparam.h: Retune.
9426	* mpn/powerpc32/750/gmp-mparam.h: Retune.
9427	* mpn/alpha/ev5/gmp-mparam.h: Retune.
9428	* mpn/m68k/gmp-mparam.h: Retune.
9429	* mpn/cray/gmp-mparam.h: Set GET_STR_PRECOMPUTE_THRESHOLD.
9430
9431	* configure.in: Undo this, problem doesn't happen any more:
9432	(mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
9433
94342003-02-03  Kevin Ryde  <kevin@swox.se>
9435
9436	* gmp-impl.h (MPN_NORMALIZE, MPN_NORMALIZE_NOT_ZERO): Add parens
9437	around macro parameters.  Reported by Jason Moxham.
9438
94392003-02-01  Kevin Ryde  <kevin@swox.se>
9440
9441	* gmp.texi (Low-level Functions): No overlap permitted by mpn_mul_n.
9442	Reported by Jason Moxham.
9443	(Formatted Input Strings): Correction to strtoul cross reference
9444	formatting.
9445	(BSD Compatible Functions): Add index entry for MINT.
9446
94472003-01-29  Torbjorn Granlund  <tege@swox.com>
9448
9449	* gmp-impl.h (mpn_mul_fft): Now returns int.
9450
94512003-01-29  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
9452
9453	* mpn/generic/mul_fft.c: Major rewrite.
9454
94552003-01-25  Kevin Ryde  <kevin@swox.se>
9456
9457	* config.guess (powerpc*-*-*): Remove $dummy.core file when mfpvr
9458	fails on NetBSD.
9459	(trap): Remove $dummy.core on abnormal termination too.
9460
9461	* mpfr/*: Update to mpfr cvs 2003-01-25.
9462
94632003-01-24  Torbjorn Granlund  <tege@swox.com>
9464
9465	* mpn/ia64/README: Update cycle counts to match current code.
9466
94672003-01-18  Kevin Ryde  <kevin@swox.se>
9468
9469	* mpfr/*: Update to mpfr cvs 2003-01-18.
9470
94712003-01-17  Torbjorn Granlund  <tege@swox.com>
9472
9473	* gmp.texi: Canonicalize URLs.
9474
94752003-01-15  Kevin Ryde  <kevin@swox.se>
9476
9477	* gmp.texi (Notes for Particular Systems): Add hardware floating point
9478	precision mode.
9479
9480	* mpfr/*, configure, aclocal.m4, config.in: Update to mpfr cvs
9481	2003-01-15.
9482
94832003-01-11  Kevin Ryde  <kevin@swox.se>
9484
9485	* mpfr/*: Update to mpfr cvs 2003-01-11.
9486
94872003-01-09  Kevin Ryde  <kevin@swox.se>
9488
9489	* mpfr/get_str.c: Update to mpfr cvs 2003-01-09.
9490
9491	* doc/configuration: Various updates.
9492
94932003-01-06  Torbjorn Granlund  <tege@swox.com>
9494
9495	* mpn/alpha/copyi.asm: Avoid `nop' mnemonic, unsupported on Cray.
9496	* mpn/alpha/copyd.asm: Likewise.
9497
94982003-01-05  Kevin Ryde  <kevin@swox.se>
9499
9500	* demos/expr/t-expr.c (check_r): Tolerate mpfr_set_str new return
9501	value.
9502
9503	* configure, aclocal.m4 (*-*-osf4*, *-*-osf5*): Regenerate with
9504	libtool patch to avoid bash printf option problem when building shared
9505	libraries with cxx.
9506
9507	* configure.in (pentium4-*-*): Use "-march=pentium4 -mno-sse2" since
9508	sse2 causes buggy code from gcc 3.2.1 and is only supported on new
9509	enough kernels.
9510
9511	* acinclude.m4 (GMP_PROG_NM): Add some notes about failures, per
9512	report by Krzysztof Kozminski.
9513
9514	* gmp-h.in (mpz_mdivmod_ui, mpz_mmod_ui): Add parens around "r".
9515
9516	* gmp-h.in (__GMP_CAST): New macro, clean to g++ -Wold-style-cast.
9517	(GMP_NUMB_MASK, mpz_cmp_si, mpq_cmp_si, mpz_odd_p, mpn_divexact_by3,
9518	mpn_divmod): Use it.  Reported by Krzysztof Kozminski.
9519	(mpz_odd_p): No need for the outermost cast to "int".
9520	* tests/cxx/t-cast.cc: New file.
9521	* tests/cxx/Makefile.am: Add it.
9522
95232003-01-04  Kevin Ryde  <kevin@swox.se>
9524
9525	* mpfr/set_str.c: Update to mpfr cvs 2003-01-04.
9526
9527	* demos/expr/exprfra.c (e_mpfr_number): Tolerate recent mpfr_set_str
9528	returning count of characters accepted.
9529
95302003-01-03  Torbjorn Granlund  <tege@swox.com>
9531
9532	* mpn/alpha/copyi.asm: New file.
9533	* mpn/alpha/copyd.asm: New file.
9534
95352003-01-03  Kevin Ryde  <kevin@swox.se>
9536
9537	* demos/expr/t-expr.c: Use __gmpfr on some mpfr internals that have
9538	changed.
9539
9540	* mpfr/*, aclocal.m4, config.in, configure: Update to mpfr cvs
9541	2003-01-03.
9542
9543	* gmp.texi (Introduction to GMP): Mention release announcements
9544	mailing list, and put home page and ftp before mailing lists.
9545
95462002-12-28  Torbjorn Granlund  <tege@swox.com>
9547
9548	* mpn/generic/mul_fft.c (mpn_fft_next_size): Simplify.
9549
95502002-12-28  Kevin Ryde  <kevin@swox.se>
9551
9552	* acinclude.m4 (M68K_PATTERN): New macro.
9553	(GMP_GCC_M68K_OPTIMIZE): Use it to avoid m6811 and friends.
9554	* configure.in: Ditto.
9555
9556	* tests/mpz/t-import.c, tests/mpz/t-export.c: Use '\xHH' to avoid
9557	warnings about char overflows.
9558	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Ditto.
9559
95602002-12-28  Pedro Gimeno  <pggimeno@wanadoo.es>
9561
9562	* randmt.c (randseed_mt, default_state): Fix off-by-one bug on padding.
9563	(randseed_mt): Add ASSERT checking result of mpz_export.
9564
95652002-12-24  Kevin Ryde  <kevin@swox.se>
9566
9567	* gmp.texi (Integer Import and Export): Clarify treatment of signs,
9568	reported by Kent Boortz.
9569
9570	* randmt.c: Use gmp_uint_least32_t.
9571	(randseed_mt): Add nails to mpz_export in case mt[i] more than 32 bits.
9572
9573	* gmp-impl.h (gmp_uint_least32_t): New typedef, replacing GMP_UINT32.
9574	* configure.in (AC_CHECK_TYPES): Add uint_least32_t.
9575	(AC_CHECK_SIZEOF): Add unsigned short.
9576
95772002-12-22  Kevin Ryde  <kevin@swox.se>
9578
9579	* gmp-impl.h (ULONG_PARITY) [generic C]: Mask result to a single bit.
9580	(ULONG_PARITY) [_CRAY, __ia64]: New macros.
9581	* tests/t-parity.c: New test.
9582	* tests/Makefile.am (check_PROGRAMS): Add it.
9583
9584	* longlong.h (count_trailing_zeros) [ia64]: New macro.
9585
9586	* tests/t-count_zeros.c (check_various): Remove unused variable "n".
9587
9588	* mpn/x86/README: Revise notes on PIC, PLT and GOT.
9589
9590	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add "mt"
9591	to GMP::Rand::randstate.
9592
95932002-12-22  Pedro Gimeno  <pggimeno@wanadoo.es>
9594
9595	* randmt.c (randseed_mt): Fix bug that might cause the generator to
9596	return all zeros with certain seeds.  Fix WARM_UP==0 case.
9597	(gmp_randinit_mt): Initialize to a known state by default.
9598	(randget_mt): Remove check for uninitialized buffer: no longer needed.
9599	(recalc_buffer): Use ?: instead of two-element array.
9600
9601	* tests/rand/t-mt.c: New test.
9602	* tests/rand/Makefile.am (check_PROGRAMS): Add it.
9603
96042002-12-21  Kevin Ryde  <kevin@swox.se>
9605
9606	* cxx/osdoprnti.cc: Use <cstdarg> and <cstring> rather than <stdarg.h>
9607	and <string.h>.  No need for <stdio.h>.
9608
9609	* demos/expr/expr.c, demos/expr/exprfa.c, demos/expr/exprfra.c,
9610	demos/expr/exprza.c: Use mp_get_memory_functions, not
9611	__gmp_allocate_func etc.
9612	* demos/expr/t-expr.c: Don't use gmp-impl.h.
9613	(numberof): New macro.
9614
9615	* gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
9616	__gmp_free_func): Move declarations to gmp-impl.h
9617
9618	* mp_get_fns.c: New file.
9619	* Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
9620	* gmp-h.in (mp_get_memory_functions): Add prototype.
9621	* gmp.texi (Custom Allocation): Add mp_get_memory_functions, refer to
9622	"free" not "deallocate" function.
9623	* gmpxx.h (struct __gmp_alloc_cstring): Use mp_get_memory_functions,
9624	not __gmp_free_func.
9625
9626	* gmp-impl.h [__cplusplus]: Add <cstring> for strlen.
9627	(gmp_allocated_string): Hold length in a field.
9628	* cxx/osdoprnti.cc, cxx/osmpf.cc: Use this.
9629
96302002-12-20  Torbjorn Granlund  <tege@swox.com>
9631
9632	* tests/mpz/t-perfsqr.c (check_sqrt): Print more variables upon
9633	failure.
9634
9635	* mpn/generic/rootrem.c: In Newton loop, pad qp with leading zero.
9636
96372002-12-19  Torbjorn Granlund  <tege@swox.com>
9638
9639	* mpn/generic/rootrem.c: Allocate 1.585 (log2(3)) times more space
9640	for pp temporary to allow for worst case overestimate of root.
9641	Add some asserts.
9642
9643	* tests/mpz/t-root.c: Generalize and speed up.
9644
96452002-12-19  Kevin Ryde  <kevin@swox.se>
9646
9647	* tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt test.
9648
9649	* gmp-h.in: Don't bother trying to support Compaq C++ in pre-standard
9650	I/O mode.
9651	* gmp.texi (Notes for Particular Systems): Compaq C++ must be used in
9652	"standard" iostream mode.
9653
96542002-12-18  Torbjorn Granlund  <tege@swox.com>
9655
9656	* mpn/alpha/mod_34lsub1.asm: Add code for big-endian, using existing
9657	little-endian code only if HAVE_LIMB_LITTLE_ENDIAN is defined.
9658
96592002-12-18  Kevin Ryde  <kevin@swox.se>
9660
9661	* configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): New
9662	defines in config.m4.
9663
96642002-12-17  Torbjorn Granlund  <tege@swox.com>
9665
9666	* printf/printffuns.c (gmp_fprintf_reps): Make it actually work
9667	for padding > 256.
9668
96692002-12-17  Kevin Ryde  <kevin@swox.se>
9670
9671	* tune/freq.c: Add <string.h> for memcmp.
9672
9673	* mpz/pprime_p.c: Use MPN_MOD_OR_MODEXACT_1_ODD.
9674
9675	* gmp.texi (Formatted Output Strings): %a and %A are C99 not glibc.
9676	(Formatted Input Strings): Type "l" is for double too.  Hex floats are
9677	accepted for mpf_t.
9678	(Formatted Input Functions): Describe tightened parse rule, clarify
9679	return value a bit.
9680
9681	* scanf/doscan.c: Add hex floats, tighten matching to follow C99, for
9682	instance "0x" is no longer acceptable to "%Zi".
9683	Rename "invalid" label to avoid "invalid" variable, SunOS cc doesn't
9684	like them the same.
9685	* tests/misc/t-scanf.c: Update tests.
9686	* tests/misc/t-locale.c (check_input): Don't let "0x" appear from fake
9687	decimal point.
9688
9689	* config.guess (sparc*-*-*): Look at BSD sysctl hw.model to recognise
9690	ultrasparcs.
9691
9692	* mpfr/tests/dummy.c: New file.
9693	* mpfr/tests/Makefile.am (libfrtests_a_SOURCES): Add it.
9694
96952002-12-14  Kevin Ryde  <kevin@swox.se>
9696
9697	* mpbsd/Makefile.am (nodist_libmpbsd_la_SOURCES): Move these mpz
9698	sources to libmpbsd_la_SOURCES directly, automake 1.7.2 now gets the
9699	ansi2knr setups right for sources in other directories.
9700
9701	* mpfr/tests/Makefile.am: Add libfrtests.a in preparation for new mpfr.
9702
97032002-12-13  Kevin Ryde  <kevin@swox.se>
9704
9705	* mpfr/Makefile.am (mpfr_TEXINFOS, AM_MAKEINFOFLAGS): Allow for
9706	fdl.texi in recent mpfr.
9707
9708	* configure.in (AC_PROG_EGREP): Ensure this is run outside the Cray
9709	conditional AC_EGREP_CPP.
9710
9711	* configure.in (alpha*-*-*): Use gcc -Wa,-oldas if it works, to avoid
9712	problems with new compaq "as" on OSF 5.1.
9713
9714	* mpn/Makefile.am (EXTRA_DIST): Remove Makeasm.am, automake 1.7.2 does
9715	it automatically.
9716
9717	* acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Remove this hack, fixed by
9718	autoconf 2.57.
9719
9720	* configure.in (AC_CONFIG_LIBOBJ_DIR): Set to mpfr, for the benefit of
9721	new mpfr using LIBOBJ.
9722
9723	* configure.in: (AM_INIT_AUTOMAKE): Use "gnu no-dependencies
9724	$(top_builddir)/ansi2knr".
9725	* */Makefile.am (AUTOMAKE_OPTIONS): Remove, now in configure.in.
9726
9727	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.57.
9728	* */Makefile.in, configure, aclocal.m4, install-sh, mkinstalldirs:
9729	Update to automake 1.7.2.
9730
9731	* gmp.texi (Build Options): Add hppa64 to cpu types.
9732	(ABI and ISA): Add gcc to hppa 2.0.
9733	(Debugging): Add maximum debuggability config options.
9734	(Language Bindings): Add Arithmos, reported by Johan Vervloet.
9735	(Formatted Output Strings): 128 bits is about 40 digits, ll is only
9736	for long long not long double.
9737	(Formatted Input Strings): ll is only for long long not long double.
9738
9739	* mpz/divis.c, mpz/divis_ui.c, mpz/cong.c, mpz/cong_ui.c: Allow d=0,
9740	under the rule n==c mod d iff exists q satisfying n=c+q*d.
9741	* gmp.texi (Integer Division): Describe this.
9742	Suggested by Jason Moxham.
9743
97442002-12-13  Pedro Gimeno  <pggimeno@wanadoo.es>
9745
9746	* randlc2x.c (lc): Remove check for seedn < an, which is now
9747	superfluous.  Add ASSERT to ensure it's correct.  Add ASSERT to check
9748	precondition of __GMPN_ADD.
9749	(gmp_randinit_lc_2exp): Avoid reallocation by allocating one extra bit
9750	for both seed and a.  Simplify seedn < p->_cn case.
9751
9752	* tests/rand/t-lc2exp.c (check_bigs): Test negative seeds.
9753
97542002-12-12  Torbjorn Granlund  <tege@swox.com>
9755
9756	* mpn/pa32/pa-defs.m4 (PROLOGUE_cpu): Zap spurious argument to `.proc'.
9757	Add empty `.callinfo'.
9758
97592002-12-11  Torbjorn Granlund  <tege@swox.com>
9760
9761	* mpn/x86/pentium4/sse2/addmul_1.asm: Don't reuse `ret' symbol for a
9762	label.
9763
97642002-12-11  Kevin Ryde  <kevin@swox.se>
9765
9766	* configure.in (hppa*-*-*): Don't use gcc -mpa-risc-2-0 in ABI=1.0.
9767
9768	* mpn/pa32/pa-defs.m4: New file, arranging for .proc/.procend.
9769	* configure.in (hppa*-*-*): Use it.
9770
9771	* printf/doprnt.c: Comments on "ll" versus "L".
9772
9773	* tests/mpz/t-div_2exp.c: Reduce tests, especially the random ones.
9774
97752002-12-11  Torbjorn Granlund  <tege@swox.com>
9776
9777	* mpz/get_d.c (limb2dbl): New macro for conversion to `double'.
9778	Define it to something non-trivial for 64-bit hppa.
9779	* mpq/get_d.c: Likewise.
9780	* mpf/get_d.c: Likewise.
9781
9782	* mpn/x86/pentium4/sse2/addmul_1.asm: Unroll to save one c/l.
9783
97842002-12-09  Kevin Ryde  <kevin@swox.se>
9785
9786	* tune/Makefile.am: Don't use -static under --disable-static, it tends
9787	not to work.
9788	* configure.in (ENABLE_STATIC): New AM_CONDITIONAL.
9789
9790	* gmp-h.in: Use <iostream> instead of <iosfwd> with Compaq C++ in
9791	pre-standard I/O mode.
9792
9793	* tests/mpz/t-jac.c, tests/mpz/t-scan.c: Reduce tests.
9794
97952002-12-08  Kevin Ryde  <kevin@swox.se>
9796
9797	* configure.in (*-*-ultrix*): Remove forcible --disable-shared,
9798	believe this was a generic problem with libtool, now gone.
9799
98002002-12-08  Torbjorn Granlund  <tege@swox.com>
9801
9802	* gmp-impl.h (USE_LEADING_REGPARM): Disable for PIC code generation.
9803
98042002-12-07  Torbjorn Granlund  <tege@swox.com>
9805
9806	* tests/cxx/t-misc.cc (check_mpq): Use 0/1 for canonical 0 in
9807	mpq_cmp_ui calls.
9808
9809	* configure.in (hppa2.0*-*-*): Pass +O2 instead of +O3 to work around
9810	compiler bug with mpfr/tests/tdiv.
9811
98122002-12-07  Kevin Ryde  <kevin@swox.se>
9813
9814	* configure.in (hppa2.0*-*-* ABI=2.0n): Make -mpa-risc-2-0 optional.
9815	New hppa-level-2.0 test using GMP_HPPA_LEVEL_20 to detect assembler
9816	support for 2.0n.
9817	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code that provokes an error
9818	from gcc -mpa-risc-2-0 if the assembler doesn't know 2.0 instructions.
9819	(GMP_HPPA_LEVEL_20): New macro.
9820
98212002-12-07  Pedro Gimeno  <pggimeno@wanadoo.es>
9822
9823	* gmp-impl.h (gmp_randfnptr_t.randseed_fn) Return void.
9824	(LIMBS_PER_ULONG, MPN_SET_UI): New macros.
9825	(MPZ_FAKE_UI): Rename couple of parameters.
9826
9827	* randlc2x.c (gmp_rand_lc_struct): _mp_c and _mp_c_limbs replaced
9828	with mpn style _cp and _cn.  All callers changed.
9829	(randseed_lc): Fix limbs(seed) > bits_to_limbs(m2exp) case.
9830	Remove return value.
9831	(gmp_randinit_lc_2exp): Attempt to avoid redundant reallocation.
9832
9833	* randmt.c (mangle_seed): New function by Kevin.
9834	(randseed_mt): Use it instead of mpz_powm, for performance.  Remove
9835	return value.  Remove commented out code (an inferior alternative to
9836	mpz_export).
9837
9838	* randsdui.c (gmp_randseed_ui): Use MPZ_FAKE_UI.
9839
9840	* tests/rand/t-lc2exp.c (check_bigm, check_bigs): New tests.
9841	* tests/rand/t-urndmm.c: Add L to constants in calls, for K&R.
9842
98432002-12-06  Torbjorn Granlund  <tege@swox.com>
9844
9845	* configure.in: Remove -g.
9846	(hppa*-*-*): Pass -Wl,+vnocompatwarnings with +DA2.0.
9847
98482002-12-05  Torbjorn Granlund  <tege@swox.com>
9849
9850	* mpn/pa64/sqr_diagonal.asm: Remove .entry, .proc, .procend.
9851	* mpn/pa64/udiv.asm: Likewise.
9852
98532002-12-05  Kevin Ryde  <kevin@swox.se>
9854
9855	* mpn/pa64/sub_n.asm: Remove space in "sub, db" which gas objects to.
9856	* mpn/pa64/*.asm, tune/hppa2.asm: Use ".level 2.0" for 2.0n, since gas
9857	doesn't like ".level 2.0N".
9858
9859	* configure.in (hppa*-*-*): Group path and flags choices, for clarity.
9860	(hppa1.0*-*-*): Use gcc -mpa-risc-1-0 when available.
9861	(hppa2.0*-*-*): Ditto -mpa-risc-2-0.
9862	(*-*-hpux*): Exclude ABI=2.0w for hpux[1-9] and hpux10, rather than
9863	the converse of allowing it for hpux1[1-9]; ie. list the bad systems
9864	rather than try to guess the good systems.
9865	(hppa2.0*-*-*) [ABI=2.0n ABI=2.0w]: Add gcc to likely compilers.
9866	(hppa*-*-*) [gcc]: Test sizeof(long) to differentiate a 32-bit or
9867	64-bit build of the compiler.
9868	(hppa64-*-*): Add this as equivalent to hppa2.0-*-*.
9869	* acinclude.m4 (GMP_C_TEST_SIZEOF): New macro.
9870
9871	* tests/tests.h (ostringstream::str): Must null-terminate
9872	ostrstream::str() for the string constructor.
9873
98742002-12-04  Torbjorn Granlund  <tege@swox.com>
9875
9876	* mpn/pa32/hppa1_1/udiv.asm: Don't wrap symbol to INT64 in L() stuff.
9877
9878	* longlong.h (mpn_udiv_qrnnd_r based udiv_qrnnd): Fix typo.
9879
9880	* mpn/powerpc32/powerpc-defs.m4: Define float registers with `f'
9881	prefix.
9882
98832002-12-04  Kevin Ryde  <kevin@swox.se>
9884
9885	* gmp.texi (Floating-point Functions): Note the mantissa is binary and
9886	decimal fractions cannot be represented exactly.  Suggested by Serge
9887	Winitzki.
9888	(Known Build Problems): Note libtool stripping options when linking.
9889	Reported by Vincent Lefevre.
9890
9891	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Don't make an empty result a
9892	failure, that's a valid result.
9893	(GMP_ASM_GLOBL): Establish this from the host cpu type.
9894	(IA64_PATTERN): New macro.
9895	(GMP_PROG_EXEEXT_FOR_BUILD, GMP_C_FOR_BUILD_ANSI,
9896	GMP_CHECK_LIBM_FOR_BUILD): Remove temporary files created.
9897	* configure.in: Use IA64_PATTERN.
9898
98992002-12-03  Torbjorn Granlund  <tege@swox.com>
9900
9901	* tune/hppa.asm: Use config.m4.
9902	* tune/hppa2.asm: Likewise.
9903	* tune/hppa2w.asm: Likewise.
9904
9905	* mpn/pa64: Use LDEF.
9906
99072002-12-03  Kevin Ryde  <kevin@swox.se>
9908
9909	* INSTALL: Use return rather than exit in the example programs.
9910	Suggested by Richard Dawe.
9911
9912	* gmp.texi (Build Options): Move non-unix notes to ...
9913	(Notes for Particular Systems): ... here.  Mention MS Interix,
9914	reported by Paul Leyland.
9915	(C++ Interface Random Numbers): Add gmp_randinit_mt to examples.
9916
9917	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Must test empty suffix first,
9918	for the benefit of hppa hp-ux.
9919	(GMP_ASM_UNDERSCORE): Grep the output of "nm" instead of trying to
9920	construct an asm file, and in case of failure fallback on no
9921	underscore and a warning.
9922
9923	* longlong.h (count_leading_zeros, count_trailing_zeros) [ev67, ev68]:
9924	Restrict __asm__ ctlz and cttz to __GNUC__.
9925
9926	* gen-psqr.c (HAVE_CONST, const): New macros.
9927
9928	* tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt.
9929
99302002-12-02  Torbjorn Granlund  <tege@swox.com>
9931
9932	* gmp-impl.h: Split popc_limb again, combined version gives too many
9933	compiler warnings.
9934
99352002-12-01  Torbjorn Granlund  <tege@swox.com>
9936
9937	* mpn/generic/gcdext.c (div1): Disable unused function.
9938
9939	* mpz/root.c: Don't include stdlib.h or longlong.h.
9940	* mpz/rootrem.c: Likewise.
9941
9942	* extract-dbl.c: abort => ASSERT_ALWAYS.
9943	* mpz/set_d.c: Likewise.
9944	* mpn/generic/tdiv_qr.c: Likewise.
9945
9946	* gen-psqr.c (f_cmp_fraction, f_cmp_divisor): Change parameter to
9947	`const void *', to match qsort spec.
9948
99492002-12-01  Kevin Ryde  <kevin@swox.se>
9950
9951	* gmp.texi (Integer Division): Fix a couple of @math's for tex.
9952	Use @dots in more places.
9953
9954	* tests/cxx/t-locale.cc: Test non std::locale systems too.
9955	* tests/cxx/clocale.c: New file, reinstating what was localeconv.c,
9956	and subverting nl_langinfo too.
9957	* tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
9958
9959	* tests/tests.h (ostringstream, istringstream): Provide fakes of these
9960	if <sstream> not available.
9961	* tests/cxx/t-locale.cc, tests/cxx/t-ostream.cc: Remove <sstream>.
9962	* configure.in (AC_CHECK_HEADERS) [C++]: Add <sstream>.
9963
99642002-11-30  Torbjorn Granlund  <tege@swox.com>
9965
9966	* printf/doprnt.c (__gmp_doprnt): Comment out a `break' to shut up
9967	compiler warnings.
9968
9969	* mpn/ia64/invert_limb.asm: Add `many' hints to return insns.
9970
9971	* mpn/ia64/divrem_1.asm: Allocate more local registers; put b0 in
9972	one of them.
9973
9974	* mpn/ia64/popcount.asm: Properly restore register ar.lc.
9975
9976	* longlong.h (umul_ppmm) [ia64]: Form both product parts in asm.
9977
9978	* mpz/bin_uiui.c: Cast umul_ppmm operands.
9979
9980	* scanf/doscan.c (gmpscan): Remove unused label store_get_digits.
9981
9982	* gmp-impl.h: #undef MIN and MAX before #defining.
9983
9984	* mpn/ia64/copyi.asm: Add `;' after bundle declarators.
9985	* mpn/ia64/copyd.asm: Likewise.
9986
9987	* mpn/ia64/divrem_1.asm: Add some syntax to placid the HP-UX assembler.
9988
99892002-11-30  Kevin Ryde  <kevin@swox.se>
9990
9991	* configure.in (AC_CHECK_HEADERS): Add nl_types.h.
9992	* tests/misc/t-locale.c: Use this, for nl_item on netbsd 1.4.1.
9993
99942002-11-29  Torbjorn Granlund  <tege@swox.com>
9995
9996	* tests/devel/addmul_1.c: Provide prototype for mpn_print.
9997	(OPS): Account for function overhead.
9998	* tests/devel/{submul_1.c,mul_1.c,add_n.c,sub_n.c}: Likewise.
9999
10000	* mpn/ia64/addmul_1.asm: Rewrite.
10001
100022002-11-28  Torbjorn Granlund  <tege@swox.com>
10003
10004	* mpn/ia64/sqr_diagonal.asm: Don't allocate any registers.
10005
10006	* mpn/ia64/submul_1.asm: Adapt to Itanium 2.
10007
10008	* mpn/ia64/mul_1.asm: Fix typo in HAVE_ABI_32 code.
10009
10010	* mpn/ia64/add_n.asm: Rewrite.
10011	* mpn/ia64/sub_n.asm: Rewrite.
10012
100132002-11-28  Kevin Ryde  <kevin@swox.se>
10014
10015	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Use this rather
10016	than libdummy.
10017	* tests/Makefile.am (EXTRA_libtests_la_SOURCES): Use this for
10018	x86call.asm and x86check.c rather than libdummy.
10019
100202002-11-27  Torbjorn Granlund  <tege@swox.com>
10021
10022	* tests/mpz/t-mul.c: Implement reference Karatsuba multiplication.
10023	Rewrite testing scheme to run fewer really huge tests.
10024
100252002-11-26  Torbjorn Granlund  <tege@swox.com>
10026
10027	* tests: Decrease repetition count for some of the slowest tests.
10028
10029	* mpn/ia64/divrem_1.asm: New file.
10030
100312002-11-25  Torbjorn Granlund  <tege@swox.com>
10032
10033	* mpfr/tests/tdiv.c: Decrease number of performed tests.
10034
100352002-11-23  Torbjorn Granlund  <tege@swox.com>
10036
10037	* mpn/ia64/mul_1.asm: Rewrite.
10038
100392002-11-23  Kevin Ryde  <kevin@swox.se>
10040
10041	* mpn/ia64/README: Add some references.
10042
10043	* gmp.texi (Build Options): Add itanium and itanium2, mention DocBook
10044	and XML from makeinfo, add texinfo top level cross reference.
10045	(Integer Division): Try to clarify 2exp functions a bit.
10046	(C++ Interface Floats): Giving bad string to constructor is undefined.
10047	(C++ Interface Integers, C++ Interface Rationals): Ditto, and show
10048	default base in prototype, not the description.
10049
10050	* config.sub, config.guess, configure.in (itanium, itanium2): New cpu
10051	types.
10052
10053	* tests/misc/t-printf.c, tests/misc/t-scanf.c (check_misc): Suppress
10054	%zd test on glibc prior to 2.1, it's not supported.
10055
100562002-11-22  Torbjorn Granlund  <tege@swox.com>
10057
10058	* mpn/ia64/copyi.asm: Optimize for Itanium 2.
10059	* mpn/ia64/copyd.asm: Likewise.
10060
100612002-11-20  Torbjorn Granlund  <tege@swox.com>
10062
10063	* mpn/ia64/sqr_diagonal.asm: New file.
10064
10065	* mpn/ia64/submul_1.asm: Handle vl == 0 specially.
10066
100672002-11-20  Kevin Ryde  <kevin@swox.se>
10068
10069	* tests/cxx/t-locale.cc: Test with locales imbued into stream, use
10070	<sstream>, eliminated some C-isms.  istream tests disabled, not yet
10071	locale-ized.
10072	* tests/cxx/Makefile.am (t_locale_SOURCES): Remove localeconv.c.
10073	* tests/cxx/localeconv.c: Remove file.
10074
10075	* configure.in (AC_CHECK_TYPES) [C++]: Add std::locale.
10076	* printf/doprntf.c: Add decimal point parameter, remove localeconv use.
10077	* gmp-impl.h (__gmp_doprnt_mpf): Update prototype, bump symbol to
10078	__gmp_doprnt_mpf2 to protect old libgmpxx.
10079	* cxx/osmpf.cc: Use this with ostream locale decimal_point facet.
10080	* printf/doprnt.c: Ditto, with GMP_DECIMAL_POINT.
10081
10082	* gmp-h.in: More comments on __declspec for windows DLLs.
10083
10084	* mpf/set_str.c, scanf/doscan.c: Cast through "unsigned char" for
10085	decimal point string, same as input chars.
10086
10087	* configure.in (AC_CHECK_HEADERS): Add langinfo.h.
10088	(AC_CHECK_FUNCS): Add nl_langinfo.
10089	* gmp-impl.h (GMP_DECIMAL_POINT): New macro.
10090	* mpf/out_str.c, mpf/set_str.c, scanf/doscan.c: Use it, and don't
10091	bother with special code for non-locale systems.
10092	* tests/misc/t-locale.c: Subvert nl_langinfo too.
10093
10094	* configure.in, acinclude.m4 (GMP_ASM_X86_GOT_UNDERSCORE): New macro.
10095	* mpn/x86/x86-defs.m4 (_GLOBAL_OFFSET_TABLE_): New macro, inserting
10096	extra underscore for OpenBSD.
10097	* mpn/x86/README (_GLOBAL_OFFSET_TABLE_): Update notes.
10098	Reported by Christian Weisgerber.
10099
10100	* tests/cxx/t-rand.cc (check_randinit): New function, collecting up
10101	constructor tests.
10102
10103	* tests/cxx/t-ostream.cc: Use <sstream> instead of <strstream>, use
10104	compare instead of strcmp.
10105
10106	* gmpxx.h (__gmp_randinit_lc_2exp_size_t): Return type is int.
10107
101082002-11-18  Kevin Ryde  <kevin@swox.se>
10109
10110	* tune/speed.c (r_string): Use CNST_LIMB with <N>bits, spotted by
10111	Torbjorn.
10112
101132002-11-19  Torbjorn Granlund  <tege@swox.com>
10114
10115	* mpn/ia64/mul_1.asm: Remove redundant cmp from prologue code.
10116	Streamline prologue.
10117	* mpn/ia64/addmul_1.asm: Likewise.
10118	* mpn/ia64/submul_1.asm: New file.
10119	* mpn/ia64/submul_1.c: Remove.
10120
101212002-11-17  Torbjorn Granlund  <tege@swox.com>
10122
10123	* mpn/generic/popham.c: New file, using new faster algorithm.
10124	* mpn/generic/popcount.c: Remove.
10125	* mpn/generic/hamdist.c: Remove.
10126
10127	* mpn/ia64/addmul_1.asm: Don't clobber callee-saves register f16.
10128	* mpn/ia64/mul_1.asm: Likewise.
10129
10130	* mpn/ia64/addmul_1.asm: Add pred.rel declarations.  Resolve RAW
10131	hazards for condition code registers, duplicating code as needed.  Add
10132	prediction to all branches.
10133	* mpn/ia64/mul_1.asm: Likewise.
10134	* mpn/ia64/add_n.asm: Likewise.
10135	* mpn/ia64/sub_n.asm: Likewise.
10136	* mpn/ia64/copyi.asm: Likewise.
10137	* mpn/ia64/copyd.asm: Likewise.
10138
10139	* mpn/generic/random2.c: Add a cast to silence some compilers.
10140
101412002-11-16  Torbjorn Granlund  <tege@swox.com>
10142
10143	* mpz/powm.c: Cap allocation by limiting k to 10 (512 precomputed
10144	values).
10145
101462002-11-16  Kevin Ryde  <kevin@swox.se>
10147
10148	* configure.in, gmp.texi: Remove powerpc64 ABI=32L, doesn't work and
10149	is unlikely to ever do so.
10150	* configure.in: Allow ABI=32 for powerpc64.
10151	Reported by David Edelsohn.
10152
101532002-11-14  Kevin Ryde  <kevin@swox.se>
10154
10155	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add addmul_2.c
10156	addmul_3.c addmul_4.c addmul_5.c addmul_6.c addmul_7.c addmul_8.c.
10157
10158	* gmp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
10159	Use __dllexport__ and __dllimport__ to keep out of application
10160	namespace.
10161
101622002-11-14  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10163
10164	* gmpxx.h (__gmp_randinit_default_t, __gmp_randinit_lc_2exp_t,
10165	__gmp_randinit_lc_2exp_size_t): Use extern "C" { typedef ... }, for
10166	the benefit of g++ prior to 3.2.
10167
101682002-11-12  Kevin Ryde  <kevin@swox.se>
10169
10170	* gmpxx.h (gmp_randclass constructors): Patch from Roberto Bagnara to
10171	use extern "C" on C function pointer arguments.
10172
101732002-11-09  Kevin Ryde  <kevin@swox.se>
10174
10175	* configure.in, Makefile.am, printf/Makefile.am,
10176	printf/repl-vsnprintf.c: Handle vsnprintf replacement with C
10177	conditionals.
10178
10179	* acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Workaround troubles recent
10180	HP cc +O3 causes for AC_CHECK_FUNCS.
10181
10182	* gmp.texi (Notes for Particular Systems): Add Sparc app regs.
10183	(Debugging): Note gcc -fstack options to detect overflow.
10184	(Formatted Output Strings, Formatted Input Strings): Format strings
10185	are not multibyte.
10186
101872002-11-06  Torbjorn Granlund  <tege@swox.com>
10188
10189	* mpn/generic/tdiv_qr.c: Remove a bogus assert.
10190
101912002-11-05  Torbjorn Granlund  <tege@swox.com>
10192
10193	* mpn/generic/tdiv_qr.c: Remove two dead mpn_divrem_2 calls.
10194
101952002-11-04  Kevin Ryde  <kevin@swox.se>
10196
10197	* acinclude.m4 (GMP_C_INLINE): Don't define "inline" for C++.
10198
10199	* demos/expr/expr-impl.h (stdarg.h): Test __DECC same as gmp.h.
10200
10201	* mpbsd/mtox.c, printf/obprintf.c, printf/obvprintf.c,
10202	scanf/vsscanf.c, demos/expr/expr.c, demos/expr/exprf.c,
10203	demos/expr/exprfa.c, demos/expr/exprfr.c, demos/expr/exprq.c,
10204	demos/expr/exprz.c, demos/expr/exprza.c: Add <string.h> for strlen and
10205	memcpy.
10206
102072002-11-02  Kevin Ryde  <kevin@swox.se>
10208
10209	* longlong.h: Test __x86_64__ not __x86_64.  Reported by Andreas
10210	Jaeger.
10211
10212	* mpz/import.c, mpz/export.c: Use char* subtract from NULL to get
10213	pointer alignment, for the benefit of Cray vector systems.
10214
10215	* cxx/ismpf.cc: Use <clocale>.
10216	* tests/cxx/t-locale.cc: No need to conditionalize <clocale>.
10217
10218	* scanf/doscan.c: Don't use isascii, rely on C99 ctype.h.
10219
10220	* gmp.texi (Build Options): Describe CC_FOR_BUILD, cross reference
10221	texinfo manual.
10222	(ABI and ISA): Add powerpc620 and powerpc630 to powerpc64, add NetBSD
10223	and OpenBSD sparc64.
10224	(Notes for Package Builds): Cross reference libtool manual.
10225	(Notes for Particular Systems): Add OpenBSD to non-MMX versions of gas.
10226	(Known Build Problems): Add MacOS X C++ shared libraries.
10227
102282002-10-31  Kevin Ryde  <kevin@swox.se>
10229
10230	* gmp-impl.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
10231	tests/devel/try.c, tests/tests.h, tests/refmpn.c (mpn_addmul_5,
10232	mpn_addmul_6, mpn_addmul_7, mpn_addmul_8): Add testing and measuring.
10233	* configure.in (config.in): Add #undefs of HAVE_NATIVE_mpn_addmul_5,
10234	HAVE_NATIVE_mpn_addmul_6, HAVE_NATIVE_mpn_addmul_7,
10235	HAVE_NATIVE_mpn_addmul_8.
10236	(gmp_mpn_functions_optional): Add addmul_5 addmul_6 addmul_7 addmul_8.
10237
10238	* tests/devel/try.c (ASSERT_CARRY): Remove, now in gmp-impl.h
10239	(try_one): Do dest setups after sources, for benefit of
10240	dst0_from_src1.
10241
102422002-11-01  Torbjorn Granlund  <tege@swox.com>
10243
10244	* mpn/generic/tdiv_qr.c: Avoid quadratic behaviour for
10245	sub-division when numerator is more than twice the size of the
10246	denominator.  Simplify loop logic for the same case.  Clean up a
10247	few comments.
10248
102492002-10-29  Torbjorn Granlund  <tege@swox.com>
10250
10251	* configure.in (*-cray-unicos*): Pass -hnofastmd again.
10252
102532002-10-25  Torbjorn Granlund  <tege@swox.com>
10254
10255	* tests/tadd.c: Disable test of denorms.
10256
102572002-10-23  Linus Nordberg  <linus@swox.se>
10258
10259	* gmp.texi (Introduction to GMP): Update section about mailing
10260	lists.
10261
102622002-10-23  Kevin Ryde  <kevin@swox.se>
10263
10264	* gmp-h.in (__GMP_ATTRIBUTE_PURE): Suppress this when
10265	__GMP_NO_ATTRIBUTE_CONST_PURE is defined.
10266	* gmp-impl.h (ATTRIBUTE_CONST): Ditto.
10267	* tune/common.c: Use __GMP_NO_ATTRIBUTE_CONST_PURE.
10268
10269	* tune/speed.h, tune/many.pl: Remove ATTRIBUTEs from prototypes.
10270	* tune/speed.h: Remove various "dummy" variables attempting to keep
10271	"pure" calls live, no longer necessary.  They weren't sufficient for
10272	recent MacOS cc anyway.
10273
102742002-10-21  Torbjorn Granlund  <tege@swox.com>
10275
10276	* mpn/cray/ieee/addmul_1.c: Handle overlap as in mul_1.c.
10277	* mpn/cray/ieee/submul_1.c: Likewise.
10278
102792002-10-19  Kevin Ryde  <kevin@swox.se>
10280
10281	* configure.in (sparcv9 etc -*-*bsd*): Add support for NetBSD and
10282	OpenBSD sparc64.  Reported by Christian Weisgerber.
10283	(AC_CHECK_HEADERS): Add sys/param.h for sys/sysctl.h on *BSD.
10284
10285	* demos/calc/calc.y: Change ={ to {, needed for bison 1.50.
10286
10287	* longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]:
10288	Should be UDItype.
10289
10290	* mpz/set_str.c, mpf/set_str.c, mpbsd/xtom.c, scanf/sscanffuns.c: Cast
10291	chars through "unsigned char" to zero extend, required by C99 ctype.h.
10292
102932002-10-18  Torbjorn Granlund  <tege@swox.com>
10294
10295	* tests/mpz/t-root.c: Test also mpz_rootrem.
10296
10297	* mpn/generic/rootrem.c: Avoid overflow problem when n is huge.
10298
10299	* mpz/root.c: Avoid overflow problems in allocation computation; also
10300	simplify it.  Misc cleanups.
10301
10302	* mpz/rootrem.c: New file.
10303	* Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
10304
103052002-10-17  Torbjorn Granlund  <tege@swox.com>
10306
10307	* gmp-impl.h (popc_limb): Combine variants.
10308
103092002-10-14  Kevin Ryde  <kevin@swox.se>
10310
10311	* configure.in (AC_CHECK_HEADERS): Add sys/time.h for sys/resource.h
10312	test, needed by SunOS, and next autoconf will insist headers actually
10313	compile.
10314
103152002-10-08  Kevin Ryde  <kevin@swox.se>
10316
10317	* tune/time.c (speed_time_init): Allow for Cray times() apparently
10318	being a cycle counter.
10319
10320	* dumbmp.c (mpz_get_str): Fix buf size allocation.
10321
10322	* tests/trace.c, tests/tests.h (mp_limb_trace): New function.
10323
10324	* tune/speed-ext.c (SPEED_EXTRA_PROTOS): Use __GMP_PROTO.
10325	* tests/devel/try.c (malloc_region): Add a cast for SunOS cc.
10326
10327	* configure.in (AC_CHECK_FUNCS): Add strerror.
10328	(AC_CHECK_DECLS): Add sys_errlist, sys_nerr.
10329	* tune/time.c, tests/devel/try.c: Use them.
10330
103312002-10-05  Kevin Ryde  <kevin@swox.se>
10332
10333	* configure.in (AC_CHECK_HEADERS): Test float.h, not in SunOS cc.
10334	* printf/repl-vsnprintf.c: Use this.
10335
10336	* configure.in (*sparc*-*-*): Collect up various options for clarity,
10337	use gcc -mcpu=supersparc and ultrasparc3, use cc -xchip, don't use
10338	-xtarget=native, use cc configs with acc, merge SunOS bundled cc and
10339	SunPRO cc configs.
10340
10341	* gmp-impl.h (gmp_randfnptr_t): Use __GMP_PROTO.
10342	(MPZ_REALLOC): Cast _mpz_realloc return value to mp_ptr, for the
10343	benefit of SunOS cc which requires pointers of the same type on the
10344	two legs of a ?:.
10345
10346	* dumbmp.c (mpz_realloc): Add a cast to avoid a warning from SunOS cc.
10347
10348	* acinclude.m4: Allow for i960 b.out default cc output.
10349
10350	* gmp.texi (Random State Initialization): Add gmp_randinit_mt.
10351	(Perfect Square Algorithm): Describe new mpn_mod_34lsub1 use.
10352	(Factorial Algorithm): Describe Jason's new code.
10353	(Binomial Coefficients Algorithm): Ideas about improvements
10354	moved to doc/projects.html.
10355	(Contributors): Add Jason Moxham and Pedro Gimeno.
10356
103572002-10-03  Kevin Ryde  <kevin@swox.se>
10358
10359	* gen-psqr.c: New file.
10360	* Makefile.am, mpn/Makefile.am: Use it to generate mpn/perfsqr.h.
10361	* mpn/generic/perfsqr.c: Use generated data, put mod 256 data into
10362	limbs to save space, use mpn_mod_34lsub1 when good.
10363	* tests/mpn/t-perfsqr.c: New file.
10364	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
10365	* tests/mpz/t-perfsqr.c (check_modulo): New test.
10366	(check_sqrt): New function holding current tests.
10367
10368	* configure.in (AC_INIT): Modernize to package name and version here
10369	rather than AM_INIT_AUTOMAKE, add bug report email.
10370	(AC_CONFIG_SRCDIR): New macro.
10371
10372	* gmp-impl.h (ROUND_UP_MULTIPLE): Fix for non-power-of-2 moduli (not
10373	normal in current uses), clarify the comments a bit.
10374
103752002-09-30  Kevin Ryde  <kevin@swox.se>
10376
10377	* mpn/Makeasm.am (.s.lo): Add --tag=CC for the benefit of CCAS!=CC,
10378	same as .S.lo and .asm.lo.
10379
10380	* Makefile.am (gen-fac_ui, gen-fib, gen-bases): Quote source files in
10381	test -f stuff to avoid Sun make rewriting them.
10382
103832002-09-28  Kevin Ryde  <kevin@swox.se>
10384
10385	* tests/devel/try.c, tune/speed.c: Avoid strings longer than C99
10386	guarantees.
10387
10388	* tests/refmpn.c, tests/tests.h (refmpn_zero_extend, refmpn_normalize,
10389	refmpn_sqrtrem): New functions.
10390	* tests/devel/try.c (TYPE_SQRTREM): Use refmpn_sqrtrem.
10391	(compare): Correction to tr->dst_size subscripting.
10392
10393	* dumbmp.c: Add several new functions, allow for initial n<d in
10394	mpz_tdiv_q (now in mpz_tdiv_qr actually).
10395
10396	* gen-bases.c (chars_per_limb): Get GMP_NUMB_BITS for base==2,
10397	similarly other powers of 2, which this was in the past.
10398	* tests/refmpn.c (refmpn_chars_per_limb): Ditto.
10399	* tests/mpn/t-mp_bases.c: Test chars_per_limb for power-of-2 bases too.
10400
10401	* Makefile.am, mpz/Makefile.am: Setups for gen-fac_ui.c generating
10402	mpz/fac_ui.h.
10403
104042002-09-28  Jason Moxham <J.L.Moxham@maths.soton.ac.uk>
10405
10406	* dumbmp.c (mpz_pow_ui, mpz_addmul_ui, mpz_root): New functions.
10407	* gen-fac_ui.c: New file.
10408	* mpz/fac_ui.c: Rewrite.
10409
104102002-09-26  Kevin Ryde  <kevin@swox.se>
10411
10412	* tests/cxx/localeconv.c: New file, split from t-locale.cc.
10413	* tests/cxx/t-locale.cc: Use it.
10414	* tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
10415
10416	* tests/cxx/Makefile.am: Updates for Gerardo's new test programs.
10417
104182002-09-26  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10419
10420	* gmpxx.h (__gmp_cmp_function): Bug fixes in double/mpq and
10421	double/mpfr comparisons.
10422
10423	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-constr.cc,
10424	tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: Revise and add various
10425	tests, including some for mpfr, some split from t-expr.cc.
10426	* tests/cxx/t-locale.cc: Modernize include files.
10427	* tests/cxx/t-ostream.cc: Modernize include files, use cout rather
10428	than printf for diagnostics.
10429	* tests/cxx/t-misc.cc, tests/cxx/t-rand.cc: New file, split from
10430	t-allfuns.cc.
10431	* tests/cxx/t-ops.cc: New file, some split from t-allfuns.cc.
10432	* tests/cxx/t-prec.cc: New file.
10433	* tests/cxx/t-allfuns.cc, tests/cxx/t-expr.cc: Remove files.
10434
104352002-09-25  Torbjorn Granlund  <tege@swox.com>
10436
10437	* configure.in (*-cray-unicos*): Remove -hscalar0, it causes too much
10438	performance loss.  Let's trust Cray to fix their compilers.
10439
104402002-09-24  Torbjorn Granlund  <tege@swox.com>
10441
10442	* mpn/powerpc32/add_n.asm: Rewrite.
10443	* mpn/powerpc32/sub_n.asm: Rewrite.
10444
104452002-09-24  Pedro Gimeno  <pggimeno@wanadoo.es>
10446
10447	* randlc2x.c: Prepare for nails by changing type of _mp_c to mpz_t,
10448	make _mp_seed fixed-size, disallow SIZ(a)==0 to optimize comparisons
10449	for mpn_mul.
10450	* gmp-impl.h (MPZ_FAKE_UI): New macro.
10451
10452	* randmt.c: Some constants made long for K&R compliance; remove UL at
10453	the end of other constants; use mp_size_t where appropriate; use
10454	mpz_export to split the seed.
10455
10456	* gmp-impl.h: Remove type cast in RNG_FNPTR and RNG_STATE, to allow
10457	them to be used as lvalues.
10458	* randclr.c, randlc2x.c, randmt.c, randsd.c: All callers changed.
10459
10460	* mpz/urandomm.c: Replace mpn_cmp with MPN_CMP.
10461
10462	* tests/rand/gen.c: Get rid of gmp_errno.
10463
104642002-09-24  Kevin Ryde  <kevin@swox.se>
10465
10466	* gmp.texi (Custom Allocation): Keep allocate_function etc out of the
10467	function index by using @deftypevr.
10468	More index entries.
10469
104702002-09-24  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10471
10472	* gmpxx.h (mpfr_class constructors from strings): Precision was set
10473	incorrectly, fixed.
10474
104752002-09-23  Torbjorn Granlund  <tege@swox.com>
10476
10477	* mpf/urandomb.c: Don't crash for overlarge nbits argument.
10478	Let nbits==0 mean to fill number with random bits.
10479
104802002-09-21  Torbjorn Granlund  <tege@swox.com>
10481
10482	* mpn/alpha/mod_34lsub1.asm: Add r31 dummy operand to `br' instruction.
10483
104842002-09-20  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10485
10486	* gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken
10487	mpq/double functions.
10488
104892002-09-18  Torbjorn Granlund  <tege@swox.com>
10490
10491	* randmt.c (randget_mt): Fix typo.
10492
104932002-09-18  Kevin Ryde  <kevin@swox.se>
10494
10495	* gmp-impl.h (_gmp_rand): Avoid evaluating "state" more than once, for
10496	the benefit places calling it with RANDS.
10497
10498	* randmt.c (randseed_mt): Use mpz_init for mod and seed1, for safety.
10499
10500	* tune/tuneup.c (sqr_karatsuba_threshold): Initialize to
10501	TUNE_SQR_KARATSUBA_MAX so mpn_sqr_n works for randmt initialization.
10502
10503	* gmp.texi (Integer Comparisons): Remove mention of non-existent
10504	mpz_cmpabs_si, reported by Conrad Curry.
10505
10506	* tune/speed.c, tune/speed.h, tune/common.c: Add gmp_randseed,
10507	gmp_randseed_ui and mpz_urandomb.
10508
105092002-09-18  Pedro Gimeno  <pggimeno@wanadoo.es>
10510
10511	* tests/rand/gen.c: Add mt, remove lc and bbs.
10512
10513	* Makefile.am (libgmp_la_SOURCES): Add randmt.c, remove randlc.c and
10514	randraw.c.
10515
10516	* randmt.c: New file.
10517	* gmp-h.in (gmp_randinit_mt): Add prototype.
10518	* randdef.c: Use gmp_randinit_mt.
10519
10520	* gmp-impl.h (RNG_FNPTR, RNG_STATE): New macros.
10521	(gmp_randfnptr_t): New structure.
10522	(_gmp_rand): Now a macro not a function.
10523	* gmp-h.in (__gmp_randata_lc): Remove, now internal to randlc2x.c.
10524	(__gmp_randstate_struct): Revise comments on field usage.
10525	* randsd.c, randclr.c: Use function pointer scheme.
10526	* randsdui.c: Use gmp_randseed.
10527	* randraw.c: Remove file.
10528	* randlc2x.c: Collect up lc_2exp related code from randsd.c, randclr.c
10529	and randraw.c, use function pointer scheme, integrate seed==0/a==0
10530	into main case and fix case where bits(a) < m2exp.
10531
10532	* randlc.c: Remove file, never documented and never worked.
10533	* gmp-h.in (gmp_randinit_lc): Remove prototype.
10534
105352002-09-16  Torbjorn Granlund  <tege@swox.com>
10536
10537	* mpn/alpha/mod_34lsub1.asm: New file.
10538
105392002-09-16  Kevin Ryde  <kevin@swox.se>
10540
10541	* configure.in, acinclude.m4 (GMP_C_RESTRICT): Remove this, not
10542	currently used, and #define restrict upsets Microsoft C headers on
10543	win64.  Reported by David Librik.
10544
10545	* configure.in (x86): Add gcc 3.2 -march and -mcpu flags, remove some
10546	unnecessary -march=i486 fallbacks.
10547
10548	* gmp.texi (Notes for Particular Systems): Note cl /MD is required for
10549	Microsoft C and MINGW to cooperate on I/O.  Explained by David Librik.
10550	(Language Bindings): Add linbox.
10551	* gmp.texi (Language Bindings):
10552
105532002-09-12  Kevin Ryde  <kevin@swox.se>
10554
10555	* mpz/aorsmul_i.c: Allow for w==x overlap with nails.  Test
10556	BITS_PER_ULONG > GMP_NUMB_BITS rather than GMP_NAIL_BITS != 0.
10557	* tests/mpz/t-aorsmul.c: Test this.
10558
10559	* tune/common.c: mpn_mod_34lsub1 only exists for GMP_NUMB_BITS%4==0
10560	* tune/speed.c: Add mpn_mod_34lsub1.
10561
105622002-09-10  Pedro Gimeno  <pggimeno@wanadoo.es>
10563
10564	* rand.c: Remove old disabled BBS code.
10565	* mpf/urandomb.c: Use BITS_TO_LIMBS.
10566
105672002-09-10  Kevin Ryde  <kevin@swox.se>
10568
10569	* gmp.texi (Multiplication Algorithms): FFT is now enabled by default.
10570
105712002-09-10  Pedro Gimeno  <pggimeno@wanadoo.es>
10572
10573	* mpz/urandomm.c: Use mpn level functions, avoid an infinite loop if
10574	_gmp_rand forever returns all "1" bits.
10575	* tests/rand/t-urndmm.c: New file
10576	* tests/rand/Makefile.am (check_PROGRAMS): Add it.
10577
10578	* gmp-impl.h (BITS_TO_LIMBS): New macro.
10579	* mpz/urandomb.c: Use it, and use MPZ_REALLOC.
10580
105812002-09-08  Kevin Ryde  <kevin@swox.se>
10582
10583	* acinclude.m4 (GMP_GCC_WA_MCPU): New macro.
10584	* configure.in (alpha*-*-*): Use it to avoid -Wa,-mev67 if gas isn't
10585	new enough to know ev67.  Reported by David Bremner.
10586
105872002-07-30  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10588
10589	* gmpxx.h (__gmpz_value etc): Remove, use mpz_t etc instead.
10590	(__gmp_expr): Reorganise specializations, use __gmp_expr<T,T> not
10591	mpz_class etc.
10592	(mpfr evals): Remove mode parameter, was always
10593	__gmp_default_rounding_mode anyway.
10594
105952002-09-07  Kevin Ryde  <kevin@swox.se>
10596
10597	* gmp-h.in, mp-h.in: Use #ifdef for tests, for the benefit of
10598	applications using gcc -Wundef.
10599
10600	* longlong.h: Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB for all alphas,
10601	since mpn/alpha/cntlz.asm always goes into libgmp.so, even for ev67
10602	and ev68 which don't need it.  Reported by David Bremner.
10603
10604	* gmp.texi (Demonstration Programs): New section, expanding on what
10605	was under "Build Options".
10606	(Converting Floats): Don't need \ for _ in @var within @math.
10607	Add and amend various index entries.
10608
10609	* demos/qcn.c: Add -p prime limit option.
10610
106112002-08-30  Kevin Ryde  <kevin@swox.se>
10612
10613	* mpz/pprime_p.c: Handle small negatives with isprime, in particular
10614	must do so for n==-2.
10615	* tests/mpz/t-pprime_p.c: New file.
10616	* tests/mpz/Makefile.am: Add it.
10617
106182002-08-26  Torbjorn Granlund  <tege@swox.com>
10619
10620	* gmp.texi (Converting Floats): Fix typo in mpf_get_d_2exp docs,
10621	reported by Paul Zimmermann.
10622
106232002-08-26  Kevin Ryde  <kevin@swox.se>
10624
10625	* configure.in: Echo the ABI being tried for the compilers.
10626	(powerpc*-*-*): Use powerpc64/aix.m4 for ABI=aix64 too.
10627	(AC_CHECK_FUNCS): Add strtol, for tests/rand/gen.c.
10628
106292002-08-24  Kevin Ryde  <kevin@swox.se>
10630
10631	* configure.in (HAVE_HOST_CPU_, HAVE_HOST_CPU_FAMILY_, HAVE_NATIVE_):
10632	Setup templates for these using AH_VERBATIM rather than acconfig.h,
10633	preferred by latest autoconf.  Prune lists to just things used.
10634	* acconfig.h: Remove file.
10635
10636	* mpn/powerpc32/mode1o.asm: Forgot ASM_START.
10637
10638	* tune/time.c (have_cgt_id): Renamed from HAVE_CGT_ID so avoid
10639	confusion with autoconf outputs, and turn it into a "const" variable.
10640
106412002-08-23  Torbjorn Granlund  <tege@swox.com>
10642
10643	* configure.in: Choose powerpc32/aix.m4 or powerpc64/aix.m4 based on
10644	ABI, not configuration triple.
10645
10646	* mpz/pprime_p.c: Partially undo last change--handle small and
10647	negative numbers in the same test.
10648
106492002-08-22  Kevin Ryde  <kevin@swox.se>
10650
10651	* gmp-impl.h (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD): Note
10652	mpn/generic/mul_fft.c is not nails-capable, and don't bother setting
10653	other FFT data for nails.
10654
10655	* configfsf.guess: Update to 2002-08-19.
10656	* configfsf.sub: Update to 2002-08-20.
10657
10658	* config.guess (powerpc*-*-*): Use a { } construct to suppress SIGILL
10659	message on AIX.
10660
106612002-08-20  Kevin Ryde  <kevin@swox.se>
10662
10663	* gmp.texi (Build Options): Add ia64 under cpu types.
10664	(ABI and ISA): Describe IRIX 6 ABI=o32.
10665	(Notes for Particular Systems): Remove -march=pentiumpro, now ok.
10666	(Known Build Problems): Binutils 2.12 is ok for libgmp.a.
10667	(Emacs): New section.
10668	(Language Bindings): Update MLton URL, reported by Stephen Weeks.
10669	(Prime Testing Algorithm): New section.
10670	Don't put a blank line after @item in @table since it can make a page
10671	break between the heading and the entry.
10672	Misc tweaks elsewhere, in particular more index entries.
10673
10674	* mpz/millerrabin.c: Need x to be size+1 for change to urandomm.
10675
10676	* gmp-impl.h: Comments on the use of __GMP_DECLSPEC.
10677
10678	* tune/time.c (freq_measure_mftb_one): Use struct_timeval, for the
10679	benefit of mingw.
10680
10681	* tests/refmpn.c, tests/tests.h (ref_addc_limb, ref_subc_limb):
10682	Renamed from add and sub, following gmp-impl.h ADDC_LIMB and SUBC_LIMB.
10683
106842002-08-17  Kevin Ryde  <kevin@swox.se>
10685
10686	* mpn/powerpc32/mode1o.asm: New file.
10687	* configure.in, acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): New macro.
10688	* mpn/asm-defs.m4: Use it to help setting up PIC.
10689
10690	* configure.in (AC_PREREQ): Bump to 2.53.
10691
10692	* mpn/powerpc32/powerpc-defs.m4 (ASSERT): New macro.
10693	(PROLOGUE_cpu): New macro, giving ALIGN(4) not 8.
10694
106952002-08-16  Torbjorn Granlund  <tege@swox.com>
10696
10697	* mpn/m68k/lshift.asm: Fix typo in !scale_available_p code.
10698	* mpn/m68k/rshift.asm: Likewise.
10699
107002002-08-16  Kevin Ryde  <kevin@swox.se>
10701
10702	* configure.in (--enable-profiling=instrument): New option.
10703	* gmp.texi (Profiling): Describe it.
10704	* mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_instrument, ret_internal):
10705	Add support.
10706	(call_mcount): Share PIC setups with call_instrument.
10707	* mpn/x86/*.asm: Use ret_internal.
10708	* mpn/asm-defs.m4 (m4_unquote): New macro.
10709	* tests/mpn/t-instrument.c: New file.
10710	* tests/mpn/Makefile.am: Add it.
10711
10712	* mpn/alpha/umul.asm: Add ASM_END.
10713
107142002-08-12  Kevin Ryde  <kevin@swox.se>
10715
10716	* mpz/pprime_p.c: Fake up a local mpz_t to take abs(n), rather than
10717	using mpz_init etc.
10718
10719	* mpz/millerrabin.c: Use mpz_urandomm for uniform selection of x,
10720	reported by Jason Moxham.  Exclude x==n-1, ie. -1 mod n.  Use
10721	gmp_randinit_default.
10722
10723	* mpn/alpha/umul.asm: Use "r" registers, for the benefit of Unicos.
10724
10725	* tests/devel/try.c: Add mpn_copyi and mpn_copyd.
10726
107272002-08-09  Kevin Ryde  <kevin@swox.se>
10728
10729	* Makefile.am: Remove configure.lineno from DISTCLEANFILES and gmp.tmp
10730	from MOSTLYCLEANFILES, automake does these itself now.
10731
10732	* */Makefile.in, aclocal.m4, configure, install-sh, missing,
10733	mkinstalldirs: Update to automake 1.6.3.
10734
10735	* mpn/ia64/README: Some notes on assembler syntax.
10736
10737	* mpn/ia64/add_n.asm, mpn/ia64/sub_n.asm: Add .body.
10738	* mpn/ia64/add_n.asm, mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm,
10739	mpn/ia64/sub_n.asm: Position .save ar.lc just before relevant
10740	instruction.
10741	* mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm: Add .save ar.pfs and pr.
10742	* mpn/ia64/copyd.asm, mpn/ia64/copyi.asm: Correction to .body position.
10743	* mpn/ia64/lorrshift.asm: Add .prologue stuff.
10744
10745	* configure.in (*-*-unicos*): Remove forcible --disable-shared,
10746	libtool gets this right itself now.
10747
107482002-08-07  Kevin Ryde  <kevin@swox.se>
10749
10750	* mpn/x86/pentium/mmx/hamdist.asm: New file, adapted from
10751	mpn/x86/pentium/mmx/popham.asm.
10752	* mpn/x86/pentium/mmx/popham.asm: Remove file, not faster than plain
10753	mpn/x86/pentium/popcount.asm for the popcount.
10754
10755	* mpn/alpha/umul.asm: Use PROLOGUE/EPILOGUE, rename it mpn_umul_ppmm.
10756	* configure.in (alpha*-*-*): Add umul to extra_functions.
10757
10758	* mpz/remove.c: Make src==0 return 0, not do DIVIDE_BY_ZERO.
10759
107602002-08-05  Torbjorn Granlund  <tege@swox.com>
10761
10762	* acconfig.h: Remove spurious undefs for mpn_divrem_newton and
10763	mpn_divrem_classic.
10764
107652002-08-05  Kevin Ryde  <kevin@swox.se>
10766
10767	* tests/refmpn.c, tests/tests.h, tests/misc/t-printf.c,
10768	tests/mpf/t-trunc.c, tests/mpn/t-mp_bases.c, tests/mpn/t-scan.c,
10769	tests/mpq/t-cmp_ui.c, tests/mpz/bit.c, tests/mpz/t-aorsmul.c,
10770	tests/mpz/t-powm_ui.c tests/mpz/t-root.c, tests/mpz/t-scan.c: More
10771	care with long and mp_size_t parameters, for the benefit of K&R.
10772
10773	* demos/perl/GMP.pm, demos/perl/GMP.xs, demos/perl/GMP/Mpz.pm,
10774	demos/perl/test.pl: Add mpz_import and mpz_export.
10775	* demos/perl/GMP.pm: Remove "preliminary" warning.
10776
10777	* mpn/lisp/gmpasm-mode.el: Set add-log-current-defun-header-regexp to
10778	pick up m4 defines etc.
10779
10780	* Makefile.am (libgmpxx_la_DEPENDENCIES): libgmp.la should be here,
10781	not libgmpxx_la_LIBADD, for the benefit of "make -j2".
10782
10783	* mpn/ia64/*.asm [hpux ABI=32]: Extend 32-bit operands to 64-bits, not
10784	optimal and might not be sufficient, but seems to work.
10785
107862002-08-03  Kevin Ryde  <kevin@swox.se>
10787
10788	* gmp.texi (Profiling): Use a table and expand for clarity.
10789	(Integer Special Functions): New section for mpz_array_init,
10790	_mpz_realloc, mpz_getlimbn and mpz_size, to discourage their use.
10791
10792	* configure.in (*-*-msdosdjgpp*): Remove forcible --disable-shared,
10793	libtool gets this right itself now.
10794
107952002-07-30  Kevin Ryde  <kevin@swox.se>
10796
10797	* mpn/powerpc32/lshift.asm, mpn/powerpc32/rshift.asm: Lose final mr,
10798	and make final stwu into an stw.
10799
10800	* gmp.texi (Known Build Problems): An easier workaround for DESTDIR,
10801	using LD_LIBRARY_PATH.
10802	(C++ Interface MPFR): Remove mpfrxx.h.
10803
10804	* mpfrxx.h: Remove file.
10805	* Makefile.am: Remove mpfrxx.h.
10806	* tests/cxx/Makefile.am: Add Gerardo's new test programs.
10807
108082002-07-30  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10809
10810	* gmpxx.h: Use mpz_addmul etc for ternary a+b*c etc.  Reorganise some
10811	macros for maintainability.  Merge mpfrxx.h.
10812	* tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: Various updates.
10813	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc,
10814	tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: New files.
10815
108162002-07-27  Kevin Ryde  <kevin@swox.se>
10817
10818	* longlong.h (count_trailing_zeros) [ia64 __GNUC__]: Don't use
10819	__builtin_ffs for now, doesn't seem to work.
10820
10821	* configure.in: Establish CONFIG_SHELL to avoid a problem with
10822	AC_LIBTOOL_SYS_MAX_CMD_LEN on ia64-*-hpux*.
10823
10824	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_FINDA): Don't let calls to
10825	mpn_gcd_finda go dead.
10826
10827	* mpn/generic/tdiv_qr.c: Inline mpn_rshift and MPN_COPY of 2 limbs.
10828
108292002-07-24  Kevin Ryde  <kevin@swox.se>
10830
10831	* demos/primes.c: Use __GMP_PROTO and don't use signed, for the
10832	benefit of K&R.
10833
10834	* demos/calc/calclex.l: Add <string.h> for strcmp.
10835
10836	* mpn/ia64/invert_limb.asm: Use .rodata which works on ia64-*-hpux*
10837	and should be standard, rather than worrying about RODATA.
10838
10839	* gmp.texi (Function Classes): Add cross references.
10840	(Integer Import and Export): Fix return value grouping.
10841
10842	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add // for
10843	ia64.  Add notes on what the various styles are for.
10844
10845	* mpn/ia64/default.m4 (ASM_START): Define to empty, not dnl, so as not
10846	to kill text on the same line.
10847	(EPILOGUE_cpu): Force a newline after "#", so as not to suppress macro
10848	expansion in the rest of the EPILOGUE line.
10849
108502002-07-21  Kevin Ryde  <kevin@swox.se>
10851
10852	* tune/speed.h: Fix some missing _PROTOs.
10853
10854	* Makefile.am (DISTCLEANFILES): Add configure.lineno.
10855
10856	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Define
10857	HAVE_DOUBLE_IEEE_BIG_ENDIAN and HAVE_DOUBLE_IEEE_LITTLE_ENDIAN in
10858	config.m4 too.
10859	* mpn/ia64/invert_limb.asm: Add big-endian data.
10860
10861	* tests/mpz/t-jac.c (try_si_zi): Correction to "a" parameter type.
10862
108632002-07-20  Kevin Ryde  <kevin@swox.se>
10864
10865	* mpz/bin_ui.c, mpz/jacobi.c, mpz/pprime_p.c, mpn/generic/divis.c:
10866	More care with long and mp_size_t parameters, for the benefit of K&R.
10867
10868	* gmp-impl.h (invert_limb): Use parens around macro arguments.
10869	(mpn_invert_limb): Give prototype and define unconditionally.
10870
10871	* gmp-impl.h (CACHED_ABOVE_THRESHOLD, CACHED_BELOW_THRESHOLD): New
10872	macros.
10873	* mpn/generic/sb_divrem_mn.c: Use them to help gcc let preinv code go
10874	dead when not wanted.
10875
108762002-07-17  Kevin Ryde  <kevin@swox.se>
10877
10878	* tests/refmpz.c (refmpz_hamdist): Ensure mp_size_t parameters are
10879	that type, for the benefit of hpux ia64 bundled cc ABI=64.
10880
10881	* configure.in (ia64*-*-hpux*): Need +DD64 in cc_64_cppflags to get
10882	the right headers for ansi2knr.
10883
10884	* acinclude.m4 (GMP_TRY_ASSEMBLE, GMP_ASM_UNDERSCORE): Use $CPPFLAGS
10885	with $CCAS and when linking, as done by the makefiles.
10886	(GMP_ASM_X86_MMX, GMP_ASM_X86_SSE2): Show $CPPFLAGS in diagnostics.
10887
10888	* gmp-impl.h (ieee_double_extract): Setup using HAVE_DOUBLE_IEEE_*.
10889	(GMP_UINT32): New define, 32 bit type for ieee_double_extract.
10890	* configure.in: Add AC_CHECK_SIZEOF unsigned.
10891	* configure.in, acinclude.m4 (GMP_IMPL_H_IEEE_FLOATS): Remove.
10892	(GMP_C_DOUBLE_FORMAT): Instead warn about unknown float here.
10893
10894	* configure.in, acinclude.m4 (GMP_C_SIZES): Remove.
10895	* acinclude.m4 (GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB): Remove this
10896	scheme, not required.
10897	* configure.in (unsigned long, mp_limb_t): Run AC_CHECK_SIZEOF for
10898	these unconditionally, check mp_limb_t against gmp-mparam.h values.
10899	* gmp-impl.h (BYTES_PER_MP_LIMB, BITS_PER_MP_LIMB): Define based on
10900	SIZEOF_MP_LIMB_T if not provided by gmp-mparam.h.
10901	(BITS_PER_ULONG): Define here now.
10902
10903	* gmp.texi (ABI and ISA): Add HP-UX IA-64 choices.
10904	(Random State Initialization): Typo in m2exp described for
10905	gmp_randinit_lc_2exp_size.
10906	(Formatted Output Functions): Clarify gmp_obstack_printf a bit.
10907	(Formatted Input Strings): Typo in %n summary.
10908
10909	* mpz/inp_raw.c (NTOH_LIMB_FETCH): Use simple generic default, since
10910	endianness detection is now cross-compile friendly.
10911	* mpz/out_raw.c (HTON_LIMB_STORE): Ditto.
10912
10913	* mpz/fib_ui.c: Nailify.
10914	* mpz/random.c: Nailify.
10915
10916	* mpfr/acinclude.m4 (MPFR_CONFIGS): Patch by Vincent for an apparent
10917	float rounding gremlin on powerpc.
10918
109192002-07-15  Kevin Ryde  <kevin@swox.se>
10920
10921	* Makefile.am (PRINTF_OBJECTS): Avoid ending in a backslash, hpux ia64
10922	make doesn't like that.
10923
10924	* mpn/ia64/*.asm: Add .sptk to unconditional branches, add ";" after
10925	.mib etc, for the benefit of hpux.
10926
10927	* configure.in (ia64*-*-*): Use ABI=64 on non-HPUX systems, for
10928	consistency.
10929
10930	* gmp-impl.h (ieee_double_extract): Test __sparc__, used by gcc 3.1.
10931	Reported by nix@esperi.demon.co.uk.
10932	* mpfr/mpfr-math.h (_MPFR_NAN_BYTES etc): Ditto.
10933
109342002-07-13  Kevin Ryde  <kevin@swox.se>
10935
10936	* mpn/powerpc32/rshift.asm: Rewrite, transformed from lshift.asm.
10937
10938	* tune/tuneup.c (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD):
10939	Always zero for native mpn_divexact_1, mpn_modexact_1_odd.
10940
10941	* gmp-h.in (__GMP_EXTERN_INLINE): Don't use this during configure,
10942	ie. __GMP_WITHIN_CONFIGURE, to avoid needing dependent routines.
10943	* acinclude.m4 (GMP_H_EXTERN_INLINE): Consequent changes.
10944
10945	* gmp-impl.h, mpn/asm-defs.m4 (mpn_addmul_2, mpn_addmul_3,
10946	mpn_addmul_4): Add prototypes and defines.
10947
10948	* gmp.texi (Number Theoretic Functions): Clarify return value.
10949	Reported by Peter Keller.
10950
109512002-07-10  Kevin Ryde  <kevin@swox.se>
10952
10953	* configure.in, acinclude.m4 (GMP_PROG_LEX): Remove this in favour of
10954	AM_PROG_LEX, now ok when lex is missing.
10955
10956	* longlong.h (count_leading_zeros) [pentiummmx]: Don't use __clz_tab
10957	variant under LONGLONG_STANDALONE.
10958	(count_trailing_zeros) [ia64 __GNUC__]: Use __builtin_ffs.
10959
10960	* gmp-impl.h (popc_limb): Add an ia64 asm version.
10961	(DItype): Use HAVE_LONG_LONG to choose long long, avoiding _LONGLONG
10962	which is in gcc but means something unrelated in MS Visual C 7.0.
10963	Reported by David Librik.
10964
10965	* mpz/divexact.c: Add an ASSERT that den divides num.
10966
10967	* mpn/asm-defs.m4 (LDEF): New macro.
10968	(INT32, INT64): Use it.
10969	* mpn/pa32/*.asm: Use it.
10970	* mpn/pa32/README: Update notes on labels.
10971
10972	* tests/refmpn.c, tests/tests.h, tests/t-bswap.c (ref_bswap_limb):
10973	Renamed from refmpn_bswap_limb.
10974	* tests/t-bswap.c: Add tests_start/tests_end for randomization.
10975
10976	* tests/refmpn.c, tests/tests.h (ref_popc_limb): New function.
10977	* tests/t-popc.c: New file.
10978	* tests/Makefile.am: Add it.
10979
10980	* mpn/ia64/invert_limb.asm: Use RODATA since ".section .rodata" is not
10981	accepted by ia64-*-hpux*.
10982
10983	* acinclude.m4 (GMP_ASM_BYTE): New macro.
10984	(GMP_ASM_ALIGN_LOG, GMP_ASM_W32): Use it.
10985	(GMP_ASM_LABEL_SUFFIX): Use test compiles, not $host.
10986	(GMP_ASM_GLOBL): Ditto, and add .global for ia64-*-hpux*.
10987	(GMP_ASM_GLOBL_ATTR): Use GMP_ASM_GLOBL result, not $host.
10988	(GMP_ASM_LSYM_PREFIX): Allow any "a-z" nm symbol code, add ".text" to
10989	test program, required by ia64-*-hpux*.
10990	(GMP_ASM_LABEL_SUFFIX): Make LABEL_SUFFIX just the value, not a "$1:",
10991	the former being how it's currently being used in fact.
10992
10993	* configure.in, acinclude.m4 (GMP_PROG_CC_WORKS_LONGLONG): New macro.
10994	* configure.in (ia64-*-hpux*): Add 32 and 64 bit ABI modes.
10995
109962002-07-06  Kevin Ryde  <kevin@swox.se>
10997
10998	* tests/cxx/t-allfuns.cc: New file.
10999	* tests/cxx/Makefile.am: Add it.
11000
11001	* mpz/clrbit.c, mpz/setbit.c: Only MPN_NORMALIZE if high limb changes
11002	to zero.  Use _mpz_realloc return value.
11003
11004	* gmp.texi (Build Options, C++ Formatted Output, C++ Formatted Input):
11005	Cross reference to Headers and Libraries for libgmpxx stuff.
11006	(Low-level Functions): mpn_divexact_by3 result based on GMP_NUMB_BITS.
11007	mpn_set_str takes "unsigned char *", reported by Mark Sofroniou.
11008	(C++ Interface General): Describe linking with libgmpxx and libgmp.
11009
110102002-07-01  Kevin Ryde  <kevin@swox.se>
11011
11012	* tune/tuneup.c, gmp-impl.h: Eliminate the array of thresholds in
11013	one(), tune just one at a time and let the callers hand dependencies.
11014	Eliminate the second_start_min hack, handle SQR_KARATSUBA_THRESHOLD
11015	oddities in tune_sqr() instead.
11016
11017	* mpn/pa64/umul.asm, mpn/pa64/udiv.asm, mpn/asm-defs.m4, acconfig.h,
11018	longlong.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
11019	tests/devel/try.c: Introduce mpn_umul_ppmm_r and mpn_udiv_qrnnd_r
11020	rather than having variant parameter order for mpn_umul_ppmm and
11021	mpn_udiv_qrnnd on pa64.
11022
11023	* gmp-h.in (mpz_export): Remove a spurious parameter name.
11024	* gmp-impl.h (mpn_rootrem): Use __MPN.
11025
110262002-06-29  Kevin Ryde  <kevin@swox.se>
11027
11028	* longlong.h (udiv_qrnnd) [hppa32]: Remove mpn_udiv_qrnnd version, the
11029	general mechanism for that suffices.
11030
11031	* mpf/inp_str.c: Fix returned count of chars read, reported by Paul
11032	Zimmermann.  Also fix a memory leak for invalid input.
11033	* tests/mpf/t-inp_str.c: New file.
11034	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
11035
11036	* tests/devel/try.c (mpn_mod_34lsub1): Only exists for
11037	GMP_NUMB_BITS%4==0.
11038	(SIZE2_FIRST): Respect option_firstsize2 for "fraction" case.
11039
11040	* mpn/generic/diveby3.c: Further nailifications.
11041	* gmp-impl.h (MODLIMB_INVERSE_3): Allow for GMP_NUMB_BITS odd.
11042	(GMP_NUMB_CEIL_MAX_DIV3, GMP_NUMB_CEIL_2MAX_DIV3): New constants.
11043	* tests/t-constants.c: Check them.
11044
11045	* gmp-h.in (__GMP_CRAY_Pragma): New macro.
11046	(__GMPN_COPY_REST): Use it.
11047	* gmp-impl.h (CRAY_Pragma): Use it.
11048
110492002-06-25  Kevin Ryde  <kevin@swox.se>
11050
11051	* mpz/import.c, mpz/export.c: Cast data pointer through "char *" in
11052	alignment tests, for the benefit of Cray vector systems.
11053
11054	* configure.in (x86-*-*): Remove -march=pentiumpro check, seems ok
11055	with current code.
11056	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO, GMP_GCC_VERSION_GE): Remove
11057	macros, no longer needed
11058
11059	* acinclude.m4 (GMP_ASM_RODATA): Remove temporary files.
11060
11061	* configure.in (GMP_ASM_GLOBL_ATTR): Reposition to avoid duplication
11062	through AC_REQUIRE.
11063
110642002-06-23  Kevin Ryde  <kevin@swox.se>
11065
11066	* tests/mpz/t-fib_ui.c (check_fib_table): Check table values, not just
11067	that they're non-zero.
11068
11069	* acinclude.m4 (GMP_GCC_ARM_UMODSI): Match bad "gcc --version" output
11070	exactly, rather than parsing it with GMP_GCC_VERSION_GE.
11071	(GMP_ASM_UNDERSCORE): Use GLOBL_ATTR.
11072
11073	* mpn/pa32/udiv.asm, mpn/pa32/hppa1_1/udiv.asm, mpn/pa64/udiv.asm:
11074	Renamed from udiv_qrnnd.asm, for consistency with other udiv's.
11075	* mpn/pa64/umul.asm: Renamed from umul_ppmm.asm likewise.
11076	* configure.in (hppa*-*-*): Update extra_functions.
11077	(NAILS_SUPPORT): Remove umul_ppmm, udiv_qrnnd, udiv_fp, udiv_nfp from
11078	nails-neutral list, no longer needed.
11079
11080	* gmp-h.in (__DECC): Add notes on testing this for ANSI-ness.
11081	(__GMP_EXTERN_INLINE): Add static __inline for DEC C.
11082	(mpz_mod_ui): Move up to main section, it's still documented.
11083
110842002-06-22  Kevin Ryde  <kevin@swox.se>
11085
11086	* mpz/jacobi.c, mpz/kronsz.c, mpz/kronuz.c, mpz/kronzs.c,
11087	mpz/kronzu.c: Allow for odd GMP_NUMB_BITS, tweak a few variable setups.
11088	* gmp-impl.h (JACOBI_STRIP_LOW_ZEROS): New macro.
11089
11090	* mpn/generic/mod_34lsub1.c: Nailify.
11091	* tests/devel/try.c (CNST_34LSUB1): Nailify.
11092	* gmp-impl.h (ADDC_LIMB): New macro.
11093
11094	* gmpxx.h (mpf_class::get_str): Make exponent mp_exp_t&, default
11095	base=10 and ndigits=0.
11096	(mpz_class::set_str, mpq_class::set_str, mpf_class::set_str): Add
11097	versions accepting "const char *".
11098	* mpfrxx.h (mpfr_class::get_str, mpfr_class::set_str): Ditto, and
11099	uncommenting set_str and operator=.
11100	* gmp.texi (C++ Interface Integers, C++ Interface Rationals)
11101	(C++ Interface Floats): Update.
11102
11103	* gmp-impl.h (modlimb_invert): Merge the <=64bits and general versions.
11104	(const, signed): Move to near top of file, fixes --enable-alloca=debug
11105	on K&R.
11106
11107	* gen-fib.c: New file, derived from mainline in mpn/generic/fib2_ui.c.
11108	* dumbmp.c (mpz_init_set_ui): New function.
11109	* Makefile.am, mpn/Makefile.am: Generate fib_table.h, mpn/fib_table.c.
11110	* gmp-impl.h: Use fib_table.h, add __GMP_DECLSPEC to __gmp_fib_table
11111	(for the benefit of tests/mpz/t-fib_ui.c).
11112	* mpn/generic/fib2_ui.c: Remove __gmp_fib_table and generating code.
11113
11114	* Makefile.am: Add mp.h to BUILT_SOURCES, distclean all BUILT_SOURCES,
11115	use += more.
11116
11117	* acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_BRANCHES):
11118	Don't let "unknown" get into the cache variables.
11119	(GMP_ASM_TEXT): See what assembles, don't hard-code hpux and aix.
11120	(GMP_PROG_EXEEXT_FOR_BUILD): Add ,ff8 for RISC OS, per autoconf cvs.
11121	(GMP_PROG_CPP_FOR_BUILD): Restructure per AC_PROG_CPP, print correct
11122	result if CPP_FOR_BUILD overrides the cache variable.
11123	(GMP_PROG_CC_FOR_BUILD_WORKS): New macro split from
11124	GMP_PROG_CC_FOR_BUILD.  Allow for "conftest" default compiler output.
11125	* configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Reinstate this,
11126	separating HOST_CC establishment from GMP_PROG_CC_FOR_BUILD.
11127
11128	* configure.in (mpn_objs_in_libgmp): Move mpn/mp_bases.lo ...
11129	* Makefile.am (MPN_OBJECTS): ... to here, add $U, and arrange
11130	MPN_OBJECTS to be common between libgmp and libmp.
11131
111322002-06-20  Torbjorn Granlund  <tege@swox.com>
11133
11134	* mpn/generic/mul_n.c (TOOM3_MUL_REC, TOOM3_SQR_REC): Don't check if
11135	basecase is to be invoked when *_TOOM3_THRESHOLD is more than 3 times
11136	the corresponding *_THRESHOLD.
11137
111382002-06-20  Kevin Ryde  <kevin@swox.se>
11139
11140	* mpn/ia64/submul_1.c: Add missing TMP_DECL, TMP_MARK, TMP_FREE.
11141	Reported by Paul Zimmermann.
11142
11143	* configure.in, acinclude.m4 (AC_DEFINE): Make templates read "Define
11144	to 1", for clarity as per autoconf.
11145	* acinclude.m4 (GMP_OPTION_ALLOCA): Group WANT_TMP templates.
11146
111472002-06-20  Gerardo Ballabio <gerardo.ballabio@unimib.it>
11148
11149	* gmpxx.h, mpfrxx.h: Remove mpz_classref, let mpq_class::get_num and
11150	mpq_class::get_den return mpz_class& as per the documentation.
11151	Reported by Roberto Bagnara.
11152
111532002-06-18  Kevin Ryde  <kevin@swox.se>
11154
11155	* tests/rand/t-lc2exp.c: New file.
11156	* tests/rand/Makefile.am: Add it, and use tests/libtests.la.
11157
11158	* randraw.c (lc): Pad seed==0 case with zero limbs, return same
11159	(m2exp+1)/2 bits as normal, right shift "c" result as normal.
11160
11161	* configure.in: Don't bother with line numbers in some diagnostics.
11162	(*-*-mingw*): Use -mno-cygwin if it works, suggested by delta trinity.
11163
11164	* tests/mpz/Makefile.am, tests/mpq/Makefile.am,
11165	tests/misc/Makefile.am, (CLEANFILES): Set to *.tmp for test program
11166	temporaries, to get t-scanf.tmp and reduce future maintenance.
11167
111682002-06-16  Torbjorn Granlund  <tege@swox.com>
11169
11170	* mpn/generic/get_str.c (mpn_dc_get_str): Pass scratch memory area in
11171	new `tmp' parameter.  Trim allocation needs by reusing input parameter.
11172
111732002-06-15  Torbjorn Granlund  <tege@swox.com>
11174
11175	* mpn/sparc32/v9/udiv.asm: New file.
11176
111772002-06-15  Kevin Ryde  <kevin@swox.se>
11178
11179	* acinclude.m4 (GMP_GCC_VERSION_GE): Correction to recognising mingw
11180	gcc 3.1 version number.  Reported by Jim Fougeron.
11181
11182	* configure.in (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): New define, to make
11183	AC_LIBTOOL_WIN32_DLL work with autoconf 2.53.
11184
11185	* acinclude.m4 (GMP_C_SIZES): Establish BITS_PER_MP_LIMB as a value,
11186	not an expression, for the benefit of the gen-bases invocation.
11187
11188	* config.guess (CC_FOR_BUILD): Try c99, same as configfsf.guess.
11189
111902002-06-15  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
11191
11192	* mpfr/set_q.c: Allow for 1 bit numerator or denominator.
11193
111942002-06-14  Kevin Ryde  <kevin@swox.se>
11195
11196	* configure.in (AC_C_BIGENDIAN): Use new style action parameters.
11197
11198	* randlc2x.c: Allow for a<0, allow for c>=2^m2exp.
11199	* randraw.c (lc): Allow for a==0.
11200
11201	* mpn/sparc32/udiv.asm: Renamed from udiv_fp.asm.  Don't know if float
11202	is the best way for v7, but it's what configure has chosen since gmp 3.
11203	* configure.in (*sparc*-*-* ABI=32): extra_functions="udiv" for all,
11204	in particular sparc32/v8/udiv.asm is faster (on ultrasparc2) than
11205	udiv_fp previously used for v9 chips.
11206
11207	* gen-bases.c: New file, derived from mpn/mp_bases.c.
11208	* dumbmp.c: New file, mostly by Torbjorn, some by me.
11209	* configure.in, acinclude.m4 (GMP_PROG_CC_FOR_BUILD,
11210	GMP_PROG_CPP_FOR_BUILD, GMP_PROG_EXEEXT_FOR_BUILD,
11211	GMP_C_FOR_BUILD_ANSI, GMP_CHECK_LIBM_FOR_BUILD): New macros.
11212	(GMP_PROG_HOST_CC): Remove, superceded by GMP_PROG_CC_FOR_BUILD.
11213	* Makefile.am: Run gen-bases to create mp_bases.h and mpn/mp_bases.c.
11214	* gmp-impl.h: Use mp_bases.h.
11215	* mpn/mp_bases.c: Remove file.
11216	* mpn/Makefile.am: mp_bases.c now in nodist_libmpn_la_SOURCES.
11217
11218	* tests/mpz/t-cmp_d.c (check_one_2exp): Use volatile to force to
11219	double, fixes gcc 3.1 with -O4.  Reported by Michael Lee.
11220	* configure.in (AC_C_VOLATILE): New macro.
11221
11222	* tests/misc/t-scanf.c: (fromstring_gmp_fscanf): Add missing va_end.
11223	Don't mix varargs and fixed args functions, not good on x86_64.
11224	Reported by Marcus Meissner.
11225
11226	* Makefile.am (EXTRA_DIST): Remove mpfr/README, now in mpfr/Makefile.in
11227
11228	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.53.
11229	* */Makefile.in, install-sh, mdate-sh, missing, aclocal.m4, configure:
11230	Update to automake 1.6.1.
11231	* configfsf.guess, configfsf.sub: Update to 2002-05-29.
11232
112332002-06-12  Kevin Ryde  <kevin@swox.se>
11234
11235	* acinclude.m4 (GMP_GCC_VERSION_GE): Recognise mingw gcc 3.1 version.
11236	(GMP_PROG_CC_WORKS): Allow for a_out.exe, as per autoconf.
11237	(GMP_GCC_NO_CPP_PRECOMP, GMP_ASM_UNDERSCORE): Ditto, plus a.exe.
11238
112392002-06-09  Torbjorn Granlund  <tege@swox.com>
11240
11241	* randraw.c (lc): Remove broken ASSERT_ALWAYS.
11242
11243	* mpn/x86: Update gmp-mparam.h files with current measures *_THRESHOLD
11244	values.
11245	* mpn/x86/p6/mmx/gmp-mparam.h: New file.
11246
112472002-06-09  Kevin Ryde  <kevin@swox.se>
11248
11249	* mpn/x86/*/gmp-mparam.h (USE_PREINV_DIVREM_1): Add tuned settings.
11250
11251	* acconfig.h (HAVE_NATIVE_mpn_preinv_divrem_1): New template.
11252
11253	* tests/refmpn.c, tests/tests.h (refmpn_chars_per_limb,
11254	refmpn_big_base): New functions.
11255	* tests/mpn/t-mp_bases.c: Use them, and don't test big_base_inverted
11256	unless it's being used.
11257
11258	* gmp.texi (Notes for Particular Systems): Using Microsoft C with DLLs.
11259	(Known Build Problems): Notes on MacOS and GCC.
11260	(Integer Logic and Bit Fiddling): Use ULONG_MAX for maximum ulong.
11261	(Low-level Functions): mpn_get_str accepts base==256.
11262	(Formatted Output Functions): Note output is not atomic.
11263	(Internals): Note mp_size_t for limb counts.
11264
11265	* mp-h.in, gmp-h.in (mp_ptr, mp_srcptr, mp_size_t, mp_exp_t): Remove
11266	these types from mp.h, not needed.
11267
11268	* mpfr/tests/tadd.c, mpfr/tests/tmul.c (check): Apply a hack to the
11269	parameter order to make sparc gcc 2.95.2 happy.
11270
11271	* doc/configuration: Notes on bootstrapping.
11272
112732002-06-08  Kevin Ryde  <kevin@swox.se>
11274
11275	* mpfr/tests/tsqrt.c, mpfr/tests/tsqrt_ui.c: Suppress tests if sqrt is
11276	not affected by mpfr_set_machine_rnd_mode.
11277
11278	* mpfr/mul_2si.c: Workaround a mips gcc 2.95.3 bug under -O2 -mabi=n32.
11279
11280	* configure.in (alphev56): Fix to use ev5 path.
11281
112822002-06-06  Kevin Ryde  <kevin@swox.se>
11283
11284	* gmp-h.in: Use __gmp_const not const, in a number of places.
11285
11286	* configure.in (sparc): Use ABI=32 instead of ABI=standard on v7 and
11287	v8, for consistency with v9 choices.
11288	(sparc64): Restrict GMP_ASM_SPARC_REGISTER to ABI=64.
11289	(x86): Move MMX $path munging to before printout.
11290	(CCAS): Move upward to support this.
11291
11292	* gmp-impl.h (modlimb_invert): Merge macros for specific limb sizes,
11293	add a version for arbitrary limb size, use GMP_NUMB_BITS.
11294	(modlimb_invert, MODLIMB_INVERSE_3): Fix comments to say GMP_NUMB_BITS.
11295
11296	* gmp-h.in (__GMP_LIKELY, __GMP_UNLIKELY): New macros.
11297	(mpz_getlimbn, mpz_perfect_square_p, mpz_popcount): Use them, make the
11298	fetch or mpn call likely, unconditionally calculate the alternative so
11299	as to avoid an "else" clause.
11300	* gmp-impl.h (LIKELY, UNLIKELY): Aliases.
11301
11302	* configure.in, mpfr/tests/Makefile.am: Add $LIBM to $LIBS for
11303	MPFR_CONFIGS so it detects fesetround, and let it go through to
11304	$MPFR_LIBS.
11305	* mpfr/rnd_mode.c: Use gmp-impl.h to get MPFR_HAVE_FESETROUND.
11306
11307	* tests/mpz/t-sizeinbase.c: Disable fake bits test, such pointer
11308	setups are bogus and have been seen failing on hppa.
11309
11310	* tests/misc.c, tests/refmpz.c, tests.tests.h, tests/mpz/t-cong.c:
11311	Rename mpz_flipbit to refmpz_combit and move from misc.c to refmpz.c.
11312
113132002-06-05  Torbjorn Granlund  <tege@swox.com>
11314
11315	* tests/mpz/t-powm_ui.c Print proper routine name in error message.
11316
113172002-06-03  Kevin Ryde  <kevin@swox.se>
11318
11319	* tune/time.c, tune/freq.c, tune/speed.h: Add powerpc mftb support.
11320	(FREQ_MEASURE_ONE): Move to speed.h, fix tv_sec factor.
11321	(freq_measure): Use for mftb measuring too.
11322	* tune/powerpc.asm, tune/powerpc64.asm: New files.
11323	* configure.in, tune/Makefile.am: Add them.
11324
11325	* gmp-impl.h (popc_limb): Add versions for Cray and fallback for
11326	arbitrary limb size.
11327
11328	* mpn/sparc32/sparc-defs.m4: New file.
11329	* configure.in (sparc*-*-*): Use it.
11330	* acinclude.m4 (GMP_ASM_SPARC_REGISTER): New macro.
11331	* configure.in (sparc64): Use it.  Also, use -Wc,-m64 for linking.
11332	* mpn/sparc64/add_n.asm, mpn/sparc64/addmul_1.asm,
11333	mpn/sparc64/copyd.asm, mpn/sparc64/copyi.asm, mpn/sparc64/lshift.asm,
11334	mpn/sparc64/mul_1.asm, mpn/sparc64/rshift.asm,
11335	mpn/sparc64/sqr_diagonal.asm, mpn/sparc64/sub_n.asm,
11336	mpn/sparc64/submul_1.asm: Use REGISTER for .register.
11337
113382002-06-01  Kevin Ryde  <kevin@swox.se>
11339
11340	* mpz/powm_ui.c: Fix for result range in certain circumstances.
11341
11342	* mpn/x86/k6/diveby3.asm: Speedup to 10 c/l, same as divexact_1.
11343	Anomaly pointed out by Alexander Kruppa.
11344
113452002-05-31  Torbjorn Granlund  <tege@swox.com>
11346
11347	* mpz/export.c: Cast pointer via `unsigned long' when checking
11348	alignment to avoid compiler warnings.
11349
113502002-05-29  Kevin Ryde  <kevin@swox.se>
11351
11352	* gmp-impl.h (BSWAP_LIMB): Versions for m68k, powerpc, and arbitrary
11353	limb size.
11354	* configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_m68k): New define.
11355
113562002-05-27  Torbjorn Granlund  <tege@swox.com>
11357
11358	* mpn/generic/mul_basecase.c: Improve MAX_LEFT handling, returning
11359	when possible.  Add code for mpn_addmul_5 and mpn_addmul_6.
11360
113612002-05-25  Kevin Ryde  <kevin@swox.se>
11362
11363	* tune/tuneup.c: Misc nailifications, and disable preinv thresholds
11364	with nails.
11365	* tune/speed.h: Use GMP_NUMB_HIGHBIT with mpn_sb_divrem_mn and
11366	mpn_divrem_2.
11367	* mpz/powm.c (redc): Nailify q.
11368
11369	* tests/mpn/t-scan.c: Reduce the amount of testing, to go faster.
11370
113712002-05-23  Torbjorn Granlund  <tege@swox.com>
11372
11373	* Version 4.1 released.
11374
11375	* mpn/alpha/ev6/nails/gmp-mparam.h: New file.
11376
11377	* tests/devel/add_n.c (refmpn_add_n): Nailify.
11378	* tests/devel/sub_n.c (refmpn_sub_n): Nailify.
11379	* tests/devel/addmul_1.c (refmpn_addmul_1): Nailify.
11380	* tests/devel/submul_1.c (refmpn_submul_1): Nailify.
11381
11382	* mpn/alpha/ev6/nails/add_n.asm: New file.
11383	* mpn/alpha/ev6/nails/sub_n.asm: New file.
11384	* mpn/alpha/ev6/nails/mul_1.asm: New file.
11385	* mpn/alpha/ev6/nails/submul_1.asm: New file.
11386
113872002-05-22  Torbjorn Granlund  <tege@swox.com>
11388
11389	* mpn/alpha/ev6/nails/addmul_1.asm: New file.
11390
11391	* mpz/inp_str.c (mpz_inp_str_nowhite): Nailify.
11392
11393	* mpn/generic/mul_basecase.c: Update pointers before conditional
11394	MAX_LEFT break statements.
11395
113962002-05-21  Torbjorn Granlund  <tege@swox.com>
11397
11398	* tests/mpz/t-gcd.c: Test mpz_gcd_ui.
11399
11400	* mpz/lcm_ui.c: Nailify.
11401
11402	* mpz/gcd_ui.c: Nailify.  Make it work as documented, allowing
11403	NULL to be passed for result parameter.  Fix gcd(0,0) case.
11404
11405	* mpz/set_str.c: Nailify.
11406
11407	* randlc2x.c (gmp_randinit_lc_2exp): Nailify.
11408
11409	From Jakub Jelinek:
11410	* longlong.h (add_ssaaaa,sub_ddmmss) [64-bit sparc]:
11411	Make it actually work.
11412
114132002-05-18  Torbjorn Granlund  <tege@swox.com>
11414
11415	* mpf/ui_div.c: Shut up compiler warning.
11416
11417	* mpn/generic/mul_basecase.c: Use mpn_addmul_2, mpn_addmul_3, and
11418	mpn_addmul_4, as available.
11419
11420	* mpn/alpha/ev6/nails/addmul_2.asm: Adjust NAILS_SUPPORT decls.
11421	* mpn/alpha/ev6/nails/addmul_3.asm: Likewise
11422	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
11423
11424	* configure.in (*-cray-unicos*): Back again to -hscalar0.
11425	(gmp_mpn_functions_optional): Add mul_3, mul_4, addmul_2, addmul_3,
11426	and addmul_4.
11427	* acconfig.h: Add #undefs for new optional mpn functions.
11428
114292002-05-18  Kevin Ryde  <kevin@swox.se>
11430
11431	* gmp.texi (Integer Import and Export): Mention Cray unfilled words.
11432
11433	* mpz/set_d.c, mpq/set_d.c: Use LIMBS_PER_DOUBLE for the output of
11434	__gmp_extract_double.  Reported by Henrik Johansson.
11435
114362002-05-17  Torbjorn Granlund  <tege@swox.com>
11437
11438	* mpn/alpha/ev6/nails/addmul_2.asm: New file.
11439	* mpn/alpha/ev6/nails/addmul_3.asm: New file.
11440	* mpn/alpha/ev6/nails/addmul_4.asm: New file.
11441
11442	* mpn/generic/dump.c: Rewrite and nailify.
11443
114442002-05-16  Kevin Ryde  <kevin@swox.se>
11445
11446	* mpfr/Makefile.am (EXTRA_DIST): Add BUGS file.
11447
114482002-05-15  Torbjorn Granlund  <tege@swox.com>
11449
11450	* configure.in (*-cray-unicos*): Remove -hscalar0, add -hnofastmd
11451	as workaround for compiler bug.
11452	(mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
11453
114542002-05-14  Torbjorn Granlund  <tege@swox.com>
11455
11456	* configure.in (*-cray-unicos*): Pass -hscalar0 to work around
11457	compiler bug for mpz/import.c.
11458
114592002-05-11  Torbjorn Granlund  <tege@swox.com>
11460
11461	* mpz/import.c: Cast pointer via `unsigned long' when checking
11462	alignment to avoid compiler warnings.
11463
11464	* mpn/generic/rootrem.c: Adjust allocation of qp temporary area.
11465
114662002-05-09  Kevin Ryde  <kevin@swox.se>
11467
11468	* mpz/import.c: Corrections to size store, special case tests, and
11469	general case ACCUMULATE.
11470	* tests/mpz/t-import.c, tests/mpz/t-export.c: More test data.
11471
114722002-05-09  Torbjorn Granlund  <tege@swox.com>
11473
11474	* mpn/generic/rootrem.c: Use temp space for root, copy value in place
11475	before returning.
11476	* mpz/root.c: Don't allocate extra limb for root value.
11477	* mpz/perfpow.c: Undo last change.
11478
114792002-05-08  Torbjorn Granlund  <tege@swox.com>
11480
11481	* gmp-impl.h (powerpc BSWAP_LIMB_FETCH): Rename local variable to make
11482	it not clash with caller.
11483
11484	* mpn/generic/rootrem.c: New file.
11485	* configure.in (gmp_mpn_functions): Add rootrem and pow_1.
11486	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add rootrem.c and
11487	pow_1.c
11488	* gmp-impl.h (mpn_rootrem): Add declaration.
11489	* mpz/perfpow.c: Amend allocations for mpn_rootrem requirements.
11490	* mpz/root.c: Rewrite to use mpn_rootrem.
11491
114922002-05-08  Kevin Ryde  <kevin@swox.se>
11493
11494	* gmp-impl.h (MUL_KARATSUBA_THRESHOLD etc): Remove forced nail values.
11495
11496	* mpf/fits_u.h, mpf/fits_s.h, tests/mpf/t-fits.c: Ignore fraction
11497	part, making the code match the documentation.
11498
11499	* gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.
11500
115012002-05-07  Kevin Ryde  <kevin@swox.se>
11502
11503	* mpn/powerpc32/README: New file.
11504
11505	* mpz/root.c: Use unsigned long with mpz_sub_ui not mp_limb_t.
11506
11507	* tune/README: Misc updates including sparc32/v9 smoothness, low res
11508	timebase, and mpn_add_n operand overlaps.
11509	* tune/many.pl: Add udiv.asm support.
11510
11511	* gmp.texi (Build Options): A couple of --build better as --host.
11512	(Known Build Problems, Notes for Package Builds): Add DESTDIR problem.
11513	(Compatibility with older versions): Compatible with 4.x versions.
11514	(Converting Integers): Remove mpz_get_ui + mpz_tdiv_q_2exp decompose.
11515	(Integer Import and Export): New section.
11516	(Miscellaneous Integer Functions): Clarify mpz_sizeinbase returns 1
11517	for operand of 0.
11518	(Language Bindings): Add GNU Pascal.
11519	(Low-level Functions): Add GMP_NUMB_MAX.
11520
11521	* tests/mpz/t-import.c, tests/mpz/t-export.c, tests/mpz/t-get_d.c:
11522	New tests.
11523	* tests/mpz/Makefile.am: Add them.
11524
11525	* mpz/import.c, mpz/export.c: New files.
11526	* Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
11527
11528	* gmp-h.in, gmp-impl.h (GMP_NUMB_MAX): Move to gmp.h.
11529	* gmp-impl.h (CNST_LIMB): Add cast to mp_limb_t to ensure unsigned.
11530	(CRAY_Pragma, MPN_REVERSE, MPN_BSWAP, MPN_BSWAP_REVERSE,
11531	ASSERT_ALWAYS_LIMB, ASSERT_ALWAYS_MPN): New macros.
11532	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS_MPN.
11533
115342002-05-07  Torbjorn Granlund  <tege@swox.com>
11535
11536	* mpz/aors_ui.h: Nailify.
11537
11538	* tests/mpz/t-addsub.c: New file.
11539	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-addsub.
11540
11541	* mpz/ui_sub.c: New file.
11542	* mpz/Makefile.am (libmpz_la_SOURCES): Add ui_sub.c.
11543	* Makefile.am (MPZ_OBJECTS): Ditto.
11544	* gmp-h.in (mpz_ui_sub): Add declaration.
11545
11546	* gmp-impl.h (MPZ_REALLOC): Rewrite to allow the use of _mpz_realloc
11547	return value.
11548
11549	* gmp-h.in (mpn_pow_1): Add declaration.
11550
11551	* mpn/generic/pow_1.c: Handle exp <= 1.  Reverse rp/tp parity scheme
11552	for bn == 1 arm.
11553
11554	* Rename MP_LIMB_T_HIGHBIT => GMP_LIMB_HIGHBIT.
11555
115562002-05-06  Torbjorn Granlund  <tege@swox.com>
11557
11558	* demos/pexpr.c (main): Don't call mpz_sizeinbase with negative base.
11559
11560	* randraw.c (lc): Remove an unused variable.
11561
11562	* mpn/generic/get_str.c: Clarify an algorithm description.
11563
11564	* tests/mpf/t-trunc.c: Nailify.
11565	* tests/mpf/t-set_si.c: Disable for nails.
11566
11567	* mpf/cmp_si.c: Nailify.
11568	* mpf/cmp_ui.c: Nailify.
11569	* mpf/div.c: Nailify.
11570	* mpf/div_2exp.c: Nailify.
11571	* mpf/div_ui.c: Nailify.
11572	* mpf/eq.c: Nailify.
11573	* mpf/get_d.c: Nailify.
11574	* mpf/get_d_2exp.c: Nailify.
11575	* mpf/get_si.c: Nailify.
11576	* mpf/get_str.c: Nailify.
11577	* mpf/get_ui.c: Nailify.
11578	* mpf/mul_2exp.c: Nailify.
11579	* mpf/random2.c: Nailify.
11580	* mpf/set_q.c: Nailify.
11581	* mpf/set_si.c: Nailify.
11582	* mpf/set_str.c: Nailify.
11583	* mpf/set_ui.c: Nailify.
11584	* mpf/sub.c: Nailify.
11585	* mpf/ui_div.c: Nailify.
11586	* mpf/ui_sub.c: Nailify.
11587	* mpf/urandomb.c: Nailify.
11588
11589	* gmp-impl.h (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Nailify.
11590
11591	* mpz/get_si.c: Misc variable name changes.
11592
11593	* mpf/fits_u.h: Rewrite - nailify.
11594	* mpf/fits_s.h: Likewise.
11595
11596	* mpz/mod.c: Disambiguate if-statament with extra {}.
11597
11598	* mpf/int_p.c: Fix type of size variables.
11599	* mpf/get_ui: Likewise.
11600	* mpf/get_si: Likewise.
11601	* mpq/equal.c: Likewise.
11602	* mpq/get_d.c: Likewise.
11603	* mpz/cmp_d.c: Likewise.
11604	* mpz/cmpabs_d.c: Likewise.
11605	* mpz/divis_2exp.c: Likewise.
11606	* mpz/kronuz.c: Likewise.
11607	* mpz/kronzu.c: Likewise.
11608	* mpz/kronzs.c: Likewise.
11609	* mpz/kronsz.c: Likewise.
11610	* mpz/scan0.c: Likewise.
11611	* mpz/scan1.c: Likewise.
11612	* mpz/tstbit.c: Likewise.
11613	* mpz/cong_2exp.c: Likewise.
11614	* mpz/divis.c: Likewise.
11615
116162002-05-04  Torbjorn Granlund  <tege@swox.com>
11617
11618	* mpn/generic/gcd.c: Additional nailify changes.
11619
116202002-05-04  Kevin Ryde  <kevin@swox.se>
11621
11622	* gmp-h.in (__GNU_MP_VERSION): Set to 4.1.
11623	* Makefile.am (-version-info): Bump for new release.
11624
116252002-04-30  Torbjorn Granlund  <tege@swox.com>
11626
11627	* mpn/generic/divrem_1.c: Additional nailify changes.
11628	* mpn/generic/mod_1.c: Likewise.
11629
11630	* tests/mpq/t-get_d.c: Print floats with all 16 digits.
11631
11632	* mpq/get_d.c: Nailify.
11633
11634	* tests/mpq/t-set_f.c: Disable for nails.
11635
11636	* mpz/get_d.c: Nailify.
11637
11638	* gmp-impl.h (LIMBS_PER_DOUBLE, MP_BASE_AS_DOUBLE): Nailify.
11639
11640	* gmp-h.in (__GMPZ_FITS_UTYPE_P): Cast maxval to before shifting it.
11641
11642	* extract-dbl.c: Nailify.
11643
116442002-04-29  Torbjorn Granlund  <tege@swox.com>
11645
11646	* mpq/md_2exp.c (mord_2exp): Nailify.
11647
11648	* mpq/cmp_ui.c: Nailify.
11649
11650	* mpq/cmp.c (mpq_cmp): Nailify.
11651
11652	* mpn/generic/gcd.c: Nailify.  GNUify code layout.
11653
11654	* mpn/generic/gcdext.c: Nailify.  Misc changes.
11655
11656	* tests/mpz/t-sqrtrem.c: Let argv[1] mean # of repetitions.
11657	* tests/mpz/t-gcd.c: Likewise.
11658
11659	* mpz/gcd.c: Nailify.
11660
11661	* mpn/generic/random.c: Nailify.
11662
11663	* gmp-impl.h (modlimb_invert): Nailify.
11664
116652002-04-27  Torbjorn Granlund  <tege@swox.com>
11666
11667	* mpn/generic/gcdext.c (div2): Remove qh parameter.
11668	(mpn_gcdext): Streamline double-limb code.
11669	Move GCDEXT_THRESHOLD check to after initial division.
11670
116712002-04-27  Kevin Ryde  <kevin@swox.se>
11672
11673	* gmp-impl.h (JACOBI_MOD_OR_MODEXACT_1_ODD): Allow for odd
11674	GMP_NUMB_BITS.
11675
11676	* tune/time.c (sgi_works_p): Allow for 64-bit counter, and fix
11677	SGI_CYCLECNTR_SIZE handling.
11678
11679	* demos/expr/exprfr.c: Add nan and inf constants.
11680	* demos/expr/t-expr.c: Exercise them.
11681
116822002-04-26  Torbjorn Granlund  <tege@swox.com>
11683
11684	* mpz/cmp_ui.c: Fix overflow conditions for nails.
11685
11686	* gmp-h.in (mpz_get_ui): Fix typo from last change.
11687
11688	* mpz/n_pow_ui.c: Adjust allocation for nails.
11689	(GMP_NUMB_HALFMAX): Renamed from MP_LIMB_T_HALFMAX.
11690	Fix umul_ppmm invocation for for nails.
11691
116922002-04-24  Torbjorn Granlund  <tege@swox.com>
11693
11694	* mpn/generic/gcdext.c: Simplify by using mpn_tdiv_qr instead of
11695	mpn_divmod.
11696
116972002-04-24  Kevin Ryde  <kevin@swox.se>
11698
11699	* configure.in (*-*-cygwin*): Give a sensible default command line
11700	limit, to avoid blowups reported by Jim Fougeron on windows 9x.
11701	(--enable-nails): Make the default 2, since mp_bases has data for that.
11702
11703	* mpfr/mpfr-math.h (__mpfr_nan): Use a "double" for the bytes, to
11704	avoid a mis-conversion on alpha gcc 3.0.2.
11705	(_MPFR_INFP_BYTES, _MPFR_INFM_BYTES): Should be a zero mantissa.
11706
117072002-04-23  Torbjorn Granlund  <tege@swox.com>
11708
11709	* mpz/dive_ui.c: Fix typo.
11710
11711	* mpz/fits_s.h: Rewrite.
11712
11713	* mpz/jacobi.c: Nailify.
11714	* mpz/kronuz.c: Additional nailify changes.
11715	* mpz/kronsz.c: Likewise.
11716
117172002-04-23  Kevin Ryde  <kevin@swox.se>
11718
11719	* demos/expr/Makefile.am (LDADD): Add $(LIBM) for the benefit of mpfr.
11720
11721	* mpz/divis_ui.c, mpz/cong_ui.c: Nailify.
11722	* mpn/generic/bdivmod.c, mpz/divexact.c, mpz/dive_ui.c: Nailify.
11723	* mpn/generic/sb_divrem_mn.c, mpn/generic/divrem.c,
11724	mpn/generic/divrem_2.c: Nailify ASSERTs.
11725	* mpn/x86/k6/mmx/logops_n.asm, mpn/x86/k6/mmx/com_n.asm: Nailify.
11726	* mpz/inp_raw.c, mpz/out_raw.c: Nailify.
11727	* mpz/kronzu.c, mpz/kronuz.c, mpz/kronzs.c, mpz/kronsz.c: Nailify.
11728	* mpn/generic/divis.c, mpz/cong.c, mpz/cong_2exp.c: Nailify.
11729	* gmp-impl.h (NEG_MOD): Nailify.
11730
11731	* gmp-impl.h, mpn/mp_bases.c: Add back GMP_NUMB_BITS==30 bases data.
11732
11733	* mpfr/get_d.c: Patch from Paul to avoid problem with constant folding
11734	in gcc on OSF.
11735
11736	* mpn/lisp/gmpasm-mode.el: Remove mention of defunct LF macro.
11737
117382002-04-22  Torbjorn Granlund  <tege@swox.com>
11739
11740	* demos/pexpr.c: Handle "binomial" operator.
11741
11742	* mpz/cmp_ui.c: Move assignments of `up' out of conditionals.
11743
11744	* mpn/generic/gcdext.c: Fix fencepost error in STAT code.
11745
11746	* gmp-impl.h (mpn_com_n): Nailify.
11747
11748	* tests/mpz/t-cdiv_ui.c: New file.
11749	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-cdiv_ui.
11750	* mpz/cdiv_qr_ui.c: Nailify.
11751	* mpz/cdiv_q_ui.c: Nailify.
11752	* mpz/cdiv_r_ui.c: Nailify.
11753	* mpz/cdiv_ui.c: Nailify.
11754
11755	* tests/misc/t-printf.c (CHECK_N): Add cast to allow `char' to be an
11756	unsigned type.
11757	* tests/misc/t-scanf.c: Likewise.
11758
11759	* mpz/mul_i.h: Rework nails code to handle parameter overlap.
11760
11761	* tests/mpz/t-set_f.c: Disable for nails.
11762
117632002-04-21  Torbjorn Granlund  <tege@swox.com>
11764
11765	* mpz/set_si.c: Add cast to support LONG_LONG_LIMB.
11766	* mpz/iset_si.c: Likewise.
11767
11768	* mpz/bin_ui.c: Nailify.
11769	* mpz/bin_uiui.c: Nailify.
11770
11771	* mpz/cmpabs_ui.c: Nailify.
11772
11773	* tests/mpz/t-aorsmul.c: Nailify.
11774	* mpz/aorsmul_i.c (mpz_addmul_ui, mpz_submul_ui): Nailify better.
11775
117762002-04-20  Torbjorn Granlund  <tege@swox.com>
11777
11778	* tests/mpz/t-fdiv_ui.c: Check mpz_fdiv_ui.
11779	* tests/mpz/t-tdiv_ui.c: Check mpz_tdiv_ui.
11780
11781	* mpz/tdiv_ui.c: Rewrite nails code.
11782	* mpz/fdiv_ui.c: Nailify.
11783
11784	* tests/mpz/t-tdiv_ui.c: Check returned remainders.
11785	* tests/mpz/t-fdiv_ui.c: Merge in recent t-tdiv_ui changes.
11786
11787	* mpz/tdiv_q_ui.c: Remove spurious TMP_* calls.
11788
11789	* mpz/fdiv_qr_ui.c: Nailify.
11790	* mpz/fdiv_q_ui.c: Nailify.
11791	* mpz/fdiv_r_ui.c: Nailify.
11792
11793	* mpz/get_si.c: Misc nailify changes to shut up compiler warnings.
11794
11795	* mpz/ui_pow_ui.c: Fix typo in last change.
11796
117972002-04-20  Kevin Ryde  <kevin@swox.se>
11798
11799	* tests/misc/t-printf.c, tests/misc/t-scanf.c: Check all %n types.
11800
11801	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/p6/mmx/divrem_1.asm
11802	(mpn_preinv_divrem_1): New entrypoint.
11803	(mpn_divrem_1): Avoid a branch when testing high<divisor.
11804	* mpn/asm-defs.m4: Add define_mpn(preinv_divrem_1).
11805	* configure.in: Allow divrem_1.asm to provide mpn_preinv_divrem_1.
11806
11807	* gmp-impl.h [nails]: Add #undefs of MUL_KARATSUBA_THRESHOLD etc, to
11808	override CPU gmp-mparam.h.  Remove JACOBI_BASE_METHOD override since
11809	it's nails-neutral.
11810
11811	* tests/mpn/t-mp_bases.c: New file.
11812	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
11813	* tests/t-constants.c: Move MP_BASES constants checks to it.
11814
11815	* mpn/mp_bases.c: Fix big_base_inverted values for nails.
11816	* gmp-impl.h (MP_BASES_BIG_BASE_INVERTED_10,
11817	MP_BASES_NORMALIZATION_STEPS_10): Fix nails values.
11818	(MP_BASES_*): Remove GMP_NUMB_BITS == 30 data.
11819
11820	* mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm: Add
11821	NAILS_SUPPORT indicators.
11822
11823	* configure.in: Grep for NAILS_SUPPORT in cpu-specific code, and look
11824	in "nails" subdirectories, print path used.
11825	* mpn/asm-defs.m4 (NAILS_SUPPORT): New macro.
11826
11827	* mpfr/mpfr-test.h: Include config.h, for the benefit of test programs
11828	not using gmp-impl.h.
11829
118302002-04-19  Torbjorn Granlund  <tege@swox.com>
11831
11832	* tests/mpz/t-scan.c: Nailify.
11833
11834	* mpz/tdiv_qr_ui.c: Nailify.
11835	* mpz/tdiv_q_ui.c: Nailify.
11836	* mpz/tdiv_r_ui.c: Nailify.
11837	* mpz/tdiv_ui.c: Nailify.
11838
11839	* mpz/cmp_ui.c: Nailify.
11840
11841	* mpz/ui_pow_ui.c: Misc nailify changes to shut up compiler warnings.
11842
11843	* mpz/scan0.c: Nailify.
11844	* mpz/scan1.c: Nailify.
11845
11846	* tests/mpz/t-sizeinbase.c (mpz_fake_bits): Nailify.
11847
118482002-04-18  Torbjorn Granlund  <tege@swox.com>
11849
11850	* mpz/aorsmul_i.c: Nailify.
11851
11852	* mpz/cmp_si.c: Nailify (botched).
11853
11854	* mpz/ui_pow_ui.c: Nailify.
11855
11856	* gmp-h.in (__GMPZ_FITS_UTYPE_P): Nailify.
11857
11858	* mpz/fits_s.h: Nailify.
11859
11860	* tests/mpz/bit.c (check_tstbit): Nailify.
11861
11862	From Paul Zimmermann:
11863	* mpn/generic/sqrtrem.c: Nailify.
11864
11865	* mpz/n_pow_ui.c: Nailify.
11866
11867	* mpz/cfdiv_r_2exp.c: Nailify.
11868
11869	* randraw.c (lc): Undo: Let mpn_rshift put result in place to avoid
11870	extra MPN_COPY.
11871
118722002-04-17  Torbjorn Granlund  <tege@swox.com>
11873
11874	* mpz/clrbit.c: Add two GMP_NUMB_MASK masks after addition.
11875
11876	* mpn/generic/random2.c (LOGBITS_PER_BLOCK): Decrease to 4.
11877
11878	* gmp-impl.h (nail DIV_DC_THRESHOLD): Decrease to 50 to allow fast
11879	division.
11880
11881	* mpn/generic/random2.c: Nailify.
11882
11883	* mpz/fac_ui.c: Nailify.
11884
11885	* mpz/mul_i.h: #if ... #endif code block to shut up gcc warnings.
11886
11887	* mpn/generic/sqrtrem.c: Adopt to GNU coding standards.
11888	(mpn_dc_sqrtrem): New name for mpn_dq_sqrtrem.
11889	Partial nailification.
11890
11891	* configure.in: As a temporary hack, clear extra_functions for nails
11892	builds.
11893
11894	* gmp-h.in (mpz_get_ui): #if ... #endif else code block to shut up gcc
11895	warnings.
11896
118972002-04-17  Kevin Ryde  <kevin@swox.se>
11898
11899	* texinfo.tex: Update to 2002-03-26.08 per texinfo 4.2.
11900	* gmp.texi: Must have @top in @ifnottex (or @contents doesn't come out
11901	in one run).
11902
11903	* mpn/generic/scan0.c, mpn/generic/scan1.c: Nailify.
11904
11905	* tests/mpn/t-scan.c: New file.
11906	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
11907
11908	* tests/refmpn.c, tests/tests.h (refmpn_tstbit): Use unsigned long for
11909	bit index.
11910	(refmpn_setbit, refmpn_clrbit, refmpn_scan0, refmpn_scan1): New
11911	functions.
11912
11913	* mpfr/cmp_ui.c (mpfr_cmp_si_2exp): Fix b==0 i!=0 case.
11914
119152002-04-17  Gerardo Ballabio <gerardo.ballabio@unimib.it>
11916
11917	* gmpxx.h, mpfrxx.h: Remove mpfr_class bool combinations, remove
11918	mpfr_class::get_str2, use mp_rnd_t for rounding modes, use
11919	8*sizeof(double) for mpfr_t's holding doubles.
11920
119212002-04-17  Torbjorn Granlund  <tege@swox.com>
11922
11923	* mpz/powm.c: Nailify.
11924	* mpz/powm_ui.c: Nailify.
11925
119262002-04-16  Torbjorn Granlund  <tege@swox.com>
11927
11928	* mpz/hamdist.c: Nailify.
11929	* tests/misc.c (urandom): Nailify.
11930
11931	* mpz/get_si.c: Nailify.
11932	* gmp-h.in (mpz_get_ui): Nailify.  Streamline (and probably upset
11933	memory checkers).
11934
11935	* gmp-impl.h (mp_bases[10] values): Add versions for GMP_NUMB_BITS
11936	being 28, 60, and 63.
11937	* mpn/mp_bases.c: Add tables for GMP_NUMB_BITS being 28, 60, and 63.
11938
11939	* mpz/iset_si.c: Nailify.
11940	* mpz/iset_ui.c: Nailify
11941
11942	* tests/mpz/convert.c (main): Print test number in error message.
11943
11944	* mpn/generic/get_str.c (mpn_sb_get_str): Shift up `frac' into nails
11945	field after bignum division.
11946
119472002-04-16  Kevin Ryde  <kevin@swox.se>
11948
11949	* gmp-h.in, gmp-impl.h (GMP_NAIL_MASK): Move to gmp.h.
11950
11951	* gmp.texi: Use @documentdescription and @copying, per texinfo 4.2.
11952	(Low-level Functions): Clarify mpn_gcd overlap requirements, rewrite
11953	mpn_set_str description, add nails section.
11954	(C++ Interface General): Remove bool from types that mix with classes.
11955	(Language Bindings): Add STklos, GNU Smalltalk, Regina.
11956	(Binary to Radix, Radix to Binary): Describe new code.
11957	(Assembler Cache Handling): More notes, mostly by Torbjorn.
11958
11959	* macos/configure (%vars): Remove __GMP from substitutions, per change
11960	to main configure.
11961
11962	* mpn/generic/dive_1.c: Nailify.
11963	* mpn/generic/mode1o.c: Nailify, remove bogus ASSERT in commented-out
11964	alternate implementation.
11965	* gmp-impl.h (SUBC_LIMB): New macro.
11966
11967	* tests/devel/try.c (validate_divexact_1): Correction to compare.
11968	(udiv_qrnnd): New testing.
11969	(SHIFT_LIMIT): Nailify.
11970	(-b): New option, remove spurious "H" from getopt string.
11971
11972	* mpz/clrbit.c: Nailify.
11973	* tests/mpz/t-hamdist.c: Nailify.
11974	* gmp-impl.h (MPN_FIB2_SIZE): Nailify.
11975	(PP): Nailify conditionals.
11976	* tests/mpz/t-fib_ui.c (MPZ_FIB_SIZE_FLOAT): Nailify.
11977
11978	* configure.in, acinclude.m4: Establish GMP_NAIL_BITS and
11979	GMP_LIMB_BITS for gmp-h.in configure tests.
11980
11981	* mpfr/*, configure.in: Update to final mpfr 2.0.1.
11982	* mpfr/acinclude.m4 (MPFR_CONFIGS): Use $host, not uname stuff.
11983	* mpfr/tests/tout_str.c: Patch from Paul for denorm fprintf tests.
11984
119852002-04-15  Torbjorn Granlund  <tege@swox.com>
11986
11987	* mpn/generic/divrem_1.c (EXTRACT): Remove.
11988
11989	* tests/mpz/t-tdiv_ui.c (dump_abort): Accept argument for error string.
11990
11991	* mpz/rrandomb.c: Nailify.  Needs further work.
11992
11993	* mpn/generic/mod_1.c: Nailify.
11994
11995	* gmp-impl.h: Set various *_THRESHOLD values to be used for nails to
11996	avoid not yet qualified algorithms.
11997	(MPZ_CHECK_FORMAT): Check that nail part is zero.
11998
11999	* tests/mpz/t-mul.c (main): Test squaring even for huge operands.
12000	(base_mul): Nailify.
12001	(dump_abort): Accept argument for error string.  Print product
12002	difference.
12003
12004	* mpn/generic/set_str.c: Nailify.
12005
12006	* gmp-h.in (__GMPN_ADD, __GMPN_SUB): Nailify.
12007
120082002-04-14  Torbjorn Granlund  <tege@swox.com>
12009
12010	* randraw.c (lc): Return non-nonsense return value for seed=0 case.
12011	Check for m2exp being non-zero early; remove all other tests of m2exp.
12012	Remove redundant MPN_ZERO call.
12013	Let mpn_rshift put result in place to avoid extra MPN_COPY.
12014	Remove confusing comment before function `lc' describing BBS algorithm.
12015	Misc simplification and cleanups.
12016	Nailify.  Needs further work.
12017
12018	* mpz/set_si.c: Nailify.
12019	* mpz/set_ui.c: Nailify.
12020	* mpz/mul_i.h: Nailify.
12021
12022	* tests/mpz/t-mul_i.c: Actually test _ui routines.  Add some more test
12023	values.
12024
12025	* mpn/generic/mul_n.c: Finish nailifying toom3 code.
12026
120272002-04-13  Kevin Ryde  <kevin@swox.se>
12028
12029	* mpfr/*: Update to another new mpfr 2.0.1.
12030	* configure.in, Makefile.am, mpfr/Makefile.am, mpfr/tests/Makefile.am:
12031	Use MPFR_CONFIGS macro, establish separate MPFR_CFLAGS for mpfr build.
12032
12033	* mpfr/tests/Makefile.am: Correction to convenience rule for libmpfr.a.
12034
120352002-04-11  Kevin Ryde  <kevin@swox.se>
12036
12037	* mpfr/set_q.c: gmp-impl.h before mpfr.h to avoid _PROTO redefine.
12038
12039	* mpfr/*, configure.in: Update to new mpfr 2.0.1.
12040
12041	* tests/refmpn.c (refmpn_udiv_qrnnd, refmpn_divmod_1c_workaround):
12042	Fixes for nails.
12043
12044	* tests/t-constants.c (MODLIMB_INVERSE_3): Nailify tests.
12045	(MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): Only
12046	check these under USE_PREINV_DIVREM_1.
12047	* tests/t-modlinv.c: Nailify tests.
12048
120492002-04-11  Gerardo Ballabio <gerardo.ballabio@unimib.it>
12050
12051	* gmpxx.h: Remove bool combinations, remove mpf_class::get_str2, only
12052	need <iosfwd> now.
12053
120542002-04-11  Torbjorn Granlund  <tege@swox.com>
12055
12056	* mpn/generic/diveby3.c: Nailify.
12057	* gmp-impl.h (MODLIMB_INVERSE_3): Nailify.
12058
12059	* mpn/generic/mul_n.c: Nailify Toom3 code.
12060
120612002-04-10  Kevin Ryde  <kevin@swox.se>
12062
12063	* gmp-impl.h (MPN_KARA_MUL_N_MINSIZE, MPN_KARA_SQR_N_MINSIZE): Set to
12064	3, as needed by nails case.
12065
12066	* mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails]: Fix vl
12067	assert, add rp,n and up,n asserts.
12068
12069	* mpfr/Makefile.am: Add new mpfr-math.h, install mpf2mpfr.h.
12070
120712002-04-10  Torbjorn Granlund  <tege@swox.com>
12072
12073	* mpn/generic/divrem_1.c: Nailify.  Update mp_size_t variables to use
12074	`n' suffix instead of `size' suffix.
12075	* mpn/generic/divrem_2.c: Likewise.
12076	* mpn/generic/sb_divrem_mn.c: Nailify.
12077	* mpn/generic/tdiv_qr.c: Nailify.
12078	(SHL): Remove silly macro.
12079
12080	* mpn/generic/mul_n.c (mpn_kara_mul_n): Replace open-coded increment by
12081	mpn_incr_u call.  Handle nails in ws[n] increment.
12082	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Likewise.
12083
12084	* gmp-h.in (GMP_NUMB_MASK): New #define.
12085	(__GMPN_AORS_1): Add version for nails.
12086
12087	* gmp-impl.h (GMP_NUMB_MASK): Comment out, now in gmp.h.
12088	(mpn_incr_u): Don't assume `incr' is non-zero.
12089	(mpn_decr_u): Similarly.
12090
120912002-04-09  Kevin Ryde  <kevin@swox.se>
12092
12093	* mpfr/*, configure.in: Update to mpfr 2.0.1.
12094
12095	* tests/refmpn.c (refmpn_mul_1c, lshift_make): Corrections for nails.
12096	* tssts/refmpn.c, tests/tests.h (refmpn_cmp_allowzero): New function.
12097
12098	* mpn/generic/mul_1.c [nails]: Fix vl assert, add {up,n} assert.
12099
12100	* mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
12101	mpn/pa32/hppa1_1/pa7100/submul_1.asm: Rename "size" define, to avoid
12102	ELF .size directive.  Reported by LaMont Jones.
12103
12104	* tests/mpz/t-set_si.c: Add nails support.
12105
121062002-04-05  Torbjorn Granlund  <tege@swox.com>
12107
12108	* gmp-impl.h: Replace nail mpn_incr_u, mpn_decr_u with faster versions.
12109	(mp_bases[10] values): Check GMP_NUMB_BITS instead of BITS_PER_MP_LIMB.
12110	Add GMP_NUMB_BITS == 30 version.
12111	(__gmp_doprnt, etc): Remove parameter names.
12112
12113	* mpn/generic/mul_n.c: Nailify Karatsuba code.
12114	* mpn/generic/get_str.c: Nailify.
12115	* mpn/generic/sqr_basecase.c: Nailify.
12116	* mpn/generic/lshift.c: Nailify.
12117	* mpn/generic/rshift.c: Likewise.
12118	* mpn/generic/add_n.c: Nailify.  Revamp non-nail code.
12119	* mpn/generic/sub_n.c: Likewise.
12120	* mpn/generic/mul_1.c: Likewise.
12121	* mpn/generic/addmul_1.c: Likewise.
12122	* mpn/generic/submul_1.c: Likewise.
12123
121242002-04-02  Kevin Ryde  <kevin@swox.se>
12125
12126	* gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE) [powerpc]:
12127	Corrections to constraints, and restrict to bigendian.
12128
121292002-03-31  Kevin Ryde  <kevin@swox.se>
12130
12131	* tests/mpz/dive.c: Better diagnostics.
12132
12133	* tests/devel/try.c (mpn_get_str, mpn_umul_ppmm_r): New tests.
12134
12135	* tests/misc.c, tests/tests.h (byte_diff_lowest, byte_diff_highest):
12136	New functions.
12137
12138	* tests/t-bswap.c: New file.
12139	* tests/Makefile.am (check_PROGRAMS): Add it.
12140
12141	* tests/mpn/t-aors_1.c, tests/mpn/t-iord_u.c: Add nails support.
12142
12143	* gmp-impl.h (MPN_IORD_U) [x86]: Eliminate unnecessary jiord and iord,
12144	rename "n" to incr per generic versions, restrict to nails==0.
12145	(mpn_incr_u, mpn_decr_u): Add nails support.
12146	(GMP_NAIL_LOWBIT, GMP_NUMB_MAX): New macros.
12147
12148	* tests/trace.c, tests/tests.h (byte_trace, byte_tracen): New
12149	functions.
12150	* tests/trace.c: Handle NULL operands.
12151
12152	* tests/refmpn.c, tests/devel/try.c, tune/speed.c: Add preliminary
12153	nail support.
12154
12155	* tests/refmpn.c, test/tests.h (byte_overlap_p, refmpn_equal_anynail,
12156	refmpn_umul_ppmm_r, refmpn_udiv_qrnnd_r, refmpn_get_str,
12157	refmpn_bswap_limb, refmpn_random, refmpn_random2, refmpn_bswap_limb):
12158	New functions.
12159
12160	* gmp-impl.h, tests/refmpn.c (ASSERT_LIMB): Renamed from
12161	ASSERT_MP_LIMB_T.
12162
12163	* mpn/x86/*/*.asm, mpn/powerpc32/*/*.asm, mpn/powerpc64/*/*.asm: Put
12164	speeds after the copyright notice, so as to keep that clear.
12165
121662002-03-29  Kevin Ryde  <kevin@swox.se>
12167
12168	* configure.in (powerpc*-*-aix*): Correction to xlc -qarch selection,
12169	for 32-bit mode.
12170
121712002-03-28  Torbjorn Granlund  <tege@swox.com>
12172
12173	* mpn: Fix spacing in many files.
12174
12175	* mpn/generic/aorsmul_1.c: Split into addmul_1.c and submul_1.c.
12176	* mpn/generic/aors_n.c: Split into add_n.c and sub_n.c.
12177
12178	* mpn/pa64/add_n.asm: Trim another 0.125 cycle/limb.  Fix a comment.
12179	* mpn/pa64/sub_n.asm: Likewise.
12180
12181	* mpn/pa64/mul_1.asm: Change comclr, comb to proper forms cmpclr, cmpb.
12182	* mpn/pa64/addmul_1.asm: Likewise.
12183	* mpn/pa64/submul_1.asm: Likewise.
12184
121852002-03-28  Kevin Ryde  <kevin@swox.se>
12186
12187	* gmp.texi (Converting Integers): Fix type of exp in mpz_get_d_2exp,
12188	reported by epl@unimelb.edu.au.
12189	(References): Update Burnikel and Ziegler URL, reported by Keith
12190	Briggs.
12191
12192	* gmp-h.in, mp-h.in, configure.in, acinclude.m4: Remove __GMP from
12193	AC_SUBSTs, since autoconf says leading "_" in makefile variables is
12194	not portable.
12195
12196	* demos/expr/run-expr.c: Declare optarg, optind, opterr if necessary.
12197	* configure.in, demos/expr/expr-config-h.in: Configs for this.
12198
121992002-03-27  Torbjorn Granlund  <tege@swox.com>
12200
12201	* mpn/Makefile.am (TARG_DIST): Remove pa64w and hppa, add pa32.
12202
12203	* configure.in (path_20w): Remove pa64w.
12204
12205	* mpn/pa64/udiv_qrnnd.asm: Tweak for PA8000 performance comparative to
12206	that on PA8500.
12207
122082002-03-26  Torbjorn Granlund  <tege@swox.com>
12209
12210	* mpn/pa32: New name for mpn/hppa.
12211	* configure.in: Corresponding changes.
12212
12213	* mpn/pa64/umul_ppmm.asm: New file, generalized for both 2.0N and 2.0W.
12214	* mpn/pa64/umul_ppmm.S: Remove.
12215
12216	* mpn/pa64/udiv_qrnnd.asm: Generalize for both 2.0N and 2.0W.
12217	* mpn/pa64w/udiv_qrnnd.asm: Remove.
12218
122192002-03-26  Kevin Ryde  <kevin@swox.se>
12220
12221	* mpfr/tests/tdiv.c, mpfr/tests/tui_div.c: Don't depend on nan and inf
12222	handling in "double", for the benefit of alpha.
12223
12224	* configure (hppa2.0w): Set path to "pa64w pa64".
12225
12226	* acinclude.m4, configure.in (GMP_C_INLINE): New macro.
12227	* acinclude.m4 (GMP_H_EXTERN_INLINE): Use it, and fix "yes" handling.
12228
122292002-03-25  Torbjorn Granlund  <tege@swox.com>
12230
12231	* mpn/pa64w/add_n.s: Remove.
12232	* mpn/pa64w/sub_n.s: Remove.
12233	* mpn/pa64w/lshift.s: Remove.
12234	* mpn/pa64w/rshift.s: Remove.
12235	* mpn/pa64w/mul_1.S: Remove.
12236	* mpn/pa64w/addmul_1.S: Remove.
12237	* mpn/pa64w/submul_1.S: Remove.
12238	* mpn/pa64w/sqr_diagonal.asm: Remove.
12239
12240	* mpn/pa64/mul_1.asm: New file with twice faster code; generalized
12241	for both 2.0N and 2.0W.
12242	* mpn/pa64/submul_1.asm: Likewise.
12243	* mpn/pa64/mul_1.S: Remove.
12244	* mpn/pa64/submul_1.S: Remove.
12245
12246	* mpn/pa64/sqr_diagonal.asm: Generalize for both 2.0N and 2.0W.
12247
12248	* mpn/pa64/add_n.asm: New file, generalized for both 2.0N and 2.0W.
12249	* mpn/pa64/sub_n.asm: Likewise.
12250	* mpn/pa64/lshift.asm: Likewise.
12251	* mpn/pa64/rshift.asm: Likewise.
12252	* mpn/pa64/add_n.s: Remove.
12253	* mpn/pa64/sub_n.s: Remove.
12254	* mpn/pa64/lshift.s: Remove.
12255	* mpn/pa64/rshift.s: Remove.
12256
122572002-03-24  Kevin Ryde  <kevin@swox.se>
12258
12259	* gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE): New macros.
12260	* mpz/inp_raw.c, mpz/out_raw.c: Use them.
12261	* acconfig.h (HAVE_HOST_CPU): Add some powerpc types.
12262
12263	* mpn/powerpc32/750/com_n.asm: New file.
12264
12265	* mpfr/tests/tout_str.c: Disable random tests, since they fail on
12266	alphaev56-unknown-freebsd4.1 and do nothing by default.
12267
12268	* mpfr/tests/tsqrt.c: Don't depend on nan, inf or -0 in "double", for
12269	the benefit of alpha.
12270	* mpfr/sqrt.c: Clear nan flag on -0.
12271
12272	* demos/factorize.c: Use mpn_random() instead of random(), to avoid
12273	portability problems.
12274
12275	* demos/isprime.c (print_usage_and_exit): Declare as "void" to avoid
12276	warnings.
12277
12278	* demos/pexpr.c (setup_error_handler): Corrections to sigstack code.
12279
12280	* demos/calc/calc.y: Add some `;'s to make bison 1.34 happy.
12281
122822002-03-23  Torbjorn Granlund  <tege@swox.com>
12283
12284	* mpn/pa64/addmul_1.asm: New file with twice faster code; generalized
12285	for both 2.0N and 2.0W.
12286
122872002-03-22  Kevin Ryde  <kevin@swox.se>
12288
12289	* tune/time.c: Add SGI hardware counter measuring method, change some
12290	abort()s into ASSERT_FAIL()s.
12291
12292	* configure.in (AC_CHECK_HEADERS): Add fcntl.h and sys/syssgi.h.
12293	(AC_CHECK_FUNCS): Add syssgi.
12294
12295	* configure.in, mpfr/Makefile.am, mpfr/tests/Makefile.am: Use
12296	-mieee-with-inexact or -ieee_with_inexact for mpfr on alpha, so
12297	denorms work.
12298
12299	* mpfr/isinteger.c: Fix a memory leak.
12300
123012002-03-21  Torbjorn Granlund  <tege@swox.com>
12302
12303	* tune/speed.c (struct choice_t): Make `r' an mp_limb_t.
12304
123052002-03-21  Kevin Ryde  <kevin@swox.se>
12306
12307	* configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): Use an
12308	AH_VERBATIM and better explanation.
12309	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Similarly for the HAVE_DOUBLE
12310	constants.
12311
12312	* gmp.texi (Number Theoretic Functions): Clarify sign of GCD returned
12313	by mpz_gcdext.
12314
12315	* demos/pexpr.c, demos/pexpr-config-h.in, configure.in: Use an
12316	autoconf test for stack_t.
12317
12318	* configure.in, gmp-h.in, mp-h.in, macos/configure, tests/mpz/reuse.c,
12319	tests/mpf/reuse.c: Use __GMP_LIBGMP_DLL to enable windows declspec,
12320	don't require _WIN32 (etc), remove __GMP_LIBGMP_SHARED and
12321	__GMP_LIBGMP_STATIC.
12322
12323	* gmp-impl.h (mp_bases): Add __GMP_DECLSPEC, for the benefit of
12324	tests/t-constants.c.
12325
12326	* tune/many.pl, tune/speed.h: Remove suffix hack for back.asm.
12327
123282002-03-21  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
12329
12330	* mpfr/sin_cos.c (mpfr_sin_cos): New file.
12331	* mpfr/mpfr.h, mpfr/mpfr.texi, mpfr/Makefile.am: Add it.
12332	* mpfr/tan.c: Fix sign in 2nd and 4th quadrants.
12333
12334	* mpfr/log10.c: Fix hangs on certain inputs.
12335
123362002-03-20  Torbjorn Granlund  <tege@swox.com>
12337
12338	* demos/pexpr.c (setup_error_handler): Declare `s', the first
12339	sigaltstack parameter, using `stack_t' just on AIX.
12340
123412002-03-19  Torbjorn Granlund  <tege@swox.com>
12342
12343	* mpn/powerpc32/mul_1.asm: Use free caller-saves registers instead
12344	of the callee-saves r30 and r31.
12345
123462002-03-19  Kevin Ryde  <kevin@swox.se>
12347
12348	* tune/freq.c (freq_proc_cpuinfo): Recognise powerpc "clock", where
12349	previously got the wrong result from "bogomips".
12350
12351	* mpn/powerpc32/add_n.asm, mpn/powerpc32/sub_n.asm: Rewrite, faster on
12352	750, and smaller too.
12353	* mpn/powerpc32/*.asm: Use L(), add some measured speeds.
12354
12355	* longlong.h (count_trailing_zeros) [vax]: Add a version using ffs,
12356	but commented out.
12357
123582002-03-17  Kevin Ryde  <kevin@swox.se>
12359
12360	* tune/speed.c, tune/speed.h, tune/common.c, many.pl: Use optional
12361	".r" to specify operand overlaps for mpn_add_n, mpn_sub_n and logops.
12362	Remove mpn_add_n_inplace and mpn_add_n_self.
12363	* tune/many.pl: Fix MULFUNC_PROLOGUE parsing.
12364
12365	* gmp.texi (Known Build Problems): Note `make' problem with long
12366	libgmp.la dependencies list.
12367
12368	* printf/doprnt.c, scanf/doscan.c (%zn): Remove test of non-existent
12369	HAVE_SIZE_T, just use size_t unconditionally.
12370	* printf/doprnt.c (%zd etc): Fix 'z' type parsing.
12371	* tests/misc/t-printf.c, tests/misc/t-scanf.c: More tests.
12372
12373	* configure.in: Use AC_COPYRIGHT.
12374	Add m4_pattern_allow(GMP_MPARAM_H_SUGGEST).
12375
12376	* tune/Makefile.am (libdummy.la): Remove this, sqr_basecase.c already
12377	gets an ansi2knr rule from nodist_tuneup_SOURCES.
12378
12379	* longlong.h (count_leading_zeros) [pentiumpro gcc<3]: Test
12380	HAVE_HOST_CPU_i686 too.
12381
12382	* mpz/out_raw.c (HTON_LIMB_STORE): Fix a typo in big endian #if.
12383
123842002-03-14  Kevin Ryde  <kevin@swox.se>
12385
12386	* mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm,
12387	mpn/x86/k6/mmx/com_n.asm: Add nails support.
12388
12389	* texinfo.tex: Update to 2002-03-01.06 (per texinfo 4.1).
12390	* gmp.texi (@ma): Remove, @math does this now.
12391
12392	* mpfr/tests/reuse.c: Clear op1 and op2 flags only in their respective
12393	outer loops.
12394
12395	* configure.in (--enable-cxx): Correction to the default stated in the
12396	help string.
12397	(power*-*-aix*, not powerpc): Use aix.m4, don't run
12398	GMP_ASM_POWERPC_R_REGISTERS or use powerpc-defs.m4.
12399
124002002-03-13  Torbjorn Granlund  <tege@swox.com>
12401
12402	* mpn/sparc32/gmp-mparam.h: New file.
12403
124042002-03-13  Kevin Ryde  <kevin@swox.se>
12405
12406	* demos/expr/exprfr.c: More mpfr functions, corrections to agm, cos,
12407	sin, rename log2 constant to loge2 to make room for log2 function.
12408	* demos/expr/t-expr.c: More tests.
12409
12410	* mpz/inp_raw.c (NTOH_LIMB_FETCH) [generic 16bit]: Remove spurious "+".
12411
12412	* mpfr/acos.c: Avoid a memory leak for certain operands.
12413
12414	* acinclude.m4, configure.in (GMP_C_DOUBLE_FORMAT): New macro.
12415
12416	* acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
12417	GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
12418	Change ac_objext to OBJEXT, which is the documented variable.
12419
12420	* config.guess (powerpc*-*-*): Use #ifdef on constants POWER_630 etc
12421	in the AIX test, since old versions don't have them all.
12422
124232002-03-11  Kevin Ryde  <kevin@swox.se>
12424
12425	* configure.in (LIBC211): New AC_DEFINE, for mpfr.
12426
12427	* configure.in (mips*-*-*): Support ABI=o32 on irix 6, allow gcc 2.7.2
12428	to fall back on it, but detect it doesn't work with gcc 2.95.  Use
12429	single mips-defs.m4 for both mips32 and mips64.
12430	* acinclude.m4 (GMP_GCC_MIPS_O32): New macro.
12431	* mpn/mips32/mips-defs.m4: Renamed from mips.m4.
12432	* mpn/mips64/mips.m4: Remove (was a copy of mips32/mips.m4).
12433
12434	* mpn/powerpc32/750: New directory.
12435	* configure.in (powerpc740, powerpc750, powerpc7400): Use it.
12436	* mpn/powerpc32/750/gmp-mparam.h: New file.
12437
12438	* config.sub, gmp.texi (ultrasparc1): Remove this, just use plain
12439	"ultrasparc".
12440
124412002-03-10  Kevin Ryde  <kevin@swox.se>
12442
12443	* mpfr: Update to 20020301, except internal_ceil_exp2.c,
12444	internal_ceil_log2.c, internal_floor_log2.c renamed to i_ceil_exp2.c,
12445	i_ceil_log2.c, i_floor_log2.c to be unique in DOS 8.3.  And sqrtrem.c
12446	removed since no longer required.
12447	* mpfr/mpfr.texi: Fix some formatting.
12448	* mpfr/tests/reuse.c: Patch by Paul to fix test4 variable handling.
12449	* mpfr/sinh.c: Patch by Paul to fix err calculation when t==0.
12450	* mpfr/tests/tget_d.c: Disable until portability of rnd_mode.c can be
12451	sorted out.
12452
12453	* configure.in (powerpc*-*-*): Separate gcc and xlc cpu flags setups
12454	for clarity.
12455
12456	* longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]: New
12457	macros.
12458
124592002-03-07  Kevin Ryde  <kevin@swox.se>
12460
12461	* gmp.texi (Build Options): Note all the ultrasparcs accepted.
12462	(Language Bindings): Add Math::BigInt::GMP.
12463
12464	* config.sub (ultrasparc2i): New cpu type.
12465	* config.guess (sparc-*-*, sparc64-*-*): Add some exact CPU detection.
12466
124672002-03-05  Kevin Ryde  <kevin@swox.se>
12468
12469	* longlong.h (count_leading_zeros, count_trailing_zeros) [alphaev67,
12470	alphaev68]: Use ctlz and cttz insns (as per gcc longlong.h).
12471	(count_leading_zeros) [sparclite]: Fix parameter order (as per gcc
12472	longlong.h).
12473	* acconfig.h (HAVE_HOST_CPU_alphaev68): New define.
12474
12475	* config.guess [i?86-*-*]: Suppress error messages if compiler not
12476	found or test program won't run.
12477	[rs6000-*-*, powerpc-*-*]: Force code alignment for mfpvr test.
12478
124792002-03-04  Torbjorn Granlund  <tege@swox.com>
12480
12481	* mpn/generic/pow_1.c: New file.
12482
124832002-03-03  Kevin Ryde  <kevin@swox.se>
12484
12485	* gmp.texi (Build Options): Note compiler must be able to fully link,
12486	add alphapca57 and alphaev68, give a clearer example of MPN_PATH
12487	(Debugging): Add notes on valgrind.
12488	(C++ Formatted Output): Clarify mpf showbase handling, in particular
12489	note "00.4" in octal.
12490
12491	* printf/doprntf.c: Do a showbase on octal float fractions, for
12492	instance "00.4" where previously it gave "0.4".
12493	* tests/cxx/t-ostream.cc: Update.
12494
12495	* gmp-h.in, mp-h.in (__GMP_DECLSPEC, __GMP_DECLSPEC_XX): Test
12496	__WIN32__ for Borland C, reported by "delta trinity".
12497
12498	* gmp-h.in, mp-h.in: Use <cstddef> for size_t under C++, suggested by
12499	Hans Aberg some time ago.
12500	* gmp-h.in (<iosfwd>): Move to top of file for clarity.
12501
12502	* Makefile.am (libgmpxx_la_SOURCES): Use dummy.cc to force C++.
12503	(CXX_OBJECTS): Add osfuns$U.lo.
12504	* dummy.cc: New file.
12505	* cxx/Makefile.am (INCLUDES): Use __GMP_WITHIN_GMPXX.
12506	(libcxx_la_SOURCES): Add osfuns.cc.
12507	* gmp-h.in (__GMP_DECLSPEC_XX): New define, use it on libgmpxx funs.
12508	* gmp-impl.h: Add __GMP_DECLSPEC to libgmp functions used by libgmpxx.
12509
12510	* longlong.h (COUNT_TRAILING_ZEROS_TIME): Remove, no longer used.
12511
12512	* gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): Correction to
12513	__totbits for nails.
12514
12515	* gmp-impl.h (JACOBI_LS0): Test size before limb, to pacify valgrind.
12516	(JACOBI_0LS): Ditto, and fix parens around arguments.
12517
12518	* mpn/x86/x86-defs.m4 (call_mcount): Add a counter to make data labels
12519	unique, since simplified L() scheme no longer gives that effect.
12520	(notl_or_xorl_GMP_NUMB_MASK): New macro.
12521	Add m4_assert_numargs in a few places.
12522
12523	* configure.in (*sparc*): Fix cycle counter setups for ABI=64.
12524
125252002-02-28  Torbjorn Granlund  <tege@swox.com>
12526
12527	* mpn/vax/gmp-mparam.h: New file.
12528
125292002-02-28  Kevin Ryde  <kevin@swox.se>
12530
12531	* gmp-h.in (gmp_errno, gmp_version): Move into extern "C" block,
12532	reported by librik@panix.com.
12533
12534	* gmp-h.in, mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT):
12535	Use __declspec(dllexport) and __declspec(dllimport) on Borland.
12536	* gmp-h.in (_GMP_H_HAVE_FILE): Test __STDIO_H for Borland.
12537	Reported by "delta trinity".
12538
12539	* gmp-impl.h (va_copy): Fall back on memcpy, not "=".
12540
12541	* mpn/generic/pre_mod_1.c: Add a comment about obsolescence.
12542
12543	* tune/time.c (MICROSECONDS_P): Don't trust time differences of 1
12544	microsecond.
12545
12546	* tests/cxx/t-ostream.cc: Use "const char *" not just "char *" for
12547	test data strings, avoids warnings on Sun CC.
12548
125492002-02-27  Torbjorn Granlund  <tege@swox.com>
12550
12551	* configure.in: For sparc under solaris2.[7-9], pass -fsimple=1 to
12552	disable some crazy -fast optimizations.
12553
125542002-02-25  Torbjorn Granlund  <tege@swox.com>
12555
12556	* configure.in: For sparc under solaris2.[7-9], pass -fns=no to enable
12557	denorm handling under -fast.
12558
125592002-02-25  Kevin Ryde  <kevin@swox.se>
12560
12561	* configure.in (alpha*-*-*): Rearrange -mcpu selection for gcc,
12562	provide an ev67 -> ev6 fallback.  Fix -arch,-tune selection for DEC C.
12563	Allow ~ for space in optional options lists.
12564
12565	* tune/tuneup.c (tune_preinv_divrem_1): Compare against an assembler
12566	mpn_divrem_1 if it exists, not the generic C mpn_divrem_1_div.
12567	(tune_preinv_mod_1): Ditto with mpn_mod_1.
12568
12569	* tune/time.c (DIFF_SECS_ROUTINE): Eliminate the unused "type"
12570	parameter, try to make the code a bit clearer.
12571
12572	* tune/freq.c: Reduce the period measured for cycles versus
12573	gettimeofday, add cycles versus microsecond getrusage.
12574
12575	* mpz/array_init.c: "i" should be mp_size_t, noticed by E. Khong.
12576
125772002-02-24  Torbjorn Granlund  <tege@swox.com>
12578
12579	* configure.in: For sparc under solaris2.[7-9], pass -fast instead of
12580	other optimization options.
12581
125822002-02-23  Kevin Ryde  <kevin@swox.se>
12583
12584	* mpn/asm-defs.m4 (GMP_NUMB_MASK): New macro.
12585	(PROLOGUE, EPILOGUE): Relax quoting for the benefit of tune/many.pl
12586	when GSYM_PREFIX non-empty.
12587
12588	* tune/time.c, tune/speed.h (speed_time_init): Include clock tick
12589	period in speed_time_string.
12590	* tune/time.c, configure.in (clock_gettime): New measuring method.
12591
12592	* tune/many.pl: Add -DHAVE_NATIVE_mpn_foo to C objects, to avoid
12593	conflicts with a macro version in gmp-impl.h, eg. mpn_com_n.
12594
125952002-02-22  Torbjorn Granlund  <tege@swox.com>
12596
12597	* demos/pexpr.c: Increase RLIMIT_STACK to 4Mibyte.
12598
125992002-02-22  Kevin Ryde  <kevin@swox.se>
12600
12601	* tune/tuneup.c: Don't confuse gcc with mipspro cc in diagnostic.
12602
126032002-02-20  Torbjorn Granlund  <tege@swox.com>
12604
12605	* configure.in (mips*-*-irix[6789]*]): Set `extra_functions_n32', not
12606	`extra_functions'.
12607
12608	* printf/doprnt.c: Conditionally include inttypes.h.
12609	* printf/repl-vsnprintf.c: Likewise.
12610	* scanf/doscan.c: Likewise.
12611
126122002-02-20  Kevin Ryde  <kevin@swox.se>
12613
12614	* mpn/x86/k7/mmx/com_n.asm: New file.
12615
12616	* mpz/n_pow_ui.c (SWAP_RP_TP): Use ASSERT_CODE on ralloc and talloc,
12617	to ensure they needn't live past the initial allocs in a normal build.
12618
12619	* mpn/generic/mod_34lsub1.c: Note this is for internal use.
12620
126212002-02-19  Torbjorn Granlund  <tege@swox.com>
12622
12623	* Clean up *_THRESHOLD names.  Many files affected.
12624
12625	* mpn/mips32: Asm-ify 32-bit mips code.
12626	Move files from `mips2' to `mips32' directory.
12627	* mpn/mips64: Move files from `mips3' to `mips64' directory.
12628	* configure.in: Change `mips2' => `mips32' and `mips3' => `mips64'.
12629
126302002-02-19  Kevin Ryde  <kevin@swox.se>
12631
12632	* acinclude.m4, configure.in (GMP_PROG_LEX): New macro.
12633
12634	* tune/tuneup.c (one): Start next threshold at a max of previous ones,
12635	in order to get a good starting point for TOOM3_SQR_THRESHOLD if
12636	KARATSUBA_SQR_THRESHOLD is 0 (ie. using mpn_mul_basecase only).
12637
12638	* configure.in, tune/tuneup.c (GMP_MPARAM_H_SUGGEST): New AC_DEFINE
12639	replacing GMP_MPARAM_H_FILENAME.  Suggest a new file in a cpu specific
12640	subdirectory rather than mpn/generic.
12641
12642	* acinclude.m4 (POWERPC64_PATTERN): New macro.
12643	* configure.in (powerpc*-*-*): Use it.
12644	(powerpc*-*-*): Use umul in 32L and aix64.
12645	(mips*-*-*): Use umul, 32 and 64 bit versions.
12646
126472002-02-18  Torbjorn Granlund  <tege@swox.com>
12648
12649	* longlong.h: Add basic x86-64 support.
12650
126512002-02-17  Torbjorn Granlund  <tege@swox.com>
12652
12653	* demos/pexpr.c: Support `-X' for upper case hex, make `-x' output
12654	lower case hex.
12655
12656	* mpn/mips2/umul.s: Make it actually work.
12657	* mpn/mips3/umul.asm: New file.
12658
12659	* mpn/mips2/gmp-mparam.h: New file.
12660
126612002-02-16  Torbjorn Granlund  <tege@swox.com>
12662
12663	* mpn/generic/get_str.c (mpn_sb_get_str): Round frac upwards after
12664	umul_ppmm calls.
12665
126662002-02-16  Kevin Ryde  <kevin@swox.se>
12667
12668	* config.guess (alpha-*-*): Do alpha exact cpu probes on any system,
12669	and only if configfsf.guess gives a plain "alpha".
12670
12671	* acinclude.m4 (GMP_PROG_CC_WORKS): Detect a gcc 3.0.3 powerpc64
12672	linker invocation problem.
12673
126742002-02-15  Torbjorn Granlund  <tege@swox.com>
12675
12676	* mpn/generic/get_str.c (mpn_sb_get_str): For base 10, develop initial
12677	digits using umul_ppmm, then switch to plain multiplication.
12678
12679	* config.guess: Rewrite Alpha subtype detection code for *bsd systems.
12680
126812002-02-15  Kevin Ryde  <kevin@swox.se>
12682
12683	* gmp.texi (Build Options): Note powerpc exact cpu types.
12684	(Debugging): Advertise DEBUG in memory.c.
12685
12686	* config.sub, config.guess: Add some powerpc exact cpus.
12687	* configure.in: Add configs for them.
12688
12689	* memory.c [__NeXT__]: Remove unused #define of "static".
12690	(__gmp_default_allocate, __gmp_default_reallocate): Print size if
12691	allocation fails, don't use perror.
12692
12693	* gmp-h.in: g++ 3 demands __GMP_NOTHROW is before other attributes.
12694
126952002-02-14  Torbjorn Granlund  <tege@swox.com>
12696
12697	* mpn/alpha/mul_1.asm: Fix typo preventing build on T3E systems.
12698
126992002-02-14  Kevin Ryde  <kevin@swox.se>
12700
12701	* tune/tuneup.c (tune_set_str): Increase max_size, for the benefit of
12702	alpha.
12703
12704	* macos/README: Bug reports to bug-gmp@gnu.org, clarify MacOS X a bit.
12705
12706	* mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Add missing TMP_FREE.
12707
12708	* tune/speed.c, tune/tuneup.c: Allow for speed_cycletime of 0.0 in
12709	some diagnostic printouts.
12710	* tune/time.c (speed_cycletime): Note can be 0.0.
12711
127122002-02-12  Torbjorn Granlund  <tege@swox.com>
12713
12714	* mpn/alpha/mul_1.asm: Add mpn_mul_1c entry.
12715
12716	* mpn/pa64w/sqr_diagonal.asm: Use L() for labels.
12717
127182002-02-11  Torbjorn Granlund  <tege@swox.com>
12719
12720	* mpn/generic/get_str.c (mpn_sb_get_str): Change declaration of rp to
12721	accommodate tuneup compiles.
12722
127232002-02-11  Kevin Ryde  <kevin@swox.se>
12724
12725	* mpn/alpha/default.m4, mpn/alpha/unicos.m4 (PROLOGUE_cpu): Add
12726	noalign option.
12727	* mpn/alpha/default.m4 (PROLOGUE_cpu): use ALIGN instead of ".align".
12728
12729	* gmp.texi (Debugging): Notes on Checker.
12730	(Other Multiplication): Move note on float FFTs to here.
12731	(Assembler Floating Point): New text and revisions by Torbjorn,
12732	picture formatting by me.
12733	Simplify tex pictures elsewhere a bit, share heights, eliminate some
12734	gaps at line joins.
12735
127362002-02-11  Torbjorn Granlund  <tege@swox.com>
12737
12738	* mpn/generic/get_str.c (mpn_sb_get_str): Rewrite to generate fraction
12739	limbs and use multiplication for digit development.  Trim allocation of
12740	buf.  Get rid of code for !USE_MULTILIMB.
12741
127422002-02-10  Torbjorn Granlund  <tege@swox.com>
12743
12744	* mpn/generic/set_str.c (mpn_set_str): Undo this:
12745	Change invocations of mpn_add_1 to instead use mpn_incr_u.
12746
12747	* tests/mpz/convert.c: Free str only after it is used in error message.
12748
12749	* mpn/generic/get_str.c (mpn_sb_get_str): Combine tail code for base 10
12750	and generic bases.
12751
12752	* mpn/mp_bases.c: Add entries for base 256.  Remove __ prefix from
12753	table name.
12754	* gmp-impl.h (__mp_bases): Remove superflous `mp_' part of name, making
12755	it __gmpn_bases instead of __gmpn_mp_bases.
12756	(mp_bases): New #define.
12757	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Allow bases up to 256.
12758	(SPEED_ROUTINE_MPN_GET_STR): Likewise.
12759
127602002-02-09  Torbjorn Granlund  <tege@swox.com>
12761
12762	* mpn/generic/set_str.c (mpn_set_str): Use mpn_mul_1c if available.
12763	Change invocations of mpn_add_1 to instead use mpn_incr_u.
12764
127652002-02-09  Kevin Ryde  <kevin@swox.se>
12766
12767	* mpz/array_init.c, mpz/cfdiv_q_2exp.c, mpz/cfdiv_r_2exp.c,
12768	mpz/cong_2exp.c, mpz/divis_2exp.c, mpz/hamdist.c, mpz/init2.c,
12769	mpz/mul_2exp.c, mpz/realloc2.c, mpz/scan0.c, mpz/scan1.c,
12770	mpz/setbit.c, mpz/tdiv_q_2exp.c, mpz/tdiv_r_2exp.c, mpz/tstbit.c,
12771	mpz/urandomb.c: Use GMP_NUMB_BITS.
12772
12773	* mpz/iset_str.c [__CHECKER__]: Store a dummy value to the low limb to
12774	stop it appearing uninitialized.
12775
12776	* gmp-h.in (__GMP_NOTHROW): New macro.
12777	(mp_set_memory_functions, mpz_cmp, mpz_cmp_si, mpz_cmp_ui, mpz_cmpabs,
12778	mpz_cmpabs_ui, mpz_congruent_2exp_p, mpz_divisible_2exp_p,
12779	mpz_fits_sint_p, mpz_fits_slong_p, mpz_fits_sshort_p, mpz_fits_uint_p,
12780	mpz_fits_ulong_p, mpz_fits_ushort_p, mpz_get_si, mpz_get_ui,
12781	mpz_getlimbn, mpz_hamdist, mpz_popcount, mpz_scan0, mpz_scan1,
12782	mpz_size, mpz_sizeinbase, mpz_swap, mpz_tstbit, mpq_equal, mpq_swap,
12783	mpf_cmp, mpf_cmp_si, mpf_cmp_ui, mpf_fits_sint_p, mpf_fits_slong_p,
12784	mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p,
12785	mpf_fits_ushort_p, mpf_get_default_prec, mpf_get_prec, mpf_get_si,
12786	mpf_get_ui, mpf_integer_p, mpf_set_default_prec, mpf_set_prec_raw,
12787	mpf_size, mpf_swap, mpn_add_1, mpn_cmp, mpn_hamdist, mpn_popcount,
12788	mpn_sub_1): Use it.
12789
12790	* gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): New macros from
12791	mpn_sizeinbase, and use GMP_NUMB_BITS.
12792	* mpz/get_str.c, mpz/sizeinbase.c, mpbsd/mout.c, tune/speed.h: Use
12793	MPN_SIZEINBASE.
12794	* mpbsd/mtox.c: Use MPN_SIZEINBASE_16.
12795
12796	* configure.in, mpn/Makefile.am, gmp-impl.h (mpn_sizeinbase): Remove.
12797	* mpn/generic/sizeinbase.c: Remove file.
12798
12799	* gmp-impl.h (MPN_GET_STR_SIZE): Remove.
12800	* tests/mpn/t-g_str_size.c: Remove file.
12801	* tests/mpn/Makefile.am: Update.
12802
12803	* Makefile.am (dist-hook): Don't distribute cvs merge ".#" files.
12804
128052002-02-08  Torbjorn Granlund  <tege@swox.com>
12806
12807	* configure.in: Override extra_functions for all sparcv8 systems, not
12808	just supersparc.
12809
128102002-02-06  Kevin Ryde  <kevin@swox.se>
12811
12812	* tune/tuneup.c (tune_mul, tune_sqr): Disable FFTs until tuned.
12813	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix memory clobber in
12814	destination cache priming.
12815
12816	* printf/doprnt.c: Fix parsing of %s and %p conversions.
12817	* tests/misc/t-printf.c (check_misc): Add some tests.
12818
128192002-02-03  Torbjorn Granlund  <tege@swox.com>
12820
12821	* mpn/sparc32/v8/udiv.asm: New file, from v8/supersparc.
12822
12823	* mpn/generic/set_str.c: Rename indigits_per_limb => chars_per_limb.
12824	Remove redundant chars_per_limb.  Reverse 4 loops in basecase code for
12825	speed.  Use MP_BASES_CHARS_PER_LIMB_10.
12826
128272002-02-03  Kevin Ryde  <kevin@swox.se>
12828
12829	* acinclude.m4 (GMP_PROG_NM): Ensure -B or -p get used when doing a
12830	cross compile with the native nm, helps OSF for instance.
12831	(GMP_ASM_LSYM_PREFIX): Remove ".byte 0" for the benefit of irix 6,
12832	allow "N" from nm for OSF, allow for "t" for other systems, but prefer
12833	no mention of the symbol at all.
12834
12835	* tune/tuneup.c (print_define_remark): New function.
12836	Turn some "#if"s into plain "if"s.
12837
12838	* tune/tuneup.c, gmp-impl.h, tune/Makefile.am
12839	(GET_STR_BASECASE_THRESHOLD, GET_STR_PRECOMPUTE_THRESHOLD): Tune these.
12840	* mpn/generic/get_str.c [TUNE_PROGRAM_BUILD]: Cope with non-constant
12841	GET_STR_PRECOMPUTE_THRESHOLD.
12842
128432002-02-02  Torbjorn Granlund  <tege@swox.com>
12844
12845	* mpn/generic/get_str.c (mpn_get_str): Fix typo in a declaration.
12846
128472002-02-02  Kevin Ryde  <kevin@swox.se>
12848
12849	* mpn/generic/set_str.c: Use MP_PTR_SWAP and POW2_P, add __GMP_PROTO
12850	to convert_blocks prototype, disable SET_STR_BLOCK_SIZE sanity check.
12851
12852	* tune/set_strb.c, tune/set_strs.c: New files.
12853	* tune/speed.h, tune/speed.c, tune/common.c,tune/Makefile.am: Add them.
12854	* tune/tuneup.c: Tune SET_STR_THRESHOLD.
12855	(DEFAULT_MAX_SIZE): Renamed from MAX_SIZE, allow any param.max_size[].
12856
128572002-02-01  Torbjorn Granlund  <tege@swox.com>
12858
12859	* tests/mpz/convert.c: Increase operand size.  Add (yet disabled) code
12860	for testing with random strings.
12861
12862	* mpn/generic/get_str.c (mpn_get_str): Rewrite to become sub-quadratic.
12863	(mpn_dc_get_str, mpn_sb_get_str): New functions.
12864
128652002-01-31  Kevin Ryde  <kevin@swox.se>
12866
12867	* gmpxx.h (cmp): Renamed from "compare".
12868
12869	* configure.in (AC_C_BIGENDIAN): Don't abort when cross compiling.
12870	(PROLOGUE): Allow new style optional second parameter when grepping.
12871
12872	* acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
12873	GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
12874	Use $ac_objext for object filenames.
12875	(GMP_ASM_UNDERSCORE): Use CCAS to assemble.
12876
12877	* demos/pexpr-config-h.in: New file.
12878	* configure.in: Generate demos/pexpr-config.h.
12879	(AC_CHECK_FUNCS): Add clock, cputime, setrlimit, sigaction,
12880	sigaltstack, sigstack.
12881	* acinclude.m4 (GMP_SUBST_CHECK_FUNCS, GMP_SUBST_CHECK_HEADERS): New
12882	macros.
12883	* demos/pexpr.c: Use pexpr-config.h, not various #ifdefs.
12884	(setup_error_handler): Use signal if sigaction not available, allow
12885	for SIGBUS missing on mingw.
12886	(main): Use time() for random seed if gettimeofday not available.
12887	(cleanup_and_exit): Move SIGFPE out of LIMIT_RESOURCE_USAGE.
12888
128892002-01-30  Torbjorn Granlund  <tege@swox.com>
12890
12891	* mpn/generic/set_str.c: Rewrite to become sub-quadratic.
12892	(convert_blocks): New function.
12893
128942002-01-30  Kevin Ryde  <kevin@swox.se>
12895
12896	* gmp-impl.h (GMP_NUMB_MASK, GMP_NAIL_MASK, GMP_NUMB_HIGHBIT,
12897	ASSERT_MPN, ASSERT_MP_LIMB_T): New macros.
12898
12899	* mpn/generic/fib2_ui.c: Use GMP_NUMB_BITS, simplify the data
12900	generator program, share __gmp_fib_table initializers between bit
12901	sizes, cope with bit sizes other than those specifically setup.
12902	* gmp-impl.h (FIB_TABLE_LIMIT, FIB_TABLE_LUCNUM_LIMIT): Corresponding
12903	rearrangement of conditionals.
12904	* tests/mpz/t-fib_ui.c (check_fib_table): New test.
12905
129062002-01-28  Kevin Ryde  <kevin@swox.se>
12907
12908	* mpz/set_si.c, mpz/iset_si.c: Store to _mp_d[0] unconditionally, use
12909	an expression for _mp_size.
12910
12911	* mpz/init.c, mpz/init2.c, mpz/iset.c, mpq/init.c [__CHECKER__]: Store
12912	dummy values to low limbs to stop them appearing uninitialized.
12913
129142002-01-26  Kevin Ryde  <kevin@swox.se>
12915
12916	* mpfr/mpfr-test.h (MAX, MIN, ABS): Use instead a patch from Paul and
12917	Vincent.
12918
129192002-01-24  Kevin Ryde  <kevin@swox.se>
12920
12921	* configure.in: Extra quoting to get argument help messages right.
12922
12923	* gmp.texi (Efficiency): Suggest hex or octal for input and output.
12924	(Formatted Output Strings): Mention "*" for width and precision.
12925
12926	* mpn/generic/sizeinbase.c: New file, adapted from mpz/sizeinbase.c.
12927	Use POW2_P, use __mp_bases[base].big_base for log2(base).
12928	* configure.in, mpn/Makefile.am: Add it.
12929	* gmp-impl.h: Add prototype.
12930	* mpz/sizeinbase.c, tune/speed.h, mpn/generic/get_str.c,
12931	mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c: Use it.
12932	* mpz/get_str.c: Write directly to user buffer, skip at most one
12933	leading zero, eliminate special case for x==0.
12934	* mpbsd/mtox.c: Allocate exact result space at the start, eliminate
12935	special case for x==0.
12936	* mpbsd/mout.c: Only need to skip one high zero with mpn_sizeinbase.
12937
12938	* configure.in (--enable-nails): New option.
12939	(GMP_NAIL_BITS, GMP_LIMB_BITS, GMP_NUMB_BITS): New defines for gmp.h
12940	and config.m4.
12941	* gmp-h.in: Add templates.
12942
12943	* mpfr/mpfr-test.h (MAX, MIN, ABS): Use #ifndef to avoid a redefine
12944	error on AIX xlc.
12945
129462002-01-23  Torbjorn Granlund  <tege@swox.com>
12947
12948	* mpn/generic/get_str.c: Correct type of `out_len'.
12949
129502002-01-22  Kevin Ryde  <kevin@swox.se>
12951
12952	* mpn/generic/pre_divrem_1.c: Corrections to some ASSERTs.
12953
12954	* mpfr/mul_ui.c: Don't call mpn_lshift with 0 shift.
12955
12956	* mpfr/mpz_set_fr.c: Produce correct mpz_t for f==0.
12957
129582002-01-21  Torbjorn Granlund  <tege@swox.com>
12959
12960	* longlong.h (32-bit powerpc add_ssaaaa): Remove spurious commutative
12961	declaration.
12962	(64-bit powerpc add_ssaaaa): Likewise.
12963
129642002-01-20  Kevin Ryde  <kevin@swox.se>
12965
12966	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Use %n to better detect sparc
12967	solaris 2.7 problems.
12968
129692002-01-19  Torbjorn Granlund  <tege@swox.com>
12970
12971	* demos/pexpr.c (mpz_eval_expr): Optimize s^rhs for -1 <= s <= 1.
12972	(cleanup_and_exit): Improve error message wording.
12973
129742002-01-19  Kevin Ryde  <kevin@swox.se>
12975
12976	* mpfr/mpfr.h (_PROTO): Use __GMP_PROTO, for compatibility with
12977	gmp-impl.h.
12978
129792002-01-17  Torbjorn Granlund  <tege@swox.com>
12980
12981	* mpfr/mpfr-test.h: Test "__hpux", not "hpux".  Mask off mrand48
12982	return value to 31 bits to work around sloppy mpfr #include practices.
12983
12984	* mpfr/tests/*.c: Use #include "", not <>, for gmp.h and mpfr.h.
12985	Make sure to #include mpfr-test.h from all files that use random().
12986
129872002-01-17  Kevin Ryde  <kevin@swox.se>
12988
12989	* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE_TYPE): New macro.
12990	* gmp-impl.h, mpz/get_str.c, mpz/out_raw.c, mpq/get_str.c,
12991	mpq/set_str.c, mpf/get_str.c, printf/asprntffuns.c, printf/doprnt.c,
12992	printf/repl-vsnprintf.c, printf/snprntffuns.c, scanf/doscan.c,
12993	mpbsd/mtox.c: Some fixes to compile as C++.
12994
12995	* mpn/generic/jacbase.c (JACOBI_BASE_METHOD): New tuned parameter,
12996	replacing COUNT_TRAILING_ZEROS_TIME test.  Add a third method too.
12997	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
12998	measuring of mpn_jacobi_base methods.
12999	* tune/jacbase1.c, tune/jacbase2.c, tune/jacbase3.c: New files.
13000	* tune/tuneup.c (JACOBI_BASE_METHOD): Tune this.
13001	* mpn/x86/*/gmp-mparam.h (COUNT_TRAILING_ZEROS_TIME): Remove macro.
13002
13003	* gmp-h.in: Use __gmp prefix on variables in inlines.
13004
13005	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Remove __i, unused.
13006
13007	* mpn/generic/mul_fft.c: Use HAVE_NATIVE_mpn_addsub_n, not ADDSUB.
13008	Use CNST_LIMB for some constants.
13009
130102002-01-15  Kevin Ryde  <kevin@swox.se>
13011
13012	* tests/mpbsd/Makefile.am: Add a convenience rule for ../libtests.la.
13013
13014	* printf/Makefile.am: libdummy.la should be in EXTRA_LTLIBRARIES.
13015
13016	* mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and
13017	mpf_get_str give the same for ndigits==0.
13018
13019	* mpfr/exceptions.c (mpfr_set_emin, mpfr_set_emax): Work around a
13020	powerpc64 gcc 3.0 -O2 bug.
13021
13022	* tests/memory.c, tests/tests.h (tests_memory_validate): New function.
13023
130242002-01-14  Kevin Ryde  <kevin@swox.se>
13025
13026	* mpn/generic/sb_divrem_mn.c, mpn/generic/divrem_1.c,
13027	mpn/generic/divrem_2.c, mpn/generic/mod_1.c: Don't use UMUL_TIME and
13028	UDIV_TIME, just default to preinv.
13029	* gmp-impl.h (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Ditto.
13030	(DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD): Don't use UMUL_TIME
13031	and UDIV_TIME, make default thresholds 0.
13032	(UDIV_NORM_PREINV_TIME, UDIV_UNNORM_PREINV_TIME): Remove macros.
13033	* mpn/x86/*/gmp-mparam.h (UMUL_TIME, UDIV_TIME,
13034	UDIV_NORM_PREINV_TIME): Remove macros.
13035
13036	* gmp.texi (Headers and Libraries): New section, being the header
13037	notes from "GMP Basics" and some new stuff.
13038	(Parameter Conventions): Notes on "const" parameters.
13039	(Formatted Output Strings): Add type N, tweak some wording.
13040
13041	* tests/refmpn.c (refmpn_divmod_1c): Avoid a bug in i386 gcc 3.0.
13042
130432002-01-12  Kevin Ryde  <kevin@swox.se>
13044
13045	* mpz/root.c: Add <stdlib.h>, for abort().
13046
13047	* mpfr/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
13048	* mpfr/mpfr.h, mpfr/mpfr-tests.h, reuse.c, tadd.c, tadd_ui.c, tagm.c,
13049	tatan.c, tcmp2.c, tcos.c, tdiv.c, tdiv_ui.c, teq.c, texp.c,
13050	tget_str.c, thyperbolic.c, tlog.c, tmul.c, tout_str.c, tpow.c,
13051	trandom.c, tset_z.c, tsin.c, tsqrt.c, tsqrt_ui.c, tsub_ui.c, ttan.c,
13052	tui_div.c: Fixes for K&R.
13053
13054	* tests/misc/t-scanf.c (check_misc, check_misc):
13055
13056	* tests/mpz/t-inp_str.c, tests/mpq/t-inp_str.c, tests/misc/t-scanf.c:
13057	Avoid strings in ASSERT, not enjoyed by K&R.
13058	* gmp-impl.h (ASSERT): Note this.
13059
13060	* tests/tests.h (refmpn_mod_34lsub1): Add __GMP_PROTO.
13061
13062	* mpbsd/Makefile.am: Avoid an automake problem with ansi2knr and
13063	sources in a different directory.
13064
13065	* printf/repl-vsnprintf.c: Test HAVE_LONG_DOUBLE for long double.
13066
13067	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mod_34lsub1.c,
13068	mul_2.c, pre_divrem_1.c.
13069
13070	* gmp-h.in, gmp-impl.h (mpn_add_nc, mpn_addmul_1c, mpn_addsub_n,
13071	mpn_addsub_nc, mpn_divrem_1c, mpn_dump, mpn_mod_1c, mpn_mul_1c,
13072	mpn_mul_basecase, mpn_sqr_n, mpn_sqr_basecase, mpn_sub_nc,
13073	mpn_submul_1c): Move to gmp-impl.h, since they're undocumented.
13074
13075	* gmp-impl.h (mpn_reciprocal): Remove, unused.
13076
13077	* tune/many.pl (cntlz, cnttz): Use new SPEED_ROUTINE_COUNT_ZEROS.
13078
130792002-01-11  Kevin Ryde  <kevin@swox.se>
13080
13081	* mpn/hppa/*.asm, mpn/pa64/*.asm, mpn/pa64w/*.asm: Use L().
13082
130832002-01-08  Kevin Ryde  <kevin@swox.se>
13084
13085	* mpn/asm-defs.m4 (PROLOGUE, EPILOGUE): New scheme, optional function
13086	name to EPILOGUE, check for missing or wrong function name EPILOGUE.
13087	* mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/m68k/m68k-defs.m4,
13088	mpn/mips3/mips.m4, mpn/ia64/default.m4, mpn/powerpc32/aix.m4,
13089	mpn/powerpc64/aix.m4, mpn/x86/x86-defs.m4: Consequent updates, add a
13090	few more asserts.
13091	* mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/alpha/cntlz.asm,
13092	mpn/alpha/invert_limb.asm (PROLOGUE_GP): Change to an optional "gp"
13093	parameter on plain PROLOGUE.
13094
13095	* gmp.texi (Low-level Functions): mpn_get_str doesn't clobber an extra
13096	limb, and doesn't clobber at all for power of 2 bases.
13097	(Language Bindings): Add python gmpy.
13098
13099	* mpz/get_str.c: Determine realloc size arithmetically.
13100
13101	* mpbsd/mtox.c: Size memory block returned to actual space needed.
13102	* gmp.texi (BSD Compatible Functions): Describe this.
13103
13104	* mpz/get_str.c: Don't copy mpn_get_str input for power of 2 bases.
13105	* mpbsd/mtox.c: Ditto, and as a side effect avoid a memory leak from a
13106	missing TMP_FREE.
13107
13108	* mpz/get_str.c, mpbsd/mout.c: No longer need for +1 limb for
13109	mpn_get_str clobber.
13110
13111	* gmp-impl.h (MPN_GET_STR_SIZE): New macro.
13112	* mpn/generic/get_str.c, mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c,
13113	tune/speed.h: Use it.
13114	* tests/mpn/t-g_str_size.c: New test.
13115	* tests/mpn/Makefile.am: Add it.
13116
13117	* gmp-impl.h (POW2_P): New macro.
13118	* mpn/generic/get_str.c, tests/misc.c: Use it.
13119
13120	* printf/doprnt.c: Add "N" for mpn, share some code between N, Q and Z.
13121	* tests/misc/t-printf.c: Add tests.
13122	* gmp-impl.h (ASSERT_CODE): New macro.
13123
13124	* tests/mpbsd/t-mtox.c: New test.
13125	* tests/mpbsd/Makefile.am: Add it.
13126	(allfuns_LDADD): Don't link against libgmp when testing everything in
13127	libmp can link.
13128
131292002-01-07  Torbjorn Granlund  <tege@swox.com>
13130
13131	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Rewrite generic versions.
13132
131332002-01-06  Kevin Ryde  <kevin@swox.se>
13134
13135	* mpn/generic/pre_divrem_1.c: Don't support size==0.
13136	* tests/devel/try.c: Update.
13137
13138	* mpn/generic/get_str.c: Add special case for base==10.
13139	* gmp-impl.h (MP_BASES_CHARS_PER_LIMB_10, MP_BASES_BIG_BASE_10,
13140	MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): New
13141	constants.
13142	* tests/t-constants.c: Add checks.
13143	* mpn/mp_bases.c [GENERATE_TABLE]: Print defines for gmp-impl.h, print
13144	all standard bits-per-limb by default.
13145
13146	* demos/pexpr.c, demos/expr/expr.h, demos/expr/expr-impl.h: Use
13147	__GMP_PROTO.
13148
13149	* gmp-h.in (mpn_divexact_by3c): Remove variables from prototype, to
13150	keep out of application namespace.
13151
131522002-01-04  Torbjorn Granlund  <tege@swox.com>
13153
13154	* gmp-impl.h: Move _PROTO declaration to before its first usages.
13155
131562002-01-04  Kevin Ryde  <kevin@swox.se>
13157
13158	* gmp-h.in, mp-h.in, tests/tests.h: Rename _PROTO to __GMP_PROTO, and
13159	don't use #ifndef just define it ourselves.
13160	* gmp-impl.h: Provide _PROTO as an alias for __GMP_PROTO, to avoid big
13161	edits internally, for the moment.
13162
131632002-01-03  Torbjorn Granlund  <tege@swox.com>
13164
13165	* tune/speed.c (usage): Insert "\n\" into a string.
13166
131672001-12-30  Torbjorn Granlund  <tege@swox.com>
13168
13169	* mpn/pa64/udiv_qrnnd.c: Remove file.
13170	* mpn/pa64w/udiv_qrnnd.c: Remove file.
13171
13172	* gmp-impl.h (MPN_IORD_U): Change formatting (labels in pos 0, insns
13173	indented by tab).
13174	(MPN_INCR_U): Use "addl $1,foo; jc", not "incl foo; jz".
13175
13176	* gmp-impl.h (udiv_qrnnd_preinv): Use plain subtract, not sub_ddmmss,
13177	in one more case.
13178
131792001-12-30  Kevin Ryde  <kevin@swox.se>
13180
13181	* mpn/generic/get_str.c (udiv_qrnd_unnorm): New macro.
13182	Use "do while" for dig_per_u loop since it's non-zero.
13183	* acconfig.h (HAVE_HOST_CPU_m68k etc): Add templates.
13184
13185	* mpn/generic/mul_basecase.c, mpz/mul.c, mpz/n_pow_ui.c,
13186	mpn/x86/pentium/mul_2.asm, tests/devel/try.c, tests/tests.h,
13187	tests/refmpn.c, tune/speed.c, tune/speed.h, tune/common.c,
13188	tune/many.pl (mpn_mul_2): New parameter style.
13189	* gmp-impl.h (mpn_mul_2): Add prototype.
13190	* configure.in (gmp_mpn_functions_optional): Add mul_2.
13191
13192	* longlong.h (__vxworks__): Remove from powerpc tests, not correct,
13193	not on its own at least.
13194
13195	* tune/speed.c: Add "aas" to specify 0xAA..AA data.
13196
13197	* tune/tuneup.c (print_define_end): Indicate "never" and "always".
13198
131992001-12-29  Torbjorn Granlund  <tege@swox.com>
13200
13201	* mpq/set_d.c: ANSI-fy.
13202	* mpz/invert.c: Use PTR and SIZ (cosmetic change).
13203
13204	* mpz/cong.c: Rename `xor' to `sign' to avoid C++ reserved word.
13205
132062001-12-28  Torbjorn Granlund  <tege@swox.com>
13207
13208	* mpn/sparc64/sqr_diagonal.asm: New file.
13209
132102001-12-28  Kevin Ryde  <kevin@swox.se>
13211
13212	* mpn/generic/get_str.c: Avoid one mpn_divrem_1 by running main loop
13213	only until msize==1.
13214
13215	* tune/tuneup.c: Break up all() for clarity.
13216	(USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Compare against plain
13217	division udiv_qrnnd, not the tuned and possibly preinv version.
13218
13219	* tune/freq.c: Split sysctl and sysctlbyname probes into separate
13220	functions, shorten some identifiers, put descriptions inside
13221	functions, define functions unconditionally and do nothing if
13222	requisites not available.
13223
13224	* mpz/inp_raw.c: Avoid a gcc 3.0 powerpc64 bug on AIX.
13225
13226	* acinclude.m4, configure.in (GMP_C_RESTRICT): New macro.
13227
13228	* mpfr/sin.c: Patch from Paul to fix sign of sin(3pi/2).
13229
13230	* demos/calc/calc.y: Improve some error messages.
13231
132322001-12-28  Torbjorn Granlund  <tege@swox.com>
13233
13234	* mpn/sparc64/mul_1.asm: Rename r72 -> r80.
13235	* mpn/sparc64/addmul_1.asm: Likewise.
13236
132372001-12-27  Torbjorn Granlund  <tege@swox.com>
13238
13239	* mpn/generic/tdiv_qr.c: Misc formatting cleanups.
13240	For switch case 2, replace `dn' with its value (2).
13241
132422001-12-25  Torbjorn Granlund  <tege@swox.com>
13243
13244	* tests/devel/mul_1.c: Add FIXED_XLIMB.
13245	* tests/devel/addmul_1.c: Likewise.
13246	* tests/devel/submul_1.c: Likewise.
13247
13248	* tests/devel/add_n.c: Improve error message.
13249	Accept command line argument for # of tests.
13250	* tests/devel/sub_n.c: Likewise.
13251
13252	* tests/devel/: Remove CLOCK settings.
13253
13254	* mpn/sparc32/v9/mul_1.asm: Rewrite.
13255	* mpn/sparc32/v9/addmul_1.asm: Rewrite.
13256	* mpn/sparc32/v9/submul_1.asm: Rewrite.
13257
132582001-12-24  Torbjorn Granlund  <tege@swox.com>
13259
13260	* mpn/sparc64/mul_1.asm: Get rid of global constant 0.0 (L(noll)).
13261	* mpn/sparc64/addmul_1.asm: Likewise.
13262
132632001-12-23  Torbjorn Granlund  <tege@swox.com>
13264
13265	* mpn/generic/get_str.c: Move final ASSERT to just before zero fill
13266	loop.
13267
132682001-12-22  Torbjorn Granlund  <tege@swox.com>
13269
13270	* mpn/generic/get_str.c: Move ASSERTs out of loops.  Split digit
13271	generation code into two loops, saving a test of msize in the loop.
13272
132732001-12-22  Kevin Ryde  <kevin@swox.se>
13274
13275	* mpn/x86/x86-defs.m4, mpn/x86/*/*.asm: Remove L / LF scheme putting
13276	function name in local labels.
13277
13278	* mpn/generic/get_str.c: Use mpn_preinv_divrem_1, add a couple of
13279	ASSERTs.
13280
13281	* mpn/generic/pre_divrem_1.c: New file.
13282	* configure.in (gmp_mpn_functions): Add it.
13283	* gmp-impl.h (mpn_preinv_divrem_1): Add prototype.
13284	(USE_PREINV_DIVREM_1, MPN_DIVREM_OR_PREINV_DIVREM_1): New macros.
13285	* tests/devel/try.c, tune/speed.c, tune/speed.h, tune/common.c,
13286	tune/many.pl, tune/Makefile.am (mpn_preinv_divrem_1): Add testing and
13287	measuring.
13288	* tune/tuneup.c: Determine USE_PREINV_DIVREM_1.
13289	* tune/pre_divrem_1.c: New file.
13290	* tests/refmpn.c, tests/tests.h (refmpn_preinv_divrem_1): New function.
13291
13292	* tests/mpz/t-io_raw.c: New file.
13293	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
13294
13295	* mpz/inp_raw.c, mpz/out_raw.c: Rewrite.
13296	* acinclude.m4, configure.in (AC_C_BIGENDIAN): New test.
13297	* gmp-impl.h (BSWAP_LIMB): New macro.
13298
13299	* acinclude.m4 (GMP_PROG_CC_WORKS): For a native compile, demand
13300	executables will run, per AC_PROG_CC.  This detects ABI=64 is unusable
13301	in a native sparc solaris 7 build with the kernel in 32-bit mode.
13302	* gmp.texi (ABI and ISA): Add notes on this, add an example configure
13303	setting an ABI.
13304
13305	* tune/tuneup.c, configure.in: Print the gmp-mparam.h filename.
13306	* tune/tuneup.c: Print the CPU frequency.
13307
13308	* tune/time.c, tune/speed.h: Add s390 "stck" method, flatten
13309	conditionals in speed_time_init a bit, use have_* variables to let
13310	some code go dead in speed_starttime and speed_endtime.
13311
13312	* tune/freq.c (speed_cpu_frequency_irix_hinv): New function.
13313
13314	* Makefile.am, configure.in: Restore mpfr.
13315
13316	* configure.in: Add --with-readline, AC_PROG_YACC and AM_PROG_LEX.
13317	* demos/calc/calc.y, demos/calc/calclex.l: Add readline support, add
13318	lucnum function.
13319	* demos/calc/Makefile.am: Add calcread.c, calc-common.h, use $(YACC),
13320	$(LEX) and $(LEXLIB).
13321	* demos/calc/calcread.c, demos/calc/calc-common.h,
13322	demos/calc/calc-config-h.in, demos/calc/README: New files.
13323
13324	* configure.in: Put demos/expr configs in expr-config.h.
13325	* demos/expr/expr-config-h.in: New file.
13326	* demos/expr/expr-impl.h: Renamed from expr-impl-h.in, get configs
13327	from expr-config.h.
13328	* demos/expr/Makefile.am: Update.
13329
13330	* demos/expr/exprfr.c: Use mpfr_sin and mpfr_cos, remove some spurious
13331	returns.
13332
133332001-12-20  Torbjorn Granlund  <tege@swox.com>
13334
13335	* mpn/sparc64/mul_1.asm: Trim an instruction.
13336	* mpn/sparc64/addmul_1.asm: Likewise.
13337
13338	* mpn/ia64/add_n.asm: Rewrite.
13339	* mpn/ia64/sub_n.asm: Rewrite.
13340
133412001-12-19  Torbjorn Granlund  <tege@swox.com>
13342
13343	* mpn/ia64/mul_1.asm: Rewrite.
13344	* mpn/ia64/addmul_1.asm: Rewrite.
13345	* mpn/ia64/submul_1.c: Use TMP_ALLOC_LIMBS.
13346
13347	* tests/devel/mul_1.c: Improve error message.
13348	Accept command line argument for # of tests.
13349	* tests/devel/addmul_1.c: Likewise.
13350	* tests/devel/submul_1.c: Likewise.
13351
133522001-12-18  Torbjorn Granlund  <tege@swox.com>
13353
13354	* mpn/mips3/mul_1.asm: Add NOPs to save a cycle on R1x000.
13355
133562001-12-18  Kevin Ryde  <kevin@swox.se>
13357
13358	* gmpxx.h (gmp_randclass): Don't allow copy constructors or "=",
13359	implementation by Gerardo.
13360
13361	* gmp-h.in (operator<<, operator>>): Remove parameter names from
13362	prototypes, to keep out of user namespace.
13363
13364	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Let the test program work as C++.
13365
133662001-12-16  Torbjorn Granlund  <tege@swox.com>
13367
13368	* mpn/sparc64/mul_1.asm: Rewrite.
13369	* mpn/sparc64/addmul_1.asm: Rewrite.
13370	* mpn/sparc64/submul_1.asm: Rewrite.
13371
13372	* mpn/sparc64/addmul1h.asm: Remove.
13373	* mpn/sparc64/submul1h.asm: Remove.
13374	* mpn/sparc64/mul1h.asm: Remove.
13375
133762001-12-15  Kevin Ryde  <kevin@swox.se>
13377
13378	* gmp-h.in (mpn_add, mpn_add_1, mpn_cmp, mpn_sub, mpn_sub_1): Follow
13379	__GMP_INLINE_PROTOTYPES for whether to give prototype with inline.
13380
13381	* configure.in (i686*-*-*, pentiumpro-*-*, pentium[23]-*-*,
13382	athlon-*-*, pentium4-*-*): Fall back on -march=pentium if
13383	-march=pentiumpro or higher is not good (eg. solaris cmov).
13384
133852001-12-12  Torbjorn Granlund  <tege@swox.com>
13386
13387	* gmp-impl.h (MPN_ZERO): Rewrite generic version to be similar to
13388	powerpc version.
13389
133902001-12-12  Kevin Ryde  <kevin@swox.se>
13391
13392	* acinclude.m4 (GMP_PROG_CC_WORKS): Detect cmov problems with gcc
13393	-march=pentiumpro on solaris 2.8.
13394
13395	* tune/common.c, tune/speed.h: Allow for commas in count_leading_zeros
13396	and count_trailing_zeros macros.
13397
13398	* demos/expr/Makefile.am: Distribute exprfr.c and exprfra.c.
13399
13400	* tune/Makefile.am (speed_ext_SOURCES): Should be speed-ext.c.
13401
134022001-12-10  Torbjorn Granlund  <tege@swox.com>
13403
13404	* mpn/s390/addmul_1.asm: New file.
13405	* mpn/s390/submul_1.asm: New file.
13406	* mpn/s390/mul_1.asm: New file.
13407	* mpn/s390/gmp-mparam.h: Update.
13408
134092001-12-07  Kevin Ryde  <kevin@swox.se>
13410
13411	* gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start of
13412	prototypes, for the benefit of Microsoft C.
13413
13414	* gmp.texi (Introduction to GMP): Mention ABI and ISA section.
13415	(Known Build Problems): Recommend GNU sed on solaris 2.6.
13416	(Assigning Integers): Direct feedback to bug-gmp.
13417	(References): Typo Knuth vol 2 is from 1998.
13418
13419	* gmpxx.h (gmp_randclass): Add initializers for gmp_randinit_default
13420	and gmp_randinit_lc_2exp_size.
13421	gmp.texi (C++ Interface Random Numbers): Describe them.
13422
13423	* tests/misc/t-locale.c, tests/cxx/t-locale.cc: Ensure mpf_clear is
13424	done when the localconv override doesn't work.  Reported by Mike
13425	Jetzer.
13426
13427	* printf/doprnti.c: Don't showbase on a zero mpq denominator.
13428	* tests/misc/t-printf.c, tests/cxx/t-ostream.c: Add test cases.
13429
134302001-12-04  Kevin Ryde  <kevin@swox.se>
13431
13432	* gmp.texi (Known Build Problems): Update to gmp_randinit_lc_2exp_size
13433	for the sparc solaris 2.7 problem.
13434	(Reentrancy): SCO ctype.h affects all text-based input functions.
13435	(Formatted Output Strings): Correction to the mpf example.
13436	(Single Limb Division): Correction, should be q-1 not q+1.
13437	(Extended GCD): Clarify why single-limb is inferior.
13438	(Raw Output Internals): Clarify size is twos complement, note limb
13439	order means _mp_d doesn't get directly read or written.
13440	(Contributors): Clarify mpz_jacobi.
13441	And a couple of formatting tweaks elsewhere.
13442
13443	* tests/cxx/t-headers.cc: New file.
13444	* tests/cxx/Makefile.am: Add it.
13445
13446	* gmpxx.h: Add <strstream>, needed by mpf_class::get_str2.
13447
13448	* gmp-h.in (mpq_inp_str, mpn_hamdist): Add __GMP_DECLSPEC.
13449
134502001-12-01  Torbjorn Granlund  <tege@swox.com>
13451
13452	* Version 4.0 released.
13453
13454	* mpfr/README: Replace contents with explanation of why mpfr is gone.
13455
134562001-12-01  Kevin Ryde  <kevin@swox.se>
13457
13458	* Makefile.am, configure.in: Temporarily remove mpfr, just leave a
13459	README.
13460
13461	* mpn/Makefile.am (EXTRA_DIST): Add Makeasm.am.
13462
134632001-11-30  Gerardo Ballabio  <ballabio@sissa.it>
13464
13465	* tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: New files.
13466	* tests/cxx/Makefile.am (check_PROGRAMS): Add them.
13467
134682001-11-30  Kevin Ryde  <kevin@swox.se>
13469
13470	* mpfr: Update to 2001-11-16.  Patch TMP handling of agm.c and sqrt.c,
13471	use plain mpn_sqrtrem in sqrt.c, separate .c files for floor and ceil,
13472	disable an expression style assert in add1.c.
13473
13474	* mpn/s370: Rename to s390.
13475	* configure.in (s3[6-9]0*-*-*): Update.
13476	* mpn/Makefile.am (TARG_DIST): Add s390.
13477
13478	* mpz/fits_s.c, mpf/fits_s.c, mpf/fits_u.c: Remove files, unused since
13479	change to .h style.
13480
134812001-11-29  Torbjorn Granlund  <tege@swox.com>
13482
13483	* gmp-h.in: Declare mpz_get_d_2exp and mpf_get_d_2exp.
13484	* Makefile.am: Add mpz/get_d_2exp$U.lo and mpf/get_d_2exp$U.lo.
13485	* mpf/Makefile.am: Add get_d_2exp.c.
13486	* mpz/Makefile.am: Add get_d_2exp.c.
13487
134882001-11-29  Kevin Ryde  <kevin@swox.se>
13489
13490	* mpn/*/gmp-mparam.h: Update measured thresholds.
13491	* mpn/s370/gmp-mparam.h: New file.
13492
13493	* mpz/millerrabin.c: Mark for internal use only, for now.
13494	* gmp.texi (Number Theoretic Functions): Remove documentation.
13495
134962001-11-28  Torbjorn Granlund  <tege@swox.com>
13497
13498	* mpf/get_d_2exp.c: New file.
13499	* mpz/get_d_2exp.c: New file.
13500
13501	* mpz/realloc2.c: Fix typo.  Make more similar to mpz_realloc.
13502	* mpz/realloc.c: Use __GMP_REALLOCATE_FUNC_LIMBS.
13503
135042001-11-27  Gerardo Ballabio  <ballabio@sissa.it>
13505
13506	* gmpxx.h, mpfrxx.h: Various updates and improvements.
13507
135082001-11-27  Kevin Ryde  <kevin@swox.se>
13509
13510	* gmp.texi (Useful Macros and Constants): Add gmp_version, add @findex
13511	for mp_bits_per_limb.
13512
13513	* demos/perl/GMP.pm, demos/perl/GMP.xs: Use new style gmp_randinit's.
13514	* demos/perl/test.pl: Update for this, and for mpz_perfect_power_p
13515	handling of 0 and 1.
13516
135172001-11-26  Torbjorn Granlund  <tege@swox.com>
13518
13519	* mpz/realloc.c: Clear variable when decreasing allocation to less than
13520	needed.  Misc updates.
13521
135222001-11-25  Kevin Ryde  <kevin@swox.se>
13523
13524	* tests/misc/t-locale.c: Avoid printf in the normal case, since the
13525	replacement localeconv breaks it on SunOS 4.
13526
13527	* gmp.texi (Build Options, Notes for Package Builds): Note libgmpxx
13528	depends on libgmp from same GMP version.
13529
13530	* acinclude.m4, configure.in (GMP_FUNC_SSCANF_WRITABLE_INPUT): New
13531	test.
13532	* scanf/sscanf.c, scanf/vsscanf.c: Use it to ensure sscanf input is
13533	writable, if necessary.
13534
13535	* tests/misc/t-scanf.c: Ensure sscanf arguments are writable, always.
13536	* configure.in (AC_CHECK_DECLS): Remove sscanf, no longer required.
13537
13538	* configure.in (none-*-*): Fix default CFLAGS setups.
13539
13540	* doc/configuration: Misc updates.
13541
135422001-11-23  Kevin Ryde  <kevin@swox.se>
13543
13544	* mpz/init2.c, mpz/realloc2.c: New files.
13545	* Makefile.am, mpz/Makefile.am: Add them.
13546	* gmp-h.in: Add prototypes.
13547	* gmp.texi (Efficiency): Mention these instead of _mpz_realloc.
13548	(Initializing Integers): Add documentation, reword other parts.
13549
135502001-11-22  Torbjorn Granlund  <tege@swox.com>
13551
13552	* mpn/cray/ieee/addmul_1.c: Fix logic for more_carries scalar loop.
13553	* mpn/cray/ieee/submul_1.c: Likewise.
13554
135552001-11-20  Kevin Ryde  <kevin@swox.se>
13556
13557	* gmp.texi (Known Build Problems): Note an out of memory on DJGPP.
13558	(Function Classes): Update function counts.
13559	Misc tweaks elsewhere.
13560
13561	* configure.in (AC_CHECK_DECLS): Add sscanf.
13562	* tests/misc/t-scanf.c: Use it, for the benefit of SunOS 4.
13563
13564	* tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREE
13565	consistency.
13566
13567	* mpfr/Makefile.am (AR): Explicit AR=@AR@ to override automake
13568	default, necessary for powerpc64 ABI=aix64.
13569
135702001-11-18  Torbjorn Granlund  <tege@swox.com>
13571
13572	* mpz/powm.c: Move TMP_MARK to before any TMP_ALLOCs.
13573
135742001-11-18  Kevin Ryde  <kevin@swox.se>
13575
13576	* configure.in (--enable-fft): Make this the default.
13577	* gmp.texi (Build Options): Update.
13578
13579	* Makefile.am (libmp_la_DEPENDENCIES): Revise mpz objects needed by
13580	new mpz/powm.c.
13581
13582	* gmp.texi (Random State Initialization): Add gmp_randinit_default and
13583	gmp_randinit_lc_2exp_size, mark gmp_randinit as obsolete.
13584	(Random State Seeding): New section, taken from "Random State
13585	Initialization" and "Random Number Functions".
13586
13587	* configure.in (AC_CHECK_DECLS): Add fgetc, fscanf, ungetc.
13588	* scanf/fscanffuns.c: Use these, for the benefit of SunOS 4.
13589
13590	* gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back to
13591	gmp-impl.h now not required for inlined mpf.
13592
13593	* randlc2s.c (gmp_randinit_lc_2exp_size): New file, the size-based LC
13594	selection from rand.c.
13595	* rand.c (gmp_randinit): Use it.
13596	* randdef.c (gmp_randinit_default): New file.
13597	* gmp-impl.h (RANDS): Use it.
13598	(ASSERT_CARRY): New macro.
13599	* gmp-h.in (gmp_randinit_default, gmp_randinit_lc_2exp_size: Add
13600	prototypes.
13601	* Makefile.am (libgmp_la_SOURCES): Add randdef.c and randlc2s.c.
13602
13603	* printf/asprntffuns.c: Include config.h before using its defines.
13604
13605	* gmp-impl.h: Move C++ <string> to top of file to avoid the memset
13606	redefine upsetting configure tests.  Remove <iostream> since <iosfwd>
13607	in gmp.h suffices.
13608
136092001-11-16  Kevin Ryde  <kevin@swox.se>
13610
13611	* gmp.texi (Integer Exponentiation): mpz_powm supports negative
13612	exponents.
13613	(Assigning Floats, I/O of Floats, C++ Formatted Output, C++ Formatted
13614	Input): Decimal point follows locale.
13615	(Formatted Output Strings): %n accepts any type.
13616	(Formatted Input Strings): New section.
13617	(Formatted Input Functions): New section.
13618	(C++ Class Interface): Corrections and clarifications suggested by
13619	Gerardo.
13620
13621	* scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
13622	scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c,
13623	scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files.
13624	* gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent
13625	additions.
13626
13627	* tests/misc: New directory.
13628	* tests/misc/Makefile.am: New file.
13629	* tests/misc/t-locale.c: New file.
13630	* tests/misc/t-printf.c: Moved from tests/printf.
13631	* tests/printf: Remove directory.
13632	* configure.in, tests/Makefile.am: Update.
13633
13634	* tests/cxx/t-locale.cc: New file.
13635	* tests/cxx/Makefile.am: Add it.
13636
13637	* mpf/set_str.c, cxx/ismpf.cc: Use localeconv for the decimal point.
13638
13639	* acinclude.m4 (GMP_ASM_X86_MCOUNT): Update to $lt_prog_compiler_pic
13640	for current libtool, recognise non-PIC style mcount in windows DLLs.
13641
13642	* gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.
13643
13644	* gmp-impl.h (__gmp_rands, __gmp_rands_initialized,
13645	modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test
13646	programs using them from a windows DLL.
13647	* longlong.h (__clz_tab): Ditto.
13648
13649	* mpn/x86/t-zdisp2.pl: New file.
13650
13651	* mpn/x86/pentium4/README: New file.
13652
136532001-11-15  Torbjorn Granlund  <tege@swox.com>
13654
13655	* mpz/powm.c (HANDLE_NEGATIVE_EXPONENT): #define to 1.
13656	* tests/mpz/reuse.c (main): Use mpz_invert to avoid undefined mpz_powm
13657	cases.
13658
136592001-11-14  Torbjorn Granlund  <tege@swox.com>
13660
13661	* mpz/powm_ui.c: Rewrite along the lines of mpz/powm.c (except still no
13662	redc).
13663	* mpz/powm.c: Adjust for negative b, after exponentiation done.  Add
13664	(still disabled) code for handling negative exponents.  Misc cleanups.
13665
136662001-11-14  Kevin Ryde  <kevin@swox.se>
13667
13668	* mpf/out_str.c: Use localeconv for the decimal point.
13669
13670	* tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
13671	available (eg. on mingw).
13672
136732001-11-11  Kevin Ryde  <kevin@swox.se>
13674
13675	* gmp-h.in: Remove parameter names from prototypes, to keep out of
13676	application namespace.
13677
136782001-11-08  Kevin Ryde  <kevin@swox.se>
13679
13680	* acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
13681	Solaris 8.
13682
13683	* printf/doprnt.c: Support %n of all types, per glibc.
13684
13685	* gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,
13686	mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c,
13687	mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order
13688	to leave open the possibility of keeping binary compatibility if mpf
13689	becomes mpfr.
13690
13691	* mpn/x86/k7/mmx/lshift.asm, mpn/x86/k7/mmx/rshift.asm: Use Zdisp to
13692	force code size for computed jumps.
13693	* mpn/x86/k6/mod_34lsub1.asm, mpn/x86/k6/k62mmx/copyd.asm: Use Zdisp
13694	to force good code alignment.
13695	* mpn/x86/x86-defs.m4 (Zdisp): More instructions.
13696
13697	* mpn/x86/pentium/sqr_basecase.asm, mpn/x86/k7/mmx/mod_1.asm,
13698	mpn/x86/k7/mmx/popham.asm: Remove some unnecessary "0" address offsets.
13699
13700	* mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
13701
137022001-11-07  Torbjorn Granlund  <tege@swox.com>
13703
13704	* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Work around gas bug.
13705
13706	* mpn/asm-defs.m4 (PROLOGUE): Change alignment to 8 (probably a good
13707	idea in general; required for hppa/hppa1_1/udiv_qrnnd.asm).
13708
137092001-11-06  Torbjorn Granlund  <tege@swox.com>
13710
13711	* gmp-impl.h (MPN_COPY_INCR): Prepend local variable by `__'.
13712	(MPN_COPY_DECR): Likewise.
13713
137142001-11-05  Torbjorn Granlund  <tege@swox.com>
13715
13716	* mpz/powm.c: Call mpn functions, not mpz functions, for computation
13717	mod m.  Streamline allocations to use a mixture of stack allocation and
13718	heap allocation.  Add currently disabled phi(m) exponent reduction
13719	code.  Misc optimizations and cleanups.
13720
137212001-11-05  Kevin Ryde  <kevin@swox.se>
13722
13723	* mpq/inp_str.c: Remove unused variable "ret".
13724
13725	* mpn/x86/k7/sqr_basecase.asm: Fix a 0(%edi) to use Zdisp, so the
13726	computed jumps hit the right spot on old gas.
13727
13728	* mpq/canonicalize.c: DIVIDE_BY_ZERO if denominator is zero.
13729
13730	* mpn/lisp/gmpasm-mode.el (comment-start-skip): Correction to the way
13731	the first \( \) pair is setup.
13732	(gmpasm-font-lock-keywords): Don't fontify the space before a "#" etc.
13733	Misc tweaks to some comments.
13734
137352001-11-03  Torbjorn Granlund  <tege@swox.com>
13736
13737	* tests/refmpn.c (refmpn_overlap_p): Reverse return values.
13738
137392001-11-02  Kevin Ryde  <kevin@swox.se>
13740
13741	* tune/many.pl: Setup CFLAGS_PIC and ASMFLAGS_PIC, since that's no
13742	longer done by configure.
13743
13744	* mpn/x86/pentium4/mmx/popham.asm: New file.
13745
13746	* mpn/x86/x86-defs.m4 (psadbw): New macro.
13747	* mpn/x86/k7/mmx/popham.asm: Use it.
13748
13749	* tests/refmpn.c (refmpn_overlap_p): New function, independent of
13750	MPN_OVERLAP_P.
13751
137522001-10-31  Torbjorn Granlund  <tege@swox.com>
13753
13754	* tests/mpz/t-powm.c: Print proper error message when finding
13755	discrepancy.
13756
137572001-10-31  Kevin Ryde  <kevin@swox.se>
13758
13759	* mpn/x86/pentium/mod_34lsub1.asm: New file.
13760	* mpn/x86/k7/mod_34lsub1.asm: New file.
13761	* mpn/x86/mod_34lsub1.asm: New file.
13762
137632001-10-30  Kevin Ryde  <kevin@swox.se>
13764
13765	* tests/printf/t-printf.c (check_misc): Add checks from the glibc docs.
13766	(check_vasprintf, check_vsnprintf): Run these unconditionally.
13767
13768	* gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.
13769	* mpq/cmp.c, mpq/cmp_si.c, mpq/cmp_ui.c, mpq/equal.c: Add ASSERTs for
13770	canonical inputs, where correctness depends on it.
13771
13772	* mpn/lisp/gmpasm-mode.el (comment-start-skip): Add "dnl".
13773
137742001-10-27  Torbjorn Granlund  <tege@swox.com>
13775
13776	* demos/pexpr.c: Remove some unused variables.
13777	(main): Allocate more buffer space to accommodate minus sign.
13778
137792001-10-27  Kevin Ryde  <kevin@swox.se>
13780
13781	* gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.h,
13782	tune/speed.c, tune/common.c, tune/many.pl, tests/devel/try.c: Add
13783	mpn_mod_34lsub1.
13784	* tests/refmpn.c, tests/tests.h (refmpn_mod_34lsub1): New function.
13785
13786	* mpn/generic/mod_34lsub1.c: New file.
13787	* mpn/x86/k6/mod_34lsub1.asm: New file.
13788	* mpn/x86/pentium4/sse2/mod_34lsub1.asm: New file.
13789	* mpn/x86/x86-defs.m4 (Zdisp): Add another instruction.
13790
13791	* gmp-h.in, gmpxx.h: Use <iosfwd> not whole <iostream>.
13792
13793	* gmp.texi (Known Build Problems): Add note on test programs with
13794	Windows DLLs.
13795
137962001-10-26  Kevin Ryde  <kevin@swox.se>
13797
13798	* tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
13799
13800	* gmp.texi (maybepagebreak): New macro, use it in a few places.
13801	(Notes for Particular Systems): C++ Windows DLLs are not supported.
13802	(Known Build Problems): Note sparc solaris 2.7 gcc 2.95.2 shared
13803	library problems.
13804	(Autoconf): Tweak version numbers shown.
13805	(Integer Roots): mpz_perfect_square_p and mpz_perfect_power_p consider
13806	0 and 1 perfect powers, mpz_perfect_power_p accepts negatives.
13807	(Number Theoretic Functions): Add mpz_millerrabin, combined with a
13808	reworded mpz_probab_prime_p.
13809	(Formatted Output Strings): Misc clarifications.
13810	(Formatted Output Functions): gmp_asprintf, gmp_vasprintf,
13811	gmp_snprintf, gmp_vsnprintf always available.
13812	(C++ Formatted Output): Misc rewordings.
13813	(Formatted Input): New chapter.
13814	(C++ Class Interface): New chapter, by Gerardo and me.
13815	(Language Bindings): Update GMP++ now in GMP.
13816	(C++ Interface Internals): New section, by Gerardo and me.
13817
13818	* printf/repl-vsnprintf.c: New file.
13819	* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am: Use it
13820	if libc vsnprintf missing or bad.
13821	* configure.in (AC_CHECK_FUNCS): Add strnlen.
13822
13823	* printf/snprntffuns.c, printf/vasprintf.c: Use
13824	__gmp_replacement_vsnprintf if libc vsnprintf not available.
13825	* printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
13826	printf/vsnprintf.c: Provide these functions unconditionally.
13827	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Remove warning about omissions
13828	when vsnprintf not available.
13829
138302001-10-24  Kevin Ryde  <kevin@swox.se>
13831
13832	* configure, aclocal.m4: Regenerate with a libtool patch for a stray
13833	quote in AC_LIBTOOL_PROG_LD_SHLIBS under mingw and cygwin.
13834
13835	* gmp-impl.h (modlimb_invert): More comments.
13836
13837	* printf/doprnt.c, printf/doprnti.c: Use the precision field to print
13838	leading zeros.
13839	* tests/printf/t-printf.c: Test this.
13840	* cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<.
13841
13842	* tune/speed.c, tune/speed.h, tune/common.c: Add mpn_mul_1_inplace.
13843
138442001-10-23  Torbjorn Granlund  <tege@swox.com>
13845
13846	* mpz/pprime_p.c (mpz_millerrabin): Remove function and its descendant.
13847
13848	* mpz/millerrabin.c: New file with code from pprime.c.
13849	* mpz/Makefile.am: Compile millerrabin.c.
13850	* Makefile.am (MPZ_OBJECTS): Ditto.
13851	* gmp-h.in: Declare mpz_millerrabin.
13852
138532001-10-22  Torbjorn Granlund  <tege@swox.com>
13854
13855	* tests/mpz/t-perfsqr.c: New file.
13856	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
13857
13858	* demos/factorize.c (factor): Check for number to factor == 0.
13859	(main): When invoked without arguments, read from stdin.
13860
13861	* mpz/perfpow.c: Add code to handle negative perfect powers ((-b)^odd).
13862	Treat 0 and 1 as perfect powers.
13863
13864	* mpn/sparc32/v9/sqr_diagonal.asm: Jump past .align.
13865
138662001-10-21  Torbjorn Granlund  <tege@swox.com>
13867
13868	* mpn/generic/perfsqr.c (sq_res_0x100): Remove bogus final `,'.
13869	(mpn_perfect_square_p): Suppress superfluous `&1' in sq_res_0x100 test.
13870	(mpn_perfect_square_p, O(n) test): Improve comments.  Combine remainder
13871	tests for some small primes.  Don't share code for different limb
13872	sizes.  Use single `if' with many `||' for better code density.
13873
138742001-10-22  Kevin Ryde  <kevin@swox.se>
13875
13876	* demos/perl/GMP.xs (mutate_mpz, tmp_mpf_grow): Make these "static".
13877
13878	* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm
13879	(mpn_popcount_table): Use GSYM_PREFIX.
13880
138812001-10-19  Kevin Ryde  <kevin@swox.se>
13882
13883	* mpn/x86/*.asm: Add some measured speeds on various x86s.
13884
13885	* tests/mpz/reuse.c, tests/mpf/reuse.c: Disable tests when using a
13886	windows DLL, because certain global variable usages won't compile.
13887
13888	* configure.in (AC_CHECK_FUNCS): Add alarm.
13889	* tests/spinner.c: Conditionalize alarm and SIGALRM availability, for
13890	the benefit of mingw32.
13891
13892	* acinclude.m4 (GMP_ASM_TYPE, GMP_ASM_SIZE): Suppress .type and .size
13893	on COFF.
13894
13895	* acinclude.m4 (GMP_PROG_HOST_CC): New macro.
13896	* configure.in: Use it for windows DLL cross-compiles.
13897	* aclocal.m4, configure: Regenerate with libtool patch to hold HOST_CC
13898	in the generated libtool script.
13899
13900	* aclocal.m4, configure: Regenerate with libtool patch to suppress
13901	warnings when probing command line limit on FreeBSD.
13902
13903	* demos/qcn.c (M_PI): Define if not already provided, helps mingw32.
13904
139052001-10-17  Kevin Ryde  <kevin@swox.se>
13906
13907	* printf/doprnt.c: Use <stdint.h> for intmax_t.
13908
13909	* longlong.h: Recognise __sparcv8 for gcc on Solaris.  Reported by
13910	Mark Mentovai <mark@mentovai.com>.
13911
13912	* gmp-impl.h (gmp_allocated_string): No need for inline on member funs.
13913
139142001-10-16  Kevin Ryde  <kevin@swox.se>
13915
13916	* gmp.texi (Debugging): Add mpatrol.
13917	(Integer Comparisons, Comparing Rationals, Float Comparison): Index
13918	entries for sign tests.
13919	(I/O of Floats): Clarify mpf_out_str exponent is in decimal.
13920	(C++ Formatted Output): mpf_t operator<< exponent now in decimal.
13921	(FFT Multiplication): Use an ascii art sigma.
13922	(Contributors): Add Gerardo Ballabio.
13923
13924	* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Always give mpf_t
13925	exponent in decimal, irrespective of ios::hex or ios::oct.
13926	* tests/cxx/t-ostream.cc (check_mpf): Update.
13927
13928	* printf/doprnt.c: Support %lln and %hhn.
13929
13930	* mpn/x86/pentium4/sse2/submul_1.asm: Use a psubq to negate the
13931	initial carry (helps the submul_1c case), and improve the comments.
13932
139332001-10-11  Kevin Ryde  <kevin@swox.se>
13934
13935	* acinclude.m4, configure.in (GMP_IMPL_H_IEEE_FLOATS): New macro.
13936
13937	* ltmain.sh: Send some rm errors to /dev/null, helps during compiles
13938	on Solaris 2.7 and HP-UX 10.
13939
13940	* tal-notreent.c: Renamed from stack-alloc.c.
13941	* Makefile.am, acinclude.m4, gmp-impl.h: Update.
13942
13943	* gmp-h.in: Don't give both prototypes and inlines, except on gcc.
13944
13945	* gmp-h.in, gmp-impl.h: Use #includes to get necessary standard
13946	classes, add std:: to prototypes.
13947	* cxx/*.cc, tests/cxx/t-ostream.cc: Add "use namespace std".
13948	* acinclude.m4 (GMP_PROG_CXX_WORKS): Ditto.
13949
13950	* tests/*/Makefile.in, mpfr/tests/Makefile.in: Regenerate with
13951	automake patch to avoid Ultrix problem with empty $(TESTS).
13952
13953	* */Makefile.in: Regenerate with automake patch to only rm *_.c in
13954	"make clean" when ansi2knr actually in use, helps DOS 8.3.
13955
13956	* Makefile.in: Regenerate with automake patch to fix stamp-h
13957	numbering, avoiding an unnecessary config.status run.
13958
139592001-10-09  Torbjorn Granlund  <tege@swox.com>
13960
13961	* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Use L macros for labels.
13962	Quote L reloc operator.
13963
13964	* gmp-impl.h: Declare class string.
13965
13966	* mpn/asm-defs.m4 (INT32, INT64): Quote $1 to prevent further
13967	expansion.
13968
13969	* mpn/alpha/ev6/mul_1.asm: New file.
13970
139712001-10-09  Kevin Ryde  <kevin@swox.se>
13972
13973	* gmp.texi (Introduction to GMP): Add pentium 4 to optimized CPUs.
13974	(Build Options): Note macos directory.
13975	(Notes for Package Builds): GMP 4 series binary compatible with 3.
13976	(Known Build Problems): Remove $* and ansi2knr note, now fixed, except
13977	possibly under --host=none.
13978	(Formatted Output Strings): Remove -1 prec for all digits.
13979
13980	* mpz/add.c, mpz/sub.c: Don't use mpz path on #include (helps macos).
13981	* mpbsd/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpz.
13982
13983	* printf/doprnt.c, tests/printf/t-printf.c: Remove support for %.*Fe
13984	prec -1 meaning all digits.
13985
13986	* acinclude.m4 (GMP_PROG_AR): Override libtool, use AR_FLAGS="cq".
13987	(GMP_HPC_HPPA_2_0): Print version string to config.log.
13988
13989	* Makefile.am (AUTOMAKE_OPTIONS): Remove check-news (permission notice
13990	in NEWS file is too big).
13991	(dist-hook): Don't distribute numbered or unnumbered emacs backups.
13992
13993	* Makefile.am, cxx/Makefile.am: Updates for Gerardo's stuff.
13994
139952001-10-09  Gerardo Ballabio  <ballabio@sissa.it>
13996
13997	* cxx/isfuns.cc: New file.
13998	* gmp-impl.h: Add prototypes.
13999	* cxx/ismpf.cc, cxx/ismpq.cc, cxx/ismpz.cc: New files.
14000	* gmp-h.in: Add prototypes.
14001	* gmpxx.h, mpfrxx.h: New files.
14002
140032001-10-08  Kevin Ryde  <kevin@swox.se>
14004
14005	* configure.in (with_tags): Establish a default based on --enable-cxx.
14006
14007	* aclocal.m4: Regenerate with libtool patches for sed char range to
14008	help Cray, LTCC quotes and +Z warnings grep to help HP-UX.
14009
14010	* gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,
14011	doprnt_final_t): Use _PROTO.
14012
140132001-10-05  Torbjorn Granlund  <tege@swox.com>
14014
14015	* mpn/asm-defs.m4 (INT32, INT64): Use LABEL_SUFFIX.
14016
14017	* mpn/hppa: Convert files to `.asm'.
14018
140192001-10-05  Kevin Ryde  <kevin@swox.se>
14020
14021	* mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
14022	cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
14023	* mpn/cpp-ccas: New file.
14024	* mpn/Makefile.am (EXTRA_DIST): Add it.
14025
14026	* tune/common.c, tune/speed.h: Change SPEED_ROUTINE_MPN_COPY_CALL uses
14027	to SPEED_ROUTINE_MPN_COPY or new SPEED_ROUTINE_MPN_COPY_BYTES.  Avoids
14028	macro expansion problems on Cray.
14029
14030	* configure.in (AC_PROG_CXXCPP): Add this, to make libtool happier.
14031
140322001-10-04  Torbjorn Granlund  <tege@swox.com>
14033
14034	* mpz/rrandomb.c (gmp_rrandomb): Change bit_pos to be 0-based (was
14035	1-based); shift 2 (was 1) when making bit mask.  These two changes
14036	avoid undefined shift counts.
14037	(gmp_rrandomb): Avoid most calls to _gmp_rand by caching random values.
14038
14039	* mpn/generic/random2.c: Changes for mirroring mpz/rrandomb.c.
14040
140412001-10-04  Kevin Ryde  <kevin@swox.se>
14042
14043	* gmp.texi (Build Options): Add --enable-cxx.
14044	(Notes for Particular Systems): Mention pentium4 performance and SSE2.
14045	(Known Build Problems): Remove vax jsobgtr note, no longer needed.
14046	(Converting Floats): Tweak mpf_get_str description.
14047	(Low-level Functions): Correction to mpn_gcdext destination space
14048	requirements.
14049	(C++ Formatted Output): New section.
14050	(Language Bindings): Add ALP
14051	(Contributors): Add Paul Zimmermann's square root, update my things.
14052
14053	* acinclude.m4 (GMP_PROG_CC_IS_GNU, GMP_PROG_CXX_WORKS): Send compiler
14054	errors to config.log.
14055
14056	* mpq/Makefile.am (INCLUDES): Remove -DOPERATION_$*, not needed.
14057
14058	* mpn/x86/*.asm: Change references to old README.family to just README.
14059
14060	* mpz/README: Remove file, now adequately covered in the manual.
14061
140622001-10-03  Torbjorn Granlund  <tege@swox.com>
14063
14064	* mpn/x86/pentium4/copyi.asm: New file.
14065	* mpn/x86/pentium4/copyd.asm: New file.
14066
14067	* gmp-impl.h: Implement separate MPN_COPY_INCR and MPN_COPY_DECR
14068	macros for CRAY systems.
14069	(CRAY _MPN_COPY): Delete.
14070
140712001-10-02  Kevin Ryde  <kevin@swox.se>
14072
14073	* tests/mpz/t-popcount.c (check_data): Use "~ (unsigned long) 0" to
14074	avoid compiler warnings on sco.
14075
14076	* mpbsd/Makefile.am: Compile mpz files directly, no copying.
14077	Use mpz/add.c and mpz/sub.c rather than mpz/aors.c.
14078	(INCLUDES): Remove -DOPERATION_$*, no longer needed (by mpz).
14079
14080	* mpz/aors.h: Renamed from mpz/aors.c.
14081	* mpz/add.c, mpz/sub.c: New files, using mpz/aors.h.
14082	* mpz/aors_ui.h: Renamed from mpz/aors_ui.c.
14083	* mpz/add_ui.c, mpz/sub_ui.c: New files, using mpz/aors_ui.h.
14084	* mpz/fits_s.h: Renamed and adapted from mpz/fits_s.c.
14085	* mpz/fits_sshort.c, mpz/fits_sint.c, mpz/fits_slong.c: New files.
14086	* mpz/mul_i.h: Renamed from mpz/mul_siui.c.
14087	* mpz/mul_ui.c, mpz/mul_ui.c: New files, using mpz/mul_i.h.
14088	* mpz/Makefile.am: Consequent updates.
14089	(INCLUDES): Remove -DOPERATION_$*.
14090
14091	* mpf/fits_s.h: Renamed and adapted from mpf/fits_s.c.
14092	* mpf/fits_sshort.c, mpf/fits_sint.c, mpf/fits_slong.c: New files.
14093	* mpf/fits_u.h: Renamed and adapted from mpf/fits_u.c.
14094	* mpf/fits_ushort.c, mpf/fits_uint.c, mpf/fits_ulong.c: New files.
14095	* mpf/Makefile.am: Consequent updates.
14096	(INCLUDES): Remove -DOPERATION_$*.
14097
14098	* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Don't use ios::hex etc
14099	as cases in a switch, they're not constant in g++ 3.0.
14100
14101	* mpn/Makeasm.am (.s.o, .s.obj, .S.o, .S.obj, .asm.o, .asm.obj):
14102	Locate source file with test -f the same as automake.
14103	(.S): Let CCAS do the preprocessing, and run libtool for .S.lo.
14104	(.asm.lo): Run libtool via m4-ccas to get new style foo.lo right.
14105	(COMPILE_FLAGS): Add $(DEFAULT_INCLUDES), per new automake.
14106	* mpn/m4-ccas: New file.
14107	* mpn/Makefile.am (EXTRA_DIST): Add it.
14108	* mpn/asm-defs.m4: Add m4_not_for_expansion(`DLL_EXPORT').
14109	* mpn/x86/x86-defs.m4: Undefine PIC if DLL_EXPORT is set.
14110	* configure.in (CFLAGS_PIC, ASMFLAGS_PIC): Remove, no longer needed.
14111
14112	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Warn what's omitted when
14113	vsnprintf not available.
14114
14115	* mpn/underscore.h: Remove file, not used since m68k converted to asm.
14116	* mpn/Makefile.am (EXTRA_DIST): Remove it.
14117
14118	* tests/refmpz.c: Add <stdlib.h>, for free().
14119
141202001-10-01  Torbjorn Granlund  <tege@swox.com>
14121
14122	* mpn/x86/pentium4/sse2/submul_1.asm: Apply some algebraic
14123	simplifications.
14124	* mpn/x86/pentium4/sse2/addmul_1.asm: Comment.
14125
141262001-10-01  Kevin Ryde  <kevin@swox.se>
14127
14128	* configure.in (--enable-cxx): New option for C++ support.
14129	Add cxx and tests/cxx subdirectories.
14130	* ltmain.sh, aclocal.m4: Update to libtool 2001-09-30.
14131
14132	* cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,
14133	cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files.
14134	* Makefile.am: Add them, in new libgmpxx.
14135	* gmp-h.in, gmp-impl.h: Prototypes and support.
14136	* tests/cxx/Makefile.am, tests/cxx/Makefile.in,
14137	tests/cxx/t-ostream.cc: New files.
14138
14139	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL,
14140	SPEED_ROUTINE_MPN_GCDEXT_ONE): mpn_gcdext needs size+1 for
14141	destinations.  Found by Torbjorn.
14142
14143	* gmp-h.in (__GNU_MP__, __GNU_MP_VERSION): Bump to 4.0.
14144	* mp-h.in (__GNU_MP__): Ditto.
14145	* gmp.texi, Makefile.am, compat.c: Amend version 3.2 to 4.0.
14146
14147	* acinclude.m4 (GMP_PROG_CXX_WORKS): New macro.
14148	(GMP_PROG_CC_WORKS): Write "conftest" test program, not a.out.
14149
14150	* gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.
14151	(GMP_ASPRINTF_T_INIT): New macro.
14152	(GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED().
14153	* printf/vasprintf.c: Use these.
14154
14155	* printf/asprntffuns.c: New file.
14156	* printf/Makefile.am, Makefile.am: Add it.
14157	* printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h
14158	(__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final):
14159	Move to asprntffuns.c, rename to __gmp and make global, remove
14160	spurious formal parameters from __gmp_asprintf_final.
14161
14162	* configure.in (j90-*-*, sv1-*-*): Don't duplicate $path in $add_path.
14163	(*-*-mingw*): Don't assemble with -DPIC (as per cygwin).
14164
14165	* printf/snprntffuns.c (gmp_snprintf_final): Remove spurious formal
14166	parameters.
14167
14168	* tune/tuneup.c (POWM_THRESHOLD): Reduce stop_factor to 1.1 to help
14169	Cray vector systems.
14170
14171	* tests/misc.c (tests_rand_start): Print GMP_CHECK_RANDOMIZE=NN to
14172	facilitate cut and paste when re-running.
14173	* tests/mpz/t-inp_str.c (check_data): Add more diagnostic prints.
14174
141752001-09-30  Kent Boortz  <kent@swox.com>
14176
14177	* macos/configure, macos/Makefile.in, macos/README: Updates for gmp 4.
14178	* gmp-h.in (_GMP_H_HAVE_FILE): Recognise Apple MPW.
14179
141802001-09-30  Torbjorn Granlund  <tege@swox.com>
14181
14182	* mpn/cray/ieee/submul_1.c: Rewrite.  Streamline multiplications;
14183	use `majority' logic.
14184
141852001-09-27  Torbjorn Granlund  <tege@swox.com>
14186
14187	* gmp-h.in (__GMPN_AORS_1): Rewrite to work around Cray compiler bug.
14188
141892001-09-26  Torbjorn Granlund  <tege@swox.com>
14190
14191	* mpn/x86/pentium4/sse2/gmp-mparam.h: New file.
14192
141932001-09-26  Kevin Ryde  <kevin@swox.se>
14194
14195	* mpn/x86/pentium4/sse2/dive_1.asm: New file.
14196	* mpn/x86/pentium4/sse2/submul_1.asm: New file.
14197	* mpn/x86/pentium4/sse2/sqr_basecase.asm: New file.
14198
14199	* mpn/x86/pentium/copyi.asm: New file, based on past work by Torbjorn.
14200	* mpn/x86/pentium/copyi.asm: New file, ditto.
14201	* mpn/x86/pentium/com_n.asm: Rewrite, ditto.
14202
14203	* printf/snprntffuns.c (gmp_snprintf_format): Copy va_list in case
14204	vsnprintf trashes it.
14205	* printf/vasprintf.c (gmp_asprintf_format): Ditto.
14206	* gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.
14207
14208	* tests/mpz/t-cmp_d.c (check_low_z_one): Patch by Torbjorn for vax
14209	limited float range.
14210
142112001-09-23  Torbjorn Granlund  <tege@swox.com>
14212
14213	* mpn/vax/lshift.s: Change `jsob*' to `sob*'.
14214	* mpn/vax/rshift.s: Likewise.
14215
142162001-09-23  Kevin Ryde  <kevin@swox.se>
14217
14218	* mpn/x86/pentium4/sse2/mul_basecase.asm: Some simple but real code.
14219
14220	* printf/doprnt.c: Use va_copy for va_list variables, copy function
14221	parameter in case it's call-by-reference.
14222
14223	* tune/freq.c (speed_cpu_frequency_bsd_dmesg): New function.
14224	(speed_cpu_frequency_table): Use it.
14225
14226	* tune/many.pl (popcount, hamdist): Fix declared return value.
14227	(sb_divrem_mn): Remove a spurious duplicate entry.
14228	(CLEAN): Add tmp-$objbase.c when using that for .h files.
14229	(macro_speed): Give a default for .h files.
14230	Add ATTRIBUTE_CONST or __GMP_ATTRIBUTE_PURE as appropriate.
14231
14232	* tune/speed.h (SPEED_ROUTINE_MPN_MOD_CALL,
14233	SPEED_ROUTINE_MPN_PREINV_MOD_1, SPEED_ROUTINE_MPN_POPCOUNT,
14234	SPEED_ROUTINE_MPN_HAMDIST, SPEED_ROUTINE_MPN_GCD_1N,
14235	SPEED_ROUTINE_MPN_GCD_1_CALL, SPEED_ROUTINE_MPZ_JACOBI): Use return
14236	values so gcc 3 won't discard calls to pure or const functions.
14237	(mpn_mod_1_div, mpn_mod_1_inv): Add __GMP_ATTRIBUTE_PURE.
14238
142392001-09-22  Torbjorn Granlund  <tege@swox.com>
14240
14241	* mpn/x86/pentium4/sse2/mul_basecase.asm: New file, placeholder
14242	for real code, hiding the default x86 mul_basecase.asm.
14243
142442001-09-22  Kevin Ryde  <kevin@swox.se>
14245
14246	* configure.in (AC_PREREQ): Bump to 2.52.
14247	(m4_pattern_forbid, m4_pattern_allow): New calls, forbid GMP_.
14248	(AC_CHECK_HEADERS): Remove sys/types.h, already done by autoconf.
14249	* acinclude.m4, configure.in (GMP_GCC_NO_CPP_PRECOMP): New macro.
14250
14251	* tests/devel/try.c (TYPE_PREINV_MOD_1): Don't run size==0.
14252	(malloc_region): Need fd=-1 for mmap MAP_ANON on BSD.
14253
142542001-09-20  Torbjorn Granlund  <tege@swox.com>
14255
14256	* mpz/cong.c (mpz_congruent_p): Fix one-limb c<d test.
14257
14258	* longlong.h: Rewrite __i370__ smul_ppmm; enable also for __s390__.
14259
14260	* configure.in: Add support for IBM 360, 370, 390 families.
14261
142622001-09-20  Kevin Ryde  <kevin@swox.se>
14263
14264	* mpn/x86/pentium4/sse2/diveby3.asm: New file.
14265	* mpn/x86/pentium4/sse2/mode1o.asm: New file.
14266
142672001-09-16  Kevin Ryde  <kevin@swox.se>
14268
14269	* printf/doprnt.c: '#' means showpoint and showtrailing for %e, %f, %g.
14270	* tests/printf/t-printf.c (check_f): More test cases.
14271
142722001-09-15  Torbjorn Granlund  <tege@swox.com>
14273
14274	* gmp-h.in (__GMPN_AORS_1): Remove param TEST, add OP and CB.
14275	Postpone zeroing of (cout).
14276	(__GMPN_ADD_1, __GMPN_SUB_1): Corresponding changes.
14277
142782001-09-14  Kevin Ryde  <kevin@swox.se>
14279
14280	* ChangeLog: Merge in tests/rand/ChangeLog.
14281	* tests/rand/ChangeLog: Remove file.
14282
14283	* printf/doprnt.c: Fix handling of a plain format after a GMP one; no
14284	need to protect against negative precision internally.
14285	* tests/printf/t-printf.c (check_misc): More checks.
14286
142872001-09-12  Torbjorn Granlund  <tege@swox.com>
14288
14289	* mpn/cray/ieee/invert_limb.c: Add a PROLOGUE in a comment to have
14290	HAVE_NATIVE_... defined.
14291
142922001-09-11  Kevin Ryde  <kevin@swox.se>
14293
14294	* configure.in, gmp-h.in (__GMP_HAVE_HOST_CPU_FAMILY_power,
14295	__GMP_HAVE_HOST_CPU_FAMILY_powerpc): New AC_SUBSTs.
14296	* gmp-h.in (__GMPN_COPY_INCR): Use them to select the power/powerpc
14297	code, rather than preprocessor defines.
14298
14299	* acinclude.m4, configure.in (GMP_H_ANSI): New macro.
14300
14301	* gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
14302
14303	* gmp-h.in, version.c (gmp_version): Make the pointer "const" as well
14304	as the string.
14305
14306	* acinclude.m4, configure.in (GMP_PROG_CC_IS_XLC): Recognise xlc when
14307	invoked under another name (cc, xlc128, etc).
14308	* acinclude.m4 (GMP_PROG_CC_IS_GCC): Print a message when recognised.
14309
143102001-09-11  Torbjorn Granlund  <tege@swox.com>
14311
14312	* gmp-h.in: Let __DECC mean __GMP_HAVE_CONST, etc.
14313	* mp-h.in: Likewise.
14314
143152001-09-10  Torbjorn Granlund  <tege@swox.com>
14316
14317	* mpn/x86/pentium4/mmx/lshift.asm: New file.
14318	* mpn/x86/pentium4/mmx/rshift.asm: New file.
14319
14320	* tests/mpn/t-iord_u.c (check_incr_data): Work around HP compiler bug.
14321	(check_decr_data): Likewise.
14322
143232001-09-08  Kevin Ryde  <kevin@swox.se>
14324
14325	* gmp.texi (Integer Logic and Bit Fiddling): Update mpz_hamdist
14326	behaviour, clarify mpz_popcount a touch.
14327	(Language Bindings): Add mlton, fix alphabetical order.
14328	(Single Limb Division): Describe 2 or 1/2 limbs at a time style.
14329
14330	* configure.in (AC_CHECK_FUNCS): Add mmap.
14331	* tests/devel/try.c (malloc_region): Use mmap if available.
14332
14333	* tests/refmpz.c, tests/tests.h (refmpz_hamdist): New function.
14334	* tests/mpz/t-hamdist.c: New file.
14335	* tests/mpz/Makefile.am: Add it.
14336
14337	* mpz/hamdist.c: Support neg/neg operands.
14338
14339	* macos/Makefile.in: Remove dual compile of mpq/aors.c and
14340	mpn/generic/popham.c.
14341
14342	* gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.
14343	For 64-bits reuse 0x33...33 constant.
14344	* mpn/generic/popcount.c, mpn/generic/hamdist.c: Split from popham.c,
14345	use popc_limb macro, remove unused "i", don't bother with "register"
14346	qualifiers.
14347	* mpn/generic/popham.c: Remove file.
14348
14349	* ltmain.sh, configure, aclocal.m4: Update to libtool 1.4.1, with one
14350	ltdll.c generation patch.
14351	* doc/configuration: Misc updates, note libtool patch used.
14352
14353	* mpn/x86/pentium4/sse2/mul_1.asm: Use pointer increments not indexed
14354	addressing, to get 4.0 c/l flat.
14355
14356	* tests/mpq/t-cmp_si.c (check_data): Use ULONG_MAX for denominators.
14357
14358	* tests/misc.c (mpz_negrandom): Use given rstate, not RANDS.
14359
143602001-09-07  Torbjorn Granlund  <tege@swox.com>
14361
14362	* mpn/x86/pentium4/sse2/addmul_1.asm: New file.
14363
143642001-09-04  Kevin Ryde  <kevin@swox.se>
14365
14366	* tune/freq.c: Define a HAVE for each speed_cpu_frequency routine to
14367	avoid duplicating conditionals.
14368	(speed_cpu_frequency_sco_etchw): New function.
14369	(speed_cpu_frequency_table): Use it.
14370	* tune/README: Mention SCO openunix 8 /etc/hw.
14371
14372	* mpz/fib_ui.c: Use ?: to avoid a gcc 3 bug on powerpc64.
14373	Store back a carry for limb<long.
14374
14375	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/k7/mmx/mod_1.asm,
14376	mpn/x86/p6/mmx/divrem_1.asm: Fix a couple of comments.
14377
14378	* config.guess: Give m68020 for 68020 or better, not m68k.
14379	* configfsf.guess: Update to 2001-09-04.
14380
143812001-09-02  Kevin Ryde  <kevin@swox.se>
14382
14383	* configure.in (m68k-*-*): Let m68k mean 68000, not 68020.
14384	* gmp.texi (Notes for Particular Systems): Update.
14385
14386	* gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since int
14387	might be only 16 bits.
14388
14389	* tests/mpq/t-aors.c: New file.
14390	* tests/mpq/Makefile.am: Add it.
14391
14392	* tests/refmpq.c: New file.
14393	* tests/Makefile.am: Add it.
14394	* tests/tests.h: Add prototypes.
14395
14396	* mpq/aors.c: Share object code for mpq_add and mpq_sub.
14397	* Makefile.am, mpq/Makefile.am: Single mpq/aors.lo now.
14398
14399	* tests/devel/try.c (TYPE_SUBMUL_1): Use correct reference routine.
14400
144012001-08-30  Kevin Ryde  <kevin@swox.se>
14402
14403	* mpn/x86/x86-defs.m4 (cmov_available_p): Add pentium4.
14404
14405	* gmp-h.in: Put #define renamings with prototypes.
14406	Remove commented out #defines of gmp-impl.h things.
14407	(mpn_invert_limb): Remove #define, already in gmp-impl.h.
14408	(mpn_lshiftc, mpn_rshiftc): Remove #defines, unused.
14409	(mpn_addsub_nc): Add prototype to #define.
14410
144112001-08-28  Kevin Ryde  <kevin@swox.se>
14412
14413	* gmp.texi: Switch to GFDL.
14414	(Top): Arrange copyright and conditions to appear here too.  For
14415	clarity have all this before the miscellaneous macro definitions.
14416	(Copying): Refer to COPYING.LIB file, mention plain GPL2 in demo
14417	programs.
14418	(Contributors, References): Use @appendix rather than @unnumbered.
14419	(GNU Free Documentation License): New appendix.
14420	(@contents): Move to start of document, use only for tex (not html).
14421	(Debugging): Add leakbug.
14422	(Build Options): Add pentium4.
14423	(I/O of Rationals): Add mpq_inp_str.
14424
14425	* fdl.texi: New file, with two @appendix directive tweaks.
14426	* Makefile.am (gmp_TEXINFOS): Add it.
14427
14428	* tests/mpz/io.c: Check mpz_inp_str return against ftell, send error
14429	messages just to stdout.
14430
14431	* mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function,
14432	and share a __gmp_free_func call.
14433	* mpq/inp_str.c: New file.
14434	* Makefile.am, mpq/Makefile.am: Add it.
14435	* tests/mpq/t-inp_str.c: New file.
14436	* tests/mpq/Makefile.am (check_PROGRAMS): Add it.
14437
14438	* configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,
14439	HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs
14440	for processor families.
14441	* gmp-impl.h: Use them, rather than cpp defines.
14442
14443	* demos/Makefile.am (primes_LDADD): Use $(LIBM), for log().
14444
14445	* tune/many.pl, tune/Makefile.am: Fix some from clean and distclean.
14446
144472001-08-26  Kevin Ryde  <kevin@swox.se>
14448
14449	* tests/devel/try.c (ARRAY_ITERATION): Make types match on "?:" legs.
14450	(TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER): Remove some superseded code.
14451
14452	* tests/printf/t-printf.c (check_plain): Don't compare "all digits"
14453	precision against plain printf.
14454
14455	* tune/Makefile.am: Eliminate empty TUNE_MPZ_SRCS.
14456
14457	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.52.
14458	* */Makefile.in, mdate-sh, missing, aclocal.m4, configure: Update to
14459	automake 1.5.
14460	* configfsf.guess, configfsf.sub: Update to 2001-08-23.
14461
144622001-08-24  Torbjorn Granlund  <tege@swox.com>
14463
14464	* demos/primes.c: Complete rewrite.
14465
144662001-08-24  Kevin Ryde  <kevin@swox.se>
14467
14468	* longlong.h: Test __ppc__ for apple darwin cc, reported by Jon
14469	Becker.  Also test __POWERPC__, PPC and __vxworks__.
14470
14471	* tune/speed.h (speed_cyclecounter) [x86]: Don't clobber ebx in PIC.
14472
144732001-08-22  Kevin Ryde  <kevin@swox.se>
14474
14475	* configure.in (x86 mmx): Correction to mmx path stripping.
14476
144772001-08-17  Kevin Ryde  <kevin@swox.se>
14478
14479	* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,
14480	tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++
14481	support, for the time being.
14482	* printf/doprntfx.cc, doprntix.cc, osfuns.cc, osmpf.cc, osmpq.cc,
14483	osmpz.cc, tests/printf/t-ostream.cc: Remove files.
14484
14485	* printf/doprnt.c, printf/doprntf.c, gmp-impl.h: Use a single
14486	__gmp_doprnt_mpf, rather than a separate ndigits calculation.
14487	* printf/doprnt.c, printf/doprntf.c, gmp-impl.h, gmp.texi,
14488	tests/printf/t-printf.c: Let empty or -1 prec mean all digits for mpf.
14489	* printf/doprnt.c, tests/printf/t-printf.c: Accept h or l in %n; let
14490	negative "*" style width mean left justify.
14491
14492	* gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro,
14493	extracted from mpf/get_str.c.
14494
14495	* libmp.sym: New file.
14496	* Makefile.am (libmp_la_LDFLAGS): Use it.
14497	(DISTCLEANFILES): Remove asm-syntax.h, no longer generated.
14498	Remove some comments about "make check".
14499
14500	* demos/perl/GMP.pm, GMP.xs, GMP/Mpf.pm: Add printf and sprintf,
14501	change get_str to string/exponent for floats, remove separate
14502	mpf_get_str.
14503	* demos/perl/GMP/Mpf.pm (overload_string): Use $# (default "%.g").
14504	* demos/perl/typemap: Fix some duplicate string entries.
14505	* demos/perl/test.pl: Update tests, split overloaded constants into ...
14506	* demos/perl/test2.pl: ... this new file.
14507	* demos/perl/Makefile.PL (clean): Add test.tmp.
14508
145092001-08-16  Kevin Ryde  <kevin@swox.se>
14510
14511	* printf/snprntffuns.c (gmp_snprintf_format): Correction to bufsize-1
14512	return value handling.
14513
14514	* demos/calc/calc.y: Reposition "%{" so copyright notice gets into
14515	generated files.
14516
14517	* INSTALL: Use gmp_printf.
14518
145192001-08-14  Kevin Ryde  <kevin@swox.se>
14520
14521	* mpz/inp_str.c: Fix return value (was 1 too big).
14522	* tests/mpz/t-inp_str.c: New file.
14523	* tests/mpz/Makefile.am: Add it.
14524
14525	* mpn/x86/pentium4/sse2/add_n.asm: New file.
14526	* mpn/x86/pentium4/sse2/sub_n.asm: New file.
14527	* mpn/x86/pentium4/sse2/mul_1.asm: New file.
14528
145292001-08-12  Kevin Ryde  <kevin@swox.se>
14530
14531	* printf/sprintffuns.c, printf/doprntf.c: Don't use sprintf return
14532	value (it's a pointer on SunOS 4).
14533
14534	* acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
14535	* configure.in: Add pentium4 support.
14536	* mpn/x86/pentium4, mpn/x86/pentium4/mmx, mpn/x86/pentium4/sse2: New
14537	directories.
14538	* mpn/x86/README: Update.
14539
145402001-08-10  Torbjorn Granlund  <tege@swox.com>
14541
14542	* demos/pexpr.c (setup_error_handler): Catch also SIGABRT.
14543
145442001-07-31  Kevin Ryde  <kevin@swox.se>
14545
14546	* tests/refmpn.c (refmpn_mul_1c): Allow low to high overlaps.
14547
14548	* gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.
14549
14550	* tune/Makefile.am (EXTRA_DIST): Add many.pl.
14551
145522001-07-28  Kevin Ryde  <kevin@swox.se>
14553
14554	* gmp.texi (Random Number Functions): Old rand functions no longer use
14555	the C library.
14556
14557	* configure.in, acinclude.m4 (GMP_FUNC_VSNPRINTF): New macro.
14558
14559	* mpn/generic/get_str.c: Add an ASSERT for high limb non-zero.
14560
145612001-07-24  Kevin Ryde  <kevin@swox.se>
14562
14563	* gmp.texi (Build Options): Add --enable-cxx.
14564	(Converting Floats): Note mpf_get_str only generates accurately
14565	representable digits.
14566	(Low-level Functions): Note mpn_get_str requires non-zero high limb.
14567	(Formatted Output): New chapter.
14568	(Multiplication Algorithms): Use @quotation with @multitable.
14569	(Toom-Cook 3-Way Multiplication): Ditto.
14570
14571	* tests/memory.c (tests_free_nosize): New function.
14572	* tests/tests.h (tests_allocate etc): Add prototypes.
14573
14574	* tests/printf: New directory.
14575	* tests/printf/Makefile.am, t-printf.c, t-ostream.cc: New files.
14576	* configure.in, tests/Makefile.am: Add them.
14577
14578	* configure.in, acinclude.m4 (GMP_PROG_CXX): New macro.
14579	* configure.in (--enable-cxx): New option.
14580	(AC_CHECK_HEADERS): Add locale.h and sys/types.h, remove unistd.h.
14581	(AC_CHECK_TYPES): Add intmax_t, long double, long long, ptrdiff_t,
14582	quad_t.
14583	(AC_CHECK_FUNCS): Add localeconv, memset, obstack_vprintf, snprintf,
14584	strchr, vsnprintf.
14585	(AC_CHECK_DECLS): Add vfprintf.
14586
14587	* gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.
14588
14589	* printf: New directory.
14590	* printf/Makefile.am, asprintf.c, doprnt.c, doprntf.c, doprntfx.cc,
14591	doprnti.c, doprntix.cc, fprintf.c, obprintf.c, obprntffuns.c,
14592	obvprintf.c, osfuns.cc, osmpf.cc, osmpq.cc, osmpz.cc, printf.c,
14593	printffuns.c, snprintf.c, snprntffuns.c, sprintf.c, sprintffuns.c,
14594	vasprintf.c, vfprintf.c, vprintf.c, vsnprintf.c, vsprintf.c: New
14595	files.
14596	* configure.in, Makefile.am: Add them.
14597
14598	* configure.in (HAVE_INLINE): Remove AC_DEFINE, unused.
14599	(AC_CHECK_TYPES): Don't test for void, assume it always exists.
14600
14601	* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
14602	* mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
14603
14604	* gmp-impl.h (mpn_fib2_ui): Use __MPN.
14605	(MPN_COPY_DECR): Fix an ASSERT.
14606	(CAST_TO_VOID): Remove macro.
14607
14608	* gmp-h.in (mpq_out_str): Give #define even without prototype.
14609	(mpz_cmp_d, mpz_cmpabs_d): Corrections to #defines.
14610
14611	* tests/devel/try.c: Add mpn_add and mpn_sub, don't use CAST_TO_VOID.
14612
146132001-07-23  Torbjorn Granlund  <tege@swox.com>
14614
14615	* config.guess: Recognize pentium4.
14616	* config.sub: Recognize pentium4.
14617
146182001-07-17  Kevin Ryde  <kevin@swox.se>
14619
14620	* gmp-h.in (__GMPN_AORS_1): Remove x86 and gcc versions, leave just
14621	one version.
14622	(__GMPN_ADD, __GMPN_SUB): New macros, rewrite of mpn_add and mpn_sub.
14623	(mpn_add, mpn_sub): Use them.
14624	(__GMPN_COPY_REST): New macro.
14625
14626	* gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L and
14627	__GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of
14628	LSYM_PREFIX.
14629
146302001-07-11  Kevin Ryde  <kevin@swox.se>
14631
14632	* gmp-h.in (__GMPN_ADD_1 etc) [x86]: Don't use this on egcs 2.91.
14633
14634	* mpz/fits_uint.c, fits_ulong.c, mpz/fits_ushort.c: Split up fits_u.c.
14635	* mpz/fits_u.c: Remove file.
14636	* mpz/Makefile.am, macos/Makefile.in: Update.
14637
14638	* tests/refmpn.c,tests.h (refmpn_copy): New function.
14639	* tests/devel/try.c (TYPE_ZERO): No return value from call.
14640	(TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD): Share call with
14641	TYPE_MOD_1 and TYPE_MOD_1C.
14642	(MPN_COPY, __GMPN_COPY, __GMPN_COPY_INCR): Add testing.
14643
146442001-07-10  Kevin Ryde  <kevin@swox.se>
14645
14646	* gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.
14647	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
14648	* mpn/powerpc64/copyi.asm, mpn/powerpc64/copyd.asm: Remove files.
14649
14650	* mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on
14651	i386 gcc 2.95.x), remove a bogus comment about quotient.
14652
14653	* errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,
14654	__gmp_sqrt_of_negative): New functions.
14655	* gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them.
14656
14657	* randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.
14658
146592001-07-07  Kevin Ryde  <kevin@swox.se>
14660
14661	* configure.in (powerpc*-*-*): Use -no-cpp-precomp for Darwin.
14662
14663	* tests/mpbsd/t-itom.c: Renamed from t-misc.c.
14664	* tests/mpbsd/t-misc.c: Remove file.
14665	* tests/mpbsd/Makefile.am: Update.
14666
14667	* tests/mpf/t-set_si.c,t-cmp_si.c,t-gsprec.c: Split from t-misc.c.
14668	* tests/mpf/t-misc.c: Remove file.
14669	* tests/mpf/Makefile.am: Update.
14670
14671	* tests/mpz/t-oddeven.c,t-set_si.c,t-cmp_si.c: Split from t-misc.c.
14672	* tests/mpz/t-misc.c: Remove file.
14673	* tests/mpz/Makefile.am: Update.
14674
14675	* stack-alloc.c: Add some alignment ASSERTs.
14676
14677	* gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
14678
14679	* tests/devel/try.c (MPN_ZERO): Add testing.
14680	* tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
14681
14682	* mpn/x86/divrem_1.asm: Update a remark about gcc and "loop".
14683
14684	* tests/mpq/t-cmp_si.c: New file.
14685	* tests/mpq/Makefile.am: Add it.
14686
14687	* tests/misc.c,tests.h (mpq_set_str_or_abort): New function.
14688
14689	* mpq/cmp_si.c: New file.
14690	* Makefile.am, mpq/Makefile.am: Add it.
14691	* gmp-h.in (mpq_cmp_si): Add prototype.
14692	* gmp.texi (Comparing Rationals): Add doco.
14693
14694	* gmp-h.in (_GMP_H_HAVE_FILE): Add _FILE_DEFINED for microsoft, add
14695	notes on what symbols are for what systems.
14696
146972001-07-06  Torbjorn Granlund  <tege@swox.com>
14698
14699	* longlong.h (ibm032 umul_ppmm): Fix typo.
14700	* longlong.h (sparclite sdiv_qrnnd): Fix typo.
14701
147022001-07-03  Kevin Ryde  <kevin@swox.se>
14703
14704	* mpz/bin_ui.c (DIVIDE): Use MPN_DIVREM_OR_DIVEXACT_1.
14705	* mpz/bin_uiui.c (MULDIV): Ditto, and use local variables for size and
14706	pointer.
14707
14708	* acinclude.m4 (GMP_INCLUDE_GMP_H): New macro, use it everywhere gmp.h
14709	is wanted at configure time.
14710	* acinclude.m4, configure.in (GMP_H_EXTERN_INLINE, GMP_H_HAVE_FILE):
14711	New macros.
14712
14713	* gmp-h.in (__GMP_EXTERN_INLINE): Set to "inline" for C++.
14714	(mpn_add, mpn_sub): Use new style __GMP_EXTERN_INLINE.
14715	* gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.
14716	* mpn/generic/add.c, mpn/generic/sub.c: New files.
14717	* mpn/generic/inlines.c: Remove file.
14718	* configure.in, mpn/Makefile.am: Update.
14719
14720	* gmp.texi (GMP Basics): Note the need for stdio.h to get FILE
14721	prototypes.
14722
147232001-07-01  Kevin Ryde  <kevin@swox.se>
14724
14725	* gmp.texi (Build Options, Reentrancy): Updates for new
14726	--enable-alloca behaviour.
14727	(Debugging): Describe --enable-alloca=debug.
14728	(Miscellaneous Integer Functions): Note mpz_sizeinbase ignores signs.
14729	(Low-level Functions): Give a formula for mpn_gcdext cofactor.
14730	(Factorial Algorithm): New section.
14731	(Binomial Coefficients Algorithm): New section.
14732	Misc tweaks elsewhere.
14733
14734	* mpf/set_prc.c: Merge the two truncation conditionals, misc cleanups,
14735	no functional changes.
14736
14737	* mpn/*/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Add tuned values.
14738	* gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
14739	2*UMUL_TIME < UDIV_TIME.
14740
14741	* mpn/x86/p6/dive_1.asm: New file.
14742
14743	* mpn/x86/dive_1.asm: New file.
14744	* mpn/x86/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Use it always.
14745
14746	* tests/refmpn.c, tests.h (refmpn_zero): New function.
14747	* tests/devel/try.c: Use it.
14748
14749	* tests/refmpn.c (refmpn_sb_divrem_mn): Use refmpn_cmp, not mpn_cmp.
14750
14751	* tests/mpf/t-get_d.c (main): Use || not |.
14752
14753	* tests/misc.c, tests/t-modlinv.c, tests/mpq/t-get_str.c,
14754	tests/mpf/reuse.c: Add string.h.
14755
147562001-06-29  Kevin Ryde  <kevin@swox.se>
14757
14758	* tune/speed.h (SPEED_ROUTINE_MPN_FIB2_UI,
14759	SPEED_ROUTINE_COUNT_ZEROS_C): Corrections to TMP block handling.
14760
14761	* gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):
14762	Corrections to these to account for adding tD into E.
14763	(MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size
14764	assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them.
14765	(MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
14766
14767	* assert.c: Add stdlib.h for abort prototype.
14768	* tests/spinner.c, trace.c, t-constants.c, t-count_zeros.c,
14769	t-gmpmax.c, t-modlinv.c: Ditto.
14770	* tests/mpz/t-bin.c, t-cmp.c, t-get_si.c, t-misc.c, t-popcount.c,
14771	t-set_str.c, t-sizeinbase.c: Ditto.
14772	* tests/mpq/t-equal.c, t-get_str.c, t-set_f.c, t-set_str.c: Ditto.
14773	* tests/mpf/t-fits.c, t-get_d.c, t-get_si.c, t-int_p.c, t-misc.c,
14774	t-trunc.c: Ditto.
14775	* tests/mpbsd/allfuns.c, t-misc.c: Ditto.
14776
14777	* mpn/generic/mul_n.c, mpz/cfdiv_r_2exp.c: Use MPN_INCR_U rather than
14778	mpn_incr_u.
14779
14780	* tests/devel/try.c (TYPE_SB_DIVREM_MN): More fixes for calling method.
14781
14782	* mpn/x86/k6/cross.pl: More insn exceptions.
14783
147842001-06-23  Kevin Ryde  <kevin@swox.se>
14785
14786	* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1) [i386]: Fix some asm output
14787	constraints.
14788
14789	* gmp-impl.h (modlimb_invert): Mask after shifting, so mask constant
14790	fits a signed byte.
14791
14792	* tests/devel/try.c (TYPE_SB_DIVREM_MN): Fix initial fill of quotient
14793	with garbage.
14794
147952001-06-20  Kevin Ryde  <kevin@swox.se>
14796
14797	* config.guess (rs6000-*-aix4* | powerpc-*-aix4*): Suppress error
14798	messages if $CC_FOR_BUILD or program don't work.
14799
14800	* mpz/sqrt.c,sqrtrem.c: Special case for op==0, to avoid TMP_ALLOC(0).
14801	* tests/refmpf.c (refmpf_add, refmpf_sub): Avoid TMP_ALLOC(0).
14802
14803	* tests/mpn/t-aors_1.c: New file.
14804	* tests/mpn/Makefile.am: Add it.
14805
14806	* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1): New macros, rewrite of
14807	mpn_add_1 and mpn_sub_1, better code for src==dst and/or n==1,
14808	separate versions for gcc x86, gcc generic, and non-gcc.
14809	(mpn_add_1, mpn_sub_1): Use them.
14810	(mpn_add, mpn_sub): Ditto, to get inlines on all compilers.
14811	(extern "C") [__cplusplus]: Let this encompass the extern inlines too.
14812	* mpn/generic/add_1.c,sub_1.c: New files, force code from gmp.h.
14813	* configure.in, mpn/Makefile.am: Add them.
14814
14815	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
14816	rather than AC_DEFINE LSYM_PREFIX.
14817	* gmp-h.in (__GMP_LSYM_PREFIX): New substitution.
14818	(__GMP_ASM_L): New macro.
14819	* gmp-impl.h (ASM_L): Use it.
14820
14821	* acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
14822	* gmp-impl.h: Use it for all the malloc based TMP_ALLOCs.
14823
14824	* stack-alloc.h: Remove file.
14825	* tal-reent.c: New file.
14826	* Makefile.am: Update.
14827
14828	* acinclude.m4, configure.in (GMP_OPTION_ALLOCA): New macro, add
14829	malloc-reentrant method, use stack-alloc.c as malloc-notreentrant,
14830	make "reentrant" the default.
14831	* gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to
14832	determine the value, and demand only 4 bytes align on 32-bit systems.
14833	* gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of
14834	stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
14835	* gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations.
14836	* stack-alloc.c (tmp_stack): Move private parts of stack-alloc.h to
14837	here, use gmp-impl.h.
14838
14839	* gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
14840	* mpz/fib_ui.c, mpz/jacobi.c, mpq/cmp.c, mpn/generic/fib2_ui.c: Use it.
14841
14842	* mpfr/exp2.c: Patch by Paul to match TMP_MARK and TMP_FREE in loop.
14843	* mpfr/sqrt.c: Scope nested TMP_DECL into nested { } block, patch by
14844	Paul, tweaked by me.
14845	* mpfr/agm.c: Ditto, and add a final TMP_FREE(marker2).
14846
14847	* gmp-h.in (mpn_cmp): Add __GMP_ATTRIBUTE_PURE.
14848
14849	* INSTALL: Clarify "make install", tweak formatting a bit.
14850
148512001-06-17  Kevin Ryde  <kevin@swox.se>
14852
14853	* configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,
14854	selected with --enable-alloca=debug.
14855	* tal-debug.c: New file.
14856	* configure.in, Makefile.am: Compile stack-alloc.c only for
14857	--disable-alloca.
14858	* assert.c (__gmp_assert_header): New function, split from
14859	__gmp_assert_fail.
14860
14861	* mpz/lcm.c: Don't TMP_MARK and then just return. Remove unnecessary
14862	_mpz_realloc prototype.
14863
14864	* mpn/generic/mul.c (mpn_sqr_n): Use __gmp_allocate_func for toom3
14865	temporary workspace.
14866
148672001-06-15  Kevin Ryde  <kevin@swox.se>
14868
14869	* tests/mpz/t-set_f.c: New file.
14870	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14871
14872	* mpz/set_f.c: Share MPN_COPY between pad and trunc cases, do exp<=0
14873	test earlier, store SIZ(w) earlier.
14874
14875	* tests/t-count_zeros.c: New file.
14876	* tests/t-gmpmax.c: New file.
14877	* tests/Makefile.am (check_PROGRAMS): Add them.
14878
14879	* mp_clz_tab.c: Compile the table only if longlong.h says it's needed;
14880	add an internal-use-only comment.
14881	* tune/common.c: Force a __clz_tab for convenience when testing.
14882
14883	* mpn/x86/pentium/gmp-mparam.h, mpn/x86/pentium/mmx/gmp-mparam.h: Add
14884	COUNT_LEADING_ZEROS_NEED_CLZ_TAB, for mod_1.asm.
14885
14886	* longlong.h (count_leading_zeros) [pentium]: Decide to go with float
14887	method for p54.
14888	(count_leading_zeros) [alpha]: Add COUNT_LEADING_ZEROS_NEED_CLZ_TAB.
14889	(__clz_tab): Provide a prototype only if it's needed.
14890
14891	* tests/trace.c (mpz_trace): Don't use = on structures.
14892	(mpn_trace): Set _mp_alloc when creating mpz.
14893
148942001-06-12  Kevin Ryde  <kevin@swox.se>
14895
14896	* mpn/x86/divrem_1.asm: Amend some comments about P5 speed.
14897
14898	* tune/README: Clarify reconfigure on gmp-mparam.h update.
14899
14900	* mpn/x86/p6/copyd.asm: New file.
14901	* mpn/x86/p6/README: Update copyd and mod_1.
14902	* mpn/x86/copyd.asm: Amend some comments.
14903
14904	* gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.
14905	(mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the
14906	generic code on gcc.
14907
14908	* gmp-impl.h (ASSERT_ZERO_P, ASSERT_MPN_NONZERO_P): New macros.
14909	* mpn/generic/gcd_1.c, mpn/generic/mul_fft.c: Use them.
14910	* mpz/get_d.c: Add a private mpn_zero_p.
14911	* mpfr/trunc.c: Use own mpn_zero_p.
14912	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_1N): Use refmpn_zero_p.
14913	* gmp-impl.h (mpn_zero_p): Remove, no longer needed.
14914
14915	* gmp-h.in, gmp-impl.h: Move MPN_CMP to gmp.h as __GMPN_CMP, leave an
14916	MPN_CMP alias in gmp-impl.h.
14917	* gmp-h.in (mpn_cmp): Add an inline version.
14918	* mpn/generic/cmp.c: Use __GMP_FORCE_mpn_cmp to get code from gmp.h.
14919
14920	* acinclude.m4 (GMP_C_ATTRIBUTE_MODE): New macro.
14921	* configure.in: Call it.
14922	* gmp-impl.h (SItype etc): Use it.
14923
14924	* randraw.c (lc): Change mpn_mul_basecase->mpn_mul,
14925	mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
14926
14927	* longlong.h (count_leading_zeros) [pentiumpro]: Work around a partial
14928	register stall on gcc < 3.
14929
14930	* gmp.texi (Introduction to GMP): Add IA-64.
14931	(Notes for Particular Systems): i386 means generic x86.
14932
14933	* tests/t-modlinv.c: Use tests_start and tests_end.
14934
149352001-06-10  Kevin Ryde  <kevin@swox.se>
14936
14937	* gmp.texi (Number Theoretic Functions): mpz_jacobi only defined for b
14938	odd.  Separate the jacobi/legendre/kronecker descriptions.
14939	(Low-level Functions): Document mpn_mul_1 "incr" overlaps.
14940	(Language Bindings): New chapter.
14941
14942	* mpz/jacobi.c: Don't retaining old behaviour of mpz_jacobi on even b
14943	(it wasn't documented in 3.1.1).
14944	* mpz/jacobi.c, gmp-h.in (mpz_kronecker, mpz_legendre): Remove
14945	separate entrypoints, just #define to mpz_jacobi.
14946	* compat.c (__gmpz_legendre): Add compatibility entrypoint.
14947
14948	* mpn/generic/mul_1.c: Allow "incr" style overlaps.
14949	* tests/devel/try.c (param_init): Test this.
14950
14951	* mpf/mul_ui.c: Do size==0 test earlier.
14952
149532001-06-08  Kevin Ryde  <kevin@swox.se>
14954
14955	* gmp-impl.h (ULONG_HIGHBIT, UINT_HIGHBIT, USHRT_HIGHBIT): Cast
14956	ULONG_MAX etc to unsigned long etc before attempting to right shift.
14957
14958	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Add an AC_DEFINE of LSYM_PREFIX.
14959	* gmp-impl.h (ASM_L): New macro.
14960	(mpn_incr_u, mpn_decr_u, MPN_INCR_U, MPN_DECR_U): Add i386 optimized
14961	versions.
14962
14963	* mpn/hppa/*.s,S,asm: Use .label so the code works with gas on hppa
14964	GNU/Linux too, reported by LaMont Jones <lamont@smallone.fc.hp.com>.
14965	* mpn/hppa/README: Add some notes on this.
14966	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Ditto.
14967
14968	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add dive_1.c,
14969	fib2_ui.c.
14970
14971	* tests/mpn/t-iord_u.c: New file.
14972	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
14973
14974	* configure.in (mips*-*-irix[6789]*): Make ABI=n32 the default, same
14975	as in gmp 3.1.
14976	* gmp.texi (ABI and ISA): Update.
14977
14978	* gmp.texi (Build Options): Misc tweaks.
14979	(Notes for Particular Systems): Describe windows DLL handling.
14980	(Known Build Problems): DJGPP needs bash 2.04.
14981	(Number Theoretic Functions): mpz_invert returns 0<=r<modulus; add
14982	mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui.
14983	(Fibonacci Numbers Algorithm): Update for new formulas used.
14984	(Lucas Numbers Algorithm): New section.
14985
14986	* tune/speed.c,speed.h,common.c,many.pl: Add mpn_fib2_ui, mpz_fib2_ui,
14987	mpz_lucnum_ui, mpz_lucnum2_ui.
14988	* demos/expr/exprz.c,README: Add lucnum.
14989	* demos/perl/GMP.pm,GMP.xs,GMP/Mpz.pm,test.pl: Add fib2, lucnum,
14990	lucnum2.
14991
14992	* tests/mpz/t-lucnum_ui.c: New file.
14993	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14994	* tests/mpz/t-fib_ui.c: Check mpz_fib2_ui too, updates for new style
14995	MPN_FIB2_SIZE.
14996
14997	* tune/tuneup.c, tune/Makefile.am, gmp-impl.h, mpn/*/gmp-mparam.h:
14998	Remove FIB_THRESHOLD, no longer required.
14999
15000	* mpz/fib2_ui.c, mpz/lucnum_ui.c mpz/lucnum2_ui.c: New files.
15001	* Makefile.am, mpz/Makefile.am: Add them.
15002	* gmp-h.in (mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui): Add
15003	prototypes.
15004
15005	* mpn/generic/fib2_ui.c: New file.
15006	* configure.in (gmp_mpn_functions): Add it.
15007	* gmp-impl.h (mpn_fib2_ui, FIB_TABLE, etc): Add these.
15008	* mpz/fib_ui.c: Rewrite.
15009
15010	* acinclude.m4 (GMP_C_SIZES): Fix _LONG_LONG_LIMB define for mp_limb_t
15011	size test.
15012	(GMP_FUNC_ALLOCA): Add dummy __GMP_BITS_PER_MP_LIMB for gmp-h.in work.
15013
15014	* configure.in (CPPFLAGS): Remove -D__GMP_WITHIN_GMP, don't want it
15015	everywhere.
15016	* Makefile.am, mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am,
15017	mpf/Makefile.am, mpbsd/Makefile.am (INCLUDES): Set -D__GMP_WITHIN_GMP.
15018
15019	* configure.in (*-*-msdosdjgpp*): Forcibly disable shared libraries,
15020	to make libtests.la work.
15021
15022	* acconfig.h (_LONG_LONG_LIMB, HAVE_MPFR): Remove dummy defines, no
15023	longer needed.
15024
15025	* mpz/set_ui.c: Store to _mp_d[0] unconditionally.
15026
150272001-05-27  Kevin Ryde  <kevin@swox.se>
15028
15029	* configure.in, gmp-h.in, mp-h.in: Add support for windows DLLs.
15030
150312001-05-26  Kevin Ryde  <kevin@swox.se>
15032
15033	* gmp.texi (ABI and ISA, Reentrancy): Minor tweaks
15034	(Notes for Package Builds): Note gmp.h is a generated file.
15035	(Notes for Particular Systems): -march=pentiumpro is used for gcc
15036	2.95.4 and up.
15037	(Assembler Loop Unrolling): Mention non power-of-2 unrolling.
15038	(Internals): New chapter.
15039	* mpf/README: Remove file.
15040
15041	* demos/expr/README: Miscellaneous rewordings.
15042
15043	* demos/perl: New directory.
15044	* demos/Makefile.am: Add it.
15045	* demos/perl/INSTALL, Makefile.PL, GMP.pm, GMP.xs, typemap,
15046	GMP/Mpz.pm, GMP/Mpq.pm, GMP/mpf.pm, GMP/Rand.pm, sample.pl, test.pl:
15047	New files.
15048
15049	* configure, aclocal.m4: Update to autoconf 2.50.
15050
15051	* configure, aclocal.m4, ltmain.sh: Update to libtool 1.4.
15052
15053	* configure, aclocal.m4, missing, ansi2knr.c, */Makefile.in: Update to
15054	automake 1.4f.
15055	* Makefile.am: Conditionalize mpfr in $(SUBDIRS) to handle mpfr.info.
15056	* mpfr/Makefile.am (INFO_DEPS): Remove previous mpfr.info handling.
15057	* mpn/Makefile.am (GENERIC_SOURCES): Remove this, just put mp_bases.c
15058	in libmpn_la_SOURCES.
15059	* tests/Makefile.am (tests.h): Move from EXTRA_HEADERS to
15060	libtests_la_SOURCES.
15061	* ltconfig: Remove file, no longer needed.
15062
15063	* Makefile.am (gmp-impl.h, longlong.h, stack-alloc.h): Move from
15064	EXTRA_DIST to libgmp_la_SOURCES, so they get included in TAGS.
15065	* tests/rand/Makefile.am (gmpstat.h): Move to libstat_la_SOURCES
15066	similarly.
15067
15068	* config.guess (68k-*-*): Use $SHELL not "sh", tweak some comments.
15069
15070	* mpfr/mpfr.texi (Introduction to MPFR): Tweak table formatting, note
15071	non-free programs must be able to be re-linked.
15072
150732001-05-20  Kevin Ryde  <kevin@swox.se>
15074
15075	* mpn/powerpc64/addmul_1.asm, mpn/powerpc64/mul_1.asm,
15076	mpn/powerpc64/submul_1.asm: Add carry-in entrypoints.
15077
150782001-05-17  Kevin Ryde  <kevin@swox.se>
15079
15080	* gmp.texi (ge): Fix definition for info.
15081	(Notes for Particular Systems): Mention 68k dragonball and cpu32.
15082	(Efficiency): Add static linking, more about in-place operations,
15083	describe mpq+/-integer using addmul.
15084	(Reporting Bugs): A couple of words about self-contained reports.
15085	(Floating-point Functions): Note exponent limitations of mpf_get_str
15086	and mpf_set_str.
15087	(Initializing Floats): Clarify mpf_get_prec, mpf_set_prec and
15088	mpf_set_prec_raw a bit.
15089	(Float Comparison): Note current mpf_eq deficiencies.
15090
15091	* gmp-h.in (__GMP_HAVE_CONST, __GMP_HAVE_PROTOTYPES,
15092	__GMP_HAVE_TOKEN_PASTE): Merge GNU ansidecl.h tests for ANSI compilers.
15093	* demos/expr/expr-impl-h.in: Ditto.
15094
15095	* gmp-impl.h (BITS_PER_MP_LIMB): Define from __GMP_BITS_PER_MP_LIMB if
15096	not already in gmp-mparam.h.
15097	* tests/t-constants.c (BITS_PER_MP_LIMB, __GMP_BITS_PER_MP_LIMB):
15098	Check these are the same.
15099
15100	* gmp-h.in (mpf_get_default_prec, mpf_get_prec, mpf_set_default_prec,
15101	mpf_set_prec_raw): Provide "extern inline" versions, use __GMPF on the
15102	macros.
15103	* mpf/get_dfl_prc.c, mpf/get_prc.c, mpf/set_dfl_prc.c,
15104	mpf/set_prc_raw.c: Get code from gmp.h using __GMP_FORCE.
15105
15106	* gmp-h.in, gmp-impl.h (__gmp_default_fp_limb_precision): Move from
15107	gmp-impl.h to gmp-h.in.
15108	(__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Ditto, and use __GMPF
15109	prefix and add a couple of casts.
15110	* gmp-h.in (__GMP_MAX): New macro.
15111	* mpf/init2.c mpf/set_prc.c: Update for __GMPF prefix.
15112
15113	* gmp-h.in (__GMP_BITS_PER_MP_LIMB): New templated define.
15114	* acinclude.m4 (GMP_C_SIZES): Add AC_SUBST __GMP_BITS_PER_MP_LIMB,
15115	remove AC_DEFINE BITS_PER_MP_LIMB.
15116
151172001-05-13  Kevin Ryde  <kevin@swox.se>
15118
15119	* gmp-h.in, gmp.texi, Makefile.am, mpz/Makefile.am, tests/mpz/t-pow.c:
15120	Remove mpz_si_pow_ui, pending full si support.
15121	* mpz/si_pow_ui.c: Remove file.
15122
151232001-05-11  Kevin Ryde  <kevin@swox.se>
15124
15125	* mpn/x86/pentium/dive_1.asm: New file.
15126
15127	* mpn/powerpc32/umul.asm: Use r on registers.
15128	* mpn/powerpc64/umul.asm: New file.
15129	* configure.in (powerpc*-*-*): Enable umul in extra_functions.
15130
15131	* tests/refmpn.c, tests/tests.h (refmpn_umul_ppmm): Use same arguments
15132	as normal mpn_umul_ppmm.
15133	(refmpn_mul_1c): Update.
15134	* tests/devel/try.c, tune/many.pl: Add some umul_ppmm testing support.
15135
15136	* mpn/x86/k6/mmx/popham.asm, mpn/x86/k7/mmx/popham.asm: Don't support
15137	size==0.
15138	* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm: Ditto,
15139	and shave a couple of cycles from the PIC entry code.
15140
15141	* mpz/mul.c: Use mpn_mul_1 for size==1 and mpn_mul_2 (if available)
15142	for size==2, to avoid copying; do vsize==0 test earlier.
15143
15144	* mpf/sub.c: Test r!=u before calling mpf_set.
15145	* mpf/add.c: Ditto, and share mpf_set between usize==0 and vsize==0.
15146
15147	* mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
15148	mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
15149	count_leading_zeros zero.
15150
15151	* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Print a message if extra
15152	flags are added.
15153
15154	* tests/mpz/t-mul_i.c: New file.
15155	* tests/mpz/Makefile.am: Add it.
15156
15157	* mpz/mul_siui.c (mpz_mul_si): Fix for -0x80..00 on long long limb.
15158
15159	* gmp-h.in (mpf_set_si, mpf_set_ui): Revert last change, set exp to 0
15160	when n==0.
15161	* mpf/ceilfloor.c, mpf/trunc.c: Fix exp to 0 when setting r to 0.
15162	* gmp-impl.h (MPF_CHECK_FORMAT): Check exp==0 when size==0.
15163
151642001-05-07  Kevin Ryde  <kevin@swox.se>
15165
15166	* gmp-h.in (mpf_set_si, mpf_set_ui): Don't bother setting _mp_exp to 0
15167	when n==0 (use 1 unconditionally).
15168	* tests/mpf/t-misc.c (check_mpf_set_si): Don't demand anything of
15169	_mp_exp when _mp_size is zero.
15170
15171	* mpn/x86/README: Note gas _GLOBAL_OFFSET_TABLE_ with leal problem.
15172
15173	* gmp-h.in (mpz_fits_uint_p, mpz_fits_ulong_p, mpz_fits_ushort_p):
15174	Provide these as "extern inline"s.
15175	(__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): New macros.
15176	(mpz_popcount): Use __GMP_ULONG_MAX.
15177	* gmp-impl.h (UINT_MAX, ULONG_MAX, USHRT_MAX): Use __GMP_U*_MAX, if
15178	not already defined.
15179	* mpz/fits_u.c: Use the code from gmp.h.
15180
151812001-05-06  Kevin Ryde  <kevin@swox.se>
15182
15183	* mpn/x86/k7/dive_1.asm: New file.
15184	* mpn/x86/k7/gcd_1.asm: New file.
15185	* mpn/asm-defs.m4 (m4_count_trailing_zeros): New macro.
15186
15187	* gmp-h.in (mpz_get_ui, mpz_getlimbn, mpz_set_q, mpz_perfect_square_p,
15188	mpz_popcount, mpz_size, mpf_set_ui, mpf_set_si, mpf_size): Provide
15189	these as "extern inlines".
15190	Use just one big extern "C" block.
15191	* mpz/getlimbn.c, mpz/get_ui.c, mpz/perfsqr.c, mpz/popcount.c
15192	mpz/set_q.c, mpz/size.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Use
15193	__GMP_FORCE to get code from gmp.h.
15194
151952001-05-03  Kevin Ryde  <kevin@swox.se>
15196
15197	* extract-dbl.c: Add ASSERT d>=0.
15198
15199	* gmp.texi (Efficiency): Add mpz_addmul etc for mpz+=integer, add
15200	mpz_neg etc in-place.
15201	(Integer Arithmetic): Add mpz_addmul, mpz_submul, mpz_submul_ui.
15202	(Initializing Rationals): Add mpq_set_str.
15203	(Low-level Functions): mpn_set_str requires strsize >= 1.
15204
15205	* gmp-h.in (__GMP_EXTERN_INLINE, __GMP_ABS): New macros.
15206	(mpz_abs, mpq_abs, mpf_abs, mpz_neg, mpq_neg, mpf_neg): Provide inline
15207	versions.
15208	* mpz/abs.c, mpq/abs.c, mpf/abs.c, mpz/neg.c, mpq/neg.c, mpf/neg.c:
15209	Add suitable __GMP_FORCE to turn off inline versions.
15210
15211	* tests/mpz/t-aorsmul.c,t-cmp_d.c,t-popcount,t-set_str.c: New files.
15212	* tests/mpz/Makefile.am: Add them.
15213
15214	* mpz/aorsmul_i.c: New file, rewrite of addmul_ui.c.  Add
15215	mpz_submul_ui entrypoint, share more code between some of the
15216	conditionals, use mpn_mul_1c if available.
15217	* mpz/addmul_ui.c: Remove file.
15218	* mpz/aorsmul.c: New file.
15219	* Makefile.am, mpz/Makefile.am: Update.
15220	* gmp-h.in (mpz_addmul, mpz_submul, mpz_submul_ui): Add prototypes.
15221	* gmp-impl.h (mpz_aorsmul_1): Add prototype.
15222
15223	* tests/mpq/t-set_str.c: New file.
15224	* tests/mpq/Makefile.am: Add it.
15225
15226	* mpq/set_str.c: New file.
15227	* Makefile.am, mpq/Makefile.am: Add it.
15228	* gmp-h.in (mpq_set_str): Add prototype.
15229
15230	* mpz/set_str.c: Fix for trailing white space on zero, eg. "0 ".
15231	* mpn/generic/set_str.c: Add ASSERT str_len >= 1.
15232
15233	* gmp-h.in, gmp-impl.h (mpn_incr_u, mpn_decr_u): Move to gmp-impl.h.
15234	* gmp-impl.h (MPN_INCR_U, MPN_DECR_U): New macros.
15235
152362001-04-30  Kevin Ryde  <kevin@swox.se>
15237
15238	* tests/mpz/t-lcm.c: New file.
15239	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
15240
15241	* mpz/lcm.c: Add one limb special case.
15242
15243	* mpz/lcm_ui.c: New file.
15244	* Makefile.am, mpz/Makefile.am: Add it.
15245	* gmp-h.in (mpz_lcm_ui): Add prototype.
15246	* gmp.texi (Number Theoretic Functions): Add mpz_lcm_ui, document lcm
15247	now always positive.
15248
15249	* mp-h.in (mp_size_t, mp_exp_t): Fix typedefs to match gmp-h.in.
15250
15251	* gmp-h.in (mpn_add_1, mpn_add, mpn_sub_1, mpn_sub): Remove K&R
15252	function defines (ansi2knr will handle mpn/inline.c, and just ansi is
15253	enough for gcc extern inline).
15254
15255	* gmp-h.in (__GMP_HAVE_TOKEN_PASTE): New macro.
15256	(__MPN): Use it.
15257	* gmp-impl.h (CNST_LIMB): Ditto.
15258
15259	* gmp-h.in, mp-h.in (__gmp_const, __gmp_signed, _PROTO, __MPN): Use
15260	ANSI forms on Microsoft C.
15261	(__GMP_HAVE_CONST): New define.
15262	* gmp-impl.h (const, signed): Use it.
15263
15264	* demos/expr/expr-impl-h.in (<stdarg.h>): Use this with Microsoft C.
15265	(HAVE_STDARG): New define.
15266	* demos/expr/expr.c,exprz.c,exprq.c,exprf.c,exprfr.c: Use it.
15267
15268	* acinclude.m4 (GMP_C_STDARG): New macro.
15269	* configure.in: Call it.
15270	* rand.c: Use it.
15271
15272	* configure.in (AC_PROG_CC_STDC): New test.
15273
152742001-04-25  Kevin Ryde  <kevin@swox.se>
15275
15276	* mpn/x86/k6/mmx/dive_1.asm: New file.
15277	* mpn/x86/x86-defs.m4 (Zdisp): Two more insns.
15278
15279	* mpn/x86/pentium/mul_2.asm: New file.
15280	* mpn/asm-defs.m4: Add define_mpn(mul_2).
15281	* acconfig.h (HAVE_NATIVE_mpn_divexact_1, mul_2): Add templates.
15282
15283	* configure.in (ABI): Use AC_ARG_VAR.
15284
15285	* tests/devel/try.c: Run reference function when validate fails.
15286
15287	* mpq/get_str.c: Fixes for negative bases.
15288	* tests/mpq/t-get_str.c: Check negative bases.
15289	* tests/misc.c,tests.h (__gmp_allocate_strdup, strtoupper): New
15290	functions.
15291
152922001-04-24  Torbjorn Granlund  <tege@swox.com>
15293
15294	* mpz/lcm.c (mpz_lcm): Make result always positive.
15295
15296	* gmp-h.in (mpz_inp_binary, mpz_out_binary): Remove declarations.
15297
152982001-04-22  Kevin Ryde  <kevin@swox.se>
15299
15300	* mpn/powerpc64/addsub_n.asm: Use config.m4 not asm-syntax.m4.
15301
15302	* mpz/cmp_d.c, mpz/cmpabs_d.c: New files.
15303	* Makefile.am, mpz/Makefile.am: Add them.
15304	* mpf/cmp_d.c, mpf/get_dfl_prec.c: New files.
15305	* Makefile.am, mpf/Makefile.am: Add them.
15306	* gmp-h.in (mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d, mpf_get_default_prec):
15307	Add prototypes.
15308	* gmp.texi: Add documentation.
15309
15310	* mpf/set_prc.c: Avoid a realloc call if already the right precision.
15311
15312	* gmp-impl.h (MPF_BITS_TO_PREC, MPF_PREC_TO_BITS): New macros.
15313	* mpf/get_prc.c, init2.c, set_dfl_prec.c, set_prc.c, set_prc_raw.c:
15314	Use them.
15315
153162001-04-20  Kevin Ryde  <kevin@swox.se>
15317
15318	* tests/devel/try.c: Don't test size==0 on mpn_popcount and
15319	mpn_hamdist; add testing for mpn_divexact_1; print some limb values
15320	with mpn_trace not printf.
15321
15322	* mpz/popcount.c, mpz/hamdist.c: Don't pass size==0 to mpn_popcount
15323	and mpn_hamdist.
15324	* mpn/generic/popham.c: Don't support size==0.
15325
15326	* config.guess (m68k-*-*): Detect m68010, return m68360 for cpu32,
15327	cleanup the nesting a bit.
15328
15329	* gmp.texi (Integer Division): Fix mpz_congruent_2exp_p "c" type.
15330	(Integer Division): Add mpz_divexact_ui.
15331	(Number Theoretic Functions): Fix mpz_nextprime return type.
15332	(Exact Remainder): Divisibility tests now implemented.
15333	And more index entries in a few places.
15334
15335	* tests/mpz/dive_ui.c: New file.
15336	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
15337
15338	* mpz/dive_ui.c: New file.
15339	* Makefile.am, mpz/Makefile.am: Add it.
15340	* gmp-h.in (mpz_divexact_ui): Add prototype.
15341
15342	* tune/many.pl, tune/speed.h: Add special mpn_back_to_back for
15343	development.
15344
15345	* gmp-impl.h (MPN_DIVREM_OR_DIVEXACT_1): New macro.
15346	* mpz/divexact.c: Use it.
15347
15348	* gmp-impl.h (DIVEXACT_1_THRESHOLD): New threshold.
15349	* tune/tuneup.c: Tune it.
15350
15351	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
15352	mpn_divexact_1, mpn_copyi, mpn_copyd.
15353
15354	* mpn/generic/dive_1.c: New file.
15355	* configure.in (gmp_mpn_functions): Add it.
15356	* gmp-impl.h (mpn_divexact_1): Add prototype.
15357	* mpn/asm-defs.m4: Add define_mpn(divexact_1).
15358
15359	* tests/mpn: New directory.
15360	* tests/Makefile.am: Add it.
15361	* tests/mpn/Makefile.am: New file.
15362	* configure.in (AC_OUTPUT): Add it.
15363	* tests/mpn/t-asmtype.c: New file.
15364
15365	* configure, config.in: Update to autoconf 2.49d.
15366
15367	* configure.in, gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Revert
15368	to generating gmp.h, mp.h and expr-impl.h with AC_OUTPUT and AC_SUBST.
15369
15370	* configure.in (m68*-*-*): Oops, m683?2 is 68000, m68360 is cpu32.
15371	* mpn/m68k/m68k-defs.m4 (scale_available_p): Ditto.
15372
15373	* configure.in (underscore, asm_align): Remove these variables, unused.
15374	(GMP_ASM_*): Sort by AC_REQUIREs, to avoid duplication.
15375	* acinclude.m4 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_LOG): Remove support
15376	for actions, no longer needed.
15377
153782001-04-17  Kevin Ryde  <kevin@swox.se>
15379
15380	* config.guess (m68k-*-*): Look for cpu in linux kernel /proc/cpuinfo.
15381
15382	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): The -mpentiumpro problem is
15383	fixed in 2.95.4, so test for that.
15384	(GMP_ASM_TYPE): Amend some comments.
15385
15386	* tune/freq.c (speed_cpu_frequency_sysctl): Avoid having unused
15387	variables on GNU/Linux.
15388
15389	* mpn/asm-defs.m4 (m4_instruction_wrapper): Fix a quoting problem if
15390	the name of the file is a macro.
15391
153922001-04-15  Kevin Ryde  <kevin@swox.se>
15393
15394	* mpn/powerpc64/*.asm: Add speeds on ppc630.
15395
15396	* acconfig.h: Add dummy templates for _LONG_LONG_LIMB and HAVE_MPFR.
15397	* configure.in: Ensure config.in is the last AM_CONFIG_HEADER,
15398	which autoheader requires.
15399
15400	* mpn/x86/pentium/popcount.asm: New file.
15401	* mpn/x86/pentium/hamdist.asm: New file.
15402
15403	* mpn/asm-defs.m4: (m4_popcount): New macro.
15404	Amend a few comments elsewhere.
15405
15406	* acinclude.m4 (GMP_ASM_RODATA): If possible, grep compiler output for
15407	the right directive.
15408
15409	* tune/speed.c: Print clock speed in MHz, not cycle time.
15410
15411	* configure.in (AC_CHECK_HEADERS): Check for sys/processor.h.
15412	* tune/freq.c (speed_cpu_frequency_processor_info): Require
15413	<sys/processor.h> to exist, to differentiate the different
15414	processor_info on Darwin.
15415	(speed_cpu_frequency_sysctlbyname): Remove hw.model test which is in
15416	speed_cpu_frequency_sysctl.
15417	(speed_cpu_frequency_sysctl): Add hw.cpufrequency for Darwin.
15418
15419	* gmp-impl.h (MPN_LOGOPS_N_INLINE, mpn_and_n ... mpn_xnor_n): Use a
15420	single expression argument for the different operations, necessary for
15421	the Darwin "smart" preprocessor.
15422
15423	* mpn/m68k/t-m68k-defs.pl: Allow white space in m4_definsn and
15424	m4_defbranch.
15425
15426	* tune/many.pl: Change RM_TMP_S to RM_TMP to match mpn/Makeasm.am,
15427	avoid a possibly undefined array in a diagnostic, add more renaming to
15428	hamdist.
15429
154302001-04-13  Kevin Ryde  <kevin@swox.se>
15431
15432	* ltmain.sh, aclocal.m4, configure, config.in: Update to libtool 1.3d.
15433	* configure.in: Change ac_ to lt_ in lt_cv_archive_cmds_need_lc and
15434	lt_cv_proc_cc_pic.
15435
15436	* config.guess (m68*-*-*): Detect exact cpu with BSD sysctl hw.model,
15437	detect 68000/68010 with trapf, detect 68302 with bfffo.
15438
154392001-04-11  Kevin Ryde  <kevin@swox.se>
15440
15441	* acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_ADDRESSING,
15442	GMP_ASM_M68K_BRANCHES): New macros.
15443	* configure.in: Use them, remove old 68k configs, use mc68020 udiv and
15444	umul.
15445
15446	* mpn/m68k/m68k-defs.m4: New file.
15447	* mpn/m68k/t-m68k-defs.pl: New file.
15448	* mpn/m68k/*.asm: New files, converted from .S.  Merge add_n and sub_n
15449	to aors_n, ditto mc68020 addmul_1 and submul_1 to aorsmul_1.  No
15450	object code changes (except .type and .size now used on NetBSD 1.4).
15451	* mpn/m68k/README: New file.
15452	* mpn/m68k/*.S, */*.S, syntax.h: Remove files.
15453
15454	* configure.in (m68*-*-netbsd1.4*): Pretend getrusage doesn't exist.
15455	* tune/README: Update.
15456
15457	* configure.in (powerpc*-*-*): For the benefit of Darwin 1.3, add cc
15458	to cclist, make gcc_cflags -Wa,-mppc optional.
15459
154602001-04-06  Kevin Ryde  <kevin@swox.se>
15461
15462	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add | for 68k.
15463	(gmpasm-mode-syntax-table): Add to comments.
15464
15465	* tests/mpz/reuse.c (dsi_div_func_names): Add names for cdiv_[qr]_2exp.
15466
154672001-04-04  Kevin Ryde  <kevin@swox.se>
15468
15469	* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): Fix test so as to actually
15470	detect the problem, add notes on m68k netbsd 1.4.1.
15471
15472	* gmp.texi (Compatibility with older versions): Note libmp
15473	compatibility.
15474
154752001-04-03  Kevin Ryde  <kevin@swox.se>
15476
15477	* tests/mpz/reuse.c: Add mpz_cdiv_q_2exp and mpz_cdiv_r_2exp.
15478
15479	* tests/mpz/t-pow.c: Drag in refmpn.o when testing mpz_pow_ui etc with
15480	refmpn_mul_2.
15481
15482	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of mpn_com_n
15483	and mpn_mul_2.
15484	* tests/devel/try.c: Add testing of mpn_mul_2, and a
15485	DATA_MULTIPLE_DIVISOR attribute.
15486
15487	* gmp.texi (Build Options): List more m68k's.
15488	(Build Options): Add cross reference to tex2html.
15489	(Notes for Particular Systems): Add m68k means 68020 or up.
15490	(Rational Conversions): New section, with mpq_get_d, mpq_set_d and
15491	mpq_set_f from Miscellaneous, and new mpq_set_str.
15492	(Applying Integer Functions): Move mpq_get_num, mpq_get_den,
15493	mpq_set_num and mpq_set_den from Misc.
15494	(Miscellaneous Rational Functions): Remove section.
15495	(Custom Allocation): Partial rewrite for various clarifications.
15496	(References): Improve line breaks near URLs.
15497
15498	* acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): New macro.
15499	* configure.in (m68*-*-*): Use it to run gcc 2.95.x at -O not -O2.
15500	(m680?0-*-*, m683?2-*-*, m68360-*-*): Add optional gcc -m options.
15501
15502	* tests/mpz/t-cmp.c: New file.
15503	* tests/mpz/t-sizeinbase.c: New file.
15504	* tests/mpz/Makefile.am: Add them.
15505
15506	* gmp-impl.h (MPN_CMP): New macro.
15507	* mpz/cmp.c,cmpabs.c: Use it, and minor cleanups too.
15508
15509	* tests/mpq/t-equal.c: New file.
15510	* tests/mpq/t-get_str.c: New file.
15511	* tests/mpq/Makefile.am: Add them.
15512
15513	* mpq/get_str.c: New file.
15514	* Makefile.am, mpq/Makefile.am: Add it.
15515	* gmp-h.in (mpq_get_str): Add prototype.
15516
15517	* mpq/equal.c: Rewrite using inline compare loops.
15518
15519	* tests/refmpn.c,tests.h (refmpn_mul_2): Fix parameter order.
15520	* mpz/n_pow_ui.c: Fix mpn_mul_2 calls parameter order.
15521
155222001-03-29  Kevin Ryde  <kevin@swox.se>
15523
15524	* tests/mpf/t-trunc.c: New file.
15525	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
15526	* gmp-impl.h (MPF_CHECK_FORMAT): New macro.
15527
15528	* mpf/trunc.c: New file, rewrite of integer.c, preserve prec+1 in
15529	copy, don't copy if unnecessary.
15530	* mpf/ceilfloor.c: New file likewise, and use common subroutine for
15531	ceil and floor.
15532	* mpf/integer.c: Remove file.
15533	* Makefile.am, mpf/Makefile.am, macos/Makefile.in: Update.
15534
15535	* acinclude.m4 (GMP_GCC_VERSION_GE): New macro.
15536	(GMP_GCC_MARCH_PENTIUMPRO): Use it, remove CCBASE parameter (don't
15537	bother checking it's gcc).
15538	(GMP_GCC_ARM_UMODSI): New macro.
15539	* configure.in (GMP_GCC_MARCH_PENTIUMPRO): Update parameters.
15540	(arm*-*-*): Use GMP_GCC_ARM_UMODSI.
15541	* gmp.texi (Notes for Particular Systems): Add arm gcc requirements.
15542
155432001-03-28  Kevin Ryde  <kevin@swox.se>
15544
15545	* gmp.texi (Converting Integers): Document mpz_getlimbn using absolute
15546	value and giving zero for N out of range, move to end of section.
15547
15548	* tests/refmpn.c (refmpn_tdiv_qr): Use refmpn_divmod_1 rather than
15549	refmpn_divrem_1.
15550	* tests/tests.h: Add some prototypes that were missing.
15551
15552	* mpz/tdiv_q_ui.c: Remove a comment that belonged to mpz_tdiv_r_ui.
15553
155542001-03-26  Torbjorn Granlund  <tege@swox.com>
15555
15556	* mpn/generic/gcdext.c: Handle carry overflow after m*n multiply code
15557	in both arms.  Partially combine multiply arms.
15558
155592001-03-24  Kevin Ryde  <kevin@swox.se>
15560
15561	* longlong.h: Add comments to P5 count_leading_zeros.
15562
15563	* demos/expr/exprz.c,t-expr.c,README: Add congruent_p and divisible_p.
15564
155652001-03-23  Kevin Ryde  <kevin@swox.se>
15566
15567	* gmp.texi (GMPceil, GMPfloor, ge, le): New macros.
15568	(Integer Division, mpn_cmp, mpn_sqrtrem, Algorithms): Use them.
15569	(mpn_bdivmod): Refer to mp_bits_per_limb, not BITS_PER_MP_LIMB, and
15570	improve formatting a bit.
15571	(mpn_lshift, mpn_rshift): Clarify the return values, and use {rp,n}
15572	for the destination.
15573	Miscellaneous minor rewordings in a few places.
15574
15575	* mpn/arm/arm-defs.m4: New file.
15576	* configure.in (arm*-*-*): Use it.
15577	* mpn/arm/*.asm: Use changecom and registers from arm-defs.m4, use L()
15578	for local labels.
15579
15580	* mpn/x86/k6/mmx/com_n.asm: Relax code alignment (same speed).
15581
15582	* gmp-h.in (__GMP_ATTRIBUTE_PURE): Use __pure__ to avoid application
15583	namespace.
15584
15585	* gmp-impl.h (ABS): Add parens around argument.
15586
155872001-03-20  Kevin Ryde  <kevin@swox.se>
15588
15589	* acinclude.m4 (GMP_PROG_M4): Use AC_ARG_VAR on $M4.
15590
15591	* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): New macro.
15592	* configure.in: Use it.
15593	* mpn/asm-defs.m4: Ditto.
15594
155952001-03-18  Kevin Ryde  <kevin@swox.se>
15596
15597	* mpn/x86/pentium/logops_n.asm: New file.
15598
15599	* mpn/x86/k6/k62mmx/copyd.asm: Rewrite, smaller and simpler, faster on
15600	small sizes, slower on big sizes (about half the time).
15601	* mpn/x86/k6/k62mmx/copyi.asm: Remove file, in favour of generic x86.
15602	* mpn/x86/copyi.asm: Add some comments.
15603	* mpn/x86/k6/README: Update.
15604
15605	* mpn/x86/k6/gcd_1.asm: New file.
15606
15607	* gmp-impl.h (NEG_MOD): Fix type of __dnorm.
15608
15609	* acinclude.m4 (GMP_C_SIZES): Fix use of __GMP_WITHIN_CONFIGURE.
15610
156112001-03-15  Kevin Ryde  <kevin@swox.se>
15612
15613	* gmp.texi (GMPabs): New macro.
15614	(Float Comparison - mpf_reldiff): Use it.
15615	(Integer Comparisons - mpz_cmpabs): Ditto, puts "abs" in info.
15616	(Reentrancy): Update notes on old random functions.
15617	(Karatsuba Multiplication): Better characterize the effect of basecase
15618	speedups on the thresholds, pointed out by Torbjorn.
15619
15620	* tune/README: Notes on the 1x1 div threshold for mpn_gcd_1.
15621
15622	* tests/misc.c (mpz_pow2abs_p, mpz_flipbit, mpz_errandomb,
15623	mpz_errandomb_nonzero, mpz_negrandom): New functions.
15624	(mpz_erandomb, mpz_erandomb_nonzero): Use urandom().
15625	* tests/spinner.c (spinner_wanted, spinner_tick): Make global.
15626	* tests/tests.h: Update prototypes.
15627
15628	* tests/mpz/t-cong.c, tests/mpz/t-cong_2exp.c: New files.
15629	* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
15630
15631	* mpz/cong.c, mpz/cong_2exp.c, mpz/cong_ui.c: New files.
15632	* Makefile.am, mpz/Makefile.am: Add them.
15633	* gmp-impl.h (NEG_MOD): New macro.
15634	* gmp-h.in (mpz_congruent_p, mpz_congruent_2exp_p,
15635	mpz_congruent_ui_p): Add prototypes.
15636	* gmp.texi (Integer Division, Efficiency): Add documentation.
15637
15638	* mpq/aors.c: No need for ABS on denominator sizes.
15639
15640	* gmp-impl.h (mpn_divisible_p): Use __MPN.
15641
15642	* gmp-impl.h (LOW_ZEROS_MASK): New macro.
15643	* mpz/divis_ui.c, mpn/generic/divis.c: Use it.
15644
15645	* mpz/setbit.c: Fix normalization for case of a negative ending up
15646	with a zero high limb.
15647	* tests/mpz/bit.c (check_single): New test for this problem.
15648
15649	* configure.in (none-*-*): Fix cclist for default ABI=long.
15650
156512001-03-10  Kevin Ryde  <kevin@swox.se>
15652
15653	* mpz/cfdiv_q_2exp.c: Don't scan for non-zero limbs if they don't
15654	matter to the rounding.
15655
15656	* mpz/get_ui.c: Fetch _mp_d[0] unconditionally, so the code can come
15657	out branch-free.
15658
156592001-03-08  Kevin Ryde  <kevin@swox.se>
15660
15661	* tests/devel/try.c (param_init): Fix reference functions for and_n
15662	and nand_n.
15663
15664	* tune/speed.c, tests/devel/try.c: Seed RANDS, not srandom etc.
15665	* configure.in (AC_CHECK_FUNCS): Remove srand48 and srandom.
15666	* macos/configure (coptions): Remove random/srandom, now unnecessary.
15667
15668	* configure.in (gmp.h, mp.h, demos/expr/expr-impl.h): Generate using
15669	AM_CONFIG_HEADER.
15670	(_LONG_LONG_LIMB, HAVE_MPFR): Change to AC_DEFINEs.
15671	* gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Change to #undef's.
15672	* acinclude.m4 (GMP_FUNC_ALLOCA, GMP_C_SIZES): Use gmp-h.in, not gmp.h.
15673	* Makefile.am (EXTRA_DIST): Remove gmp-h.in and mp-h.in, now done
15674	automatically.
15675	* acinclude.m4 (GMP_FUNC_ALLOCA), gmp-impl.h: Set and use
15676	__GMP_WITHIN_CONFIGURE rather than GMP_FUNC_ALLOCA_TEST.
15677
15678	* mpf/random2.c: Use _gmp_rand and RANDS instead of random() for the
15679	exponent, ensures full range of values too.
15680
15681	* tests/mpz/t-div_2exp.c (check_various): Start with d based on i, but
15682	don't let it go negative.
15683
15684	* tune/tuneup.c (KARATSUBA_MUL_THRESHOLD): Limit probing to
15685	TOOM3_MUL_THRESHOLD_LIMIT, the size of the workspace in mul_n.c.
15686	Use a -1 with this too, so size<LIMIT not <=.
15687
156882001-03-07  Torbjorn Granlund  <tege@swox.com>
15689
15690	* mpn/cray/cfp/mul_1.c: Don't call mpn_add_n with size 0.
15691	* mpn/cray/cfp/addmul_1.c: Likewise.
15692	* mpn/cray/cfp/submul_1.c: Don't call mpn_sub_n with size 0.
15693
15694	* tests/mpz/t-div_2exp.c (check_various): Start 2nd d loop from 0
15695	(avoid problems with Cray compilers).
15696
156972001-03-06  Torbjorn Granlund  <tege@swox.com>
15698
15699	* mpn/cray/ieee/submul_1.c: Don't call mpn_sub_n with size 0.
15700
15701	* mpn/cray/ieee/mul_basecase.c: New file.
15702	* mpn/cray/ieee/sqr_basecase.c: New file, derived from mul_basecase.c.
15703
157042001-03-06  Kevin Ryde  <kevin@swox.se>
15705
15706	* tests/devel/try.c (pointer_setup): Allow dst_size == SIZE_SIZE2 for
15707	the benefit of mpn_tdiv_qr.
15708
15709	* tune/tuneup.c (all): Start karatsuba probing at size==4, for the
15710	benefit of cray t90 ieee which has speed oddities at size==2.
15711
15712	* gmp-impl.h (USE_LEADING_REGPARM): Use __GMP_GNUC_PREREQ.
15713	Use __GMP_ATTRIBUTE_PURE and ATTRIBUTE_CONST in a few places.
15714
15715	* gmp-h.in (__GMP_GNUC_PREREQ) New macro.
15716	(__GMP_ATTRIBUTE_PURE): New macro, use it in many places.
15717
15718	* gmp-impl.h, gmp-h.in (mpn_jacobi_base): Move prototype to
15719	gmp-impl.h, use ATTRIBUTE_CONST.
15720
15721	* tune/speed.h (speed_cyclecounter): Inline asm version for i386.
15722
15723	* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Only reread "up" after second
15724	realloc, first is under w!=u.
15725
157262001-03-05  Torbjorn Granlund  <tege@swox.com>
15727
15728	* mpn/cray/sub_n.c: Rewrite using `majority' logic.
15729
15730	* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
15731
15732	* mpn/cray/ieee/mul_1.c: Rewrite.  Streamline multiplications;
15733	use `majority' logic.
15734	* mpn/cray/ieee/addmul_1.c: Likewise.
15735
15736	* mpn/cray/add_n.c: Rewrite using `majority' logic.
15737
157382001-03-04  Torbjorn Granlund  <tege@swox.com>
15739
15740	* longlong.h (CRAY udiv_qrnnd): No longer conditional on CRAYMPP.
15741	(64-bit hppa add_ssaaaa): New.
15742	(64-bit hppa sub_ddmmss): New.
15743
15744	* mpn/cray/ieee/invert_limb.c: New file.
15745
15746	* gmp-impl.h (RANDS): Add a `,0' to make it compile on more compilers.
15747
157482001-03-03  Kevin Ryde  <kevin@swox.se>
15749
15750	* mpz/n_pow_ui.c (ULONG_PARITY): Move to gmp-impl.h.
15751	* gmp-impl.h (ULONG_PARITY): i386 part from n_pow_ui.c, new generic
15752	form by Torbjorn.
15753
15754	* tests/mpz/t-div_2exp.c: New file, rewrite of t-2exp.c.
15755	* tests/mpz/t-2exp.c: Remove file.
15756	* tests/mpz/Makefile.am (check_PROGRAMS): Update.
15757
15758	* gmp-h.in (mpz_cdiv_q_2exp, mpz_cdiv_q_2exp): Add prototypes.
15759	* gmp.texi (Integer Division): Add mpz_cdiv_q_2exp and mpz_cdiv_q_2exp.
15760
15761	* mpz/cfdiv_q_2exp.c: New file, partial rewrite of fdiv_q_2exp.c, add
15762	mpz_cdiv_q_2exp entrypoint.
15763	* mpz/cfdiv_r_2exp.c: New file, rewrite of fdiv_r_2exp.c, use all mpn,
15764	add mpz_cdiv_r_2exp entrypoint.
15765	* mpz/fdiv_q_2exp.c, mpz/fdiv_r_2exp.c: Remove files.
15766	* mpz/Makefile.am (libmpz_la_SOURCES): Update.
15767	* Makefile.am (MPZ_OBJECTS): Ditto.
15768
15769	* gmp-impl.h (USE_LEADING_REGPARM): Use __i386__ same as longlong.h
15770	(REGPARM_2_1, REGPARM_3_1, REGPARM_ATTR): New macros.
15771	* mpz/jacobi.c (jac_or_kron): Use them.
15772
15773	* configure.in (HAVE_ABI_$ABI): Re-enable this for config.m4, with
15774	dots changed to underscores (necessary for hppa).
15775
15776	* tests/mpz/t-divis.c, tests/mpz/t-divis_2exp.c: New files.
15777	* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
15778
15779	* gmp-h.in (mpz_divisible_p, mpz_divisible_ui_p,
15780	mpz_divisible_2exp_p): Add prototypes.
15781	* gmp.texi (Integer Division): Add mpz_divisible_p.
15782	(Efficiency): Add remarks about divisibility testing.
15783
15784	* mpz/divis.c, mpz/divis_ui.c, mpz/divis_2exp.c: New files.
15785	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
15786	* Makefile.am (MPZ_OBJECTS): Ditto.
15787
15788	* mpn/generic/divis.c: New file.
15789	* configure.in (gmp_mpn_functions): Add it.
15790	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Ditto.
15791	* gmp-impl.h (mpn_divisible_p): Add prototype.
15792
15793	* urandom.h: Remove file.
15794	* Makefile.am (EXTRA_DIST): Remove it.
15795
15796	* tests/mpz/convert.c, dive.c, io.c, logic.c, reuse.c, t-2exp.c,
15797	t-fdiv.c, t-fdiv_ui.c, t-gcd.c, t-jac.c, t-mul.c, t-pow.c,
15798	t-powm.c, t-powm_ui.c, t-root.c, t-sqrtrem.c, t-tdiv.c,
15799	t-tdiv_ui.c: Use RANDS, initialized by tests_rand_start.
15800
15801	* tests/mpz/t-pow.c: New file, being t-pow_ui renamed and with some
15802	further tests added.
15803	* tests/mpz/t-pow_ui.c: Remove file.
15804	* tests/mpz/Makefile.am (check_PROGRAMS): Update.
15805
15806	* tests/t-modlinv.c: Don't use urandom.h.
15807	* tests/mpz/bit.c, tests/mpz/t-scan.c: Ditto.
15808	* tests/mpq/t-cmp.c, tests/mpq/t-cmp_ui.c, tests/mpq/t-get_d.c: Ditto.
15809	* tests/mpf/reuse.c, t-add.c, t-conv.c, t-dm2exp.c, t-muldiv.c,
15810	t-sqrt.c, t-sub.c: Ditto.
15811
15812	* tests/misc.c (tests_rand_start, tests_rand_end): New functions.
15813	(tests_start, tests_end): Use them.
15814	(urandom): New function.
15815	* tests/tests.h: Add prototypes.
15816
15817	* mpz/random.c: Rewrite using mpz_urandomb and RANDS.
15818	* mpn/generic/random.c: Rewrite using _gmp_rand and RANDS.
15819	* mpn/generic/random2.c: Use RANDS not random() etc.
15820
15821	* gmp-impl.h (__gmp_rands, __gmp_rands_initialized): Add externs.
15822	(gmp_randstate_ptr): New typedef.
15823	(RANDS, RANDS_CLEAR): New macros.
15824
15825	* rands.c: New file.
15826	* Makefile.am (libgmp_la_SOURCES): Add it.
15827
15828	* configure.in (mpn_objs_in_libmp): New AC_SUBST.
15829	* Makefile.am (libmp_la_DEPENDENCIES): Use it.
15830
158312001-03-02  Torbjorn Granlund  <tege@swox.com>
15832
15833	* mpn/pa64/udiv_qrnnd.asm: New file.
15834
158352001-03-01  Kevin Ryde  <kevin@swox.se>
15836
15837	* mpbsd/rpow.c: New file.
15838	* mpbsd/Makefile.am (libmpbsd_la_SOURCES): Add it
15839	(nodist_libmpbsd_la_SOURCES): Remove pow_ui.c.
15840	* Makefile.am (MPBSD_OBJECTS): Add rpow.lo, remove pow_ui.lo.
15841	(libmp_la_DEPENDENCIES): Add mpz/n_pow_ui.lo.
15842
15843	* mpz/ui_pow_ui.c: Rewrite using mpz_n_pow_ui.
15844	* mpz/pow_ui.c: Ditto, and no longer provide rpow for mpbsd.
15845
15846	* mpz/n_pow_ui.c: New file, rewrite of pow_ui.c and ui_pow_ui.c.  Use
15847	less temporary memory, strip factors of 2 from the base, use mpn_mul_2
15848	if available.
15849	* mpz/si_pow_ui.c: New file.
15850	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
15851	* Makefile.am (MPZ_OBJECTS): Ditto.
15852	* gmp-impl.h (mpz_n_pow_ui): Add prototype.
15853	* gmp-h.in (mpz_si_pow_ui): Add prototype.
15854	* gmp.texi (Integer Exponentiation): Add mpz_si_pow_ui.
15855
15856	* acinclude.m4 (GMP_C_SIZES): Add BITS_PER_ULONG.
15857	Correction to mp_limb_t working check.
15858	* configure.in (limb_chosen): New variable.
15859	* tests/t-constants.c (BITS_PER_ULONG): Check this value.
15860	Add some reminders about tests that fail on Cray.
15861
15862	* tests/refmpn.c (refmpn_mul_2): New function.
15863	* tests/refmpz.c (refmpz_pow_ui): Copied from tests/mpz/t-pow_ui.c
15864	* tests/tests.h: Add prototypes.
15865
15866	* configure.in (none-*-*): Add ABI=longlong.
15867	* doc/configuration (Long long limb testing): Describe it.
15868
15869	* gmp.texi (Low-level Functions): Move some commented out remarks ...
15870	* mpn/generic/mul_basecase.c: ... to here.
15871
15872	* mpn/x86/README: Note "%=" as an alternative to "1:" in __asm__.
15873
15874	* tests/trace.c (mp_trace_start): Print "bin" for binary.
15875
15876	* mpn/generic/dump.c: Add a couple of casts to keep gcc quiet.
15877
15878	* gmp-h.in (mpn_incr_u, mpn_decr_u): Add parens around arguments.
15879
15880	* mpbsd/mout.c, mpbsd/mtox.c (num_to_text): Remove unused variable.
15881
15882	* mpfr/set_d.c (mpfr_get_d2): Declare "q" for 64-bit limbs.
15883
158842001-02-28  Torbjorn Granlund  <tege@swox.com>
15885
15886	* mpn/pa64w/udiv_qrnnd.asm: Tune.
15887
158882001-02-27  Torbjorn Granlund  <tege@swox.com>
15889
15890	* mpn/pa64w/udiv_qrnnd.asm: New file.
15891
158922001-02-26  Torbjorn Granlund  <tege@swox.com>
15893
15894	* longlong.h (arm): Optimize sub_ddmmss by testing for constant
15895	operands.
15896	* mpn/arm/invert_limb.asm: New file.
15897
158982001-02-24  Torbjorn Granlund  <tege@swox.com>
15899
15900	* mpn/generic/lshift.c: Rewrite.
15901	* mpn/generic/rshift.c: Rewrite.
15902
15903	* longlong.h: Use UWtype for external interfaces that expect mp_limb_t.
15904
15905	* longlong.h (arm): #define invert_limb.
15906
15907	* mpn/arm: Make labels have local scope.
15908
15909	* configure.in (arm*-*-*): Set extra_functions.
15910	* longlong.h (arm): #define udiv_qrnnd.
15911	* mpn/arm/udiv.asm: New file.
15912
159132001-02-24  Kevin Ryde  <kevin@swox.se>
15914
15915	* tune/many.pl: Add mpn_count_leading_zeros, mpn_count_trailing_zeros
15916	and mpn_invert_limb.  Add count_leading_zeros, count_trailing_zeros
15917	from a .h file.  Correction to modexact_1_odd prototype.  Support
15918	ansi2knr.
15919	* tune/speed.h, tune/common.c: Consequent changes.
15920
15921	* demos/expr/*: Make a few more functions available in expressions,
15922	create only libexpr.a, misc minor updates.
15923
15924	* mpn/Makeasm.am: Add some comments about suffix ordering.
15925
15926	* tests/refmpn.c (rshift_make, lshift_make): No need to compare
15927	unsigned to zero.
15928
15929	* mpq/mul.c: Detect and optimize squaring.
15930
159312001-02-23  Torbjorn Granlund  <tege@swox.com>
15932
15933	* mpn/mips3: Convert files to `.asm'.
15934
15935	* mpn/arm: Convert files to `.asm'.  Misc cleanups.
15936	* mpn/arm/submul_1.asm: New file.
15937
159382001-02-21  Kevin Ryde  <kevin@swox.se>
15939
15940	* tune/tuneup.c (all): Only one compiler print should match, no need
15941	for #undef PRINTED_COMPILER.
15942
15943	* mpfr/mpfr.h (mpfr_sgn): Use mpfr_cmp_ui (patch from Paul).
15944
15945	* mpz/fib_ui.c: Update some remarks about alternative algorithms.
15946	* gmp.texi (Fibonacci Numbers Algorithm): Ditto.
15947	(Assigning Floats): Clarify mpf_swap swaps the precisions too.
15948	(Low-level Functions): Try to be clearer about negative cofactors.
15949
159502001-02-21  Torbjorn Granlund  <tege@swox.com>
15951
15952	* mpn/sparc64/copyi.asm: Streamline for small operands.
15953	* mpn/sparc64/add_n.asm: Likewise.
15954	* mpn/sparc64/sub_n.asm: Likewise.
15955
15956	* mpn/sparc64/copyd.asm: New file.
15957
159582001-02-20  Torbjorn Granlund  <tege@swox.com>
15959
15960	* mpn/sparc64/lshift.asm: Rewrite.
15961	* mpn/sparc64/rshift.asm: Rewrite.
15962
159632001-02-19  Torbjorn Granlund  <tege@swox.com>
15964
15965	* mpn/sparc64/add_n.asm: Rewrite using `majority' logic.
15966	* mpn/sparc64/sub_n.asm: Likewise.
15967
15968	* tune/tuneup.c (all): Recognise DECC and MIPSpro compilers.
15969
15970	* mpn/pa64/sqr_diagonal.asm: Use PROLOGUE/EPILOGUE.
15971	* mpn/pa642/sqr_diagonal.asm: Likewise.
15972
15973	* configure.in (HAVE_ABI_$abi): Disable for now.
15974
15975	* mpn/asm-defs.m4 (PROLOGUE): Use LABEL_SUFFIX.
15976
15977	* acinclude.m4 (GMP_ASM_ATTR): New check, for hppa oddities.
15978
159792001-02-18  Torbjorn Granlund  <tege@swox.com>
15980
15981	* mpn/hppa/hppa1_1/gmp-mparam.h: New file.
15982	* mpn/hppa/hppa2_0/gmp-mparam.h: New file.
15983
15984	* mpn/pa64/sqr_diagonal.asm: New file.
15985	* mpn/pa64w/sqr_diagonal.asm: New file.
15986	* mpn/hppa/hppa1_1/sqr_diagonal.asm: New file.
15987	* mpn/hppa/hppa2_0/sqr_diagonal.asm: New file.
15988
15989	* mpn/sparc32/v9/add_n.asm: Use `fitod' instead of `fxtod' for dummy
15990	FA-pipeline insns.
15991	* mpn/sparc32/v9/sub_n.asm: Likewise.
15992
159932001-02-18  Kevin Ryde  <kevin@swox.se>
15994
15995	* gmp.texi (Known Build Problems): Notes on make, $* and K&R, misc
15996	tweaks elsewhere.
15997	(Low-level Functions): Use {} notation in mpn_sqrtrem.
15998	(Basecase Multiplication): Mention BASECASE_SQR_THRESHOLD.
15999
16000	* mpfr/isnan.c (mpfr_number_p): Infinity is not a number.
16001	* mpfr/out_str.c: Pass strlen+1 for the block size to free.
16002	* mpfr/get_str.c: Correction for realloc to strlen+1.
16003
16004	* acinclude.m4 (GMP_C_SIZES): Generate an error if mp_limb_t doesn't
16005	seem to work for some reason.
16006
160072001-02-16  Torbjorn Granlund  <tege@swox.com>
16008
16009	* mpn/sparc32/v9/gmp-mparam.h: Retune.
16010
16011	* mpn/sparc32/v9/add_n.asm: New file.
16012	* mpn/sparc32/v9/sub_n.asm: New file.
16013
16014	* mpn/sparc32/v9/mul_1.asm: Tune function entry.
16015	* mpn/sparc32/v9/addmul_1.asm: Likewise.
16016	* mpn/sparc32/v9/submul_1.asm: Likewise.
16017
16018	* mpn/sparc32/v9/sqr_diagonal.asm: New file.
16019
160202001-02-16  Kevin Ryde  <kevin@swox.se>
16021
16022	* configure.in: Fix flags selection when $CC is a compiler known to us.
16023
16024	* demos/expr/exprfr.c (e_mpfr_cos, e_mpfr_sin): mpfr_sin_cos now
16025	allows NULL for one parameter.
16026
16027	* mpfr/*: Update to 20010215.
16028	* mpfr/trunc.c: Use -DOPERATION scheme, and gmp mpn_zero_p.
16029	* mpfr/sqrt.c: Use plain mpn_sqrtrem, not mpn_sqrtrem_new.
16030	* mpfr/sqrtrem.c: Remove file.
16031	* mpfr/Makefile.am (libmpfr_a_SOURCES): Add isnan.c and set_ui.c,
16032	remove sqrtrem.c and srandom.h.
16033
16034	* configfsf.guess: Update to 2001-02-13.
16035	* configfsf.sub: Update to 2001-02-16.
16036	* config.sub (j90, t90): Remove special handing, configfsf.sub now ok.
16037
16038	* Makefile.am (MPF_OBJECTS): Add a couple of missing $U's.
16039
16040	* tune/tuneup.c: Identify compiler used (GCC and Sun C so far).
16041
160422001-02-15  Torbjorn Granlund  <tege@swox.com>
16043
16044	* mpn/sparc32/v9/mul_1.asm: Change `ld' to `lduw' and `st' to `stw'.
16045	* mpn/sparc32/v9/addmul_1.asm: Likewise.
16046	* mpn/sparc32/v9/submul_1.asm: Likewise.
16047
160482001-02-14  Torbjorn Granlund  <tege@swox.com>
16049
16050	* mpn/mips3/mips.m4: New file.
16051	* configure.in (mips*-*-irix[6789]*): Use mips3/mips.m4.
16052
16053	* mpn/powerpc64/sqr_diagonal.asm: New file.
16054
16055	* mpn/mips3/sqr_diagonal.asm: New file.
16056
160572001-02-12  Torbjorn Granlund  <tege@swox.com>
16058
16059	* mpn/powerpc32/sqr_diagonal.asm: New file.
16060
16061	* mpn/generic/sqr_basecase.c: Remove declaration of mpn_sqr_diagonal.
16062	Fix typo in header comment.
16063
160642001-02-12  Kevin Ryde  <kevin@swox.se>
16065
16066	* mpn/generic/mul.c, mpn/generic/mul_n.c, gmp-impl.h: Use
16067	mpn_mul_basecase for squaring below new BASECASE_SQR_THRESHOLD.
16068	* tune/tuneup.c gmp-impl.h: Tune BASECASE_SQR_THRESHOLD.
16069
16070	* Makefile.am (libgmp.la, libmp.la): Revert change to build from
16071	mpn/libmpn.la etc, go back to explicitly listed objects.
16072
16073	* configure.in: Recognise sparc64-*-*, not just sparc64-*-linux*.
16074
160752001-02-11  Torbjorn Granlund  <tege@swox.com>
16076
16077	* mpn/asm-defs.m4 (sqr_diagonal): New define_mpn.
16078
16079	* mpn/alpha/sqr_diagonal.asm: New file.
16080
160812001-02-11  Kevin Ryde  <kevin@swox.se>
16082
16083	* gmp.texi (Low-level Functions): Note mpn_get_str clobbers its input
16084	plus 1 extra limb.
16085
16086	* mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
16087	set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
16088	* tests/mpz/reuse.c, tests/mpq/t-md_2exp.c, demos/pexpr.c,
16089	demos/expr/t-expr.c: Ditto.
16090
16091	* configure.in (HAVE_ABI_$abi): New define in config.m4.
16092
16093	* gmp-impl.h (mpn_sqr_diagonal): Add prototype and define.
16094	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
16095	mpn_sqr_diagonal.
16096
16097	* gmp.texi, acinclude.m4: Mention x86 solaris 2.7 has the reg->reg
16098	movq bug the same as 2.6.
16099
16100	* mpfr/Makefile.am (EXTRA_DIST): Add mpfr-test.h and mpf2mpfr.h.
16101
16102	* mpn/x86/README: Merge contents of README.family.
16103	* mpn/x86/README.family: Remove file.
16104
16105	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mode1o, gcd_finda,
16106	invert_limb, sqr_diagonal; remove mod_1_rs; sort alphabetically.
16107
161082001-02-10  Torbjorn Granlund  <tege@swox.com>
16109
16110	* configure.in (gmp_mpn_functions_optional): List sqr_diagonal.
16111
16112	* mpn/powerpc32/aix.m4: Use unnamed csects.
16113	* mpn/powerpc64/aix.m4: Likewise.
16114
16115	* acconfig.h: Add #undef of mpn_sqr_diagonal.
16116	Remove lots of spacing.
16117
16118	* configure.in (syntax testing section): Match power* instead of
16119	powerpc*.
16120	* mpn/power: Convert files to `.asm'.
16121	Prefix umul_ppmm and sdiv_qrnnd.
16122	Update some comments.
16123
161242001-02-09  Kevin Ryde  <kevin@swox.se>
16125
16126	* acconfig.h: Add HAVE_NATIVE_mpn_modexact_1_odd and
16127	HAVE_NATIVE_mpn_modexact_1c_odd.
16128
16129	* configure.in (CCAS): Don't override a user selection.
16130
16131	* mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
16132
161332001-02-08  Torbjorn Granlund  <tege@swox.com>
16134
16135	* mpn/generic/sqr_basecase.c: Use mpn_sqr_diagonal when appropriate.
16136
161372001-02-07  Kevin Ryde  <kevin@swox.se>
16138
16139	* gmp.texi (Low-level Functions): mpn_preinv_mod_1 now undocumented.
16140
16141	* mpn/generic/random2.c (myrandom): Use rand() on mingw.
16142
16143	* mpn/alpha/gmp-mparam.h: Update tuned parameters.
16144
161452001-02-05  Torbjorn Granlund  <tege@swox.com>
16146
16147	* mpn/alpha/ev6/gmp-mparam.h: Retune.
16148
161492001-02-05  Kevin Ryde  <kevin@swox.se>
16150
16151	* Makefile.am (libgmp, libmp): Construct from mpn/libmpn.la etc rather
16152	than explicitly listed objects.
16153
16154	* urandom.h: Use rand() on mingw.
16155
16156	* mpn/powerpc64/lshift.asm,addsub_n.asm: Use r1 not 1.
16157
161582001-02-04  Torbjorn Granlund  <tege@swox.com>
16159
16160	* mpn/ia64/copyi.asm: New file.
16161	* mpn/ia64/copyd.asm: New file.
16162
161632001-02-04  Kevin Ryde  <kevin@swox.se>
16164
16165	* mpn/alpha/ev5/gmp-mparam.h, mpn/mips3/gmp-mparam.h,
16166	mpn/powerpc32/gmp-mparam.h, mpn/powerpc64/gmp-mparam.h,
16167	mpn/sparc64/gmp-mparam.h, mpn/x86/*/gmp-mparam.h:
16168	Update tuned parameters.
16169
16170	* mpn/x86/i486: New directory.
16171	* configure.in (i486-*-*): Use it.
16172	* mpn/x86/i486/gmp-mparam.h: New file.
16173
16174	* mpn/x86/pentium/mode1o.asm: New file.
16175	* mpn/x86/p6/mode1o.asm: New file.
16176
16177	* tune/many.pl: Use $(ASMFLAGS_PIC) and $(CFLAGS_PIC).
16178
16179	* gmp.texi (Integer Division): Another rewording of 2exp divisions.
16180
161812001-02-03  Torbjorn Granlund  <tege@swox.com>
16182
16183	* mpn/arm/gmp-mparam.h: Tune.
16184
16185	* mpn/ia64/popcount.asm: Put a `;;' break at end of main loop.
16186
16187	* configure.in (arm*-*-*): Set gcc_cflags in order to pass
16188	$fomit_frame_pointer.
16189
16190	* tests/mpz/t-mul.c (base_mul): Remove an unused variable.
16191
161922001-02-02  Torbjorn Granlund  <tege@swox.com>
16193
16194	* demos/pexpr.c (TIME): New macro.
16195	(main): Use TIME--print timing more accurately.
16196	(setup_error_handler): Increase RLIMIT_DATA to 16 Mibyte.
16197
16198	* longlong.h (arm): Add __CLOBBER_CC to add_ssaaaa and sub_ddmmss.
16199
162002001-02-02  Kevin Ryde  <kevin@swox.se>
16201
16202	* configure.in: Don't remove gmp-mparam.h and mpn source links under
16203	--no-create since in that case they're not re-created.
16204
16205	* demos/expr: New directory.
16206	* Makefile.am (SUBDIRS, allprogs): Add it.
16207	* demos/expr/README, Makefile.am, expr.c, exprv.c, exprz.c, exprza.c,
16208	exprq.c, exprqa.c, exprfa.c, exprf.c, exprfr.c, exprfra.c, expr.h,
16209	expr-impl-h.in, run-expr.c, t-expr.c: New files.
16210	* configure.in: Generate demos/expr/Makefile & demos/expr/expr-impl.h.
16211
16212	* Makefile.am: Remove mpfr from main libgmp.
16213	* mpfr/Makefile.am: Build and install separate libmpfr.a.
16214	* mpfr/*: Update to mpfr 2001.
16215
16216	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 2.
16217	* Makefile.am (libtool -version-info): Bump appropriately.
16218	* NEWS: Updates.
16219
16220	* tune/divrem1div.c, tune/divrem1inv.c, tune/divrem2div.c,
16221	tune/divrem2inv.c: Renamed from divrem_1_div.c, divrem_1_inv.c,
16222	divrem_2_div.c, divrem_2_inv.c, to be unique in DOS 8.3 filenames.
16223	* tune/Makefile.am (libspeed_la_SOURCES): Update.
16224
16225	* mpn/x86/*/README, mpn/x86/README.family: Misc updates.
16226	* tune/README: Misc updates.
16227	* doc/configuration: Misc updates.
16228
16229	* mpn/x86/pentium/mmx/gmp-mparam.h: Change UDIV_PREINV_TIME to
16230	UDIV_NORM_PREINV_TIME.
16231
16232	* mpz/pprime_p.c: Use ASSERT_ALWAYS instead of abort.
16233
16234	* rand.c (__gmp_rand_lc_scheme): Add "const".
16235	(struct __gmp_rand_lc_scheme_struct): Make astr "const char *".
16236
16237	* demos/calc/calc.y, demos/calc/calclex.l: Add kron function.
16238
16239	* tests/devel/try.c: Partial rewrite, new scheme of function types,
16240	allow result validation functions, add sqrtrem and jacobi testing.
16241	* tune/many.pl: Corresponding updates.
16242	* tests/devel/Makefile.am: Add a convenience rule for libtests.la.
16243
16244	* tests/refmpz.c: New file.
16245	* tests/Makefile.am: Add it.
16246	* tests/misc.c (mpz_erandomb, mpz_erandomb_nonzero): New functions.
16247	* tests/tests.h: Add prototypes.
16248
16249	* mpn/x86/k6/cross.pl: Add a couple more exceptions.
16250
16251	* gmp.texi: Don't use @nicode{'\0'}, it doesn't come out right in tex.
16252	(Introduction to GMP): Mention Cray vector systems.
16253	(Build Options): Describe --enable-mpfr, refer to its manual.  Add
16254	Crays under supported CPUs.
16255	(Debugging): Add notes on source file paths.
16256	(Autoconf): New section.
16257	(Assigning Integers): Note truncation by mpz_set_d, mpz_set_q and
16258	mpz_set_f.
16259	(Converting Integers): Note the size mpz_get_str allocates.
16260	(Floating-point Functions): Rewrite introduction, clarifying some
16261	points about precision handling.
16262	(Converting Floats): Note the size mpf_get_str allocates, and that it
16263	gives an empty string for zero.  Add mpf_get_si and mpf_get_ui.
16264	(Float Comparison): Give the formula mpf_reldiff calculates.
16265	(Miscellaneous Float Functions): Add mpf_integer_p and mpf_fits_*_p.
16266	(Random Number Functions): Misc rewordings for clarity.
16267	(Random State Initialization): Ditto.
16268	(Custom Allocation): Remove note on deallocate_function called with 0,
16269	misc rewording and clarifications.
16270	(Exact Remainder): New section.
16271	(Binary GCD): A few words on initial reduction using division.
16272	(Accelerated GCD): Refer to exact remainder section.
16273	(Extended GCD): Extra remarks on single versus double selection.
16274	(Jacobi Symbol): Update for mpz/jacobi.c rewrite and modexact_1_odd.
16275	(Modular Powering Algorithm): Refer to exact remainder section.
16276	(Assembler SIMD Instructions): Update remarks on MMX.
16277	(Contributors): Amend to "Divide and Conquer" division.
16278	(References): Tweak some formatting.  Add "Proof of GMP Fast Division
16279	and Square Root Implementations" by Paul Zimmermann.
16280
162812001-01-31  Torbjorn Granlund  <tege@swox.com>
16282
16283	* configure.in: Don't ever pass -mips3; let ABI flags imply ISA.
16284
162852001-01-31  Kevin Ryde  <kevin@swox.se>
16286
16287	* tune/time.c: Remove unnecessary longlong.h.
16288	(speed_endtime): Add some extra diagnostics.
16289
16290	* tests/mpz/t-fdiv_ui.c, tests/mpz/t-tdiv_ui.c: Use unsigned long for
16291	the divisor, not mp_limb_t.
16292	* tests/mpz/t-jac.c (try_base): Use %llu for long long limb.
16293	* tests/trace.c: Add <string.h> for strlen.
16294
16295	* tune/freq.c (speed_cpu_frequency_proc_cpuinfo): Ignore "cycle
16296	frequency" of 0, allow "BogoMIPS" as well as "bogomips".
16297
16298	* macos/Makefile.in: Add mpf/fits_s.c and mpf/fits_u.c objects.
16299
163002001-01-30  Torbjorn Granlund  <tege@swox.com>
16301
16302	* longlong.h: Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
16303
163042001-01-29  Torbjorn Granlund  <tege@swox.com>
16305
16306	* mpn/powerpc64/addmul_1.asm: Prefix registers with an `r'.
16307	* mpn/powerpc64/submul_1.asm: Likewise.
16308	* mpn/powerpc64/mul_1.asm: Likewise.
16309
16310	* configure.in (alpha*-*-*): Amend last change to handle pca*.
16311
163122001-01-29  Kevin Ryde  <kevin@swox.se>
16313
16314	* tune/speed.h (SPEED_ROUTINE_INVERT_LIMB_CALL): Don't let the
16315	compiler optimize everything away.
16316
16317	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Measure
16318	operator_div, operator_mod, mpn_divrem_2_div, mpn_divrem_2_inv,
16319	mpn_sb_divrem_m3, mpn_sb_divrem_m3_div, mpn_sb_divrem_m3_inv,
16320	mpn_dc_divrem_sb_div, mpn_dc_divrem_sb_inv.
16321	* tune/divrem_2_div.c, tune/divrem_2_inv.c, tune/sb_div.c,
16322	tune/sb_inv.c: New files.
16323
16324	* tune/tuneup.c, gmp-impl.h, tune/speed.h, tune/common.c,
16325	tune/Makefile.am: Tune SB_PREINV_THRESHOLD and DIVREM_2_THRESHOLD.
16326
16327	* mpn/generic/divrem_2.c: Use new DIVREM_2_THRESHOLD.
16328	* mpn/generic/sb_divrem_mn.c: Use new SB_PREINV_THRESHOLD.
16329
16330	* mpn/x86/p6/mmx/lshift.asm, mpn/x86/p6/mmx/rshift.asm: New files,
16331	just m4 include()ing the P55 code.
16332	* configure.in (pentium[23]-*-*): Remove x86/pentium/mmx from path.
16333
163342001-01-27  Kevin Ryde  <kevin@swox.se>
16335
16336	* configure.in (AC_CHECK_FUNCS): Add srand48.
16337	* tune/speed.c: Use this test.
16338
16339	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): Allow "egcs-" prefix on gcc
16340	--version, warn if the format is unrecognised.
16341	(GMP_COMPARE_GE): Guard against empty $1 not only on last arg.
16342	(GMP_INIT, GMP_FINISH, GMP_PROG_M4): Obscure or eliminate literal
16343	"dnl"s since autoconf thinks they indicate faulty macros.
16344
16345	* mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
16346	strlen(str)+1 bytes.
16347	* mpz/dump.c, mpf/dump.c, tests/mpz/convert.c: Use this size when
16348	freeing.
16349	* tests/mpf/t-conv.c: Ditto, and ensure x==0 is exercised.
16350
16351	* tests/mpz/t-fits.c: New file.
16352	* tests/mpz/Makefile.am: Add it.
16353
16354	* tests/mpf/t-fits.c: New file.
16355	* tests/mpf/t-get_si.c: New file.
16356	* tests/mpf/t-int.c: New file.
16357	* tests/mpf/Makefile.am: Add them.
16358
16359	* mpf/fits_s.c: New file.
16360	* mpf/fits_u.c: New file.
16361	* mpf/get_si.c: New file.
16362	* mpf/get_ui.c: New file.
16363	* mpf/int_p.c: New file.
16364	* Makefile.am, mpf/Makefile.am: Add them.
16365	* gmp-h.in (mpf_fits_*_p, mpf_get_si, mpf_get_ui, mpf_integer_p): Add
16366	prototypes.
16367
16368	* tests/memory.c (tests_allocate, tests_reallocate): Guard against
16369	size==0.
16370
16371	* tests/mpz/*.c, tests/mpq/*.c, tests/mpf/*.c: Uses tests_start and
16372	tests_end.
16373
16374	* gmp-impl.h (USE_LEADING_REGPARM): Fix conditionals.
16375
163762001-01-23  Kevin Ryde  <kevin@swox.se>
16377
16378	* configure.in, mpn/Makeasm.am (ASMFLAGS_PIC): New substitution,
16379	allowing -DPIC to be suppressed on cygwin.
16380	(CFLAGS_PIC): New substitution, use it and $(CCAS) directly, rather
16381	than $(LIBTOOL), avoiding a problem with FreeBSD 2.2.8.
16382
16383	* mpn/x86/k6/mode1o.asm, mpn/x86/k7/mode1o.asm: Remove an unnecessary
16384	+[.-L(here)] from _GLOBAL_OFFSET_TABLE_, avoids a segv from gas 1.92.3.
16385	* mpn/x86/README.family: Add notes on the problem.
16386
163872001-01-20  Torbjorn Granlund  <tege@swox.com>
16388
16389	* configure.in (alpha*-*-*): Default `flavour' to ev4.
16390
163912001-01-19  Kevin Ryde  <kevin@swox.se>
16392
16393	* assert.c, gmp-impl.h (__gmp_assert_fail): Change return type to
16394	void, since it's no longer used in expressions.
16395
16396	* mpn/x86/addsub_n.S: Remove file, since it doesn't work and it upsets
16397	tune/many.pl.
16398
16399	* mpz/jacobi.c: Rewrite, but still binary algorithm; accept zero and
16400	negative denominators; merge mpz_jacobi and mpz_legendre, add
16401	mpz_kronecker; use mpn directly, add special cases for size==1.
16402	* gmp.texi (Number Theoretic Functions): Update.
16403	* gmp-h.in (mpz_kronecker): Add prototype.
16404	* gmp-impl.h (USE_LEADING_REGPARM): New macro.
16405	* tests/mpz/t-jac.c: Test mpz_kronecker.
16406	* mpz/legendre.c: Remove file.
16407	* Makefile.am, mpz/Makefile.am: Update.
16408
16409	* longlong.h (alpha count_leading_zeros): Use __attribute__ ((const))
16410	when possible, add parameter to prototype.
16411	(ia64 udiv_qrnnd): Use for all compilers, not just gcc.
16412	(pentium count_trailing_zeros): Use count_leading_zeros.
16413
16414	* acinclude.m4 (GMP_C_ATTRIBUTE_CONST, GMP_C_ATTRIBUTE_NORETURN): New
16415	macros.
16416	* configure.in: Use them.
16417	* gmp-impl.h (ATTRIBUTE_CONST, ATTRIBUTE_NORETURN): New macros.
16418	(mpn_invert_limb): Add ATTRIBUTE_CONST.
16419	(__gmp_assert_fail): Add ATTRIBUTE_NORETURN.
16420
164212001-01-18  Kevin Ryde  <kevin@swox.se>
16422
16423	* gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
16424	__gmp_free_func): Move prototypes from gmp-impl.h to gmp-h.in, for the
16425	benefit of gmp++.h.
16426
16427	* gmp-impl.h, tests/misc.c, tests/tests.h: Move MPZ_SET_STR_OR_ABORT
16428	and MPF_SET_STR_OR_ABORT to mpz_set_str_or_abort and
16429	mpf_set_str_or_abort in libtests.
16430	* tests/mpz/convert.c, tests/mpz/t-bin.c, tests/mpz/t-get_si.c,
16431	tests/mpz/t-jac.c, tests/mpz/t-misc.c, tests/mpq/t-md_2exp.c,
16432	tests/mpq/t-set_f.c, tests/mpf/t-conv.c, tests/mpf/t-misc.c: Update.
16433
16434	* mpn/generic/sqrtrem.c: Use MPN_COPY_INCR (for when rp==NULL).
16435
16436	* tests/mpz/reuse.c: Only run mpz_divexact_gcd on positive divisors.
16437
164382001-01-18  Torbjorn Granlund  <tege@swox.com>
16439
16440	* demos/pexpr.c (main): Accept -vml option.
16441	(fns): List `hamdist', `pow', `nextprime'.
16442	(mpz_eval_expr): Return -1 for `popc' of negative.
16443	(mpz_eval_expr): Handle `hamdist', `pow', `nextprime'.
16444
164452001-01-15  Kevin Ryde  <kevin@swox.se>
16446
16447	* mpn/alpha/ev5/mode1o.c: New file.
16448
16449	* tune/freq.c (speed_cpu_frequency_measure): Check cycles_works_p
16450	before running speed_cyclecounter.
16451	* tune/speed.h (cycles_works_p): Add prototype.
16452
164532001-01-13  Torbjorn Granlund  <tege@swox.com>
16454
16455	* tests/rand/t-rand.c (farr): Fix typo.
16456	(zarr): Fix typo.
16457
164582001-01-12  Kevin Ryde  <kevin@swox.se>
16459
16460	* mpz/kronsz.c: Don't depend on right shifting a negative.
16461
16462	* mpn/x86/gmp-mparam.h: New file.
16463
16464	* mpn/x86/pentium/mmx/mul_1.asm: New file.
16465
164662001-01-11  Torbjorn Granlund  <tege@swox.com>
16467
16468	* mpz/kronsz.c: Temporary workaround for Cray right shift oddities.
16469	Explicitly compare against zero in tests.
16470
164712001-01-10  Kevin Ryde  <kevin@swox.se>
16472
16473	* mpz/kronzs.c: Don't depend on right shifting a negative.
16474
164752001-01-09  Torbjorn Granlund  <tege@swox.com>
16476
16477	* tests/t-constants.c: Disable some undefined tests.
16478	(CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
16479
164802001-01-09  Kevin Ryde  <kevin@swox.se>
16481
16482	* tests/t-constants.c: Add more diagnostics.
16483	(CHECK_MAX_S): Fix for gcc 2.95.2 -mpowerpc64 -maix64.
16484
16485	* mpn/x86/k6/mode1o.asm: New file.
16486	* mpn/x86/k7/mode1o.asm: New file.
16487
16488	* mpn/asm-defs.m4 (modexact_1_odd, modexact_1c_odd): New define_mpn's.
16489	(__clz_tab, modlimb_invert_table, PROLOGUE, EPILOGUE): Add asserts for
16490	GSYM_PREFIX.
16491	* mpn/x86/x86-defs.m4 (Zdisp): Add a movzbl.
16492
16493	* tests/mpz/t-jac.c (check_a_zero): New test.
16494	(check_squares_zi): Fix to use (a^2/b), not (a*b/b); revert last
16495	change avoiding a,b=0, both are fine.
16496	(try_2den): Don't use mpz_kronecker_ui for the expected answer.
16497	(try_*): Call abort rather than exit.
16498
16499	* mpz/kronzu.c, mpz/kronzs.c: Fix for a=0.
16500
16501	* tune/tuneup.c (USE_PREINV_MOD_1): Fix to use new DATA_HIGH_LT_R.
16502
165032001-01-08  Torbjorn Granlund  <tege@swox.com>
16504
16505	* urandom.h: Amend 2000-11-21 change to also handle cygwin.
16506
165072001-01-08  Kevin Ryde  <kevin@swox.se>
16508
16509	* tune/many.pl: Updates for move to tests/devel, add modexact_1_odd,
16510	don't assume C files can't have carry-in entrypoints, remove
16511	$(TRY_TESTS_OBJS) now in libtests.
16512
16513	* tests/devel/try.c, tests/refmpn.c, tests/tests.h: Remove
16514	mpn_mod_1_rshift testing.
16515
16516	* tune/tuneup.c (fft_step_size): Test for overflow using the actual
16517	mp_size_t, don't use BITS_PER_INT.
16518
16519	* tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
16520	change LONG_ONES to LIMB_ONES.
16521	* tune/time.c (M_2POWU): Use INT_MAX rather than BITS_PER_INT.
16522
16523	* extract-dbl.c (BITS_PER_PART): Use BITS_PER_MP_LIMB not
16524	BITS_PER_LONGINT.
16525
16526	* mpz/inp_raw.c, mpz/out_raw.c: Add private defines of BITS_PER_CHAR.
16527	* mpz/fac_ui.c, tests/mpz/t-fac_ui.c: Don't use BITS_PER_LONGINT.
16528	* tests/mpz/t-get_si.c: Don't use BITS_PER_LONGINT, do the LONG_MAX
16529	tests with some explicit code.
16530
16531	* mpn/*/gmp-mparam.h, acinclude.m4, tests/t-constants.c
16532	(BITS_PER_LONGINT, BITS_PER_INT, BITS_PER_SHORTINT, BITS_PER_CHAR):
16533	Remove defines, remove probings, remove tests.
16534
16535	* tune/tuneup.c (MODEXACT_1_ODD_THRESHOLD): Add tuning.
16536
16537	* tune/speed.c,speed.h,common.c: Add measuring of mpn_modexact_1_odd,
16538	mpn_gcd_finda, and an "N" form for mpn_gcd_1.
16539
16540	* tests/mpz/t-jac.c (check_squares_zi): Ensure random a,b != 0.
16541
165422001-01-07  Kevin Ryde  <kevin@swox.se>
16543
16544	* configure.in (gmp_mpn_functions): Add mode1o, remove mod_1_rs.
16545
16546	* mpn/generic/mod_1_rs.c: Remove file, no longer needed.
16547	* gmp-h.in (mpn_mod_1_rshift): Remove prototype and define.
16548
16549	* mpq/set_f.c: Use MPN_STRIP_LOW_ZEROS_NOT_ZERO.
16550
16551	* mpz/kronzu.c, mpz/kronzs.c, mpz/kronuz.c, mpz/kronsz.c: Use
16552	mpn_modexact_1_odd, new style MPN_STRIP_LOW_ZEROS_NOT_ZERO, and new
16553	JACOBI macros.  Various rearrangements supporting all this.
16554
16555	* mpn/generic/gcd_1.c: Use mpn_modexact_1_odd, reduce u%v if u much
16556	bigger than v when size==1, some rearrangements supporting this.
16557
16558	* gmp-impl.h (JACOBI_*): More macros, add some casts to "int".
16559	(MPN_STRIP_LOW_ZEROS_NOT_ZERO): Add a "low" parameter.
16560	(mpn_modexact_1_odd, mpn_modexact_1c_odd): Add prototype and defines.
16561	(MODEXACT_1_ODD_THRESHOLD): New threshold.
16562	(MPN_MOD_OR_MODEXACT_1_ODD, JACOBI_MOD_OR_MODEXACT_1_ODD): New macros.
16563
16564	* mpn/generic/mode1o.c: New file.
16565
16566	* tests/mpz/reuse.c: Add testing of mpz_divexact_gcd.
16567	* tests/mpz/t-fac_ui.c: Use libtests for memory leak checking.
16568	* tests/mpz/t-fib_ui.c: Add a usage comment.
16569
16570	* tests/mpz/bit.c: Use libtests.
16571	* tests/mpz/t-scan.c: Remove unused subroutines.
16572	* tests/devel/try.c: Use libtests, define PROT_NONE if the system
16573	doesn't.
16574
16575	* tests/spinner.c, tests/x86check.c: Use tests.h.
16576	* tests/trace.c: Use tests.h, add mpf_trace.
16577	* tests/refmpn.c: Use tests.h, add refmpn_malloc_limbs_aligned,
16578	refmpn_tstbit, refmpn_neg.
16579
16580	* tune/common.c, tune/speed.h: Update for functions moved to
16581	tests/misc.c.
16582
16583	* tune/Makefile.am, tests/mpz/Makefile.am, tests/mpq/Makefile.am,
16584	tests/mpf/Makefile.am: Use tests/libtests.la.
16585
16586	* configure.in (AC_OUTPUT): Update for new directories.
16587	(x86 CALLING_CONVENTIONS_OBJS): Use .lo for libtests.la, allow
16588	ansi2knr on x86check.c.
16589
16590	* tests/Makefile.am: Establish new libtests.la convenience library,
16591	add mpz, mpq, mpf, mpbsd subdirectories.
16592	* tests/tests.h: New file.
16593	* mpn/tests/ref.h,try.h: Remove files, now in tests.h.
16594
16595	* tests/mpf/ref.c: Move to tests/refmpf.c, rename functions to refmpf.
16596	* tests/mpf/t-add.c, tests/mpf/t-sub.c: Use libtests.
16597	* tests/mpf/Makefile.am: Update.
16598
16599	* tests/memory.c: New file.
16600	* tests/misc.c: New file, a few subroutines from the test programs.
16601
16602	* mpz/tests, mpq/tests, mpf/tests, mpbsd/tests: Move directories to
16603	tests/mpz etc.
16604	* mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpbsd/Makefile.am
16605	(SUBDIRS): Remove.
16606
16607	* tests/devel: New directory.
16608	* mpn/tests/*.c: Move programs to tests/devel.
16609	* mpn/tests/Makefile.am, mpn/tests/README: Move to tests/devel, update.
16610
16611	* mpn/tests/ref.c: Move to tests/refmpn.c.
16612	* mpn/tests/spinner.c,trace.c,x86call.asm,x86check.c: Move to tests
16613	directory.
16614
16615	* tests/t-constants.c: Add checks of HIGHBIT, MAX and MIN constants,
16616	simplify ANSI vs K&R stringizing, use correct printf format types, do
16617	all tests before aborting.
16618
166192001-01-05  Torbjorn Granlund  <tege@swox.com>
16620
16621	* mpn/cray/ieee/gmp-mparam.h: Retune.
16622
166232001-01-05  Kevin Ryde  <kevin@swox.se>
16624
16625	* configure.in (mp.h): Only create this under --enable-mpbsd.
16626
16627	* demos/calc: New subdirectory, move demos/calc* to it.
16628	* demos/calc/Makefile.am: New file, split from demos/Makefile.am.
16629	* demos/Makefile.am: Update.
16630	* configure.in (AC_OUTPUT): Add demos/calc/Makefile.
16631
16632	* tests/t-constants.c (CALC_BITS_PER_TYPE etc): Use a run-time test
16633	for how many bits work in a give type, don't assume bits==8*sizeof.
16634
166352001-01-04  Kevin Ryde  <kevin@swox.se>
16636
16637	* mpz/fits_s.c, mpz/fits_u.c: New files, split from fits.c, use plain
16638	UINT_MAX etc, not MPZ_FITS_UTYPE_SDT etc.
16639	* mpz/fits.c: Remove file.
16640	* mpz/Makefile.am, macos/Makefile.in: Update.
16641
16642	* gmp-impl.h (UNSIGNED_TYPE_MAX etc): Remove these generic forms.
16643	(MPZ_FITS_[SU]TYPE_SDT): Remove these.
16644	(UINT_MAX etc): Provide a full set of defaults.
16645	* gmp-h.in (__GMP_MP_SIZE_T_INT): New define.
16646
16647	* mpz/tests/t-scan.c: New file.
16648	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
16649
16650	* mpz/scan0.c, mpz/scan1.c: Rewrite, don't read beyond allocated
16651	memory, support negatives, return ULONG_MAX for no bit found.
16652	* gmp.texi (Integer Logic and Bit Fiddling): Update.
16653
166542001-01-03  Torbjorn Granlund  <tege@swox.com>
16655
16656	* mpz/tests/dive.c: Generate test operands using new random functions.
16657	* mpz/tests/io.c: Likewise.
16658	* mpz/tests/logic.c: Likewise.
16659	* mpz/tests/t-2exp.c: Likewise.
16660
16661	* stack-alloc.c (__gmp_tmp_alloc): Round `now' to required alignment.
16662
16663	* stack-alloc.h (__TMP_ALIGN): Append `L'.
16664
16665	* gmp-impl.h: For Cray, #include limits.h.
16666	(LONG_MIN): New #define.
16667	(ULONG_HIGHBIT): #define in terms of ULONG_MAX.
16668	(LONG_HIGHBIT): #define as LONG_MIN.
16669	(USHRT_MAX): New name for USHORT_MAX.
16670	(SHRT_MAX): New name for SHORT_MAX.
16671	(SHRT_MIN): New #define.
16672	(USHORT_HIGHBIT,SHORT_HIGHBIT): Removed.
16673
16674	* mpbsd/tests/t-misc.c (check_itom [data]): *SHORT* => *SHRT*;
16675	remove code disabling a test for Cray.
16676
16677	* tests/t-constants.c (CHECK_CONSTANT): Cast parameters to long.
16678
16679	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove unused variable `t'.
16680	(mpn_kara_mul_n): Likewise.
16681
16682	* mpz/fac_ui.c (MPZ_SET_1_NZ): Actually use `__z'.
16683
16684	* mpz/tests/t-jac.c
16685	(main, check_squares_zi): Generate test operands using new random
16686	functions.
16687
16688	All changes below on this date for enabling `make; make check'
16689	with C++ compilers:
16690
16691	* mpz/tests/t-pow_ui.c (debug_mp, ref_mpz_pow_ui): Provide prototypes.
16692
16693	* mpz/tests/t-mul.c (debug_mp, base_mul, ref_mpz_mul):
16694	Provide prototypes.
16695	(dump_abort): Provide prototype and declare properly for C++.
16696
16697	* mpz/tests/t-jac.c: #include stdlib.h and sys/time.h.
16698
16699	* mpz/tests/t-fdiv.c
16700	(dump_abort): Provide prototype and declare properly for C++.
16701	(debug_mp): Provide prototype.
16702	* mpz/tests/t-fdiv_ui.c: Likewise.
16703	* mpz/tests/t-gcd.c: Likewise.
16704	* mpz/tests/t-powm.c: Likewise.
16705	* mpz/tests/t-powm_ui.c: Likewise.
16706	* mpz/tests/t-sqrtrem.c: Likewise.
16707	* mpz/tests/t-tdiv_ui.c: Likewise.
16708	* mpz/tests/t-tdiv.c: Likewise.
16709
16710	* mpz/tests/t-2exp.c: #include stdlib.h and sys/time.h.
16711	Remove #include of longlong.h.
16712
16713	* mpz/tests/io.c: #include config.h, stdlib.h, sys/time.h, and
16714	conditionally unistd.h.
16715
16716	* mpz/tests/dive.c: #include stdlib.h and sys/time.h.
16717	(dump_abort): Provide prototype and declare properly for C++.
16718	(debug_mp): Provide prototype.
16719	* mpz/tests/logic.c: Likewise.
16720
16721	* mpz/tests/convert.c (debug_mp): Provide prototype.
16722	* mpz/tests/t-root.c (debug_mp): Likewise.
16723
16724	* mpz/tests/bit.c: #include stdlib.h and sys/time.h.
16725
16726	* mpq/tests/t-get_d.c: #include stdlib.h and sys/time.h.
16727	(dump): Provide prototype and declare properly for C++.
16728
16729	* mpq/tests/t-cmp_ui.c: #include stdio.h, stdlib.h and sys/time.h.
16730	(ref_mpq_cmp_ui): Declare properly for C++.
16731
16732	* mpq/tests/t-cmp.c: #include stdlib.h and sys/time.h.
16733	(ref_mpq_cmp): Declare properly for C++.
16734	(dump): Delete unused function.
16735
16736	* mpf/random2.c (myrandom): New function.
16737	(mpf_random2): Use it.
16738
16739	* mpn/generic/random2.c: #include stdlib.h (for random/mrand48).
16740	(myrandom): New function.
16741	(mpn_random2): Use it.
16742
16743	* mpf/tests/t-add.c: #include stdlib.h and sys/time.h.
16744	(oo): Remove unused function.
16745	* mpf/tests/t-conv.c: Likewise.
16746	* mpf/tests/t-sub.c: Likewise.
16747	* mpf/tests/t-dm2exp.c: Likewise.
16748	* mpf/tests/t-muldiv.c: Likewise.
16749	* mpf/tests/t-sqrt.c: Likewise.
16750
16751	* mpf/tests/reuse.c: #include stdlib.h and sys/time.h.
16752	Use PROTO on some typedefs.
16753	(oo): Remove function.
16754	(dump_abort): Call mpf_dump instead of oo.
16755
16756	* mpf/set_str.c: #include stdlib.h (for strtol).
16757
16758	* mpf/random2.c: #include stdlib.h (for random/mrand48).
16759	* mpn/alpha/udiv_arnnd: File deleted.
16760
16761	* Remove K&R function headers.
16762
167632001-01-02  Torbjorn Granlund  <tege@swox.com>
16764
16765	* mpn/generic/mul.c: Clean up spacing and indentation.
16766
16767	* mpn/generic/mul_fft.c (mpn_fft_add_modF): Use mpn_decr_u.
16768	Clean up spacing and indentation.
16769
16770	* extract-dbl.c: Generalize to handle smaller limb sizes.
16771
167722001-01-01  Torbjorn Granlund  <tege@swox.com>
16773
16774	* mpbsd/mout.c: Output newline after "0".
16775
167762000-12-31  Torbjorn Granlund  <tege@swox.com>
16777
16778	* ltmain.sh: Remove space between `#!' and `$SHELL' when generating
16779	`libtool'.
16780
16781	* mpbsd/tests/t-misc.c (check_itom): Exclude test for all Cray
16782	vector systems.  Correct comment.
16783
167842000-12-31  Kevin Ryde  <kevin@swox.se>
16785
16786	* gmp.texi (ABI and ISA): New enough gcc needed for mips n32 etc, gcc
16787	2.95 needed for sparc 64-bit ABI, gcc 2.8 needed for -mv8plus.
16788
16789	* configure.in ([cjt]90,sv1-cray-unicos*): Preserve user specified
16790	MPN_PATH, amend test program indenting.
16791	(none-*-*): Add -DNO_ASM to gcc to disable longlong.h asm macros in
16792	generic C.
16793
16794	* config.sub (j90, t90): Preserve these, don't let configfsf.sub turn
16795	them into c90.
16796
16797	* config.guess (m68k-*-nextstep*,m68k-*-openstep*): Don't transform
16798	m68k to m68020, since m68k is already interpreted as 68020.
16799
168002000-12-30  Kevin Ryde  <kevin@swox.se>
16801
16802	* mpq/neg.c: Rewrite, use mpn, avoid denominator copy if unnecessary.
16803
16804	* mpz/tstbit.c: Rewrite, slightly simplified.
16805	* mpz/tests/bit.c (check_tstbit): New test, and add a couple more
16806	diagnostics elsewhere.
16807
16808	* configure.in (x86 gcc_cflags_cpu): Add -m486 for gcc 2.7.2.
16809	(ccbase): Only use a known compiler in eval statements (avoids
16810	problems with non-symbol characters).
16811	(ccbase): Use GMP_PROG_CC_IS_GNU to identify gcc installed under a
16812	different name.
16813	(cclist): Use same style $abi as other variables.
16814
16815	* acinclude.m4 (GMP_PROG_CC_IS_GNU): New macro.
16816	(GMP_GCC_MARCH_PENTIUMPRO): Use $ccbase to identify gcc.
16817	(GMP_ASM_TYPE): Define TYPE to empty, not "dnl", when no .type needed.
16818	(GMP_ASM_SIZE): Ditto for SIZE, which ensures EPILOGUE on the last
16819	line of a file doesn't leave a tab and no newline.
16820	(GMP_ASM_UNDERSCORE): Add a prototype for C++.
16821
16822	* configure.in (sys/mman.h, mprotect): New tests.
16823	* mpn/tests/try.c: Use them, and HAVE_UNISTD_H too.
16824
16825	* configure.in (getopt.h): Remove test.
16826	* tune/speed.c, mpn/tests/try.c (getopt.h): Remove include, since
16827	plain getopt() is in <unistd.h>.
16828
16829	* configure.in, gmp-h.in (mips*-*-irix6*): Set limb_n32=longlong
16830	rather than using _ABIN32.
16831
168322000-12-29  Torbjorn Granlund  <tege@swox.com>
16833
16834	* mpz/tests/reuse.c: Rename dump_abort => dump.
16835	* mpz/tests/reuse.c: Generate operands using gmp_rand*.
16836	* mpz/tests/convert.c: Likewise.
16837
16838	* configure.in: Detect T90-ieee systems; move Cray path
16839	selection to after AC_PROG_CC.  Invoke AC_PROG_CPP.
16840	* mpn/cray/cfp: New directory.  Move cfp specific files here.
16841	* mpn/cray/cfp/mulwwc90.s: New file.
16842	* mpn/cray/cfp/mulwwj90.s: New file.
16843	* mpn/cray/mulww.s: Delete.
16844
168452000-12-27  Torbjorn Granlund  <tege@swox.com>
16846
16847	* mpn/cray/ieee/mul_1.c: New file.
16848	* mpn/cray/ieee/addmul_1.c: New file.
16849	* mpn/cray/ieee/submul_1.c: New file.
16850	* mpn/cray/ieee/gmp-mparam.h: New file.
16851
16852	* mpn/cray/gmp-mparam.h: Disable UMUL_TIME and UDIV_TIME.
16853
16854	* mpn/cray/hamdist.c: New file.
16855	* mpn/cray/popcount.c: New file.
16856	* mpn/cray/rshift.c: New file.
16857	* mpn/cray/lshift.c: New file.
16858
16859	* longlong.h: Add count_leading_zeros for _CRAY.
16860	Reorganize _CRAY stuff.
16861
168622000-12-24  Kevin Ryde  <kevin@swox.se>
16863
16864	* configure.in (alpha*-cray-unicos*): Disable SPEED_CYCLECOUNTER_OBJ,
16865	as tune/alpha.asm doesn't suit.
16866
16867	* mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
16868	mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
16869
168702000-12-23  Torbjorn Granlund  <tege@swox.com>
16871
16872	* mpn/generic/mul_fft.c: Reformat.
16873	(mpn_fft_neg_modF): Remove.
16874	(mpn_fft_mul_2exp_modF): Inline mpn_fft_neg_modF.
16875
16876	* mpn/cray/gmp-mparam.h: Retune.
16877
16878	* configure.in (*-cray-unicos*): Pass `-O3 -htask0'.
16879	(vax*-*-*): Fix typo.
16880
16881	* mpn/cray/mul_1.c: Use dynamic arrays, get rid of TMP_*.
16882	* mpn/cray/addmul_1.c: Likewise.
16883	* mpn/cray/submul_1.c: Likewise.
16884	* mpn/cray/add_n.c: Likewise.
16885	* mpn/cray/sub_n.c: Likewise.
16886
16887	* configure.in (default cc_cflags,cc_64_cflags): Remove -g/add -O.
16888	(mips*-*-irix[6789]*]): Remove -g from cc_*_cflags.
16889
168902000-12-22  Torbjorn Granlund  <tege@swox.com>
16891
16892	* mpn/generic/mul_n.c: Delete K&R function headers.
16893
16894	* mpn/generic/mul_n.c (mpn_kara_mul_n): Clean up type confusion
16895	between mp_limb_t and mp_size_t.
16896	(mpn_kara_sqr_n): Likewise.
16897
16898	* mpn/generic/mul_n.c (mpn_kara_mul_n): Use mpn_incr_u.
16899	(mpn_kara_sqr_n): Likewise.
16900
16901	* mpn/generic/mul_n.c (mpn_kara_mul_n): Change handling of `sign'
16902	to work around GCC 2.8.1 MIPS bug.
16903
16904	* configure.in (implied alpha*-cray-unicos*): Remove -g from cc_cflags.
16905
169062000-12-21  Torbjorn Granlund  <tege@swox.com>
16907
16908	* mpn/alpha/invert_limb.asm: Simplify a bit.
16909	Add handling of bigend systems.
16910	* mpn/alpha/unicos.m4: Define `bigend'.
16911	* mpn/alpha/default.m4: Define `bigend' (to expand to nothing).
16912
16913	* tests/t-constants.c (CHECK_CONSTANT): Print using %lx.
16914
16915	* mpn/alpha/gmp-mparam.h: Remove sizes for plain C types.
16916	* mpn/alpha/ev5/gmp-mparam.h: Likewise.
16917	* mpn/alpha/ev6/gmp-mparam.h: Likewise.
16918
16919	* mpn/alpha/unicos.m4: Define LEA.
16920	* mpn/alpha/default.m4: Likewise.
16921	* mpn/alpha/invert_limb.asm: Use LEA for loading symbolic addresses.
16922	* mpn/alpha/cntlz.asm: Likewise.
16923
16924	* mpn/alpha/cntlz.asm: Don't use `ldbu', use slightly slower
16925	`ldq_u' + `extbl' instead.
16926
16927	* mpn/alpha/unicos.m4: Define EXTERN.
16928	* mpn/alpha/default.m4: Define EXTERN (to expand to nothing).
16929	* mpn/alpha/cntlz.asm: Declare __clz_tab usign `EXTERN' (for the
16930	benefit of Unicos).
16931
169322000-12-21  Kevin Ryde  <kevin@swox.se>
16933
16934	* mpn/alpha/unicos.m4 (GSYM_PREFIX): Define for the benefit of
16935	__clz_tab.
16936
169372000-12-20  Torbjorn Granlund  <tege@swox.com>
16938
16939	* longlong.h: Add udiv_qrnnd and count_leading_zeros for _CRAYMPP
16940	systems.
16941
169422000-12-19  Torbjorn Granlund  <tege@swox.com>
16943
16944	* configure.in (*sparc*-*-*): Remove -g from cc_cflags and acc_cflags.
16945
16946	* mpn/generic/sqrtrem.c (mpn_sqrtrem): Separate `limb' values from
16947	`size' values.
16948
16949	* configure.in (*-cray-unicos*): Add `-Wa,-B' to cc_cflags.
16950
16951	* demos/pexpr.c (rstate): New variable.
16952	(main): Initialize rstate.
16953	(enum op_t): Add RANDOM.
16954	(fns): Add field for RANDOM.
16955	(mpz_eval_expr): Handle RANDOM.
16956
169572000-12-19  Kevin Ryde  <kevin@swox.se>
16958
16959	* mpn/generic/sqrtrem.c: Rewrite by Paul Zimmermann, based on his
16960	Karatsuba Square Root algorithm.
16961	* gmp.texi (Square Root Algorithm): Update.
16962
16963	* tune/many.pl: New file.
16964
16965	* mpn/tests/try.c,ref.[ch] (mpn_preinv_mod_1, mpn_sb_divrem_mn,
16966	mpn_tdiv_qr, mpn_gcd_finda, mpn_kara_mul_n, mpn_kara_sqr_n,
16967	mpn_toom3_mul_n, mpn_toom3_sqr_n): Add testing.
16968	* mpn/tests/ref.c: Cast some "0"s in function calls.
16969
16970	* mpn/x86/k7/mmx/mod_1.asm: Add preinv_mod_1 entrypoint, remove extra
16971	variable for loop termination.
16972
16973	* mpn/x86/p6/mmx/mod_1.asm: Remove file, in favour of the following.
16974	* mpn/x86/p6/mod_1.asm: New file.
16975
16976	* mpn/x86/pentium/mod_1.asm: New file.
16977
169782000-12-18  Torbjorn Granlund  <tege@swox.com>
16979
16980	* configure.in (mips*-*-irix[6789]*): Pass options to compiler using
16981	`-Wc'.
16982
169832000-12-18  Kevin Ryde  <kevin@swox.se>
16984
16985	* mpn/x86/k6/pre_mod_1.asm: New file.
16986
16987	* tune/tuneup.c (USE_PREINV_MOD_1): Tune this, rearrange mpn_divrem_1
16988	and mpn_mod_1 handling in support of it.
16989	* tune/Makefile.am: Consequent changes to divrem_1.c and mod_1.c.
16990
16991	* gmp-impl.h (USE_PREINV_MOD_1, MPN_MOD_OR_PREINV_MOD_1): New macros.
16992	* mpn/generic/perfsqr.c, mpz/pprime_p.c: Use MPN_MOD_OR_PREINV_MOD_1.
16993
16994	* configure.in: Let an asm mod_1 provide a preinv_mod_1 entrypoint.
16995
16996	* mpn/alpha/default.m4: Remove some newlines, add some asserts.
16997	(r0 etc, f0 etc): Use defreg and deflit.
16998	(PROLOGUE, PROLOGUE_GP, EPILOGUE): Use GSYM_PREFIX.
16999	* mpn/alpha/unicos.m4: Remove some newlines, add some asserts.
17000	* mpn/alpha/invert_limb.asm: Remove unused second DATASTART parameter.
17001	* mpn/alpha/cntlz.asm: Use mpn_count_leading_zeros and __clz_tab.
17002
17003	* mpn/asm-defs.m4 (changecom): Comments on portability.
17004	(__clz_tab, modlimb_invert_table): New macros, matching gmp-impl.h.
17005	(count_leading_zeros, count_trailing_zeros): New define_mpn's.
17006	(PROLOGUE etc): Comments on usage, add some asserts.
17007	(OPERATION_[lr]shift): Use m4_not_for_expansion, for the benefit of
17008	lorrshift multifunc.
17009
17010	* mpn/Makeasm.am (RM_TMP): New variable controlling tmp-*.s
17011	removal, for development purposes.
17012
17013	* mpz/fac_ui.c: Fix for long long limb by using mpn_mul_1 not
17014	mpz_mul_ui, and note some possible enhancements.
17015
17016	* mpz/tests/t-fac_ui.c: New test.
17017	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
17018	* macos/Makefile.in: Ditto, and add t-fib_ui too.
17019
17020	* mpn/generic/[lr]shift.c: Remove some DEBUG code adequately covered
17021	by new parameter ASSERTs.
17022
17023	* longlong.h (count_trailing_zeros): Assert x!=0.
17024
17025	* doc/configuration: Updates for new configure things, add some notes
17026	on test setups.
17027
170282000-12-16  Torbjorn Granlund  <tege@swox.com>
17029
17030	* configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc also for 64-bit
17031	compiles.
17032	* configure.in: Disable shared libs for *-*-ultrix*.
17033
170342000-12-15  Torbjorn Granlund  <tege@swox.com>
17035
17036	* configure.in (powerpc*-*-*): Pass -Wa,-mppc when using gcc.
17037
17038	* gmp-impl.h (_EXTERN_INLINE): #define different for GCC and other
17039	compilers.
17040
17041	* gmp-h.in (__gmp_inline): Remove.
17042	* mp-h.in: Likewise.
17043	* mpn/generic/gcd.c: Use `inline' instead of `__gmp_inline'.
17044
17045	* configure.in (mips*-*-irix[6789]*): Define *_ldflags.
17046
170472000-12-14  Torbjorn Granlund  <tege@swox.com>
17048
17049	* mpn/generic/pre_mod_1.c: Use proper type for udiv_qrnnd
17050	parameter `dummy'.
17051
17052	* mpn/generic/divrem_1.c: Use explicit `!= 0' in if statement.
17053	* mpn/generic/mod_1.c: Likewise.
17054
170552000-12-14  Kevin Ryde  <kevin@swox.se>
17056
17057	* config.guess (mips-*-irix[6789]*): Transform to mips64.
17058	(m68k-*-nextstep* | m68k-*-openstep*): Transform to m68020.
17059
170602000-12-13  Torbjorn Granlund  <tege@swox.com>
17061
17062	* tests/t-constants.c (main): Conditionalize use of PP_INVERTED.
17063
17064	* mpn/mp_bases.c: Handle 4-bit limbs.
17065	(main): Add code for generating tables.
17066
17067	* mpn/generic/popham.c: Handle limb bitsizes of 4, 8, 16.
17068	Suffix all 32-bit constant with `L'.
17069	Use CNST_LIMB for 64-bit constants.
17070
170712000-12-13  Kevin Ryde  <kevin@swox.se>
17072
17073	* gmp-impl.h (FIB_THRESHOLD): Defaults for 4,8,16 bits per limb, and
17074	an arbitrary fallback default.
17075	(modlimb_invert): Add efficient code for 8,16 (or 4) bits per limb.
17076
17077	* configure.in (mips3, mips64): Don't bother with o32 (mips2 32-bit
17078	limb) on IRIX 6.
17079
17080	* Makefile.am (SUBDIRS): Put "tests" first so tests/t-constants.c is
17081	run first, to pick up any limb size mismatch.
17082
17083	* tune/tuneup.c (DIVREM_1, MOD_1): Fix result values, were off by 1.
17084
17085	* mpz/fib_ui.c (table1, table2): Add data for 4,8,16 bits per limb.
17086
170872000-12-12  Torbjorn Granlund  <tege@swox.com>
17088
17089	* gmp-impl.h (LIMBS_PER_DOUBLE): Define for any limb bitsize.
17090
170912000-12-11  Torbjorn Granlund  <tege@swox.com>
17092
17093	* mpn/mp_bases.c: Add tables for 8-bit and 16-bit limbs.
17094	Round existing `double' values properly.
17095
17096	* gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_
17097	to keep out of user name space.
17098	(__gmp_randata_lc): Likewise.
17099	* randclr.c, randlc.c, randlc2x.c, randraw.c, randsd.c, randsdui.c:
17100	Corresponding changes.
17101
17102	* gmp-impl.h (PP): #define for machines with BITS_PER_MP_LIMB
17103	of 2, 4, 8, and 16.
17104	(PP_FIRST_OMITTED): New, define for various BITS_PER_MP_LIMB.
17105	(PP_MASK): Remove.
17106	(PP_MAXPRIME): Remove.
17107
17108	* mpn/generic/perfsqr.c: Generalize PP handling for machines with
17109	limbs of < 32 bits.  Allow PP_INVERTED to be undefined.
17110	* mpz/pprime_p.c: Likewise.
17111
171122000-12-10  Torbjorn Granlund  <tege@swox.com>
17113
17114	* mpn/generic/mul_1.c: Declare parameters in C89 style.
17115
171162000-12-10  Kevin Ryde  <kevin@swox.se>
17117
17118	* tune/Makefile.am (speed_LDFLAGS, speed_ext_LDFLAGS, tune_LDFLAGS):
17119	Don't use -all-static, as gcc 2.95.2 on i386 solaris 8 doesn't like
17120	it.
17121
17122	* configure.in (mips3,mips64): Add ABI=64, name the others ABI=n32 and
17123	ABI=o32.
17124	* mpn/mips3/gmp-mparam.h (BITS_PER_LONGINT): Remove #define and let
17125	configure determine it, since it varies with ABI=64 or ABI=n32.
17126	* gmp.texi (ABI and ISA): Update.
17127	(mpz_mod_ui): Remark that it's identical to mpz_fdiv_r_ui.
17128	(mpn_divexact_by3): Qualify a statement needing mp_bits_per_limb even.
17129
17130	* mul_fft.c (mpn_fft_mul_modF_K etc): Patch by Paul Zimmermann to fix
17131	results in certain cases of recursing into a further FFT.
17132
171332000-12-09  Torbjorn Granlund  <tege@swox.com>
17134
17135	* mpz/cmpabs.c: Remove unused variable.
17136	* mpz/rrandomb.c: Likewise.
17137	* mpz/xor.c: Likewise.
17138
171392000-12-07  Torbjorn Granlund  <tege@swox.com>
17140
17141	* mpn/generic/gcdext.c: Handle double carry when computing s1.
17142	Merge two code blocks for computing s0 and s1.
17143
171442000-12-07  Kevin Ryde  <kevin@swox.se>
17145
17146	* configure.in (hppa*-*-*): Remove -Aa -D_HPUX_SOURCE from
17147	cc_cflags/cppflags, and instead let AM_C_PROTOTYPES add it, or -Ae,
17148	whichever works.
17149
17150	* configure.in (*-*-aix[34]*): Disable shared by default, but let
17151	the user override that, if desired.
17152	* gmp.texi (Notes for Particular Systems): Update.
17153
171542000-12-06  Torbjorn Granlund  <tege@swox.com>
17155
17156	* mpq/cmp_ui.c: Streamline.
17157
171582000-12-06  Kevin Ryde  <kevin@swox.se>
17159
17160	* tune/divrem_1_div.c,divrem_1_inv.c,mod_1_div.c,mod_1_inv.c,
17161	gcdext_double.c: New files for measuring.
17162	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17163	* tune/speed.c,speed.h,common.c: Add measuring of them.
17164	(mpn_preinv_mod_1, mpz_jacobi, mpz_powm_ui): Add measuring.
17165
17166	* speed.c (getopt_long): Don't use this, just plain getopt.
17167	* configure.in (getopt_long): Remove test.
17168
17169	* gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_MUL_N_MINSIZE,
17170	MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_MUL_N_MINSIZE): New macros, and
17171	assume toom3 square tsize was meant to be the same as the mul (both
17172	are overestimates).
17173	* tune/tuneup.c, mpn/generic/mul.c, mpn/generic/mul_n.c: Use them.
17174	* mpn/generic/mul_n.c (mpn_toom3_sqr_n): Fix an ASSERT to use
17175	TOOM3_SQR_THRESHOLD not TOOM3_MUL_THRESHOLD, add a few that might
17176	be more realistic size checks.
17177	* tune/speed.h (SPEED_ROUTINE_MPN_MUL_N_TSPACE etc): Use minsize.
17178
17179	* mpn/generic/divrem_1.c: Partial rewrite, merge fractional part
17180	calculation, skip a divide step in more cases, introduce
17181	DIVREM_1_NORM_THRESHOLD and DIVREM_1_UNNORM_THRESHOLD.
17182	* mpn/generic/mod_1.c: Partial rewrite, skip a divide step in more
17183	cases, introduce MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD.
17184	* longlong.h (UDIV_PREINV_ALWAYS): New define, set for alpha and ia64.
17185	* tune/tuneup.c (DIVREM_1_NORM_THRESHOLD, DIVREM_1_UNNORM_THRESHOLD,
17186	MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD): Tune these.
17187	* gmp-impl.h [TUNE_PROGRAM_BUILD]: Support for this.
17188	* tune/Makefile.am (TUNE_MPN_SRCS): Add divrem_1.c and mod_1.c.
17189
17190	* gmp-impl.h (UDIV_NORM_PREINV_TIME): Renamed from UDIV_PREINV_TIME.
17191	* mpn/generic/perfsqr.c, mpn/generic/sb_divrem_mn.c,
17192	mpn/x86/*/gmp-mparam.h: Ditto.
17193	* gmp-impl.h (UDIV_UNNORM_PREINV_TIME): New define.
17194
17195	* configure.in (AC_C_INLINE, HAVE_INLINE): New test and define.
17196	* gmp-impl.h (inline): Remove, use config.h.
17197	(_EXTERN_INLINE): Redefine based on HAVE_INLINE.
17198	(mpn_zero_p): Use HAVE_INLINE.
17199
17200	* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Don't add flags to a user
17201	selected $AR or $NM.
17202
17203	* tune/tuneup.c (all): Print how long the tuning took.
17204
17205	* configure.in (AM_C_PROTOTYPES): Use this, not GMP_ANSI2KNR.
17206	* acinclude.m4 (GMP_ANSI2KNR): Remove.
17207
17208	* Makefile.am (gmp.h, mp.h): In DISTCLEANFILES not CLEANFILES.
17209
17210	* gmp-h.in (mpn_divmod, mpn_divmod_1, mpn_divexact_by3): Cast some
17211	zeros, for the benefit of K&R if long!=int.
17212
17213	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add "*" for
17214	the benefit of cray.
17215
17216	* compat.c (mpn_divexact_by3, mpn_divmod_1): Return types should be
17217	mp_limb_t, not int, and need an actual "return".
17218
172192000-12-05  Torbjorn Granlund  <tege@swox.com>
17220
17221	* mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
17222	* mpn/alpha/gmp-mparam.h: Tune for 21064.
17223
17224	* longlong.h: Reformat to avoid newlines within strings.
17225
17226	* gmp-impl.h (inline): Disable if GCC has defined __STRICT_ANSI__.
17227
17228	* configure.in: Do a `mkdir tune' before creating tune/sqr_basecase.c.
17229
17230	* Makefile.am: Treat mp.h analogously to gmp.h.
17231
17232	configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc.
17233
17234	* mp-h.in: Renamed from mp.h.
17235	Add #define for _LONG_LONG_LIMB.
17236	Move some other fixes from gmp-h.in.
17237	* mp.h: Removed.
17238	* configure.in: Generate mp.h from mp-h.in like we handle
17239	gmp-h.in/gmp.h.
17240
172412000-12-04  Torbjorn Granlund  <tege@swox.com>
17242
17243	* acinclude.m4: Fix typo testing for bad HP compiler.
17244
172452000-12-03  Torbjorn Granlund  <tege@swox.com>
17246
17247	* mpbsd/tests/t-misc.c (check_itom): Exclude some tests for Cray
17248	CFP systems.
17249
17250	* longlong.h (CRAYIEEE umul_ppmm): New.
17251
17252	* mpn/cray/gmp-mparam.h (BITS_PER_SHORTINT): 32 => 64.
17253	(*_THRESHOLD): Tune.
17254
17255	* configure.in: Disable shared libs for *-*-unicos*.
17256
172572000-12-03  Kevin Ryde  <kevin@swox.se>
17258
17259	* configure.in, tune/Makefile.am: Create tune/sqr_basecase.c during
17260	configure, and use it unconditionally in $(nodist_tuneup_SOURCES).
17261	Fixes a problem with sqr_basecase.lo under --disable-static.
17262
172632000-12-01  Torbjorn Granlund  <tege@swox.com>
17264
17265	* mpf/tests/t-get_d.c (LOW_BOUND,HIGH_BOUND): #define for non-IEEE
17266	Cray systems.
17267
17268	* gmp-impl.h (union ieee_double_extract): Test for _CRAYIEEE.
17269
172702000-11-30  Torbjorn Granlund  <tege@swox.com>
17271
17272	* mpz/tests/t-mul.c (base_mul): Fix re-evaluation problems in macro
17273	invocations.
17274	(ref_mpz_mul): New name from mpz_refmul.  Make static.
17275	(base_mul): New name for _mpn_mul_classic.
17276
172772000-11-30  Kevin Ryde  <kevin@swox.se>
17278
17279	* configure.in: Rewrite of CC/CFLAGS selection scheme, introduce a
17280	notion of ABI, merge compiler and mpn path selection, add flags
17281	selection for AR and NM, let CC without CFLAGS work.
17282	(AC_PROG_CC): Use this, not GMP_SELECT_CC.
17283	* acinclude.m4 (GMP_PROG_CC_WORKS): Don't use AC_TRY_COMPILE, combine
17284	cc/cflags parameter.
17285	(GMP_PROG_CC_FIND, GMP_CHECK_CC_64BIT, GMP_PROG_CC_SELECT): Remove.
17286	* gmp.texi (Installing GMP): Updates for new scheme.
17287
17288	* configure.in (AC_CANONICAL_HOST): Use this and $host, not $target.
17289	* acinclude.m4, acconfig.h, longlong.h, mpn/x86/x86-defs.m4,
17290	mpn/x86/k7/mmx/popham.asm: Ditto, renaming HAVE_TARGET_CPU to
17291	HAVE_HOST_CPU.
17292	* gmp.texi (Build Options, and elsewhere): Update.
17293
17294	* acinclude.m4 (GMP_COMPARE_GE): New macro.
17295	(GMP_GCC_MARCH_PENTIUMPRO): Use it, add CC parameter, check for GCC.
17296	(GMP_HPC_HPPA_2_0): New macro, adapted from GMP_CHECK_CC_64BIT.
17297
17298	* acinclude.m4 (GMP_PROG_AR): New macro, using AC_CHECK_TOOL, adding
17299	GMP flags.
17300	* configure.in: Use it
17301
17302	* gmp-h.in: Renamed from gmp.h.
17303	(@define_LONG_LONG_LIMB@): Placeholder for instantiation.
17304	(__GNU_MP__): Bump to 3.
17305	* acinclude.m4 (GMP_VERSION): Get version from gmp-h.in.
17306	* configure.in: Create gmp.h from gmp-h.in to set _LONG_LONG_LIMB.
17307	* gmp.texi.h (ABI and ISA): Mention this.
17308	* acconfig.h (_LONG_LONG_LIMB): Remove undef.
17309	* Makefile.am: Distribute gmp-h.in, not gmp.h.
17310
17311	* configure.in (AC_PROG_CPP, AC_PROG_INSTALL, AC_PROG_LN_S): Remove,
17312	dragged in by other macros.
17313	(gmp_asm_syntax_testing): Renamed from gmp_no_asm_syntax_testing.
17314	(AC_EXEEXT, AC_OBJEXT): Remove, done automatically by libtool.
17315	* configure.in, acinclude.m4: Remove "" from "`foo`", being
17316	unnecessary and not portable.
17317
17318	* configure.in (GMP_LDFLAGS): New AC_SUBST flags for libtool link.
17319	(powerpc64*-*-aix*): Use for -Wc,-maix to fix shared library creation,
17320	but can't build shared and static at the same time.
17321	* Makefile.am (libgmp_la_LDFLAGS, libmp_la_LDFLAGS): Use
17322	$(GMP_LDFLAGS).
17323	* gmp.texi (Notes for Particular Systems): Update AIX problem
17324
17325	* configure.in (AC_CONFIG_LINKS): Use where needed, not via gmp_links.
17326	(gmp_srclinks): Build up as needed, not via gmp_links.
17327
17328	* acinclude.m4 (GMP_INIT): Do CONFIG_TOP_SRCDIR and asm-defs.m4 here.
17329	* configure.in (asm-defs.m4): Consequent changes.
17330
17331	* acinclude.m4 (GMP_INCLUDE_MPN): Using include_mpn(), replacing
17332	GMP_INCLUDE and GMP_SINCLUDE.
17333	* configure.in (gmp_m4postinc): Remove this scheme, use
17334	GMP_INCLUDE_MPN instead.
17335
17336	* configure.in (*-*-sco3.2v5*): Force ac_cv_archive_cmds_need_lc=no,
17337	until libtool does this itself.
17338	* gmp.texi (Known Build Problems): Remove SCO -lc problem.
17339
17340	* configure, INSTALL.autoconf, etc: Update to autoconf 2000-11-29.
17341	* acinclude.m4 (GMP_C_SIZES): Use AC_CHECK_SIZEOF.
17342	* gmp.texi (Known Build Problems): Remove version.c sed/config.h
17343	problem, fixed.
17344
17345	* ltmain.sh, aclocal.m4: Update to libtool 2000-11-25.
17346	* ltconfig: No longer required, but leave an empty dummy for automake.
17347	* gmp.texi (Known Build Problems): Remove SunOS native ar ranlib
17348	problem, fixed.
17349
17350	* */Makefile.in, aclocal.m4: Update to automake 2000-11-25.
17351	* mpbsd/tests/Makefile.am, mpfr/tests/Makefile.am (check_PROGRAMS):
17352	Remove dummy, no longer required.
17353	* mpbsd/tests/dummy.c, mpfr/tests/dummy.c: Remove files.
17354	* depcomp: Remove file, no longer required (with no-dependencies).
17355
17356	* texinfo.tex: Update to 2000-11-09.
17357	* gmp.texi (Build Options): Mention PDF from gmp.texi.
17358	* Makefile.am (MOSTLYCLEANFILES): Add gmp.tmp, from new texinfo.tex.
17359
17360	* gmp.texi (Build Options): List alphaev56, alphapca56, alphaev67,
17361	hppa2.0n and power among supported CPUs.
17362
173632000-11-30  Torbjorn Granlund  <tege@swox.com>
17364
17365	* mpz/tests/t-mul.c: Increase max operand size from 2^17 bits
17366	to 2^19 bits.  Misc cleanups.
17367
173682000-11-26  Kevin Ryde  <kevin@swox.se>
17369
17370	* tune/tuneup.c (FIB_THRESHOLD): Cope better with different speeds of
17371	odd and even sizes.
17372
17373	* longlong.h (alpha): Use udiv_qrnnd and count_leading_zeros on all
17374	compilers, not just gcc.
17375
17376	* pre_mod_1.c: Use conditional subtract to always skip a division.
17377	(UMUL_TIME, UDIV_TIME): Remove defaults, now in longlong.h.
17378
173792000-11-22  Torbjorn Granlund  <tege@swox.com>
17380
17381	* mpn/pa64w/gmp-mparam.h: Retune.
17382	* mpn/pa64/gmp-mparam.h: Retune.
17383	* mpn/sparc64/gmp-mparam.h: Retune.
17384
173852000-11-22  Kevin Ryde  <kevin@swox.se>
17386
17387	* gmp-impl.h (ABOVE_THRESHOLD, BELOW_THRESHOLD): New macros.
17388	* mpn/generic/gcdext.c: Use them.
17389
17390	* mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Force only one step.
17391	* tune/gcdextos.c, tune/gcdextod.c: New files, one step gcdext, single
17392	and double.
17393	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17394	(TUNE_MPN_SRCS): Remove gcdext.c.
17395	* tune/speed.h, tune/common.c, tune/speed.c: Add measuring.
17396	* tune/tuneup.c: Use for GCDEXT_THRESHOLD, plus check if double limb
17397	is ever better.  Should be more accurate, and hopefully faster.
17398
17399	* tune/gcdext_single.c: New file, gcdext forced to single limbs.
17400	* tune/Makefile.am: Add it.
17401	* tune/speed.h, tune/common.c, tune/speed.c: Add measuring, and of
17402	invert_limb.
17403
17404	* tune/speed.h (speed_params r): Use mp_limb_t, not long.
17405	* tune/speed.h, tune/common.c: Don't "switch" on "r".
17406	* tune/speed.c (r_string): Accept limb sized constants.
17407	(choice scale): Add a scale factor (eg. "2.33*mpn_add_n").
17408	* tune/common.c (SPEED_ROUTINE_UDIV_QRNND_A): Default r to
17409	__mp_bases[10].big_base, being a full limb value.
17410
17411	* configure.in (alphapca56*-*-*): Use ev5 mpn path.
17412	(am29000*-*-*): Remove this, leave the canonical a29k.
17413	(z8k*-*-*, z8kx*-*-*): Changed from z8000, since z8k is canonical.
17414	(gmp_mpn_functions_optional): Add invert_limb, use for alpha and ia64.
17415
17416	* configure.in (alloca): Accept yes/no/detect, generate an error if
17417	"yes" but not available.
17418	* gmp.texi (Build Options): Update.
17419
17420	* acinclude.m4 (GMP_TRY_ASSEMBLE): Make conftest.out available.
17421	(GMP_ASM_ALIGN_FILL_0x90): Use it.
17422
17423	* acinclude.m4 (GMP_ASM_X86_MMX) [*-*-solaris*]: Check for solaris
17424	2.6 "as" movq bug.
17425	* gmp.texi (Notes for Particular Systems): Update x86 MMX note.
17426
174272000-11-21  Torbjorn Granlund  <tege@swox.com>
17428
17429	* tune/Makefile.am (EXTRA_DIST): List hppa2w.asm.
17430
17431	* tune/hppa2.asm: Change level directive to "2.0n".
17432	* tune/hppa2w.asm: New file.
17433	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Separate out hppa2.0w.
17434
17435	* mpn/pa64/gmp-mparam.h (BITS_PER_LONGINT): 64 => 32.
17436
174372000-11-21  Kevin Ryde  <kevin@swox.se>
17438
17439	* urandom.h (random): No prototype if glibc stdlib.h has already
17440	provided it (avoids an int32_t/long conflict).
17441
17442	* tune/Makefile.am (LDFLAGS): Use -all-static.
17443	(speed-dynamic): Dynamic linked version of speed.c.
17444	* tune/README: Update.
17445
17446	* mpn/generic/gcd.c (find_a): Use native version if available.
17447	* acconfig.h (HAVE_NATIVE_mpn_gcd_finda): Add #undef.
17448	* gmp-impl.h (mpn_gcd_finda): Add prototype and define.
17449	* mpn/asm-defs.m4 (mpn_gcd_finda): New define_mpn.
17450	* tune/gcd_finda_gen.c: #undef any HAVE_NATIVE_mpn_gcd_finda.
17451	* configure.in (gmp_mpn_functions_optional): Add gcd_finda.
17452	* mpn/x86/k6/gcd_finda.asm: New file.
17453
17454	* tune/tuneup.c (POWM_THRESHOLD): Slightly bigger size steps.
17455
17456	* gmp-impl.h (__GMP_IMPL_H__): Protect against multiple inclusion.
17457	* tune/gcd_bin.c, tune/powm_mod.c, tune/powm_redc.c: Use #undef after
17458	gmp-impl.h to force thresholds.
17459	* tune/tuneup.c (print_define, fft): No need for #ifndefs on
17460	thresholds any more.
17461
174622000-11-20  Torbjorn Granlund  <tege@swox.com>
17463
17464	* mpz/tests/t-powm.c: Analogous changes as made 2000-11-12 to t-mul.c.
17465	* mpz/tests/t-powm_ui.c: Likewise.
17466	* mpz/tests/t-pow_ui.c: Likewise.
17467	* mpz/tests/t-root.c: Likewise.
17468
17469	* configure.in [compiler switch]: Pass "-Aa -D_HPUX_SOURCE" to cc for
17470	all hppa versions.
17471
17472	* mpn/hppa/hppa1_1/udiv_qrnnd.S: Reference data using PC relative
17473	addressing (was r19 relative addressing).
17474
174752000-11-18  Torbjorn Granlund  <tege@swox.com>
17476
17477	* rand.c: (__gmp_rand_lc_scheme): Convert strings to hexadecimal.
17478	(gmp_randinit): Expect strings in hexadecimal.
17479
174802000-11-18  Kevin Ryde  <kevin@swox.se>
17481
17482	* configfsf.guess, configfsf.sub: Update to 2000-11-16.
17483	* config.guess (alpha*-*-openbsd*): Do exact cpu detection.
17484
174852000-11-14  Torbjorn Granlund  <tege@swox.com>
17486
17487	* mpz/tests/t-fdiv.c: Analogous changes as made 2000-11-12 to t-mul.c.
17488	* mpz/tests/t-tdiv_ui.c: Likewise.
17489	* mpz/tests/t-fdiv_ui.c: Likewise.
17490	* mpz/tests/t-sqrtrem.c: Likewise.
17491	* mpz/tests/t-gcd.c: Likewise.
17492
174932000-11-13  Kevin Ryde  <kevin@swox.se>
17494
17495	* mpn/Makeasm.am: New file, splitting out assembler rules.
17496	* mpn/Makefile.am, tune/Makefile.am: Use it.
17497
17498	* mpn/Makefile.am (@CPP@): Remove this, automake already gives it.
17499
17500	* configure.in (AC_CHECK_LIBM): New test, and AC_SUBST it.
17501	* Makefile.am (MPFR_LIBADD_OPTION): Use it.
17502	* demos/Makefile.am (qcn_LDADD): Ditto.
17503	* tune/Makefile.am (libspeed_la_LIBADD): Ditto.
17504	* tests/rand/Makefile.am (libstat_la_LIBADD): Ditto.
17505
17506	* tune/time.c (timeval_diff_secs): Better calculation.
17507	(read_real_time): New measuring method for AIX power/powerpc.
17508	(speed_endtime): Protect against negative times.
17509	* tune/common.c (speed_measure): Protect against big reps.
17510	* tune/freq.c (speed_cpu_frequency_measure_one): Better timeval diff.
17511	* tune/speed.h (TIMEVAL_DIFF_SEC,USEC): Remove macros.
17512	* configure.in: (sys/systemcfg.h, read_real_time): New tests.
17513
175142000-11-13  Torbjorn Granlund  <tege@swox.com>
17515
17516	* mpz/tests/t-mul.c: Remove #include urandom.h.
17517	* mpz/tests/t-tdiv.c: Likewise.
17518
17519	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]:
17520	Declare hppa.asm as just 32 bits (cyclecounter_size=1).
17521
175222000-11-12  Torbjorn Granlund  <tege@swox.com>
17523
17524	* mpz/tests/t-mul.c
17525	(main): Generate random numbers using gmp_rand* functions.
17526	(main): Distribute random numbers non-uniformly.
17527	(main): Seed by current time if GMP_CHECK_RANDOMIZE is set.
17528	(_mpn_mul_classic): Streamline.
17529	* mpz/tests/t-tdiv.c: Analogous changes.
17530
17531	* demos/pexpr.c (HAVE_sigaltstack): Fix typo in testing for _UNICOS.
17532	Also test for __hpux.
17533
175342000-11-11  Torbjorn Granlund  <tege@swox.com>
17535
17536	* mpn/alpha/ev5/gmp-mparam.h: Retune.
17537
17538	* mpn/alpha/ev6/gmp-mparam.h: Retune.
17539
17540	* mpn/alpha/ev6/add_n.asm: Misc cleanups.
17541
17542	* mpn/alpha/ev6/sub_n.asm: New file.
17543
175442000-11-10  Torbjorn Granlund  <tege@swox.com>
17545
17546	* configure.in [path switch] (alphaev6*-*-*): Add alpha/ev5 to path.
17547
17548	* mpn/alpha/ev6/add_n.asm: New file.
17549
175502000-11-10  Kevin Ryde  <kevin@swox.se>
17551
17552	* mpz/powm.c (redc): Make global under WANT_REDC_GLOBAL.
17553	* tune/powm_mod.c, tune/powm_redc.c: New files.
17554	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17555	* tune/*: Add measuring of redc, mpz_mod, mpz_powm_mod, mpz_powm_redc.
17556
17557	* tune/tuneup.c (POWM_THRESHOLD): Determine from redc and mpz_mod.
17558	* tune/Makefile.am (TUNE_MPZ_SRCS): Remove powm.
17559
175602000-11-10  Torbjorn Granlund  <tege@swox.com>
17561
17562	* mpn/mips3/gmp-mparam.h: Retune.
17563
17564	* configure.in (os_64bit): Rename to check_64bit_compiler.
17565
175662000-11-09  Torbjorn Granlund  <tege@swox.com>
17567
17568	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Choose hppa/hppa2 code
17569	depending on $CC64.
17570
175712000-11-09  Kevin Ryde  <kevin@swox.se>
17572
17573	* mpn/x86/pentium/mul_1.asm: Unroll 2x, saving 1 c/l when in L1.
17574	Add 1c entrypoint.
17575	* mpn/x86/pentium/aorsmul_1.asm: Add 1c entrypoints, shave a couple
17576	of cycles at entry and exit.
17577
17578	* configure.in (power1,2,2sc): Support these as synonyms for plain
17579	power.
17580
17581	* acinclude.m4 (GMP_ASM_X86_SHLDL_CL): GMP_DEFINE WANT_SHLDL_CL here.
17582	(GMP_ASM_X86_MMX, GMP_ASM_X86_SHLDL_CL): Add X86 into the names.
17583	* configure.in: Consequent changes.
17584
17585	* gmp.texi (Notes for Particular Systems): Remarks about power/powerpc.
17586	(Reentrancy): Remarks about simultaneous writing.
17587	(Reporting Bugs): Ask for configfsf.guess.
17588
175892000-11-08  Kevin Ryde  <kevin@swox.se>
17590
17591	* acinclude.m4 (GMP_FUNC_ALLOCA): New macro.
17592	* configure.in: Use it.
17593	* gmp-impl.h (alloca): Conditionals and setups as per autoconf
17594	(should make alloca available on more non-gcc compilers).
17595
17596	* acinclude.m4: Misc reformatting, simplify some quoting.
17597	(GMP_ASM_UNDERSCORE, GMP_ASM_X86_MCOUNT): Use $CC $CFLAGS $CPPFLAGS.
17598	(GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_FILL_0x90, GMP_ASM_RODATA): Put
17599	AC_REQUIREs outside AC_CACHE_CHECK.
17600	(GMP_C_SIZES): Use $srcdir/gmp.h, not -I; use $CPPFLAGS.
17601	(GMP_ASM_UNDERSCORE): Use "gmp_compile" variable, and only rm
17602	conftes1* conftes2*.
17603	(GMP_PROG_NM): New macro, require it in appropriate GMP_ASM_*.
17604	(GMP_TRY_ASSEMBLE): New macro, use it in various GMP_ASM_*.
17605	* configure.in: Use GMP_PROG_NM.
17606
17607	* mpn/tests/spinner.c (spinner_signal): Use RETSIGTYPE.
17608	(spinner_init): Force output to unbuffered.
17609
17610	* mpn/x86/README.family: Notes about GOT table and imul, misc updates.
17611	* mpn/x86/k7/diveby3.asm: Change to 3 operands for immediate imul.
17612	* mpn/x86/k6/diveby3.asm: Ditto.
17613
176142000-11-06  Torbjorn Granlund  <tege@swox.com>
17615
17616	* urandom.h: Simplify and make it work properly for 64-bit
17617	machines also in environments without `random'.
17618
176192000-11-04  Torbjorn Granlund  <tege@swox.com>
17620
17621	* configure.in [path switch]: Don't match rs6000-*-*, in
17622	particular don't assume POWER.
17623
17624	* tune/tuneup.c (fft): Remove usleep calls.
17625
17626	* config.guess: Don't pass "$@" when it is known to be empty.
17627
17628	* Makefile.am (EXTRA_DIST): List configfsf.guess and configfsf.sub.
17629
176302000-11-04  Kevin Ryde  <kevin@swox.se>
17631
17632	* configfsf.guess, configfsf.sub: Moved from config.guess and
17633	config.sub.
17634	* config.guess, config.sub: New files, wrappers around around
17635	configfsf versions.
17636	* configfsf.guess: Update to FSF 2000-10-23.
17637	* configfsf.sub: Update to FSF 2000-10-25.
17638
17639	* acinclude.m4 (GMP_ASM_POWERPC_R_REGISTERS): New macro.
17640	* mpn/powerpc32/powerpc-defs.m4: New file, regmap.m4 r0 etc macros
17641	conditionalized by GMP_ASM_POWERPC_R_REGISTERS.
17642	* mpn/powerpc32/regmap.m4: Remove file.
17643	* configure.in (powerpc*-*-*): Use all this.
17644
17645	* mpz/divegcd.c: New file, providing mpz_divexact_gcd.
17646	* Makefile.am, mpz/Makefile.am: Add it.
17647	* gmp-impl.h (mpz_divexact_gcd): Add prototype.
17648	* mpq/aors.c,canonicalize.c,div.c,mul.c: Use it.
17649
17650	* longlong.h [pentium] (count_leading_zeros): New macro.
17651	(__clz_tab): Always provide prototype.
17652	* acconfig.h (HAVE_TARGET_CPU_): Add x86s.
17653
17654	* tune/speed.[ch],common.c (count_leading_zeros,
17655	count_trailing_zeros, __udiv_qrnnd_c): Add measuring.
17656
17657	* configure.in (X86_PATTERN): Move from here ...
17658	* acinclude.m4 (X86_PATTERN): ... to here.
17659	(GMP_ASM_RODATA): Use it.
17660
17661	* configure.in (srandom): New test.
17662	* mpn/tests/try.c: Use it.
17663	* tune/speed.c: Ditto, and conditionalize getrusage and headers.
17664
176652000-11-02  Kevin Ryde  <kevin@swox.se>
17666
17667	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add udiv_qrnnd.c
17668	and udiv_w_sdiv.c.
17669
17670	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove a duplicate
17671	subtract at the evaluate stage.
17672
176732000-11-01  Torbjorn Granlund  <tege@swox.com>
17674
17675	* configure.in [compiler switch] (sparc64-*-linux*): Spell
17676	gmp_xoptcflags_gcc properly, and pass same options as for other
17677	sparcv9 configs.
17678
17679	* tune/speed.h (SPEED_ROUTINE_MPN_GET_STR): Fix type of wsize.
17680
176812000-10-31  Torbjorn Granlund  <tege@swox.com>
17682
17683	* configure.in [compiler switch] (sparc64-*-linux*): Remove -mvis
17684	from gmp_xoptflags_gcc, this might not be an ultrasparc.
17685	Remove -m32 from gmp_cflags_gcc; add -Wa,-xarch=v8plus.
17686
176872000-10-29  Torbjorn Granlund  <tege@swox.com>
17688
17689	* mpn/ia64/lorrshift.asm: New file.
17690
17691	* configure.in: New mulfunc `lorrshift' for lshift and rshift.
17692
176932000-10-29  Kevin Ryde  <kevin@swox.se>
17694
17695	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Delete code performing
17696	superfluous mpn_sub_n calls.
17697
17698	* configure.in (found_asm, M4): Account for SPEED_CYCLECOUNTER_OBJ,
17699	for the benefit of targets whose only .asm is a cycle counter.
17700
17701	* tune/tuneup.c (fft): Remove bogus usleep calls.
17702
177032000-10-28  Torbjorn Granlund  <tege@swox.com>
17704
17705	* mpn/ia64/invert_limb.asm: Get return value for 0x800...00 right.
17706
17707	* tune/Makefile.am (EXTRA_DIST): Add ia64.asm.
17708
17709	* tune/ia64.asm: Fix typo.
17710
17711	* add_n.asm addmul_1.asm mul_1.asm popcount.asm sub_n.asm:
17712	Preserve ar.lc as required by ABI.
17713	* longlong.h (ia64 udiv_qrnnd): New.
17714
17715	* configure.in [path switch] (ia64*-*-*): Set extra_functions.
17716	* mpn/ia64/invert_limb.asm: New file.
17717
177182000-10-27  Torbjorn Granlund  <tege@swox.com>
17719
17720	* configure.in [compiler switch]:
17721	Get rid of c89 for all hppa flavours--it is an evil compiler!
17722
17723	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix type of xp.
17724	(SPEED_ROUTINE_MPN_GET_STR): Fix type of wp.
17725
177262000-10-27  Kevin Ryde  <kevin@swox.se>
17727
17728	* gmp.texi (Fibonacci Number Algorithm): New section.
17729
17730	* mpz/tests/t-fib_ui.c: New file.
17731	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
17732
17733	* mpz/fib_ui.c: Rewrite, same formulas but using mpn functions and
17734	some lookup tables, much faster at small to moderate sizes.
17735	* gmp-impl.h (MPZ_FIB_SIZE): New macro.
17736	(FIB_THRESHOLD): Establish default here.
17737	* tune/tuneup.c (FIB_THRESHOLD): Start search after the new table
17738	data.
17739
17740	* mpn/x86/x86-defs.m4 (mcount_movl_GOT_ebx): Rename from movl_GOT_ebx,
17741	and don't use GSYM_PREFIX with _GLOBAL_OFFSET_TABLE_.
17742
17743	* tune/freq.c (speed_cpu_frequency_measure): New test comparing
17744	gettimeofday and speed_cyclecounter, should cover many systems.
17745
177462000-10-27  Torbjorn Granlund  <tege@swox.com>
17747
17748	* mpn/ia64/gmp-mparam.h: Retune.
17749
177502000-10-26  Torbjorn Granlund  <tege@swox.com>
17751
17752	* longlong.h (ia64): Set UMUL_TIME and UDIV_TIME.
17753
17754	* mpn/ia64/submul_1.c: Fix typo.
17755
177562000-10-25  Kevin Ryde  <kevin@swox.se>
17757
17758	* tune/freq.c (speed_cpu_frequency_sysctl): New test, supporting
17759	hw.model for BSD flavours.
17760	* configure.in (sysctl, sys/param.h): New tests.
17761
177622000-10-24  Torbjorn Granlund  <tege@swox.com>
17763
17764	* tune/freq.c: Explicitly #include config.h before other include files.
17765
17766	* mpz/tests/reuse.c (FAIL2): New #define.
17767	(main): Use FAIL2.  Now this test properly returns non-zero exit
17768	status when it fails.
17769
17770	* mpn/powerpc32/gmp-mparam.h: Retune.
17771	* mpn/powerpc64/gmp-mparam.h: Retune.
17772
177732000-10-24  Kevin Ryde  <kevin@swox.se>
17774
17775	* mpn/x86/k6/cross.pl: Support 8 and 16 byte code alignment.
17776
17777	* mpq/aors.c, mpq/canonicalize.c: Skip two mpz_divexact calls if
17778	gcd gives 1, which should be 60% of the time.
17779	* gmp-impl.h (MPZ_EQUAL_1_P): New macro.
17780	* mpq/mul.c, mpq/div.c: Use it, and a new DIV_OR_SET.
17781
17782	* tune/tuneup.c (xp_block, yp_block): Initialize these with random
17783	data.  Fixes GCD_ACCEL and GCDEXT thresholds, and latest POWM.
17784
177852000-10-23  Torbjorn Granlund  <tege@swox.com>
17786
17787	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Add ia64 case.
17788
17789	* mpn/ia64/gmp-mparam.h: Fill in some parameters.
17790
17791	* mpn/ia64/submul_1.c: New file.
17792
17793	* tune/ia64.asm: New file.
17794
17795	* gmp-impl.h (union ieee_double_extract): Handle ia64.
17796
17797	* mpn/mp_bases.c: Decrease chars_per_bit_exactly for entry 1 to
17798	work around buggy ia64-linux.
17799
17800	* longlong.h (ia64 umul_ppmm): Update register flags to match new GCC.
17801
178022000-10-22  Torbjorn Granlund  <tege@swox.com>
17803
17804	* mpn/alpha/ev6/gmp-mparam.h (DC_THRESHOLD): Update.
17805	* mpn/alpha/ev6/submul_1.asm: New file.
17806
178072000-10-22  Kevin Ryde  <kevin@swox.se>
17808
17809	* tune/gcd_bin.c: New file.
17810	* tune/gcd_finda_gen.c: New file.
17811	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17812	* tune/speed.[ch],common.c (mpn_gcd_binary, find_a): Add measuring.
17813
17814	* * (__gmp_allocate_func etc): Rename from _mp_allocate_func etc.
17815	(__gmp_default_allocate etc): Rename from _mp_default_allocate etc.
17816	* gmp-impl.h (__GMP_REALLOCATE_FUNC_TYPE,
17817	__GMP_REALLOCATE_FUNC_LIMBS): New macros.
17818
17819	* gmp-impl.h (DC_THRESHOLD): Establish default here, set to 3*KARA
17820	since that's the measured average.
17821	* mpn/generic/dc_divrem_n.c, mpn/generic/tdiv_qr.c (DC_THRESHOLD):
17822	Remove default.
17823
178242000-10-21  Torbjorn Granlund  <tege@swox.com>
17825
17826	* mpn/Makefile.am (TARG_DIST): Add ia64.
17827
178282000-10-21  Kevin Ryde  <kevin@swox.se>
17829
17830	* *: Change BZ -> DC.
17831	* mpn/generic/dc_divrem_n.c: Renamed from bz_divrem_n.c.
17832
17833	* doc/multiplication: Remove file, now in the manual.
17834	* doc/assembly_code: Ditto.
17835	* tune/README: Remove some parts now in the manual.
17836
17837	* gmp.texi (@m etc): Add and use some new macros.
17838	(Integer Division - mpz_[cft]div_*): Merge descriptions, for brevity
17839	and to emphasise similarities.
17840	(Low-Level Functions - mpn_[lr]shift): Specify count as 1 to
17841	mp_bits_per_limb-1.
17842	(Algorithms): New chapter.
17843	(References): Add some papers.
17844
17845	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove some
17846	unused variables.
17847	* mpn/generic/mul_fft.c (mpn_fft_best_k): Ditto.
17848
17849	* tune/freq.c: New file, split from time.c.
17850	* tune/time.c: Rewrite, now more automated.
17851	* configure.in, tune/*: Consequent changes.
17852
178532000-10-20  Torbjorn Granlund  <tege@swox.com>
17854
17855	* mpn/ia64/default.m4: New file.
17856	* configure.in [config.m4 switch] (ia64*-*-*): Use ia64/default.m4.
17857
17858	* mpn/ia64/mul_1.asm: New file.
17859	* mpn/ia64/addmul_1.asm: New file.
17860	* mpn/ia64/add_n.asm: New file.
17861	* mpn/ia64/sub_n.asm: New file.
17862	* mpn/ia64/popcount.asm: New file.
17863	* mpn/ia64/README: New file.
17864
17865	* mpn/alpha/cntlz.asm: Override `.set noat' from ASM_START.
17866
17867	* configure.in (HAVE_TARGET_CPU_*): Support hppa1.0, hppa1.1, hppa2.0
17868	by sed'ing the period into `_'.
17869
17870	* acconfig.h: Add #undefs for hppa targets.
17871
17872	* longlong.h (udiv_qrnnd): Fix typo in last change.
17873
17874	* mpz/tstbit.c: Rewrite (partly to work around GCC 2.95.2 HPPA bug).
17875
17876	* configure.in [path switch]:
17877	(hppa2.0*-*-*): For non-CC64 case, update path.
17878
17879	* configure.in [compiler switch]:
17880	(hppa2.0w-*-*): Match with same regexp in both places.
17881	(hppa*-*-*): New case.
17882	(all hppa alternatives): Don't inherit default gmp_cflags_cc,
17883	gmp_cflags_c89.
17884
178852000-10-18  Torbjorn Granlund  <tege@swox.com>
17886
17887	* configure.in (alpha*-*-*): Define gmp_xoptcflags_gcc like for
17888	alpha*-*-osf*.
17889
17890	* longlong.h (x86 udiv_qrnnd): Change `d' => `dx' to avoid K&R C
17891	stringification.
17892
178932000-10-15  Kevin Ryde  <kevin@swox.se>
17894
17895	* doc/configuration: Updates.
17896
17897	* demos/calc.y: Remove some comments.
17898
178992000-10-14  Kevin Ryde  <kevin@swox.se>
17900
17901	* gmp.texi (Parameter Conventions, Memory Management): New sections
17902	split from "Variable Conventions".
17903	(Efficiency, Debugging, Profiling): New sections in "GMP Basics".
17904	(Reentrancy): Some rewording, add note on standard I/O.
17905	(Build options): Add --enable-assert and --enable-profiling.
17906
17907	* configure.in (--enable-profiling): New option.
17908	* acinclude.m4 (GMP_ASM_X86_MCOUNT): New macro, finding how to profile.
17909	* mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_mcount): Profiling support.
17910
17911	* acinclude.m4, configure.in (GMP_ASM_*): Rename from GMP_CHECK_ASM_*,
17912	to follow autoconf conventions.
17913
17914	* configure.in: Run GMP_CHECK_ASM tests only if needed.
17915	* acinclude.m4 (GMP_CHECK_ASM_MMX): Don't use GMP_CHECK_ASM_TEXT.
17916
17917	* mpn/x86/x86-defs.m4 (ASSERT): Allow no condition, to just emit code.
17918
179192000-10-13  Kevin Ryde  <kevin@swox.se>
17920
17921	* mpq/md_2exp.c: New file.
17922	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
17923	* Makefile.am (MPQ_OBJECTS): Ditto.
17924	* gmp.h (mpq_mul_2exp, mpq_div_2exp): Add prototypes.
17925	* gmp.texi (Rational Arithmetic): Add documentation.
17926
17927	* mpq/tests/t-md_2exp.c: New file.
17928	* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
17929
17930	* mpn/generic/perfsqr.c: Add/amend some comments.
17931
17932	* gmp.texi (Known Build Problems): Note VERSION problem with old
17933	sed, do some minor rewording.
17934	(Build Options): Add cygwin and djgpp URLs, mention INSTALL.autoconf,
17935	mention HTML.
17936	(Getting the Latest Version of GMP): Move this ...
17937	(Introduction to GMP): ... to here.
17938	(Compatibility with older versions): Just refer to 2.x and 3.x, not
17939	every minor version.
17940	(Initializing Integers): Note restrictions on mpz_array_init'ed
17941	variables.
17942	(Integer Logic and Bit Fiddling): Note bits are numbered from 0.
17943
17944	* INSTALL.autoconf: New file.
17945	* Makefile.am (EXTRA_DIST): Add it.
17946
17947	* tune/Makefile.am, tune/tuneup.c, configure.in, gmp-impl.h: New
17948	scheme for recompiled objects used by tune program.  Don't use
17949	libgmptune.a, make better use of libtool, work with ansi2knr.
17950
17951	* tune/speed.h,common.c (SPEED_ROUTINE_MPZ_POWM): Use s->yp and
17952	s->xp_block, make exponent a fixed size.
17953
179542000-10-07  Torbjorn Granlund  <tege@swox.com>
17955
17956	* mpn/mips3/gmp-mparam.h: Retune.
17957
17958	* mpn/generic/mul_n.c (USE_MORE_MPN): Revert last change.
17959
179602000-10-06  Torbjorn Granlund  <tege@swox.com>
17961
17962	* mpn/mips3/add_n.s: Decrease carry recurrence from 4 to 3 cycles.
17963	* mpn/mips3/sub_n.s: Likewise.
17964
179652000-10-04  Torbjorn Granlund  <tege@swox.com>
17966
17967	* configure.in (sparc64-*-linux*): Set path according to CC64.
17968
179692000-10-04  Kevin Ryde  <kevin@swox.se>
17970
17971	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Use LABEL_SUFFIX, not a
17972	hard-coded ":".
17973
17974	* config.sub: Don't demand "86" in CPU name for SCO.
17975
17976	* configure.in (supersparc-*-*): Remove -DSUPERSPARC.
17977	* longlong.h: Use HAVE_TARGET_CPU_supersparc.
17978
17979	* configure.in (HAVE_TARGET_CPU_*): AC_DEFINE from $target_cpu.
17980	* acconfig.h: Add #undefs, but only for targets of interest.
17981
179822000-10-03  Torbjorn Granlund  <tege@swox.com>
17983
17984	* mpn/alpha/cntlz.asm: Rewrite.
17985
17986	* mp_clz_tab.c (__clz_tab): Half table size to 128 entires.
17987	* longlong.h (count_leading_zeros): Demand just 128 entries from
17988	__clz_tab.
17989
17990	* configure.in (mips-sgi-irix6.*): Pass -mips3 in addition to options
17991	for n32 ABI.
17992
17993	* longlong.h: Move NO_ASM test around all assembly code.
17994	From gcc:
17995	* longlong.h (count_leading_zeros): Sparclite scan instruction was
17996	being invoked incorrectly.
17997	Replace __mc68332__ with __mcpu32__.
17998	Add ARC support.
17999
180002000-10-02  Torbjorn Granlund  <tege@swox.com>
18001
18002	* mpn/mips3/gmp-mparam.h: Retune for both gcc and cc.
18003
18004	* mpn/generic/mul_n.c (USE_MORE_MPN): Remove exception for __mips.
18005	(interpolate3): Cast mp_limb_t variables to mp_limb_signed_t
18006	when testing sign bit.
18007
18008	* mpn/alpha/ev6/gmp-mparam.h: Retune.
18009	* mpn/powerpc32/gmp-mparam.h: Retune.
18010	* mpn/powerpc64/gmp-mparam.h: Retune.
18011	* mpn/x86/pentium/gmp-mparam.h: Retune.
18012	* mpn/x86/pentium/mmx/gmp-mparam.h: Retune.
18013	* mpn/sparc32/v9/gmp-mparam.h: Retune.
18014	* mpn/x86/k6/gmp-mparam.h: Retune.
18015	* mpn/x86/p6/gmp-mparam.h: Retune.
18016	* mpn/x86/k7/gmp-mparam.h: Retune.
18017	* mpn/sparc64/gmp-mparam.h: Retune.
18018
18019	* mpn/m68k/gmp-mparam.h: New file.
18020	* mpn/alpha/ev5/gmp-mparam.h: New file.
18021
18022	* gmp-impl.h (default MPN_COPY): Remove final `;'.
18023
18024	* tune/time.c (speed_endtime): Rewrite.
18025
18026	* tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Set base to a large value,
18027	not 2.
18028
18029	* demos/pexpr.c (setup_error_handler): Fix typo.
18030
18031	* mpz/powm.c (redc): New function, based on old mpz_redc.  Don't
18032	multiply here.
18033	(mpz_redc): Remove.
18034	(mpz_powm): Major changes, partially reverting to mpn calls.
18035	Multiply before calling redc.
18036	(mpz_powm): Use TMP_ allocation.
18037	(mpz_powm): Refine calculation of k (width of exponent window).
18038	(mpz_powm): Cast constants to mp_limb_t before left shifting.
18039
18040	* longlong.h: Use ia64 count_leading_zeros just when __GNUC__.
18041
180422000-09-29  Kevin Ryde  <kevin@swox.se>
18043
18044	* acinclude.m4 (GMP_C_SIZES): New macro.
18045	* configure.in: Use it.
18046	* acconfig.in (BYTES_PER_MP_LIMB etc): Add #undefs.
18047	* mpn/generic/gmp-mparam.h (BYTES_PER_MP_LIMB etc): Remove #defines.
18048	* gmp.texi (Known Build Problems): Remove 64-bit generic C
18049	gmp-mparam.h problem, now fixed.
18050
18051	* configure.in: Only run GMP_PROG_M4 if it's actually needed.
18052
180532000-09-27  Torbjorn Granlund  <tege@swox.com>
18054
18055	* demos/pexpr.c: Clean up code for systems not supporting
18056	sigaltstack.  Handle old Linux without sigaltstack.  Properly
18057	disable all stuff related to sigaltstack under Unicos.
18058
18059	* mpn/alpha/ev6/addmul_1.asm: Use explicit offset for all load and
18060	store insns.  Helps old gas.
18061
18062	* longlong.h (count_leading_zeros): Define for ia64.
18063
180642000-09-27  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
18065
18066	* mpn/generic/bz_divrem_n.c: Fix qhl handling, simplify.
18067
180682000-09-27  Kevin Ryde  <kevin@swox.se>
18069
18070	* mpn/Makefile.in (.SUFFIXES): Regenerate with patched automake to
18071	get .s before .c, which is needed to override ansi2knr .c rules.
18072
18073	* gmp.texi (mpn_sqrtrem): Fix r2p==NULL return value description
18074	to match the code (change by Torbjorn).
18075	(mpn_gcd, mpn_gcdext, mpn_sqrtrem, mpn_tdiv_qr): Note most
18076	significant limbs must be non-zero.
18077	(mpn_gcd, mpn_gcdext, mpn_sqrtrem): Clarify destination size
18078	requirements.
18079	(mpn_gcd_1): Clarify value must be non-zero, not just size.
18080
18081	* gmp-impl.h (mpn_zero_p): New inline function.
18082	* mpn/generic/inlines.c: Add gmp-impl.h.
18083	* mpf/integer.c, mpz/get_d.c, mpn/generic/mul_fft.c: Use it.
18084
18085	* mpn/generic/gcd.c: Use MPN_COPY_INCR not MPN_COPY.
18086	* mpf/add_ui.c: Ditto.
18087	* mpf/add.c: Ditto, and fix test to skip copy.
18088
180892000-09-26  Kevin Ryde  <kevin@swox.se>
18090
18091	* gmp-impl.h, longlong.h, mpn/generic/*.c: Add ASSERTs for various
18092	parameter restrictions.
18093
18094	* gmp-impl.h (UDIV_PREINV_TIME): New macro.
18095	* mpn/generic/sb_divrem_mn.c: Use it.
18096	* mpn/generic/perfsqr.c: Ditto.
18097	* mpn/x86/*/gmp-mparam.h (UDIV_PREINV_TIME): Add values.
18098
18099	* macos/Makefile.in: Add mpz/tests/t-get_si.c, mpf/tests/t-set_f.c,
18100	and new multi-function mpz and mpq files.
18101
181022000-09-25  Kevin Ryde  <kevin@swox.se>
18103
18104	* randlc.c, randlc2x.c, randsd.c, mpz/urandomb.c, mpz/urandomm.c:
18105	Use mpz_ptr and mpz_srcptr for parameters.
18106	* gmp.h (gmp_randinit_lc, gmp_randinit_lc_2exp, gmp_randseed,
18107	mpz_urandomb, mpz_urandomm): Corresponding change to prototypes.
18108	* randsdui.c: Remove wrong K&R parameters part.
18109
181102000-09-12  Kevin Ryde  <kevin@swox.se>
18111
18112	* gmp-impl.h (mpn_tdiv_qr): Move prototype from here ...
18113	* gmp.h (mpn_tdiv_qr): ... to here.
18114
18115	* gmp.texi (Miscellaneous Rational Functions): Comment-out and
18116	move version 1 compatibility note to "Compatibility" section.
18117	(Rational Number Functions): Ditto for canonicalization note.
18118
181192000-09-10  Kevin Ryde  <kevin@swox.se>
18120
18121	* mpn/x86/pentium/com_n.asm: New file.
18122
18123	* gmp.texi (Rational Arithmetic): Add mpq_abs.
18124	(Miscellaneous Rational Functions): Merge and simplify descriptions of
18125	mpq_get_num, mpq_get_den, mpq_set_num, mpq_set_den.
18126
18127	* mpq/abs.c: New file.
18128	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
18129	* Makefile.am (MPQ_OBJECTS): Add it.
18130	* gmp.h (mpq_abs): Add prototype.
18131
18132	* mpq/set_den.c: Don't discard sign when copying, this makes the
18133	code match the manual.
18134
181352000-09-07  Torbjorn Granlund  <tege@swox.com>
18136
18137	* tune/alpha.asm: Rewrite to actually work right.
18138
181392000-09-07  Kevin Ryde  <kevin@swox.se>
18140
18141	* tune/common.c,speed.[ch]: Add measuring of mpn_sqrtrem,
18142	mpn_get_str, mpn_set_str.
18143	* tune/README: Various updates.
18144
181452000-09-06  Torbjorn Granlund  <tege@swox.com>
18146
18147	* mpz/fits.c: Correct type of `data'.
18148
181492000-09-06  Kevin Ryde  <kevin@swox.se>
18150
18151	* gmp.texi (Build Options): Clarify where to find CFLAGS.
18152	(Known Build Problems): Note SCO -lc problem.
18153
18154	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Fix for sizes > 512 limbs.
18155
18156	* doc/multiplication: Corrections and additions suggested by Paul.
18157
18158	* tune/modlinv.c: New file with alternate modlimb_inverts.
18159	* tune/Makefile.am, tune/speed.[ch]: Add measuring of them.
18160	* tune/speed.c (FLAG_NODATA): New attribute, use for mpz_bin_uiui,
18161	mpz_fib_ui, mpz_fac_ui.
18162
18163	* mpn/x86/t-zdisp.sh: New file.
18164
18165	* tests/t-modlinv.c: New file.
18166	* tests/Makefile.am (check_PROGRAMS): Add it.
18167
18168	* mpq/tests/t-set_f.c: New file.
18169	* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
18170
18171	* gmp-impl.h (MPQ_CHECK_FORMAT): New macro.
18172	* mpq/tests/t-get_d.c: Use it.
18173
18174	* mpq/set_f.c: New file.
18175	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
18176	* Makefile.am (MPQ_OBJECTS): Ditto.
18177	* gmp.h: Add prototype.
18178	* gmp.texi (Miscellaneous Rational Functions): Document mpq_set_f,
18179	correct return type of mpq_set_d.
18180
181812000-09-03  Kevin Ryde  <kevin@swox.se>
18182
18183	* mpz/aors_ui.c: New file merging add_ui.c and sub_ui.c, no object
18184	code changes.
18185	* mpz/add_ui.c, mpz/sub_ui.c: Remove files.
18186	* mpz/Makefile.am: Update.
18187
18188	* gmp-impl.h (MPZ_FITS_STYPE_SDT, MPZ_FITS_UTYPE_SDT): New macros.
18189	* mpz/fits.c: New file merging six separate fits*.c.
18190	* mpz/fits_sshort_p.c, fits_sint_p.c, fits_slong_p.c, fits_ushort_p.c,
18191	fits_uint_p.c, fits_ulong_p.c: Remove files
18192	* mpz/Makefile.am: Use new fits.c, change object names from
18193	fits_*_p.lo to fits_*.lo to avoid SunOS 4 native "ar" warnings.
18194	* Makefile.am (MPZ_OBJECTS): Change from fits_*_p.lo to fits_*.lo.
18195
18196	* acinclude.m4 (GMP_CHECK_ASM_RODATA): New macro, defining RODATA.
18197	* configure.in: Use it.
18198	* mpn/x86/k[67]/mmx/popham.asm: Use it.
18199
18200	* mpn/x86/*/*.asm: Use "TEXT" not ".text".
18201
182022000-09-02  Kevin Ryde  <kevin@swox.se>
18203
18204	* mpq/aors.c: New file merging add.c and sub.c, no object code changes.
18205	* mpq/add.c, mpq/sub.c: Remove files.
18206	* mpq/Makefile.am: Update.
18207
18208	* mpz/aors.c: New file merging add.c and sub.c, no object code changes.
18209	* mpz/add.c, mpz/sub.c: Remove files.
18210	* mpz/Makefile.am, mpbsd/Makefile.am: Update.
18211
18212	* configure.in: Re-apply "PROLOGUE.*" regexp change for the
18213	benefit of alpha PROLOGUE_GP, lost in path search reorganisation.
18214
18215	* mpn/x86/x86-defs.m4 (jadcl0, cmov_simulate, ASSERT,
18216	movl_text_address): Don't use "1:" style labels.
18217	(Zdisp): Rearrange a bit, switch to all hex.
18218	* mpn/x86/README.family: Note SCO "as" doesn't support "1:" style
18219	local labels, misc rewordings.
18220
182212000-08-29  Torbjorn Granlund  <tege@swox.com>
18222
18223	* demos/primes.c: Include string.h.
18224
18225	* config.guess (x86 variant recog code): Remove dummy*.o files
18226	generated by some compilers.
18227
182282000-08-28  Kevin Ryde  <kevin@swox.se>
18229
18230	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix Solaris 2.8
18231	warning message suppression, add notes about SCO.
18232
18233	* Makefile.am (MPZ_OBJECTS etc): Move some comments.
18234
182352000-08-25  Kevin Ryde  <kevin@swox.se>
18236
18237	* mpz/pprime_p.c (mpz_millerrabin): Fix a TMP_FREE.
18238
18239	* gmp.texi (Copying): Refer to Lesser not Library GPL.
18240	(GMP and Reentrancy): Note stack-alloc.c is not reentrant, and
18241	that SCO <ctype.h> is potentially not reentrant.
18242
18243	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Test by attempting to
18244	link with or without an underscore.
18245	* gmp.texi (Known Build Problems): Remove SunOS 4 native grep
18246	GSYM_PREFIX problem, now fixed.
18247
18248	* gmp-impl.h (MODLIMB_INVERSE_3): New constant.
18249	* mpn/generic/diveby3.c: Use it instead of own INVERSE_3.
18250	* mpn/generic/mul_n.c: Ditto.
18251	* tests/t-constants.c: Check it, and PP_INVERTED too.
18252
18253	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): New macro.
18254	* configure.in [p6 and athlon] (gmp_optcflags_gcc): Use it to
18255	possibly add -march=pentiumpro.
18256
18257	* gmp-impl.h (MPZ_SET_STR_OR_ABORT, MPF_SET_STR_OR_ABORT): New macros.
18258	* mpz/tests/t-bin.c, mpz/tests/t-get_si.c, mpz/tests/t-jac.c,
18259	mpz/tests/t-misc.c: Use them.
18260	* mpf/tests/t-conv.c, mpf/tests/t-misc.c: Ditto.
18261	* mpz/tests/convert.c: Ditto and amend diagnostics slightly.
18262	* mpz/tests/t-misc.c (check_mpz_set_si): Remove a superfluous init.
18263	* mpz/tests/io.c: Differentiate between I/O and data conversion errors.
18264
18265	* mpn/generic/aors_n.c: New file merging add_n and sub_n, no
18266	object code changes.
18267	* mpn/generic/add_n.c: Remove file.
18268	* mpn/generic/sub_n.c: Remove file.
18269
18270	* mpn/generic/aorsmul_1.c: New file merging addmul_1 and submul_1,
18271	no object code changes.
18272	* mpn/generic/addmul_1.c: Remove file.
18273	* mpn/generic/submul_1.c: Remove file.
18274
18275	* mpn/generic/popham.c: New file merging popcount and hamdist, no
18276	object code changes.
18277	* mpn/generic/popcount.c: Remove file.
18278	* mpn/generic/hamdist.c: Remove file.
18279
182802000-08-24  Torbjorn Granlund  <tege@swox.com>
18281
18282	* gmp-impl.h (mpn_com_n): Fix typo.
18283
182842000-08-23  Torbjorn Granlund  <tege@swox.com>
18285
18286	* demos/primes.c (main): Don't call mpz_probab_prime_p for numbers
18287	that are known to be prime after sieving.
18288	(main): Declare and initialize max_s_prime_squared.
18289	(MAX_S_PRIME): Increase.
18290	(ST_SIZE): Increase.
18291
182922000-08-23  Kevin Ryde  <kevin@swox.se>
18293
18294	* gmp-impl.h (ASSERT_ALWAYS): Change to statement style.
18295	(JACOBI_TWO_U_BIT1): Remove ASSERT.
18296	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS as a statement.
18297
182982000-08-21  Torbjorn Granlund  <tege@swox.com>
18299
18300	* gmp-impl.h (ASSERT): Use do..while for dummy version.
18301
18302	* mpf/get_str.c: Don't set n_digits from digits_computed_so_far
18303	when the converted operand becomes zero.  Misc cleanups.
18304
183052000-08-21  Kevin Ryde  <kevin@swox.se>
18306
18307	* mpz/fdiv_r_2exp.c, mpz/lcm.c, mpz/urandomm.c: Add missing
18308	TMP_MARK/FREE, avoiding memory leak when using stack-alloc.c.
18309
183102000-08-20  Kevin Ryde  <kevin@swox.se>
18311
18312	* mpz/set.c [BERKELEY_MP] (move): Add conditionals to build as
18313	"move" for libmp.
18314	* mpbsd/Makefile.am: Use mpz/set.c, not move.c.
18315	* Makefile.am (MPBSD_OBJECTS): Corresponding change.
18316	* mpbsd/move.c: Remove file.
18317
18318	* mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am,
18319	mpbsd/Makefile.am (-DOPERATION_foo): Use "foo" even for ansi2knr
18320	"foo_" objects.  Do this with the makefiles to keep the sources
18321	cleaner.
18322	* mpz/mul_siui.c, mpf/integer.c: Revert to plain OPERATION_* forms.
18323
18324	* mpn/lisp/gmpasm-mode.el (gmpasm-remove-from-list): Renamed from
18325	gmpasm-delete-from-list, because it's non-destructive.
18326	(gmpasm-font-lock-keywords): Add some more keywords.
18327
183282000-08-16  Kevin Ryde  <kevin@swox.se>
18329
18330	* tune/mul_n_mpn.c, tune/mul_n_open.c: New files, being forced
18331	open-coded and mpn #includes of mpn/generic/mul_n.c.
18332	* tune/*: Add measuring of them.
18333	* tune/speed.c: Print command line into *.gnuplot file.
18334
18335	* mpn/generic/mul_n.c (USE_MORE_MPN): Change to #if not #ifdef for
18336	using the value, add #ifndef for providing the default.
18337	* mpn/sparc64/gmp-mparam.h (USE_MORE_MPN): Add #ifndef.
18338
18339	* tests/t-constants.c: New file.
18340	* tests/Makefile.am (check_PROGRAMS): Add it.
18341
18342	* mpz/get_si.c: Use LONG_MAX, not BITS_PER_MP_LIMB, so the result
18343	doesn't depend on limb size when outside the range of a long
18344	(though such results are not actually documented).
18345	* mpz/tests/t-get_si.c: New file.
18346	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
18347
18348	* mpn/tests/try.c (call): Cast popcount and hamdist calls,
18349	for the benefit of long long limb.
18350
183512000-08-15  Kevin Ryde  <kevin@swox.se>
18352
18353	* mp.h (mp_set_memory_functions): Add missing #define.
18354	* mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its
18355	existence.
18356
18357	* mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying
18358	reverted behaviour of mpf_get_prec.
18359
18360	* mpn/tests/ref.c (refmpn_strip_twos): Use refmpn_copyi, not
18361	MPN_COPY_INCR.
18362
18363	* mpz/mul_siui.c, mpf/integer.c: Recognise OPERATION_*_ forms
18364	produced under ansi2knr.
18365
18366	* configure.in (mpn_objects, mpn_objs_in_libgmp): Add $U to .c
18367	objects when ansi2knr in use.
18368
18369	* mpn/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
18370	(libdummy.la): Add this, not built, to create ansi2knr style rules
18371	for all potential .c files.
18372	* mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpfr/Makefile.am,
18373	mpbsd/Makefile.am, mpq/tests/Makefile.am, tests/Makefile.am
18374	(AUTOMAKE_OPTIONS): Enable ansi2knr (now everywhere).
18375	* Makefile.am (MPZ_OBJECTS, MPQ_OBJECTS, MPF_OBJECTS, MPFR_OBJECTS,
18376	MPBSD_OBJECTS, libmp_la_DEPENDENCIES): Add $U to all .lo filenames.
18377
183782000-08-03  Torbjorn Granlund  <tege@swox.com>
18379
18380	* mpn/alpha/ev6/addmul_1.asm: Correct number of cycles to 3.5/28.
18381
183822000-08-02  Torbjorn Granlund  <tege@swox.com>
18383
18384	* Version 3.1 released.
18385
18386	* gmp.texi: Rephrase mpf_urandomb documentation.
18387
18388	* mpn/alpha/ev6: New directory with ev6/21264 optimized code.
18389	* mpn/alpha/ev6/addmul_1.asm: New file.
18390	* mpn/alpha/ev6/gmp-mparam.h: New file.
18391
183922000-08-02  Kevin Ryde  <kevin@swox.se>
18393
18394	* demos/factorize.c (random): Don't use "inline".
18395
18396	* mpfr/log.c, mpfr/mul_ui.c, mpfr/round.c, mpfr/set.c, mpfr/set_d.c:
18397	Corrections to K&R parts.
18398
18399	* Makefile.am (EXTRA_HEADERS): Omit $(MPFR_HEADERS_OPTION).
18400	* mpfr/Makefile.am (EXTRA_DIST): Add mpfr.h.
18401
18402	* gmp.texi (Known Build Problems): Note problem stripping libgmp.a.
18403
184042000-08-02  Kent Boortz  <kent@swox.com>
18405
18406	* mpfr: Integrated experimental version of mpfr-0.4.
18407	* configure.in: Changes for option --enable-mpfr.
18408	* Makefile.am: Changes for option --enable-mpfr.
18409
184102000-08-01  Torbjorn Granlund  <tege@swox.com>
18411
18412	* mpn/generic/popcount.c: Disable SPARC v9 popc_limb pattern.
18413	* mpn/generic/hamdist.c: Likewise.
18414
184152000-08-01  Kevin Ryde  <kevin@swox.se>
18416
18417	* mpn/tests/try.c (try_init): Account for ALIGNMENTS when sizing
18418	source and dest regions.
18419
184202000-07-31  Torbjorn Granlund  <tege@swox.com>
18421
18422	* mpf/get_str.c: Develop three extra digits, not just one.
18423
184242000-07-31  Kevin Ryde  <kevin@swox.se>
18425
18426	* gmp.texi (References): Add URL for invariant division.
18427
184282000-07-30  Kevin Ryde  <kevin@swox.se>
18429
18430	* tune/time.c (speed_cpu_frequency_proc_cpuinfo): Add support for
18431	alpha linux "cycle frequency".
18432
18433	* mpn/sparc64/gmp-mparam.h: Re-run tune program for FFT thresholds.
18434
184352000-07-29  Kevin Ryde  <kevin@swox.se>
18436
18437	* gmp.texi (ABI and ISA): Add sparc64-*-linux*.
18438	* configure.in [sparc64-*-linux*] (gmp_cflags64_gcc): Same flags
18439	as under solaris.
18440
18441	* configure.in (--enable-fft): New option, default "no".
18442	* gmp.texi (Build Options): Describe it.
18443	* mpn/generic/mul.c, mpn/generic/mul_n.c [WANT_FFT]: Use it.
18444	* tune/tuneup.c [WANT_FFT]: By default don't probe FFTs if not enabled.
18445	* NEWS: Multiplication optionally using FFT.
18446
18447	* tune/README: Notes on FFT and GCD thresholds, other minor updates.
18448
18449	* Makefile.am: Expunge the macos generated files update stuff.
18450
184512000-07-28  Kevin Ryde  <kevin@swox.se>
18452
18453	* mpn/x86/*/gmp-mparam.h: Add some FFT thresholds.
18454
184552000-07-28  Kent Boortz  <kent@swox.se>
18456
18457	* macos/Asm*, macos/CmnObj, macos/Mp*: Delete directories.
18458	* macos/Makefile: Delete file.
18459	* macos/Makefile.cw: Delete file.
18460	* macos/config.h: Delete file.
18461	* macos/Asm/*.s: Delete files.
18462	* macos/configure: Create target directories. Don't transform
18463	'(C)' to '(;)' in a 'dnl' line comment in .asm file.
18464	* Makefile.am: Delete macos targets.
18465	* macos/README: Reflect that we reverted back to a build
18466	process that require ""macos/configure" to run on MacOS.
18467	This imply that MacPerl is needed for a build in MacOS.
18468
184692000-07-27  Kevin Ryde  <kevin@swox.se>
18470
18471	* mpn/generic/mul_fft.c: New file, by Paul Zimmermann, minor mods
18472	applied.
18473	* configure.in (gmp_mpn_functions): Add it.
18474	* mpn/generic/mul.c, mpn/generic/mul_n.c: Use it.
18475	* doc/multiplication: Describe it (briefly).
18476
18477	* gmp-impl.h (FFT_MUL_THRESHOLD etc): New thresholds.
18478	(mpn_fft_best_k, mpn_fft_next_size, mpn_mul_fft, mpn_mul_fft_full):
18479	New functions.
18480	(numberof, TMP_ALLOC_TYPE etc, _MP_ALLOCATE_FUNC_TYPE etc,
18481	UNSIGNED_TYPE_MAX etc): New macros.
18482
18483	* tune/*: Add FFT threshold tuning and speed measuring.
18484	* tune/common.c: Avoid huge macro expansions for umul and udiv.
18485
18486	* mpz/tests/t-bin.c, mpz/tests/t-jac.c, mpz/tests/t-misc.c,
18487	mpbsd/tests/t-misc.c, mpf/tests/t-misc.c, mpn/tests/try.c,
18488	mpn/tests/spinner.c: Use new gmp-impl.h macros.
18489
18490	* demos/Makefile.am (BUILT_SOURCES): Don't need calc.c etc under this.
18491
184922000-07-27  Torbjorn Granlund  <tege@swox.com>
18493
18494	* mpn/ia64/gmp-mparam.h: New file.
18495
184962000-07-26  Torbjorn Granlund  <tege@swox.com>
18497
18498	* demos/isprime.c: Handle any number of arguments and print
18499	classification for each.  Add `-q' option for old behaviour.
18500
185012000-07-26  Kevin Ryde  <kevin@swox.se>
18502
18503	* gmp.texi (Build Options): Mention djgpp stack size.
18504	(Notes for Package Builds): New section.
18505	(Compatibility with older versions): Update for 3.1, add mpf_get_prec.
18506
18507	* demos/factorize.c [__GLIBC__]: Don't declare random() under glibc.
18508
18509	* gmp.h (gmp_version): Add prototype and define.
18510
18511	* Makefile.am: Keep macos directory generated files up-to-date
18512	during development and on a "make dist".
18513
185142000-07-25  Torbjorn Granlund  <tege@swox.com>
18515
18516	* mpn/hppa/gmp-mparam.h: Update threshold values from new `tune' run.
18517
18518	* mpn/pa64/gmp-mparam.h: Fill in values from `make tune' run.
18519	* mpn/pa64w/gmp-mparam.h: Likewise.
18520	* mpn/mips3/gmp-mparam.h: Likewise.
18521
18522	* tune/hppa2.asm: Fix typo in .level directive.
18523
18524	* configure.in: Add sparc64-*-linux* support (from Jakub Jelinek).
18525	* configure: Regenerate.
18526
18527	* mpn/sparc64/rshift.asm: Use %g5 instead of volatile stack frame area
18528	for return value (from Jakub Jelinek).
18529	* mpn/sparc64/lshift.asm: Likewise.
18530
18531	* mpf/get_prc.c: Revert Aug 8, 1996 change.
18532
18533	* version.c: No longer static.
18534
18535	* mpn/pa64/gmp-mparam.h: Only #define *_THRESHOLD if not already
18536	defined.
18537	* mpn/pa64w/gmp-mparam.h: Likewise.
18538	* mpn/arm/gmp-mparam.h: Likewise.
18539	* mpn/mips3/gmp-mparam.h: Likewise.
18540
185412000-07-25  Kevin Ryde  <kevin@swox.se>
18542
18543	* INSTALL: It's "info -f ./gmp.info" to be sure of hitting the
18544	gmp.info in the current directory.
18545
18546	* Makefile.am (libmp_la_DEPENDENCIES): Add mpz/cmp.lo, for last
18547	mpz/powm.c fix.
18548
18549	* mpn/sparc64/addmul1h.asm, mpn/sparc64/submul1h.asm: Renamed from
18550	addmul_1h.asm, submul_1h.asm to avoid name conflicts on an 8.3
18551	filesystem.
18552	* mpn/sparc64/addmul_1.asm, mpn/sparc64/submul_1.asm,
18553	mpn/sparc64/mul_1.asm: Update include_mpn()s.
18554
185552000-07-24  Torbjorn Granlund  <tege@swox.com>
18556
18557	* Update header of all files previously under the Library GPL
18558	to instead be under the Lesser GPL.
18559
18560	* COPYING.LIB: Now Lesser GPL.
18561	* demos/primes.c: Change license to GPL (was Library GPL).
18562	* demos/isprime.c: Change license to GPL (was Library GPL).
18563
18564	* gmp.h (error code enum): Add GMP_ERROR_BAD_STRING (currently unused).
18565
18566	* mpz/tests/t-mul.c: Default SIZE to a function of TOOM3_MUL_THRESHOLD.
18567	Improve error messages.  Decrease reps.
18568
185692000-07-22  Kevin Ryde  <kevin@swox.se>
18570
18571	* tune/speed.h: Decrease the amount of data used for gcd and powm
18572	measuring, to make the tune go a bit faster.
18573
185742000-07-21  Kent Boortz  <kent@swox.se>
18575
18576	* macos/Asm*, macos/CmnObj, macos/Mp*: Directories no longer created
18577	from configure script, now part of dist.
18578	* macos/Makefile
18579	* macos/Makefile.cw
18580	* macos/config.h
18581	* macos/Asm/*.s
18582	New files and directories that is the output from configure. This way
18583	no Perl installation is required to build on MacOS, just MPW.
18584	* macos/configure: Added prefix '__g' to exported assembler labels.
18585	Changed to handle new m4 syntax instead of the old cpp syntax in asm.
18586	* macos/Makefile.in: Corrected 'clean' target, added 'distclean'
18587	and 'maintainer_clean'. Added "mpn/mp_bases.c" to build.
18588	* macos/README: Reflect the new build process without configure.
18589	Corrected the file structure for Apple MPW installation.
18590
185912000-07-21  Torbjorn Granlund  <tege@swox.com>
18592
18593	* mpf/tests/t-muldiv.c: Relax error limit.  Make precision depend
18594	on SIZE.  Misc changes.
18595
18596	* configure: Regenerate.
18597
185982000-07-20  Kent Boortz  <kent@swox.com>
18599
18600	* macos/Makefile.in: Removed hard coded targets, added special
18601	targets found in Makefile.am files.
18602	* macos/configure: Generate targets from top configure script and
18603	Makefile.am files. Made script runnable from Unix for testing.
18604	* macos/README: Notes about search paths for includes, contributed
18605	by Marco Bambini.
18606	* configure.in: Added comment about lines that the "macos/configure"
18607	script depend on.
18608
186092000-07-20  Torbjorn Granlund  <tege@swox.com>
18610
18611	* mpz/powm.c (mpz_powm): After final mpz_redc call, subtract `mod'
18612	from result if it is greater than `mod'.
18613
186142000-07-19  Torbjorn Granlund  <tege@swox.com>
18615
18616	* mpn/hppa/gmp-mparam.h: Fill in values from `make tune' run.
18617	* mpn/alpha/gmp-mparam.h: Likewise.
18618	* mpn/powerpc32/gmp-mparam.h: Likewise.
18619
18620	* tune/hppa.asm: New file.
18621	* tune/hppa2.asm: New file.
18622	* configure.in (SPEED_CYCLECOUNTER_OBJS): Set for hppa2*-*-* and
18623	hppa*-*-*.
18624	* tune/Makefile.am (EXTRA_DIST): Add hppa.asm and hppa2.asm.
18625
18626	* tune/speed.h (SPEED_ROUTINE_MPN_BZ_DIVREM_CALL): Declare `marker';
18627	invoke TMP_FREE.
18628
18629	* mpn/hppa/hppa1_1/udiv_qrnnd.S: Use "%" instead of "'" for
18630	reloc/symbol delimiter.
18631
186322000-07-16  Torbjorn Granlund  <tege@swox.com>
18633
18634	* mpn/powerpc64/gmp-mparam.h: Update with output from tune utility.
18635	* mpn/powerpc64/copyi.asm: New file.
18636	* mpn/powerpc64/copyd.asm: New file.
18637
186382000-07-16  Kevin Ryde  <kevin@swox.se>
18639
18640	* tune/*: Add measuring for umul_ppmm and udiv_qrnnd.
18641
186422000-07-14  Kevin Ryde  <kevin@swox.se>
18643
18644	* mpn/x86/k6/k62mmx: New directory.
18645	* configure.in (k6[23]*-*-*): Use it.
18646	* mpn/x86/k6/k62mmx/copyi.asm, mpn/x86/k6/k62mmx/copyd.asm: Move from
18647	mmx directory, improve code alignment a bit.
18648	* mpn/x86/k6/k62mmx/lshift.asm, mpn/x86/k6/k62mmx/rshift.asm: Ditto,
18649	and improve addressing modes for pre-CXT cores.
18650	* mpn/x86/x86-defs.m4 (Zdisp): Add an instruction.
18651	* mpn/x86/k6/mmx/lshift.asm, mpn/x86/k6/mmx/rshift.asm: New files,
18652	suiting plain K6.
18653	* mpn/x86/README, mpn/x86/k6/README: Updates.
18654	* mpn/x86/k6/mmx/*.asm: Update some comments.
18655
18656	* mpn/tests/Makefile.am: Use $(MAKE) in .asm rules, not "m".
18657	* tune/Makefile.am: Use $(EXEEXT) and libtool --config objdir, for
18658	the benefit of djgpp.
18659
18660	* */Makefile.in: Regenerate with patched automake that adds
18661	$(EXEEXT) to EXTRA_PROGRAMS.
18662
18663	* mpn/tests/try.c: Add #ifdef to SIGBUS, for the benefit of djgpp.
18664	* config.guess: Recognise pc:*:*:* as an x86, for djgpp.
18665
18666	* configure: Regenerate with patched autoconf to fix temp file
18667	".hdr" which is invalid on a DOS 8.3 filesystem, and to fix two
18668	sed substitutes that clobbered a ":" in $srcdir (eg. a DOS drive
18669	spec).
18670
18671	* mpz/tests/io.c: Use one fp opened "w+", since separately opened
18672	input and output doesn't work on MS-DOS 6.21.
18673
18674	* tests/rand/Makefile.am (allprogs): Pseudo-target to build everything.
18675	(CLEANFILES): Add EXTRA_PROGRAMS and EXTRA_LTLIBRARIES.
18676	(manual-test, manual-bigtest): Add $(EXEEXT) to dependencies.
18677
18678	* tests/rand/*/Makefile.in: Regenerate with patched automake that adds
18679	$(EXEEXT) to EXTRA_PROGRAMS.
18680
186812000-07-13  Torbjorn Granlund  <tege@swox.com>
18682
18683	* mpz/tests/t-root.c: Also test mpz_perfect_power_p.
18684	Generate `nth' so that there will be fewer trivial values.
18685
18686	* mpz/root.c: Reverse return value in tests for detecting root of +1
18687	and -1.
18688
18689	* mpz/perfpow.c: Use TMP_ALLOC interface.
18690
186912000-07-12  Torbjorn Granlund  <tege@swox.com>
18692
18693	* mpz/perfpow.c (primes): Make it const.
18694
186952000-07-06  Kevin Ryde  <kevin@swox.se>
18696
18697	* mpn/x86/k6/cross.pl: New file.
18698
18699	* mpn/x86/*/gmp-mparam.h: Updates to thresholds, conditionalize
18700	all _TIME defines.
18701	* mpn/x86/pentium/mmx/gmp-mparam.h: New file.
18702	* mpn/sparc64/gmp-mparam.h: Update thresholds.
18703	* mpn/sparc32/v9/gmp-mparam.h: Ditto.
18704
187052000-07-04  Kevin Ryde  <kevin@swox.se>
18706
18707	* NEWS: Updates.
18708	* mpn/x86/*/README: Miscellaneous updates.
18709
18710	* tune/speed-ext.c: New file.
18711	* tune/Makefile.am: Add it.
18712	* tune/README: Updates.
18713	* tune/speed.h (SPEED_ROUTINE_MPN_DIVREM_2): Bug fixes.
18714
18715	* demos/calc.y,calclex.l: New files.
18716	* demos/calc.c,calc.h,calclex.c: New files, generated from .y and .l.
18717	* demos/Makefile.am: Add them.
18718
18719	* gmp.h (mpq_swap, mpf_swap): Add prototypes and defines.
18720
187212000-07-01  Kevin Ryde  <kevin@swox.se>
18722
18723	* gmp.texi (ABI and ISA): New section, bringing together ABI notes.
18724	(Build Options): Add MPN_PATH, various updates.
18725	(Build Options): Add note on setting CFLAGS when setting CC.
18726	(Notes for Particular Systems): Add -march=pentiumpro problem.
18727	(Known Build Problems): Note on gmp-mparam.h for 64-bit generic C.
18728	(GMP Variable Conventions): Add some info on user defined functions.
18729	(Reporting Bugs): Minor rewording.
18730
18731	* configure.in (MPN_PATH): Renamed from mpn_path.
18732
18733	* gmp-impl.h (ULONG_MAX,ULONG_HIGHBIT,...,SHORT_MAX): New defines.
18734	* mp[zf]/tests/t-misc.c: Use them.
18735
18736	* mpbsd/tests/t-misc.c: New file.
18737	* mpbsd/tests/Makefile.am: Add it.
18738
18739	* Makefile.am (LIBGMP_LT_*, LIBMP_LT_*): Bump version info.
18740	* gmp.h (__GNU_MP_VERSION_*): Bump to 3.1.
18741
18742	* mpf/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
18743
18744	* Makefile.am (libmp_la_SOURCES): Add mp_set_fns.c, accidentally
18745	omitted in gmp 3.0.x.
18746	* gmp.texi (Custom Allocation): Note this is available in mpbsd,
18747	and some minor rewording.
18748
187492000-06-30  Torbjorn Granlund  <tege@swox.com>
18750
18751	* demos/factorize.c (random): New function, defined conditionally.
18752	(factor_using_pollard_rho): Use it, not mrand48.
18753
18754	* mpn/cray/README: New file.
18755
187562000-06-30  Kevin Ryde  <kevin@swox.se>
18757
18758	* mpn/x86/pentium/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
18759
18760	* mpz/tests/t-jac.c: Test limbs on mpn_jacobi_base, not just ulongs.
18761
18762	* gmp-impl.h, mpn/tests/try.c, mpn/tests/spinner.c, tune/speed.c:
18763	Use config.h unconditionally, not under HAVE_CONFIG_H.
18764
18765	* demos/pexpr.c [__DJGPP__]: Patch by Richard Dawe to not use
18766	setup_error_handler on djgpp.
18767
18768	* tune/*: Locate data to help direct-mapped caches, add measuring
18769	of mpz_init/clear, mpz_add and mpz_bin_uiui, various cleanups.
18770	* configure.in (AC_CHECK_FUNCS): Add popen.
18771
187722000-06-29  Torbjorn Granlund  <tege@swox.com>
18773
18774	* mpf/mul_2exp.c: Streamline criterion for whether to use mpn_lshift or
18775	mpn_rshift.  Increase precision when exp is a multiple of
18776	BITS_PER_MP_LIMB primarily to make exp==0 be a noop.
18777	* mpf/div_2exp.c: Analogous changes.
18778
18779	* mpf/tests/t-dm2exp.c: Set u randomly in loop.  Perform more
18780	mpf_mul_2exp testing.
18781
18782	* configure.in: Recognize cray vector processors with a broad `*';
18783	move after alpha* not to match that.
18784
187852000-06-28  Kevin Ryde  <kevin@swox.se>
18786
18787	* mpz/tests/io.c: Use a disk file, not a pipe, switch to ansi2knr
18788	style, switch from MP_INT to mpz_t, add a couple of error checks.
18789	* mpz/tests/Makefile.am (CLEANFILES): Add io.tmp, in case io.c fails.
18790
187912000-06-27  Torbjorn Granlund  <tege@swox.com>
18792
18793	* mpf/tests/t-get_d.c: Be more lax about relative error, to handle Cray
18794	floating point format.
18795
18796	* mpq/tests/t-get_d.c: Decrease default reps to 1000.
18797
18798	* mpf/tests/t-conv.c: Correct type of `bexp'.
18799
18800	* configure.in (cray vector machines): Don't inherit gmp_cflags_cc.
18801
18802	* tune/Makefile.am (EXTRA_DIST): Delete sparc64.asm.
18803
18804	* configure.in (cray vector machines): Set extra_functions.
18805
18806	* mpn/cray/mulww.f: New file with vectorizing cray code.
18807	* mpn/cray/mulww.s: Generated from mulww.f.
18808	* mpn/cray/mul_1.c: New file.
18809	* mpn/cray/addmul_1.c: New file.
18810	* mpn/cray/submul_1.c: New file.
18811	* mpn/cray/add_n.c: New file.
18812	* mpn/cray/sub_n.c: New file.
18813
188142000-06-26  Kevin Ryde  <kevin@swox.se>
18815
18816	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix so it actually
18817	detects solaris 2.6, and also suppress warning on solaris 2.8.
18818	* configure.in (SPEED_CYCLECOUNTER): Remove spurious "athlon" from
18819	sparc case.
18820
18821	* mpn/lisp/gmpasm-mode.el: Move keymap to the top of the docstring.
18822
188232000-06-21  Kevin Ryde  <kevin@swox.se>
18824
18825	* mpn/generic/mul_n.c (mpn_kara_mul_n, mpn_kara_sqr_n): Use
18826	mp_size_t for n2.
18827	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Use mp_size_t for size
18828	parameters and "l" variables.
18829	* gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Update prototypes.
18830
18831	* mpbsd/itom.c, mpbsd/sdiv.c: Add casts for correct handling of
18832	-0x80...00 on systems with sizeof(short)==sizeof(int).
18833
18834	* mpz/tests/t-misc.c: Move "bin" test from here ...
18835	* mpz/tests/t-bin.c: ... to here, and add a new (2k,k) test too.
18836	* mpz/tests/Makefile.am (check_PROGRAMS): Add t-bin.
18837
18838	* mpz/bin_ui.c [_LONG_LONG_LIMB]: Use mpn_divrem_1, since kacc is
18839	a limb not a ulong.
18840	* mpz/bin_uiui.c [_LONG_LONG_LIMB]: Ditto, and use mpn_mul_1 too,
18841	since nacc is a limb.
18842
18843	* mpf/tests/t-misc.c (check_mpf_set_si, check_mpf_cmp_si):
18844	New file, testing mpf_set_si, mpf_init_set_si, and mpf_cmp_si.
18845	* mpf/tests/Makefile.am (check_PROGRAMS): Add it.
18846
18847	* mpz/tests/t-misc.c (check_mpz_set_si, check_mpz_cmp_si):
18848	New tests, for mpz_set_si, mpz_init_set_si, and mpz_cmp_si.
18849
18850	* mpz/set_si.c, mpz/iset_si.c, mpz/cmp_si.c [_LONG_LONG_LIMB]: Fix
18851	handling of -0x80..00.
18852	* mpf/set_si.c, mpf/iset_si.c, mpf/cmp_si.c [_LONG_LONG_LIMB]: Ditto.
18853
188542000-06-19  Torbjorn Granlund  <tege@swox.com>
18855
18856	* demos/primes.c: Properly handle arguments `m +n'.
18857
188582000-06-17  Torbjorn Granlund  <tege@swox.com>
18859
18860	* config.sub: Recognize k5 and k6 with common pattern.
18861
18862	* mpq/tests/t-get_d.c: Also test mpq_set_d.  Misc improvements.
18863
18864	* mpq/set_d.c: Special case 0.0.  Don't call mpn_rshift with 0 count.
18865	Allocate correct amount of memory for numerator.  Delete spurious
18866	ASSERT_ALWAYS(1).
18867
188682000-06-17  Kevin Ryde  <kevin@swox.se>
18869
18870	* mpz/perfsqr.c: Fix so that zero is considered a perfect square.
18871	(Was wrongly calling mpn_perfect_square_p with size==0.)
18872
188732000-06-16  Kevin Ryde  <kevin@swox.se>
18874
18875	* configure.in: Set k5*-*-* to use basic i386 code until there's
18876	something specific.  Add path=x86 as a default for x86s.
18877
18878	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_LOG): Generate
18879	ALIGN_LOGARITHMIC setting, not a full ALIGN definition.
18880	(GMP_CHECK_ASM_ALIGN_FILL_0x90): New test.
18881	* configure.in [x86-*-*]: Use GMP_CHECK_ASM_ALIGN_FILL_0x90.
18882	* mpn/asm-defs.m4 (ALIGN): New macro.
18883	* mpn/x86/x86-defs.m4 (ALIGN): Remove supplementary definition.
18884
18885	* tune/*: Plain "unsigned" for speed_cyclecounter.
18886	* configure.in: Use tune/sparcv9.asm for 32 and 64 bit modes.
18887	* tune/sparc64.asm: Remove file.
18888
188892000-06-15  Torbjorn Granlund  <tege@swox.com>
18890
18891	* mpn/x86/k7/mmx/copyi.asm: Use `testb' instead of `test'.
18892	* mpn/x86/k7/mmx/copyd.asm: Likewise.
18893
18894	* mpn/x86/k7/mmx/lshift.asm: Avoid using `~' (Solaris as problems).
18895	* mpn/x86/k7/mmx/rshift.asm: Likewise.
18896	* mpn/x86/k6/aors_n.asm: Likewise.
18897	* mpn/x86/k7/aors_n.asm: Likewise.
18898	* mpn/x86/k7/mul_basecase.asm: Likewise.
18899
189002000-06-13  Torbjorn Granlund  <tege@swox.com>
18901
18902	* tune/sparcv9.asm: Tune, deleting two instructions.
18903
18904	* tune/alpha.asm: Update to unified speed_cyclecounter.
18905
189062000-06-11  Kevin Ryde  <kevin@swox.se>
18907
18908	* mpz/tests/reuse.c (FAIL): Add a K&R version.
18909	Use _PROTO on some typedefs.
18910	* mpz/tests/t-misc.c: Add gmp-impl.h for "const".
18911
18912	* configure.in: Rework mpn multi-function and optional files.
18913	Names standardized, no need for explicit declarations, all picked
18914	up in one $path traversal.
18915	* doc/configuration: Updates.
18916
18917	* tests/rand/t-rand.c (main): Change "usage" to work with K&R.
18918
189192000-06-10  Kevin Ryde  <kevin@swox.se>
18920
18921	* mpn/x86/pentium/mmx/popham.asm, mpn/x86/p6/mmx/popham.asm,
18922	mpn/x86/p6/p3mmx/popham.asm, mpn/x86/p6/diveby3.asm: Add
18923	MULFUNC_PROLOGUE for correct HAVE_NATIVE_* matching.
18924
18925	* mpn/x86/x86-defs.m4 (cmov_bytes_tttn): Use eval() on expressions.
18926	(cmov_available_p): Switch to list CPUs which do have cmov.
18927	* mpn/x86/p6/sqr_basecase.asm, mpn/x86/k6/sqr_basecase.asm,
18928	mpn/x86/k7/sqr_basecase.asm: Use eval() for multiplication.
18929	* mpn/x86/README.family: Various updates.
18930
189312000-06-09  Kevin Ryde  <kevin@swox.se>
18932
18933	* mpbsd/tests/allfuns.c (main): Call exit() instead of doing return.
18934
18935	* doc/tasks.html, doc/projects.html: Moved from projects directory.
18936	* doc/multiplication: New file.
18937	* Makefile.am (EXTRA_DIST): Remove projects, add doc.
18938
18939	* Makefile.am (libgmp_la_LIBADD, libmp_la_LIBADD): Remove
18940	unnecessary -lm.
18941	* INSTALL: Remove -lm from instructions.
18942	* demos/Makefile.am (qcn_LDADD): Add -lm.
18943
18944	* tune/*: Add measuring for mpn_divrem_2 and modlimb_invert,
18945	improve addsub_n.  Switch to unified speed_cyclecounter.
18946	* configure.in: Update configs for speed_cyclecounter.
18947
18948	* gmp-impl.h (MP_LIMB_T_MAX, MP_LIMB_T_HIGHBIT): New macros.
18949	* mpn/generic/diveby3.c, mpn/generic/mul_n.c, mpn/generic/gcd.c,
18950	tune/speed.c, mpn/tests/ref.c: Use them.
18951
18952	* mpn/tests/spinner.c: Remove setitimer, just alarm is enough.
18953	* configure.in (AC_CHECK_FUNCS): Remove setitimer.
18954	* mpn/tests/x86call.asm: Start with junk in %eax, %ecx, %edx.
18955	* mpn/tests/ref.[ch] (refmpn_addsub_nc): New function.
18956	* mpn/tests/try.c: Add some support for mpn_addsub_nc.
18957	* mpn/tests/Makefile.am (EXTRA_PROGRAMS): Remove addsub_n and
18958	addsub_n_2 which don't currently build.
18959	* mpn/tests/copy.c: Test MPN_COPY_INCR, not __gmpn_copy.
18960
18961	* tests/rand/Makefile.am (libstat_la_LIBADD): Add -lm, no longer on
18962	libgmp.la.
18963	(findlc_LDADD): Use libstat.la.
18964	(AUTOMAKE_OPTIONS): Use ansi2knr.
18965
189662000-06-08  Torbjorn Granlund  <tege@swox.com>
18967
18968	* configure.in (alpha*-*-osf*): Default `flavour' to ev6 for ev6 and
18969	higher.
18970	(alpha*-*-*): Likewise.
18971	(alpha*-*-osf*: gmp_optcflags_cc): Move -arch/-tune flags from
18972	gmp_xoptcflags_gcc.
18973
18974	* mpn/Makefile.am (TARG_DIST): Add pa64w.
18975
18976	* longlong.h: Wrap 64-bit hppa code in #ifndef LONGLONG_STANDALONE.
18977
189782000-06-07  Torbjorn Granlund  <tege@swox.com>
18979
18980	* mpz/remove.c: Fail for `src' being zero.
18981
18982	* mpz/tests/reuse.c: Test more functions.
18983	(FAIL): New define.
18984
18985	* mpz/tests/t-powm.c: Loop during operand generation while they
18986	are mathematically ill-defined (used to just skip such tests).
18987
18988	* mpz/powm.c (mpz_redc): Clean up argument declarations.
18989
18990	* configure.in (gmp_cflags64_gcc): Don't add bogus -mWHAT option.
18991	(sparcv9-*-solaris2.[7-9]], gmp_cflags64_gcc):
18992	Inherit from previous gmp_cflags64_gcc; pass `-m64 -mptr64'.
18993	(ia64*-*-*): New.
18994
18995	* mpn/generic/dump.c: Make it work when an mp_limb_t is not `long'.
18996
18997	* mpf/set_prc.c: MPN_COPY => MPN_COPY_INCR.
18998
189992000-06-06  Torbjorn Granlund  <tege@swox.com>
19000
19001	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n):
19002	Use mpn_incr_u for final carry propagation.
19003
19004	* mpz/tests/t-gcd.c: Add calls to mpz_gcdext with argument t == NULL.
19005
19006	* mpz/tests/reuse.c: Major rewrite; test many more functions.
19007
19008	* mpz/powm_ui.c: When exp is 0, change res assign order in order
19009	to handle argument overlap.
19010	* mpz/powm.c: When exp is 0, change res assign order in order
19011	to handle argument overlap.  Handle negative exp and mod arguments.
19012
19013	* mpz/gcdext.c: Rework code after mpn_gcdext call to handle
19014	argument overlap.
19015
19016	* mpz/fdiv_qr.c: Read dividend->_mp_size before calling mpz_tdiv_qr
19017	in order to handle argument overlap.
19018	* mpz/cdiv_qr.c: Likewise.
19019
19020	* mpf/tests/reuse.c: Fix typo that effectively disabled `dis_funcs'
19021	tests.  Clean up test for mpf_ui_div.
19022
190232000-06-06  Kevin Ryde  <kevin@swox.se>
19024
19025	* mpn/x86/p6/sqr_basecase.asm: New file.
19026	* mpn/x86/mod_1.asm: Avoid one conditional jump.
19027	* mpn/x86/p6/gmp-mparam.h: Update thresholds, #ifndef UMUL_TIME
19028	and UDIV_TIME, add COUNT_TRAILING_ZEROS_TIME.
19029
19030	* mp_minv_tab.c: New file.
19031	* Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
19032	* gmp-impl.h (modlimb_invert): New macro.
19033	* mpz/powm.c: Remove mpz_dmprepare, use modlimb_invert instead.
19034	* mpn/generic/bdivmod.c: Use modlimb_invert instead of a loop.
19035	* mpn/generic/gcd.c: Inline two small mpn_bdivmod calls, use
19036	MPN_COPY_INCR not MPN_COPY in one place.
19037
190382000-06-05  Torbjorn Granlund  <tege@swox.com>
19039
19040	* mpf/tests/reuse.c (dsi_funcs): Add mpf_mul_2exp and mpf_div_2exp.
19041	(main): Clean up test for mpf_div_ui.
19042
19043	* mpf/mul_2exp.c: Correct criterion for whether to use mpn_lshift or
19044	mpn_rshift.  MPN_COPY => MPN_COPY_INCR.  Coerce the two assignments to
19045	r->_mp_size.
19046
19047	* mpf/div_2exp.c: Use mpn_rshift instead of mpn_lshift when overlap
19048	so requires.  MPN_COPY => MPN_COPY_INCR.
19049
19050	* mpf/tests/t-dm2exp.c: Correct type of res_prec.
19051
190522000-06-04  Kevin Ryde  <kevin@swox.se>
19053
19054	* mpz/bin_uiui.c: Fix result for n==0 and n==k.
19055	* mpz/bin_ui.c: Fix result for k>n, add support for n<0.
19056	* gmp.texi (Number Theoretic Functions): Update mpz_bin_ui to
19057	note n<0 is supported.
19058
19059	* mpz/tests/t-misc.c: New file.
19060	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
19061
190622000-05-31  Kevin Ryde  <kevin@swox.se>
19063
19064	* tune/speed.* (FLAG_R_OPTIONAL): New option for routines, use on
19065	mpn_gcd_1 and mpn_mul_basecase.
19066	* tune/README: Update.
19067
19068	* tune/alpha.asm: New file, by Torbjorn.
19069	* tune/Makefile.am (EXTRA_DIST): Add it.
19070	* configure.in (alpha*-*-*): Use it.
19071
190722000-05-31  Linus Nordberg  <linus@swox.se>
19073
19074	* doc/configuration: New file.
19075
190762000-05-30  Torbjorn Granlund  <tege@swox.com>
19077
19078	* mpn/generic/mul_basecase.c: Call mpn_mul_2 and mpn_addmul_2
19079	if available.  Don't include longlong.h.
19080
19081	* doc/isa_abi_headache: New file.
19082
190832000-05-30  Linus Nordberg  <linus@swox.se>
19084
19085	* configure.in (NM): Use AC_PROG_NM rather than AC_CHECK_TOOL to
19086	find `nm'.  (AC_PROG_NM comes with Libtool and is needed to get
19087	the `-B' option (BSD compatible output) included in $NM.)
19088	(AR): Use AC_CHECK_PROG rather than AC_CHECK_TOOL to find `ar'.
19089	(Now that NM isn't a cross compilation tool, don't give the
19090	impression that we know how to cross compile.)
19091	(CCAS): Remove spurious comment.
19092
19093	* gmp.texi (Notes for Particular Systems): Remove comment about
19094	using GNU `nm' on AIX since system nm now works.
19095
190962000-05-29  Torbjorn Granlund  <tege@swox.com>
19097
19098	* mpn/power/mul_1.s: Remove [PR] from first word in function
19099	descriptor.
19100	* mpn/power/addmul_1.s: Likewise.
19101	* mpn/power/submul_1.s: Likewise.
19102
191032000-05-28  Kevin Ryde  <kevin@swox.se>
19104
19105	* configure.in, tune/*: Change pentium rdtsc cycle scheme to
19106	HAVE_SPEED_CYCLECOUNTER and SPEED_CYCLECOUNTER_OBJS.
19107	* tune/pentium.asm: Renamed and converted from rdtsc.asm.
19108	* tune/sparcv9.asm: New file, by Torbjorn.
19109	* tune/sparc64.asm: New file.
19110	* tune/tuneup.c: Put a limit on gcdext search.
19111
19112	* gmp.h (mp_set_memory_functions): Add extern "C".
19113	* mp.h (__GNU_MP__): Bump to "3".
19114	* mpz/add.c,mul.c,powm.c,sub.c,sqrtrem.c,tdiv_qr.c [BERKELEY_MP]:
19115	Include mp.h for mpbsd compile.
19116	* mpz/gcd.c: Ditto, and remove _mpz_realloc declaration.
19117
19118	* gmp.texi (Integer Functions): Flatten @subsections into @sections.
19119	(Floating-point Functions): Ditto.
19120	(Integer Random Numbers): Split from miscellaneous as a sep section.
19121	(Installing GMP): Make nodes for the sections.
19122	Add more "@cindex"s.
19123	(Known Build Problems): Remove SunOS get_d problem, believed fixed.
19124	(Notes for Particular Systems): Remove HPPA note since now PIC.
19125	(References): URL for Jebelean.
19126
191272000-05-27  Torbjorn Granlund  <tege@swox.com>
19128
19129	* mpn/pa64w: New directory, contents based on corresponding mpn/pa64
19130	files.
19131	* configure.in (hppa2.0w-*-*): New.
19132	* mpz/tests/io.c (_INCLUDE_POSIX_SOURCE): Define when __hpux before
19133	including stdio.h.
19134	* gmp-impl.h: Always define DItype and UDItype.
19135
191362000-05-27  Kevin Ryde  <kevin@swox.se>
19137
19138	* tune/common.c (speed_measure): Correction to array sorting,
19139	better diagnostic when measuring fails.
19140	* tune/time.c: Add microsecond accurate getrusage method.
19141
19142	* tune/time.c (speed_cpu_frequency_processor_info): New function.
19143	* configure.in (AC_CHECK_FUNCS): Add processor_info.
19144
191452000-05-26  Linus Nordberg  <linus@swox.se>
19146
19147	* gmp.texi (Installing GMP): Shared libraries work for AIX < 4.3
19148	if using GNU nm.
19149
191502000-05-26  Torbjorn Granlund  <tege@swox.com>
19151
19152	* tune/tuneup.c (SIGNED_TYPE_MAX): Shift `-1' instead of `1' to
19153	avoid signed overflow.
19154
19155	* demos/pexpr.c (setup_error_handler): Don't call sigaltstack on
19156	Unicos.
19157
191582000-05-25  Torbjorn Granlund  <tege@swox.com>
19159
19160	* insert-dbl.c: Work around GCC 2.8 bug.
19161	* extract-dbl.c: Likewise.
19162
19163	* config.sub: Allow i586, i686, i786 again.
19164
19165	* config.guess: Use X86CPU for lots more systems.
19166
191672000-05-25  Linus Nordberg  <linus@swox.se>
19168
19169	* mpbsd/tests/dummy.c (main): Call exit() instead of doing return
19170	(some old SysV machines don't get this correct, I've heard.)
19171
191722000-05-25  Kevin Ryde  <kevin@swox.se>
19173
19174	* mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
19175	digits in string, so it's the same as a separate init and set_str.
19176
191772000-05-24  Torbjorn Granlund  <tege@swox.com>
19178
19179	* mpz/tests/reuse.c: Use mpz_random2 instead of mpz_random.
19180
19181	* mpz/divexact.c: Read pointers after reallocation.
19182	Compare `quot' and `den' instead of `qp' and `dp' in overlap check.
19183	Use MPN_COPY_INCR for copying from `np'.
19184
19185	(*-*-aix4.[3-9]*): Disable shared libs just for problematic AIX
19186	versions.
19187	* configure.in (*-cray-unicos*): Disable asm syntax checking; set
19188	compiler explicitly.
19189	* configure.in (hppa*-*-*): Remove code disabling shared libs.
19190
191912000-05-24  Linus Nordberg  <linus@swox.se>
19192
19193	* acinclude.m4 (GMP_PROG_CC_WORKS): Don't report progress to user
19194	when doing the AIX specific test to avoid "nested output".
19195
191962000-05-22  Kevin Ryde  <kevin@swox.se>
19197
19198	* mp.h (_PROTO): Copy from gmp.h, use on prototypes.
19199	Add extern "C" too.
19200	* mpbsd/tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
19201	* mpbsd/tests/allfuns.c: Don't execute mout, just link to it.
19202	(main): ANSI style definition.
19203
19204	* gmp-impl.h (MP_BASE_AS_DOUBLE): Change the expression to
19205	something that works on SunOS native cc.  Seems to fix the
19206	mp*_get_d problems.
19207
19208	* mpn/tests/ref.c (refmpn_strip_twos): Use MPN_COPY_INCR.
19209	* mpn/tests/Makefile.am: Let .asm.o rules work with absolute $srcdir.
19210
192112000-05-21  Kevin Ryde  <kevin@swox.se>
19212
19213	* mpn/x86/k7/sqr_basecase.asm: Replace file with K7 specific code.
19214	* mpn/x86/k7/README: Update.
19215	* mpn/x86/k7/gmp-mparam.h: Tune thresholds.
19216	(COUNT_TRAILING_ZEROS_TIME): New define.
19217	* mpn/x86/k6/gmp-mparam.h: Ditto.
19218
19219	* mpn/x86/pentium/mmx/popham.asm: New file (include_mpn of K6 version).
19220	* mpn/x86/p6/diveby3.asm: New file (include_mpn of P5 version).
19221	* mpn/x86/p6/mmx/popham.asm: New file (include_mpn of K6 version).
19222	* mpn/x86/p6/p3mmx/popham.asm: New file (include_mpn of K7 version).
19223	* configure.in (pentium3-*-*): Add p3mmx to $path.
19224
19225	* gmp.texi (Integer Arithmetic): Clarify mpz_jacobi op2; add
19226	mpz_*_kronecker_*.
19227	(Miscellaneous Integer Functions): Add mpz_odd_p and mpz_even_p.
19228	(Low-level Functions): Put mpn_divmod_1 with mpn_divrem_1 and note
19229	it's now a macro.
19230	(References): Add Henri Cohen.
19231
19232	* gmp.h (mpn_addmul_1c, mpn_divrem_1c, mpn_mod_1c, mpn_mul_1c,
19233	mpn_submul_1c): Add prototypes.
19234	(mpz_odd_p, mpz_even_p): New macros.
19235
19236	* mpn/asm-defs.m4 (m4wrap_prepend): New macro.
19237	(m4_error): Use it.
19238	(m4_not_for_expansion): Corrections to OPERATION symbols.
19239	More comments about variations between m4 versions.
19240	* mpn/x86/x86-defs.m4 (PROLOGUE): Use m4wrap_prepend (fixes error
19241	exit under BSD m4, previously m4_error printed the message but the
19242	exit code was 0).
19243
19244	* gmp.h (mpn_divmod_1): Change to a macro calling mpn_divrem_1.
19245	* mpn/generic/divrem_1.c: Move divmod_1.c code to here, make it
19246	static and call it __gmpn_divmod_1_internal.
19247	* mpn/generic/divmod_1.c: Remove file.
19248	* configure.in (gmp_mpn_functions): Remove divmod_1.
19249	* mpn/asm-defs.m4 (define_mpn): Remove divmod_1 and divmod_1c.
19250	* compat.c (mpn_divmod_1): Add compatibility function.
19251	* tune/*: Remove mpn_divmod_1 measuring (leave just divrem_1).
19252
19253	* acconfig.h (HAVE_NATIVE_mpn_*): Add some missing carry-in
19254	variants, remove divmod_1.
19255
19256	* mpn/x86/diveby3.asm: Use imul, update comments.
19257
19258	* demos/qcn.c: New file.
19259	* demos/Makefile.am (EXTRA_PROGRAMS): Add it.
19260
19261	* mpz/tests/t-jac.c: New file.
19262	* mpz/tests/Makefile.am (check_PROGRAMS): Add it. Enable ansi2knr.
19263
19264	* mpz/kronsz.c: New file.
19265	* mpz/kronuz.c: New file.
19266	* mpz/kronzs.c: New file.
19267	* mpz/kronzu.c: New file.
19268	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
19269	* Makefile.am (MPZ_OBJECTS): Add them.
19270	* gmp-impl.h (JACOBI_*, MPN_STRIP_LOW_ZEROS_NOT_ZERO): New macros.
19271	* gmp.h (mpz_*_kronecker_*): New defines and prototypes.
19272
19273	* mpn/generic/jacbase.c: New file.
19274	* mpn/generic/mod_1_rs.c: New file.
19275	* configure.in (gmp_mpn_functions): Add them.
19276	* gmp.h (mpn_jacobi_base, mpn_mod_1_rshift): New defines and
19277	prototypes.
19278	* longlong.h (COUNT_TRAILING_ZEROS_TIME): New define.
19279	* mpn/tests/ref.c (refmpn_mod_1_rshift): New function.
19280	* mpn/tests/try.c: Add mpn_mod_1_rshift.
19281	* tune/*: Add measuring for mpn_jacobi_base.
19282
19283	* acinclude.m4 (GMP_FINISH): Add ifdefs to allow multiple
19284	inclusion of config.m4.
19285	(GMP_PROG_M4): Put "good" message through to config.log.
19286
19287	* mpz/powm.c: Use a POWM_THRESHOLD for where redc stops.
19288	* tune/*: Add mpz_powm measuring, and tune POWM_THRESHOLD.
19289	* gmp-impl.h [TUNE_PROGRAM_BUILD] (POWM_THRESHOLD): Conditional
19290	redefinition for use when tuning.
19291
19292	* mpz/powm_ui.c: Use DIVIDE_BY_ZERO.
19293
19294	* mpz/iset_str.c: Initialize _mp_size to 0, in case no digits in
19295	string; this makes it the same as a separate init and set_str.
19296
192972000-05-20  Kevin Ryde  <kevin@swox.se>
19298
19299	* mpn/asm-defs.m4: Note &,|,^ aren't bitwise in BSD m4 eval().
19300	* mpn/x86/k6/sqr_basecase.asm: Use "%" not "&" in m4 eval()s.
19301
19302	* mpn/x86/x86-defs.m4 (Zdisp): Yet more instruction forms.
19303
193042000-05-19  Linus Nordberg  <linus@swox.se>
19305
19306	* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't use shell variable
19307	`ac_compile' for our own compile command string since other
19308	Autoconf macros may depend on it.
19309
193102000-05-19  Kevin Ryde  <kevin@swox.se>
19311
19312	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Fix
19313	carry propagation in final coefficient additions.
19314
193152000-05-18  Linus Nordberg  <linus@swox.se>
19316
19317	* configure.in: Set NM before looking for compiler since
19318	GMP_CHECK_CC_64BIT needs it.
19319
19320	* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't execute on target.
19321	(GMP_PROG_CC_FIND): Before checking if the compiler knows how to
19322	produce 64-bit code, verify that it works at all.  The background
19323	is that /usr/ucb/cc on Solaris 7 successfully compiles in 64-bit
19324	mode but fails when doing final link.
19325	(GMP_PROG_CC_WORKS): Report to user what's happening.
19326
193272000-05-17  Linus Nordberg  <linus@swox.se>
19328
19329	* config.guess: Use X86CPU for x86 Cygwin.
19330
193312000-05-16  Kevin Ryde  <kevin@swox.se>
19332
19333	* mpn/x86/p6/mmx/divrem_1.asm: New file.
19334	* mpn/x86/p6/mmx/mod_1.asm: New file.
19335	* mpn/x86/p6/README: Update.
19336	* mpn/x86/divrem_1.asm: Update comments.
19337	* mpn/x86/mod_1.asm: Ditto.
19338
193392000-05-14  Kevin Ryde  <kevin@swox.se>
19340
19341	* tune/speed.h: Run gcd functions on a set of data.
19342
19343	* mpn/tests/try.c: New file.
19344	* mpn/tests/try.h: New file.
19345	* mpn/tests/spinner.c: New file.
19346	* mpn/tests/trace.c: New file.
19347	* mpn/tests/x86call.asm: New file.
19348	* mpn/tests/x86check.c: New file.
19349	* mpn/tests/ref.c (refmpn_hamdist): Allow size==0.
19350	(refmpn_gcd): New function, and other additions supporting it.
19351	* mpn/tests/ref.h: More prototypes.
19352	* mpn/tests/Makefile.am: Add try program, use ansi2knr.
19353
19354	* mpn/x86/k7/mmx/popham.asm: New file.
19355	* mpn/x86/k6/mmx/popham.asm: New file.
19356	* mpn/x86/k6/sqr_basecase.asm: Unroll the addmul, for approx 1.3x
19357	speedup above 15 limbs.
19358	* mpn/x86/k7/README: Update.
19359	* mpn/x86/k6/README: Update, and add notes on plain K6 and pre-CXT
19360	K6-2 problems.
19361	* configure.in (k6*-*-*, athlon-*-*): Add popham.
19362
19363	* mpn/x86/pentium/diveby3.asm: New file.
19364	* mpn/x86/pentium/README: Update.
19365
19366	* gmp.texi (Installing GMP): Add note on bad OpenBSD 2.6 m4.
19367	(Reporting Bugs): Ask for config.m4 if asm file related.
19368	(I/O of Rationals): New section, add mpq_out_str.
19369	(References): Add url for on-line gcc manuals.
19370	A few node and menu updates.
19371
19372	* INSTALL: Better command line argument checking for test progs.
19373	Change MP -> GMP.
19374
19375	* configure.in (WANT_ASSERT, USE_STACK_ALLOC, HAVE_PENTIUM_RDTSC):
19376	Put descriptions here, not in acconfig.h.
19377	(CALLING_CONVENTIONS_OBJS): New AC_SUBST (for mpn/tests/try).
19378	(HAVE_CALLING_CONVENTIONS): New AC_DEFINE.
19379	(AC_CHECK_HEADERS): Add sys/time.h.
19380	(AC_CHECK_FUNCS): Add getpagesize, setitimer.
19381	(KARATSUBA_SQR_THRESHOLD): Strip trailing comments from the
19382	#define when passing through to config.m4.
19383	* acconfig.h (PACKAGE, VERSION, WANT_ASSERT, USE_STACK_ALLOC,
19384	HAVE_PENTIUM_RDTSC): No need for #undefs, autoheader gets them
19385	from configure.in.
19386
19387	* acinclude.m4 (GMP_PROG_M4): Check for broken OpenBSD 2.6 m4
19388	eval(), put messages into config.log.
19389	* mpn/asm-defs.m4: Add notes and test for OpenBSD 2.6 m4.
19390
19391	* mpq/out_str.c: New file.
19392	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
19393	* Makefile.am (MPQ_OBJECTS): Ditto.
19394	* gmp.h (mpq_out_str): New define and prototype.
19395
193962000-05-12  Kevin Ryde  <kevin@swox.se>
19397
19398	* configure.in (CONFIG_TOP_SRCDIR): Fix to use $srcdir not
19399	$top_srcdir (which doesn't exist).
19400	* acinclude.m4 (GMP_C_ANSI2KNR): Fix setting U=_.
19401	* gmp-impl.h (mpn_com_n, MPN_LOGOPS_N_INLINE): Fix missing "do"
19402	(not currently used, probably no ill effect anyway).
19403
194042000-05-11  Torbjorn Granlund  <tege@swox.com>
19405
19406	* randraw.c (lc): Major overhaul (pending rewrite).
19407	(_gmp_rand): Rewrite.
19408
194092000-05-08  Torbjorn Granlund  <tege@swox.com>
19410
19411	* mpz/tests/convert.c: Call free via _mp_free_func.
19412	* mpf/tests/t-conv.c: Likewise.
19413
19414	* memory.c: Add code enabled for DEBUG that adds special patterns
19415	around allocated blocks.
19416
194172000-05-05  Linus Nordberg  <linus@swox.se>
19418
19419	* gmp.texi (Miscellaneous Float Functions): Correct parameter list
19420	for mpf_urandomb().
19421
19422	* configure.in: Invoke AC_REVISION.
19423
194242000-05-05  Kevin Ryde  <kevin@swox.se>
19425
19426	* gmp.texi: Use @dircategory and @direntry.
19427	(Installing GMP): Clarification for --target, updates on SunOS
19428	problems.
19429	(Integer Arithmetic): Add mpz_mul_si.
19430	(Initializing Rationals): Add mpq_swap.
19431	(Assigning Floats): Add mpf_swap.
19432	(Low-level Functions): Add mpn_divexact_by3c, and details of what
19433	the calculation actually gives.
19434	(Low-level Functions): Note extra space needed by mpn_gcdext,
19435	clarify the details a bit.
19436
19437	* compat.c: New file, entry points for upward binary compatibility.
19438	(mpn_divexact_by3): Compatibility function.
19439	* Makefile.am (libgmp_la_SOURCES): Add compat.c.
19440
19441	* mpn/tests/ref.c: Rearrange macros for ansi2knr.
19442	(div1): Renamed from div to avoid library function.
19443	(refmpn_divexact_by3c, refmpn_gcd_1, refmpn_popcount,
19444	refmpn_hamdist): New functions.
19445	* mpn/tests/ref.h: Add extern "C", add new prototypes.
19446
19447	* gmp.h (gmp_randinit, etc): Add extern "C".
19448	(_mpq_cmp_ui): Fix prototype name from mpq_cmp_ui.
19449	(mpn_divexact_by3): Now a macro calling mpn_divexact_by3c.
19450	(mpn_divexact_by3c): New prototype and define.
19451
19452	* mpn/x86/diveby3.asm: Change to mpn_divexact_by3c.
19453	* mpn/x86/k6/diveby3.asm: Ditto.
19454	* mpn/generic/diveby3.c: Ditto.
19455	* mpn/asm-defs.m4: Ditto on the define_mpn.
19456	* acconfig.h (HAVE_NATIVE_mpn_divexact_by3c): New define.
19457
19458	* mpq/swap.c: New file, derived from mpz/swap.c.
19459	* mpf/swap.c: Ditto.
19460	* mpq/Makefile.am: Add swap.c.
19461	* mpf/Makefile.am: Ditto.
19462	* Makefile.am: Add two new "swap.lo"s.
19463
19464	* mpn/x86/k6/mmx/com_n.asm: Fix an addressing bug (fortunately
19465	this code hasn't been used anywhere yet).
19466
19467	* mpn/x86/k7/mmx/divrem_1.asm: New file.
19468	* mpn/x86/k7/mmx/mod_1.asm: New file.
19469	* mpn/x86/k7/diveby3.asm: New file.
19470	* mpn/x86/k7/README: Update.
19471
19472	* mpn/x86/k7/aorsmul_1.asm: Use new cmovCC, no object code change.
19473	* mpn/x86/k7/mul_basecase.asm: Ditto.
19474	* mpn/x86/p6/aorsmul_1.asm: Ditto.
19475
19476	* mpn/x86/x86-defs.m4 (defframe_empty_if_zero): Eval the argument.
19477	(cmovCC): New macros, replacing individual cmovCC_reg_reg forms.
19478	(Zdisp): Recognise more instructions.
19479	(shldl,etc): Use m4_instruction_wrapper().
19480	(ASSERT, movl_text_address): New macros.
19481
19482	* mpn/asm-defs.m4: Add remarks on SunOS /usr/bin/m4 and new
19483	OpenBSD m4.
19484	(m4_assert_numargs_internal_check): Remove a spurious parameter.
19485	(m4_empty_if_zero): Eval the argument.
19486	(m4_assert, m4_assert_numargs_range, m4_config_gmp_mparam,
19487	m4_instruction_wrapper): New macros.
19488
194892000-05-04  Linus Nordberg  <linus@swox.se>
19490
19491	* gmp.texi (Reporting Bugs): Be explicit about output from running
19492	a command.
19493
194942000-05-02  Torbjorn Granlund  <tege@swox.com>
19495
19496	* mpn/generic/bz_divrem_n.c (mpn_bz_divrem_n): Handle non-zero return
19497	from first mpn_bz_div_3_halves_by_2 call.
19498	(mpn_bz_divrem_aux): Likewise.
19499
195002000-04-30  Kevin Ryde  <kevin@swox.se>
19501
19502	* tune/* (GCD_ACCEL_THRESHOLD, GCDEXT_THRESHOLD): Tune these.
19503
19504	* mpn/generic/gcdext.c (GCDEXT_THRESHOLD): Rename from THRESHOLD,
19505	use with >=, adjust default to 17 accordingly.
19506	Use new *_SWAP macros.
19507
19508	* mpn/generic/gcd.c (GCD_ACCEL_THRESHOLD): Rename from
19509	ACCEL_THRESHOLD, use with >=, adjust default to 5 accordingly.
19510	Use new *_SWAP macros.
19511
19512	* mpf/get_str.c, mpf/set_str.c, mpf/sub.c, mpz/add.c, mpz/ior.c,
19513	mpz/and.c, mpz/sub.c, mpz/xor.c, mpz/ui_pow_ui.c,
19514	mpn/generic/mul.c: Use new *_SWAP macros.
19515
19516	* stack-alloc.h: Add extern "C" around prototypes.
19517
19518	* gmp-impl.h: (MP_PTR_SWAP, etc): New macros.
19519	(_mp_allocate_func, etc): Use _PROTO.
19520	[TUNE_PROGRAM_BUILD]: More changes in tune program build part.
19521
195222000-04-28  Torbjorn Granlund  <tege@swox.com>
19523
19524	* mpn/pa64/add_n.s: Add `,entry' to export directive.
19525	* mpn/pa64/addmul_1.S, mpn/pa64/lshift.s, mpn/pa64/mul_1.S,
19526	mpn/pa64/rshift.s, mpn/pa64/sub_n.s, mpn/pa64/submul_1.S,
19527	mpn/pa64/umul_ppmm.S: Likewise.
19528	* mpn/hppa/hppa1_1/udiv_qrnnd.S: New name for udiv_qrnnd.s.
19529	Add PIC support.
19530
195312000-04-29  Kevin Ryde  <kevin@swox.se>
19532
19533	* gmp-impl.h [TUNE_PROGRAM_BUILD] (TOOM3_MUL_THRESHOLD_LIMIT): New
19534	define.
19535	* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Use
19536	TOOM3_MUL_THRESHOLD_LIMIT, not a hard coded 500.
19537
19538	* memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
19539	* stack-alloc.c: Don't use C++ reserved word "this".
19540	* urandom.h: Put extern "C" around prototypes.
19541	* mpz/powm.c: Switch a couple of parameters to "const", which they
19542	are, to satisfy g++.
19543
19544	* randraw.c, stack-alloc.c, mpbsd/mout.c, mpbsd/mtox.c: Add casts to
19545	help g++.
19546
19547	* stack-alloc.c: Provide dual ANSI/K&R function definitions.
19548	* mpz/addmul_ui.c,get_d.c,inp_str.c,perfpow.c,powm.c,pprime_p.c,
19549	rrandomb.c,set_str.c,ui_pow_ui.c: Ditto.
19550	* mpf/integer.c,set_str.c: Ditto.
19551	* mpbsd/min.c,xtom.c: Ditto.
19552	* mpn/generic/bz_divrem_n.c,dump.c,gcd_1.c,get_str.c,hamdist.c,
19553	popcount.c,random.c,random2.c,set_str.c: Ditto.
19554
19555	* rand.c: Use <stdio.h> for NULL.
19556	* mpz/gcd_ui.c,gcdext.c,mul.c,perfpow.c,powm_ui.c,root.c,sqrt.c,
19557	sqrtrem.c: Ditto
19558	* mpf/sqrt.c,sqrt_ui.c: Ditto.
19559	* mpn/generic/perfsqr.c,sqrtrem.c: Ditto.
19560
19561	* gmp-impl.h (NULL, malloc, realloc, free): Don't define/declare.
19562	(extern "C"): Add around function prototypes.
19563	(mpn_kara_mul_n, mpn_kara_sqr_n, mpn_toom3_mul_n, mpn_toom3_sqr_n):
19564	Add prototypes.
19565	[TUNE_PROGRAM_BUILD] (FIB_THRESHOLD): Add necessary redefinitions for
19566	use by tune program.
19567	* mpn/generic/mul_n.c: Remove mpn_toom3_mul_n prototype.
19568
19569	* acinclude.m4 (GMP_C_ANSI2KNR): New macro.
19570	(GMP_CHECK_ASM_MMX, GMP_CHECK_ASM_SHLDL_CL): Fix to use
19571	$gmp_cv_check_asm_text which is what GMP_CHECK_ASM_TEXT sets.
19572	* configure.in (GMP_C_ANSI2KNR): Use this instead of AM_C_PROTOTYPES,
19573	for reasons described with its definition.
19574
19575	* demos/Makefile.am (ansi2knr): Use $(top_builddir) nor $(top_srcdir).
19576
19577	* mpz/fib_ui.c (FIB_THRESHOLD): Rename from FIB_THRES, for consistency.
19578	(FIB_THRESHOLD): Conditionalize so gmp-mparam.h can define a value.
19579	(mpz_fib_bigcase): Use >= FIB_THRESHOLD, same as main mpz_fib_ui.
19580	* tune/tuneup.c,Makefile.am (FIB_THRESHOLD): Tune this.
19581
19582	* configure.in (*-*-aix* gmp_m4postinc): Fix setting (don't overwrite
19583	a value just stored).
19584
195852000-04-26  Kevin Ryde  <kevin@swox.se>
19586
19587	* mpn/sparc32/udiv_fp.asm: Use mpn_udiv_qrnnd macro.
19588	* mpn/sparc32/udiv_nfp.asm: Ditto.
19589	* mpn/sparc32/v8/supersparc/udiv.asm: Ditto.
19590	* mpn/sparc32/umul.asm: Name the function mpn_umul_ppmm.
19591	* mpn/sparc32/v8/umul.asm: Ditto.
19592	* mpn/powerpc32/umul.asm: Ditto.
19593
19594	* mpn/x86/syntax.h: Remove file, since now unused.
19595
19596	* configure.in (x86): Remove -DBROKEN_ALIGN and -DOLD_GAS
19597	previously used by .S files.
19598	(x86 extra_functions): Add udiv and umul.
19599	(GMP_PROG_M4): Use this instead of AC_CHECK_PROG(M4,m4,...)
19600	(HAVE_NATIVE_*): Loosen up the regexp to "PROLOGUE.*" so as to
19601	accept PROLOGUE_GP on alpha.
19602
19603	* acconfig.h (HAVE_NATIVE_mpn_umul_ppmm, udiv_qrnnd, invert_limb):
19604	New template defines.
19605	* mpn/asm-defs.m4 (mpn_umul_ppmm, mpn_udiv_qrnnd): New define_mpn()s.
19606	* longlong.h (umul_ppmm, udiv_qrnnd): Use a library version if
19607	it's available and an asm macro isn't.
19608	* gmp-impl.h (invert_limb): Ditto.
19609
19610	* gmp-impl.h (ASSERT_NOREALLOC): Not a good idea, remove it.
19611
19612	* acinclude.m4 (GMP_PROG_M4): New macro.
19613
196142000-04-25  Linus Nordberg  <linus@swox.se>
19615
19616	* gmp.texi (Random State Initialization): Correct arguments to
19617	`gmp_randinit'.
19618
19619	* acinclude.m4 (GMP_VERSION): Change `eval' --> `m4_eval'.  Fix
19620	from Kevin.
19621	* aclocal.m4: Regenerate.
19622
196232000-04-25  Kevin Ryde  <kevin@swox.se>
19624
19625	* mpn/x86/aors_n.asm: Remove parentheses around an immediate that
19626	Solaris "as" doesn't like, change by Torbjorn.
19627
196282000-04-24  Kevin Ryde  <kevin@swox.se>
19629
19630	* configure.in (AC_CHECK_FUNCS): Add strtoul.
19631
19632	* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Bigger
19633	array for karatsuba temporary space for tune program build.
19634	(mpn_toom3_sqr_n) Remove an unused variable.
19635
19636	* demos/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
19637	Add "allprogs:" pseudo-target.
19638	* demos/factorize.c, demos/isprime.c: Switch to ANSI functions,
19639	rely on ansi2knr.
19640
19641	* gmp.texi (Getting the Latest Version of GMP): Add reference to
19642	ftp.gnu.org mirrors list.
19643	* INSTALL: Add arg count check to example programs.
19644
19645	* mpn/x86/*/*.asm: Convert to FORTRAN ... or rather to
19646	FORTRAN-style "C" commenting to support Solaris "as".
19647	* mpn/x86/x86-defs.m4: Ditto, and add another Zdisp insn.
19648	* mpn/asm-defs.m4 (C): Update comments.
19649	* mpn/x86/README.family: Add a note on commenting, remove
19650	description of .S files.
19651
19652	* mpn/sparc64/addmul_1.asm, mul_1.asm, submul_1.asm: Use
19653	include_mpn().
19654
196552000-04-23  Torbjorn Granlund  <tege@swox.com>
19656
19657	* config.sub: Merge with FSF version of April 23.
19658
19659	* mpn/powerpc32: Use dnl/C instead of `#' for comments.
19660
19661	* config.guess: Get "model" limit between pentium 2 and pentium3 right.
19662	Get rid of code determining `_' prefix; use double labels instead.
19663	* config.guess: Partially merge with FSF version of April 22.
19664	(Don't bring over NetBSD changes for now.)
19665
196662000-04-23  Kevin Ryde  <kevin@swox.se>
19667
19668	* tune/Makefile.am, tune/README, tune/common.c, tune/rdtsc.asm,
19669	tune/speed.c, tune/speed.h, tune/time.c, tune/tuneup.c: New files.
19670	* tune/Makefile.in: New file, generated from Makefile.am.
19671
19672	* gmp-impl.h (ASSERT_NOREALLOC,TMP_ALLOC_LIMBS): New macros.
19673	[TUNE_PROGRAM_BUILD] Further mods for tune program builds.
19674
19675	* mpz/Makefile.am: Add -DOPERATION_$* for new mul_siui.c.
19676	Add rules to build mul_si and mul_ui from a common mul_siui.c.
19677	* mpz/mul_siui.c: New file, derived from and replacing mul_ui.c.
19678	* gmp.h (mpz_mul_si): New prototype and define.
19679
19680	* mpn/tests/*.c [__i386__] (CLOCK): Don't use floating point in
19681	CLOCK because cpp can't handle floats in #if's (TIMES is derived
19682	from CLOCK by default).
19683
19684	* mpn/asm-defs.m4 (include_mpn): New macro.
19685	(m4_assert_numargs) Changes to implementation.
19686
19687	* mpf/Makefile.am: Add -DOPERATION_$* for new integer.c.
19688	Remove explicit rules for floor.o etc.
19689	* mpf/integer.c: Use OPERATION_$* for floor/ceil/trunc.
19690
19691	* mpn/Makefile.am: Put "tests" in SUBDIRS.
19692	* mpn/tests/Makefile.am: New file providing rules to build test
19693	programs, nothing done in a "make all" or "make check" though.
19694	* mpn/tests/README: New file.
19695
19696	* acconfig.h (HAVE_PENTIUM_RDTSC): New define.
19697
19698	* configure.in (x86): Rearrange target cases.
19699	Add mulfunc aors_n and aorsmul_1 for x86 and pentium (now all x86s).
19700	Remove asm-syntax.h generation not needed.
19701	Remove now unused family=x86.
19702	(sparc) Remove unused family=sparc.
19703	(HAVE_PENTIUM_RDTSC) New AC_DEFINE and AM_CONDITIONAL.
19704	(AM_C_PROTOTYPES) New test, supporting ansi2knr.
19705	(AC_CHECK_HEADERS) Add getopt.h, unistd.h and sys/sysctl.h for
19706	tune progs.
19707	(AC_CHECK_FUNCS) Add getopt_long, sysconf and sysctlbyname for
19708	tune progs.
19709	(config.m4 CONFIG_TOP_SRCDIR) Renamed from CONFIG_SRCDIR.
19710	(config.m4 asm-defs.m4) Use CONFIG_TOP_SRCDIR and include().
19711	(gmp_m4postinc) Use include_mpn().
19712	(gmp_links) Omit asm-defs.m4/asm.m4 and gmp_m4postinc's.
19713	(MULFUNC_PROLOGUE) Fix regexps so all functions get AC_DEFINE'd.
19714	(PROLOGUE) Ditto (native copyi and copyd were unused in gmp 3).
19715	(KARATSUBA_SQR_THRESHOLD) Copy from gmp-mparam.h into config.m4.
19716	(AC_OUTPUT) Add tune/Makefile, mpn/tests/Makefile.
19717
19718	* Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
19719	(SUBDIRS): Add tune, reorder directories.
19720	(MPZ_OBJECTS): Add mpz/mul_si.lo.
19721	(libmp_la_SOURCES): Use this for top-level objects, not .lo's.
19722	* ansi2knr.c, ansi2knr.1: New files, provided by automake.
19723
19724	* mpn/x86/aors_n.asm: Convert add_n.S and sub_n.S to a
19725	multi-function aors_n.asm, no object code change.
19726	* mpn/x86/pentium/aors_n.asm: Ditto.
19727	* mpn/x86/aorsmul_1.asm: Ditto for addmul/submul.
19728	* mpn/x86/pentium/aorsmul_1.asm: Ditto.
19729
19730	* mpn/x86/lshift.asm, mpn/x86/mul_1.asm, mpn/x86/mul_basecase.asm,
19731	mpn/x86/rshift.asm: Convert from .S, no object code change.
19732	* mpn/x86/pentium/lshift.asm, mpn/x86/pentium/mul_1.asm,
19733	mpn/x86/pentium/mul_basecase.asm, mpn/x86/pentium/rshift.asm: Ditto.
19734
19735	* gmp.texi (Reporting Bugs): Itemize the list of things to include.
19736	(Miscellaneous Float Functions): Correct typo in mpf_ceil etc
19737	argument types.
19738	Change @ifinfo -> @ifnottex for benefit of makeinfo --html.
19739	Remove unnecessary @iftex's around @tex.
19740
197412000-04-22  Torbjorn Granlund  <tege@swox.com>
19742
19743	* config.guess: Generalize x86 cpu determination code.
19744	Now works on Solaris.
19745
19746	* mpz/nextprime.c: Rewrite still disabled code.
19747
19748	* configure.in: Specifically match freebsd[3-9].
19749
197502000-04-21  Torbjorn Granlund  <tege@swox.com>
19751
19752	* rand.c: Call mpz_clear for otherwise leaking mpz_t.
19753
19754	* mpz/pprime_p.c (mpz_probab_prime_p): Merge handling of negative
19755	n into code for handling small positive n.  Merge variables m and n.
19756	After dividing, simply call mpz_millerrabin.
19757	(isprime): Local variables now use attribute `long'.
19758	(mpz_millerrabin): New static function, based on code from
19759	mpz_probab_prime_p.
19760	(millerrabin): Now simple workhorse for mpz_millerrabin.
19761
197622000-04-19  Torbjorn Granlund  <tege@swox.com>
19763
19764	* gmp-impl.h: Fix parenthesis error in test for __APPLE_CC__.
19765
197662000-04-18  Linus Nordberg  <linus@swox.se>
19767
19768	* NEWS: Add info about shared libraries.  Remove reference to
19769	gmp_randinit_lc.
19770
197712000-04-17  Torbjorn Granlund  <tege@swox.com>
19772
19773	* Version 3.0 released.
19774
19775	* mpn/arm/add_n.S: New version from Robert Harley.
19776	* mpn/arm/addmul_1.S: Likewise.
19777	* mpn/arm/mul_1.S: Likewise.
19778	* mpn/arm/sub_n.S: Likewise.
19779
19780	* gmp.h (__GNU_MP_VERSION_PATCHLEVEL): Now 0.
19781
197822000-04-17  Linus Nordberg  <linus@swox.se>
19783
19784	* configure.in (hppa2.0*-*-*): Pass `+O3' to cc/c89 in 64-bit mode
19785	to avoid compiler bug.
19786	(ns32k*-*-*): Fix typo in path.  Change by Kevin.
19787	(alpha*-*-osf*): New case.  Pass assembly flags for architecture
19788	to gcc.
19789	(alpha*-*-*): Don't bother searching for cc.
19790	* configure: Regenerate.
19791
19792	* Makefile.am (EXTRA_DIST): Add `macos', `.gdbinit'.
19793	* Makefile.in: Regenerate.
19794	* mpn/Makefile.am (EXTRA_DIST): Add `m88k', `lisp'.
19795	* mpn/Makefile.in: Regenerate.
19796
197972000-04-16  Kevin Ryde  <kevin@swox.se>
19798
19799	* README: Updates, and don't duplicate the example in INSTALL.
19800	* INSTALL: Minor updates.
19801	* gmp.texi (Installing MP): Minor edits, restore CC/CFLAGS description.
19802
198032000-04-16  Linus Nordberg  <linus@swox.se>
19804
19805	* configure.in (*-*-cygwin*): Select BSD_SYNTAX to avoid
19806	.type/.size in PROLOGUE for ELF_SYNTAX.  Override ALIGN definition
19807	from x86/syntax.h.
19808	(gmp_xoptcflags_${CC}): New set of variables, indicating
19809	``exclusive optional cflags''.
19810	(most sparcs): Use gmp_xoptcflags instead of gmp_optcflags to
19811	ensure that we pass CPU type to older gcc.
19812	(CFLAGS): CFLAGS on the command line was spoiled.
19813	* configure: Regenerate.
19814
198152000-04-16  Linus Nordberg  <linus@swox.se>
19816
19817	* configure.in: Invoke AC_PROG_LIBTOOL directly.
19818
19819	* acinclude.m4 (GMP_PROG_CC_FIND): Quote source variable when
19820	setting CC64 and CFLAGS64.
19821	(GMP_PROG_CC_SELECT): Cache result.
19822	(GMP_PROG_LIBTOOL): Remove.
19823
19824	* aclocal.m4: Regenerate.
19825	* configure: Regenerate.
19826
198272000-04-16  Linus Nordberg  <linus@swox.se>
19828
19829	* tests/rand/t-rand.c (main): Add non-ANSI function declaration.
19830	Don't use `const'.
19831
198322000-04-16  Torbjorn Granlund  <tege@swox.com>
19833
19834	* mpn/generic/dump.c: Suppress output of leadign zeros.
19835
19836	* mpz/inp_str.c: Fix memory leakage.
19837
19838	* mpz/tests/reuse.c (dss_func_division): Add a final 1.
19839
19840	* longlong.h (alpha count_leading_zeros): Wrap in __MPN.
19841	* mpn/alpha/cntlz.asm: Use __gmpn prefix (by means of __MPN).
19842
19843	* longlong.h (__umul_ppmm, __udiv_qrnnd): Wrap in __MPN.
19844	* mpn/alpha/udiv_qrnnd.S: Use __gmpn prefix.
19845	* mpn/hppa/udiv_qrnnd.s: Likewise.
19846	* mpn/hppa/hppa1_1/udiv_qrnnd.s: Likewise.
19847	* mpn/pa64/udiv_qrnnd.c: Likewise (by means of __MPN).
19848	* mpn/pa64/umul_ppmm.S: Likewise.
19849	* mpn/sparc32/udiv_fp.asm: Likewise (by means of MPN).
19850	* mpn/sparc32/udiv_nfp.asm: Likewise (by means of MPN).
19851	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise (by means of MPN).
19852
19853	* mpn/generic/tdiv_qr.c: Work around gcc 2.7.2.3 i386 register handling
19854	bug.
19855
19856	* mpn/generic/tdiv_qr.c: Use udiv_qrnnd instead of mpn_divrem_1
19857	when computing appropriate quotient; mpn_divrem_1 writes too
19858	many quotient limbs.
19859
19860	* mpn/asm-defs.m4: invert_normalized_limb => invert_limb.
19861	* mpn/alpha/invert_limb.asm: mpn_invert_normalized_limb =>
19862	mpn_invert_limb.
19863	* gmp.h: Likewise.
19864	* gmp-impl.h (alpha specific): invert_normalized_limb => invert_limb;
19865	wrap with __MPN.
19866	* longlong.h (alpha udiv_qrnnd): Likewise.
19867
198682000-04-16  Kevin Ryde  <kevin@swox.se>
19869
19870	* gmp.h (mp_set_memory_functions,mp_bits_per_limb,gmp_errno): Add
19871	#defines so the library symbols are __gmp_*.
19872	* errno.c: Include gmp.h.
19873	* gmp-impl.h (_mp_allocate_func,etc): Add #defines to __gmp_*.
19874	(__clz_tab): New #define to __MPN(clz_tab).
19875	* stack-alloc.c (__gmp_allocate_func,etc): Change from _mp_*.
19876
19877	* Makefile.am (libmp_la_DEPENDENCIES): Add some mpz files needed
19878	for new mpz_powm (pow in libmp).
19879	(EXTRA_DIST): Add projects directory.
19880
19881	* mpn/*: Change __mpn to __gmpn.
19882	* gmp.h (__MPN): Ditto.
19883	* stack_alloc.c,stack-alloc.h: Change __tmp to __gmp_tmp.
19884
19885	* mpn/generic/sb_divrem_mn.c (mpn_sb_divrem_mn): Avoid gcc 2.7.2.3
19886	i386 register handling bug (same as previously in mpn_divrem_classic).
19887
19888	* mpn/generic/divrem.c: Now contains mpn_divrem, which is not an
19889	internal function, so remove warning comment.
19890
19891	* gmp.texi (Compatibility with Version 2.0.x): Source level only.
19892
198932000-04-16  Linus Nordberg  <linus@swox.se>
19894
19895	* configure.in (hppa1.0*): Prefer c89 to cc.
19896	* configure: Regenerate.
19897
198982000-04-15  Linus Nordberg  <linus@swox.se>
19899
19900	* configure.in: If `mpn_path' is set by user on configure command
19901	line, use that as path.
19902	* configure: Regenerate.
19903
199042000-04-15  Linus Nordberg  <linus@swox.se>
19905
19906	* configure.in (hppa2.0*): Use path "hppa/hppa1_1 hppa" if no
19907	64-bit compiler was found.
19908	* configure: Regenerate.
19909
199102000-04-15  Linus Nordberg  <linus@swox.se>
19911
19912	* configure.in: Honor `CC' and `CFLAGS' set by user on configure
19913	command line.
19914	* acinclude.m4: (GMP_PROG_CC_SELECT): Set CFLAGS if not set already.
19915	* aclocal.m4: Regenerate.
19916	* configure: Regenerate.
19917
199182000-04-15  Linus Nordberg  <linus@swox.se>
19919
19920	* acinclude.m4 (GMP_PROG_CC_FIND): Remove debug output.  Remove
19921	commented out code.
19922	* aclocal.m4: Regenerate.
19923	* configure: Regenerate.
19924
19925	* configure.in: Make all `-mcpu' options to gcc optional.
19926	* configure: Regenerate.
19927
19928	* tests/rand/Makefile.am: Don't do anything for target 'all'.
19929	* tests/rand/Makefile.in: Regenerate.
19930
199312000-04-15  Kevin Ryde  <kevin@swox.se>
19932
19933	* README: Small updates.
19934	* NEWS: Add some things about 3.0.
19935
19936	* mpz/Makefile.am (EXTRA_DIST): Remove dmincl.c.
19937
19938	* Makefile.am: Use -version-info on libraries, not -release.
19939
19940	* mpz/tdiv_qr.c: Add mdiv function header #ifdef BERKELEY_MP.
19941	* mpbsd/Makefile.am: Use mpz/tdiv_qr.c, not mdiv.c.
19942	* Makefile.am (MPBSD_OBJECTS): Change mdiv.lo to tdiv_qr.lo.
19943	(libmp_la_DEPENDENCIES): Add mp_clz_tab.lo.
19944	* mpbsd/mdiv.c: Remove file.
19945
19946	* config/mt-linux,mt-m68k,mt-m88110,mt-ppc,mt-ppc64-aix,mt-pwr,
19947	mt-sprc8-gcc,mt-sprc9-gcc,mt-supspc-gcc,mt-vax,mt-x86,
19948	mpn/config/mt-pa2hpux,mt-sprc9,t-oldgas,t-ppc-aix,t-pwr-aix:
19949	Remove configure fragments not used since change to autoconf.
19950
19951	* mpn/generic/bz_divrem_n.c,sb_divrem_mn.c: Add comment that
19952	internal functions are changeable and shouldn't be used directly.
19953
199542000-04-15  Linus Nordberg  <linus@swox.se>
19955
19956	* configure.in: Remove debug output.
19957	* configure: Regenerate.
19958
199592000-04-15  Torbjorn Granlund  <tege@swox.com>
19960
19961	* mpn/generic/tdiv_qr.c: Don't use alloca directly.
19962
19963	* mpz/tdiv_qr.c: Fix typo.
19964	* mpz/tdiv_r.c: Fix typo.
19965	* mpz/tdiv_q.c: Fix typo.
19966
19967	* configure.in: Disable -march=pentiumpro due to apparent compiler
19968	problems.
19969
19970	* mpz/powm.c: Replace with new code from Paul Zimmermann.
19971
19972	* mpz/tdiv_q.c: Remove debug code.
19973
19974	* mpn/generic/divrem.c: Remove C++ style `//' commented-out code.
19975	* mpn/generic/sb_divrem_mn.c: Likewise.
19976
199772000-04-14  Torbjorn Granlund  <tege@swox.com>
19978
19979	* mpz/cdiv_q.c: Change temp allocation for new requirements of
19980	mpz_tdiv_qr.
19981	* mpz/fdiv_q.c: Likewise.
19982
19983	* mpn/sparc64/gmp-mparam.h: Set up parameters for TOOM3.
19984
19985	* mpz/dmincl.c: Delete file.
19986	* mpz/tdiv_qr.c: Rewrite using mpn_tdiv_qr.
19987	* mpz/tdiv_r.c: Likewise.
19988	* mpz/tdiv_q.c: Likewise.
19989
19990	* mpn/generic/tdiv_qr.c: New file.
19991	* mpn/generic/bz_divrem_n.c: New file.
19992	* mpn/generic/sb_divrem_mn.c: New file.
19993
19994	* gmp-impl.h (MPZ_REALLOC): New macro.
19995	(mpn_sb_divrem_mn): Declare.
19996	(mpn_bz_divrem_n): Declare.
19997	(mpn_tdiv_qr): Declare.
19998
19999	* configure.in (gmp_mpn_functions): Delete divrem_newt and divrem_1n;
20000	add tdiv_qr, bz_divrem_n, and sb_divrem_mn.
20001	* mpn/generic/divrem_newt.c: Delete file.
20002	* mpn/generic/divrem_1n.c: Delete file.
20003
20004	* gmp.h (mpn_divrem_newton): Remove declaration.
20005	(mpn_divrem_classic): Remove declaration.
20006
20007	* gmp.h (mpn_divrem): Remove function definition.
20008	* mpn/generic/divrem.c: Replace mpn_divrem_classic with a
20009	mpn_divrem wrapper.
20010
200112000-04-14  Kevin Ryde  <kevin@swox.se>
20012
20013	* mpf/dump.c, mpz/dump.c, mpn/generic/dump.c,
20014	mpn/generic/divrem.c, mpn/generic/divrem_1n.c,
20015	mpn/generic/divrem_2.c, mpn/generic/divrem_newt.c,
20016	mpn/generic/mul.c, mpn/generic/mul_basecase.c,
20017	mpn/generic/mul_n.c, mpn/generic/sqr_basecase.c,
20018	mpn/generic/udiv_w_sdiv.c: Add comment that internal functions are
20019	changeable and shouldn't be used directly.
20020
20021	* mpq/div.c: Use DIVIDE_BY_ZERO (previously didn't get an
20022	exception on zero divisor).
20023
20024	* mpf/tests/t-get_d.c, mpz/tests/reuse.c: Add K&R function
20025	definitions.
20026	* mpz/tests/t-2exp.c: Don't use ANSI-ism 2ul.
20027
20028	* gmp.texi (Installing MP): Build problem notes for GSYM_PREFIX
20029	and ranlib on native SunOS.
20030	Particular systems notes about AIX and HPPA shared libraries
20031	disabled.
20032	(MP Basics): Add that undocumented things shouldn't be used.
20033	(Introduction to MP): Add to CPUs listed.
20034
20035	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Don't depend on C
20036	having "void".
20037
200382000-04-13  Linus Nordberg  <linus@swox.se>
20039
20040	* mpn/pa64/udiv_qrnnd.c (__udiv_qrnnd64): Add K&R function
20041	definition.
20042
20043	* configure.in: Disable shared libraries for hppa*.
20044	(mips-sgi-irix6.*): Fix flags for 64-bit gcc.
20045	(hppa2.0*-*-*): Prefer c89 to cc.
20046	* configure: Regenerate.
20047
20048	* gmp.h (gmp_randalg_t): Remove comma after last element.
20049
20050	* tests/rand/t-rand.c: Add copyright notice.
20051
200522000-04-13  Kevin Ryde  <kevin@swox.se>
20053
20054	* mpn/generic/mul_n.c, mpn/generic/gcdext.c, mpz/nextprime.c,
20055	mpz/remove.c, mpz/root.c: Add K&R function definitions.
20056	* mpz/rrandomb.c: Fix typo in K&R part.
20057	* stack-alloc.c: Add K&R style function pointer declarations.
20058
20059	* mpz/root.c: Use SQRT_OF_NEGATIVE on even roots of negatives.
20060	Use DIVIDE_BY_ZERO on a "zero'th" root.
20061
20062	* configure: Regenerate with autoconf backpatched to fix --srcdir
20063	absolute path wildcards that bash doesn't like, change by Linus.
20064
20065	* gmp.texi (Integer Arithmetic): Document mpz_nextprime.
20066	(Miscellaneous Integer Functions): Fix mpz_fits_* formatting.
20067	(Installing MP): Comment-out CC and CFLAGS description.
20068
200692000-04-13  Linus Nordberg  <linus@swox.se>
20070
20071	* rand.c (gmp_randinit): Don't combine va_alist with ordinary
20072	arguments for non STDC.
20073
200742000-04-13  Torbjorn Granlund  <tege@swox.com>
20075
20076	* mpz/nextprime.c: Use proper names of new random types and functions.
20077
20078	* mpz/rrandomb.c: New file.
20079	* mpz/Makefile.am: List it.
20080	* mpz/Makefile.in: Regenerate.
20081	* Makefile.am: Here too.
20082	* Makefile.in: Regenerate.
20083	* gmp.h: Declare mpz_rrandomb.
20084
200852000-04-12  Linus Nordberg  <linus@swox.se>
20086
20087	* Makefile.am, demos/Makefile.am, mpbsd/Makefile.am,
20088	mpbsd/tests/Makefile.am, mpf/Makefile.am, mpf/tests/Makefile.am,
20089	mpn/Makefile.am, mpq/Makefile.am, mpq/tests/Makefile.am,
20090	mpz/Makefile.am, mpz/tests/Makefile.am, tests/Makefile.am,
20091	tests/rand/Makefile.am (AUTOMAKE_OPTIONS): Add 'no-dependencies'.
20092
20093	* Makefile.in, demos/Makefile.in, mpbsd/Makefile.in,
20094	mpbsd/tests/Makefile.in, mpf/Makefile.in, mpf/tests/Makefile.in,
20095	mpn/Makefile.in, mpq/Makefile.in, mpq/tests/Makefile.in,
20096	mpz/Makefile.in, mpz/tests/Makefile.in, tests/Makefile.in,
20097	tests/rand/Makefile.in: Regenerate.
20098
200992000-04-12  Linus Nordberg  <linus@swox.se>
20100
20101	* randlc.c (gmp_randinit_lc): Disable function.
20102	* gmp.texi (Random State Initialization): Remove gmp_randinit_lc.
20103
20104	* acinclude.m4 (GMP_CHECK_CC_64BIT): Compiling an empty main
20105	successfully with `-n32' will have to suffice on irix6.
20106	* aclocal.m4: Regenerate.
20107
20108	* configure.in (sparc): Don't pass -D_LONG_LONG_LIMB to compiler.
20109	(mips-sgi-irix6.*): Use compiler option `-n32' rather than `-64'
20110	for 64-bit `cc'.  Add options for gcc.
20111	* configure: Regenerate.
20112
20113	* mpf/urandomb.c (mpf_urandomb): Add third parameter 'nbits'.  If
20114	'nbits' doesn't make even limbs, shift up result before
20115	normalizing.
20116
20117	* gmp.h (mpf_urandomb): Add parameter to prototype.
20118
20119	* mpf/urandom.c: Rename file to ...
20120	* mpf/urandomb.c: ... this.
20121	* Makefile.am (MPF_OBJECTS): Change urandom.lo --> urandomb.lo.
20122	* Makefile.in: Regenerate.
20123	* mpf/Makefile.am (libmpf_la_SOURCES): Change urandom.c --> urandomb.c.
20124	* mpf/Makefile.in: Regenerate.
20125
20126	* config.in: Regenerate for HAVE_DECL_OPTARG.
20127
20128	* randraw.c (_gmp_rand): Fix bug with _LONG_LONG_LIMB.
20129	(lc): Change return type.
20130	Use one temporary storage instead of two.
20131	Handle seed of size 0.
20132	Avoid modulus operation in some cases.
20133	Abort if M is not a power of 2.
20134	Fix bug with 64-bit limbs.
20135	Fix bug with small seed, small A and large M.
20136
20137	* tests/rand/gen.c (main): Include gmp.h.  Remove macros MIN, MAX.  Add
20138	option '-q'.  Don't demand argument N.  Change parameters in call
20139	to mpf_urandomb.
20140
20141	* tests/rand/t-rand.c: New file for testing random number generation.
20142
20143	* tests/rand/Makefile.am: Run t-rand for 'make check'.
20144	(test, bigtest): Rename to manual-test, manual-bigtest.
20145	* tests/rand/Makefile.in: Regenerate.
20146
201472000-04-12  Kevin Ryde  <kevin@swox.se>
20148
20149	* gmp-impl.h: Include config.h before TMP_ALLOC, so
20150	--disable-alloca works.
20151
20152	* mpbsd/Makefile.am: Don't recompile top-level sources here.
20153	* Makefile.am (libmp_la_DEPENDENCIES): Put objects here instead,
20154	add errno.lo and stack-alloc.lo.
20155
20156	* mpn/asm-defs.m4: Add a test and message for the unsuitable SunOS m4.
20157	* gmp.texi (Installing MP): Update note on SunOS m4 failure.
20158
20159	* acconfig.h: Add copyright notice using @TOP@.
20160
20161	* stack-alloc.c: Use _mp_allocate_func, not malloc.
20162	* gmp.texi (Installing MP): Note this under --disable-alloca.
20163
20164	* gmp.texi (Comparison Functions): mpz_cmp_abs => mpz_cmpabs.
20165	(Integer Arithmetic): mpz_prime_p not yet implemented, comment out.
20166	(Float Arithmetic): mpf_pow_ui now implemented, uncomment-out.
20167	(Miscellaneous Float Functions): Add mpf_ceil, mpf_floor, mpf_trunc.
20168	(Low-level Functions): Add mpn_random2, with mpn_random.
20169
20170	* mpn/m68k/mc68020/udiv.S: Rename from udiv.s.
20171	* mpn/m68k/mc68020/umul.S: Ditto.
20172
20173	* mpn/alpha/umul.asm: Rename from umul.s, remove .file and
20174	compiler identifiers.
20175
20176	* mpn/powerpc32/syntax.h: Removed, no longer used.
20177
20178	* mpn/a29k/udiv.s: Remove .file and compiler identifiers.
20179	* mpn/a29k/umul.s: Ditto.
20180
20181	* mpn/tests/ref.c: Use WANT_ASSERT.
20182	* mpn/tests/ref.h: Use _PROTO.
20183
20184	* mpbsd/configure.in: Removed, no longer required.
20185
20186	* mpf/div.c: Use DIVIDE_BY_ZERO.
20187	* mpf/div_ui.c: Ditto.
20188	* mpf/ui_div.c: Ditto.
20189	* mpq/inv.c: Ditto.
20190	* mpf/sqrt.c: Use SQRT_OF_NEGATIVE.
20191	* mpz/sqrt.c: Ditto.
20192	* mpz/sqrtrem.c: Ditto.
20193
20194	* gmp-impl.h (GMP_ERROR,SQRT_OF_NEGATIVE): New macros.
20195	(DIVIDE_BY_ZERO): Use GMP_ERROR.
20196	(__mp_bases): #define to __MPN(mp_bases).
20197
201982000-04-11  Linus Nordberg  <linus@swox.se>
20199
20200	* tests/rand/stat.c (main): Initialize `l1runs' at declaration.
20201
202022000-04-11  Kevin Ryde  <kevin@swox.se>
20203
20204	* mpz/fib_ui.c: Add K&R function definitions.
20205
20206	* mpbsd/tests/Makefile.am (TESTS): Add a dummy test to avoid a
20207	shell problem with an empty "for tst in $(TESTS) ; ...".
20208	* mpbsd/tests/dummy.c: New file.
20209
202102000-04-10  Torbjorn Granlund  <tege@swox.com>
20211
20212	* mpz/bin_uiui.c: Delete several unused variables.
20213	Add copyright notice.
20214	* mpz/bin_ui.c: Add copyright notice.
20215
20216	* longlong.h: Declare __count_leading_zeros for alpha.
20217
202182000-04-10  Linus Nordberg  <linus@swox.se>
20219
20220	* rand.c (gmp_randinit): Change parameter list to (rstate, alg, ...).
20221	* gmp.h: Change prototype accordingly.
20222	* mpz/pprime_p.c (millerrabin): Change call accordingly.
20223
20224	* configure.in: Check for `optarg'.
20225	* configure: Regenerate.
20226
20227	* mpn/Makefile.am: Remove incorrect comment.
20228	* mpn/Makefile.in: Regenerate.
20229
20230	* gmp.h: Rename most of the random number functions, structs and
20231	  some of the struct members.
20232	* rand.c (gmp_randinit): Likewise.
20233	* randclr.c (gmp_randclear): Likewise.
20234	* randlc.c (gmp_randinit_lc): Likewise.
20235	* randlc2x.c (gmp_randinit_lc_2exp): Likewise.
20236	* randraw.c (lc): Likewise.
20237	(_gmp_rand_getraw): Likewise.
20238	* randsd.c (gmp_randseed): Likewise.
20239	* randsdui.c (gmp_randseed_ui): Likewise.
20240	* gmp.texi: Likewise.
20241
20242	* gmp.texi: Use three hyphens for a dash.
20243	(Low-level Functions): Remove documentation for gmp_rand_getraw.
20244	(Random Number Functions): Add info on where to find documentation
20245	on the random number functions.
20246
20247	* tests/rand/Makefile.am (test, bigtest): Quote argument to grep.
20248	* tests/rand/Makefile.in: Regenerate.
20249
20250	* tests/rand/gen.c: Declare optarg, optind, opterr if not already
20251	declared.
20252	(main): Use new names for the random stuff.
20253	(main): Don't use strtoul() if we don't have it.  Use strtol()
20254	instead, if we have it.  Otherwise, use atoi().
20255	(main): Use srandom/srandomdev for __FreeBSD__ only.
20256	(main): Use new parameter order to gmp_randinit().
20257
20258	* tests/rand/stat.c: Declare optarg, optind, opterr if not already
20259	declared.
20260
202612000-04-10  Torbjorn Granlund  <tege@swox.com>
20262
20263	* mpz/pprime_p.c: Pass 0L for mpz_scan1.  mpz_mmod => mpz_mod.
20264	(millerrabin): Use new random interface.
20265	(millerrabin): ... and don't forget to call gmp_randclear.
20266
20267	* mpz/nextprime.c: New file.
20268	* gmp.h: Declare mpz_nextprime.
20269	* mpz/Makefile.am: List nextprime.c.
20270	* mpz/Makefile.in: Regenerate.
20271	* Makefile.am: List mpz/nextprime.lo.
20272	* Makefile.in: Regenerate.
20273
202742000-04-10  Kevin Ryde  <kevin@swox.se>
20275
20276	* move-if-change, mpz/tests/move-if-change, mpq/tests/move-if-change,
20277	mpf/tests/move-if-change: Remove, no longer used.
20278
20279	* Makefile.am (SUBDIRS): Add tests, demos, mpbsd.
20280	(libmp.la): New target, conditional on WANT_MPBSD.
20281	(libgmp_la_LIBADD): Add -lm.
20282	(AUTOMAKE_OPTIONS): Add check-news.
20283	(include_HEADERS): Setup to install gmp.h and possibly mp.h.
20284	(DISTCLEANFILES): Add generated files.
20285	(check): Remove explicit target (now uses check-recursive).
20286
20287	* configure.in: Use AM_CONFIG_HEADER.
20288	Add --enable-mpbsd setting automake conditional WANT_MPBSD.
20289	Output demos/Makefile, mpbsd/Makefile and mpbsd/tests/Makefile.
20290
20291	* mpz/Makefile.am: Add SUBDIRS=tests, shorten INCLUDES since now
20292	using AM_CONFIG_HEADER.
20293	* mpq/Makefile.am: Ditto.
20294	* mpf/Makefile.am: Ditto, and add DISTCLEANFILES.
20295	* mpn/Makefile.am: Shorten INCLUDES, amend some comments.
20296	* mpz/tests/Makefile.am: Use TESTS and $(top_builddir).
20297	* mpf/tests/Makefile.am: Ditto.
20298	* mpq/tests/Makefile.am: Ditto.
20299	* demos/Makefile.am: New file.
20300
20301	* mpbsd/Makefile.am: New file, derived from old mpbsd/Makefile.in.
20302	* mpbsd/Makefile.in: Now generated from Makefile.am.
20303	* mpbsd/realloc.c: Removed, use mpz/realloc.c instead.
20304	* mpbsd/tests/Makefile.am: New file.
20305	* mpbsd/tests/Makefile.in: New file, generated from Makefile.am.
20306	* mpbsd/tests/allfuns.c: New file.
20307
20308	* gmp.texi (Top): Use @ifnottex, to help makeinfo --html.
20309	(Installing MP): Describe --enable-mpbsd and demo programs.
20310
20311	* tests/rand/statlib.c: mpz_cmp_abs => mpz_cmpabs.
20312
20313	* tests/rand/Makefile.am (LDADD): Don't need -lm (now in libgmp.la).
20314	(EXTRA_PROGRAMS): Not noinst_PROGRAMS.
20315	(INCLUDES): Shorten to -I$(top_srcdir) now using AM_CONFIG_HEADER.
20316
203172000-04-09  Torbjorn Granlund  <tege@swox.com>
20318
20319	* mpz/urandomm.c: Get type of count right.
20320	Simplify computation of nbits.
20321
203222000-04-08  Torbjorn Granlund  <tege@swox.com>
20323
20324	* mpz/urandomb.c: Fix reallocation condition.
20325	Simplify size computation.
20326
203272000-04-08  Linus Nordberg  <linus@swox.se>
20328
20329	* acinclude.m4 (GMP_CHECK_CC_64BIT): Add special handling for
20330	HPUX.
20331	(GMP_CHECK_ASM_W32): Ditto.
20332	* aclocal.m4: Regenerate.
20333
20334	* mpn/Makefile.am: Use $(CCAS) for assembling.
20335	(.asm.obj): Add rule.
20336	* mpn/Makefile.in: Regenerate.
20337
20338	* gmp.texi (Miscellaneous Integer Functions): Fix typos.
20339
20340	* configure.in: Never pass `-h' to grep.
20341	(mips-sgi-irix6.[2-9]*): Try to find 64-bit compiler.
20342	(hppa1.0*-*-*): New flag for cc.
20343	(hppa2.0*-*-*): Try to find 64-bit compiler.  Chose path, set
20344	CCAS.
20345	* configure: Regenerate.
20346
203472000-04-08  Torbjorn Granlund  <tege@swox.com>
20348
20349	* mpz/bin_ui.c: Don't depend on ANSI C features.
20350	* mpz/bin_uiui.c: Likewise.
20351
20352	* Makefile.am (MPZ_OBJECTS): mpz/cmp_abs* => mpz/cmpabs*.
20353	(MPQ_OBJECTS): Add mpq/set_d.lo.
20354	(MPZ_OBJECTS): Add mpz/fits*.lo.
20355	* Makefile.in: Regenerate.
20356
20357	* mpz/cmpabs.c: New name for mpz/cmp_abs.c.
20358	* mpz/cmpabs_ui.c: New name for mpz/cmp_abs_ui.c.
20359	* mpz/Makefile.am: Corresponding changes.
20360	* mpz/Makefile.in: Regenerate.
20361	* gmp.h: mpz_cmp_abs* => mpz_cmpabs*.
20362
20363	* mpz/addmul_ui.c (mpn_neg1): Don't depend on ANSI C features.
20364
20365	* mpz/invert.c: Use TMP_MARK since we invoke MPZ_TMP_INIT.
20366
20367	* gmp.h (mpq_set_d): Declare correctly.
20368	(mpz_root): Use _PROTO.
20369	(mpz_remove): Use _PROTO.
20370	(mpf_pow_iu): Use _PROTO.
20371
20372	* mpn/asm-defs.m4 (MPN_PREFIX): Revert previous change.
20373	* gmp.h (__MPN): Revert previous change.
20374
20375	* mpz/perfpow.c: De-ANSI-fy.  Add copyright notice.
20376
20377	* mpz/set_d.c: Misc cleanups.
20378
20379	* mpq/set_d: New file.
20380	* gmp.h: Declare mpq_set_d.
20381	* mpq/Makefile.am: List set_d.c.
20382	* mpq/Makefile.in: Regenerate.
20383
203842000-04-07  Torbjorn Granlund  <tege@swox.com>
20385
20386	* mpz/fits_sint_p.c: New file.
20387	* mpz/fits_slong_p.c: New file.
20388	* mpz/fits_sshort_p.c: New file.
20389	* mpz/fits_uint_p.c: New file.
20390	* mpz/fits_ulong_p.c: New file.
20391	* mpz/fits_ushort_p.c: New file.
20392	* gmp.h: Declare mpz_fits_*.
20393	* mpz/Makefile.am: List fits_* files.
20394	* mpz/Makefile.in: Regenerate.
20395
203962000-04-06  Kevin Ryde  <kevin@swox.se>
20397
20398	* gmp.texi (Installing MP): Add known build problem SunOS 4.1.4 m4
20399	failure.
20400
20401	* mpn/x86/pentium/gmp-mparam.h: Tune thresholds.
20402	* mpn/x86/p6/gmp-mparam.h: Ditto.
20403	* mpn/x86/k6/gmp-mparam.h: Tune thresholds, add UMUL_TIME, UDIV_TIME.
20404	* mpn/x86/k7/gmp-mparam.h: Tune thresholds, amend UMUL_TIME.
20405
20406	* mpn/generic/mul_n.c (mpn_kara_mul_n): Add an ASSERT.
20407	(mpn_kara_sqr_n): Add an ASSERT, use KARATSUBA_SQR_THRESHOLD.
20408	(mpn_toom3_sqr_n): Eliminate second evaluate3.
20409
20410	* gmp-impl.h (mpn_com_n,MPN_LOGOPS_N_INLINE): Don't allow size==0.
20411	(tune_mul_threshold,tune_sqr_threshold): Conditionalize
20412	declarations on TUNE_PROGRAM_BUILD.
20413
20414	* mpn/generic/sqr_basecase.c: Add an assert.
20415
204162000-04-05  Torbjorn Granlund  <tege@swox.com>
20417
20418	* gmp.h, mpn/asm-defs.m4: List the same functions for __MPN, but
20419	leave some commented out.
20420
20421	* gmp-impl.h (MPN_LOGOPS_N_INLINE): Optimize.
20422	(mpn_com_n): Optimize.
20423
20424	* gmp.h (__MPN): Make it use __gmpn instead of __mpn for consistency.
20425	* mpn/asm-defs.m4 (MPN_PREFIX): Likewise.
20426
20427	* gmp.h (GMP_ERROR_ALLOCATE): New errcode.
20428
20429	* gmp-impl.h (MPN_MUL_N_RECURSE): Delete.
20430	(MPN_SQR_RECURSE): Delete.
20431
20432	* gmp-impl.h (TARGET_REGISTER_STARVED): New define.
20433
20434	* gmp-impl.h (mpn_kara_sqr_n): Remap with __MPN.
20435	(mpn_toom3_sqr_n): Likewise.
20436	(mpn_kara_mul_n): Likewise.
20437	(mpn_toom3_mul_n): Likewise.
20438	(mpn_reciprocal): Likewise.
20439
20440	* gmp-impl.h (__gmpn_mul_n): Remove declaration.
20441	(__gmpn_sqr): Likewise.
20442	* gmp.h (mpn_sqr_n): Declare/remap.
20443	* mpn/generic/mul.c (mpn_sqr_n): New name for mpn_sqr.
20444
20445	* gmp.h (mpn_udiv_w_sdiv): Move __MPN remap from here...
20446	* gmp-impl.h: ...to here.
20447
204482000-04-05  Linus Nordberg  <linus@swox.se>
20449
20450	* gmp.texi (Top): Add `Random Number Functions' to menu.
20451	(Introduction to MP): Fix typo.
20452	(MP Basics): Create menu for all sections.  Move `Random Number
20453	Functions' to its own chapter.  Add nodes for all sections.
20454	(Function Classes): Mention random generation functions under
20455	miscellaneous.
20456	(Miscellaneous Integer Functions): Update mpz_urandomb,
20457	mpz_urandomm.
20458	(Low-level Functions): Remove mpn_rawrandom.
20459	(Random State Initialization): Update.
20460
20461	* mpf/urandom.c (mpf_urandomb): Remove SIZE parameter.  Normalize
20462	result correctly.
20463
20464	* gmp.h (mpf_urandomb): Remove SIZE parameter.
20465
20466	* randraw.c (gmp_rand_getraw): Handle the case where (1) the LC
20467	scheme doesn't generate even limbs and (2) more than one LC
20468	invocation is necessary to produce the requested number of bits.
20469
204702000-04-05  Torbjorn Granlund  <tege@swox.com>
20471
20472	* mpn/generic/mul_n.c (INVERSE_3): New name for THIRD, define for
20473	any BITS_PER_MP_LIMB.
20474	(MP_LIMB_T_MAX): New.
20475	(mpn_divexact3_n): Remove.
20476	(interpolate3): Use mpn_divexact_by3 instead of mpn_divexact3_n.
20477
204782000-04-05  Kevin Ryde  <kevin@swox.se>
20479
20480	* gmp-impl.h (KARATSUBA_MUL_THRESHOLD<2): Remove cpp test.
20481	(tune_mul_threshold,tune_sqr_threshold): Add declarations, used in
20482	development only.
20483
20484	* mpn/x86/k7/sqr_basecase.asm: New file, only a copy of k6 for now.
20485
204862000-04-04  Torbjorn Granlund  <tege@swox.com>
20487
20488	* gmp-impl.h (TOOM3_MUL_THRESHOLD): Provide default.
20489	(TOOM3_SQR_THRESHOLD): Provide default.
20490
20491	* mpn/generic/mul_n.c: Rewrite (mostly by Robert Harley).
20492	* mpn/generic/mul.c: Rewrite (mostly by Robert Harley).
20493
20494	* configure.in (sparcv9 64-bit OS): Set extra_functions.
20495
204962000-04-04  Linus Nordberg  <linus@swox.se>
20497
20498	* mpn/generic/rawrandom.c: Remove file and replace with randraw.c
20499	on top level.
20500	(mpn_rawrandom): Rename to gmp_rand_getraw.
20501
20502	* randraw.c: New file; essentially a copy of
20503	mpn/generic/rawrandom.c.
20504	(gmp_rand_getraw): New function (formerly known as mpn_rawrandom).
20505
20506	* mpz/urandomb.c (mpz_urandomb): Change mpn_rawrandom -->
20507	gmp_rand_getraw.
20508	* mpz/urandomm.c (mpz_urandomb): Ditto.
20509	* mpf/urandom.c (mpf_urandomb): Ditto.
20510
20511	* gmp.h (gmp_rand_getraw): Add function prototype.
20512	(mpn_rawrandom): Remove function prototype.
20513
20514	* Makefile.am (libgmp_la_SOURCES): Add randraw.c.
20515	* Makefile.in: Regenerate.
20516
20517	* configure.in (gmp_mpn_functions): Remove rawrandom.
20518	* configure: Regenerate.
20519
205202000-04-04  Linus Nordberg  <linus@swox.se>
20521
20522	* gmp.h (GMP_ERROR enum): Remove comma after last enumeration
20523	since the AIX compiler (xlc) doesn't like that.
20524
20525	* randlc.c (gmp_rand_init_lc): Allocate enough space for seed to
20526	hold any upcoming seed.
20527	* randlc2x.c (gmp_rand_init_lc_2exp): Likewise.
20528
20529	* mpn/generic/rawrandom.c: Remove debugging code.
20530	(mpn_lc): Don't reallocate seed.
20531
20532	* mpz/urandomm.c (mpz_urandomm): Implement function.
20533
20534	* mpz/urandomb.c (mpz_urandomb): Fix typo in function definition.
20535
205362000-04-04  Kevin Ryde  <kevin@swox.se>
20537
20538	* make.bat: Removed (no longer works, no longer supported).
20539	* mpn/msdos/asm-syntax.h: Removed (was used only by make.bat).
20540
205412000-04-03  Torbjorn Granlund  <tege@swox.com>
20542
20543	* mpn/generic/brandom.c: New file, replacing random2.
20544
205452000-04-02  Torbjorn Granlund  <tege@swox.com>
20546
20547	* mpn/sparc32/v9/submul_1.asm: Change some carry-form instructions
20548	into their plain counterparts.
20549
20550	* mpn/sparc64/copyi.asm: Avoid executing ALIGN.
20551
20552	* mpn/sparc64/mul_1.asm: Handle overlap of rp/sp.
20553	* mpn/sparc64/addmul_1.asm: Likewise.
20554	* mpn/sparc64/submul_1.asm: Likewise.
20555
205562000-04-01  Linus Nordberg  <linus@swox.se>
20557
20558	* gmp.h: Fix function prototypes for randomization functions.
20559	(__gmp_rand_lc_scheme_struct): Replace `m' with `m2exp'. Remove
20560	unused `bits'.
20561	(__gmp_rand_data_lc): Add `m2exp' as another way of representing
20562	the modulus.
20563	(__gmp_rand_state_struct): Remove unused `size'.
20564
20565	* rand.c (__gmp_rand_scheme): Use better multipliers.  Remove test
20566	schemes.  Replace `m' with `m2exp'.
20567	(gmp_rand_init): Change parameters and return type.  Use `m2exp'
20568	instead of `m'.  Set `gmp_errno' on error.  Disable BBS algorithm.
20569
20570	* randlc.c (gmp_rand_init_lc): Don't use malloc().  Change
20571	parameters.
20572
20573	* randclr.c (gmp_rand_clear): Don't use free().  Disable BBS
20574	algorithm.  Set `gmp_errno' on error.
20575
20576	* randlc2x.c (gmp_rand_init_lc_2exp): New function.
20577	* randsd.c (gmp_rand_seed): New function.
20578	* randsdui.c (gmp_rand_seed_ui): New function.
20579	* randlcui.c: Remove unused file.
20580
20581	* mpn/generic/rawrandom.c (mpn_rawrandom): Rewrite.
20582	(mpn_lc): New static function.
20583
20584	* mpz/urandomb.c (mpz_urandomb): Use ABSIZ() instead of SIZ() for
20585	determining size of ROP.
20586
20587	* mpf/urandom.c (mpf_urandomb): Add third parameter, nbits.  (Not
20588	used yet!)
20589	Change parameter order to mpn_rawrandom().
20590
20591	* Makefile.am (libgmp_la_SOURCES): Add errno.c, randlc2x.c,
20592	randsd.c, randsdui.c.  Remove randui.c.
20593	(MPZ_OBJECTS): Rename urandom.lo --> urandomb.lo.  Add urandomm.lo.
20594	* Makefile.in: Regenerate.
20595
20596	* mpz/Makefile.am (libmpz_la_SOURCES): Change urandom.c -->
20597	urandomb.c.  Add urandomm.c.
20598	* mpz/Makefile.in: Regenerate.
20599
20600	* tests/rand/Makefile.am (noinst_PROGRAMS): Change findcl --> findlc.
20601	Add gen.static.
20602	* tests/rand/Makefile.in: Regenerate.
20603
20604	* tests/rand/gen.c (main): Add mpz_urandomm.  Add command line options
20605	`-C', `-m', extend `-a'.  Use *mp*_*rand*() with new parameters.  Call
20606	gmp_rand_seed().
20607
206082000-04-01  Kevin Ryde  <kevin@swox.se>
20609
20610	* acinclude.m4 (GMP_CHECK_ASM_DATA): Plain .data for hpux.
20611	* configure.in (CCAS): No CFLAGS, they're added when it's used.
20612	(CONFIG_SRCDIR): New define for config.m4.
20613	* mpn/sparc64/addmul_1.asm: Use it for an include().
20614	* mpn/sparc64/submul_1.asm: Ditto.
20615	* mpn/sparc64/mul_1.asm: Ditto.
20616
206172000-03-31  Linus Nordberg  <linus@swox.se>
20618
20619	* mpz/urandom.c: Rename to...
20620	* mpz/urandomb.c: ...this.
20621
20622	* mpz/urandomb.c (mpz_urandomb): Change operand order in call to
20623	mpn_rawrandom().  Use ABSIZ() instead of SIZ() when checking size
20624	of ROP.
20625
20626	* mpz/urandomm.c: New file.
20627
206282000-03-31  Kevin Ryde  <kevin@swox.se>
20629
20630	* acinclude.m4 (GMP_CHECK_ASM_MMX): Give a warning when mmx code
20631	will be omitted.
20632
206332000-03-30  Torbjorn Granlund  <tege@swox.com>
20634
20635	* mpn/sparc64/mul_1h.asm: New file.
20636	* mpn/sparc64/addmul_1h.asm: New file.
20637	* mpn/sparc64/submul_1h.asm: New file.
20638	* mpn/sparc64/mul_1.asm: Rewrite.
20639	* mpn/sparc64/addmul_1.asm: Rewrite.
20640	* mpn/sparc64/submul_1.asm: Rewrite.
20641
206422000-03-28  Torbjorn Granlund  <tege@swox.com>
20643
20644	* mpn/sparc32/v9/mul_1.asm: Fix typo in branch prediction.
20645	* mpn/sparc32/v9/addmul_1.asm: Likewise.
20646	* mpn/sparc32/v9/submul_1.asm: Likewise.
20647
206482000-03-25  Kevin Ryde  <kevin@swox.se>
20649
20650	* mpn/lisp/gmpasm-mode.el: Fix some comment detection, use custom,
20651	fontify more keywords, turn into a standalone mode.
20652
20653	* stamp-vti: New file, generated together with version.texi.
20654
20655	* acinclude.m4 (GMP_VERSION,GMP_HEADER_GETVAL): New macros.
20656	* configure.in (AM_INIT_AUTOMAKE): Use GMP_VERSION.
20657
206582000-03-24  Kevin Ryde  <kevin@swox.se>
20659
20660	* INSTALL: Updates for new configure system.
20661
20662	* configure.in: Add gmp_optcflags_gcc for the x86s, setting -mcpu
20663	and -march.
20664
206652000-03-23  Torbjorn Granlund  <tege@swox.com>
20666
20667	* demos/pexpr.c (mpz_eval_expr): Properly initialize rhs/lhs
20668	for ROOT.
20669
206702000-03-23  Kevin Ryde  <kevin@swox.se>
20671
20672	* config.guess (i?86:*:*:*): Use uname -m if detection program fails.
20673
20674	* mpn/x86/README: Remove remarks on the now implemented MMX shifts.
20675	* mpn/x86/k6/README: Add speed of mpn_divexact_by3, update mpn_mul_1.
20676
20677	* gmp.texi (Installing MP): Corrections to target CPUs.
20678
20679	* version.c: Use VERSION from config.h, add copyright comment,
20680	restore "const" somehow lost.
20681
20682	* configure.in (a29k*-*-*): Fix directory name.
20683
206842000-03-22  Torbjorn Granlund  <tege@swox.com>
20685
20686	* demos/pexpr.c (op_t): Add ROOT.
20687	(fns): Add ROOT.
20688	(mpz_eval_expr): Add ROOT.
20689
20690	* mpz/root.c: Handle roots of negative numbers.
20691	Fix other border cases.
20692	Fix rare memory leakage.
20693
20694	* errno.c: New file.
20695
206962000-03-21  Torbjorn Granlund  <tege@swox.com>
20697
20698	* gmp.h (error number enum): New anonymous enum.
20699	(gmp_errno): New.
20700
20701	* gmp.h (__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR): Bump for GMP 3.0.
20702
207032000-03-20  Torbjorn Granlund  <tege@swox.com>
20704
20705	* mpn/alpha/unicos.m4 (FLOAT64): New define.
20706	* mpn/alpha/default.m4 (FLOAT64): New define.
20707	* mpn/alpha/invert_limb.asm (C36): Use FLOAT64.
20708
207092000-03-21  Kevin Ryde  <kevin@swox.se>
20710
20711	* mpn/x86/k6/diveby3.asm: Tiny speedup.
20712
20713	* acinclude.m4 (GMP_CHECK_ASM_SHLDL_CL): New macro.
20714	* configure.in: Use it, set WANT_SHLDL_CL in config.m4.
20715	* mpn/x86/x86-defs.m4 (shldl,shrdl,shldw,shrdw): New macros, using
20716	WANT_SHLDL_CL.
20717	* mpn/x86/k6/mmx/lshift.asm: Use shldl macro.
20718	* mpn/x86/k7/mmx/lshift.asm: Ditto.
20719	* mpn/x86/pentium/mmx/lshift.asm: Ditto.
20720	* mpn/x86/k6/mmx/rshift.asm: Use shrdl macro.
20721	* mpn/x86/k7/mmx/rshift.asm: Ditto.
20722	* mpn/x86/pentium/mmx/rshift.asm: Ditto.
20723	* mpn/x86/README.family: Add a note about this.
20724
207252000-03-20  Linus Nordberg  <linus@swox.se>
20726
20727	* mpn/generic/rawrandom.c (mpn_rawrandom): Handle seed value of 0
20728	correctly.
20729
20730	* configure.in: Fix detection of alpha flavour.
20731	Set compiler options for `sparcv8'.
20732	* configure: Regenerate.
20733
20734	* rand.c (__gmp_rand_scheme): Clean up some.  Use slightly better
20735	multipliers.
20736
20737	* configure.in (AC_OUTPUT): Add tests/Makefile and
20738	tests/rand/Makefile.
20739
20740	* acinclude.m4 (AC_CANONICAL_BUILD): Define to
20741	`_AC_CANONICAL_BUILD' to deal with incompabilities between
20742	Autoconf and Libtool.
20743	(AC_CHECK_TOOL_PREFIX): Likewise.
20744
20745	* Makefile.am (EXTRA_DIST): Add directory `tests'.
20746
20747	* mkinstalldirs: Update (Automake 2000-03-17).
20748	* ltconfig: Update (Libtool 2000-03-17).
20749	* ltmain.sh: Ditto.
20750
20751	* configure: Regenerate with new autoconf/-make/libtool suite.
20752	* aclocal.m4: Ditto.
20753	* config.in: Ditto.
20754	* all Makefile.in's: Ditto.
20755
207562000-03-20  Torbjorn Granlund  <tege@swox.com>
20757
20758	* demos/pexpr.c (main): Don't allow `-N' for base, require `-bN'.
20759
20760	* mpn/alpha/unicos.m4 (cvttqc): New define.
20761	* mpn/alpha/invert_limb.asm: Use new define for cvttqc.
20762
207632000-03-19  Kevin Ryde  <kevin@swox.se>
20764
20765	* mpn/x86/k6/sqr_basecase.asm: Tiny amendments for 3x3 case.
20766
20767	* gmp.texi: Use @include version.texi.
20768	Use @email and @uref.
20769	(Installing MP): Rewrite for new configure.
20770	(Low-level Functions): Add mpn_divexact_by3.
20771
20772	* configure.in (--enable-alloca): New option.
20773	* acconfig.h (USE_STACK_ALLOC): For --disable-alloca.
20774
207752000-03-18  Kent Boortz  <kent@swox.com>
20776
20777	* macos: New directory with macos port files.
20778
207792000-03-17  Torbjorn Granlund  <tege@swox.com>
20780
20781	* gmp-impl.h (union ieee_double_extract): Check _CRAYMPP.
20782
20783	* mpn/asm-defs.m4 (invert_normalized_limb): Define.
20784
20785	* mpn/alpha: Translate `.s' files to `.asm'.
20786
20787	* configure: Regenerate.
20788
20789	* mpn/alpha/invert_limb.asm: Replace dash in file name with underscore.
20790	* configure.in: Corresponding change.
20791
20792	* configure.in: Assign special "path" for alphaev6.
20793
20794	* mpn/alpha/unicos.m4: New file.
20795	* configure.in (alpha*-cray-unicos*): [This part of the change
20796	commited 2000-03-13 by linus]
20797	* mpn/alpha/default.m4: New file.
20798	* configure.in (alpha*-*-*): Use it.
20799
208002000-03-17  Kevin Ryde  <kevin@swox.se>
20801
20802	* mpn/x86/pentium/rshift.S: Use plain rcrl (not rcrl $1) for
20803	shift-by-1 case, significant speedup.
20804	* mpn/x86/pentium/README: Add shift-by-1 speed.
20805
208062000-03-16  Torbjorn Granlund  <tege@swox.com>
20807
20808	* config.guess: Handle Cray T3D/E.
20809
208102000-03-15  Kevin Ryde  <kevin@swox.se>
20811
20812	* mpn/generic/diveby3.c: New file.
20813	* mpn/x86/diveby3.asm: New file.
20814	* mpn/x86/k6/diveby3.asm: New file.
20815	* gmp.h (mpn_divexact_by3): Prototype and define.
20816	* mpn/asm-defs.m4: define_mpn(divexact_by3).
20817	* configure.in (gmp_mpn_functions): Add diveby3.
20818
20819	* mpn/x86/pentium/sqr_basecase.asm: A few better addressing modes.
20820
20821	* configure.in: Add AC_C_STRINGIZE and AC_CHECK_TYPES((void)).
20822	* gmp-impl.h (ASSERT): Use them.
20823
20824	* mpn/x86/k7/mmx/lshift.asm: New file.
20825	* mpn/x86/k7/mmx/rshift.asm: Rewrite simple loop and return value
20826	handling, add some pictures.
20827
208282000-03-14  Torbjorn Granlund  <tege@swox.com>
20829
20830	* mpn/sparc32/v8/mul_1.asm: Make PIC actually work.
20831	* mpn/sparc32/v8/addmul_1.asm: Likewise.
20832
20833	* mpn/sparc32/v8/mul_1.asm: Use m4 ifdef, not cpp #if.
20834	* mpn/sparc32/v8/addmul_1.asm: Likewise.
20835
20836	* mpn/asm-defs.m4 (C): New define for comments.
20837	* mpn/sparc32: Start comments with `C'.
20838
20839	* config.guess: Remove `SunOS 6' handling.
20840	Recognize sun4m and sun4d architectures under old SunOS.
20841
208422000-03-14  Linus Nordberg  <linus@swox.se>
20843
20844	* configure.in (gmp_srclinks): Set to list of links created by
20845	configure.
20846	* configure: Regenerate.
20847
20848	* Makefile.am (libgmp_la_LDFLAGS): Set version info.
20849	(DISTCLEANFILES): Include @gmp_srclinks@.
20850	* Makefile.in: Regenerate.
20851
208522000-03-13  Linus Nordberg  <linus@swox.se>
20853
20854	* configure.in: Remove some changequote's by quoting the strings
20855	containing `[]'.
20856	Add support for `alpha*-cray-unicos*'.
20857	AC_DEFINE `_LONG_LONG_LIMB' instead of passing it in CFLAGS.
20858	Conditionalize the assembler syntax checks.
20859	* configure: Regenerate.
20860	* config.in: Regenerate.
20861
20862	* acinclude.m4 (GMP_PROG_CCAS): Remove macro.
20863	* aclocal.m4: Regenerate.
20864
208652000-03-13  Kevin Ryde  <kevin@swox.se>
20866
20867	* mpn/x86/p6/README: New file.
20868
20869	* mpn/x86/k6/mul_1.asm: Rewrite, smaller and slightly faster.
20870
20871	* mpn/lisp/gmpasm-mode.el: Rewrite assembler comment detection and
20872	handling.
20873
20874	* configure.in: Separate mmx directories for each x86 flavour.
20875	* configure: Regenerate.
20876
208772000-03-12  Kevin Ryde  <kevin@swox.se>
20878
20879	* mpn/x86/x86-defs.m4 (ALIGN): Supplement definition from
20880	config.m4 so as to pad with nops not zeros on old gas.
20881
20882	* mpn/x86/k7/mmx/copyd.asm: Use plain emms (femms is just an alias
20883	for emms now).
20884	* mpn/x86/k7/mmx/copyi.asm: Ditto.
20885	* mpn/x86/k7/mmx/rshift.asm: Ditto.
20886	* mpn/x86/x86-defs.m4: Amend comments.
20887
20888	* mpn/x86/mod_1.asm: Add comments on speeds.
20889
20890	* mpn/x86/pentium/mmx/lshift.asm: New file.
20891	* mpn/x86/pentium/mmx/rshift.asm: New file.
20892	* mpn/x86/pentium/README: Add speeds of various routines.
20893
208942000-03-10  Linus Nordberg  <linus@swox.se>
20895
20896	* configure.in: Reorganize.
20897	Use AC_CHECK_TOOL to find `ar'.
20898	Add post-includes `regmap.m4' and `aix.m4' for AIX targets.
20899	asm-syntax.h is not needed for PPC or sparc anymore.
20900	(powerpc64-*-aix*): Compiler is always 64-bit. Use `-q64
20901	-qtune=pwr3' to xlc and `-maix64 -mpowerpc64' to gcc.  Pass `-X
20902	64' to `ar' and `nm'.
20903	(pentiummmx): Use GMP_CHECK_ASM_MMX and avoid MMX assembly path if
20904	assembler is not MMX capable.
20905	(pentium[23]): Likewise.
20906	(athlon): Likewise.
20907	(k6*): Likewise.
20908	* configure: Regenerate.
20909
20910	* acinclude.m4 (GMP_PROG_CC_WORKS): New macro.
20911	(GMP_PROG_CC_FIND): Use GMP_PROG_CC_WORKS instead of
20912	AC_TRY_COMPILER.  Make sure that the *first* working 32-bit
20913	compiler is used if no 64-bit compiler is found.
20914	(GMP_CHECK_ASM_MMX): New macro.
20915	* aclocal.m4: Regenerate.
20916
20917	* Makefile.in: Regenerate.  (CC_TEST removed.)
20918	* mpf/Makefile.in: Likewise.
20919	* mpn/Makefile.in: Likewise.
20920	* mpq/Makefile.in: Likewise.
20921	* mpz/Makefile.in: Likewise.
20922	* mpf/tests/Makefile.in: Likewise.
20923	* mpq/tests/Makefile.in: Likewise.
20924	* mpz/tests/Makefile.in: Likewise.
20925
20926	* acconfig.h (_LONG_LONG_LIMB): Add.
20927
20928	* gmp-impl.h: Include config.h only if HAVE_CONFIG_H is defined.
20929
209302000-03-09  Kevin Ryde  <kevin@swox.se>
20931
20932	* mpn/x86/pentium/mul_basecase.S: Small speedup by avoiding an AGI.
20933
20934	* mpn/x86/k7/mmx/copyd.asm: Tiny speedup by avoiding popl.
20935	* mpn/x86/k7/mmx/copyi.asm: Ditto.
20936	* mpn/x86/k7/mul_basecase.asm: Ditto.
20937
209382000-03-07  Torbjorn Granlund  <tege@swox.com>
20939
20940	* config.guess: Better recognize POWER/PowerPC processor type.
20941
209422000-03-07  Kevin Ryde  <kevin@swox.se>
20943
20944	* mpn/generic/addsub_n.c: Use HAVE_NATIVE_* now in config.h.
20945
20946	* mpn/asm-defs.m4: Add comments about SysV m4.
20947	(m4_log2): Don't use <<.
20948	(m4_lshift,m4_rshift): New macros.
20949
209502000-03-06  Torbjorn Granlund  <tege@swox.com>
20951
20952	* mpn/powerpc32/regmap.m4: Map cr0 => `0', etc.
20953
209542000-03-06  Kevin Ryde  <kevin@swox.se>
20955
20956	* mpn/tests/ref.c (refmpn_divexact_by3): New function.
20957	* mpn/tests/ref.h: Prototype.
20958
20959	* acconfig.h (WANT_ASSERT): New define.
20960	* configure.in (--enable-assert): Turn on WANT_ASSERT.
20961	* assert.c: New file.
20962	* Makefile.am: Add to build.
20963	* gmp-impl.h (ASSERT): New macro.
20964	(ASSERT_NOCARRY) Renamed from assert_nocarry.
20965	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS.
20966	* mpn/tests/ref.c: Use ASSERT.
20967	* mpf/get_str.c: Use ASSERT_ALWAYS.
20968	* mpf/set_str.c: Remove old assert macro.
20969
20970	* mpn/x86/x86-defs.m4 (cmovnz_ebx_ecx): New macro.
20971	* mpn/x86/p6/aorsmul_1.asm: Use cmov.
20972
20973	* mpn/x86/lshift.S: Use %dl with testb, not %edx. No object code
20974	change, testb was still getting generated.
20975	* mpn/x86/rshift.S: Ditto.
20976
209772000-03-03  Torbjorn Granlund  <tege@swox.com>
20978
20979	* longlong.h: Add IA-64 support.
20980
20981	* mpn/powerpc32: Misc cleanups.
20982	* mpn/powerpc32/aix.m4: New file (mainly by Linus).
20983	* mpn/powerpc64/aix.m4: New file (mainly by Linus).
20984	* mpn/powerpc64: Translate `.S' files to `.asm'.
20985
20986	* configure.in: Fix tyops.
20987	* configure: Regenerate.
20988
209892000-03-02  Torbjorn Granlund  <tege@swox.com>
20990
20991	* mpn/powerpc32/regmap.m4: New file.
20992	* mpn/powerpc32: Translate `.S' files to `.asm'.
20993	* configure.in: Use mpn/powerpc32/regmap.m4 for powerpc targets
20994	except some weird ones.
20995
209962000-03-03  Kevin Ryde  <kevin@swox.se>
20997
20998	* mpn/lisp/gmpasm-mode.el: Suppress postscript comment prefixes in
20999	filladapt.
21000
21001	* mpn/x86/pentium/sqr_basecase.asm: New file.
21002	* mpn/x86/pentium/gmp-mparam.h (KARATSUBA_SQR_THRESHOLD): Update.
21003
21004	* configure.in: Add --enable-assert, enable k6 logops functions.
21005
21006	* mpn/x86/k6/mmx/copyi.asm: Use m4 for divide, not as.
21007	* mpn/x86/k6/mmx/copyd.asm: Ditto.
21008	* mpn/x86/README.family: Add a note on this.
21009
210102000-03-02  Kevin Ryde  <kevin@swox.se>
21011
21012	* mpn/x86/k6/aors_n.asm: Don't use stosl.
21013	* mpn/x86/copyi.asm: Use cld to clear direction flag.
21014	* mpn/x86/divrem_1.asm: Ditto.
21015	* mpn/x86/README.family: Add a note on this.
21016
21017	* mpn/x86/k6/mmx/copyi.asm: Rewrite.
21018	* mpn/x86/k6/mmx/copyd.asm: New file.
21019	* mpn/x86/k6/README: Update, and small amendments.
21020
21021	* mpn/x86/x86-defs.m4 (Zdisp): New macro.
21022	* mpn/asm-defs.m4 (m4_stringequal_p): New macro.
21023
21024	* mpn/x86/p6/aorsmul_1.asm: Use Zdisp to force zero displacements.
21025	* mpn/x86/k6/aorsmul_1.asm: Ditto.
21026	* mpn/x86/k6/mul_1.asm: Ditto.
21027	* mpn/x86/k6/mul_basecase.asm: Ditto.
21028	* mpn/x86/k7/aors_n.asm: Ditto.
21029	* mpn/x86/k7/aorsmul_1.asm: Ditto.
21030	* mpn/x86/k7/mul_1.asm: Ditto.
21031	* mpn/x86/k7/mul_basecase.asm: Ditto.
21032	* mpn/x86/README.family: Add a note on this.
21033
210342000-02-27  Kevin Ryde  <kevin@swox.se>
21035
21036	* mpn/generic/divrem.c (mpn_divrem_classic): Patch to avoid gcc
21037	2.7.2.3 i386 register handling bug.
21038
21039	* mpn/x86/k6/aors_n.asm: Rewrite.
21040	* mpn/x86/k6/mmx/lshift.asm: Rewrite.
21041	* mpn/x86/k6/mmx/rshift.asm: Rewrite.
21042	* mpn/x86/k6/README: Update.
21043
21044	* mpn/x86/k7/mmx/copyd.asm: Support size==0.
21045	* mpn/x86/k7/mmx/copyi.asm: Ditto.
21046	* mpn/x86/k6/mmx/copyi.asm: Ditto.
21047	* gmp-impl.h: Comment size==0 allowed in MPN_COPY_INCR and
21048	MPN_COPY_DECR.
21049	* configure.in: Enable x86 copyi, copyd; add k6 com_n.
21050
210512000-02-25  Torbjorn Granlund  <tege@swox.com>
21052
21053	* demos/pexpr.c (power): Move factorial handing code from `factor'
21054	to `power'.
21055
21056	* demos/factorize.c (factor_using_pollard_rho): Move resetting of `c'
21057	to before checking for a non-zero gcd.
21058
210592000-02-25  Kevin Ryde  <kevin@swox.se>
21060
21061	* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro by Linus.
21062	* mpn/x86/k6/aors_n.asm: Use MULFUNC_PROLOGUE.
21063	* mpn/x86/k6/aorsmul_1.asm: Ditto.
21064	* mpn/x86/k7/aors_n.asm: Ditto.
21065	* mpn/x86/k7/aorsmul_1.asm: Ditto.
21066	* mpn/x86/p6/aorsmul_1.asm: Ditto.
21067
21068	* mpn/tests/ref.c (refmpn_copyi,refmpn_copyd): Allow size==0.
21069
21070	* gmp-impl.h: Move mpn_and_n, mpn_andn_n, mpn_com_n, mpn_ior_n,
21071	mpn_iorn_n, mpn_nand_n, mpn_nior_n, mpn_xor_n and mpn_xorn_n here
21072	from gmp.h.  Use HAVE_NATIVE_mpn_* to make these functions or
21073	inlines.
21074
21075	* gmp-impl.h: Move mpn_copyd, mpn_copyi here from gmp.h.
21076	* gmp-impl.h (MPN_COPY_INCR): Use mpn_copyi if available.
21077	* gmp-impl.h (MPN_COPY_DECR): Use mpn_copyd if available.
21078
21079	* mpn/x86/k6/mmx/com_n.asm: Moved into mmx subdirectory.
21080	* mpn/x86/k6/mmx/copyi.asm: Ditto.
21081	* mpn/x86/k6/mmx/lshift.asm: Ditto.
21082	* mpn/x86/k6/mmx/rshift.asm: Ditto.
21083	* mpn/x86/k7/mmx/rshift.asm: Ditto.
21084	* mpn/x86/k6/mmx/logops_n.asm: New file.
21085	* configure.in (k6*-*-*): Add logops_n.asm.
21086	* mpn/x86/k6/README: Update.
21087
21088	* mpn/x86/k7/mmx/copyi.asm: New file.
21089	* mpn/x86/k7/mmx/copyd.asm: New file.
21090	* mpn/x86/k7/README: Update.
21091
210922000-02-24  Kevin Ryde  <kevin@swox.se>
21093
21094	* mpn/x86/x86-defs.m4 (femms): Generate emms if 3dnow not available.
21095	* mpn/x86/x86-defs.m4 (FRAME_popl): New macro.
21096
21097	* Makefile.am: Add info_TEXINFOS = gmp.texi
21098
21099	* mpn/x86/divrem_1.asm: Moved from mpn/x86/k6, allow size==0,
21100	conditionalize loop versus decl/jnz.
21101	* mpn/x86/mod_1.asm: Ditto.
21102	* mpn/x86/divmod_1.asm: Removed.
21103	* gmp.texi (mpn_divrem_1,mpn_mod_1): Add that size==0 is allowed.
21104	* mpn/tests/ref.c (refmpn_divrem_1c,etc): Allow size==0.
21105
21106	* mpn/x86/k6/aors_n.asm: Avoid gas 1.92.3 leal displacement
21107	expression problem.
21108	* mpn/x86/k6/aorsmul_1.asm: Ditto.
21109	* mpn/x86/k6/mul_1.asm: Ditto.
21110	* mpn/x86/k6/mul_basecase.asm: Ditto
21111	* mpn/x86/k7/aors_n.asm: Ditto.
21112	* mpn/x86/k7/aorsmul_1.asm: Ditto.
21113	* mpn/x86/k7/mul_1.asm: Ditto.
21114	* mpn/x86/k7/mul_basecase.asm: Ditto.
21115	* mpn/x86/k7/rshift.asm: Ditto.
21116	* mpn/x86/p6/aorsmul_1.asm: Ditto.
21117	* mpn/x86/README.family: Describe problem.
21118
211192000-02-24  Linus Nordberg  <linus@swox.se>
21120
21121	* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Add dummy symbol to
21122	testcase to avoid nm failure.  Try nm before piping to grep.
21123
21124	* acconfig.h: Undef HAVE_NATIVE_func for every mpn function found
21125	in gmp.h.
21126
21127	* configure.in: Invoke AC_CONFIG_HEADERS.
21128	Don't invoke AM_CONFIG_HEADER; it makes autoconf confused.
21129	Dig out entry points declared in assembly code and AC_DEFINE proper
21130	HAVE_NATIVE_func.
21131
21132	* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro.
21133
21134	* mpn/x86/p6/aorsmul_1.asm: Use MULFUNC_PROLOGUE.
21135	* mpn/x86/k6/aors_n.asm: Likewise.
21136
21137	* Makefile.am (EXTRA_DIST): Add config.in; needed when we don't
21138	use AM_CONFIG_HEADER in configure.in.
21139
21140	* mpn/Makefile.am (INCLUDES): Add `-I..' for config.h and
21141	gmp-mparam.h.
21142	* mpf/Makefile.am: Likewise.
21143	* mpq/Makefile.am: Likewise.
21144	* mpz/Makefile.am: Likewise.
21145
21146	* mpf/tests/Makefile.am (INCLUDES): Add `-I../..' for config.h and
21147	gmp-mparam.h.
21148	* mpq/tests/Makefile.am: Likewise.
21149	* mpz/tests/Makefile.am: Likewise.
21150
21151	* configure: Regenerate.
21152	* aclocal.m4: Regenerate.
21153	* config.in: Regenerate.
21154	* Makefile.in: Regenerate.
21155	* mpf/Makefile.in: Regenerate.
21156	* mpn/Makefile.in: Regenerate.
21157	* mpq/Makefile.in: Regenerate.
21158	* mpz/Makefile.in: Regenerate.
21159	* mpf/tests/Makefile.in: Regenerate.
21160	* mpq/tests/Makefile.in: Regenerate.
21161	* mpz/tests/Makefile.in: Regenerate.
21162
211632000-02-23  Kevin Ryde  <kevin@swox.se>
21164
21165	* mpn/x86/addmul_1.S: Amend comments, this code no longer used by
21166	PentiumPro.
21167	* mpn/x86/submul_1.S: Ditto.
21168
21169	* mpn/x86/k6/com_n.asm: Rewrite, smaller but same speed.
21170
21171	* mpn/x86/addmul_1.S: Add PROLOGUE and EPILOGUE to get .type and
21172	.size for ELF.  Rename #define size to n to avoid .size.
21173	* mpn/x86/lshift.S: Ditto.
21174	* mpn/x86/mul_1.S: Ditto.
21175	* mpn/x86/mul_basecase.S: Ditto.
21176	* mpn/x86/rshift.S: Ditto.
21177	* mpn/x86/submul_1.S: Ditto.
21178	* mpn/x86/udiv.S: Ditto.
21179	* mpn/x86/umul.S: Ditto.
21180	* mpn/x86/pentium/add_n.S: Ditto.
21181	* mpn/x86/pentium/addmul_1.S: Ditto.
21182	* mpn/x86/pentium/lshift.S: Ditto.
21183	* mpn/x86/pentium/mul_1.S: Ditto.
21184	* mpn/x86/pentium/mul_basecase.S: Ditto.
21185	* mpn/x86/pentium/rshift.S: Ditto.
21186	* mpn/x86/pentium/sub_n.S: Ditto.
21187	* mpn/x86/pentium/submul_1.S: Ditto.
21188
211892000-02-22  Linus Nordberg  <linus@swox.se>
21190
21191	* acinclude.m4 (GMP_INIT): Use temporary file cnfm4p.tmp for
21192	post-defines.
21193	(GMP_FINISH): Ditto.
21194	(GMP_DEFINE): Add third optional argument specifying location in
21195	outfile.
21196	(GMP_DEFINE_RAW): New macro.
21197	* aclocal.m4: Regenerate.
21198
21199	* configure.in: Add `HAVE_TARGET_CPU_$target_cpu' using
21200	GMP_DEFINE_RAW.
21201	* configure: Regenerate.
21202
21203	* mpz/tests/Makefile.am: New test t-root.
21204	* mpz/tests/Makefile.in: Regenerate.
21205
212062000-02-22  Torbjorn Granlund  <tege@swox.com>
21207
21208	* mpz/root.c: Complete rewrite; still primitive, but at least correct.
21209	* mpz/tests/t-root.c: New test.
21210
212112000-02-22  Kevin Ryde  <kevin@swox.se>
21212
21213	* mpn/x86/k7/mul_basecase.asm: New file.
21214	* mpn/x86/k7/README: Add mpn_mul_basecase speed.
21215	* mpn/x86/k7/gmp-mparam.h: New file.
21216
21217	* mpn/x86/x86-defs.m4 (loop_or_decljnz,cmov_bytes): New macros.
21218	* mpn/asm-defs.m4 (m4_ifdef_anyof_p): New macro.
21219
21220	* mpn/x86/k6/aorsmul_1.asm: New file.
21221	* mpn/x86/k6/addmul_1.S: Removed (was a copy of pentium version).
21222	* mpn/x86/k6/submul_1.S: Removed (was a copy of pentium version).
21223
21224	* mpn/x86/p6/aorsmul_1.asm: Use OPERATION_addmul_1 and
21225	OPERATION_submul_1.
21226	* mpn/x86/k6/aors_n.asm: Use OPERATION_add_n and OPERATION_sub_n.
21227	* configure.in: Declare multi-function files for k6 and p6.
21228
21229	* configure.in: Add HAVE_TARGET_CPU_$target_cpu for config.m4.
21230	* mpn/asm-defs.m4 (define_not_for_expansion): New macro.
21231
21232	* mpn/generic/divrem_1n.c (__gmpn_divrem_1n): New file, split from
21233	mpn/generic/divrem_1.c.
21234	* mpn/generic/divrem_1.c: Ditto.
21235	* configure.in (gmp_mpn_functions): Ditto.
21236
212372000-02-21  Torbjorn Granlund  <tege@swox.com>
21238
21239	* gmp.h: Undo 1996-10-06 NeXT change, it was clearly improperly
21240	written.
21241
212422000-02-21  Linus Nordberg  <linus@swox.se>
21243
21244	* configure.in: Link <src>/mpn/asm-defs.m4 to <build>mpn/asm.m4.
21245	* configure: Regenerate.
21246
212472000-02-21  Linus Nordberg  <linus@swox.se>
21248
21249	* mpn/x86/k7/aorsmul_1.asm: Change OPERATION_ADDMUL -->
21250	OPERATION_addmul_1.  Change OPERATION_SUBMUL -->
21251	OPERATION_submul_1.
21252
21253	* mpn/x86/k7/aors_n.asm: Change OPERATION_ADD --> OPERATION_add_n.
21254	Change OPERATION_SUB --> OPERATION_sub_n.
21255
21256	* mpn/Makefile.am: Pass -DOPERATION_$* to preprocessors.
21257	* mpn/Makefile.in: Regenerate.
21258
21259	* configure.in: Symlink mpn/asm-defs.m4 to build-dir/mpn.  Link
21260	multi-function files to mpn/<function>.asm and remove function
21261	name from `gmp_mpn_functions'.
21262	* configure: Regenerate.
21263
21264	* acinclude.m4 (GMP_FINISH): Tell user what we're doing.
21265	* aclocal.m4: Regenerate.
21266
212672000-02-21  Kevin Ryde  <kevin@swox.se>
21268
21269	* gmp-impl.h: Rename __gmpn_mul_basecase to mpn_mul_basecase and
21270	__gmpn_sqr_basecase to mpn_sqr_basecase, remove __gmpn prototypes.
21271	* mpn/x86/mul_basecase.S: Ditto.
21272	* mpn/x86/pentium/mul_basecase.S: Ditto.
21273
21274	* configure.in (gmp_m4postinc): Use x86-defs.m4 on athlon-*-* too.
21275
212762000-02-20  Kevin Ryde  <kevin@swox.se>
21277
21278	* acinclude.m4 (GSYM_PREFIX): Drop $1, change by Linus.
21279	* mpn/asm-defs.m4 (PROLOGUE,EPILOGUE): Use GSYM_PREFIX as a
21280	string, change by Linus.
21281	* mpn/x86/x86-defs.m4: Use GSYM_PREFIX as a string.
21282
21283	* mpn/x86/k6/gmp-mparam.h: New file.
21284	* mpn/asm-defs.m4 (m4_warning): New macro.
21285
21286	* mpn/x86/README: Amendments per new code and directories.
21287	* mpn/x86/README.family: New file.
21288	* mpn/x86/k6/README: New file.
21289	* mpn/x86/k7/README: New file.
21290
21291	* mpn/generic/mul_n.c: Rename __gmpn_mul_basecase to
21292	mpn_mul_basecase and __gmpn_sqr_basecase to mpn_sqr_basecase.
21293	* mpn/generic/mul_basecase.c: Ditto.
21294	* mpn/generic/sqr_basecase.c: Ditto.
21295	* mpn/generic/mul.c: Ditto.
21296
212972000-02-19  Linus Nordberg  <linus@swox.se>
21298
21299	* configure.in: Don't try to symlink more than one multi-func
21300	file.
21301	* configure: Regenerate.
21302
213032000-02-18  Linus Nordberg  <linus@swox.se>
21304
21305	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): GMP_DEFINE
21306	`GSYM_PREFIX'.  Run ACTIONs even when value is found in cache.
21307	(GMP_CHECK_ASM_ALIGN_LOG): GMP_DEFINE `ALIGN'.  Run ACTIONs even
21308	when value is found in cache.
21309	* aclocal.m4: Regenerate.
21310
21311	* configure.in: Don't define GSYM_PREFIX or ALIGN.
21312	Add mechanism for multi-function files.
21313	* configure: Regenerate.
21314
213152000-02-18  Kevin Ryde  <kevin@swox.se>
21316
21317	* configure.in (gmp_m4postinc): Enable x86-defs.m4.
21318	* mpn/x86/k7/mul_1.asm: Fix include.
21319	* mpn/x86/k6/mul_basecase.S: Removed (copy of the pentium version).
21320	* mpn/x86/k6/mul_basecase.asm: New file.
21321	* mpn/x86/k6/sqr_basecase.asm: New file.
21322	* mpn/x86/k6/com_n.asm: New file.
21323	* mpn/x86/k6/copyi.asm: New file.
21324	* gmp.texi (Low-level Functions): Clarify mpn overlaps permitted.
21325	* gmp-impl.h (MPN_OVERLAP_P): New macro.
21326	* gmp-impl.h (assert_nocarry): New macro.
21327	* mpn/tests/ref.c: New file, based in part on other mpn/tests/*.c.
21328	* mpn/tests/ref.h: New file.
21329
213302000-02-17  Linus Nordberg  <linus@swox.se>
21331
21332	* Makefile.am (dist-hook): Don't include any emacs backup files
21333	(*.~*) in dist.
21334	* Makefile.in: Regenerate.
21335
213362000-02-17  Torbjorn Granlund  <tege@swox.com>
21337
21338	* mpn/sparc32/v9/mul_1.asm: Use `rd' to get current PC; get rid of
21339	getpc function.
21340	* mpn/sparc32/v9/addmul_1.asm: Likewise.
21341	* mpn/sparc32/v9/submul_1.asm: Likewise.
21342
213432000-02-17  Kevin Ryde  <kevin@swox.se>
21344
21345	* gmp.h: Add prototypes and defines for mpn_and_n, mpn_andn_n,
21346	mpn_com_n, mpn_copyd, mpn_copyi, mpn_ior_n, mpn_iorn_n,
21347	mpn_mul_basecase, mpn_nand_n, mpn_nior_n, mpn_sqr_basecase,
21348	mpn_xor_n, mpn_xorn_n.
21349
21350	* mpn/asm-defs.m4: Many additions making up initial version.
21351	* mpn/asm-defs.m4 (L): Use defn(`LSYM_PREFIX').
21352	* mpn/x86/x86-defs.m4: New file.
21353	* mpn/x86/k6/aors_n.asm: New file.
21354	* mpn/x86/k6/divmod_1.asm: New file.
21355	* mpn/x86/k6/divrem_1.asm: New file.
21356	* mpn/x86/k6/lshift.S: Removed (was a copy of the pentium version).
21357	* mpn/x86/k6/lshift.asm: New file.
21358	* mpn/x86/k6/mod_1.asm: New file.
21359	* mpn/x86/k6/mul_1.S: Removed (was a copy of the pentium version).
21360	* mpn/x86/k6/mul_1.asm: New file.
21361	* mpn/x86/k6/rshift.S: Removed (was a copy of the pentium version).
21362	* mpn/x86/k6/rshift.asm: New file.
21363	* mpn/x86/k7/aors_n.asm: New file.
21364	* mpn/x86/k7/aorsmul_1.asm: New file.
21365	* mpn/x86/k7/mul_1.asm: New file.
21366	* mpn/x86/k7/rshift.asm: New file.
21367	* mpn/x86/p6/aorsmul_1.asm: New file.
21368	* mpn/x86/copyi.asm: New file.
21369	* mpn/x86/copyd.asm: New file.
21370	* mpn/lisp/gmpasm-mode.el: New file.
21371
213722000-02-16  Torbjorn Granlund  <tege@swox.com>
21373
21374	* mpn/sparc32/v9/mul_1.asm: Conditionalize for PIC.
21375	* mpn/sparc32/v9/addmul_1.asm: Likewise.
21376	* mpn/sparc32/v9/submul_1.asm: Likewise.
21377	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
21378	* mpn/sparc32/udiv_fp.asm: Likewise.
21379
213802000-02-16  Linus Nordberg  <linus@swox.se>
21381
21382	* configure.in: Add mechanism for including target specific
21383	m4-files in config.m4.
21384	* configure: Regenerate.
21385
21386	* acinclude.m4 (GMP_PROG_CCAS): Begin assembly lines (except
21387	labels) with a tab character.  HP-UX demands it.
21388	(GMP_CHECK_ASM_SIZE): Ditto.
21389	(GMP_CHECK_ASM_LSYM_PREFIX): Ditto.
21390	(GMP_CHECK_ASM_LABEL_SUFFIX): Set to empty string for HP-UX.
21391	(GMP_CHECK_ASM_GLOBL): Change `.xport' --> `.export'.
21392	* aclocal.m4: Regenerate.
21393
213942000-02-16  Linus Nordberg  <linus@swox.se>
21395
21396	* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Define LSYM_PREFIX as
21397	the prefix only, no argument.
21398	* aclocal.m4: Regenerate.
21399	* configure: Regenerate.
21400
21401	* mpn/asm-defs.m4 (L): No argument to LSYM_PREFIX.
21402
214032000-02-15  Linus Nordberg  <linus@swox.se>
21404
21405	* acinclude.m4: Prefix all temporary shell variables with
21406	`gmp_tmp_'.
21407	(GMP_PROG_CC_FIND): Use defaults if no arguments are passed.
21408	Quote use of arguments.
21409	(GMP_PROG_CCAS): New macro.
21410	(GMP_INIT): New macro.
21411	(GMP_FINISH): New macro.
21412	(GMP_INCLUDE): New macro.
21413	(GMP_SINCLUDE): New macro.
21414	(GMP_DEFINE): New macro.
21415	(GMP_CHECK_ASM_LABEL_SUFFIX): New macro.
21416	(GMP_CHECK_ASM_TEXT): New macro.
21417	(GMP_CHECK_ASM_DATA): New macro.
21418	(GMP_CHECK_ASM_GLOBL): New macro.
21419	(GMP_CHECK_ASM_TYPE): New macro.
21420	(GMP_CHECK_ASM_SIZE): New macro.
21421	(GMP_CHECK_ASM_LSYM_PREFIX): New macro.
21422	(GMP_CHECK_ASM_W32): New macro.
21423	* aclocal.m4: Regenerate.
21424
21425	* configure.in: Find m4 and nm for target.
21426	Use new macros to create config.m4.
21427	Prefix all temporary shell variables with `tmp_'.
21428	Pass `-X 64' to nm for 64-bit PPC target with 64-bit compiler.
21429	* configure: Regenerate.
21430
21431	* Makefile.am (dist-hook): *Really* remove all CVS dirs in
21432	dist.
21433	* Makefile.in: Regenerate.
21434
21435	* mpn/Makefile.am: Add target for building .lo and .o from
21436	.asm.
21437	Pass -DPIC to preprocessor (CPP/m4) when building .lo.
21438	Build .o a second time for target .lo, without -DPIC to
21439	preprocessor.
21440	(SUFFIX): Add `.asm'.
21441	(EXTRA_DIST): Add asm-defs.m4.
21442	* mpn/Makefile.in: Regenerate.
21443
21444	* mpf/Makefile.in: Regenerate.
21445	* mpf/tests/Makefile.in: Regenerate.
21446	* mpq/Makefile.in: Regenerate.
21447	* mpq/tests/Makefile.in: Regenerate.
21448	* mpz/Makefile.in: Regenerate.
21449	* mpz/tests/Makefile.in: Regenerate.
21450
214512000-02-15  Torbjorn Granlund  <tege@swox.com>
21452
21453	* mpn/sparc32/udiv_fp.asm: Change `RODATA' to `DATA'.
21454	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
21455	* mpn/sparc32/v9/addmul_1.asm: Likewise.
21456	* mpn/sparc32/v9/submul_1.asm: Likewise.
21457	* mpn/sparc32/v9/mul_1.asm: Likewise.
21458
21459	* mpn/sparc32/add_n.asm: Rename `size' -> `n'.
21460	* mpn/sparc32/sub_n.asm: Likewise.
21461
21462	* sparc32: Rename `.s' and `.S' files to `.asm'.
21463	* sparc64: Rename `.s' and `.S' files to `.asm'.
21464
214652000-02-11  Torbjorn Granlund  <tege@swox.com>
21466
21467	* config.sub: Adopt to new config.guess sparc naming conventions.
21468
21469	* config.guess (sun4u:SunOS:5.*:*): Change `sparc9' to `sparcv9'.
21470	* config.guess (sun4m:SunOS:5.*:*): Change to sun4[md]:SunOS:5.*:* and
21471	change `sparc8' to `sparcv8'.
21472
21473	* mpn/x86/add_n.S: Use PROLOGUE/EPILOGUE.
21474	* mpn/x86/sub_n.S: Likewise.
21475
21476	* mpn/x86/syntax.h (PROLOGUE): New name for PROLOG.
21477	* mpn/x86/syntax.h (EPILOGUE): New name for EPILOG.
21478
214792000-02-11  Linus Nordberg  <linus@swox.se>
21480
21481	* configure.in: Better path for 64-bit sparc without 64-bit cc.
21482	Change sparc8 --> sparcv8.
21483	Change sparc9 --> sparcv9.
21484	* configure: Regenerate.
21485
214862000-02-10  Linus Nordberg  <linus@swox.se>
21487
21488	* configure.in: Use Autoconf.
21489	* Makefile.am: New file.
21490
21491	* AUTHORS: New file.
21492	* COPYING: New file.
21493	* acinclude.m4: New file.
21494	* acconfig.h: New file.
21495
21496	* configure: Generate.
21497	* Makefile.in: Generate.
21498	* aclocal.m4: Generate.
21499	* config.in: Generate.
21500
21501	* install.sh: Remove.
21502	* install-sh: New file from Automake.
21503	* missing: New file from Automake.
21504	* ltconfig: New file from Libtool.
21505	* ltmain.sh: New file from Libtool.
21506
21507	* mpf/Makefile.am: New file.
21508	* mpf/Makefile.in: Generate.
21509	* mpf/configure.in: Remove.
21510	* mpf/tests/Makefile.am: New file.
21511	* mpf/tests/Makefile.in: Generate.
21512	* mpf/tests/configure.in: Remove.
21513
21514	* mpn/Makefile.am: New file.
21515	* mpn/Makefile.in: Generate.
21516	* mpn/configure.in: Remove.
21517
21518	* mpq/Makefile.am: New file.
21519	* mpq/Makefile.in: Generate.
21520	* mpq/configure.in: Remove.
21521	* mpq/tests/Makefile.am: New file.
21522	* mpq/tests/Makefile.in: Generate.
21523	* mpq/tests/configure.in: Remove.
21524
21525	* mpz/Makefile.am: New file.
21526	* mpz/Makefile.in: Generate.
21527	* mpz/configure.in: Remove.
21528	* mpz/tests/Makefile.am: New file.
21529	* mpz/tests/Makefile.in: Generate.
21530	* mpz/tests/configure.in: Remove.
21531
215322000-02-10  Torbjorn Granlund  <tege@swox.com>
21533
21534	* mpn/x86/add_n.S: Don't use label L0 twice.
21535	* mpn/x86/sub_n.S: Likewise.
21536
215372000-01-20  Linus Nordberg  <linus@swox.se>
21538
21539	* demos/pexpr.c: Don't use setup_error_handler() in windoze.
21540
215412000-01-19  Torbjorn Granlund  <tege@swox.com>
21542
21543	* demos/pexpr.c (sigaltstack): #define to sigstack for AIX.
21544	(setup_error_handler): Don't write to ss_size and ss_flags
21545	on AIX.
21546
215472000-01-11  Torbjorn Granlund  <tege@swox.com>
21548
21549	* mpn/configure.in (hppa2.0*-*-*): Move assignment of
21550	target_makefile_frag to where it belongs.
21551
215521999-12-21  Torbjorn Granlund  <tege@swox.com>
21553
21554	* longlong.h (v9 umul_ppmm): New #define.
21555	(v9 udiv_qrnnd): New #define.
21556
215571999-12-14  Torbjorn Granlund  <tege@swox.com>
21558
21559	* mpn/generic/divmod_1.c: Use invert_limb.
21560	* mpn/generic/mod_1.c: Use invert_limb.
21561
21562	* gmp-impl.h (invert_limb): Put definition here.
21563	* mpn/generic/divrem.c (invert_limb): Delete definition.
21564	* mpn/generic/divrem_2.c (invert_limb): Delete definition.
21565
21566	* gmp.h (mpn_divrem): Inhibit for non-gcc.
21567	But declare (undo 1999-11-22 change).
21568
21569	* gmp-impl.h (DItype,UDItype): Do these also if _LONG_LONG_LIMB.
21570
21571	* longlong.h: Move 64-bit hppa code out of __GNUC__ conditional.
21572
21573	* stack-alloc.c (HSIZ): New #define.
21574	(__tmp_alloc): Use HSIZ instead of sizeof(tmp_stack).
21575
215761999-12-10  Torbjorn Granlund  <tege@swox.com>
21577
21578	* config.sub: Clean up handling of x86 CPUs: Properly recognize
21579	Amd CPUs as unique entities.  Use manufacturer's names of
21580	processors ("pentium", etc); still match ambiguous names like
21581	"i586", "i686", "p6" but be conservative in interpreting them.
21582
21583	* configure.in: Recognize x86 CPU types known by config.guess.
21584	* mpn/configure.in: Likewise.  Add x86/mmx path component as
21585	appropriate.
21586	(athlon-*-*): Fix typo.
21587
21588	* config.guess: Update x86 recog code to intiallly match
21589	more than just i386.
21590	Call K6-2 and K6-III for "k62" and "k63" respectively.
21591
21592	* config.guess: Recognize x86 CPU types.
21593	Update code for FreeBSD, NetBSD, OpenBSD, Linux.
21594
215951999-12-08  Torbjorn Granlund  <tege@swox.com>
21596
21597	* mpf/pow_ui.c: Avoid final squaring in loop.
21598
215991999-12-07  Torbjorn Granlund  <tege@swox.com>
21600
21601	* gmp-impl.h (udiv_qrnnd_preinv2gen): Prefix local variables with `_'.
21602	(udiv_qrnnd_preinv2norm): Likewise.
21603	From Kevin Ryde:
21604	(HAVE_ALLOCA): #define also if defined (alloca).
21605
216061999-12-04  Torbjorn Granlund  <tege@swox.com>
21607
21608	* mpn/tests/add_n.c: Set OPS from CLOCK.
21609	* mpn/tests/sub_n.c: Likewise.
21610	* mpn/tests/mul_1.c: Likewise.
21611	* mpn/tests/addmul_1.c: Likewise.
21612	* mpn/tests/submul_1.c: Likewise.
21613
21614	* mpn/tests/lshift.c: Update from add_n.c.
21615	* mpn/tests/rshift.c: Likewise.
21616
216171999-12-03  Torbjorn Granlund  <tege@swox.com>
21618
21619	* mpn/powerpc64/copy.S: New file.
21620
216211999-12-02  Torbjorn Granlund  <tege@swox.com>
21622
21623	* mpn/sparc64/copy.s: New file.
21624
21625	* mpn/tests/copy.c: New file.
21626
21627	* mpn/configure.in: Recognize more Amd CPUs; Set special paths for
21628	k7 CPU.
21629
21630	* configure.in: Recognize Amd x86 CPUs.
21631
21632	* mpz/fdiv_r_2exp.c: In rounding code, read in->_mp_size before
21633	writing to res->_mp_size.
21634
21635	* mpn/powerpc64/*.S: Clean up assembly syntax, add function headers.
21636	* mpn/powerpc64/gmp-mparam.h: (KARATSUBA_MUL_THRESHOLD): #define.
21637	(KARATSUBA_SQR_THRESHOLD): #define.
21638
21639	* mpn/tests/add_n.c (main): Only print test number if TIMES==1
21640	and not printing.
21641	(main): Don't run reference code if NOCHECK.
21642	* mpn/tests/sub_n.c: Likewise.
21643	* mpn/tests/mul_1.c: Likewise.
21644	* mpn/tests/addmul_1.c: Likewise.
21645	* mpn/tests/submul_1.c: Likewise.
21646
21647	* mpn/tests/lshift.c: (main): Only print test number if TIMES==1
21648	and not printing.
21649	* mpn/tests/rshift.c: Likewise.
21650
216511999-11-22  Torbjorn Granlund  <tege@swox.com>
21652
21653	* gmp.h (mpz_init_set_str): Declare using __gmp_const.
21654	(mpz_set_str): Likewise.
21655	(mpf_init_set_str): Likewise.
21656	(mpf_set_str): Likewise.
21657	(mpn_set_str): Likewise.
21658	(__gmp_0): Likewise.
21659	(mpn_divrem): Remove separate declaration; it's defined later in
21660	this file.
21661
21662	* gmp.h: Replace "defined (__STD__)' by (__STDC__-0) in
21663	expressions involving more than one term, to handle Sun's compiler
21664	that most helpfully sets __STDC__ to 0.
21665	* gmp-impl.h: Likewise.
21666	* longlong.h: Likewise.
21667
216681999-11-21  Torbjorn Granlund  <tege@swox.com>
21669
21670	* mpn/sparc64/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
21671	(KARATSUBA_SQR_THRESHOLD): #define.
21672
21673	* mpn/sparc64/lshift.s: Compensate stack references for odd stack ptr.
21674	* mpn/sparc64/rshift.s: Likewise.
21675
21676	* mpn/sparc64/addmul_1.s: Propagate carry properly.
21677	* mpn/sparc64/submul_1.s: Likewise.
21678
21679	* mpn/sparc64/sub_n.s: Rewrite.
21680
21681	* mpn/sparc64/sub_n.s: Get operand order for main subcc right
21682	(before scrapping this code for new code).
21683
216841999-11-20  Torbjorn Granlund  <tege@swox.com>
21685
21686	* mpn/sparc64/add_n.s: Rewrite.
21687
216881999-11-17  Torbjorn Granlund  <tege@swox.com>
21689
21690	* mpn/x86/syntax.h (PROLOG): New #define.
21691	(EPILOG): New #define.
21692
21693	* gmp.h (mpn_addsub_n): Declare.
21694	* gmp.h (mpn_add_nc): Declare.
21695	* gmp.h (mpn_sub_nc): Declare.
21696	* mpn/powerpc64/addsub_n.S: New file.
21697
216981999-11-17  Torbjorn Granlund  <tege@swox.com>
21699
21700	* mpn/alpha/gmp-mparam.h
21701	(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
21702	(KARATSUBA_SQR_THRESHOLD): Likewise.
21703
217041999-11-14  Torbjorn Granlund  <tege@swox.com>
21705
21706	* mpn/x86/mul_1.S: Unroll and optimize for P6 and K7.
21707
217081999-11-09  Torbjorn Granlund  <tege@swox.com>
21709
21710	* mpn/x86/p6/gmp-mparam.h
21711	(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
21712	(KARATSUBA_SQR_THRESHOLD): Likewise.
21713
217141999-11-05  Torbjorn Granlund  <tege@swox.com>
21715
21716	* mpn/generic/addsub_n.c: New file.
21717
217181999-11-02  Torbjorn Granlund  <tege@swox.com>
21719
21720	* config.guess: Handle alpha:FreeBSD with alpha:NetBSD.
21721
21722	* configure.in (vax*-*-*): New case.
21723	* config/mt-vax: New file.
21724	* mpn/vax/add_n.s: Rewrite.
21725	* mpn/vax/sub_n.s: Rewrite.
21726
217271999-10-31  Torbjorn Granlund  <tege@swox.com>
21728
21729	* mpn/vax/rshift.s: New file.
21730	* mpn/vax/lshift.s: New file.
21731
217321999-10-29  Torbjorn Granlund  <tege@swox.com>
21733
21734	* config.sub: Handle k5 and k6.
21735	* mpn/configure.in: Recognize k6.
21736
21737	* mpf/tests/t-get_d.c (LOW_BOUND, HIGH_BOUND): New #defines.
21738	(main): Tighten error bounds to 14 digits.
21739
21740	* longlong.h (default umul_ppmm, when smul_ppmm exists):
21741	Rename __m0 => __xm0, __m1 => __xm1.
21742	(default smul_ppmm): Likewise.
21743
217441999-10-11  Torbjorn Granlund  <tege@swox.com>
21745
21746	* config.guess: Reverse the test for POWER vs PowerPC.
21747	* config.guess (sun4m:SunOS:5.*:*): New case.
21748	* config.guess (sun4u:SunOS:5.*:*): New case.
21749
217501999-09-29  Torbjorn Granlund  <tege@swox.com>
21751
21752	* mpn/generic/divrem_2.c: Clean up comments.
21753
217541999-09-23  Torbjorn Granlund  <tege@swox.com>
21755
21756	* mpz/tests/Makefile.in: Use move-if-change when generating binaries.
21757	* mpf/tests/Makefile.in: Likewise.
21758	* mpq/tests/Makefile.in: Likewise.
21759	* mpz/tests/move-if-change: New file.
21760	* mpf/tests/move-if-change: New file.
21761	* mpq/tests/move-if-change: New file.
21762
21763	* gmp.h (mpn_incr_u): New macro (from mpn/generic/mul_n.c).
21764	(mpn_decr_u): New macro.
21765
21766	* mpn/generic/mul_n.c (mpn_incr): Delete.
21767	* mpn/generic/mul_n.c: Update usages mpn_incr => mpn_incr_u.
21768	* mpn/generic/divrem_newt.c: Use mpn_incr_u and mpn_decr_u instead of
21769	mpn_add_1 and mpn_sub_1.
21770	* mpn/generic/sqrtrem.c: Likewise.
21771	* mpz/cdiv_q_ui.c: Likewise.
21772	* mpz/cdiv_qr_ui.c: Likewise.
21773	* mpz/fdiv_q_ui.c: Likewise.
21774	* mpz/fdiv_qr_ui.c: Likewise.
21775
21776	* mpn/generic/sqrtrem.c: Start single-limb Newton iteration from 18
21777	bits.
21778
217791999-07-27  Torbjorn Granlund  <tege@swox.com>
21780
21781	* mpn/generic/divrem_1.c (__gmpn_divrem_1n): New function.
21782
21783	* mpn/generic/divrem_2.c: New file, code from divrem.c, `case 2:'.
21784	* mpn/Makefile.in: Compile divrem_2.c.
21785	* make.bat: Compile divrem_2.c.
21786	* mpn/configure.in (functions): Add divrem_2.
21787	* gmp.h: Declare mpn_divrem_2.
21788
21789	* mpn/generic/divrem.c: Delete special cases, handle just divisors
21790	of more than 2 limbs.
21791	* gmp.h (mpn_divrem): Call mpn_divrem_1, mpn_divrem_2, as appropriate.
21792
21793	* mpn/generic/divrem.c: Rework variable usage for better register
21794	allocation.
21795
217961999-07-26  Torbjorn Granlund  <tege@swox.com>
21797
21798	* mpn/alpha/ev5/add_n.s: Rewrite for better ev6 speed.
21799	* mpn/alpha/ev5/sub_n.s: Likewise.
21800
218011999-07-21  Torbjorn Granlund  <tege@swox.com>
21802
21803	* longlong.h (alpha): Define umul_ppmm for cc.
21804
21805	* gmp-impl.h (DItype, UDItype): Define for non-gcc if _LONGLONG is
21806	defined.
21807
218081999-07-15  Torbjorn Granlund  <tege@swox.com>
21809
21810	* longlong.h (powerpc64 count_leading_zeros): Fix typo.
21811	(powerpc64 add_ssaaaa): Fix typos.
21812	(powerpc64 sub_ddmmss): Fix typos.
21813
218141999-07-14  Torbjorn Granlund  <tege@swox.com>
21815
21816	* mpz/tests/Makefile.in: Pass XCFLAGS when linking.
21817	* mpf/tests/Makefile.in: Likewise.
21818	* mpq/tests/Makefile.in: Likewise.
21819	* mpn/Makefile.in (.S.o): Pass XCFLAGS.
21820
21821	* longlong.h: Add support for 64-bit PowerPC.
21822	* config.sub: Handle "powerpc64".
21823	* configure.in: Likewise.
21824	* mpn/configure.in: Suppress use of config/t-ppc-aix for now,
21825	it seems compiler passes proper options.
21826	* mpn/powerpc64/*.S: New files.
21827
21828	* Makefile.in (FLAGS_TO_PASS): Pass "AR=$(AR)".
21829
218301999-07-07  Torbjorn Granlund  <tege@swox.com>
21831
21832	* demos/pexpr.c (factor): Change alloca call to a malloc/free pair.
21833
21834	* mpn/powerpc32/syntax.h: Add #define's for crN.
21835
21836	* gmp.h (gmp_rand_algorithm): Remove spurious `,'.
21837
218381999-07-05  Torbjorn Granlund  <tege@swox.com>
21839
21840	* mpn/generic/divrem_1.c: Normalize divisor when needed.
21841
218421999-07-02  Torbjorn Granlund  <tege@swox.com>
21843
21844	* mpn/configure.in (powerpc*-apple-mach): New configuration.
21845	* mpn/powerpc32/*: Add support for apple-macho syntax.
21846	* mpn/powerpc32/syntax.h: New file.
21847	* gmp-impl.h: Don't use `__attribute__' syntax for Apple's perversion
21848	of GCC.
21849
218501999-05-26  Linus Nordberg  <linus@swox.se>
21851
21852	* rand.c (gmp_rand_init): Fix typo.
21853
21854	* mpn/generic/rawrandom.c (mpn_rawrandom): Count bits, not limbs,
21855	to keep track of how many rounds to do in loop.  Clean up
21856	temporary allocation.  Update `seedsize' inside loop.  Mask off
21857	the correct number of bits from final result.  Init `mcopyp' even
21858	when not normalizing `m'.
21859
21860	* randlc.c (gmp_rand_init_lc): Fix typo (don't call
21861	mpz_init_set_ui()).
21862
21863	* mpn/generic/rawrandom.c (mpn_rawrandom): Set SIZ(s->seed) when
21864	reallocating.
21865
21866	* tests/rand/Makefile (test, bigtest): Add 33-bit tests.
21867
21868	* tests/rand/gen.c (main): Set precision of variable passed to
21869	mpf_urandomb().  Add option `-p'.
21870
218711999-05-25  Linus Nordberg  <linus@swox.se>
21872
21873	* randcm.c: Remove.
21874	* randcmui.c: Remove.
21875	* Makefile.in: Remove randcm and randcmui.
21876	* make.bat: Ditto.
21877	* gmp-impl.h: Remove prototypes for __gmp_rand_init_common() and
21878	__gmp_rand_init_common_ui().
21879	* randlc.c (gmp_rand_init_lc): Don't call
21880	__gmp_rand_init_common().
21881
21882	* randlcui.c (gmp_rand_init_lc_ui): Don't call
21883	__gmp_rand_init_common_ui().
21884
21885	* gmp.h (__gmp_rand_state_struct): Remove unused member `maxval'.
21886	* randclr.c (gmp_rand_clear): Remove reference to s->maxval.
21887	* randcm.c (__gmp_rand_init_common): Ditto
21888
21889	* mpn/generic/rawrandom.c (mpn_rawrandom): Don't calculate nlimbs
21890	twice.
21891
21892	* gmp.h (__gmp_rand_dist): Remove.
21893
218941999-05-24  Linus Nordberg  <linus@swox.se>
21895
21896	* mpn/generic/rawrandom.c: Clean up comments.
21897
21898	* gmp.texi: Add documentation for random number generation.
21899
219001999-05-21  Linus Nordberg  <linus@swox.se>
21901
21902	* gmp.h: Typedef `gmp_rand_state' as an array with one element.
21903	Change prototypes accordingly.
21904	* gmp-impl.h: Change prototypes using `gmp_rand_state'.
21905	* rand.c (gmp_rand_init): Take `gmp_rand_state' as argument
21906	instead of a pointer to a `gmp_rand_state'.
21907	* mpf/urandom.c (mpf_urandomb): Ditto.
21908	* mpz/urandom.c (mpz_urandomb): Ditto.
21909	* mpn/generic/rawrandom.c (mpn_rawrandom): Ditto.
21910	* randcmui.c (__gmp_rand_init_common_ui): Ditto.
21911	* randlc.c (gmp_rand_init_lc): Ditto.
21912	* randlcui.c (gmp_rand_init_lc_ui): Ditto.
21913	* randui.c (gmp_rand_init_ui): Ditto.
21914	* randcm.c (__gmp_rand_init_common): Ditto.
21915	* randclr.c (gmp_rand_clear): Ditto.
21916
21917	* tests/rand/gen.c (main): Pass `s' to rand-funcs instead of address
21918	of `s'.
21919
219201999-05-20  Linus Nordberg  <linus@swox.se>
21921
21922	* Makefile.in: Rename randi.c --> rand.c, randi_lc.c --> randlc.c,
21923	randicom.c --> randcm.c.  Add randui.c, randcmui.c, randlcui.c.
21924	* make.bat: Ditto.
21925
21926	* gmp.h: Add prototypes for gmp_rand_init_ui() and
21927	gmp_rand_init_lc_ui().
21928	* gmp-impl.h: Add prototypes for __gmp_rand_init_common() and
21929	__gmp_rand_init_common_ui().
21930
21931	* randlc.c, randcm.c, randclr.c, rand.c: Change #include of
21932	<gmp.h> to "gmp.h".
21933	* randclr.c: Include stdlib.h for free().
21934	* rand.c: Include gmp-impl.h.
21935
219361999-05-12  Torbjorn Granlund  <tege@swox.com>
21937
21938	* mpn/configure.in: Put generic m68k alternative last.
21939
219401999-05-04  Torbjorn Granlund  <tege@swox.com>
21941
21942	* demos/pexpr.c (setup_error_handler): Use sigemptyset to create
21943	empty set (for portability).
21944	(fns): Fix typo '#if #if'.
21945	(mpz_eval_expr): Implement FERMAT and MERSENNE.
21946
21947	* demos/pexpr.c: Cast longjmp argument via long to silent warnings on
21948	64-bit hosts.
21949
219501999-05-03  Torbjorn Granlund  <tege@swox.com>
21951
21952	* demos/pexpr.c: Add #defines for GMP 1.x and 2.0 compatibility.
21953
21954	* demos/pexpr.c (setup_error_handler): New function; take signal
21955	handler setup code from main(), with major modifications to use modern
21956	signal interface.
21957	(main): Remove signal handler setup code; call setup_error_handler.
21958
219591999-04-29  Linus Nordberg  <linus@swox.se>
21960
21961	* tests/rand/findcl.c (main): Add option '-i' for interval factor.
21962	Separate v and merit lose figures.  Add '-v' for version.
21963
219641999-04-28  Linus Nordberg  <linus@swox.se>
21965
21966	* tests/rand/statlib.c: Change debugging stuff.
21967
21968	* tests/rand/gmpstat.h: Add debug values definitions.
21969
21970	* tests/rand/findcl.c (main): Print low and high merit on startup.
21971	Print version string on startup.  Catch SEGV and HUP.  Add option -d
21972	for debug.  Fix bug making test for v too hard.
21973	(sh_status): New function.
21974	(sh_status): Flush stdout.  Add RCSID.
21975
219761999-04-27  Linus Nordberg  <linus@swox.se>
21977
21978	* tests/rand/Makefile (clean): Add target.
21979
219801999-04-27  Linus Nordberg  <linus.nordberg@canit.se>
21981
21982	* tests/rand/stat.c: Include gmpstat.h.
21983	Add global int g_debug.
21984
21985	* tests/rand/spect.c: Include <unistd.h>.
21986
21987	* tests/rand/findcl.c (main): Input is `m', not all factors of `m'.
21988	Print only the very first matching multiplier.  Include <unistd.h>.
21989	Flush stdout.  Print "done." when done.
21990
21991	* tests/rand/spect.c: Move everything but main() to statlib.c.
21992
21993	* tests/rand/findcl.c: New file.
21994
21995	* tests/rand/gmpstat.h: New file.
21996
21997	* tests/rand/statlib.c (merit, merit_u, f_floor, vz_dot,
21998	spectral_test): New functions.
21999
220001999-04-27  Torbjorn Granlund  <tege@swox.com>
22001
22002	* mpn/configure.in: Fix typo, "sparc-*)" was "sparc)".
22003
220041999-04-21  Torbjorn Granlund  <tege@swox.com>
22005
22006	* config.sub: Recognize ev6.
22007
220081999-04-12  Linus Nordberg  <linus.nordberg@canit.se>
22009
22010	* urandom.c: Split up into randclr.c, randi.c, randi_lc.c,
22011	randicom.c.
22012	* randclr.c, randi.c, randi_lc.c, randicom.c: New files.
22013	* Makefile.in: Remove urandom.  Add randclr, randi, randi_lc,
22014	randicom.
22015	* make.bat: Ditto
22016
220171999-03-31  Torbjorn Granlund  <tege@matematik.su.se>
22018
22019	* configure.in (sparc9-*-solaris2.[789]*, etc): New alternative.
22020	* mpn/configure.in: Use mt-sprc9 also for ultrasparc*-*-solaris2*.
22021
220221999-03-30  Linus Nordberg  <linus.nordberg@canit.se>
22023
22024	* urandom.c (__gmp_rand_scheme): Change NULL->0.
22025	Include "gmp.h" instead of <gmp.h>.
22026
220271999-03-29  Linus Nordberg  <linus.nordberg@canit.se>
22028
22029	* gmp.h (__gmp_rand_data_lc): Now holds a, c, m instead of scheme
22030	struct.
22031	(__gmp_rand_lc_scheme_struct): Remove mpz_t's `a' and `m'.
22032
22033	* tests/rand/stat.c (f_freq): Don't print 2nd level results if doing
22034	1st level.
22035
22036	* tests/rand/gen.c (main): Set default algorithm to mpz_urandomb.
22037	(main): Add option -c.
22038
220391999-03-24  Linus Nordberg  <linus.nordberg@canit.se>
22040
22041	* tests/rand/Makefile (GMPINC): Rename to GMPH.
22042	(GMPH): Add gmp-mparam.h.
22043	(CFLAGS): Add -I$(GMPLIBDIR)/mpn
22044
220451999-03-23  Linus Nordberg  <linus.nordberg@canit.se>
22046
22047	* Makefile.in: Compile top-dir/urandom.c.
22048	* make.bat: Ditto.
22049
22050	* mpn/Makefile.in: Compile rawrandom.c.
22051	* make.bat: Ditto.
22052
22053	* mpn/configure.in (functions): Add rawrandom.
22054
22055	* gmp.h (__gmp_rand_scheme_struct): Rename to
22056	__gmp_rand_lc_scheme_struct.
22057	(__gmp_rand_data_lc): Remove member 'n'.  Allocate a
22058	__gmp_rand_lc_scheme_struct instead of a pointer to one.
22059	Add prototype for gmp_rand_init_lc(), mpn_rawrandom().
22060	New prototype for mpz_urandomb().
22061
22062	* urandom.c: New file.
22063	(__gmp_rand_init_common): New function.
22064	(gmp_rand_init_lc): New function.
22065	(gmp_rand_init): Don't init data_lc->n.  Call gmp_rand_init_lc()
22066	and __gmp_rand_init_common().
22067	(gmp_rand_clear): Remove reference to data_lc->n.
22068
22069	* mpz/urandom.c (gmp_rand_init, gmp_rand_clear): Move to new file
22070	urandom.c in top-dir.
22071	(mpz_urandomb): Add function parameter nbits.  Call mpn_rawrandom().
22072
22073	* mpf/urandom.c (mpf_urandomb): Call mpn_rawrandom().
22074
22075	* mpn/generic/rawrandom.c: New file.
22076	(mpn_rawrandom): New function.
22077
220781999-03-17  Torbjorn Granlund  <tege@matematik.su.se>
22079
22080	* extract-dbl.c: When packing result, adjust exp when sc == 0.
22081
22082	* mpf/tests/t-get_d.c: New file.
22083	* mpf/tests/Makefile.in: Compile t-get_d.c.
22084
220851999-03-16  Linus Nordberg  <linus.nordberg@canit.se>
22086
22087	* mpz/urandom.c (__gmp_rand_scheme): Add extra braces around the
22088	mpz_t members.
22089
22090	* make.bat: Compile mpz/urandom.c and mpf/urandom.c
22091
22092	* tests/rand/statlib.c (ks_table): Use mpf_pow_ui() and exp().
22093
22094	* tests/rand/gen.c: Include unistd.h for getopt.
22095
220961999-03-15  Linus Nordberg  <linus.nordberg@canit.se>
22097
22098	* mpz/urandom.c (gmp_rand_init): New function.
22099	(gmp_rand_clear): New function.
22100	(mpz_urandomb): New function.
22101
22102	* mpz/Makefile.in: Compile urandom.c
22103
22104	* mpf/urandom.c (mpf_urandomb): New function.
22105
22106	* mpf/Makefile.in: Compile urandom.c.
22107
22108	* gmp.h (__gmp_rand_state_struct, __gmp_rand_scheme_struct): New
22109	structs for randomization functions.
22110	(gmp_rand_dist, gmp_rand_alogrithm): New enums for randomization
22111	functions.
22112	(mpz_urandomb, mpf_urandomb): Add prototype.
22113	(gmp_rand_init, gmp_rand_clear): Add prototype.
22114
22115	* tests/rand/gen.c, stat.c, statlib.c, statlib.h: New files.
22116	* tests/rand/Makefile, tests/rand/ChangeLog: New files.
22117
221181999-03-15  Torbjorn Granlund  <tege@matematik.su.se>
22119
22120	* .gdbinit: New file.
22121
22122	* mpz/dump.c: New file.
22123	* mpz/Makefile.in: Compile dump.c.
22124	* make.bat: Likewise.
22125	* gmp.h (mpz_dump): Declare.
22126
221271999-03-14  Torbjorn Granlund  <tege@matematik.su.se>
22128
22129	* mpz/tests/reuse.c: Also test mpz_invert and mpz_divexact.
22130
22131	* mpz/tests/convert.c: Update to GMP 2 variable syntax.
22132
221331999-03-13  Torbjorn Granlund  <tege@matematik.su.se>
22134
22135	* mpf/README: New file.
22136	* mpz/README: New file.
22137
22138	* mpf/pow_ui.c: New file.
22139	* mpf/Makefile.in: Compile pow_ui.c.
22140	* make.bat: Likewise.
22141	* gmp.h (mpf_pow_ui): Declare.
22142
221431999-03-12  Torbjorn Granlund  <tege@matematik.su.se>
22144
22145	* mpn/configure.in: Stage 1 of rewrite.
22146	* mpn/underscore.h: New name for bsd.h.
22147	* mpn/sysv.h: Deleted.
22148
22149	* mpn/m68k/*: Don't include sysdep.h.
22150
22151	* mpn/pa64/README: New file.
22152
221531999-03-11  Torbjorn Granlund  <tege@matematik.su.se>
22154
22155	* mpn/powerpc32/add_n.S: Add support for both AIX and ELF syntax.
22156	Renamed from `.s'.
22157	* mpn/powerpc32/sub_n.S: Likewise.
22158	* mpn/powerpc32/lshift.S: Likewise.
22159	* mpn/powerpc32/rshift.S: Likewise.
22160	* mpn/powerpc32/mul_1.S: Likewise.
22161	* mpn/powerpc32/addmul_1.S: Likewise.
22162	* mpn/powerpc32/submul_1.S: Likewise.
22163
22164	* mpn/powerpc32/umul.S: New file.
22165	* mpn/sparc32/v8/umul.S: New file.
22166	* mpn/sparc32/umul.S: New file.
22167	* mpn/x86/umul.S: New file.
22168	* mpn/x86/udiv.S: New file.
22169
22170	* mpn/Makefile.in (mul_basecase.o): Delete rule.
22171
221721999-02-22  Torbjorn Granlund  <tege@matematik.su.se>
22173
22174	* configure.in (hppa2.0*-*-*): Force use of GCC.
22175
22176	* extract-dbl.c: Handle IEEE denormalized numbrs.  Clean up.
22177
221781998-12-02  Torbjorn Granlund  <tege@matematik.su.se>
22179
22180	* mpn/Makefile.in (CCAS): New macro.
22181	(.s.o): Use CCAS.
22182	(.S.o): Likewise.
22183
22184	* mpn/Makefile.in (mul_basecase.o): Add dependency.
22185	(sqr_basecase.o): Likewise.
22186	(mod_1.o): Likewise.
22187
22188	* demos/pexpr.c (cputime): Test also __hpux.
22189	(cleanup_and_exit): Check SIGXCPU only #ifdef LIMIT_RESOURCE_USAGE.
22190
22191	* mpz/tests/t-2exp.c: Use urandom, not random.
22192
22193	* mpn/configure.in (arm*-*-*): New alternative.
22194
221951998-11-30  Torbjorn Granlund  <tege@matematik.su.se>
22196
22197	* gmp-impl.h (union ieee_double_extract): Special case for
22198	little-endian arm.
22199	(LIMBS): Alias for PTR.
22200
222011998-11-26  Torbjorn Granlund  <tege@matematik.su.se>
22202
22203	* longlong.h (m68000 umul_ppmm): Use `muluw', not `mulu'.
22204	(m68k stuff): Clean up; add coldfire support.
22205
222061998-11-23  Torbjorn Granlund  <tege@matematik.su.se>
22207
22208	* mpn/mips3/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
22209	(KARATSUBA_SQR_THRESHOLD): #define.
22210
22211	* mpn/sparc32/v9/README: New file.
22212
222131998-11-20  Torbjorn Granlund  <tege@matematik.su.se>
22214
22215	* mpn/x86/README: New file.
22216
22217	* mpn/arm/gmp-mparam.h: New file.
22218	* mpn/pa64/gmp-mparam.h: New file.
22219	* mpn/hppa/gmp-mparam.h: New file.
22220	* mpn/x86/pentium/gmp-mparam.h: New file.
22221	* mpn/sparc32/v9/gmp-mparam.h: New file.
22222	* mpn/powerpc32/gmp-mparam.h: New file.
22223	* mpn/x86/p6/gmp-mparam.h: New file.
22224
22225	* mpn/alpha/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
22226	(KARATSUBA_SQR_THRESHOLD): #define.
22227
22228	* mpn/configure.in: Point to x86/p6 when appropriate.
22229
22230	* mpn/power/umul.s: New file.
22231	* mpn/power/sdiv.s: New file.
22232	* mpn/pa64/addmul_1.S: New file.
22233	* mpn/pa64/submul_1.S: New file.
22234	* mpn/pa64/mul_1.S: New file.
22235	* mpn/pa64/udiv_qrnnd.c: New file.
22236	* mpn/pa64/umul_ppmm.S: New file.
22237	* mpn/mips2/umul.s: New file.
22238	* mpn/m68k/mc68020/umul.s: New file.
22239	* mpn/m68k/mc68020/udiv.s: New file.
22240	* mpn/hppa/hppa1_1/umul.s: New file.
22241	* mpn/alpha/umul.s: New file.
22242	* mpn/a29k/udiv.s: New file.
22243	* mpn/a29k/umul.s: New file.
22244
222451998-11-17  Torbjorn Granlund  <tege@matematik.su.se>
22246
22247	* mpn/x86/mul_basecase.S: New file for non-pentiums.
22248	* mpn/x86/mul_basecase.S: Move to mpn/x86/pentium.
22249
222501998-11-16  Torbjorn Granlund  <tege@matematik.su.se>
22251
22252	* make.bat: Compile mul_basecase.c and sqr_basecase.c.
22253
222541998-11-10  Torbjorn Granlund  <tege@matematik.su.se>
22255
22256	* mpz/invert.c: Defer writing to parameter `invert' until
22257	end.
22258
222591998-11-03  Torbjorn Granlund  <tege@matematik.su.se>
22260
22261	* mpn/pa64/udiv_qrnnd.c: Handle more border cases.
22262
222631998-10-29  Torbjorn Granlund  <tege@matematik.su.se>
22264
22265	* insert-dbl.c: Special case biased exponents < 1; Get boundary for
22266	Inf right.
22267
22268	* longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB): New #define.
22269
222701998-10-28  Torbjorn Granlund  <tege@matematik.su.se>
22271
22272	* mpn/powerpc32/submul_1.s: Rewrite, optimizing for PPC604.
22273	* mpn/powerpc32/addmul_1.s: Likewise.
22274	* mpn/powerpc32/lshift.s: Likewise.
22275
222761998-10-23  Torbjorn Granlund  <tege@matematik.su.se>
22277
22278	* config/mt-sprc9-gcc (XCFLAGS): Add -Wa,-xarch=v8plus.
22279
22280	* mpn/sparc32/v9/submul_1.s: New file.
22281
222821998-10-21  Torbjorn Granlund  <tege@matematik.su.se>
22283
22284	* mpn/config/mt-pa2hpux: New file.
22285	* mpn/configure.in (hppa2.0*-*-*): Use new 64-bit code.
22286
22287	* config.sub: Recognize hppa2.0 as CPU type.
22288
22289	* longlong.h (64-bit hppa): Add umul_ppmm and udiv_qrnnd.
22290	* mpn/pa64/mul_1.S: New file.
22291	* mpn/pa64/addmul_1.S: New file.
22292	* mpn/pa64/submul_1.S: New file.
22293	* mpn/pa64/umul_ppmm.S: New file.
22294	* mpn/pa64/udiv_qrnnd.c: New file.
22295
222961998-10-20  Torbjorn Granlund  <tege@matematik.su.se>
22297
22298	* mpz/pprime_p.c: Pass 1L, not 1, to mpz_cmp_ui.
22299
22300	* mpz/fdiv_q_2exp.c: Cast `long' argument to `mp_limb_t' for mpn calls.
22301	* mpz/gcd_ui.c: Likewise.
22302	* mpz/add_ui.c: Likewise.
22303	* mpz/sub_ui.c: Likewise.
22304
223051998-10-19  Torbjorn Granlund  <tege@matematik.su.se>
22306
22307	* mpn/generic/bdivmod.c: Avoid using switch statement with mp_limb_t
22308	index.
22309
223101998-10-17  Torbjorn Granlund  <tege@matematik.su.se>
22311
22312	* mpn/sparc32/v9/mul_1.s: Misc cleanups.
22313	* mpn/sparc32/v9/addmul_1.s: Misc cleanups.
22314
223151998-10-16  Torbjorn Granlund  <tege@matematik.su.se>
22316
22317	* mpn/tests/{add,sub,}mul_1.c: Print xlimb using mpn_print.
22318
22319	* mpz/tests/t-powm.c (SIZE): Increase to 50.
22320	(EXP_SIZE): New parameter; use it for computing exp_size.
22321
223221998-10-15  Torbjorn Granlund  <tege@matematik.su.se>
22323
22324	* mpn/generic/divrem_newt.c: Use TMP_ALLOC interface.
22325
22326	* mpn/generic/sqrtrem.c: Check BITS_PER_MP_LIMB before defining
22327	assembly variants of SQRT.
22328
223291998-10-14  Torbjorn Granlund  <tege@matematik.su.se>
22330
22331	* mpn/tests: Clean up timing routines.  Don't include longlong.h
22332	where it is not needed.
22333	(mpn_print): Handle printing when _LONG_LONG_LIMB.
22334	* mpn/tests/{add,sub,}mul_1.c: Generate xlimb with mpn_random2
22335	and do it whether TIMES != 1 or not.
22336
22337	* mpn/generic/mul_n.c: Delay assignment of `sign' for lower
22338	register pressure.
22339
22340	* mpn/sparc32/v9/mul_1.s: New file.
22341
22342	* config/mt-sprc9-gcc: New file.
22343	* configure.in: Use it.
22344
22345	* mpn/configure.in: Use sparc64 for Solaris 2.7 and later with a
22346	sparc v9 CPU.
22347	* mpn/configure.in: Use sparc32/v9 for Solaris 2.6 or earlier with
22348	a sparc v9 CPU.
22349
22350	* mpf/sub.c: In initial code for ediff == 0, limit precision
22351	before jumping to `normalize'.
22352
223531998-10-13  Torbjorn Granlund  <tege@matematik.su.se>
22354
22355	* mpn/hppa/hppa2_0/add_n.s: New file.
22356	* mpn/hppa/hppa2_0/sub_n.s: New file.
22357	* mpn/configure.in: Handle hppa2.0 (32-bit code for now).
22358
22359	* config.guess: Update from egcs 1.1.
22360	(9000/[3478]??:HP-UX:*:*): Properly return 2.0 for all known 2.0
22361	machines.
22362
223631998-10-07  Torbjorn Granlund  <tege@matematik.su.se>
22364
22365	* mpz/root.c (mpz_root): New file.
22366	* mpz/Makefile.in: Compile it.
22367	* make.bat: Likewise.
22368	* gmp.h (mpz_root): Declare.
22369
22370	* mpz/perfpow.c: New file.
22371	* mpz/Makefile.in: Compile it.
22372	* make.bat: Likewise.
22373	* gmp.h (mpz_perfect_power_p): Declare.
22374
22375	* mpz/remove.c: New file.
22376	* mpz/Makefile.in: Compile it.
22377	* make.bat: Likewise.
22378	* gmp.h (mpz_remove): Declare.
22379
22380	* mpz/bin_ui.c: New file.
22381	* mpz/Makefile.in: Compile it.
22382	* make.bat: Likewise.
22383	* gmp.h (mpz_bin_ui): Declare.
22384
22385	* mpz/bin_uiui.c: New file.
22386	* mpz/Makefile.in: Compile it.
22387	* make.bat: Likewise.
22388	* gmp.h (mpz_bin_uiui): Declare.
22389
223901998-09-16  Torbjorn Granlund  <tege@matematik.su.se>
22391
22392	* longlong.h: Test for __powerpc__ in addition to _ARCH_PPC.
22393
22394Sat Sep  5 17:22:28 1998  Torbjorn Granlund  <tege@matematik.su.se>
22395
22396	* mpf/cmp_si.c: Compare most significant mantissa limb before
22397	trying to deduce anything from the limb count.
22398	* mpf/cmp_ui.c: Likewise.
22399
22400Tue Aug 18 10:24:39 1998  Torbjorn Granlund  <tege@matematik.su.se>
22401
22402	* mpz/pprime_p.c (mpz_probab_prime_p): Add new code block
22403	for doing more dividing.
22404
22405Sat Aug 15 18:43:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
22406
22407	* mpn/generic/divrem_newt.c: New name for divrem_newton.c.
22408	* mpn/Makefile.in: Corresponding changes.
22409	* mpn/configure.in: Likewise.
22410
22411Wed Aug 12 23:07:09 1998  Torbjorn Granlund  <tege@matematik.su.se>
22412
22413	* config.guess: Handle powerpc for NetBSD.
22414
22415Tue Jul 28 23:10:55 1998  Torbjorn Granlund  <tege@matematik.su.se>
22416
22417	* mpz/fib_ui.c: New file.
22418	* mpz/Makefile.in: Compile it.
22419	* make.bat: Likewise.
22420	* gmp.h (mpz_fib_ui): Declare.
22421
22422Wed Jun 17 22:52:58 1998  Torbjorn Granlund  <tege@matematik.su.se>
22423
22424	* make.bat: Fix typo, `asm-synt.h' => `asm-syntax.h'.
22425
22426Wed Jun  3 11:27:32 1998  Torbjorn Granlund  <tege@matematik.su.se>
22427
22428	* config/mt-pwr: New file.
22429	* config/mt-ppc: New file.
22430	* configure.in: Use the new files.
22431
22432Tue Jun  2 13:04:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
22433
22434	* mpn/sparc32/v9/addmul_1.s: New file.
22435	* mpn/config/mt-sprc9: New file.
22436	* mpn/configure.in: Use mt-sprc9.
22437
22438Tue May 26 11:24:18 1998  Torbjorn Granlund  <tege@matematik.su.se>
22439
22440	* demos/factorize.c (factor_using_pollard_rho): Pass correct
22441	parameters in recursive calls; join the two recursion arms.
22442
22443	* mpf/set_q.c: Set result sign.
22444	When normalizing the numerator, don't allow it to increase in size
22445	beyond prec.
22446
22447Tue May 19 17:28:14 1998  Torbjorn Granlund  <tege@matematik.su.se>
22448
22449	* demos/factorize.c (factor_using_division): Call fflush
22450	also for the factor 2.
22451
22452Mon May 18 15:51:01 1998  Torbjorn Granlund  <tege@matematik.su.se>
22453
22454	* make.bat: Pass -fomit-frame-pointer.  Do not pass -g.
22455
22456Tue May  5 01:42:50 1998  Torbjorn Granlund  <tege@matematik.su.se>
22457
22458	* mpz/Makefile.in (LOCAL_CC): Remove definition.
22459
22460	* gmp.h: Get rid of GMP_SMALL stuff.
22461	* mpz/Makefile.in: Likewise.
22462	* mpq/Makefile.in: Likewise.
22463	* mpf/Makefile.in: Likewise.
22464
22465	* mpz/invert.c: Fix typo in comment.
22466
22467Mon May  4 23:05:32 1998  Torbjorn Granlund  <tege@matematik.su.se>
22468
22469	* mpn/generic/sqrtrem.c: Check that __arch64__ is not defined
22470	before defining sparc SQRT.
22471
22472Mon Apr 20 19:16:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
22473
22474	* mpn/generic/gcdext.c: Allow gp to be NULL.
22475
224761998-04-03  Torbjorn Granlund  <tege@matematik.su.se>
22477
22478	* mpn/configure.in: Recognize `alphaev5*', not `alphaev5'.
22479
22480	* config.guess: Handle CPU variants for NetBSD.
22481
22482Mon Mar 16 13:07:54 1998  Torbjorn Granlund  <tege@matematik.su.se>
22483
22484	* mpz/pprime_p.c: Use mpn_mod_1/mpn_preinv_mod_1 for computing mod PP,
22485	not mpz_tdiv_r_ui (which expects an `unsigned long').
22486	(mpz_probab_prime_p): Change type of `r' to mp_limb_t.
22487
22488Thu Mar 12 17:19:04 1998  Torbjorn Granlund  <tege@matematik.su.se>
22489
22490	* gmp.h (mpf_ceil, mpf_floor, mpf_trunc): Add declarations.
22491
22492	* config.guess: Update from FSF version.
22493	* config.sub: Likewise.
22494
22495	* config.guess: Add special handling of alpha-*-NetBSD.
22496
22497Wed Mar 11 00:55:34 1998  Torbjorn Granlund  <tege@matematik.su.se>
22498
22499	* mpz/inp_str.c: Update from set_str.c.
22500	Properly increment `nread' when skipping minus sign.
22501
22502	* mpz/set_str.c: Check for empty string after having skipped
22503	leading zeros.
22504
22505Mon Mar  9 19:28:00 1998  Torbjorn Granlund  <tege@matematik.su.se>
22506
22507	* mpz/set_str.c: Skip leading zeros.
22508
22509Wed Mar  4 19:29:16 1998  Torbjorn Granlund  <tege@matematik.su.se>
22510
22511	* gmp.h (mpz_cmp_si): Cast argument before calling mpz_cmp_ui.
22512
22513	* demos/factorize.c: Rewrite.
22514
225151998-02-04  Torbjorn Granlund  <tege@matematik.su.se>
22516
22517	* configure.in (i[3456]86* etc): Check if using gcc before
22518	choosing mt-x86.
22519
22520	* configure.in (m68*-*-*): New alternative.
22521	* config/mt-m68k: New file.
22522
22523	* mpn/alpha/invert-limb.s: Put tables in text segment,
22524	since not all systems support "rdata".
22525
22526Wed Feb  4 02:20:57 1998  Torbjorn Granlund  <tege@matematik.su.se>
22527
22528	* gmp.h (__GNU_MP_VERSION_SNAP): New #define.
22529	(__GNU_MP_VERSION_MINOR): Now 1.
22530
22531Wed Jan 28 22:29:36 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22532
22533	* longlong.h (alpha udiv_qrnnd): #define UDIV_NEEDS_NORMALIZATION.
22534
22535Wed Jan 28 20:28:19 1998  Torbjorn Granlund  <tege@sophie.matematik.su.se>
22536
22537	* mpz/pprime_p.c (mpz_probab_prime_p): Delete 59 from tried divisors.
22538
22539Mon Jan 26 01:39:02 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22540
22541	* mpz/pprime_p.c (mpz_probab_prime_p): Major overhaul: Check small
22542	numers specifically; check small factors, then perform a fermat test.
22543
22544Tue Jan 13 14:58:28 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22545
22546	* longlong.h (alpha udiv_qrnnd): Call __mpn_invert_normalized_limb
22547	and udiv_qrnnd_preinv.
22548
22549Wed Jan  7 01:52:54 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22550
22551	* mpn/configure.in (alpha*, extra_functions): Add invert-limb and
22552	remove udiv_qrnnd.
22553
22554	* mpn/tests/divrem.c: Get allocations right.
22555
22556	* mpn/generic/divrem.c: Conditionally pre-invert most significant
22557	divisor limb.
22558
22559Tue Jan  6 23:08:54 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22560
22561	* mpn/generic/divrem_1.c: Rename variables to comply to conventions.
22562	Make `i' have type `mp_size_t'.
22563
22564Tue Dec 30 22:21:42 1997  Torbjorn Granlund  <tege@matematik.su.se>
22565
22566	* mpz/tdiv_qr_ui.c: Return the remainder.
22567	* mpz/tdiv_r_ui.c: Likewise.
22568	* mpz/tdiv_q_ui.c: Likewise.
22569	* gmp.h: Change return type of mpz_tdiv_qr_ui, mpz_tdiv_r_ui,
22570	mpz_tdiv_q_ui.
22571
22572	* mpz/tdiv_ui.c: New file.
22573	* mpz/Makefile.in: Compile it.
22574	* make.bat: Likewise.
22575	* gmp.h (mpz_tdiv_ui): Declare.
22576
22577Fri Nov  7 04:21:15 1997  Torbjorn Granlund  <tege@matematik.su.se>
22578
22579	* mpf/integer.c (FUNC_NAME): Fix bogus test for mpf_trunc.
22580
22581	* demos/isprime.c: New file.
22582
22583	Sat Nov  1 19:32:25 1997  Torbjorn Granlund  <tege@matematik.su.se>
22584
22585	* mpz/cmp_abs.c: New file.
22586	* mpz/Makefile.in: Compile it.
22587	* make.bat: Likewise.
22588	* gmp.h (mpz_cmp_abs): Declare.
22589
22590	* mpz/cmp_abs_ui.c: New file.
22591	* mpz/Makefile.in: Compile it.
22592	* make.bat: Likewise.
22593	* gmp.h (mpz_cmp_abs_ui): Declare.
22594
22595Sat Sep 27 04:49:52 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22596
22597	* mpz/fdiv_r_2exp.c: Get allocation for `tmp' right.
22598
22599	* mpz/fdiv_q_2exp.c: In final result adjustment code, handle
22600	that intermediate result is zero.
22601
22602	* mpz/tests/t-2exp.c: New file.
22603	* mpz/tests/Makefile.in: Handle t-2exp.c.
22604
22605Fri Sep 26 16:29:21 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22606
22607	* mpz/divexact.c: Fix typo in test for whether to copy numerator to
22608	quotient and move that statement to after handling quotient and
22609	denominator overlap.  Misc cleanups.
22610
22611	* mpn/generic/gcd.c: Change count argument of mpn_lshift/mpn_rshift
22612	calls to `unsigned int'.
22613	* mpz/divexact.c: Likewise.
22614
22615Mon Sep 22 02:19:52 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22616
22617	* mpz/tests/t-powm.c: Decrease `reps' to 2500.
22618
22619	* mpz/tests/t-pow_ui.c: New file.
22620	* mpz/tests/Makefile.in: Handle t-pow_ui.c.
22621
22622	* mpz/ui_pow_ui.c: Get special cases for exponent and base right.
22623
22624	* mpz/pow_ui.c: Increase temp space allocation by 1 limb.
22625	Split `rsize' into two variables; compute space allocation into
22626	`ralloc'.
22627
22628Sun Sep  7 04:15:12 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22629
22630	* mpn/pa64/lshift.s: New file.
22631	* mpn/pa64/rshift.s: New file.
22632	* mpn/pa64/sub_n.s: New file.
22633
22634Sat Sep  6 19:14:13 1997  Torbjorn Granlund  <tege@gmp.tmg.se>
22635
22636	* mpn/pa64/add_n.s: New file.
22637	* mpn/pa64: New directory.
22638
22639Tue Aug 19 16:17:09 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22640
22641	* mpz/swap.c: New file.
22642	* mpz/Makefile.in: Compile it.
22643	* make.bat: Likewise.
22644	* gmp.h (mpz_swap): Declare.
22645
22646	* mpn/generic/mul_n.c: Push assignment of x and y pointers into the
22647	if/else clauses in several places.  (Decreases register pressure.)
22648
22649Mon Aug 18 03:29:50 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22650
22651	* mpn/thumb/add_n.s: New file.
22652	* mpn/thumb/sub_n.s: New file.
22653	* mpn/arm/add_n.s: New file.
22654	* mpn/arm/sub_n.s: New file.
22655
22656	* mpz/powm.c: After mpn_mul_n and mpn_mul calls, adjust product size
22657	if most significant limb is zero.
22658	* mpz/powm_ui.c: Likewise.
22659
22660Fri Aug 15 02:13:57 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22661
22662	* mpn/arm/m/mul_1.s: New file.
22663	* mpn/arm/m/addmul_1.s: New file.
22664
22665	* mpn/powerpc32/mul_1.s: Rewrite.
22666
22667	* mpn/alpha/mul_1.s: Prefix labels with `.'.
22668
22669Mon Aug 11 02:37:16 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22670
22671	* mpn/powerpc32/add_n.s: Rewrite.
22672	* mpn/powerpc32/sub_n.s: Rewrite.
22673
22674Sun Aug 10 17:07:15 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22675
22676	* mpn/powerpc32/addmul_1.s: Delete obsolete comments.
22677	* mpn/powerpc32/submul_1.s: Likewise.
22678
22679Fri Jul 25 20:07:54 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22680
22681	* mpz/addmul_ui.c: New file.
22682	* mpz/Makefile.in: Compile it.
22683	* make.bat: Likewise.
22684	* gmp.h (mpz_addmul_ui): Declare.
22685
22686	* mpz/setbit.c: Add missing code after final `else'.
22687
22688Tue Jul 22 17:45:01 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22689
22690	* mpn/sh/add_n.s: Fix typo.
22691	* mpn/sh/sub_n.s: Likewise.
22692
22693	* longlong.h (ns32k count_trailing_zeros): Fix typo.
22694
22695	* insert-dbl.c: Check for exponent overflow and return Inf.
22696
22697	* mpz/get_d.c: Rewrite to avoid rounding errors.
22698
22699Thu May 29 11:51:07 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22700
22701	* mpq/add.c: Swap some usages of tmp1 and tmp2 to make sure
22702	their allocation suffices.
22703	* mpq/sub.c: Likewise.
22704
22705Wed Apr 16 02:24:25 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22706
22707	* demos/pexpr.c: New file.
22708
22709	* mpn/generic/mul_n.c: Misc optimizations from Robert Harley.
22710
22711	* gmp-impl.h (MPZ_PROVOKE_REALLOC): New #define.
22712
22713Sat Apr 12 17:54:04 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22714
22715	* mpz/tstbit.c: New file.
22716	* mpz/Makefile.in: Compile it.
22717	* make.bat: Likewise.
22718	* gmp.h (mpz_tstbit): Declare.
22719
22720	* mpz/tests/logic.c: Use MPZ_CHECK_FORMAT.
22721	* mpz/tests/bit.c: New test.
22722	* mpz/tests/Makefile.in: Handle bit.c.
22723
22724	* mpz/ior.c: In -OP2,+OP1 case, normalize OP2 after call to mpn_sub_1.
22725
22726	* gmp-impl.h (MPZ_CHECK_FORMAT): New #define.
22727
22728Thu Apr 10 00:30:14 1997  Torbjorn Granlund  <tege@tmg.se>
22729
22730	* longlong.h (POWER/PowerPC): Test _ARCH_PWR instead of _IBMR2.
22731
22732Wed Apr  9 18:23:31 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22733
22734	* gmp-impl.h: Move defaulting of UMUL_TIME and UDIV_TIME from here...
22735	* longlong.h: ...to here.
22736
22737Sun Mar 30 12:16:23 1997  Torbjorn Granlund  <tege@matematik.su.se>
22738
22739	* mpn/generic/next_prime.c: New file.
22740
22741	* mpn/generic/perfsqr.c: Remove definitions of PP and PP_INVERTED.
22742	* gmp-impl.h: Put them here.
22743
22744Fri Mar 28 08:18:05 1997  Torbjorn Granlund  <tege@matematik.su.se>
22745
22746	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Define as inline asm for
22747	for x86, but leave disabled for now.
22748
22749Fri Feb 28 02:39:47 1997  Torbjorn Granlund  <tege@matematik.su.se>
22750
22751	* mpn/Makefile.in (.S.o): Pass SFLAGS and CFLAGS also to compiler
22752	for assembly phase.
22753	(.s.o): Pass SFLAGS.
22754
22755Wed Feb 26 06:46:08 1997  Torbjorn Granlund  <tege@matematik.su.se>
22756
22757	* mpn/configure.in: For Pentium Pro, use default code, not Pentium
22758	optimized code.
22759
22760	* mpn/x86/addmul_1.S: Unroll and optimize for Pentium Pro.
22761	* mpn/x86/submul_1.S: Likewise.
22762
22763Thu Feb 13 08:26:09 1997  Torbjorn Granlund  <tege@matematik.su.se>
22764
22765	* mpf/Makefile.in: Compile floor.o, ceil.o and trunc.o (from
22766	integer.c).
22767	* make.bat: Likewise.
22768
22769Wed Feb  5 05:58:44 1997  Torbjorn Granlund  <tege@matematik.su.se>
22770
22771	* mpn/configure.in (alpha*): Add cntlz to extra_functions.
22772
22773Wed Feb  4 03:30:45 1997  Torbjorn Granlund  <tege@matematik.su.se>
22774
22775	* mpf/integer.c: New file (supporting mpf_floor, mpf_ceil, mpf_trunc).
22776
22777Mon Feb  3 14:21:36 1997  Torbjorn Granlund  <tege@matematik.su.se>
22778
22779	* make.bat: Fix typo, set_dfl_prc => set_dfl_prec.
22780
22781Sun Feb  2 02:34:33 1997  Torbjorn Granlund  <tege@matematik.su.se>
22782
22783	* mpf/out_str.c: After outputting `-', decrement n_digits.
22784
22785Wed Jan  8 02:50:20 1997  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22786
22787	* mpn/generic/divrem.c: qextra_limbs => qxn.
22788
22789Wed Dec 18 07:50:46 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22790
22791	* mpz/tests/t-tdiv.c (SIZE): Increase to 200.
22792
22793Tue Dec 17 19:32:48 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22794
22795	* mpn/generic/divrem.c (mpn_divrem_classic): New name for mpn_divrem.
22796	* gmp.h (mpn_divrem): New function.
22797	* mpn/generic/divrem_newton.c: New file.
22798	* mpn/configure.in (functions): Add divrem_newton.
22799	* make.bat: Likewise.
22800
22801Thu Dec 12 17:55:13 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22802
22803	* gmp.h (_GMP_H_HAVE_FILE): Test also __dj_include_stdio_h_.
22804
22805Sat Dec  7 09:40:06 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22806
22807	* mpn/alpha/invert-limb.s: New file.
22808
22809Thu Dec  5 01:25:31 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22810
22811	* mpz/ui_pow_ui.c (mpz_pow2): New (static) function.
22812	(mpz_ui_pow_ui): Rewrite.
22813
22814	* make.bat: `pre_mod_1.c' => `pre_mod_.c'.  Fix typo in path to
22815	gmp-mpar.h.
22816
22817Fri Nov 15 00:49:55 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22818
22819	* mpz/ui_pow_ui.c: Rewrite for better speed.
22820
22821Fri Nov  1 16:36:56 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22822
22823	* Makefile.in (recursive make rules): Use `&&' instead of `;' as
22824	delimiter.
22825
22826Fri Oct 25 17:12:36 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22827
22828	* gmp-impl.h (Cray/uxp MPN_COPY): Really declare as inline.
22829
22830Thu Oct 24 15:08:19 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22831
22832	* mpn/fujitsu/rshift.c: Fix typo in loop boundaries.
22833
22834Fri Oct 18 03:13:54 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22835
22836	* mpn/configure.in: Recognize `nextstep' for m68k variants; likewise
22837	for x86 variants.
22838
22839	* mpn/x86/syntax.h (INSND): New macro.
22840	* mpn/x86/[lr]shift.S: Use INSND.
22841	* mpn/x86/pentium/[lr]shift.S: Likewise.
22842	* mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS.
22843
22844	* gmp-impl.h: In code for determining endianness, test also
22845	__BIG_ENDIAN__ and __hppa__.  Remove test of __NeXT__.
22846
22847Wed Oct 16 03:50:34 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22848
22849	* mpf/set_str.c: Let `prec' determine precision used in
22850	exponentiation code; decrease allocation accordingly.
22851
22852	* mpn/vax: Change `jsob*' to `sob*' in all files.
22853
22854Tue Oct 15 03:54:06 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22855
22856	* longlong.h (m88110 udiv_qrnnd): Change type of intermediate quotient
22857	to DImode (divu.d generates a 64-bit quotient).
22858
22859	* configure.in (m88110*): Fix typo.
22860
22861	* mpf/get_str.c: Compute exp_in_base using `double' to avoid overflow.
22862
22863	* gmp-impl.h (struct bases): Change type of chars_per_bit_exactly from
22864	float to double.
22865	* mpn/mp_bases.c (__mp_bases): Give 17 digits for chars_per_bit_exactly
22866	field.
22867
22868	* mpf/get_str.c: Let `prec' determine precision used in
22869	exponentiation code; decrease allocation accordingly.
22870
22871Sun Oct 13 03:31:53 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22872
22873	* longlong.h: Major cleanup.
22874	(__udiv_qrnnd_c): Compute remainders using multiply and subtract,
22875	not explicit `%' operator.
22876	(C umul_ppmm): Get rid of a redundant __ll_lowpart.
22877
22878	* mpz/invert.c: Properly detect all operands that would yield an
22879	undefined inverse; make sure the inverse is always positive.
22880
22881	* mpz/xor.c: New file.
22882	* mpz/Makefile.in: Compile it.
22883	* make.bat: Likewise.
22884	* gmp.h (mpz_xor): Declare.
22885
22886	* mpz/tests/logic.c: Also test mpz_xor.
22887
22888	* mpz/lcm.c: Special case for when either operand equals 0.
22889
22890Sat Oct 12 01:57:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22891
22892	* mpn/generic/gcd.c (find_a): Don't inline on x86.
22893
22894	* Makefile.in (CFLAGS): Default to just `-g'.
22895
22896	* configure.in: Recognize 386 and 486 wherever other x86 cpus are
22897	recognized.
22898	* configure.in: Use mt-x86 for all x86 cpus.
22899	* config/mt-x86: New file.
22900
22901	* mpn/alpha/cntlz.s: New file.
22902
22903Tue Oct  8 00:16:18 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22904
22905	* longlong.h: Define smul_ppmm for Fujitsu vpp/uxp.
22906	Rewrite umul_ppmm to actually work on the hardware.
22907
22908	* mpn/x86/sub_n.S: Avoid parens around displacement of `leal'.
22909	* mpn/x86/add_n.S: Likewise.
22910
22911	* mpn/x86/syntax.h (R): Define differently depending on __STDC__.
22912
22913Mon Oct  7 16:48:08 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22914
22915	* longlong.h: Don't test for __NeXT__ in outer 68k conditional;
22916	add test for __m68k__.
22917
22918Sun Oct  6 00:59:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22919
22920	* gmp.h: Declare mpn_random.
22921	* make.bat: Compile mpn/generic/random.c.
22922
22923	* longlong.h: Define umul_ppmm for Fujitsu vpp/uxp.
22924
22925	* gmp-impl.h: Protect definitions using `__attribute__ ((mode (...)))'
22926	with test also for __GNUC_MINOR__.
22927
22928	* gmp.h: Don't define macros using __builtin_constant_p when using
22929	NeXT's compiler.
22930
22931Fri Oct  4 16:53:50 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22932
22933	* mpz/lcm.c: New file.
22934	* mpz/Makefile.in: Compile it.
22935	* make.bat: Likewise.
22936	* gmp.h (mpz_lcm): Declare.
22937
22938Wed Sep 25 00:06:21 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22939
22940	* mpq/tests/t-cmp_ui.c: Make sure numerator and denominator of `b' is
22941	within limits of an `unsigned long int'.
22942
22943	* mpz/tests/t-powm_ui.c: Change type of exp2 to `unsigned long int'.
22944
22945Tue Sep 24 18:58:20 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22946
22947	* mpz/powm_ui.c: Make result always positive.
22948
22949	* urandom.h (urandom): Make it return mp_limb_t.
22950
22951	* gmp-impl.h (CNST_LIMB): New macro.
22952	* mpn/mp_bases.c: Use CNST_LIMB.
22953	* mpn/generic/hamdist.c (popc_limb): Likewise.
22954	* mpn/generic/popcount.c (popc_limb): Likewise.
22955	* mpn/generic/perfsqr.c: Likewise.
22956
22957Fri Sep 20 03:08:10 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22958
22959	* mpz/pprime_p.c: When n <= 3, don't clear out n before using it.
22960
22961Wed Sep 18 11:22:45 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22962
22963	* mpn/fujitsu/mul_1.c: New file.
22964	* mpn/fujitsu/addmul_1.c: New file.
22965	* mpn/fujitsu/sub_n.c: New file.
22966	* mpn/fujitsu/add_n.c: Mew file.
22967
22968Sun Sep 15 03:13:02 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22969
22970	* mpn/generic/random.c: New file.
22971	* mpn/configure.in (functions): Add `random'.
22972
22973	* gmp-impl.h (MPN_COPY): Define as annotated inline function for
22974	Crays and Fujitsu VPPs.
22975
22976	* gmp.h (mp_size_t): Define as `int' for non-MPP Cray.
22977	(mp_exp_t): Likewise.
22978
22979	* configure.in: Add support for Fujitsu VPP machines.
22980	* mpn/configure.in: Likewise.
22981	* config.guess: Likewise.
22982	* config.sub: Likewise.
22983
22984	* mpn/fujitsu/rshift.c: New file.
22985	* mpn/fujitsu/lshift.c: New file.
22986	* mpn/fujitsu: New directory, for Fujitsu VPP machines.
22987
22988Wed Sep 11 11:34:38 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22989
22990	* mpn/generic/mul_n.c (__gmpn_mul_n): New name for impn_mul_n.
22991	Call __gmpn_mul_basecase, not impn_mul_n_basecase; update parameter
22992	list to work with __gmpn_mul_basecase.
22993	(__gmpn_sqr): New name for impn_sqr_n.
22994	Call __gmpn_sqr_basecase, not impn_sqr_n_basecase; update parameter
22995	list to work with __gmpn_sqr_basecase.
22996	(mpn_mul_n): Update calls to match new names and parameter conventions.
22997	* gmp-impl.h (MPN_MUL_N_RECURSE): Likewise.
22998	(MPN_SQR_RECURSE): New name for MPN_SQR_N_RECURSE.
22999	Update calls to match new names and parameter conventions.
23000	* mpn/generic/mul.c: Never perform multiply explicitly here, call
23001	__gmpn_mul_basecase instead.
23002	Update calls to match new names and parameter conventions.
23003
23004	* mpn/x86/mul_basecase.S: New file.
23005	* mpn/generic/mul_basecase.c: New file.
23006	* mpn/generic/sqr_basecase.c: New file.
23007
23008Wed Sep  4 02:59:21 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23009
23010	* mpz/set_str.c: Let `0b' and `0B' mean base 2.
23011
23012Fri Aug 30 00:44:00 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23013
23014	* longlong.h (x86 umul_ppmm): Work around GCC bug that was
23015	triggered by Aug 28 change.
23016
23017	* mpbsd/min.c (digit_value_in_base): New function.
23018
23019	* mpz/set_str.c: Refine allocation size computation, use
23020	chars_per_bit_exactly instead of chars_per_limb.
23021
23022	* mpbsd/Makefile.in (.c.o): Add -D_mpz_realloc=_mp_realloc.
23023
23024Wed Aug 28 02:52:14 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23025
23026	* longlong.h (x86 umul_ppmm): Don't cast result operands.
23027	(x86 udiv_qrnnd): Likewise.
23028	(default smul_ppmm): Fix typo, umul_ppmm => smul_ppmm.
23029	(default umul_ppmm): New #define using smul_ppmm.
23030	(vax smul_ppmm): New #define.
23031	(vax umul_ppmm): Delete.
23032	(POWER umul_ppmm): Delete.
23033	(IBM 370 smul_ppmm): New #define.
23034	(IBM 370 umul_ppmm): Delete.
23035	(IBM RT/ROMP smul_ppmm): New #define.
23036	(IBM RT/ROMP umul_ppmm): Delete.
23037
23038Tue Aug 27 01:03:25 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23039
23040	* gmp-impl.h (__gmp_0): Make it `const'.
23041
23042	* mpn/Makefile.in (clean mostlyclean): Comment out recursive clean
23043	of `tests'.
23044
23045	* mpn/generic/mul.c: Identify when we do squaring, and call
23046	impn_sqr_n_basecase/impn_sqr_n as appropriate.  Use
23047	KARATSUBA_MUL_THRESHOLD and KARATSUBA_SQR_THRESHOLD.
23048	Don't #define KARATSUBA_THRESHOLD.
23049
23050	* mpn/generic/mul_n.c: Don't #define KARATSUBA_THRESHOLD.
23051	(impn_mul_n, impn_sqr_n): Rewrite, based on code contributed by
23052	Robert Harley.
23053	(impn_sqr_n_basecase): Rewrite.
23054
23055	* gmp-impl.h (KARATSUBA_MUL_THRESHOLD): New #define.
23056	(KARATSUBA_SQR_THRESHOLD): Likewise.
23057	(MPN_SQR_N_RECURSE): Use KARATSUBA_SQR_THRESHOLD.
23058	(MPN_MUL_N_RECURSE): Use KARATSUBA_MUL_THRESHOLD.
23059
23060	* configure.in: Fix typo in last change.
23061
23062Mon Aug 26 22:25:18 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23063
23064	* mpn/generic/random2.c: Fix typo, `alpha__' => `__alpha'.
23065	* mpf/random2.c: Likewise.
23066
23067Sun Aug 25 00:07:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
23068
23069	* mpz/tests/t-mul.c: Also test squaring.
23070
23071Fri Aug 16 05:12:08 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23072
23073	* mp_clz_tab.c (__clz_tab): Declare as `const'.
23074	* version.c (gmp_version): Likewise.
23075	* mpn/generic/sqrtrem.c (even_approx_tab, odd_approx_tab): Likewise.
23076
23077Thu Aug 15 02:34:47 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23078
23079	* gmp.h: Fix typo, `mips__' => `__mips'.
23080
23081	* mpf/set_str.c: Allow a number to start with a period, if next
23082	position contains a digit.
23083
23084Tue Aug 13 18:41:25 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23085
23086	* mpz/gcdext.c: Get cofactor sign right for negative input operands.
23087	Clean up code for computing tt.
23088
23089	* mpz/invert.c: Get rid of variable `rv'.
23090
23091	* mpz/divexact.c: Test for zero divisor in special case for zero
23092	dividend.
23093
23094Mon Aug 12 18:04:07 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23095
23096	* mpz/?div_*_ui.c: Special case for division by 0.
23097	* mpz/tdiv_q.c: Likewise.
23098
23099Sat Aug 10 14:45:26 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23100
23101	* mpz/dmincl.c: Special case for division by 0.
23102
23103	* mpz/tdiv_*_ui.c: Delete special case for dividend being 0; handle
23104	it when computing size after mpn_divmod_1 call.
23105
23106	* mp_bpl.c: (__gmp_junk): New variable.
23107	(__gmp_0): New constant.
23108
23109	* gmp-impl.h (DIVIDE_BY_ZERO): New #define.
23110
23111Fri Aug  9 20:03:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23112
23113	* mpz/divexact.c: Test for dividend being zero before testing
23114	for small divisors.
23115
23116Thu Aug  8 13:20:23 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23117
23118	* configure.in: Require operating system specification for cpus
23119	where assembly syntax differs between system.
23120
23121	* Makefile.in (many targets): Change `-' action prefix to `@'.
23122
23123	* mpn/Makefile.in: (distclean): Fix typo.
23124
23125	* mpq/cmp_ui.c: Rename function to _mpq_cmp_ui.
23126	(mpq_cmp_ui): #undef deleted.
23127	* mpz/cmp_si.c: Rename function to _mpz_cmp_si.
23128	(mpz_cmp_si): #undef deleted.
23129	* mpz/cmp_ui.c: Rename function to _mpz_cmp_ui.
23130	(mpz_cmp_ui): #undef deleted.
23131	* Makefile.in: Corresponding changes.
23132
23133	* mpf/get_prc.c: Return the *highest* precision achievable.
23134
23135	* mpf/get_str.c: Complete rewrite.
23136
23137	* mpf/set_str.c (swapptr): New #define.
23138	(assert): New #define.
23139	* mpf/set_str.c: Set prec to one more than the saved _mp_prec.
23140	Misc cleanups.
23141
23142	* mpz/set_str.c: #include string.h.
23143	* mpf/out_str.c: #include string.h.
23144	* mpbsd/xtom.c: #include string.h and ctype.h.
23145	* mpbsd/mout.c: #include string.h.
23146
23147Wed Aug  7 11:46:04 EDT 1996  Ken Weber <kweber@mcs.kent.edu>
23148
23149	* mpn/generic/gcd.c: Reorder mpn_gcd argument list.
23150	* mpz/gcd.c: Change call to mpn_gcd.
23151	* gmp.texi: Update manual entry on mpn_gcd.
23152	* mpn/generic/bdivmod.c: Delete limb cache to make mpn_bdivmod
23153	reentrant.
23154
23155Wed Aug  7 02:15:38 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23156
23157	* mpf/get_str.c: Rewrite code for converting integral part of a
23158	number with both an integral and fractional part.
23159
23160	* mpf/set_str.c: Get rid of variable xxx.  New variables madj and radj.
23161	In exp_in_base==0 case, add madj to msize for EXP field.
23162
23163	* mpz/tests/t-gcd.c: Test deleted.  Rename t-gcd2.c to t-gcd.c.
23164	Increase reps to 2000.
23165	* mpz/tests/t-gcd2.c: Get rid of mpz_refgcd.
23166
23167	* mpf/set_str.c: Ignore excess limbs in MP,MSIZE.
23168
23169Thu Jul 25 04:39:10 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23170
23171	* mpn/configure.in: Fix typo in setting path, "sparc" => "sparc32".
23172
23173Wed Jul 24 02:27:02 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23174
23175	* mpn/generic/gcdext.c: Reorganize and clean up.  Get rid of all
23176	signed limb arithmetic.
23177
23178Mon Jul 22 02:39:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23179
23180	* mpn/generic/gcdext.c (mpn_gcdext): For large enough operands,
23181	work with most significant *two* limbs.
23182	(div2): New function (two variants).
23183	(THRESHOLD): New #define.
23184
23185	* mpz/gcdext.c: Fix typo in MPZ_TMP_INIT call.
23186
23187	* longlong.h (alpha UMUL_TIME): Now 30.
23188	(alpha UDIV_TIME): Now 350.
23189	(x86 UMUL_TIME): Now 10 (let Pentium decide).
23190	(SuperSPARC UDIV_TIME): Override default.
23191
23192	* extract-dbl.c (MP_BASE_AS_DOUBLE): Don't redefine here.
23193
23194	* extract-dbl.c: New name for extract-double.c.
23195	* insert-dbl.c: New name for insert-double.c.
23196	* Makefile.in: Corresponding changes.
23197	* make.bat: Likewise.
23198
23199	* mpz/Makefile.in (.c.o): Don't pass non-portable `-f' to cp.
23200	* mpq/Makefile.in: Likewise.
23201	* mpf/Makefile.in: Likewise.
23202
23203Sat Jul 20 01:35:18 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23204
23205	* mpz/getlimbn.c: Take ABS of integer->_mp_size.
23206
23207	* mpz/divexact.c: Use mpn_divmod_1 if divisor is a single limb.
23208
23209Thu Jul 18 00:31:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23210
23211	* mpn/generic/popcount.c (popc_limb): Use different masking trick
23212	for first step (due to David Seal).
23213	* mpn/generic/hamdist.c (popc_limb): Likewise.
23214
23215Wed Jul 17 23:21:48 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23216
23217	* mpn/generic/divrem.c: In MPN_COPY_DECR call, copy dsize - 1 limbs.
23218
23219Sun Jul 14 17:47:46 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23220
23221	* configure.in: Handle sparc9, sparc64, and ultrasparc like sparc8.
23222
23223Thu Jul 11 14:05:54 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
23224
23225	* longlong.h (mc680x0): Define umul_ppmm, udiv_qrnnd, sdiv_qrnnd
23226	for the '020, '030, '040, and '332.  Define count_leading_zeros
23227	for the '020, '030, '040, and '060.
23228
23229Sun Jul 14 15:24:53 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23230
23231	From Joe Keane:
23232	* mpq/equal.c: Take ABS of num1_size before passing it to mpn_cmp.
23233
23234Fri Jul 12 17:11:17 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23235
23236	* mpn/generic/sqrtrem.c (SQRT): New asm for x86, but leave it
23237	disabled for now.
23238
23239	* mpn/generic/sqrtrem.c: Use MP_BASE_AS_DOUBLE.
23240
23241Wed Jul 10 03:17:45 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23242
23243	* cre-mparam.c: Delete obsolete file.
23244
23245	* gmp.h: #define _LONG_LONG_LIMB if __mips && _ABIN32.
23246	* longlong.h: Test __mips instead of __mips__.
23247
23248Sun Jul  7 23:19:13 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23249
23250	* longlong.h (_PROTO): Define, unless already defined.
23251	(alpha __udiv_qrnnd): Declare using _PROTO.
23252	(hppa __udiv_qrnnd): Likewise.
23253	(sparc __udiv_qrnnd): Likewise.
23254
23255Mon Jul  1 01:44:30 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23256
23257	* config.guess: Update from master version; add Cray x90 handling.
23258
23259Wed Jun 26 05:35:02 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23260
23261	* mpn/power/add_n.s (__mpn_add_n): Work around GAS bug.
23262	* mpn/power/sub_n.s (__mpn_sub_n): Likewise.
23263
23264	* insert-double.c: Rework loop to avoid potential overflow.
23265
23266	* mpq/get_d.c: For vax, if qsize > N_QLIMBS, ignore excess limbs.
23267
23268	* mpq/tests/t-get_d.c (SIZE): Special case for vax.
23269
23270	* gmp.h (mpX_cmp_ui): #define also when ! __GNUC__.
23271
23272Mon Jun 24 17:13:21 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23273
23274	* longlong.h (vax sdiv_qrnnd): Fix typo.
23275
23276Sat Jun 15 01:33:33 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23277
23278	* gmp.h: Support `small' and `large' type and function variants,
23279	controlled by GMP_SMALL.
23280
23281	* mpz/Makefile.in (.c.o): Compile each function twice, for small and
23282	large variant.
23283	(MPZS_OBJS): New variable.
23284	(libmpz.a): Include MPZS_OBJS in archive.
23285	* mpf/Makefile.in: Analogous changes.
23286	* mpq/Makefile.in: Analogous changes.
23287
23288	* gmp.h: Prefix all functions with __gmp, to allow namespace-clean
23289	internal calls.
23290
23291	* mp.h: Rip out __MP_SMALL__ stuff.
23292	(__mpz_struct): mp_size_t => int.
23293
23294	* mpz/invert.c: #include "gmp-impl.h".
23295	Use MPZ_TMP_INIT, not mpz_init.
23296
23297	* mpz/gcdext.c: Rewrite to call mpn_gcdext.
23298
23299Fri Jun 14 18:05:29 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23300
23301	* mpn/generic/gcdext.c (s0size): New parameter.
23302	* gmp.h (mpn_gcdext): Update prototype.
23303
23304	* mpn/generic/gcdext.c: Major rewrite.
23305
23306Mon Jun 10 00:14:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23307
23308	* mpn/generic/dump.c: Add missing `else'.
23309
23310Fri Jun  7 03:35:12 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23311
23312	* Makefile.in (gmp_toc.html): Pass -expandinfo to texi2html.
23313
23314Thu Jun  6 19:00:53 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23315
23316	* Version 2.0.2 released.
23317
23318	* install.sh: New file.
23319	* Makefile.in (INSTALL): Use install.sh.
23320	(install-normal): New name for target `install'.
23321	(install): New dummy target.
23322
23323	* mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
23324	* mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
23325
23326	* config/mt-linux (AR_FLAGS): New file.
23327	* configure.in: Use config/mt-linux for all linux systems.
23328
23329Tue Jun  4 03:42:18 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23330
23331	* Version 2.0.1 released.
23332
23333	* mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
23334
23335	* extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
23336
23337	* insert-double.c: Don't #include stdlib.h.
23338
23339	* gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
23340	Do not test __sparc__.
23341
23342	* mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
23343	* mpq/equal.c: Likewise.
23344
23345	* mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
23346
23347	* mpn/generic/gcdext.c: Add K&R declaration syntax.
23348	* stack-alloc.h: Likewise.
23349	* insert-double.c: Likewise.
23350	* extract-double.c: Likewise.
23351	* mpf/tests/reuse.c: Likewise.
23352	* mpz/tests/reuse.c: Likewise.
23353	* mpf/tests/t-sub.c: Likewise.
23354	* mpf/tests/t-add.c: Likewise.
23355	* mpf/tests/t-muldiv.c: Likewise.
23356	* mpf/tests/t-conv.c: Likewise.
23357	* mpf/tests/ref.c: Likewise.
23358
23359	* mpn/config/t-oldgas: Renamed from t-freebsd.
23360	* mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
23361	configurations.
23362
23363	* mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
23364	* mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
23365
23366	* mpn/config/t-ppc-aix: New file.
23367	* mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
23368
23369Wed May 29 02:07:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23370
23371	* gmp.h (mp_bits_per_limb): Change qualifier from `const' to
23372	__gmp_const.
23373
23374	* gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
23375	* mpf/iset_str.c: Likewise.
23376
23377Mon May 27 00:15:58 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23378
23379	* gmp-impl.h: Declare __gmp_extract_double.
23380
23381	* mpz/set_q.c: Delete unused variables.
23382
23383	* gmp.h (mpq_equal): Declare.
23384
23385	* mpf/eq.c: mpf_cmp2 -> mpf_eq.
23386
23387Fri May 24 03:20:44 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23388
23389	* mpz/iset_d.c: Don't include <math.h>.
23390
23391	* insert-double.c (__gmp_scale2): New name for scal2.
23392	* mpz/get_d.c: Corresponding change.
23393	* mpf/get_d.c: Likewise.
23394	* mpq/get_d.c: Likewise.
23395	* gmp-impl.h: Declare __gmp_scale2.
23396
23397	* mpn/generic/scan0.c: Clarify comment.
23398
23399	* mpz/set_q.c: New file.
23400	* Makefile.in: Compile it.
23401	* make.bat: Likewise.
23402	* gmp.h: Declare mpz_set_q.
23403
23404	* insert-double.c: New file.
23405	* Makefile.in: Compile it.
23406	* make.bat: Likewise.
23407
23408	* mpz/get_d.c: New file.
23409	* mpz/Makefile.in: Compile it.
23410	* make.bat: Likewise.
23411	* gmp.h: Declare mpz_get_d.
23412
23413	* mpf/get_d.c: New file.
23414	* mpf/Makefile.in: Compile it.
23415	* make.bat: Likewise.
23416	* gmp.h: Declare mpf_get_d.
23417
23418	* make.bat: Compile things in alphabetical order.
23419
23420	* gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
23421	(LIMBS_PER_DOUBLE): New #define.
23422
23423	* extract-double.c: New file.
23424	* Makefile.in: Compile it.
23425	* make.bat: Likewise.
23426	* mpz/set_d.c: Rewrite to use __gmp_extract_double.
23427	* mpf/set_d.c: Likewise.
23428
23429	* mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
23430
23431Wed May 22 02:48:35 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23432
23433	* gmp-impl.h: Rework code for defining ieee_double_extract.
23434	(IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
23435	(_GMP_IEEE_FLOATS): New macro.
23436	* mpn/vax/gmp-mparam.h: Delete.
23437
23438	* mpn/config/t-pwr-aix: New file.
23439	* mpn/configure.in: Use t-pwr-aix for aix 4 and later.
23440
23441Mon May 20 16:30:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23442
23443	* gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
23444
23445	* mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
23446	* mpf/tests/t-sub.c (oo): Likewise.
23447	* mpf/tests/t-conv.c (oo): Likewise.
23448	* mpf/tests/t-sqrt.c (oo): Likewise.
23449
23450	* mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
23451
23452	* mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
23453
23454Fri May 17 02:24:43 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23455
23456	* mpz/set_d.c: Call _mpz_realloc.
23457
23458	* mpq/set_z.c: New file.
23459	* mpq/Makefile.in: Compile it.
23460	* make.bat: Likewise.
23461	* gmp.h: Declare mpq_set_z.
23462
23463	* mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
23464	* mpf/Makefile.in (test): Delete spurious target.
23465	* mpq/Makefile.in (test): Likewise.
23466
23467	* mpf/out_str.c: Use `e' to separate exponent when base <= 10.
23468
23469	* mpn/configure.in: Treat ultrasparc just like sparc v8,
23470	until 64-bit compilers are ready.
23471
23472	* mpf/set_d.c: Make it work for 64-bit machines.
23473
23474Thu May 16 20:53:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23475
23476	* gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
23477	machines.
23478	* mpn/x86/gmp-mparam.h: Delete file.
23479
23480	* configure.in: Treat microsparc like sparc8.
23481
23482	* urandom.h: Test __alpha instead of __alpha__, since the former
23483	is the standard symbol.
23484	* mpn/generic/random2.c: Likewise.
23485	* mpf/random2.c: Likewise.
23486
23487Tue May 14 13:42:39 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23488
23489	* mpz/set_f.c: New file.
23490	* mpz/Makefile.in: Compile it.
23491	* gmp.h: Declare mpz_set_f.
23492
23493	* mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
23494
23495Tue May 14 13:03:07 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23496
23497	* make.bat: Add all new files.
23498
23499Sun May 12 22:24:36 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23500
23501	* mpf/set_z.c: New file.
23502	* mpf/Makefile.in: Compile it.
23503	* gmp.h: Declare mpf_set_z.
23504
23505Sat May 11 19:26:25 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23506
23507	* gmp.h: Declare mpf_set_q.
23508
23509	* mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
23510
23511Fri May 10 17:37:38 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23512
23513	* mpf/set_q.c: New file.
23514	* mpf/Makefile.in: Compile it.
23515
23516	* config.sub: Recognize sparc8.
23517
23518Wed May  8 09:19:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23519
23520	* mpf/tests/t-dm2exp.c: New file.
23521
23522	* mpf/tests/t-add.c: Correct header comment.
23523	* mpf/tests/t-sub.c: Likewise.
23524	* mpf/tests/t-sqrt.c: Likewise.
23525
23526	* mpf/div.c: Misc variable name cleanups.
23527	* mpf/div_ui.c: Base more closely on mpf/div.c.
23528	* mpf/ui_div.c: Likewise.
23529
23530	* mpz/tests/Makefile.in (check): Depend on Makefile.
23531	* mpq/tests/Makefile.in (check): Likewise.
23532	* mpf/tests/Makefile.in (check): Likewise.
23533
23534	* mpf/tests/t-muldiv.c: New file.
23535	* mpf/tests/Makefile.in: Compile and run `t-muldiv'.
23536	(t-ref.o): Delete spurious rule.
23537
23538	* mpf/sqrt.c: Properly detect negative input operand.
23539
23540	* mpf/sqrt_ui.c: Delete spurious header comment.
23541	* mpf/sqrt.c: Likewise.
23542	* mpz/sqrt.c: Likewise.
23543
23544	* mpz/tests/reuse.c (main): Read `reps' from command line.
23545
23546	* mpf/tests/reuse.c: New file.
23547	* mpf/tests/Makefile.in: Compile and run `reuse'.
23548
23549	* mpf/mul_ui.c: Disable code for removing low zero limbs.
23550
23551	* mpf/div.c: Fix condition for when vp and qp overlaps.
23552
23553	* mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
23554
23555	* mpf/out_str.c: Don't output '\n' after exponent.
23556
23557	* mpf/add_ui.c: New special case for when U is completely cancelled.
23558
23559Wed Apr 24 05:33:28 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23560
23561	* Version 2.0 released.
23562
23563	* All files: Update FSF's address.
23564
23565	* Makefile.in (gmp_toc.html): New name for gmp.html.
23566	(TAGS): Depend on force.
23567
23568	* mpf/tests/t-conv.c: Pass -base to mpf_set_str.
23569
23570Sat Apr 20 03:54:06 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23571
23572	* Makefile.in (ps): New target, depend on gmp.ps.
23573
23574Fri Apr 19 14:03:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23575
23576	* mpf/out_str.c: Print `@' before exponent, not `e'.
23577
23578	* make.bat: Update from Makefiles.
23579
23580Thu Apr 18 01:22:05 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23581
23582	* mpf/set_str.c: If parameter `base' is negative, expect exponent
23583	to be decimal, otherwise in the same base as the mantissa.
23584
23585Wed Apr 17 17:28:36 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23586
23587	* mpf/set_dfl_prec.c: Don't return anything.
23588	* gmp.h: Corresponding changes.
23589
23590	* mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
23591	* mpf/init2.c: Likewise.
23592	* mpf/get_prc.c: Likewise.
23593	* mpf/set_prc.c: Likewise.
23594	* mpf/set_prc_raw.c: Likewise.
23595	* mpz/popcount.c: Likewise.
23596	* mpz/hamdist.c: Likewise.
23597	* mpz/scan1.c: Likewise.
23598	* mpz/scan0.c: Likewise.
23599	* mpn/generic/popcount.c: Likewise.
23600	* mpn/generic/hamdist.c: Likewise.
23601	* mpn/generic/scan1.c: Likewise.
23602	* mpn/generic/scan0.c: Likewise.
23603	* gmp.h: Likewise.
23604
23605	* mpf/eq.c: New file, based on mpf/diff.c.
23606	* mpf/diff.c: Delete.
23607	* mpf/Makefile.in: Corresponding changes.
23608	* gmp.h: Likewise.
23609
23610	* mpf/reldiff.c: New file.
23611	* mpf/Makefile.in: Compile it.
23612	* gmp.h: Declare mpf_reldiff.
23613
23614	* mpz/iset_d.c: New file.
23615	* mpz/Makefile.in: Compile it.
23616	* gmp.h: Declare mpz_init_set_d.
23617
23618Tue Apr 16 16:28:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23619
23620	* Makefile.in (gmp.html): Pass -acc to texi2html.
23621
23622Mon Apr 15 16:20:24 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23623
23624	* mpf/set_str.c: Switch off code for defaulting the base from the
23625	leading characters.
23626
23627	* gmp.h (mp?_sign): Delete.
23628	(mp?_sgn): New macros.
23629
23630Fri Apr 12 17:23:33 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23631
23632	* Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
23633
23634Wed Apr 10 22:52:02 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23635
23636	* mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
23637	* gmp.h: Corresponding change.
23638
23639	* gmp.h (mp_bits_per_limb): Make it const.
23640
23641Sat Mar 30 01:20:23 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23642
23643	* configure.in: Re-enable recognition of with_gcc.
23644
23645	* mpf/Makefile.in (.c.o): Pass XCFLAGS.
23646	* mpn/Makefile.in (.c.o): Likewise.
23647	* mpz/Makefile.in (.c.o): Likewise.
23648	* mpq/Makefile.in (.c.o): Likewise.
23649	* mpbsd/Makefile.in (.c.o): Likewise.
23650	* mpf/tests/Makefile.in (.c.o): Likewise.
23651	* mpz/tests/Makefile.in (.c.o): Likewise.
23652	* mpq/tests/Makefile.in (.c.o): Likewise.
23653
23654	* Makefile.in (XCFLAGS): Default to empty.
23655	(FLAGS_TO_PASS): Pass on XCFLAGS.
23656	(.c.o): Pass XCFLAGS.
23657
23658	* config/mt-m88110 (XCFLAGS): Define instead of CC.
23659	* config/mt-sprc8-gcc (XCFLAGS): Likewise.
23660	* config/mt-supspc-gcc (XCFLAGS): Likewise.
23661
23662	* configure: Don't default CC to "gcc -O2" is -with-gcc=no was
23663	specified.
23664
23665Mon Mar 25 01:07:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23666
23667	* urandom.h: Test for __SVR4 in addition to __svr4__.
23668
23669	* mp_bpl.c (mp_bits_per_limb): Declare as `const'.
23670
23671	* Makefile.in (CFLAGS): `-O2' => `-O'.
23672	* mpn/Makefile.in (CFLAGS): Likewise.
23673
23674	* gmp-impl.h: Get rid of obsolete field access macros.
23675
23676	* mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
23677	cc compiler bug.
23678
23679	* gmp.h (__MPN): Make it work also for non-ANSI compilers.
23680
23681Thu Mar 21 01:07:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23682
23683	* mpf/sub.c: New special case for ediff <= 1 before generic code.
23684	Simplify generic code for ediff == 0.
23685	Rename uexp => exp.
23686
23687Mon Mar 11 18:24:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23688
23689	* mpf/tests/*.c: Use ref_mpf_sub for error calculation.
23690	* mpf/tests/Makefile.in: Link ref.o to all executables.
23691
23692	* mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
23693
23694Sun Mar 10 21:03:17 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23695
23696	* mpf/get_str.c: In digit development loop for fractions, change
23697	loop condition from `<' to `<='.
23698
23699Thu Mar  7 04:58:11 1996  Torbjorn Granlund  <tege@tiny.matematik.su.se>
23700
23701	* mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
23702
23703Wed Mar  6 01:10:42 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23704
23705	* mpf/tests/t-sqrt.c: New file.
23706	* mpf/tests/Makefile.in: Corresponding changes.
23707
23708	* mpf/sqrt.c: Special case for square root of zero.
23709
23710	* mpq/add.c: Clean up variable names.
23711	* mpq/sub.c: Update from mpq/add.c.
23712
23713	* mpz/divexact.c: abs => ABS.
23714	* mpz/gcd.c: Likewise.  Rewrite final fixup code, to decrease
23715	allocation.  Misc cleanups.
23716
23717Tue Mar  5 22:24:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
23718
23719	* mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
23720
23721	* gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
23722
23723	* mpn/configure.in: Use t-freebsd also for netbsd.
23724
23725Mon Mar  4 15:13:28 1996  Torbjorn Granlund  <tege@matematik.su.se>
23726
23727	* mpq/Makefile.in (cmp.o): Depend on longlong.h.
23728
23729	* mpq/equal.c: New file.
23730	* mpq/Makefile.in: Corresponding changes.
23731
23732	* mpf/tests/t-add.c: New file.
23733	* mpf/tests/t-sub.c: Renamed from t-addsub.c.
23734	* mpf/tests/ref.c: New file.
23735	* mpf/tests/Makefile.in: Corresponding changes.
23736
23737	* gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
23738
23739Sun Mar  3 07:45:46 1996  Torbjorn Granlund  <tege@matematik.su.se>
23740
23741	* mpf/set_str.c: In exponentiation code, allocate 3 extra
23742	limbs, not just 2.
23743
23744	* mpf/get_str.c: Allocate sufficient space for tstr.
23745	When calculating exp_in_base, round result down.
23746
23747	* mpf/tests/t-conv.c: New file.
23748	* mpf/tests/Makefile.in: Corresponding changes.
23749
23750	* mp_bpl.c: New file.
23751	* gmp.h: Declare it.
23752	* Makefile.in: Corresponding changes.
23753
23754Sat Mar  2 06:27:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
23755
23756	* mpf/set_prc_raw.c: New file.
23757	* mpf/set_prc.c: Renamed from set_prec.c.
23758	* mpf/get_prc.c: New file.
23759	* mpf/Makefile.in: Corresponding changes.
23760	* gmp.h: Declare new functions.
23761
23762	* mpn/generic/gcdext.c: Add copyright header.
23763
23764Fri Mar  1 01:22:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
23765
23766	* mpn/configure.in: For ppc601, search "power" before "powerpc32".
23767
23768	* mp?/Makefile.in (AR_FLAGS): New variable.
23769	(libmp?.a): Use it.
23770
23771	* make.bat: New file.
23772	* mpn/msdos: New directory.
23773	* mpn/msdos/asm-syntax.h: New file.
23774
23775	* mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
23776
23777	* config.sub: Recognize [ctj]90-cray.
23778
23779	* mpn/configure.in: Recognize [ctj]90-cray-unicos*.
23780
23781	* mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
23782
23783	* mpn/generic/gcd.c: Split increment from use of USIZE to avoid
23784	undefined behaviour.
23785
23786Thu Feb 29 04:11:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
23787
23788	* Makefile.in (install-info-files): Update for new install-info
23789	behaviour.
23790
23791	* mpn/power/add_n.s: Rewrite.
23792	* mpn/power/sub_n.s: Rewrite.
23793
23794Wed Feb 28 01:34:30 1996  Torbjorn Granlund  <tege@matematik.su.se>
23795
23796	* mpz/pow_ui.c: Compute allocation more aggressively for small bases.
23797	* mpz/ui_pow_ui.c: Likewise.
23798
23799	* mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
23800
23801	* mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
23802	* mpn/generic/gcd.c: Likewise.
23803	(SIGN_BIT): Compute differently.
23804
23805Mon Feb 26 00:07:36 1996  Torbjorn Granlund  <tege@matematik.su.se>
23806
23807	* All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
23808
23809	* Makefile.in (install, install-bsdmp, install-info-files): Depend
23810	on installdirs.  chmod all installed files.
23811
23812Sun Feb 25 01:47:41 1996  Torbjorn Granlund  <tege@matematik.su.se>
23813
23814	* mpbsd/configure.in: Delete debugging code.
23815
23816	* All Makefile.in: Update clean targets.
23817
23818	* Makefile.in (AR_FLAGS): New variable.
23819	(libgmp.a): Use it.
23820	(libmp.a): Likewise.
23821
23822	* VERSION: Delete file.
23823
23824	* Makefile.in (installdirs): New target.
23825	* mkinstalldirs: New file (from the texinfo package).
23826
23827	* Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
23828	(MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
23829	(install-info): New target.
23830	(install, install-bsdmp): Depend on install-info.
23831	($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
23832	into source directory.
23833	(distclean, mostlyclean): New targets.
23834	(maintainer-clean): New name for realclean.
23835	(uninstall): New target.
23836	(TAGS): New target.
23837	(info, dvi): New targets.
23838	(.PHONY): Assign.
23839
23840	* Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
23841
23842	* mp{n,z,f,bsd}/move-if-change: Delete.
23843
23844	* mpbsd/Makefile.in (stamp-stddefh): Delete target.
23845
23846	* Makefile.in (.c.o): Pass CFLAGS last.
23847	* mpbsd/Makefile.in (.c.o): Likewise.
23848	* mpf/Makefile.in (.c.o): Likewise.
23849	* mpq/Makefile.in (.c.o): Likewise.
23850	* mpz/Makefile.in (.c.o): Likewise.
23851	* mpn/Makefile.in (.c.o): Likewise.
23852	(.S.o): Likewise.
23853
23854	* memory.c: Change allocation error message.
23855
23856	* Makefile.in (install): Prefix gmp.h with $(srcdir).
23857	(install-bsdmp): Prefix mp.h with $(srcdir).
23858
23859	* mp{n,z,f,bsd}/{configure,config.sub}: Delete.
23860
23861	* Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
23862	(install targets): Install gmp.info-N.
23863
23864Sat Feb 24 03:36:52 1996  Torbjorn Granlund  <tege@matematik.su.se>
23865
23866	* mpf/get_str.c: Fix typo.
23867
23868	* mpz/legendre.c: Clarify expression with extra parens.
23869
23870	* version.c (gmp_version): Not static.
23871
23872	* mpf/iset_str.c: Properly return error code.
23873
23874	* mpf/add.c: Delete unused variables.
23875	* mpf/inp_str.c: Likewise.
23876	* mpq/get_d.c: Likewise.
23877
23878	* mpn/generic/dump.c: #include <stdio.h>.
23879	* mpf/dump.c: Likewise.
23880	* mpf/set_str.c: #include <ctype.h>.
23881	(strtol): Declare.
23882
23883	* gmp.h: mpn_sqrt => mpn_sqrtrem.
23884
23885	* Makefile.in (clean, realclean): Clean in mpbsd.
23886	(check): Test in mpf.
23887
23888	* mpf/Makefile.in (clean): Clean in tests.
23889	* mpq/Makefile.in (clean): Clean in tests.
23890
23891	* mpf/tests/Makefile.in: New file.
23892	* mpf/tests/configure.in: New file.
23893	* mpf/tests/t-addsub.c: New file.
23894
23895	* mpf/sub_ui.c: Simply call mpf_sub for now.
23896
23897	* mpf/sub.c: Increase prec by 1.
23898	* mpf/ui_sub.c: Likewise.
23899
23900Fri Feb 23 00:59:54 1996  Torbjorn Granlund  <tege@matematik.su.se>
23901
23902	* mpf/ui_sub.c: Fix typos.
23903
23904	* mpf/get_str.c: When allocating space for tmp, allow for an extra
23905	limb.  In code for fraction conversion, add special case for bases
23906	that are a power of 2.
23907
23908	* mpf/out_str.c: Output leading "0.".
23909	Default base to 10, before computing string allocation.
23910
23911	* mpf/get_str.c: Make variables for string size have type size_t.
23912	* gmp.h: Corresponding change.
23913
23914	* mpf/random2.c: Allow creation of prec+1 large mantissas.
23915
23916	* mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
23917	Fix typo in MPN_COPY offset.
23918	* mpf/sub_ui.c: Analogous changes.
23919
23920	* mpf/set_prec.c: Rewrite.
23921
23922	* mpf/init2.c: Compute precision as in set_prec.c.
23923
23924	* mpf/div_2exp.c: Special case for u == 0.
23925	* mpf/mul_2exp.c: Likewise.  Write r->_mp_size always.
23926
23927	* mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
23928	* mpf/sqrt.c: Likewise.  When computing new exponent, round quotient
23929	towards -infinity.
23930
23931	* mpf/add.c: Fix typos.
23932	* mpf/sub.c: Fix typos.
23933
23934Thu Feb 22 00:24:48 1996  Torbjorn Granlund  <tege@matematik.su.se>
23935
23936	* mpz/Makefile.in (stamp-stddefh): Delete target.
23937	(test): Delete target.
23938	* Makefile.in (stamp-stddefh): Delete target.
23939	(cre-stddefh.o): Delete target.
23940	(gmp.dvi): Set TEXINPUTS before invoking tex.
23941
23942	* cre-stddefh.c: Delete.
23943
23944	* mpz/sqrt.c: Fix typo.
23945
23946	* mpz/powm.c: Special case for mod == 0.
23947	* mpz/powm_ui.c: Likewise.
23948
23949	* mpz/get_si.c: Handle -0x80000000 correctly.
23950
23951	* mpz/inp_str.c: Now returns size_t.
23952	Make it return number of bytes read or error indication.
23953	* mpf/inp_str.c: Likewise.
23954
23955	* mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
23956	* mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
23957	* mpz/inp_binary.c: Delete.
23958
23959	* mpn/Makefile.in (XCFLAGS): Remove variable.
23960	(.c.o): Don't pass XCFLAGS.
23961	(SFLAGS): Set to nothing.
23962	(.S.o): Pass SFLAGS, not XCFLAGS.
23963
23964	* mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
23965
23966	* mpf/out_str.c: Make return number of bytes written or error
23967	indication.
23968	* mpz/out_str.c: Likewise.
23969	* gmp.h: Corresponding changes.
23970
23971	* gmp.h (__mpz_struct): mp_size_t => int.
23972	(__mpq_struct): Likewise.
23973	(__mpf_struct): Likewise.
23974	(mp_size_t): int => long int.
23975
23976	* mpn/cray: New directory.
23977	* mpn/cray/gmp-mparam.h: New file.
23978	* mpn/configure.in: Recognize cray variants.
23979
23980	* Makefile.in: Set defaults for prefix, libdir, etc.
23981	(install): New target.
23982	(install-bsdmp): New target.
23983	(gmp.html): New target.
23984
23985	* stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
23986
23987Wed Feb 21 04:35:02 1996  Torbjorn Granlund  <tege@matematik.su.se>
23988
23989	* gmp.h: Sort mpn declarations.
23990	(mpn_gcdext): Add declaration.
23991
23992	* mpn/generic/divrem_1.c: New file.
23993	* mpn/Makefile.in (divrem_1.o): New rule.
23994	* configure.in (functions): Add divrem_1.
23995
23996	* mpn/generic/divmod.c: Delete file.
23997	* mpn/configure.in (functions): Delete divmod.
23998	* Makefile.in (divmod.o): Delete rule.
23999	* gmp.h (mpn_divmod): New #define.
24000
24001	* gmp.h (mpn_next_bit_set): Delete spurious declaration.
24002
24003	* mpn/generic/divrem.c (default case): In code assigning
24004	most_significant_q_limb, move reassignment of n0 into if statement.
24005
24006	* gmp.h (mpf_inp_str): Fix typo.
24007	(mpf_out_str): Make prototype match reality.
24008	* mpf/inp_str.c: New file.
24009	* mpf/out_str.c: New file.
24010	* mpf/Makefile.in: Compile new files.
24011
24012	* mpn/Makefile.in (dump.o): Fix dependency path.
24013	(inlines.o): Likewise.
24014
24015	* mpn/configure.in: Make m68060 be the same as m68000.  Clean up
24016	m68k configs.
24017
24018Tue Feb 20 01:35:11 1996  Torbjorn Granlund  <tege@matematik.su.se>
24019
24020	* mpn/generic/sqrtrem.c: Renamed from sqrt.
24021	* mpn/configure.in (functions): Corresponding change.
24022	* mpn/Makefile.in: Likewise.
24023	* mpz/sqrtrem.c: Likewise.
24024	* mpz/sqrt.c: Likewise.
24025	* mpn/generic/perfsqr.c: Likewise.
24026
24027	* Makefile.in (clean): Also remove libmp.a.
24028	Don't compile cre-conv-tab.c or mp_bases.c.
24029	cre-conv-tab.c: Delete file.
24030	(gmp.ps): New rule.
24031
24032	* mpn/mp_bases.c: New file.
24033	* mpn/Makefile.in: Compile mp_bases.c.
24034
24035	* mpz/set_str.c: Skip initial whitespace.
24036	* mpf/set_str.c: Likewise.
24037	* mpbsd/xtom.c: Likewise.
24038
24039	* gmp.h: Add missing mpz declarations.
24040	Delete all formal parameter names from declarations.
24041
24042	* mpn/Makefile.in: Add dependencies for .c files.
24043
24044	* Makefile.in (check): Write recursive make calls separately, not as
24045	a loop.
24046	(FLAGS_TO_PASS): New variable.  Use it for most recursive makes.
24047
24048Mon Feb 19 01:02:20 1996  Torbjorn Granlund  <tege@matematik.su.se>
24049
24050	* mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
24051	lines starting with #.
24052	(CPP): Set to $(CC) -E to avoid gcc dependency.
24053
24054	* mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
24055
24056	* mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
24057	code.
24058	* mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
24059
24060	* gmp.h: Fix typos in #defines of recently added mpn functions.
24061
24062	* mpz/inp_str.c: Skip all whitespace, not just plain space.
24063	* mpbsd/min.c: Likewise.
24064
24065	* mpn/configure.in (functions): Add gcdext.
24066	* mpn/generic/gcdext.c: New file.
24067
24068	* mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
24069
24070	* gmp.h: Surround mpn declarations with extern "C" { ... }.
24071
24072	* Makefile.in (check): New target.
24073
24074	* mpq/get_d.c: Update comments.  Use rsize instead of dsize + N_QLIMBS
24075	when possible.  Add special case for nsize == 0.
24076
24077	* gmp.h (mpq_get_d): Add declaration.
24078	(mpq_canonicalize): Likewise.
24079	(mpq_cmp_ui): Likewise.
24080	(mpf_diff): Likewise.
24081	(mpf_ui_sub): Likewise.
24082	(mpf_set_prec): Likewise.
24083	(mpf_random2): Likewise.
24084
24085	* gmp.h (mpz_cmp_ui): New #define.
24086	(mpz_cmp_si): New #define.
24087	(mpq_cmp_ui): New #define.
24088	(mpz_sign): New #define.
24089	(mpq_sign): New #define.
24090	(mpf_sign): New #define.
24091	(mpq_numref): New #define.
24092	(mpq_denref): New #define.
24093
24094	* mpq/set_z.c: File deleted.
24095	* mpq/Makefile.in: Corresponding changes.
24096
24097Sun Feb 18 01:34:47 1996  Torbjorn Granlund  <tege@matematik.su.se>
24098
24099	* mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
24100
24101	* mpz/inp_binary.c: Default stream to stdin.
24102	* mpz/inp_str.c: Likewise.
24103	* mpz/inp_raw.c: Likewise.
24104	* mpz/out_binary.c: Default stream to stdout.
24105	* mpz/out_raw.c: Likewise.
24106	* mpz/out_str.c: Likewise.
24107
24108	* mpbsd/realloc.c: New file.
24109	* mpbsd/Makefile.in: Corresponding changes.
24110
24111	* mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
24112	* mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
24113
24114	* mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
24115	spaces in each 10th position.
24116	* mpbsd/xtom.c: Rewrite (base on mpz/set_str).
24117
24118	* mpq/tests/Makefile.in (st-cmp): New file.
24119	* mpq/tests/configure.in (srcname): New file.
24120
24121	* mpz/tests/configure.in (srcname): Fix typo.
24122
24123	* mpq/cmp.c: Add check using number of significant bits, to avoid
24124	general multiplication.
24125
24126Sat Feb 17 11:58:30 1996  Torbjorn Granlund  <tege@matematik.su.se>
24127
24128	* mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
24129
24130	* mpq/tests: New directory.
24131	* mpq/tests/t-cmp.c: New file.
24132	* mpq/tests/t-cmp_ui.c: New file.
24133
24134	* mpz/tests/dive.c (main): Generate zero numerator.
24135	(get_random_size) : Delete.
24136
24137	* mpz/divexact.c: Add special case for 0/x.
24138
24139	* gmp.h (mpz_mod): Add declaration.
24140
24141Fri Feb 16 18:18:39 1996  Andreas Schwab  <schwab@informatik.uni-dortmund.de>
24142
24143	* mpn/m68k/*: Rewrite code not to use the INSN macros.
24144	(L): New macro to properly prefix local labels for ELF.
24145
24146Fri Feb 16 00:20:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
24147
24148	* gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
24149	fields.
24150	* mpn/generic/inlines.c (_FORCE_INLINES): New #define.  Delete
24151	conditional __GNUC__.
24152	* gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
24153	Only define these if __GNUC__ || _FORCE_INLINES.
24154	* mpf/random2.c: Add missing parameter in non-ANSI header.
24155	* mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
24156	in AIX compilers.
24157	* mpq/get_d.c: #define N_QLIMBS.
24158	* mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
24159	* stack-alloc.c: Cast void* pointer to char* before doing arithmetic
24160	on it.
24161
24162	* Makefile.in (mpbsd/libmpbsd.a): New rule.
24163	* configure.in (configdirs): Add mpbsd.
24164
24165	* gmp.h: Add declarations for a few missing mpn functions.
24166
24167	* Makefile.in (libmp.a): New rule.
24168
24169	* mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
24170	* gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
24171	* mp.h: Likewise.  Update typedefs from gmp.h.
24172	* mpbsd/configure.in: New file.
24173	* mpbsd/Makefile.in: New file.
24174	* mpbsd/configure: Link to master configure.
24175	* mpbsd/config.sub: Link to master config.sub.
24176
24177	* Makefile.in: Set RANLIB_TEST.
24178	* (libgmp.a): Use it.
24179	* (libgmp.a): Do ranlib before moving the libgmp.a to the build
24180	directory.
24181	* mp?/Makefile.in: Don't use or set RANLIB.
24182
24183Thu Feb 15 16:38:41 1996  Torbjorn Granlund  <tege@matematik.su.se>
24184
24185	* mpz/add_ui.c: MP_INT => mpz_t.
24186	* mpz/cmp_ui.c: Likewise.
24187	* mpz/fac_ui.c: Likewise.
24188	* mpz/inp_binary.c: Likewise.
24189	* mpz/inp_raw.c: Likewise.
24190	* mpz/legendre.c: Likewise.
24191	* mpz/jacobi.c: Likewise.
24192	* mpz/out_binary.c: Likewise.
24193	* mpz/out_raw.c: Likewise.
24194	* mpz/random2.c: Likewise.
24195	* mpz/random.c: Likewise.
24196	* mpz/realloc.c: Likewise.
24197
24198	* mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
24199	__mpz_odd_less1_2factor => mpz_scan1(X,1).
24200	* mpz/ntsup.c: File deleted.
24201	* mpz/Makefile.in: Corresponding changes.
24202
24203	* mpz/pprime_p: Use mpz_scan1 to avoid looping.
24204
24205	* mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
24206	* mpz/pprime_p.c: Pass long to *_ui functions.
24207	* mpz/gcdext.c: Likewise.
24208	* mpz/fdiv_r_2exp.c: Likewise.
24209	* mpz/fac_ui.c: Likewise.
24210
24211	* mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
24212
24213	* mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
24214
24215	* mpz/cmp_ui.c: #undef mpz_cmp_ui.
24216	* mpz/cmp_si.c: #undef mpz_cmp_si.
24217	* gmp.h (mpz_cmp_ui): New #define.
24218	(mpz_cmp_si): New #define.
24219
24220Wed Feb 14 22:11:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
24221
24222	* gmp.h: Test __cplusplus in addition to __STDC__.
24223	* gmp-impl.h: Likewise.
24224
24225	* gmp.h: Surround declarations with extern "C" { ... }.
24226
24227Tue Feb 13 15:20:45 1996  Torbjorn Granlund  <tege@matematik.su.se>
24228
24229	* mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
24230	* mpz/tdiv_r_2exp.c: Likewise.
24231
24232	* mpz/fdiv_r_2exp.c: New file.
24233	* mpz/fdiv_q_2exp.c: New file.
24234	* mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
24235	* mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
24236	* mpz/Makefile.in: Corresponding changes.
24237
24238	* mpz/scan0.c,scan1.c: New files.
24239	* mpz/Makefile.in: Compile them.
24240
24241	* gmp.h (mpn_normal_size): Delete.
24242
24243	* config.guess: Update from Cygnus version.
24244
24245	* mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
24246	* mpn/m68k/lshift.S: Likewise.
24247
24248	* mpn/configure.in: Fix configuration for plain 68000.
24249
24250Mon Feb 12 01:06:06 1996  Torbjorn Granlund  <tege@matematik.su.se>
24251
24252	* mpz/tests/t-powm.c: Generate negative BASE operand.
24253
24254	* mpz/powm.c: Make result always positive.
24255
24256Sun Feb 11 01:44:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24257
24258	* mpz/tests/*.c: Add t- prefix.
24259	* mpz/tests/Makefile.in: Corresponding changes.
24260	* mpz/tests/configure.in: Update srctrigger.
24261
24262	* mpz/tests/gcd.c: Generate negative operands.
24263	* mpz/tests/gcd2.c: Likewise.
24264
24265	* mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
24266
24267Thu Feb  8 17:16:12 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
24268
24269	* mp{z,n}/gcd.c: Change mpn_gcd interface.
24270	* gmp.h: Ditto.
24271	* gmp.texi: update documentation.
24272
24273Mon Feb  7 23:58:43 1996  Andreas Schwab  <schwab@informatik.uni-dortmund.de>
24274
24275	* mpn/m68k/{lshift,rshift}.S: New files.
24276	* mpn/m68k/syntax.h: New ELF_SYNTAX macros.
24277	(MEM_INDX, R, PROLOG, EPILOG): New macros.
24278	* mpn/m68k/*.S: Use R macro with register name.  Use PROLOG and EPILOG
24279	macros.  Rename `size' to `s_size' or s1_size to avoid clash with ELF
24280	.size directive.
24281	* mpn/configure.in: New target m68k-*-linux*.
24282
24283Wed Feb  7 07:41:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24284
24285	* Makefile.in (cre-conv-tab): Workaround for SunOS make.
24286
24287	* mpz/tests/reuse.c: New file.
24288	* mpz/tests/Makefile.in: Handle reuse.c.
24289
24290Tue Feb  6 11:56:24 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
24291
24292	* mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
24293
24294Tue Feb  6 01:36:39 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24295
24296	* gmp.h (mpz_divexact): Delete parameter names.
24297	(mpz_lcm): Delete spurious declaration.
24298
24299	* mpz/dmincl.c: Fix typo.
24300
24301Mon Feb  5 01:11:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24302
24303	* mpn/generic/gcd.c (gcd_2): Declare consistently.
24304
24305	* mpz/tdiv_q.c: Optimize division by a single-limb divisor.
24306	* mpz/dmincl.c: Likewise.
24307
24308	* mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
24309	* mpz/sub.c: Likewise.
24310	* mpn/generic/sqrt.c: Likewise.
24311
24312	* mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
24313	destination arrays.
24314
24315Fri Feb  2 02:21:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24316
24317	* mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
24318	* mpz/Makefile.in: Compile them.
24319
24320	* mpn/Makefile.in (INCLUDES): Don't search in `generic'.
24321
24322Thu Feb  1 02:15:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24323
24324	Change from Ken Weber:
24325	* mpz/divexact.c: Make it work when quot is identical to either input.
24326
24327	* mpf/ui_sub.c: New file.
24328	* mpf/Makefile.in: Compile it.
24329
24330	* gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
24331	* mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
24332	these use MPZ_TMP_INIT.
24333	* mpz/mod.c: Likewise.
24334	* mpq/{add,sub}.c: Likewise.
24335	* mpq/canonicalize: Likewise.
24336
24337	* mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
24338	* mpq/canonicalize.c: Likewise.
24339
24340Wed Jan 31 01:45:00 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24341
24342	* mpn/generic/gcd.c: Misc changes from Ken.
24343
24344	* mpz/tests/gcd2.c: New file.
24345	* mpz/tests/Makefile.in: Handle gcd2.c.
24346
24347	* mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
24348	not orig_vsize.  Fix parameter declaration.
24349
24350	* mpz/mod_ui.c: Delete file.
24351	* mpz/Makefile.in: Don't try to compile mod_ui.
24352
24353	* mpz/cdiv_*_ui.c): Make them work right.
24354	* gmp.h: Declare cdiv*.
24355
24356Tue Jan 30 02:22:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24357
24358	* mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
24359	cdiv_r_ui.c,cdiv_ui.c}: New files.
24360	* mpz/Makefile.in: Compile them.
24361
24362	* All files: Make file permissions right.
24363
24364	Changes from Ken Weber:
24365	* mpn/generic/accelgcd.c: Delete.
24366	* mpn/generic/bingcd.c: Delete.
24367	* mpn/generic/numbits.c: Delete.
24368	* mpn/generic/gcd.c: New file.
24369	* mpn/configure.in (functions): Update accordingly.
24370	* mpz/divexact.c: New file.
24371	* mpz/Makefile.in: Compile divexact.c.
24372	* mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
24373	* gmp.h: declare new functions, delete obsolete declarations.
24374	* mpz/tests/dive.c: New file.
24375	* mpz/tests/Makefile.in: Handle dive.c.
24376
24377Mon Jan 29 03:53:24 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24378
24379	* mpz/random.c: Handle negative SIZE parameter.
24380
24381	* mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
24382	* mpz/tests/tst-mdm(_ui).c: Delete.
24383	* mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
24384	* mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
24385	* mpz/tests/Makefile.in: Corresponding changes.
24386	* mpz/tests/configure.in: Update srctrigger.
24387
24388	* mpn/generic/divmod.c: Update from divrem.
24389	* mpn/generic/divrem.c: Misc cleanups.
24390
24391Sun Jan 28 03:25:08 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24392
24393	* All files: Use new TMP_ALLOC interface.
24394
24395	* mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
24396
24397	* mpz/tests/powm_ui.c: New file.
24398	* mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
24399
24400	* Makefile.in: Update dependency list.
24401	* mpf/Makefile.in: Likewise.
24402	* mpz/Makefile.in: Likewise.
24403	* mpq/Makefile.in: Likewise.
24404	* Makefile.in: Set RANLIB simply to ranlib, and allow configure
24405	to override it.
24406
24407	* mpz/Makefile.in (conf): Delete spurious target.
24408	(mp_bases.c): Delete.
24409	(cre-conv-tab rules): Delete.
24410
24411	* Makefile.in (cre-conv-tab): Greatly simplify.
24412
24413Sat Jan 27 13:38:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24414
24415	* stack-alloc.c: New file.
24416	* stack-alloc.h: New file.
24417
24418	* gmp.h (__gmp_inline): Define using __inline__.
24419
24420Thu Jan 25 00:28:37 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24421
24422	* mpn/generic/scan0.c: New file.
24423	* mpn/generic/scan1.c: Renamed from next_bit.c.
24424	* mpn/configure.in (functions): Include scan0 and scan1.
24425
24426	* mpn/m68k/*: #include sysdep.h.  Use C_GLOBAL_NAME.
24427
24428	* configure: Update from Cygnus version.
24429	* config.guess: Likewise.
24430	* config.sub: Likewise.
24431	* configure: Pass --nfp to recursive configures.
24432
24433	* mpz/tests/tst-*.c: Adjust SIZE and reps.
24434
24435	* mpz/powm.c: Move esize==0 test earlier.
24436	In final reduction of rp,rsize, don't call mpn_divmod unless
24437	reduction is really needed.
24438
24439	* mpz/tests/tst-powm.c: Fix thinko in checking code.
24440
24441	* All files: Get rid of `__' prefix from mpn_* calls and declarations.
24442	* gmp.h: #define __MPN.
24443	* gmp.h: Use __MPN in #defines for mpn calls.
24444
24445	* mpn/generic/mul_n.c: Prepend `i' to internal routines.
24446	* gmp-impl.h: Add #defines using __MPN for those internal routines.
24447
24448	* mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
24449
24450Wed Jan 24 13:28:19 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24451
24452	* mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
24453	* mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
24454	* mpn/sparc32/v8/supersparc: New directory.
24455	* mpn/sparc32/v8/supersparc/udiv.S: New file.
24456
24457Tue Jan 23 01:10:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24458
24459	This major contribution is from Ken Weber:
24460	* mpn/generic/accelgcd.c: New file.
24461	* mpn/generic/bdivmod.c: New file.
24462	* mpn/generic/bingcd.c: New file.
24463	* mpn/generic/gcd_1.c: Rewrite.
24464	* mpn/generic/numbits.c: New file (to go away soon).
24465	* mpz/gcd.c: Rewrite.
24466	* mpz/tests/tst-gcd.c (SIZE): Now 128.
24467	* gmp.h: Declare new functions.
24468	* mpn/configure.in (functions): List new files.
24469	* gmp-impl.h (MPN_SWAP): Delete.
24470	(MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
24471	(MPN_COMPL_INCR, MPN_COMPL): Delete.
24472
24473Mon Jan 22 02:04:59 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24474
24475	* gmp.h (mpn_name): New #define.
24476
24477	* mpn/m88k/mc88110/addmul_1.s: New file.
24478	* mpn/m88k/mc88110/add_n.S: New file.
24479	* mpn/m88k/mc88110/sub_n.S: New file.
24480
24481	* mpn/m88k/sub_n.s: Correctly initialize carry.
24482
24483	* mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
24484
24485Sun Jan 21 00:04:35 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24486
24487	* mpn/sparc64/addmul_1.s: New file.
24488	* mpn/sparc64/submul_1.s: New file.
24489	* mpn/sparc64/rshift.s: New file.
24490
24491Sat Jan 20 00:32:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24492
24493	* mpz/iset.c: Fix typo introduced Dec 25.
24494
24495Wed Jan 17 13:16:44 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24496
24497	* config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
24498	* config/mt-sparcv8-gcc: Delete.
24499	* configure.in: Corresponding changes.
24500
24501Tue Jan 16 16:31:01 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24502
24503	* gmp-impl.h: #include alloca.h when necessary.
24504
24505	* longlong.h: Test __alpha instead of __alpha__, since the former
24506	is the standard symbol.
24507
24508Mon Jan 15 18:06:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24509
24510	* mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
24511	* mpn/sparc64/lshift.s: New file.
24512
24513Fri Dec 29 17:34:03 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24514
24515	* mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
24516	* mpn/x86/pentium/sub_n.S: Likewise.
24517
24518Thu Dec 28 03:16:57 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24519
24520	* mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
24521	of loop induction variable and load insn at beginning of loop.
24522	* mpn/x86/pentium/addmul_1.S: Likewise.
24523	* mpn/x86/pentium/submul_1.S: Likewise.
24524
24525Mon Dec 25 23:22:55 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24526
24527	* All files: Prefix user-visible structure fields with _mp_.
24528
24529Fri Dec 22 20:42:17 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24530
24531	* mpn/configure.in (m68k configs): Terminate path variable with
24532	plain "m68k".
24533
24534Fri Dec 22 03:29:33 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24535
24536	* mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
24537	clean things up.
24538
24539	* mpn/configure.in (m68k configs): Update #include path for new
24540	mpn directory organization.
24541
24542Tue Dec 12 02:53:02 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24543
24544	* gmp.h: Prefix all structure field with _mp_.
24545	* gmp-impl.h: Define access macros for these fields.
24546
24547Sun Dec 10 00:47:17 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24548
24549	* mpn/alpha/addmul_1.s: Prefix labels with `.'.
24550	* mpn/alpha/submul_1.s: Likewise.
24551	* mpn/alpha/[lr]shift.s: Likewise.
24552	* mpn/alpha/udiv_qrnnd.S: Likewise.
24553	* mpn/alpha/ev5/[lr]shift.s: Likewise.
24554
24555	* mpn/alpha/ev5/lshift.s: Fix typos.
24556
24557Fri Dec  1 14:28:20 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24558
24559	* mpn/Makefile.in (.SUFFIXES): Define.
24560
24561Wed Nov 29 23:11:57 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24562
24563	* mpn/sparc64/{add_n.s, sub_n.s}: New files.
24564
24565Tue Nov 28 06:03:13 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24566
24567	* mpn/x86/syntax.h: Handle ELF_SYNTAX.
24568	Rename GAS_SYNTAX => BSD_SYNTAX.
24569
24570	* mpn/configure.in: Handle linuxelf and SysV for x86 variants.
24571
24572Mon Nov 27 01:32:12 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24573
24574	* mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
24575
24576Sun Nov 26 04:30:47 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24577
24578	* mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
24579
24580	* mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
24581	* mpn/sparc32/sub_n.S: Likewise.
24582
24583Fri Nov 17 00:18:46 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24584
24585	* mpn/configure.in: Handle m68k on NextStep.
24586
24587Thu Nov 16 02:30:26 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24588
24589	* mpn: Reorganize machine-specific directories.
24590	* mpn/configure.in: Corresponding changes.
24591	(sh, sh2): Handle these.
24592	(m68k targets): Create asm-syntax.h.
24593
24594Thu Nov  9 02:20:50 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24595
24596	* mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
24597	(____mpn_mul_n): Likewise.
24598
24599Tue Nov  7 03:25:12 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24600
24601	* mpf/get_str.c: In exponentiation code (two places), don't swap
24602	input and output areas when calling mpn_mul_1.
24603	* mpf/set_str.c: Likewise.
24604
24605Fri Nov  3 02:35:58 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24606
24607	* mpf/Makefile.in: Make sure all objects are listed in dependency list;
24608	delete spurious entries.
24609
24610	* mpf/mul.c: Handle U or V being 0.  Allow prec+1 for result precision.
24611
24612	* mpf/set_prec.c: New computation of limb precision.
24613	* mpf/set_dfl_prec.c: Likewise.
24614
24615	* mpf/random2.c: Fix typo computing exp.
24616	* mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
24617	the user-requested number of digits, n_digits.
24618
24619Thu Nov  2 16:25:07 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24620
24621	* mpn/generic/divrem.c (case 2): Don't move np vector back, it is
24622	never read.
24623	(default case): Put most significant limb from np in new variable n2;
24624	decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
24625
24626Wed Nov  1 02:59:53 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24627
24628	* mpn/sparc/[lr]shift.S: New files.
24629
24630Tue Oct 31 00:08:12 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24631
24632	* mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
24633
24634	* gmp-impl.h (assert): Delete definition.
24635
24636	* mpf/sub.c: Delete all assert calls.  Delete variable `cy'.
24637
24638	* mpf/neg.c: Use prec+1 as precision.  Optimize for when arguments
24639	are the same.
24640	* mpf/abs.c: Likewise.
24641	* mpf/{set,neg,abs}.c: Make structure and variable names similar.
24642
24643Mon Oct 30 12:45:26 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24644
24645	* mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
24646	* mpn/generic/random2.c (random): Likewise.
24647
24648Sun Oct 29 01:54:28 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24649
24650	* mpf/div.c: Special handle U or V being 0.
24651
24652	* mpf/random2.c: New file.
24653
24654	* longlong.h (i860 rshift_rhlc): Define.
24655	(i960 udiv_qrnnd): Define.
24656	(i960 count_leading_zeros): Define.
24657	(i960 add_ssaaaa): Define.
24658	(i960 sub_ddmmss): Define.
24659	(i960 rshift_rhlc): Define.
24660
24661Sat Oct 28 19:09:15 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24662
24663	* mpn/pentium/rshift.S: Fix and generalize condition for when to use
24664	special code for shift by 1.
24665	* mpn/pentium/lshift.S: Likewise.
24666
24667Thu Oct 26 00:02:56 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24668
24669	* gmp.h: #undef __need_size_t.
24670	* mp.h: Update from gmp.h.
24671
24672Wed Oct 25 00:17:27 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24673
24674	* mpf/Makefile.in: Compile set_prec.c.
24675	* mpf/realloc.c: Delete this file.
24676	* mpf/Makefile.in: Delete mentions of realloc.c.
24677
24678	* gmp.h (__mpf_struct): Get rid of `alloc' field.
24679	* mpf/clear.c: Likewise.
24680	* mpf/init*.c: Likewise.
24681	* mpf/set_prec.c: Likewise.
24682	* mpf/iset*.c: Likewise.
24683
24684	* mpf/iset_str.c: New file.
24685
24686	* mpn/configure.in: Handle pyramid.
24687
24688	* mpf/set.c: Use prec+1 as precision.
24689
24690	* mpf/set_prec.c: New file.
24691
24692Tue Oct 24 00:56:41 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24693
24694	* mpn/generic/divrem.c: New file.  Will replace mpn/generic/divmod.c
24695	when rest of source is converted.
24696	* mpn/configure.in (functions): Add `divrem'
24697	* mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
24698
24699	* mpf/get_str.c: Completely rewritten.
24700	* mpf/add.c: Fix several problems.
24701	* mpf/sub.c: Compare operands from most significant end until
24702	first difference, exclude skipped limbs from computation.
24703	Accordingly simplify normalization code.
24704	* mpf/set_str.c: Fix several problems.
24705	* mpf/dump.c: New file.
24706	* mpf/Makefile.in: Compile dump.c.
24707	* mpf/init2.c: Set prec field correctly.
24708
24709Sun Oct 22 03:02:09 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24710
24711	* cre-conv-tab.c: #include math.h; don't declare log and floor.
24712
24713Sat Oct 21 23:04:10 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24714
24715	* mpf/mul_ui.c: Handle U being 0.
24716
24717Wed Oct 18 19:39:27 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24718
24719	* mpn/generic/set_str.c: Correctly handle input like "000000000000".
24720	Misc cleanups.
24721
24722Tue Oct 17 15:14:13 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24723
24724	* longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
24725	appropriate.
24726
24727Mon Oct 16 19:14:43 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24728
24729	* mpf/add.c: Rewrite.
24730	* mpf/set_str.c: New file.  Needs more work.
24731
24732Sat Oct 14 00:14:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24733
24734	* mpf/div_2exp.c: Vastly simplify.
24735	* mpf/mul_2exp.c: Likewise.
24736
24737	* mpf/sub.c: Rewrite.
24738
24739	* gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
24740
24741	* mpf/dump.c: Free allocated memory.
24742
24743	* gmp-impl.h (assert): Define.
24744
24745Wed Oct 11 13:31:00 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24746
24747	* mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
24748
24749Tue Oct 10 00:37:21 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24750
24751	* mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
24752
24753	* mpn/powerpc32/{lshift.s,rshift.s}: New files.
24754
24755	* configure.in: Fix typo.
24756
24757Sat Oct  7 08:17:09 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24758
24759	* longlong.h (smul_ppmm): Correct type of __m0 and __m1.
24760
24761Wed Oct  4 16:31:28 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24762
24763	* mpn/configure.in: Handle alphaev5.
24764	* mpn/ev4: New name for alpha subdir.
24765	* mpn/ev5: New subdir.
24766	* mpn/ev5/lshift.s: New file.
24767
24768Tue Oct  3 15:06:45 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24769
24770	* mpn/alpha/mul_1.s: Avoid static increments of pointers; use
24771	corresponding offsets in ldq and stq instructions instead.
24772	(Loop): Swap cmpult and stq to save one cycle on EV5.
24773
24774	* mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
24775	submul_1.s}: Don't check results if NOCHECK is defined.
24776
24777Mon Oct  2 11:40:18 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24778
24779	* longlong.h (mips umul_ppmm [32 and 64 bit versions]):
24780	Make new variants, based on GCC version number, that use `l' and `h'
24781	constraints instead of explicit mflo and mfhi instructions
24782
24783Sun Oct  1 00:17:47 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24784
24785	* mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
24786	* mpn/mc88100/sub_n.s: Likewise.
24787
24788	* config/mt-m88110: New file.
24789	* configure.in: Use it.
24790
24791	* mpn/mc88110/mul_1.s: Fix thinko.
24792
24793Sat Sep 30 21:28:19 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24794
24795	* mpz/set_d.c: Declare `size' at function start.
24796
24797	* experimental: New directory for mpx and mpz2.
24798
24799	* mpz/tdiv_q.c: Clarify comments.
24800	* mpz/{mod.c,mod_ui.c}: New file, for math mod function.
24801
24802	* mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
24803
24804	* mpn/sh/{add_n.s,sub_n.s}: New files.
24805
24806	* mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
24807
24808	* mpn/i960/{add_n.s,sub_n.s}: New files.
24809
24810	* mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
24811	to save cycles on EV5.
24812	* mpn/alpha/submul_1.s: Ditto.
24813	* mpn/alpha/mul_1.s: Ditto.
24814
24815Thu Sep 28 02:48:59 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24816
24817	* gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
24818	_LONG_LONG_LIMB is defined.
24819
24820	* longlong.h (m88110): Test __m88110__, not __mc88110__
24821
24822	* mpn/mc88110/mul_1.s: Rewrite.
24823
24824Tue Sep 26 23:29:05 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24825
24826	* config.sub: Update from current Cygnus version.
24827
24828	* mpn/configure.in: Recognize canonical m88*, not mc88*.
24829
24830Fri Sep 22 14:58:05 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24831
24832	* mpz/set_d.c: New file.
24833	* mpz/Makefile.in: Build new files.
24834
24835	* mpq/get_d.c: Replace usage of scalbn with ldexp.
24836
24837	* mpn/{vax,i386}/gmp-mparam.h: New files.
24838	* gmp-impl.h (ieee_double_extract): Define here.
24839	* mpf/set_d.c (ieee_double_extract): Not here.
24840
24841Thu Sep 21 00:56:36 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24842
24843	* longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
24844	(udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
24845	protect with new symbol LONGLONG_STANDALONE.
24846	(68000 umul_ppmm): Use %# prefix for immediate constants.
24847
24848Wed Sep 20 15:36:23 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24849
24850	* mpn/generic/divmod_1.c: Handle
24851	divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
24852	specifically also when normalization_steps != 0.
24853
24854Mon Sep 18 15:42:30 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24855
24856	* mpq/get_d.c: New file.
24857
24858Sun Sep 17 02:04:36 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24859
24860	* longlong.h (pyr): Botch up for now.
24861
24862Sat Sep 16 00:11:50 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24863
24864	* mpn/clipper/mul_1.s: New file.
24865	* mpn/clipper/add_n.s: New file.
24866	* mpn/clipper/sub_n.s: New file.
24867	* mpn/configure.in: Handle clipper*-*-*.
24868
24869	* mpn/configure.in: Recognize rs6000-*-*.
24870
24871Fri Sep 15 00:41:34 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24872
24873	* mpn/alpha/add_n.s: New file.
24874	* mpn/alpha/sub_n.s: New file.
24875
24876	* mpn/mips3: New name for mpn/r4000.
24877	* mpn/mips2: New name for mpn/r3000.
24878	* mpn/configure.in: Corresponding changes.
24879
24880	* mpn/generic/perfsqr.c (primes): Delete.
24881	(residue_map): Delete.
24882
24883Thu Sep 14 00:07:58 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24884
24885	* mpn/r3000/sub_n.s: Fix typo.
24886
24887	* dm_trunc.c: Delete spurious file.
24888
24889	* mpz/out_binary.c: Fix typo.
24890
24891	* mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
24892
24893	* gmp-impl.h: For sparc and sgi, include alloca.h.
24894
24895	* mpn/z8000/mul_1.s: Replace `test r' with `and r,r'.  Replace
24896	`ldk r,#0' with `xor r,r'.
24897
24898Wed Sep  6 00:58:38 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24899
24900	* mpz/inp_binary.c: New file.
24901	* mpz/out_binary.c: New file.
24902	* mpz/Makefile.in: Build new files.
24903
24904Tue Sep  5 22:53:51 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24905
24906	* gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
24907	and size fields.
24908
24909Sat Sep  2 17:47:59 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24910
24911	* mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
24912	* mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
24913	derived from r4000 code.
24914
24915Fri Sep  1 05:35:52 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24916
24917	* mpn/r3000/mul_1.s: Fix typo.
24918
24919	* mpn/powerpc32: Fix some old vs new mnemonic issues.
24920
24921	* mpn/powerpc32/{add_n.s,sub_n.s}: New files.
24922	* mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
24923
24924Wed Aug 30 10:43:47 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24925
24926	* mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
24927	* mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
24928
24929	* config.guess: Update to latest FSF revision.
24930
24931Mon Aug 28 02:18:13 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24932
24933	* mpz/out_str.c: Cast str to char * in fputs call.
24934
24935	* gmp-impl.h: Define UQItype, SItype, and USItype also
24936	when not __GNUC__.
24937
24938Fri Aug 25 01:45:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24939
24940	* mpn/i386/syntax.h: Renamed from asm-syntax.h.
24941	* mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
24942	* mpn/configure.in: Corresponding changes.
24943
24944Sun Aug 13 19:20:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24945
24946	* mpn/generic/random2.c: Test __hpux, not hpux.
24947
24948Sat Apr 15 20:50:33 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24949
24950	* mpn/sparc/add_n.S: Make it work for PIC.
24951	* mpn/sparc/sub_n.s: Likewise.
24952	* mpn/sparc8/addmul_1.S: Likewise.
24953	* mpn/sparc8/mul_1.S: Likewise.
24954	* mpn/i386/add_n.S: Likewise.
24955	* mpn/i386/sub_n.S: Likewise.
24956
24957Thu Apr 13 23:15:03 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24958
24959	* mpn/configure.in: Don't search power subdir for generic ppc configs.
24960	Add some ppc cpu-specific configs.  Misc clean up.
24961
24962Mon Apr 10 00:16:35 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24963
24964	* mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
24965
24966Sun Apr  9 12:38:11 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24967
24968	* longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
24969	not in asm.
24970
24971	* mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
24972
24973Tue Mar 28 00:19:52 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24974
24975	* mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
24976
24977Fri Mar 17 23:29:22 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24978
24979	* longlong.h (SH umul_ppmm): Define.
24980
24981Thu Mar 16 16:40:44 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24982
24983	* mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
24984	to help CSE.
24985
24986Fri Mar 10 20:03:49 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24987
24988	* mpn/powerpc32/mul_1.s: Clear cy before entering loop.
24989	Rearrange loop to save a cycle.
24990	* mpn/powerpc32/addmul_1.s: New file.
24991	* mpn/powerpc32/submul_1.s: New file.
24992
24993Fri Feb 17 22:44:45 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24994
24995	* mpn/configure.in: Set target_makefile_frag for freebsd
24996	in new case stmt.
24997	* mpn/config/t-freebsd: New file.
24998	* mpn/Makefile.in: Add #### for frag insertion.
24999	(XCFLAGS): Clear by default.
25000	(.c.o, .S.o rules): Pass XCFLAGS.
25001
25002Tue Feb  7 16:27:50 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
25003
25004	* longlong.h (68000 umul_ppmm): Merge improvements from henderson.
25005
25006Tue Jan 24 04:23:20 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
25007
25008	* longlong.h (default umul_ppmm): Store input parameters in temporaries
25009	to avoid reading them twice.
25010	(default smul_ppmm): New definition.
25011
25012Thu Dec 29 04:20:07 1994  Jim Meyering  (meyering@comco.com)
25013
25014	* generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
25015	of unused variable.
25016	* generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
25017	* mpz/powm.c (pow): Likewise.
25018
25019	* mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
25020	to placate `gcc -Wall'.
25021	* mpz/ior.c (mpz_ior): Likewise.
25022
25023Wed Dec 28 13:31:40 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25024
25025	* mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
25026
25027Mon Dec 26 17:15:36 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25028
25029	* longlong.h: Test for more symbols, in __mc68000__ case.
25030
25031	* mpn/mpn/config.sub: Recognize m68060.
25032	* mpn/configure.in: Change mc* to m* for 68k targets.
25033	* mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
25034
25035Mon Dec 19 01:56:30 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25036
25037	* config.sub: Recognize pentium as a valid CPU.
25038	* mpn/configure.in: Handle pentium specifically, to use new assembly
25039	code.
25040
25041Mon Dec 19 00:13:01 1994  Jim Meyering  (meyering@comco.com)
25042
25043	* gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
25044	is defined.
25045	* gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
25046
25047Mon Dec 19 00:04:54 1994  Kent Boortz  (boortz@sics.se)
25048
25049	* Makefile.in (recursive makes): Pass CFLAGS.
25050
25051Sun Dec 18 22:34:49 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25052
25053	* mpn/pentium: New directory.
25054
25055	* mpz/pprime.c: Make sure to mpz_clear all temporaries.
25056
25057	* longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
25058	* configure.in: Handle supersparc*-.
25059	* config/mt-supspc-gcc: New file.
25060	* config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
25061
25062Mon Dec 12 22:22:10 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25063
25064	* mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
25065	#include sysdep.h before asm-syntax.h.
25066
25067	* mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
25068	* mpn/i386/asm-syntax.h: Likewise.
25069
25070	* mpn/mc68020/asm-syntax.h: New name for asm.h.
25071	* mpn/i386/asm-syntax.h: New name for asm.h.
25072
25073Tue Dec  6 21:55:25 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25074
25075	* mpz/array_init.c: Fix typo in declaration.
25076
25077Fri Nov 18 19:50:52 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25078
25079	* mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
25080
25081Mon Nov 14 00:34:12 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25082
25083	* mpn/generic/random2.c (random): Test for __svr4__.
25084
25085Wed Oct 12 23:28:16 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25086
25087	* cre-conv-tab.c (main): Avoid upper-case X in printf format string.
25088
25089Tue Aug 23 17:16:35 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25090
25091	* mpz/perfsqr.c: Use mpn_perfect_square_p.
25092	* mpn/generic/perfsqr.c: New file.
25093
25094Wed Jul  6 13:46:51 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25095
25096	* mpz/array_init.c: New file.
25097	* mpz/Makefile.in: Compile array_init.
25098	* gmp.h: Declare mpz_array_init.
25099
25100Mon Jul  4 01:10:03 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25101
25102	* mpz/add.c: Fix bogus comment.
25103	* mpz/sub.c: Likewise.
25104
25105Sat Jul  2 02:14:56 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25106
25107	* mpn/generic/pre_mod_1.c: New file.
25108	* mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
25109
25110Fri Jul 01 22:10:19 1994  Richard Earnshaw (rwe11@cl.cam.ac.uk)
25111
25112	* longlong.h (arm umul_ppmm): Fix typos in last change.  Mark
25113	hard-coded registers with "%|"
25114
25115Thu Jun 30 03:59:33 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25116
25117	* mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
25118	Use __mpn_mod_1.
25119	* mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
25120
25121Wed Jun 29 18:45:41 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25122
25123	* mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
25124
25125	* mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
25126
25127	* gmp.h: Use "defined (__STDC__)" consistently.
25128
25129Tue Jun 28 18:44:58 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25130
25131	* gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
25132
25133	* mpz/tests/Makefile.in: Use CFLAGS for linking.
25134
25135	* Makefile.in (CFLAGS): Use -O2 here.
25136	* mpn/Makefile (CFLAGS): Not here.
25137
25138	* mpq/cmp_ui.c: Fix typo.
25139	* mpq/canonicalize.c: Fix typo.
25140	* mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
25141	* mpn/generic/gcd_1.c: Fix braino in last change.
25142
25143Mon Jun 27 16:10:27 1994  Torbjorn Granlund  (tege@rtl.cygnus.com)
25144
25145	* mpz/gcd_ui.c: Change return type and return result.
25146	Allow destination param to be NULL.
25147	* gmp.h: Corresponding change.
25148	* mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
25149
25150Tue Jun 14 02:17:43 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
25151
25152	* mpn/i386/asm.h (ALIGN): Make it take a parameter.
25153	* mpn/i386/*.S: Use ALIGN to align all loops.
25154
25155	* mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
25156	(Makes old versions of GAS happy.)
25157
25158Sat May 28 01:43:54 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25159
25160	* Many files: Delete unused variables and labels.
25161	* mpn/generic/dump.c: cast printf width argument to int.
25162
25163Wed May 25 00:42:37 1994  Torbjorn Granlund  (tege@thepub.cygnus.com)
25164
25165	* mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
25166	(xmod): Ignore return value of __mpn_divmod.
25167	(xmod): Improve normalization code.
25168
25169Sat May 21 01:30:09 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25170
25171	* mpz/gcdext.c: Cosmetic changes.
25172
25173	* mpz/fdiv_ui.c: New file.
25174
25175Fri May 20 00:24:53 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25176
25177	* mpz/tests/Makefile.in: Use explicit rules for running tests,
25178	not a shell loop.
25179	(clean): Delete stmp-*.
25180
25181	* mpz/Makefile.in: Update.
25182
25183	* mpz/div_ui.c: Don't include longlong.h.
25184	* mpz/dm_ui.c: Likewise.
25185
25186	* mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
25187	mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files.  Code partly from deleted
25188	mdm.c, mdm_ui.c, etc, partly rewritten.
25189	* mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
25190	* mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
25191	mpz/mmod_ui.c: Delete.
25192
25193	* mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
25194	mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
25195	New names for files implementing truncating division.
25196	* mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
25197
25198	* mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
25199	instead.
25200	(clean): Delete tmp-*.
25201
25202Thu May 19 01:37:44 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25203
25204	* mpz/cmp.c: Call __mpn_cmp.
25205
25206	* mpz/popcount.c: Fix typo.
25207
25208	* mpz/powm_ui.c: Simplify main loop.  Keep principal operand size
25209	smaller than MSIZE when possible.
25210	* mpz/powm.c: Likewise.
25211
25212	* mpn/generic/sqrt.c: Move alloca calls into where the memory is
25213	needed.  Simplify.
25214
25215	* gmp.h: (_PROTO): New macro.
25216	Add many function declarations; use _PROTO macro in all declarations.
25217
25218	* mpf/*.c: Prepend mpn calls with __.
25219
25220Wed May 18 20:57:06 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25221
25222	* mpf/*ui*.c: Make ui argument `long' for consistency with mpz
25223	functions.
25224
25225	* mpf/div_ui.c: Simplify.
25226
25227Tue May 17 01:05:14 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25228
25229	* mpz/*.c: Prepend mpn calls with __.
25230
25231	* mpz/mul_ui.c: Use mpn_mul_1.
25232
25233Mon May 16 17:19:41 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25234
25235	* mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
25236	* mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
25237	Nuke use of LAB.
25238
25239Sat May 14 14:21:02 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25240
25241	* gmp-impl.h: Don't define abort here.
25242
25243	* mpz/pow_ui.c: Increase temporary allocation.
25244	* mpz/ui_pow_ui.c: Likewise.
25245
25246	* gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
25247
25248	* All Makefile.in: Delete spurious -I arguments.
25249	Update dependencies.
25250
25251	* mpz/popcount.c: New file.
25252	* mpz/hamdist.c: New file.
25253
25254	* All configure: Latest version from Cygnus.
25255
25256	* mpq/Makefile.in: New file.
25257	* mpq/configure.in: New file.
25258	* Makefile.in, configure.in: Enable compilation of mpq.
25259
25260	* mpq/set_z.c: Fix typos.
25261	* mpq/canonicalize.c: Fix typos.
25262	* mpq/cmp_ui.c: Fix typos.
25263
25264	* mpf/add_ui.c: Read U->D into UP always.  Delete spurious MPN_COPY.
25265	* mpf/sub_ui.c: Likewise.
25266
25267	* gmp-impl.h: Don't redefine alloca.
25268
25269	* COPYING.LIB: Renamed from COPYING.
25270
25271Wed May 11 01:45:44 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
25272
25273	* mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
25274	shift counts.  Fix typo when testing negative_result.
25275	* mpz/powm.c: Likewise.
25276
25277	* mpz/ui_pow_ui.c: New file.
25278	* mpz/Makefile.in: Update.
25279
25280	* mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
25281
25282	* mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
25283	* mpz/gcd.c: Declare mpn_xmod.
25284
25285	* mpz/powm.c: Major changes to accommodate changed mpn semantics.
25286	* mpz/powm_ui.c: Update from mpz/powm.c.
25287
25288	* mpz/tests/tst-io.c: New file.
25289	* mpz/tests/tst-logic: New file.
25290	* mpz/tests/Makefile.in: Update.
25291
25292	* mpz/inp_str.c: Get base right when checking for first digit.
25293	* mpz/inp_str.c: Allocate more space for DEST when needed.
25294
25295	* mpz/com.c: Use mpn_add_1 and mpn_sub_1.
25296	* mpz/and.c, mpz/ior.c: Likewise.  Simplify somewhat.
25297
25298	* mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
25299	Rename parameters to be consistent with mpz/sub_ui.
25300	General simplifications.
25301	* mpz/sub_ui.x: Likewise.
25302
25303Tue Aug 10 19:41:16 1993  Torbjorn Granlund  (tege@prudens.matematik.su.se)
25304
25305	* mpf: New directory.
25306	* mpf/*.c: Merge basic set of mpf functions.
25307
25308	* Many logs missing...
25309
25310Sun Apr 25 18:40:26 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
25311
25312	* memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
25313	* bsd/xtom.c: Likewise.
25314
25315	* mpz/div.c: Remove free_me and free_me_size and their usage.
25316	Use mpn_divmod for division; corresponding changes in return value
25317	convention.
25318	* mpz/powm.c: `carry_digit' => `carry_limb'.
25319	* bsd/sdiv.c: Clearify comment.
25320
25321Sun Apr 25 00:31:28 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
25322
25323	* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
25324
25325Sat Apr 24 16:23:33 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
25326
25327	* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
25328
25329	* gmp-impl.h: #define ABS.
25330	* (Many files): Use ABS instead of abs.
25331
25332	* mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
25333	mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
25334
25335	* mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
25336	non-32-bit machines.
25337
25338Tue Apr 20 13:13:58 1993  Torbjorn Granlund  (tege@du.nada.kth.se)
25339
25340	* mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
25341	rounding them down to fit.
25342
25343	* mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
25344
25345	* mpz/inp_str.c (char_ok_for_base): New function.
25346	(mpz_inp_str): Use it.
25347
25348Sun Mar 28 21:54:06 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
25349
25350	* mpz/inp_raw.c: Allocate x_index, not xsize limbs.
25351
25352Mon Mar 15 11:44:06 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
25353
25354	* mpz/pprime.c: Declare param `const'.
25355	* gmp.h: Add declarations for mpz_com.
25356
25357Thu Feb 18 14:10:34 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
25358
25359	* mpq/add.c, mpq/sub.c: Call mpz_clear for t.
25360
25361Fri Feb 12 20:27:34 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
25362
25363	* mpz/inp_str.c: Recog minus sign as first character.
25364
25365Wed Feb  3 01:36:02 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
25366
25367	* mpz/iset.c: Handle 0 size.
25368
25369Tue Feb  2 13:03:33 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
25370
25371	* mpz/mod_ui.c: Initialize dividend_size before it's used.
25372
25373Mon Jan  4 09:11:15 1993  Torbjorn Granlund  (tege@sics.se)
25374
25375	* bsd/itom.c: Declare param explicitly 'signed'.
25376	* bsd/sdiv.c: Likewise.
25377
25378	* mpq/cmp.c: Remove unused variable tmp_size.
25379	* mpz/powm_ui.c: Fix typo in esize==0 if stmt.
25380	* mpz/powm.c: Likewise.
25381
25382Sun Nov 29 01:16:11 1992  Torbjorn Granlund  (tege@sics.se)
25383
25384	* mpn/generic/divmod_1.c (mpn_divmod_1): Handle
25385	divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
25386	specifically.
25387
25388	* Reorganize sources.  New directories mpn, mpn/MACH, mpn/generic,
25389	mpz, mpq, bsd.  Use full file name for change logs hereafter.
25390
25391Wed Oct 28 17:40:04 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
25392
25393	* longlong.h (__hppa umul_ppmm): Fix typos.
25394	(__hppa sub_ddmmss): Swap input arguments.
25395
25396	* mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
25397	initializator.
25398
25399Sun Oct 25 20:30:06 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
25400
25401	* mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
25402	specifically (used to consider all negative numbers prime).
25403
25404	* mpz_powm_ui: `carry_digit' => `carry_limb'.
25405
25406	* sdiv: Handle zero dividend specifically.  Replace most code in
25407	this function with a call to mpn_divmod_1.
25408
25409Fri Sep 11 22:15:55 1992  Torbjorn Granlund  (tege@tarrega.sics.se)
25410
25411	* mpq_clear: Don't free the MP_RAT!
25412
25413	* mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
25414
25415Thu Sep  3 01:47:07 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
25416
25417	* All files: Remove leading _ from mpn function names.
25418
25419Wed Sep  2 22:21:16 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
25420
25421	Fix from Jan-Hein Buhrman:
25422	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
25423
25424	* mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
25425	life.
25426
25427Sun Aug 30 18:37:15 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
25428
25429	* _mpz_get_str: Use mpz_sizeinbase for computing out_len.
25430	* _mpz_get_str: Don't remove leading zeros.  Abort if there are some.
25431
25432Wed Mar  4 17:56:56 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25433
25434	* gmp.h: Change definition of MP_INT to make the & before params
25435	optional.  Use typedef to define it.
25436	* mp.h: Use typedef to define MINT.
25437
25438Tue Feb 18 14:38:39 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25439
25440	longlong.h (hppa umul_ppmm): Add missing semicolon.  Declare type
25441	of __w1 and __w0.
25442
25443Fri Feb 14 21:33:21 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25444
25445	* longlong.h: Make default count_leading_zeros work for machines >
25446	32 bits.  Prepend `__' before local variables to avoid conflicts
25447	with users' variables.
25448
25449	* mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
25450	* gmp-impl.h: ... and put it here.
25451	* mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
25452
25453Tue Feb 11 17:20:12 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25454
25455	* mpn_mul: Enhance base case by handling small multiplicands.
25456	* mpn_dm_1.c: Revert last change.
25457
25458Mon Feb 10 11:55:15 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25459
25460	* mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
25461
25462Fri Feb  7 16:26:16 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25463
25464	* mpn_mul: Replace code for base case.
25465
25466Thu Feb  6 15:10:42 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25467
25468	* mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
25469	pre-inverting divisor.
25470
25471Sun Feb  2 11:10:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25472
25473	* longlong.h: Make __LLDEBUG__ work differently.
25474	(_IBMR2): Reinsert old code.
25475
25476Sat Feb  1 16:43:00 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25477
25478	* longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
25479	using floating point operations.  Don't define
25480	UDIV_NEEDS_NORMALIZATION any longer.
25481
25482Fri Jan 31 15:09:13 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25483
25484	* longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
25485	* longlong.h (#ifdef __hppa): Define umul_ppmm.
25486
25487Wed Jan 29 16:41:36 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25488
25489	* mpn_cmp: Only one length parameter, assume operand lengths are
25490	the same.  Don't require normalization.
25491	* mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
25492	new mpn_cmp definition.
25493
25494Tue Jan 28 11:18:55 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25495
25496	* _mpz_get_str: Fix typo in comment.
25497
25498Mon Jan 27 09:44:16 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25499
25500	* Makefile.in: Add new files.
25501
25502	* mpn_dm_1.c: New file with function _mpn_divmod_1.
25503	* mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
25504	* mpz_div_ui: Likewise.
25505
25506	* mpn_mod_1.c: New file with function _mpn_mod_1.
25507	* mpz_mod_ui: Use _mpn_mod_1.
25508
25509Thu Jan 23 18:54:09 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25510
25511	Bug found by Paul Zimmermann (zimmermann@inria.inria.fr):
25512	* mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
25513	Handle dividend == 0.
25514
25515Wed Jan 22 12:02:26 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25516
25517	* mpz_pprime.c: Use "" for #include.
25518
25519Sun Jan 19 13:36:55 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25520
25521	* mpn_rshiftci.c (header): Correct comment.
25522
25523Wed Jan 15 18:56:04 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25524
25525	* mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
25526	to make space for ignored quotient at the end.  (The quotient might
25527	always be an extra limb.)
25528
25529Tue Jan 14 21:28:48 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25530
25531	* mpz_powm_ui: Fix comment.
25532	* mpz_powm: Likewise.
25533
25534Mon Jan 13 18:16:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25535
25536	* tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
25537
25538Sun Jan 12 13:54:28 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25539
25540	Fixes from Kazumaro Aoki:
25541	* mpz_out_raw: Take abs of size to handle negative values.
25542	* mpz_inp_raw: Reallocate before reading ptr from X.
25543	* mpz_inp_raw: Store, don't read, size to x->size.
25544
25545Tue Jan  7 17:50:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25546
25547	* gmp.h, mp.h: Remove parameter names from prototypes.
25548
25549Sun Dec 15 00:09:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25550
25551	* tests/Makefile.in: Prepend "./" to file names when executing
25552	tests.
25553
25554	* Makefile.in: Fix many problems.
25555
25556Sat Dec 14 01:00:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25557
25558	* mpn_sqrt.c: New file with _mpn_sqrt.
25559	* mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
25560	* msqrt.c: Delete.  Create from mpz_sqrtrem.c in Makefile.in.
25561	* mpz_do_sqrt.c: Delete.
25562	* Makefile.in: Update to reflect these changes.
25563
25564	* Makefile.in, configure, configure.subr: New files
25565	(from bothner@cygnus.com).
25566	* dist-Makefile: Delete.
25567
25568	* mpz_fac_ui: Fix comment.
25569
25570	* mpz_random2: Rewrite a bit to make it possible for the most
25571	significant limb to be == 1.
25572
25573	* mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
25574
25575Fri Dec 13 23:10:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25576
25577	* mpz_do_sqrt: Simplify special case for U == 0.
25578	* m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
25579	  Rename _mpz_impl_sqrt to _mpz_do_sqrt.
25580
25581Fri Dec 13 12:52:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25582
25583	* gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
25584
25585Thu Dec 12 22:17:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25586
25587	* mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
25588	variables to mp_size.
25589
25590Wed Dec 11 22:00:34 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25591
25592	* mpn_rshift.c: Fix header comments.
25593
25594Mon Dec  9 17:46:10 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25595
25596	Released 1.2.
25597
25598	* gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
25599
25600	* dist-Makefile: Add missing dependency for cre-mparam.
25601
25602	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
25603	  mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
25604
25605	* dist-Makefile (clean): clean in tests subdir too.
25606	* tests/Makefile: Define default values for ROOT and SUB.
25607
25608	* longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
25609	2 constraint.
25610
25611Mon Nov 11 00:06:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25612
25613	* mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
25614
25615Sat Nov  9 23:47:38 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25616
25617	Released 1.1.94.
25618
25619	* dist-Makefile, Makefile, tests/Makefile: Merge tests into
25620	distribution.
25621
25622Fri Nov  8 22:57:19 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25623
25624	* gmp.h: Don't use keyword `signed' for non-ANSI compilers.
25625
25626Thu Nov  7 22:06:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25627
25628	* longlong.h: Cosmetic changes to keep it identical to gcc2 version
25629	of longlong.h.
25630	* longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
25631	sub_ddmmss.
25632
25633Mon Nov  4 00:36:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25634
25635	* mpn_mul: Fix indentation.
25636
25637	* mpz_do_sqrt: Don't assume 32 bit limbs (had constant
25638	4294967296.0).
25639	* mpz_do_sqrt: Handle overflow in conversion from double returned
25640	by SQRT to mp_limb.
25641
25642	* gmp.h: Add missing function definitions.
25643
25644Sun Nov  3 18:25:25 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25645
25646	* mpz_pow_ui: Change type of `i' to int.
25647
25648	* ChangeLog: Add change log entry.
25649	* ChangeLog: Add change log entry.
25650	* ChangeLog: Add change log entry.
25651	* ChangeLog: Add change log entry.
25652	* ChangeLog: Add change log entry.
25653	* ChangeLog: Add change log entry.
25654	* ChangeLog: Add change log entry.
25655	* ChangeLog: Add change log entry.
25656Stack overflow.
25657
25658	* mpz_pow_ui.c: Fix typo in comment.
25659
25660	* dist-Makefile: Create rpow.c from mpz_powm_ui.c.
25661	* mpz_powm_ui.c: Add code for rpow.
25662	* rpow.c: Delete this file.  The rpow function is now implemented
25663	in mpz_powm_ui.c.
25664
25665	* mpz_fac_ui.c: New file.
25666	* gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
25667
25668	Bug found by John Amanatides (amana@sasquatch.cs.yorku.ca):
25669	* mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
25670	the first argument not smaller than the second.
25671
25672Tue Oct 29 13:56:55 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25673
25674	* cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
25675	header text.
25676
25677Mon Oct 28 00:35:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25678
25679	* mpz_random2: Handle size == 0.
25680
25681	* gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
25682	chars_per_bit_exactly, and change its definition.
25683	* cre-conv-tab.c (main): Output field according to its new
25684	definition.
25685	* mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
25686	Use chars_per_bit_exactly.
25687
25688	* mpz_random2: Change the loop termination condition in order to
25689	get a large most significant limb with higher probability.
25690
25691	* gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
25692	* mpz_get_si.c: New file.
25693	* dist-Makefile: Add mpz_random2 and mpz_get_si.
25694
25695	* mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
25696	power of 2, giving exact result.
25697
25698	* mpn_mul: Fix MPN_MUL_VERIFY in various ways.
25699	* mpn_mul: New macro KARATSUBA_THRESHOLD.
25700	* mpn_mul (karatsuba's algorithm): Don't write intermediate results
25701	to prodp, use temporary pp instead.  (Intermediate results can be
25702	larger than the final result, possibly writing into hyperspace.)
25703	* mpn_mul: Make smarter choice between Karatsuba's algorithm and the
25704	shortcut algorithm.
25705	* mpn_mul: Fix typo, cy instead of xcy.  Unify carry handling code.
25706
25707Sun Oct 27 19:57:32 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25708
25709	* mpn_mul: In non-classical case, choose Karatsuba's algorithm only
25710	when usize > 1.5 vsize.
25711
25712	* mpn_mul: Break between classical and Karatsuba's algorithm at
25713	KARATSUBA_THRESHOLD, if defined.  Default to 8.
25714
25715	* mpn_div: Kludge to fix stray memory read.
25716
25717Sat Oct 26 20:06:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25718
25719	* mpz_gcdext: Handle a = b = 0.  Remove memory leakage by calling
25720	mpz_clear for all temporary variables.
25721
25722	* mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
25723	function's argument constraints.  Compute wsize correctly.
25724
25725	* mpz_gcd: Fix typo in comment.
25726
25727	* memory.c (_mp_default_allocate, _mp_default_reallocate): Call
25728	abort if allocation fails, don't just exit.
25729
25730Fri Oct 25 22:17:20 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25731
25732	* mpz_random2.c: New file.
25733
25734Thu Oct 17 18:06:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25735
25736	Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
25737	* mpq_cmp: Take sign into account, don't just compare the
25738	magnitudes.
25739	* mpq_cmp: Call _mpn_mul in the right way, with the first argument
25740	not smaller than the second.
25741
25742Wed Oct 16 19:27:32 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25743
25744	* mpz_random: Ensure the result is normalized.
25745
25746Tue Oct 15 14:55:13 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25747
25748	* mpz_clrbit: Support non-ANSI compilers.
25749
25750Wed Oct  9 18:03:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25751
25752	* longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
25753
25754Tue Oct  8 17:42:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25755
25756	* mpz_mdm_ui: Add comments.
25757
25758	* mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
25759	* mpz_init_ui: Change spacing and header comment.
25760
25761Thu Oct  3 18:36:13 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25762
25763	* dist-Makefile: Prepend `./' before some filenames.
25764
25765Sun Sep 29 14:02:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25766
25767	Released 1.1 (public).
25768
25769	* mpz_com: New name of mpz_not.
25770	* dist-Makefile: Change mpz_not to mpz_com.
25771
25772Tue Sep 24 12:44:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25773
25774	* longlong.h: Fix header comment.
25775
25776Mon Sep  9 15:16:24 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25777
25778	Released 1.0.92.
25779
25780	* mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
25781	case.
25782
25783	* longlong.h (m68000 umul_ppmm): Clobber one register less by
25784	slightly rearranging the code.
25785
25786Sun Sep  1 18:53:25 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25787
25788	* dist-Makefile (stamp-stddefh): Fix typo.
25789
25790Sat Aug 31 20:41:31 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25791
25792	Released 1.0.91.
25793
25794	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
25795	  mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
25796	* gmp.h, gmp.texi: Define the new functions.
25797
25798Fri Aug 30 08:32:56 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25799
25800	* mpz_gcdext: Compute t argument from the other quantities at the
25801	  end, of the function, not in the loop.  New feature: Allow t to be
25802	  NULL.
25803
25804	* mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
25805	  include "mp.h".  Use type name `MP_INT' always.
25806
25807	* dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
25808
25809Wed Aug 28 00:45:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25810
25811	* dist-Makefile (documentation): Go via tmp.texi to avoid the
25812	  creation of gmp.dvi if any errors occur.  Make tex read input
25813	  from /dev/null.
25814
25815Fri Aug 23 15:58:52 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25816
25817	* longlong.h (68020, i386): Don't define machine-dependent
25818	  __umulsidi3 (so the default definition is used).
25819	* longlong.h (all machines): Cast all operands, sources and
25820	  destinations, to `unsigned long int'.
25821	* longlong.h: Add gmicro support.
25822
25823Thu Aug 22 00:28:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25824
25825	* longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
25826	* longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
25827	* longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
25828	* _mpz_get_str.c: Add code to do division by big_base using only
25829	  umul_qrnnd, if that is faster.  Use UMUL_TIME and UDIV_TIME to
25830	  decide which variant to use.
25831
25832Wed Aug 21 15:45:23 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25833
25834	* longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
25835	  nops.  (Saves two insn.)
25836
25837	* longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
25838	  branch, and to permit input/output register overlap.
25839
25840	* longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
25841	* longlong.h (__29k__ umul_ppmm): Split asm instructions into two
25842	  asm statements (gives better code if either the upper or lower
25843	  part of the product is unused.
25844
25845Tue Aug 20 17:57:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25846
25847	* _mpz_get_str.c (outside of functions): Remove
25848	  num_to_ascii_lower_case and num_to_ascii_upper_case.  Use string
25849	  constants in the function instead.
25850
25851Mon Aug 19 00:37:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25852
25853	* cre-conv-tab.c (main): Output table in hex.  Output 4 fields, not
25854	  3, for components 0 and 1.
25855
25856	* gmp.h: Add declaration of mpq_neg.
25857
25858	Released 1.0beta.13.
25859
25860	* _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
25861	  comparing to enum literals SPC and EOF.  This makes the code work
25862	  for compilers where `char' is unsigned.  (Bug found by Brian
25863	  Beuning).
25864
25865	Released 1.0beta.12.
25866
25867	* mpz_mod_ui: Remove references to quot.  Remove quot_ptr, quot_size
25868	  declarations and assignment code.
25869
25870Sun Aug 18 14:44:26 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25871
25872	* mpz_mod_ui: Handle dividend < 0.
25873
25874	Released 1.0beta.11.
25875
25876	* mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
25877	  general structure, variable names, etc.
25878
25879	* sdiv: Un-normalize the remainder in n1 before it is negated.
25880
25881	* longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
25882	  udiv_qrnnd.
25883
25884	* mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
25885	  the quotient size if the dividend size is incremented.  (Bug found
25886	  by Brian Beuning.)
25887
25888	* mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
25889	  (Bug found by Brian Beuning.)
25890
25891	* mpz_mod_ui: Replace "digit" by "limb".
25892
25893	* mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
25894	  for non-32-bit machines (PP is hardwired for such machines).
25895	* mpz_perfsqr.c (outside of functions): Define PP value with an L.
25896
25897	* mpn_mul.c (_mpn_mul): Add verification code that is activated if
25898	  DEBUG is defined.  Replace "digit" by "limb".
25899	* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
25900	  after the addition.
25901	* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
25902	  and v0_size, and according to the result, swap arguments in
25903	  recursive call.  (Don't violate mpn_mul's own argument
25904	  constraints.)
25905
25906Fri Aug 16 13:47:12 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25907
25908	Released 1.0beta.10.
25909
25910	* longlong.h (IBMR2): Add udiv_qrnnd.
25911
25912	* mpz_perfsqr: Remove unused variables.
25913
25914	* mpz_and (case for different signs): Initialize loop variable i!
25915
25916	* dist-Makefile: Update automatically generated dependencies.
25917	* dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
25918	  etc to dependency file lists.
25919
25920	* longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
25921	  `unsigned long int'.
25922	* longlong.h: Add `int' after `unsigned' and `long' everywhere.
25923
25924Wed Aug 14 18:06:48 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25925
25926	* longlong.h: Add ARM, i860 support.
25927
25928	* mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
25929
25930Tue Aug 13 21:57:43 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25931
25932	* _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
25933	  mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
25934	* gmp-impl.h: Put it here, and make it `const'.
25935	* cre-conv-tab.c (main): Make struct __mp_bases `const'.
25936
25937Mon Aug 12 17:11:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25938
25939	* cre-conv-tab.c (main): Use %lu in printf for long ints.
25940
25941	* dist-Makefile: Fix cre-* dependencies.
25942
25943	* cre-conv-tab.c (main): Output field big_base_inverted.
25944
25945	* gmp-impl.h (struct bases): New field big_base_inverted.
25946	* gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
25947	  to float (in order to keep the structure smaller).
25948
25949	* mp.h, gmp.h: Change names of macros for avoiding multiple
25950	  includes.
25951
25952Fri Aug  9 18:01:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25953
25954	* _mpz_get_str: Only shift limb array if normalization_steps != 0
25955	  (optimization).
25956
25957	* longlong.h (sparc umul_ppmm): Use __asm__, not asm.
25958	* longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
25959	  and m1 (overlap between output and input operands did not work).
25960	* longlong.h: Add VAX, ROMP and HP-PA support.
25961	* longlong.h: Sort the machine dependent code in alphabetical order
25962	  on the CPU name.
25963	* longlong.h: Hack comments.
25964
25965Thu Aug  8 14:13:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25966
25967	Released 1.0beta.9.
25968
25969	* longlong.h: Define BITS_PER_LONG to 32 if it's not already
25970	  defined.
25971	* Define __BITS4 to BITS_PER_LONG / 4.
25972	* Don't assume 32 bit word size in "count_leading_zeros" C macro.
25973	  Use __BITS4 and BITS_PER_LONG instead.
25974
25975	* longlong.h: Don't #undef internal macros (reverse change of Aug 3).
25976
25977	* longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
25978	  even for plain mc68000.
25979
25980	* mpq_div: Flip the sign of the numerator *and* denominator of the
25981	  result if the intermediate denominator is negative.
25982
25983	* mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
25984
25985	* mpz_and.c: Compute the result size more conservatively.
25986	* mpz_ior.c: Likewise.
25987
25988	* mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
25989
25990	* dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
25991	  BSDMP_SRCS.
25992
25993	* dist-Makefile: Create mult.c from mpz_mul.c.
25994	* mult.c: Delete this file.
25995
25996	* _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
25997	  not done properly if the input string had many leading zeros).
25998
25999Sun Aug  4 16:54:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26000
26001	* dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
26002	  work with VPATH and GNU MP.
26003
26004	* mpz_gcd: Don't call mpz_set; inline its functionality.
26005
26006	* mpq_mul, mpq_div: Fix several serious typos.
26007
26008	* mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
26009	  zero.
26010
26011	* mpq_neg.c: New file.
26012
26013	* dist-Makefile: Remove obsolete dependencies.
26014
26015	* mpz_sub: Fix typo.
26016
26017	Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
26018	* mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
26019	  is just 1.
26020	* mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
26021
26022Sat Aug  3 23:45:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26023
26024	* longlong.h: Clean up comments.
26025	* longlong.h: #undef internal macros.
26026
26027Fri Aug  2 18:29:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26028
26029	* mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
26030	* mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
26031
26032	* mpz_dmincl.c: Normalize the remainder before shifting it back.
26033
26034	* mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
26035
26036	* mpn_div.c: Fix comment.
26037
26038	* mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
26039	  type, in order to work for both GNU and Berkeley functions.
26040
26041	* dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
26042	  madd.c from mpz_add.c, msub.c from mpz_sub.c.
26043	  respectively.
26044	* pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
26045	* mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
26046	  Berkeley function name variants.
26047	* dist-Makefile: Add created files to "clean" target.
26048
26049Tue Jul 16 15:19:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26050
26051	* mpq_get_den: No need for absolute value of the size, the
26052	  denominator is always positive.
26053
26054	* mpz_get_ui: If the operand is zero, return zero.  Don't read the
26055	  limb array!
26056
26057	* mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
26058	  is the size of the remainder.
26059
26060Mon Jul 15 11:08:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26061
26062	* Several files: Remove unused variables and functions.
26063
26064	* gmp-impl.h: Declare _mpz_impl_sqrt.
26065
26066	* mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
26067	  UDIV_NEEDS_NORMALIZATION.  (Fix from Brian Beuning.)
26068
26069	* mpz_dm_ui.c, sdiv: Replace *digit with *limb.
26070
26071	* mpz_ior: Add missing else statement in -OP1 | -OP2 case.
26072	* mpz_ior: Add missing else statement in OP1 | -OP2 case.
26073	* mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
26074	* mpz_ior: Duplicate _mpz_realloc code.
26075
26076	* mpz_and: Add missing else statement in -OP1 & -OP2 case.
26077	* mpz_and: Rewrite OP1 & -OP2 case.
26078	* mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
26079
26080	* mpz_gcdext: Loop in d1.size (not b->size).  (Fix from Brian
26081	  Beuning.)
26082
26083	* mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call.  (Fix from
26084	  Brian Beuning.)
26085
26086Fri Jul 12 17:10:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26087
26088	* mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
26089	  mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
26090	  New files.
26091
26092	* mpz_dmincl.c: Remove second re-allocation of rem->d.  It
26093	  was never executed.
26094
26095	* dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
26096	  some unixes' test doesn't have the -r option).
26097
26098	* *.*: Cast allocated pointers to the appropriate type (makes old C
26099	  compilers happier).
26100
26101	* cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
26102	  after conversion to double.  (Kludge for broken C compilers.)
26103
26104	* dist-Makefile (stamp-stddefh): New target.  Test if "stddef.h"
26105	  exists in the system and creates a minimal one if it does not
26106	  exist.
26107	* cre-stddefh.c: New file.
26108	* dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
26109	* dist-Makefile (clean): Add some more.
26110	* gmp.h, mp.h: Unconditionally include "stddef.h".
26111
26112Thu Jul 11 10:08:21 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26113
26114	* min: Do ungetc of last read character.
26115	* min.c: include stdio.h.
26116
26117	* dist-Makefile: Go via tmp- files for cre* redirection.
26118	* dist-Makefile: Add tmp* to "clean" target.
26119
26120	* dist-Makefile: Use LOCAL_CC for cre*, to simplify cross
26121	  compilation.
26122
26123	* gmp.h, mp.h: Don't define NULL here.
26124	* gmp-impl.h: Define it here.
26125
26126Wed Jul 10 14:13:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26127
26128	* mpz_mod_2exp: Don't copy too much, overwriting most significant
26129	  limb.
26130
26131	* mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
26132	  reallocating res, if op[12]_ptr got their value from alloca.
26133
26134	* mpz_and, mpz_ior: Clear up comments.
26135
26136	* cre-mparam.c: Output parameters for `short int' and `int'.
26137
26138	* mpz_and, mpz_ior: Negate negative op[12]_size in several places.
26139
26140Tue Jul  9 18:40:30 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26141
26142	* gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
26143	  (Fix for Sun lossage.)
26144
26145	* gmp.h: Add declaration of mpq_clear.
26146
26147	* dist-Makefile: Chack if "ranlib" exists, before using it.
26148	* dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
26149	* mpz_powm: Fix typo, "pow" instead of "mpz_powm".
26150
26151Fri Jul  5 19:08:09 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26152
26153	* move: Remove incorrect comment.
26154
26155	* mpz_free, mpq_free: Rename to *_clear.
26156	* dist-Makefile: Likewise.
26157	* mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
26158
26159	* mpz_dmincl.c: Don't call "move", inline its functionality.
26160
26161Thu Jul  4 00:06:39 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26162
26163	* Makefile: Include dist-Makefile.  Fix dist target to include
26164	  dist-Makefile (with the name "Makefile" in the archive).
26165
26166	* dist-Makefile: New file made from Makefile.  Add new mpz_...
26167	  functions.
26168
26169	* mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
26170	  functionality.  Avoids code duplication.
26171	* pow.c, mpz_powm.c: Include mpz_powincl.c
26172
26173	* mpz_dmincl.c: New file containing general division code.  Avoids
26174	  code duplication.
26175	* mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
26176	  mpz_dmincl.c.
26177
26178	* _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
26179	  Instead, write the overlapping memory copying inline.
26180
26181	* mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
26182
26183	* longlong.h: Don't use #elif.
26184	* mpz_do_sqrt.c: Likewise.
26185
26186	* longlong.h: Use __asm__ instead of asm.
26187	* longlong.h (sparc udiv_qrnnd): Make it to one string over several
26188	  lines.
26189
26190	* longlong.h: Preend __ll_ to B, highpart, and lowpart.
26191
26192	* longlong.h: Move array t in count_leading_zeros to the new file
26193	  mp_clz_tab.c.  Rename the array __clz_tab.
26194	* All files: #ifdef for traditional C compatibility.
26195
26196Wed Jul  3 11:42:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26197
26198	* mpz_and: Initialize res_ptr always (used to be initialized only
26199	  when reallocating).
26200
26201	* longlong.h (umul_ppmm [C variant]): Make __ul...__vh
26202	  `unsigned int', and cast the multiplications.  This way
26203	  compilers more easily can choose cheaper multiplication
26204	  instructions.
26205
26206	* mpz_mod_2exp: Handle input argument < modulo argument.
26207	* mpz_many: Make sure mp_size is the type for sizes, not int.
26208
26209	* mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
26210	  mpq_div: Change mpz_init* interface.  Structure pointer as first
26211	  arg to initialization function, no longer *return* struct.
26212
26213Sun Jun 30 19:21:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26214
26215	* Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
26216	  character file name length limit.
26217
26218	* Most files: Rename MINT to MP_INT.  Rename MRAT to MP_RAT.
26219	* mpz_sizeinb.c: New file with function mpz_sizeinbase.
26220	* mp_bases.c: New file, with array __mp_bases.
26221	* _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
26222	  __mp_bases instead.
26223	* mout, mpz_out_str: Use array __mp_bases instead of function
26224	  _mpz_get_cvtlen.
26225	* mpz_get_cvtlen.c: Remove.
26226	* Makefile: Update.
26227
26228Sat Jun 29 21:57:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26229
26230	* longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
26231	* longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
26232	* longlong.h (__sparc__): Don't call .umul; expand asm instead.
26233	  Don't define __umulsidi3 (i.e. use default definition).
26234
26235Mon Jun 24 17:37:23 1991  Torbjorn Granlund  (tege@amon.sics.se)
26236
26237	* _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
26238	  Swap 't' and 's'.
26239
26240Sat Jun 22 13:54:01 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26241
26242	* mpz_gcdext.c: New file.
26243
26244	* mpn_mul: Handle carry and unexpected operand sizes in last
26245	  additions/subtractions.  (Bug trigged when v1_size == 1.)
26246
26247	* mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
26248	* mpq_*: Call mpz_init*.
26249
26250	* mpz_pow_ui, rpow: Use _mpn_mul instead of mult.  Restructure.
26251
26252Wed May 29 20:32:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26253
26254	* mpz_get_cvtlen: multiply by size.
26255
26256Sun May 26 15:01:15 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)
26257
26258	Alpha-release 0.95.
26259
26260	Fixes from Doug Lea (dl@g.oswego.edu):
26261	* mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE).  Adjust PROD_SIZE
26262	  correctly.
26263	* mpz_div: Prepend _ to mpz_realloc.
26264	* mpz_set_xs, mpz_set_ds: Fix typos in function name.
26265
26266Sat May 25 22:51:16 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)
26267
26268	* mpz_divmod_ui: New function.
26269
26270	* sdiv: Make the sign of the remainder correct.
26271
26272Thu May 23 15:28:24 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26273
26274	* Alpha-release 0.94.
26275
26276	* mpz_mul_ui: Include longlong.h.
26277
26278	* mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
26279	  of msqrt.
26280
26281	* mpz_impl_sqrt: Don't call "move", inline its functionality.
26282
26283	* mdiv: Use MPN_COPY instead of memcpy.
26284	* rpow, mpz_mul, mpz_mod_2exp: Likewise.
26285	* pow.c: Likewise, and fix bug in the size arg.
26286
26287	* xtom: Don't use mpz_alloc, inline needed code instead.  Call
26288	  _mpz_set_str instead of mpz_set_str.
26289
26290	* Makefile: Make two libraries, libmp.a and libgmp.a.
26291
26292Thu May 22 20:25:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26293
26294	* Add manual to distribution.
26295	* Fold in many missing routines descibed in the manual.
26296	* Update Makefile.
26297
26298Wed May 22 13:48:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26299
26300	* mpz_set_str: Make it handle 0x prefix OK.
26301
26302Sat May 18 18:31:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26303
26304	* memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
26305	  arguments.
26306	* mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
26307	* min: Likewise.
26308
26309Thu May 16 20:43:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26310
26311	* memory.c: Make the default allocations functions global.
26312	* mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
26313	  default memory function.
26314
26315Wed May  8 20:02:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26316
26317	* mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
26318	  even if no normalization is needed.
26319	* mpz_div: Rework reallocation scheme, to avoid excess copying.
26320
26321	* mpz_sub_ui.c, mpz_add_ui.c: New files.
26322
26323	* mpz_cmp.c, mpz_cmp_ui.c: New files.
26324
26325	* mpz_mul_2exp: Handle zero input MINT correctly.
26326
26327	* mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
26328
26329	* mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
26330
26331Tue May  7 15:44:58 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26332
26333	* mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
26334	* mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
26335	* gcd, mpz_gcd: Likewise.
26336
26337	* gcd, mpz_gcd: Handle common 2 factors correctly.
26338
26339Mon May  6 20:22:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26340
26341	* gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
26342
26343	* gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
26344
26345Sun May  5 15:16:23 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26346
26347	* mpz_div: Remove test for QUOT == 0.
26348
26349Sun Apr 28 20:21:04 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26350
26351	* pow: Don't make MOD normalization in place, as it's a bad idea to
26352	  write on an input parameter.
26353	* pow: Reduce BASE if it's > MOD.
26354	* pow, mult, mpz_mul: Simplify realloc code.
26355
26356Sat Apr 27 21:03:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26357
26358	* Install multiplication using Karatsuba's algorithm as default.
26359
26360Fri Apr 26 01:03:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26361
26362	* msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
26363
26364	* mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
26365	  left, respectively.
26366	* gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
26367
26368	* mlshift.c, mrshift.c: Remove.
26369
26370Wed Apr 24 21:39:22 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26371
26372	* mpn_mul: Check only for m2_size == 0 in function header.
26373
26374Mon Apr 22 01:31:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26375
26376	* karatsuba.c: New file for Karatsuba's multiplication algorithm.
26377
26378	* mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
26379
26380	* mpn_cmp: Fix header comment.
26381
26382Sun Apr 21 00:10:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26383
26384	* pow: Switch off initial base reduction.
26385
26386Sat Apr 20 22:06:05 1991  Torbjorn Granlund  (tege@echnaton.sics.se)
26387
26388	* mpz_get_str: Don't generate initial zeros for initial word.
26389	  Used to write outside of allocated storage.
26390
26391Mon Apr 15 15:48:08 1991  Torbjorn Granlund  (tege@zevs.sics.se)
26392
26393	* _mpz_realloc: Make it accept size in number of mp_digits.
26394	* Most functions: Use new _mpz_realloc definition.
26395
26396	* mpz_set_str: Remove calls _mp_free_func.
26397
26398	* Most functions: Rename mpn_* to _mpn_*.  Rename mpz_realloc to
26399	  _mpz_realloc.
26400	* mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
26401	* mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
26402	* msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
26403
26404Sat Apr  6 14:05:16 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26405
26406	* mpn_mul: Multiply by the first digit in M2 in a special
26407	  loop instead of zeroing the product area.
26408
26409	* mpz_abs.c: New file.
26410
26411	* sdiv: Implement as mpz_div_si for speed.
26412
26413	* mpn_add: Make it work for second source operand == 0.
26414
26415	* msub: Negate the correct operand, i.e. V before swapping, not
26416	  the smaller of U and V!
26417	* madd, msub: Update abs_* when swapping operands, and not after
26418	  (optimization).
26419
26420Fri Apr  5 00:19:36 1991  Torbjorn Granlund  (tege@black.nada.kth.se)
26421
26422	* mpn_sub: Make it work for subtrahend == 0.
26423
26424	* madd, msub: Rewrite to minimize mpn_cmp calls.  Ensure
26425	  mpn_cmp is called with positive sizes (used to be called
26426	  incorrectly with negative sizes sometimes).
26427
26428	* msqrt: Make it divide by zero if fed with a negative number.
26429	* Remove if statement at end of precision calculation that was
26430	  never true.
26431
26432	* itom, mp.h: The argument is of type short, not int.
26433
26434	* mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
26435
26436	* mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
26437
26438	* Add COPYING to distribution.
26439
26440	* mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
26441
26442Fri Mar 15 00:26:29 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26443
26444	* Add Copyleft headers to all files.
26445
26446	* mpn_mul.c, mpn_div.c: Add header comments.
26447	* mult.c, mdiv.c: Update header comments.
26448
26449	* mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
26450	  mpq_free.c: New files for rational arithmetics.
26451
26452	* mpn_lshift.c: Avoid writing the most significant word if it is 0.
26453
26454	* mdiv.c: Call mpn_lshift for the normalization.
26455	* mdiv.c: Remove #ifdefs.
26456
26457	* Makefile: Add ChangeLog to DISTFILES.
26458
26459	* mpn_div.c: Make the add_back code work (by removing abort()).
26460	* mpn_div.c: Make it return if the quotient is size as compared
26461	  with the difference NSIZE - DSIZE.  If the stored quotient is
26462	  larger than that, return 1, otherwise 0.
26463	* gmp.h: Fix mpn_div declaration.
26464	* mdiv.c: Adopt call to mpn_div.
26465	* mpz_div.c: New file (developed from mdiv.c).
26466
26467	* README: Update routine names.
26468
26469Thu Mar 14 18:45:28 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26470
26471	* mpq_mul.c: New file for rational multiplication.
26472
26473	* gmp.h: Add definitions for rational arithmetics.
26474
26475	* mpn_div: Kludge the case where the high numerator digit > the
26476	  high denominator digit.  (This code is going to be optimized later.)
26477
26478	* New files: gmp.h for GNU specific functions, gmp-common.h for
26479	  definitions common for mp.h and gmp.h.
26480
26481	* Ensure mp.h just defines what BSD mp.h defines.
26482
26483	* pow.c: Fix typo for bp allocation.
26484
26485	* Rename natural number functions to mpn_*, integer functions to
26486	  mpz_*.
26487
26488Tue Mar  5 18:47:04 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26489
26490	* mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
26491	  "n0 >= r" to "n0 > r".
26492
26493	* msqrt: Tune the increasing precision scheme, to do fewer steps.
26494
26495Tue Mar  3 18:50:10 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26496
26497	* msqrt: Use the low level routines.  Use low precision in the
26498	beginning, and increase the precision as the result converges.
26499	(This optimization gave a 6-fold speedup.)
26500