xref: /netbsd-src/external/lgpl3/gmp/dist/ChangeLog (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
12011-05-07  Torbjorn Granlund  <tege@gmplib.org>
2
3	* Version 5.0.2 released.
4
5	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
6
7	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
8	Bump version info.
9
102011-05-05  Torbjorn Granlund  <tege@gmplib.org>
11
12	* mpn/x86_64/fat/fat_entry.asm: (PIC_OR_DARWIN): New symbol.  Use it to
13	work around Darwin problems.
14
152011-05-02  Marc Glisse  <marc.glisse@inria.fr>
16
17	* configfsf.guess: Update to version of 2011-02-02.
18	* configfsf.sub: Update to version of 2011-03-23.
19
202011-04-30  Marc Glisse  <marc.glisse@inria.fr>
21
22	* gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition
23	and the documentation.
24	(mpz_remove): Likewise.
25	(mpf_eq): Likewise.
26
27	* ltmain.sh: Remove.
28	* .bootstrap: Let libtoolize generate ltmain.sh.
29
30	* doc/gmp.texi (mpf_urandomb): Explicit the fact that it does not
31	change the precision.
32
332011-04-27  Torbjorn Granlund  <tege@gmplib.org>
34
35	* tune/speed.h (speed_cyclecounter): Always use PIC variant when
36	compiled with Apple's GCC.
37
382011-04-26  Torbjorn Granlund  <tege@gmplib.org>
39
40	* mpn/sparc32/sparc-defs.m4 (changecom): Don't redefine '!' as it
41	interferes with expressions.
42
432011-04-10  Torbjorn Granlund  <tege@gmplib.org>
44
45	* acinclude.m4 (GMP_ASM_RODATA): Make 'foo' larger to avoid clang
46	problems.
47
482011-03-28  Torbjorn Granlund  <tege@gmplib.org>
49
50	* mpn/x86/invert_limb.asm: Protect movzwl register parameters from
51	being interpreted as m4 macro parameters.
52
532011-03-21  Torbjorn Granlund  <tege@gmplib.org>
54
55	* configure.in (hppa): Under linux, treat 64-bit processors as if they
56	were 32-bit processors.
57
582011-03-15 Marco Bodrato <bodrato@mail.dm.unipi.it>
59
60	* mpn/generic/toom_interpolate_16pts.c: Remove ambiguity.
61
622011-03-12  Torbjorn Granlund  <tege@gmplib.org>
63
64	* tune/powerpc.asm: Use powerpc syntax, not power syntax.
65
662011-03-09  Marc Glisse  <marc.glisse@inria.fr>
67
68	* doc/gmp.texi: Remove void return type from constructors. Document
69	explicit constructors. Document mpf_class::mpf_class(mpf_t).
70
712011-02-24  Torbjorn Granlund  <tege@gmplib.org>
72
73	* mpn/x86/p6/sse2/mod_1_4.asm: Fix typo in MULFUNC_PROLOGUE.
74
752011-02-04  Torbjorn Granlund  <tege@gmplib.org>
76
77	* mpn/x86_64/core2/popcount.asm: Add a MULFUNC_PROLOGUE.
78	* mpn/x86_64/pentium4/popcount.asm: Likewise.
79
802011-01-25 Marco Bodrato <bodrato@mail.dm.unipi.it>
81
82	* mpz/mul.c: Remove redundant size computation.
83
842010-11-11  Torbjorn Granlund  <tege@gmplib.org>
85
86	* mpn/x86_64/atom/aors_n.asm: Don't rely on ZF after 'bt' insn.
87	Use 64-bit 'test' to support operands of 2^32 limbs and more.
88
892010-11-06  Torbjorn Granlund  <tege@gmplib.org>
90
91	* mpn/x86_64/aors_n.asm: Rewrite not to rely on ZF after 'bt' insn.
92
932010-10-04  Torbjorn Granlund  <tege@gmplib.org>
94
95	* mpn/x86_64/gcd_1.asm: Use m4_lshift to avoid << operator.
96	* mpn/x86/k7/gcd_1.asm: Likewise.
97
982010-08-20  Niels M�ller  <nisse@lysator.liu.se>
99
100	Suggested by Ozkan Sezer:
101	* configure.in: If $M4 is already set in the environment, don't
102	touch it. Fixed the case that no assembler files are used, and
103	GMP_PROG_M4 is omitted.
104
1052010-05-24  Torbjorn Granlund  <tege@gmplib.org>
106
107	* mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): New function.
108	* gmp-impl.h: Declare it.
109	* tune/common.c (speed_mpn_mupi_div_qr): Use new itch function.
110	* tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Pass parameters right
111	for new itch function.
112
1132010-05-14  Torbjorn Granlund  <tege@gmplib.org>
114
115	* mpn/generic/redc_2.c: Use asm code just for GNU C.
116
1172010-04-10  Torbjorn Granlund  <tege@gmplib.org>
118
119	* mpn/x86/divrem_2.asm: Use "orb" instead of "or" to work around
120	Solaris assembler bug.
121	* mpn/x86_64/mpn/x86_64/divrem_2.asm: Likewise.
122
1232010-03-25  Torbjorn Granlund  <tege@gmplib.org>
124
125	* mpn/generic/toom33_mul.c: Fix mpn_add_n_sub_n usage.
126	* mpn/generic/toom3_sqr.c: Likewise.
127	* mpn/generic/toom63_mul.c: Likewise.
128
1292010-03-19  Torbjorn Granlund  <tege@gmplib.org>
130
131	* mpn/generic/toom_interpolate_6pts.c: Call mpn_sublsh2_n and
132	mpn_sublsh_n with correct args.
133
1342010-03-06  Torbjorn Granlund  <tege@gmplib.org>
135
136	* tests/tests.h (TESTS_REPS): Fix typo.
137
1382010-02-26  Torbjorn Granlund  <tege@gmplib.org>
139
140	* mpn/pa64/aors_n.asm: Fix typo in last change.
141
1422010-02-25  Torbjorn Granlund  <tege@gmplib.org>
143
144	* tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb
145	variables.
146
147	* tests/mpn/t-div.c: Cast a switch index to placate HP's cc.
148	* tests/mpn/t-bdiv.c: Likewise.
149
150	* mpn/pa64/aors_n.asm: Fix support of the 2.0n ABI.
151
1522010-02-23  Torbjorn Granlund  <tege@gmplib.org>
153
154	* mpn/generic/mod_1_3.c: Cast a switch index.
155
156	* mpn/generic/sqrtrem.c: Use CNST_LIMB.
157
1582010-02-07  Torbjorn Granlund  <tege@gmplib.org>
159
160	* tune/tuneup.c (tune_redc): Set min_size and min_is_always when
161	measuring REDC_1_TO_REDC_2_THRESHOLD.
162	(tune_mod_1): Set min_size for PREINV_MOD_1_TO_MOD_1_THRESHOLD.
163
164	* mpn/x86_64/aorrlsh_n.asm (cnt): Fix a typo.
165	* mpn/x86_64/lshsub_n.asm: Likewise.
166
1672010-02-05  Torbjorn Granlund  <tege@gmplib.org>
168
169	* Version 5.0.1 released.
170
171	* mpn/generic/powm.c: Use rp target area for power table computation in
172	order to use less scratch.
173
174	* mpn/generic/binvert.c (mpn_binvert_itch): Enable more economical
175	mpn_mulmod_bnm1_itch call.
176
177	* mpn/generic/mu_div_qr.c: Remove always true #if.
178	* mpn/generic/mu_divappr_q.c: Likewise.
179	* mpn/generic/mu_bdiv_q.c: Likewise.
180	* mpn/generic/mu_bdiv_qr.c: Likewise.
181
1822010-02-01  Torbjorn Granlund  <tege@gmplib.org>
183
184	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
185	Bump version info.
186
187	* mpn/powerpc64/mode64/gmp-mparam.h: Remove {MUL,SQR}_FFT_TABLE2.
188	* mpn/x86/p6/gmp-mparam.h: Likewise.
189	* mpn/x86/p6/mmx/gmp-mparam.h: Likewise.
190	* mpn/generic/mul_fft.c: Don't depend on FFT_TABLE2, it was broken.
191
1922010-01-29  Torbjorn Granlund  <tege@gmplib.org>
193
194	* mpn/generic/mul_fft.c (mpn_mul_fft_internal): Remove arguments n, m,
195	k and rec; add argument sqr.  Don't call mpn_mul_fft_decompose here,
196	instead do that in all callers.
197	(mpn_mul_fft): Trim allocation when squaring, and use TMP_ALLOC*, not
198	explicit alloc/free.
199	(mpn_fft_div_2exp_modF): Avoid a scalar division.
200	(mpn_fft_mul_modF_K): Replace some multiplies by K with shifting by k.
201	(mpn_fft_mul_2exp_modF): Make function more symmetrical.
202
2032010-01-27  Torbjorn Granlund  <tege@gmplib.org>
204
205	* mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): Rewrite.
206	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Re-enable
207	better mulmod itch estimate.
208	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
209	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
210	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
211
2122010-01-27 Marco Bodrato <bodrato@mail.dm.unipi.it>
213
214	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Disabled guessed
215	estimate, enabled a conservative one.
216	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
217	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
218	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
219
2202010-01-26 Marco Bodrato <bodrato@mail.dm.unipi.it>
221
222	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Partial rewrite to
223	reduce memory usage.
224	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
225	(mpn_sqrmod_bnm1_next_size): New function.
226
227	* gmp-impl.h (mpn_mulmod_bnm1_itch): Accepts 3 parameters now.
228	(mpn_sqrmod_bnm1_itch): New inline function.
229	(mpn_sqrmod_bnm1_next_size): Declaration and mangling.
230	* mpn/generic/nussbaumer_mul.c: Use the new functions.
231
232	* mpn/generic/invertappr.c (mpn_ni_invertappr): Use new syntax for
233	mpn_mulmod_bnm1_itch.
234	* mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise.
235	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise.
236	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.
237	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Likewise.
238	* mpn/generic/binvert.c (mpn_binvert_itch): Likewise.
239	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): Likewise.
240	(SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Likewise.
241
242	* tests/mpn/t-sqrmod_bnm1.c, tests/mpn/t-mulmod_bnm1.c: Test
243	reduced memory usage.
244
2452010-01-25  Torbjorn Granlund  <tege@gmplib.org>
246
247	* tune/tuneup.c (INSERT_FFTTAB): New macro, like old insertion code but
248	also inserting a sentinel.
249	(fftmes): Use INSERT_FFTTAB for inserting new measurements.
250	Limit k range to best_k - 4 ... best_k + 4.
251
2522010-01-23  Torbjorn Granlund  <tege@gmplib.org>
253
254	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
255	(__GMP_MP_RELEASE): New macro.
256
257	* mpf/div.c: Rewrite to use mpn_div_q.
258
2592010-01-21  Torbjorn Granlund  <tege@gmplib.org>
260
261	* Add FFT_TABLE3 tables for a basic set of machines.
262
263	* configure.in: Use -mtune=nocona for 64-bit pentium4.
264
265	* config.guess: Recognise many more Intel processors.
266
267	* tune/common.c: Whitespace cleanup.
268	(speed_mpn_matrix22_mul): Rewrite.
269
2702010-01-21  Niels M�ller  <nisse@lysator.liu.se>
271
272	* mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Take
273	advantage of new mpn_mulmod_bnm1 interface, to reduce allocation.
274
275	* tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1, main): Adapted to
276	mpn_mulmod_bnm1 interface change.
277
278	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Interface change,
279	in case an + bn < rn, only write an + bn output limbs. New input
280	requirement, an + bn > rn/2.
281	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Corresponding
282	changes.
283
2842010-01-19  Torbjorn Granlund  <tege@gmplib.org>
285
286	* tune/tuneup.c (fftmes): Round up initial n according to initial k.
287	Limit k to 24 in loop.  Remove an obsolete always-true condition.
288	Remove a redundant trace printout.
289
2902010-01-18  Torbjorn Granlund  <tege@gmplib.org>
291
292	* tune/tuneup.c (fftmes): New function
293	(fft): Rewrite.
294	(mpn_mul_fft_lcm): New function, copied from mpn/generic/mul_fft.c.
295	(fftfill): New function, code taken from mul_fft.c (mpn_mul_fft).
296	(cached_measure): New function.
297
298	* gmp-impl.h (struct fft_table_nk): Moved from mul_fft.c.
299	(MUL_FFT_TABLE3, SQR_FFT_TABLE3): Provide dummy versions for tuneup
300	builds.
301	(FFT_TABLE3_SIZE): Increase value for tuneup builds.
302
303	* mpn/generic/mul_fft.c: Handle a new FFT threshold table type ("3").
304	Misc cleanups to old table type code.
305
3062010-01-16  Torbjorn Granlund  <tege@gmplib.org>
307
308	* mpn/x86_64/darwin.m4: Fix typo in last change.
309
3102010-01-15  Torbjorn Granlund  <tege@gmplib.org>
311
312	* gmp-h.in (__GMP_EXTERN_INLINE): Remove "extern" for newer Sun C.
313
314	* gmp-impl.h (GMP_LIMB_BYTES): New define.
315
316	* mpn/x86_64/darwin.m4 (LEA): New define.
317
318	* mpn/x86/invert_limb.asm (approx_tab): Use DEF_OBJECT.
319	Rename and globalise it to work around Mac OS bug.
320
321	With Philip McLaughlin:
322	* mpn/x86_64/gcd_1.asm (ctz_table): Don't use local prefix, but
323	use DEF_OBJECT...END_OBJECT.
324	Keep stack pointer at ABI mandated alignment over call.
325
3262010-01-12  Torbjorn Granlund  <tege@gmplib.org>
327
328	* tune/speed.c (routine): Remove obsolete mpn_dc_tdiv_qr and
329	mpn_dc_div_qr_n.
330	* tune/common.c (speed_mpn_dc_tdiv_qr, speed_mpn_dcpi1_div_qr_n):
331	Remove now unused functions.
332	* tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_N,
333	SPEED_ROUTINE_MPN_DC_DIVREM_SB, SPEED_ROUTINE_MPN_DC_TDIV_QR): Remove
334	now unused macros.
335
336	* mpn/x86_64/fat/fat_entry.asm (mpn_cpuid_available): Remove function.
337
338	* ltmain.sh: Upgrade from 1.5.24 to 2.2.6b.
339	* ylwrap: New file.
340	* .bootstrap: Remove explicit versions.
341
342	* doc/gmp.texi (Block-wise Barrett Division): New node.
343
344	* mpn/generic/powm.c: Change some #if to plain 'if' to avoid fat build
345	problems.
346
3472010-01-11  Torbjorn Granlund  <tege@gmplib.org>
348
349	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): Accept arguments for size
350	restrictions.
351	* tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
352	(speed_mpn_sbpi1_divappr_q, speed_mpn_dcpi1_divappr_q): Pass size
353	limits for SPEED_ROUTINE_MPN_PI1_DIV.
354
355	* tune/speed.c (routine): Allow .r argument for mpn_sbpi1_divappr_q and
356	mpn_dcpi1_divappr_q.
357
3582010-01-08  Torbjorn Granlund  <tege@gmplib.org>
359
360	* Version 5.0.0 released.
361
362	* mpn/generic/div_q.c: Handle mpn_*_divappr_q returning high limb
363	everywhere.
364
3652010-01-07  Torbjorn Granlund  <tege@gmplib.org>
366
367	* Update MUL_FFT_TABLE2 and SQR_FFT_TABLE2 for many machines.
368
369	* mpn/generic/mu_div_q.c: Account for divisor truncation error as well
370	as mpn_mu_divappr_q's error.
371
372	* mpn/generic/mu_div_q.c: Handle mpn_preinv_mu_divappr_q returning a
373	high limb.
374
375	* tests/mpn/t-bdiv.c: Move a random call for debugability.
376	* tests/mpn/t-div.c: Likewise.
377
378	* mpn/generic/mu_divappr_q.c: Rewrite quotient round-up code.
379
380	* mpn/generic/mu_div_qr.c: Handle carry-out from a carry propagation
381	subtract.
382	* mpn/generic/mu_divappr_q.c: Likewise.
383
384	* mpn/generic/mu_divappr_q.c
385	(mpn_preinv_mu_divappr_q, mpn_mu_divappr_q): Declare dividend constant.
386	* gmp-impl.h: Likewise.
387
388	* perfpow.c (mpn_perfect_power_p): Call mpn_divexact instead of
389	mpn_bdiv_q (with too little scratch space!).
390
391	From Niels M�ller:
392	* tests/mpn/t-div.c (check_one): Get rid of the poorly managed variable
393	tn.
394
395	* mpn/minithres/gmp-mparam.h: Add all lately defined thresholds.
396
397	* mpn/generic/div_q.c: Use SB division for small quotients as well as
398	small divisors.  Fix typo in itch call.
399
4002010-01-06  Niels M�ller  <nisse@lysator.liu.se>
401
402	* tests/mpn/t-div.c (check_one): Checking based on multiplication,
403	refmpn_mul, rather than refmpn_tdiv_qr.
404
4052010-01-06 Marco Bodrato <bodrato@mail.dm.unipi.it>
406
407	* mpn/generic/toom8h_mul.c: Avoid overflows of mp_size_t.
408
4092010-01-06  Torbjorn Granlund  <tege@gmplib.org>
410
411	* gmp-h.in (__GNU_MP__): Bump.
412	(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL):
413	Bump version info.
414	* mp-h.in (__GNU_MP__): Bump.
415	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
416	Bump version info.
417
418	* doc/gmp.texi: Rewrite mpn_gcdext text.  Remove some out-of-date
419	text in Algorithms chapter.
420
421	* mpn/generic/div_q.c: Properly handle np=scratch.  Fix critical typo
422	in final adjustment code.  Misc cleanups.
423
424	* mpn/generic/rootrem.c: Use mpn_div_q.
425	* mpz/tdiv_q.c: Likewise.
426
427	* tests/mpn/t-div.c: Test mpn_div_q.
428	(SIZE_LOG): Up to 17.
429
430	* mpn/generic/div_q.c: New file.
431	* configure.in (gmp_mpn_functions): Add div_q.
432
433	* mpn/generic/mu_div_q.c: Actually declare dividend constant.
434
4352010-01-04  Torbjorn Granlund  <tege@gmplib.org>
436
437	* tune/tuneup.c (fft): Separate tuning of modf and full products.
438	(struct fft_param_t): New field, mul_modf_function.
439	(tune_fft_sqr): Fix typo.
440	(tune_fft_mul, tune_fft_sqr): Initialise mul_modf_function field.
441	* tune/common.c (speed_mpn_fft_mul, speed_mpn_fft_sqr): New functions.
442
443	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.
444
445	* mpn/generic/mul.c: Simplify rational expression.
446
447	* gmp-impl.h: Cleanup threshold variables; remove obsolete ones and
448	make all possibly needed definitions for existing ones.
449	* tune/tuneup.c (tune_mul): Write fractions-compensated values to
450	threshold variables.
451
4522010-01-03 Marco Bodrato <bodrato@mail.dm.unipi.it>
453
454	* tune/common.c, tune/speed.c, tune/speed.h: Support measuring
455	mpn_toom43_mul.
456
457	* mpn/generic/toom_interpolate_6pts.c: Small reorganisation.
458
4592010-01-03  Torbjorn Granlund  <tege@gmplib.org>
460
461	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
462	INV_MULMOD_BNM1_THRESHOLD/2 instead.
463
464	* gmp-impl.h (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default
465	here...
466	* mpn/generic/invert.c, mpn/generic/invertappr.c: ...not here.
467
468	* tests/mpn/t-div.c: Rewrite operand generation code.
469
4702010-01-02  Torbjorn Granlund  <tege@gmplib.org>
471
472	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to
473	INV_MULMOD_BNM1_THRESHOLD.
474
4752010-01-02  Marco Bodrato <bodrato@mail.dm.unipi.it>
476
477	* mpn/generic/dcpi1_div_q.c: Handle divappr approximation problem more
478	efficiently.
479	* mpn/generic/mu_div_q.c: Likewise.
480
481	* mpn/generic/invert.c: Remove duplicated code.
482
4832010-01-01  Torbjorn Granlund  <tege@gmplib.org>
484
485	* gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to 0.
486
487	* mpn/generic/mu_div_qr.c: Rewrite to use mpn_mulmod_bnm1.  Clean up
488	scratch usage.  Improve itch functions.
489	* mpn/generic/mu_divappr_q.c: Likewise.
490	* mpn/generic/mu_bdiv_qr.c: Likewise.
491	* mpn/generic/mu_div_q.c: Likewise.
492
493	* mpn/generic/dcpi1_bdiv_qr.c: Add parameter ASSERTs.
494	* mpn/generic/dcpi1_bdiv_q.c: Likewise.
495
496	* tests/mpn/t-bdiv.c: Replace with unit testing code, based on t-div.c.
497	Increase COUNT to 500.
498
499	* tests/mpn/t-div.c: Avoid generating too small test operands.
500	Move SB suppression limit downwards.  Increase COUNT to 200.
501
5022009-12-31  Torbjorn Granlund  <tege@gmplib.org>
503
504	* mpn/generic/tdiv_qr.c: Handle numerator/remainder overlap in MU case.
505
506	* tests/tests.h (TESTS_REPS): New macro.
507	* tests/mpz/dive.c: Use larger operands, decrease default reps, use
508	TESTS_REPS.
509	* tests/mpz/convert.c: Likewise.
510	* tests/mpz/t-sqrtrem.c: Likewise.
511	* tests/mpz/reuse: Likewise.
512	* tests/mpz/t-root.c: Likewise.
513	* tests/mpz/t-tdiv.c: Likewise.
514	* tests/mpz/t-gcd.c: Likewise.
515	* tests/mpz/t-powm.c: Likewise.
516
5172009-12-31  Marco Bodrato <bodrato@mail.dm.unipi.it>
518
519	* mpn/generic/toom8_sqr.c (SQR_TOOM8_MAX): Avoid overflow.
520	* mpn/generic/toom6_sqr.c (SQR_TOOM6_MAX): Likewise.
521
522	* mpn/generic/mulmod_bnm1.c: Don't mention MISUSE any more,
523	simply consider UNLIKELY any unexpected size.
524
5252009-12-31  Torbjorn Granlund  <tege@gmplib.org>
526
527	* tune/tuneup.c (speed_mpn_sbordcpi1_div_qr): New function.
528	(tune_mu_div): Use it.
529
5302009-12-30  Torbjorn Granlund  <tege@gmplib.org>
531
532	* tune/tuneup.c (tune_mu_bdiv, tune_dc_bdiv, tune_mu_div)
533	(tune_dc_div): Clear global s.r to make speed functions do 2n/n.
534
535	* tune/speed.c (routine): New entries for mpn_mu_div_qr and
536	mpn_mupi_div_qr.  Allow .r parameter for mpn_sbpi1_div_qr,
537	mpn_dcpi1_div_qr.
538	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV, SPEED_ROUTINE_MPN_MU_DIV_QR)
539	(SPEED_ROUTINE_MPN_MUPI_DIV_QR): Handle .r parameter.
540
541	* tests/mpz/t-tdiv.c: Increase operands size again.
542
543	* mpn/generic/tdiv_qr.c: Attempt to choose between DC and MU cleverer.
544
545	* mpn/generic/tdiv_qr.c: Don't overwrite rp with unnecessary temporary
546	alloc.
547
5482009-12-29  Torbjorn Granlund  <tege@gmplib.org>
549
550	* tune/tuneup.c (tune_mu_div): Tune MUPI_DIV_QR_THRESHOLD.
551	* tune/speed.h (struct speed_params): Allow 3 source operands.
552	(SPEED_ROUTINE_MPN_MUPI_DIV_QR): New macro.
553	* tune/common.c (speed_mpn_mupi_div_qr): New function.
554
555	* mpn/generic/tdiv_qr.c: Call mpn_mu_div_qr.
556
557	* tests/mpz/t-tdiv.c: Use larger test operands.
558
559	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr2): Remove code for dn==1.
560
561	* mpz/mul.c: Call mpn_sqr directly.  Use PTR,SIZ,ALLOC.
562
563	* tune/tuneup.c (tune_mu_div): Set min_size to 6, DC functions require
564	this.
565
566	* tests/mpn/t-div.c: Call mu_div functions with operands that generate
567	a high quotient limb.
568
569	* mpn/generic/mu_div_qr.c: Rewrite to return a high quotient limb,
570	to let dividend argument be constant, and as a general cleanup.
571	* mpn/generic/mu_divappr_q.c: Likewise.
572	* mpn/generic/mu_div_q.c: Likewise.
573	* gmp-impl.h: Update declarations of changed functions.
574
575	* mpn/generic/invertappr.c (mpn_invertappr): Allocate scratch space
576	when caller passed NULL.
577
5782009-12-28  Torbjorn Granlund  <tege@gmplib.org>
579
580	* mpn/generic/toom_couple_handling.c: Prefix name with mpn_.
581	* gmp-impl.h: Likewise.
582	* mpn/generic/toom63_mul.c: Likewise.
583	* mpn/generic/toom6_sqr.c: Likewise.
584	* mpn/generic/toom6h_mul.c: Likewise.
585	* mpn/generic/toom8_sqr.c: Likewise.
586	* mpn/generic/toom8h_mul.c: Likewise.
587
588	* configure.in (gmp_mpn_functions_optional) Move "com" from here...
589	(gmp_mpn_functions): ...to here.
590	* mpn/generic/com.c: New file.
591	* (mpn_com): New name for mpn_com_n.  Make public.
592	* (mpn_neg): Analogous changes.
593
594	* tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Set step_factor.
595
596	* tune/common.c, tune/speed.c, tune/speed.h: Support measuring
597	mpn_lshiftc.
598
599	* tests/devel/try.c: Test mpn_lshiftc.
600	* tests/refmpn.c (refmpn_com): New function.
601	(refmpn_lshiftc): Likewise.
602
603	* configure.in (gmp_mpn_functions_optional) Move lshiftc from here...
604	(gmp_mpn_functions): ...to here.
605	* mpn/generic/lshiftc.c: New file.
606	* mpn/x86_64/lshiftc.asm: New file.
607	* mpn/x86_64/core2/lshiftc.asm: New file.
608	* mpn/generic/mul_fft.c (mpn_lshiftc): Remove.
609
610	* mpn/x86_64/core2/lshift.asm: Tweak for better Core iN performance.
611	* mpn/x86_64/core2/rshift.asm: Likewise.
612
6132009-12-27  Marco Bodrato <bodrato@mail.dm.unipi.it>
614
615	* mpn/generic/mul.c: Use toom6h and toom8h for almost balanced.
616
617	* mpn/generic/mullo_n.c (mpn_dc_mullo_n): New ratio, to be used in
618	Toom-8 range.
619
6202009-12-27  Torbjorn Granlund  <tege@gmplib.org>
621
622	* (mpn_sqr): New name for mpn_sqr_n.  Many files affected.
623
624	* tune/tuneup.c (tune_mullo): Up step_factor for MULLO_MUL_N_THRESHOLD.
625	(tune_invertappr, tune_invert, tune_binvert): Let max_size default.
626
627	* tune/tuneup.c (tune_mu_div, tune_mu_bdiv) New functions.
628	* tune/speed.h (SPEED_ROUTINE_MPN_MU_DIV_Q): New macro.
629	(SPEED_ROUTINE_MPN_MU_DIV_QR): Likewise.
630	(SPEED_ROUTINE_MPN_MU_BDIV_Q): Likewise.
631	(SPEED_ROUTINE_MPN_MU_BDIV_QR): Likewise.
632	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add bdiv_q.c and bdiv_qr.c.
633	* tune/common.c (speed_mpn_mu_div_qr): New function.
634	(speed_mpn_mu_divappr_q): Likewise.
635	(speed_mpn_mu_div_q): Likewise.
636	(speed_mpn_mu_bdiv_q): Likewise.
637	(speed_mpn_mu_bdiv_qr): Likewise.
638
639	* mpn/*/gmp-mparam.h: Fix incorrect MOD_1U_TO_MOD_1_1_THRESHOLD 0
640	values.
641
642	* gmp-impl.h (MODEXACT_1_ODD_THRESHOLD): Remove.
643	(BMOD_1_TO_MOD_1_THRESHOLD): New parameter, with the reverse meaning of
644	MODEXACT_1_ODD_THRESHOLD.
645	(MPN_MOD_OR_MODEXACT_1_ODD): Use BMOD_1_TO_MOD_1_THRESHOLD.
646	* mpn/generic/divis.c, mpz/{cong.c,cong_ui.c,divis_ui.c}: Likewise.
647	* tune/tuneup.c (tune_modexact_1_odd): Tune BMOD_1_TO_MOD_1_THRESHOLD;
648	Do not assume native mpn_modexact_1_odd is faster than mpn_mod_1.
649	(tuned_speed_mpn_mod_1): Remove variable.
650	(tune_mod_1): Fix thinkos.  Suppress printing of "always" etc.
651	(all): Measure for divrem_1, mod_1, divexact_1, etc first, since Toom
652	depends on some of them.
653
654	* mpn/generic/toom22_mul.c (TOOM22_MUL_REC): New name for
655	TOOM22_MUL_MN_REC.
656
6572009-12-26  Niels M�ller  <nisse@lysator.liu.se>
658
659	* tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Relax
660	requirements a bit.
661
662	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Relax requirement on
663	input sizes, to support s+t>=n (used to be s+t>=n+2). Keep high
664	limbs of the evaluated values in scalar variables.
665
666	* mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Remove
667	unused variables.
668
669	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Fixed left-over use
670	of mpn_addsub_n which should be mpn_add_n_sub_n.
671
6722009-12-26  Marco Bodrato <bodrato@mail.dm.unipi.it>
673
674	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add new toom files (spotted by Torbjorn).
675
676	* gmp-impl.h (mpn_toom6_sqr_itch): Rename to mpn_toom6_mul_n_itch and redefine.
677	(mpn_toom8_sqr_itch): Rename to mpn_toom8_mul_n_itch and redefine.
678	* mpn/generic/mul_n.c: Use renamed _itch macros.
679
6802009-12-25  Niels M�ller  <nisse@lysator.liu.se>
681
682	* tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Tightened requirements.
683	* gmp-impl.h (mpn_toom32_mul_itch): Updated. Less scratch needed
684	by toom32 itself, and also the pointwise multiplications are
685	currently mpn_mul_n with no supplied scratch.
686	* mpn/generic/toom32_mul.c (mpn_toom32_mul): Reorganized
687	interpolation to use less scratch space. No longer supports the
688	most extreme size ratios.
689
6902009-12-25  Torbjorn Granlund  <tege@gmplib.org>
691
692	* tune/tuneup.c (tune_preinv_mod_1): Purge.
693	(tune_mod_1): Use speed_mpn_mod_1_tune for
694	PREINV_MOD_1_TO_MOD_1_THRESHOLD
695
696	* mpn/generic/dcpi1_divappr_q.c: Handle 2n/n properly.  Don't use full
697	precision in mpn_sbpi1_divappr_q call.  Misc cleanup.
698
699	* tune/tuneup.c (tune_mod_1): Add a check_size for
700	PREINV_MOD_1_TO_MOD_1_THRESHOLD.
701
7022009-12-24  Torbjorn Granlund  <tege@gmplib.org>
703
704	* tune/mod_1_div.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
705	(MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
706	* tune/mod_1_inv.c (MOD_1N_TO_MOD_1_1_THRESHOLD,
707	(MOD_1U_TO_MOD_1_1_THRESHOLD): Set.
708
709	* gmp-impl.h (USE_PREINV_MOD_1): Remove.
710	(MPN_MOD_OR_PREINV_MOD_1): Define to choose functions dynamically in
711	terms of PREINV_MOD_1_TO_MOD_1_THRESHOLD (used to choose statically
712	using USE_PREINV_MOD_1).
713	* mpn/generic/perfsqr.c (PERFSQR_MOD_PP): Corresponding updates.
714
715	* tune/tuneup.c (tune_mod_1): Rewrite.
716	* gmp-impl.h (MOD_1N_TO_MOD_1_1_THRESHOLD): New.
717	(MOD_1U_TO_MOD_1_1_THRESHOLD): New name for MOD_1_1_THRESHOLD.
718	(MOD_1_1_TO_MOD_1_2_THRESHOLD): Mew name for MOD_1_2_THRESHOLD.
719	(MOD_1_2_TO_MOD_1_4_THRESHOLD): New name for MOD_1_4_THRESHOLD.
720	* mpn/generic/mod_1.c: Corresponding updates.
721
7222009-12-24  Marco Bodrato <bodrato@mail.dm.unipi.it>
723
724	* mpn/generic/mul_n.c: Use also toom6h and toom8h.
725	* mpn/generic/sqr_n.c: Use also toom6 and toom8.
726	* gmp-impl.h: Initial support for tuning of Toom-6half and Toom-8half.
727	* tune/tuneup.c: Tune Toom-6half and Toom-8half thresholds.
728
7292009-12-24  Torbjorn Granlund  <tege@gmplib.org>
730
731	* mpn/generic/mod_1_4.c: Get ASSERT right.
732	* mpn/generic/mod_1_3.c: Likewise.
733	* mpn/generic/mod_1_2.c: Likewise.
734
735	* mpn/generic/powm_sec.c: Use SQR_TOOM2_THRESHOLD as limit for a native
736	mpn_sqr_basecase, not TUNE_SQR_TOOM2_MAX.
737
7382009-12-23  Marco Bodrato <bodrato@mail.dm.unipi.it>
739
740	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
741	mpn_toom8h_mul and mpn_toom8_sqr speed.
742
743	* mpn/generic/toom_eval_pm2exp.c: Fix ASSERTs.
744
745	* mpn/generic/toom8h_mul.c: New file.
746	* mpn/generic/toom8_sqr.c: New file.
747	* mpn/generic/toom_interpolate_16pts.c: New file.
748	* gmp-impl.h: Provide corresponding declarations.
749	* configure.in (gmp_mpn_functions): List toom_interpolate_16pts,
750	toom8h_mul, and toom8h_sqr.
751	* tests/mpn/t-toom8h.c: New test program.
752
753	* mpn/generic/toom6_sqr.c: New file, was part of toom6h_mul.
754	* mpn/generic/toom6h_mul.c: Removed _sqr.
755
756	* mpn/generic/mulmod_bnm1.c: Nailify CRT.
757	* mpn/generic/sqrmod_bnm1.c: Likewise.
758
759	* mpn/generic/mullo_n.c: Split dc_mullo_n function;
760	ALLOC memory at once.
761
762	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Update.
763
764	* mpn/generic/toom6h_mul.c: Add prefix to toom_interpolate_12pts.
765	* mpn/generic/toom_interpolate_12pts.c: Likewise.
766
767	* mpn/generic/invertappr.c (mpn_bc_invertappr): Use mpn_divrem_2.
768	* mpn/generic/invert.c: Faster basecase, use mpn_sbpi1_div_q.
769
770	* mpn/generic/toom_eval_pm2exp.c: Assert support for degree 3.
771	* mpn/generic/toom6h_mul.c: Avoid obsolete _itch function.
772
7732009-12-23  Torbjorn Granlund  <tege@gmplib.org>
774
775	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
776	mpn_mod_1_1p, mpn_mod_1s_2p, mpn_mod_1s_3p, mpn_mod_1s_4p.
777
778	* tests/mpz/t-powm.c: Test mpz_powm_sec.
779
780	* mpz/powm_sec.c: New file.
781	* gmp-h.in: Declare it.
782	* Makefile.am, mpz/Makefile.am: Compile it.
783	* doc/gmp.texi: Document it.
784
785	* mpn/generic/powm_sec.c (mpn_powm_sec_itch): New function.
786	(mpn_powm_sec): Use passed scratch, no local allocation.
787	Allow exp argument = 1.
788	(win_size): Start loop from 1.
789
790	* mpn/generic/powm.c (win_size): Start loop from 1.
791
7922009-12-22  Torbjorn Granlund  <tege@gmplib.org>
793
794	* tests/mpn/t-div.c: New file.
795	* tests/mpn/Makefile.am: Compile it.
796
797	* mpn/generic/mu_divappr_q.c: Handle quotient overflow.
798
799	* mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): New function.
800
8012009-12-22  Niels M�ller  <<nisse@lysator.liu.se>>
802
803	* mpn/generic/sbpi1_div_q.c: Use udiv_qr_3by2.  Intended to change
804	nothing after preprocessing.
805
806	* mpn/generic/sbpi1_divappr_q.c: For the last call to udiv_qr_3by2,
807	avoid using memory locations as output parameters, and revert to
808	explicitly copying n1 and n0 to memory.
809
810	* gmp-impl.h (udiv_qr_3by2): Tweaked to expand to precisely the
811	same code as was used before the introduction of this macro.
812	Eliminated some local variables, instead do multiple updates to
813	the output parameters.
814
8152009-12-22  Torbjorn Granlund  <tege@gmplib.org>
816
817	* tests/mpn/t-toom6h.c (MIN_AN): Set to MUL_TOOM6H_THRESHOLD to avoid
818	invalid recursive sizes.
819
820	* tests/mpn/t-bdiv.c: Get itch function calls right.
821
822	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Rewrite.
823	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify.
824
825	* mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Simplify, don't allocate.
826	(mpn_bdiv_qr_itch): Conditionalise on MU_BDIV_QR_THRESHOLD.
827
8282009-12-18  Niels M�ller  <nisse@lysator.liu.se>
829
830	* tests/mpn/t-bdiv.c: Add red-zones.
831
8322009-12-21  Torbjorn Granlund  <tege@gmplib.org>
833
834	* mpn/generic/sbpi1_div_q.c: Fix fixup code to work for qn = 0.
835
836	* mpn/generic/dcpi1_divappr_q.c: Handle qn = 1 and qn = 2 for initial
837	quotient block (code block copied from dcpi1_div_qr.c).
838
839	* mpn/generic/dcpi1_div_qr.c: Rewrite singular case giving q limb of
840	GMP_NUMB_MAX.  Remove an impossible qn = 0 case.
841
842	* mpn/generic/dcpi1_bdiv_q.c: Remove a spurious mpn_sub_1.
843
844	* mpn/generic/mul.c: Put back call to mpn_mul_n.
845
846	* tune/tuneup.c (all): Call tune_mulmod_bnm1 before tuning fft due to
847	dependency on mulmod_bnm1 from both mul_fft_mul and from mullo_n.
848
849	* mpn/generic/dcpi1_divappr_q.c: ASSERT that dn >= 6 and nn > dn.
850	* mpn/generic/dcpi1_div_q.c: ASSERT that dn >= 6 and nn-dn >= 3.
851	* mpn/generic/dcpi1_div_qr.c: ASSERT that dn >= 6 and nn-dn >= 3.
852
853	* mpn/generic/bdiv_q_1.c (mpn_pi1_bdiv_q_1): Renamed from
854	mpn_bdiv_q_1_pi1.
855	* All references changed.
856
857	* configure.in: Add --enable-old-fft-full.
858	* tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on
859	WANT_OLD_FFT_FULL.
860	* tune/common.c (speed_mpn_mul_fft_full)
861	(speed_mpn_mul_fft_full_sqr): Likewise.
862	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Include iff
863	WANT_OLD_FFT_FULL.
864
8652009-12-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
866
867	* gmp-impl.h (mpn_toom6h_mul_itch): New inline function.
868	(MUL_TOOM6H_THRESHOLD): Default value.
869	(SQR_TOOM6_THRESHOLD): Default value.
870	* mpn/generic/toom6h_mul.c: Remove definitions moved to gmp-impl.h.
871	* tune/common.c, tune/speed.c, tune/speed.h: Support for measuring
872	mpn_toom6h_mul and mpn_toom6_sqr speed.
873
874	* mpn/generic/toom63_mul.c: Remove unused TMP_*.
875
876	* mpn/generic/toom_eval_pm2rexp.c: New file.
877	* gmp-impl.h: Provide corresponding declaration.
878	* configure.in (gmp_mpn_functions): List toom_eval_pm2rexp.
879	* mpn/generic/toom6h_mul.c: Use shared toom_eval_pm2rexp.
880
881	* mpn/generic/toom_couple_handling.c: New file, helper function
882	for high degree Toom.
883	* gmp-impl.h: Provide corresponding declaration.
884	* configure.in (gmp_mpn_functions): List toom_couple_handling.
885	* mpn/generic/toom6h_mul.c: Use shared toom_couple_handling.
886	* mpn/generic/toom63_mul.c: Likewise.
887
888	* mpn/generic/toom6h_mul.c: New file.
889	* mpn/generic/toom_interpolate_12pts.c: New file.
890	* gmp-impl.h: Provide corresponding declarations.
891	* configure.in (gmp_mpn_functions): List toom_interpolate_12pts,
892	toom6h_mul.
893	* tests/mpn/t-toom6h.c: New test program.
894
895	* tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1): Use ref_mul.
896	* tests/mpn/t-sqrmod_bnm1.c (ref_sqrmod_bnm1): Likewise.
897
8982009-12-20  Marco Bodrato <bodrato@mail.dm.unipi.it>
899
900	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): New CRT.
901	* mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise.
902
9032009-12-20  Torbjorn Granlund  <tege@gmplib.org>
904
905	* Change all bit counts for bignums to use mp_bitcnt_t.
906
907	* mpn/generic/bdivmod.c: File removed.  All references purged.
908
909	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Disable.
910
911	* gmp-impl.h: Define mpn_fft_mul as an alias for mpn_nussbaumer_mul.
912	* mpn/generic/mul.c: Refer mpn_fft_mul.
913	* mpn/generic/mul_n.c: Likewise.
914	* mpn/generic/sqr_n.c: Likewise.
915	* mpn/generic/mullo_n.c: Likewise.
916
917	* mpn/generic/mul.c: Loop also over mpn_nussbaumer_mul, as suggested by
918	Marco.  Use TMP_SALLOC_LIMBS in more places.  Clean up ws allocation.
919
9202009-12-19  Marco Bodrato <bodrato@mail.dm.unipi.it>
921
922	* mpn/generic/toom_interpolate_8pts.c: Nailify.
923
9242009-12-19  Torbjorn Granlund  <tege@gmplib.org>
925
926	* mpn/generic/mul.c: Major rewrite.  Use toom43, toom53, toom63.
927	Call mpn_nussbaumer_mul for largest operands.
928
929	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL): New macro.
930	(SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL): New macro.
931	(SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL): New macro.
932	(SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL): New macro.
933	(SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL): New macro.
934	(SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL): New macro.
935	* tune/common.c (speed_mpn_toom63_mul): New function.
936	(speed_mpn_toom32_for_toom43_mul): New function.
937	(speed_mpn_toom43_for_toom32_mul): New function.
938	(speed_mpn_toom32_for_toom53_mul): New function.
939	(speed_mpn_toom53_for_toom32_mul): New function.
940	(speed_mpn_toom42_for_toom53_mul): New function.
941	(speed_mpn_toom53_for_toom42_mul): New function.
942	* tune/tuneup.c (tune_mul_n): New name for old tune_mul.
943	(tune_sqr_n): New name for old tune_sqr.
944	(tune_mul): New function, for unbalanced multiplication.
945	* gmp-impl.h: Provide declarations for corresponding threshold vars.
946
947	* gmp-impl.h (mpn_rsh1add_nc, mpn_rsh1sub_nc): Declare.
948	* mpn/asm-defs.m4: Likewise.
949	* configure.in: Add corresponding HAVE_NATIVEs.
950	* mpn/x86_64/rsh1aors_n.asm: Add _nc entry point.
951
9522009-12-18  Niels M�ller  <nisse@lysator.liu.se>
953
954	* mpz/divexact.c: Rewrite to use mpn_divexact.
955
956	* mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Deleted some unused
957	variables.
958
959	* mpn/generic/toom52_mul.c (mpn_toom52_mul)
960	[HAVE_NATIVE_mpn_add_n_sub_n]: Moved declaration of cy to avoid a
961	compiler warning.
962
963	* gmp-impl.h (gmp_pi1_t): Eliminated inv21 member.
964	(invert_pi1): ...and don't store it here.
965
966	* mpn/generic/toom63_mul.c (mpn_toom63_mul): Simplified
967	calculation of block size n.
968	* gmp-impl.h (mpn_toom63_mul_itch): Likewise.
969
970	* mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Fixed
971	output asserts.
972
9732009-12-18  Torbjorn Granlund  <tege@gmplib.org>
974
975	* tests/mpn/t-toom63.c: New test program.
976
9772009-12-18  Marco Bodrato <bodrato@mail.dm.unipi.it>
978
979	* mpn/generic/invert.c: Nailify.
980	* mpn/generic/invertappr.c: Nailify.
981	* mpn/generic/mulmod_bnm1.c: Nailify.
982	* mpn/generic/sqrmod_bnm1.c: Nailify.
983
984	* tests/mpn/t-invert.c: New test program.
985
986	* mpn/generic/toom63_mul.c: New file.
987	* mpn/generic/toom_interpolate_8pts.c: New file.
988	* gmp-impl.h: Provide corresponding declarations.
989	* configure.in (gmp_mpn_functions): List toom_interpolate_8pts and
990	toom63_mul.
991
9922009-12-17  Torbjorn Granlund  <tege@gmplib.org>
993
994	* mpn/generic/mul.c: Move allocation of ws to where it is used.
995	Identify toom22, 32, 42, in that order (in two places).  Use midline
996	between toom22, 32, 42.
997	* mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): Call also
998	mpn_toom32_mul.
999
1000	* doc/gmp.texi: Update References section.  Update Contributors
1001	section.  Misc updates.
1002
1003	* gmp-impl.h: Renew default values for all THRESHOLDs.
1004
10052009-12-17  Niels M�ller  <nisse@lysator.liu.se>
1006
1007	* mpn/generic/divexact.c (mpn_divexact): Don't require that the
1008	dividend is normalized. Use MPN_DIVREM_OR_PREINV_DIVREM_1. When
1009	shifting, allocate and process only the low qn+1 limbs. Eliminated
1010	code for the impossible case nn < qn.
1011
1012	* mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): Added some input
1013	asserts.
1014
1015	* mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): In the case that
1016	the initial quotient block is a single limb, use 3/2 division,
1017	thereby eliminating the only use of gmp_pi1_t->inv21.
1018
10192009-12-17  Marco Bodrato <bodrato@mail.dm.unipi.it>
1020
1021	* mpn/generic/invert.c: Added some comment.
1022	* mpn/generic/invertappr.c: Slightly better threshold handling.
1023	* gmp-impl.h (INV_NEWTON_THRESHOLD): Default to 200.
1024
1025	* mpn/generic/nussbaumer_mul.c: New file.
1026	* configure.in (gmp_mpn_functions): Add nussbaumer_mul.
1027	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add nussbaumer_mul.
1028	* gmp-impl.h (mpn_nussbaumer_mul): Added prototype and name-mangling.
1029	* tune/speed.h (speed_mpn_nussbaumer_mul): Declare function.
1030	* tune/common.c (speed_mpn_nussbaumer_mul): New function.
1031	* tune/speed.c (routine): Add speed_mpn_nussbaumer_mul.
1032
1033	* mpn/generic/sqrmod_bnm1.c: New file.
1034	* configure.in (gmp_mpn_functions): Add sqrmod_bnm1.
1035	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrmod_bnm1.
1036	* gmp-impl.h (mpn_sqrmod_bnm1): Added prototype and name-mangling.
1037	(SQRMOD_BNM1_THRESHOLD): support for the new threshold.
1038	* tune/speed.h (speed_mpn_sqrmod_bnm1): Declare function.
1039	* tune/common.c (speed_mpn_sqrmod_bnm1): New function.
1040	* tune/speed.c (routine): Add speed_mpn_sqrmod_bnm1.
1041	* tests/mpn/t-mulmod_bnm1.c: Attribution.
1042	* tests/mpn/t-sqrmod_bnm1.c: New test file.
1043	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-sqrmod_bnm1.
1044
1045	* tune/tuneup.c: Tune SQRMOD_BNM1_THRESHOLD.
1046
1047	* mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Mimic fft_mul,
1048	use squaring if operands coincide.
1049	* tune/speed.h (speed_mpn_nussbaumer_mul_sqr): Declare function.
1050	* tune/common.c (speed_mpn_nussbaumer_mul_sqr): New function.
1051	* tune/speed.c (routine): Add speed_mpn_nussbaumer_mul_sqr.
1052
10532009-12-17  Torbjorn Granlund  <tege@gmplib.org>
1054
1055	* mpn/generic/bdiv_q.c (mpn_bdiv_q_itch): Rewrite.
1056
10572009-12-16  Torbjorn Granlund  <tege@gmplib.org>
1058
1059	* tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul
1060	instead of refmpn_mul_basecase.
1061	* tests/mpn/toom-shared.h: Likewise.
1062	* tests/refmpn.c (refmpn_mullo_n,refmpn_sqr,refmpn_mul_any): Likewise.
1063
1064	* minithres/gmp-mparam.h: Add new thresholds, trim old values.
1065
1066	* mpn/generic/powm.c: Use mp_bitcnt_t for bit counts.
1067	Handle REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD in
1068	non-WANT_REDC_2 INNERLOOP expansion code.
1069	* mpn/generic/powm_sec.c: Use mp_bitcnt_t for bit counts.
1070
10712009-12-16  Niels M�ller  <nisse@lysator.liu.se>
1072
1073	* tests/mpz/t-gcd.c (main): Added test case to exercise the
1074	unlikely u0 == u1 case in mpn_gcdext_lehmer_n.
1075
1076	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Get ASSERT
1077	right.
1078
10792009-12-16  Torbjorn Granlund  <tege@gmplib.org>
1080
1081	* tests/mpz/t-mul.c: Misc cleanups.
1082	(mul_basecase): Remove.
1083	(ref_mpn_mul): Remove.
1084	* tests/refmpn.c (refmpn_mul): New function, mainly from t-mul.c's
1085	ref_mpn_mul.
1086	(refmpn_mullo_n): Add a missing free.
1087
1088	* tune/speed.c (routine): Measure speed_mpn_{sb,dc}pi1_div_qr,
1089	mpn_{sb,dc}pi1_divappr_q, mpn_{sb,dc}pi1_bdiv_qr, and
1090	mpn_{sb,dc}pi1_bdiv_q.
1091
1092	* mpn/generic/invertappr.c: New file, meat from invert.c.
1093	* mpn/generic/invert.c: Leave just mpn_invert.c.
1094	* configure.in (gmp_mpn_functions): Add invertappr.
1095	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invertappr.c.
1096	* gmp-impl.h (mpn_invert_itch, mpn_invertappr_itch): New macros.
1097
10982009-12-15  Torbjorn Granlund  <tege@gmplib.org>
1099
1100	* mpn/generic/gcdext_subdiv_step.c: Get an ASSERT right.
1101
11022009-12-15  Niels M�ller  <nisse@lysator.liu.se>
1103
1104	* mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): A very small step
1105	towards nail support.
1106
11072009-12-15  Marco Bodrato <bodrato@mail.dm.unipi.it>
1108
1109	* gmp-impl.h (mpn_ni_invertappr): Added prototype and name-mangling.
1110	* mpn/generic/mulmod_bnm1.c: Comment representation of class [0].
1111
11122009-12-14  Niels M�ller  <nisse@lysator.liu.se>
1113
1114	* mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Use
1115	udiv_qr_3by2.
1116
11172009-12-14  Torbjorn Granlund  <tege@gmplib.org>
1118
1119	* tune/tuneup.c (tune_binvert): Remove BINV_MULMOD_BNM1_THRESHOLD
1120	tuning, it was always zero and caused BINV_NEWTON_THRESHOLD to be
1121	wrong (as pointed out by Marco).
1122	* (BINV_MULMOD_BNM1_THRESHOLD): Clean from other files too.
1123
11242009-12-14  Marco Bodrato <bodrato@mail.dm.unipi.it>
1125
1126	* mpn/generic/invert.c: Improved comments.
1127	(mpn_bc_invertappr): Conditionally re-enable mpn_dcpi1_divappr_q.
1128
11292009-12-14  Niels M�ller  <nisse@lysator.liu.se>
1130
1131	* gmp-impl.h (udiv_qr_3by2): Fix typo in argument list.
1132
11332009-12-13  Niels M�ller  <nisse@lysator.liu.se>
1134
1135	* gmp-impl.h (udiv_qr_3by2): New macro.
1136	* mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): Use udiv_qr_3by2.
1137
11382009-12-13  Torbjorn Granlund  <tege@gmplib.org>
1139
1140	* mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q): Avoid a buffer
1141	overrun.
1142
1143	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Handle carry-out from 2nd
1144	mpn_mul_fft, add an ASSERT for the 1st mpn_mul_fft.  Replace some
1145	comments on cc's range with ASSERTs.
1146
1147	* mpn/generic/gcdext.c (compute_v): Normalise tp[] after mpn_mul.
1148
1149	* mpz/powm.c: Rework buffer handling.
1150
11512009-12-13  Niels M�ller  <nisse@lysator.liu.se>
1152
1153	* tests/mpn/toom-shared.h (main): Use refmpn_mul_basecase to check
1154	results (slow!). Iteration counts of all toom tests reduced
1155	considerably.
1156
11572009-12-13  Marco Bodrato <bodrato@mail.dm.unipi.it>
1158
1159	* mpn/generic/invert.c (mpn_invertapp): Split in _bc and _ni.
1160	(mpn_bc_invertappr): New function, the basecase.
1161	(mpn_ni_invertapp): New function, Newton iteration.
1162	(mpn_invert): Use mpn_ni_invertapp.
1163	* tune/tuneup.c (tune_invert): Min for INV_APPR_THRESHOLD.
1164	(tune_invertappr): Min for INV_NEWTON_THRESHOLD.
1165
1166	* tune/speed.h (SPEED_ROUTINE_MPN_NI_INVERTAPPR): New macro.
1167	(speed_mpn_ni_invertappr): Declare function.
1168	* tune/common.c (speed_mpn_ni_invertappr): New function.
1169	* tune/speed.c (routine): Add speed_mpn_ni_invertappr.
1170
1171	* tune/tuneup.c (tune_invertappr): Use speed_mpn_ni_invertappr to
1172	tune INV_MULMOD_BNM1_THRESHOLD.
1173
11742009-12-12  Torbjorn Granlund  <tege@gmplib.org>
1175
1176	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Rewrite.
1177
11782009-12-12  Marco Bodrato <bodrato@mail.dm.unipi.it>
1179
1180	* tests/mpn/t-mulmod_bnm1.c (main): Disable B^n+1 stressing test
1181	for odd sizes.
1182
1183	* mpn/generic/invert.c: Complete rewrite. Uses Newton iterations.
1184	* gmp-impl.h (mpn_invertappr): Added prototype and name-mangling.
1185	(mpn_invertappr_itch): Added prototype and name-mangling.
1186	(INV_APPR_THRESHOLD): Support for a new tunable const.
1187	* tune/speed.h (SPEED_ROUTINE_MPN_INVERTAPPR): New macro.
1188	(speed_mpn_invertappr): Declare function.
1189	* tune/common.c (speed_mpn_invertappr): New function.
1190	* tune/speed.c (routine): Add speed_mpn_invertappr.
1191	* tune/tuneup.c (tune_invertappr): New function: was tune_invert.
1192	(tune_invert): Now tune only INV_APPR_THRESHOLD.
1193	(all): Enable call to tune_invert and tune_invertappr.
1194
11952009-12-11  Torbjorn Granlund  <tege@gmplib.org>
1196
1197	* mpn/generic/binvert.c: Use mpn_mulmod_bnm1 instead of FFT wrapping.
1198	Old, evidently broken wrapping code removed.
1199	* tune/tuneup.c (tune_binvert): Tune BINV_MULMOD_BNM1_THRESHOLD.
1200	* gmp-impl.h: Provide declarations for corresponding threshold var.
1201
1202	* tests/mpn/t-bdiv.c (COUNT): Decrease to keep run time reasonable.
1203
1204	* tune/tuneup.c (tune_invert): Tune INV_MULMOD_BNM1_THRESHOLD.
1205	* gmp-impl.h: Provide declarations for corresponding threshold var.
1206
1207	* tests/mpn/t-mulmod_bnm1.c: Avoid a division by zero.
1208
1209	* configure.in: Set up different paths for different 64-bit sparc
1210	processors.
1211	* mpn/sparc64/ultrasparc34/gmp-mparam.h: New file.
1212
12132009-12-10  Torbjorn Granlund  <tege@gmplib.org>
1214
1215	* mpn/*/gmp-mparam.h: Regenerate many of these files.
1216
12172009-12-10  Niels M�ller  <nisse@lysator.liu.se>
1218
1219	* gmp-impl.h (mpn_divexact): Removed scratch pointer from
1220	prototype.
1221	* mpn/generic/gcdext.c (divexact): Deleted, moved to...
1222	* mpn/generic/divexact.c (mpn_divexact): New implementation (moved
1223	from gcdext.c). The bidirectional divexact is kept but #if:ed out.
1224	Interface change, since the new code doesn't take a scratch
1225	argument.
1226
1227	* tests/mpn/t-mulmod_bnm1.c (main): Ensure that an >= bn. Lowered
1228	MIN_N to 1. Various fixes to handle n == 1 properly.
1229
1230	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Small interface
1231	change, require an >= bn.
1232
1233	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Fixed non-recursive
1234	case to not write beyond end of result area.
1235
12362009-12-09  Torbjorn Granlund  <tege@gmplib.org>
1237
1238	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): New macro, made
1239	from now deleted SPEED_ROUTINE_MPN_MULMOD_BNM1.
1240	* tune/common.c (speed_mpn_bc_mulmod_bnm1): New function.
1241	(speed_mpn_mulmod_bnm1): Use SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL.
1242	* tune/speed.c (routine): Add mpn_bc_mulmod_bnm1.
1243
1244	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
1245
1246	* tune/tuneup.c (tune_mulmod_bnm1): Rewrite.
1247
12482009-12-08  Marco Bodrato <bodrato@mail.dm.unipi.it>
1249
1250	* mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnm1,
1251	mpn_bc_mulmod_bnp1): Added a parameter for scratch area, possibly
1252	same as result area (as suggested by Niels M�ller).
1253	(mpn_mulmod_bnm1): Calls changed accordingly.
1254
12552009-12-08  Niels M�ller  <nisse@lysator.liu.se>
1256
1257	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Use
1258	table lookup for count_trailing_zeros. Binary algorithm still
1259	disabled by default.
1260
1261	* mpn/generic/gcdext.c (divexact): Local definition of divexact,
1262	using mpn_bdiv_q.
1263	(compute_v): Use it.
1264
1265	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-bdiv.
1266
1267	* tests/mpn/t-bdiv.c: New file.
1268
1269	* mpn/generic/bdiv_q.c (mpn_bdiv_q): Fixed bad quotient length,
1270	should have qn == nn.
1271
1272	* mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Pass correct nn length to
1273	the lower-level functions.
1274
12752009-12-08  Torbjorn Granlund  <tege@gmplib.org>
1276
1277	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): New define.
1278	* tune/common.c (speed_mpn_mulmod_bnm1_rounded): New function.
1279	* tune/speed.c (routine): Add mpn_mulmod_bnm1_rounded for measuring
1280	mpn_mulmod_bnm1 at recommended sizes.
1281
1282	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite.
1283	(mpn_bc_mulmod_bnm1): Use mpn_add_n instead of mpn_add.
1284
1285	* tune/speed.c (routine): Add mpn_invert.
1286
1287	* tune/tuneup.c (tune_invert): New function.
1288	* tune/speed.h (SPEED_ROUTINE_MPN_INVERT): New macro.
1289	* tune/common.c (speed_mpn_invert): New function.
1290	* gmp-impl.h: Provide declarations for corresponding threshold var.
1291	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invert.c.
1292
12932009-12-08  Marco Bodrato <bodrato@mail.dm.unipi.it>
1294
1295	* tests/devel/try.c: Test mpn_addlsh2_n and mpn_{add,sub}lsh_n;
1296	mpn_rsblsh_n now tests all shift values.
1297	* tests/refmpn.c (refmpn_addlsh_n, refmpn_sublsh_n): New functions.
1298	(refmpn_addlsh1_n): Use generic refmpn_addlsh_n.
1299	(refmpn_sublsh1_n): Use generic refmpn_sublsh_n.
1300	(refmpn_addlsh2_n): New function.
1301	* tests/tests.h: Declare new functions.
1302
13032009-12-06  Torbjorn Granlund  <tege@gmplib.org>
1304
1305	* tune/tuneup.c (tune_mulmod_bnm1): Up min_size to 12.
1306
1307	* Globally: Rename *mullow* to *mullo*, *MULLOW* to *MULLO*.
1308
1309	* configure.in: Don't include ev5 directory for ev6* and ev7.  Misc
1310	alpha path cleanups.
1311	* mpn/alpha/add_n.asm: Replaced by mpn/alpha/ev5/add_n.asm.
1312	* mpn/alpha/sub_n.asm: Replaced by mpn/alpha/ev5/sub_n.asm.
1313	* mpn/alpha/lshift.asm: Replaced by mpn/alpha/ev5/lshift.asm.
1314	* mpn/alpha/rshift.asm: Replaced by mpn/alpha/ev5/rshift.asm.
1315	* mpn/alpha/com_n.asm: New, moved from mpn/alpha/ev5/rshift.asm.
1316	* mpn/alpha/ev5/diveby3.asm: New, moved from mpn/alpha/diveby3.asm.
1317
1318	* mpn/powerpc64/mode64/diveby3.asm: Remove, it is slower than
1319	mpn_bdiv_dbm1c on all hardware.
1320
1321	* mpn/generic/powm_sec.c: Rework logic for mpn_sqr_basecase size limit.
1322
1323	* gmp-impl.h (mpn_redc_1_sec): Declare.
1324	* configure.in (gmp_mpn_functions): Add redc_1_sec.
1325
13262009-12-06  Marco Bodrato <bodrato@mail.dm.unipi.it>
1327
1328	* tests/devel/try.c (try_one): DATA_SRC0_HIGHBIT sets the high bit.
1329
13302009-12-05  Marco Bodrato <bodrato@mail.dm.unipi.it>
1331
1332	* mpn/generic/toom_eval_dgr3_pm1.c: Change return value: 0 or ~0.
1333	* mpn/generic/toom_eval_dgr3_pm2.c: Likewise.
1334	* mpn/generic/toom_eval_pm1.c: Likewise.
1335	* mpn/generic/toom_eval_pm2exp.c: Likewise.
1336	* mpn/generic/toom_eval_pm2.c: Rewrite to use mpn_addlsh2_n.
1337
1338	* mpn/generic/toom_interpolate_5pts.c: Param sa is a flag, not a sign.
1339
1340	* mpn/generic/toom33_mul.c: Adapt to changes above.
1341	* mpn/generic/toom3_sqr.c: Likewise.
1342	* mpn/generic/toom42_mul.c: Likewise.
1343	* mpn/generic/toom43_mul.c: Reduce branches.
1344	* mpn/generic/toom44_mul.c: Likewise.
1345	* mpn/generic/toom53_mul.c: Likewise.
1346	* mpn/generic/toom62_mul.c: Likewise.
1347
1348	* mpn/generic/toom52_mul.c: Use toom_eval_ functions.
1349
1350	* mpn/generic/toom4_sqr.c: Avoid C99 construct.
1351	* mpn/generic/toom_interpolate_7pts.c: Likewise.
1352
13532009-12-05  Torbjorn Granlund  <tege@gmplib.org>
1354
1355	* mpn/generic/redc_1_sec.c: New file.
1356	* mpn/generic/powm_sec.c: Use redc_1_sec.  Use dummy full subtract
1357	instead of mpn_cmp since the latter leaks to the side channel.
1358	(mpn_local_sqr_n): New function, with associated macros.
1359	(mpn_powm_sec): Use mpn_local_sqr_n.
1360
1361	* configure.in (HAVE_NATIVE): Add missing functions, then sort.
1362
13632009-12-04  Torbjorn Granlund  <tege@gmplib.org>
1364
1365	* tune/tuneup.c (tune_dc_div): Up min_size to 6.
1366	(tune_mod_1): Set MOD_1_1_THRESHOLD min_size to 2.
1367
1368	* tune/speed.h: Negate "binvert"-type inverses, as required.
1369
1370	* mpn/generic/redc_1.c: Add ASSERTs.
1371	* mpn/generic/redc_2.c: Likewise.
1372
1373	* mpn/generic/sbpi1_bdiv_q.c: Simplify loops, indexing.
1374
13752009-12-03  Yann Droneaud  <yann@droneaud.fr>
1376
1377	* acinclude.m4 ([long long reliability test 1]): Add a "static" for C99
1378	inline semantics compatibility.
1379
13802009-12-03  Torbjorn Granlund  <tege@gmplib.org>
1381
1382	* configure.in: Move intptr_t test into common AC_CHECK_TYPES.
1383
1384	* mpn/generic/gcdext.c: Add a TMP_FREE.
1385
13862009-12-03  Niels M�ller  <nisse@lysator.liu.se>
1387
1388	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
1389	Added various masking tricks.
1390
1391	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]:
1392	Reimplemented binary gcdext, with proper canonicalization.
1393
1394	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Handle v == 0
1395	from mpn_gcdext_1.
1396	* mpn/generic/gcdext_1.c (mpn_gcdext_1): Allow inputs with a < b,
1397	assertions fixed accordingly.
1398
13992009-12-03  Torbjorn Granlund  <tege@gmplib.org>
1400
1401	* tune/tuneup.c: Tune DC_DIVAPPR_Q_THRESHOLD.  Rewrite
1402	DC_DIV_QR_THRESHOLD tuning code.
1403	(tune_dc_div): Rewrite.
1404	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): New macro.
1405	* tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr,
1406	speed_mpn_sbpi1_divappr_q, speed_mpn_sbpi1_bdiv_qr): New functions.
1407	* gmp-impl.h: Provide declarations for corresponding threshold vars.
1408	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_divappr_q.c.
1409
1410	* tune/tuneup.c (tune_binvert): Up max_size.
1411
14122009-12-02  Marco Bodrato <bodrato@mail.dm.unipi.it>
1413
1414	* tests/devel/try.c: Test mpn_rsblsh2_n and mpn_rsblsh_n.
1415	* tests/refmpn.c (refmpn_rsblsh_n, refmpn_rsblsh2_n): New functions.
1416	(refmpn_rsblsh1_n): Use generic refmpn_rsblsh_n.
1417	* tests/tests.h: Declare new functions.
1418
14192009-12-03  Niels M�ller  <nisse@lysator.liu.se>
1420
1421	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step):
1422	Select the right cofactor in the cases A == B or A == 2B.
1423
1424	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Deleted
1425	handling of ap[0] == 0 and bp[0] == 0; these cases don't happen.
1426	Select the right cofactor in the case ap[0] == bp[0].
1427	* mpn/generic/gcdext.c (mpn_gcdext): Analogous changes.
1428
14292009-12-02  Niels M�ller  <nisse@lysator.liu.se>
1430
1431	* gmp-h.in (mpn_gcdext_1): Updated prototype.
1432	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
1433	signed cofactors from gcdext_1.
1434	* mpn/generic/gcdext_1.c (mpn_gcdext_1): Use Euclid's algorithm,
1435	and return signed cofactors.
1436
14372009-12-02  Torbjorn Granlund  <tege@gmplib.org>
1438
1439	* doc/gmp.texi (Low-level Functions): Document mpn_sqr_n.
1440
1441	* tune/speed.c (routine): Add mpn_binvert.
1442
1443	* tune/tuneup.c: Tune BINV_NEWTON_THRESHOLD.
1444	(tune_binvert): New function.
1445	* tune/speed.h (SPEED_ROUTINE_MPN_BINVERT): New macro.
1446	* tune/common.c (speed_mpn_binvert): New function.
1447	* gmp-impl.h: Provide declarations for corresponding threshold var.
1448	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add binvert.c.
1449
1450	* tune/tuneup.c: Tune DC_BDIV_QR_THRESHOLD and DC_BDIV_Q_THRESHOLD.
1451	(tune_dc_bdiv): New function.
1452	(tune_dc_div): New name for tune_dc.
1453	* tune/speed.h (SPEED_ROUTINE_MPN_PI1_BDIV_QR,
1454	SPEED_ROUTINE_MPN_PI1_BDIV_Q): New macros.
1455	* tune/common.c (speed_mpn_sbpi1_bdiv_qr, speed_mpn_dcpi1_bdiv_qr,
1456	speed_mpn_sbpi1_bdiv_q, speed_mpn_dcpi1_bdiv_q): New functions.
1457	* gmp-impl.h: Provide declarations for corresponding threshold vars.
1458	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_bdiv_qr.c and
1459	dcpi1_bdiv_q.c.
1460
14612009-12-01  Marco Bodrato <bodrato@mail.dm.unipi.it>
1462
1463	* mpn/generic/toom53_mul.c: Removed double computation of vinf.
1464
1465	* mpn/x86_64/aorrlsh_n.asm: Correct return value for rsblsh_n.
1466	* mpn/asm-defs.m4 (define_mpn): Add rsblsh_n.
1467	* gmp-impl.h (mpn_rsblsh_n): Added prototype and name-mangling.
1468
1469	* mpn/generic/fib2_ui.c: Reduce the amount of temporary storage.
1470	Use mpn_rsblsh_n.
1471
14722009-12-01  Torbjorn Granlund  <tege@gmplib.org>
1473
1474	* mpn/generic/redc_n.c: Rework temp allocation.
1475
1476	* mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n_itch): Add pi1 also
1477	to this function.
1478
1479	* mpn/generic/dcpi1_bdiv_q.c: Get the mpn_sbpi1_bdiv_q call right.
1480	Misc cleanups.
1481
1482	* tune/speed.c (routine): Fix typo in last change.
1483	Add mpn_redc_2.
1484
1485	* tune/speed.h (SPEED_ROUTINE_REDC_N): Set min size properly.
1486
14872009-12-01  Niels M�ller  <nisse@lysator.liu.se>
1488
1489	* tune/speed.c (routine): Added mpn_toom42_mul and mpn_redc_n.
1490	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM42_MUL): New macro.
1491	(speed_mpn_toom42_mul): Declare function.
1492	* tune/common.c (speed_mpn_toom42_mul): New function.
1493	* gmp-impl.h (MPN_TOOM42_MUL_MINSIZE): New constant.
1494
14952009-11-30  Marco Bodrato <bodrato@mail.dm.unipi.it>
1496
1497	* mpn/generic/fib2_ui.c: Use mpn_rsblsh2_n.
1498
14992009-11-29  Torbjorn Granlund  <tege@gmplib.org>
1500
1501	* mpn/x86_64/pentium4/gmp-mparam.h
1502	(HAVE_NATIVE_mpn_addlsh1_n, HAVE_NATIVE_mpn_sublsh1_n): Don't undef.
1503
1504	* Makefile.am (EXTRA_DIST): Remove macos.
1505
15062009-11-28  Torbjorn Granlund  <tege@gmplib.org>
1507
1508	* tune/tuneup.c (tune_redc): Set min_size to 16 for redc_n tuning.
1509
1510	* mpn/x86_64/sqr_basecase.asm (SQR_TOOM2_THRESHOLD_MAX): Avoid quoting
1511	to allow configure.in parse it more easily.  Trim from 120 to 80.
1512
15132009-11-28  Marco Bodrato <bodrato@mail.dm.unipi.it>
1514
1515	* mpn/generic/mulmod_bnm1.c: Basecases made simpler, this also corrects
1516	a bug affecting previous version.
1517
15182009-11-28  Torbjorn Granlund  <tege@gmplib.org>
1519
1520	* configure.in: Handle atom also in 32-bit mode.
1521	* mpn/x86/atom/gmp-mparam.h: New file.
1522
1523	* gmp-impl.h (MULMOD_BNM1_THRESHOLD): Default.
1524
1525	* mpn/generic/redc_n.c: Use mpn_mulmod_bnm1 instead of mpn_mul_n.
1526
1527	* Use TMP_ALLOC_LIMBS consistently.
1528	* Finish renaming BITS_PER_MP_LIMB to GMP_LIMB_BITS.
1529
1530	* macos: Remove entire directory.
1531
15322009-11-27  Torbjorn Granlund  <tege@gmplib.org>
1533
1534	* mpn/x86_64/corei/gmp-mparam.h: New file.
1535	* mpn/x86_64/core2/gmp-mparam.h: Now for just core2.
1536	* mpn/powerpc64/mode64/p3/gmp-mparam.h: New file.
1537	* mpn/powerpc64/mode64/p4/gmp-mparam.h: New file.
1538	* mpn/powerpc64/mode64/p5/gmp-mparam.h: New file.
1539
1540	* config.guess: Return "corei" for core i7 and core i5.
1541	* config.sub: Recognise "corei".
1542	* acinclude.m4 (X86_64_PATTERN): Add corei.
1543	* configure.in (powerpc): Set up more CPU-specific paths.
1544	(x86): Handle corei.
1545
1546	* mpz/powm.c: Allow input operand overlap also when exponent = 1.
1547	Misc cleanups.
1548
15492009-11-26  Marco Bodrato <bodrato@mail.dm.unipi.it>
1550
1551	* tests/mpn/t-mulmod_bnm1.c: New test file.
1552	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-mulmod_bnm1.
1553
1554	* mpn/generic/mullow_n.c: Comments on Mulders' trick implementation.
1555
15562009-11-26  Torbjorn Granlund  <tege@gmplib.org>
1557
1558	* mpn/generic/powm.c: Make comments reflect current code state.
1559
1560	* tests/devel/try.c: Make mpn_mullow_n testing actually work.
1561
15622009-11-25  Torbjorn Granlund  <tege@gmplib.org>
1563
1564	* mpz/powm.c: Clean up unused defs.
1565
15662009-11-24  Torbjorn Granlund  <tege@gmplib.org>
1567
1568	* tune/tuneup.c (tune_redc): Rewrite.
1569	* mpn/generic/powm.c: Use REDC_1_TO_REDC_2_THRESHOLD,
1570	REDC_1_TO_REDC_N_THRESHOLD, and REDC_2_TO_REDC_N_THRESHOLD.
1571	Get rid of previous REDC params, including LOCAL_REDC_N_THRESHOLD.
1572	(WANT_REDC_2): Define.
1573	* gmp-impl.h: Corresponding changes.
1574
15752009-11-23  Torbjorn Granlund  <tege@gmplib.org>
1576
1577	* mpn/generic/powm.c: Fix typo.
1578	Define LOCAL_REDC_N_THRESHOLD, use in REDC_2_THRESHOLD...
1579	REDC_N_THRESHOLD chain.
1580
15812009-11-22  Torbjorn Granlund  <tege@gmplib.org>
1582
1583	* tune/tuneup.c (tune_mullow): Set min_size to 1.
1584
1585	* mpn/generic/powm_sec.c: Use just mpn_mul_basecase and
1586	mpn_sqr_basecase for multiplication and squaring.
1587
1588	* tune/tuneup.c: Tune REDC_2_THRESHOLD and REDC_N_THRESHOLD.
1589	(tune_redc): New function.
1590	(tune_powm): Remove function.
1591	* tune/speed.h (SPEED_ROUTINE_REDC_2, SPEED_ROUTINE_REDC_N): New.
1592	* tune/common.c (speed_mpn_redc_2, speed_mpn_redc_n): New.
1593
1594	* mpz/powm.c: Complete rewrite.  Use mpn_powm and mpn_powlo.
1595	* mpn/generic/powm.c: Rewrite.
1596	* mpn/generic/redc_n.c: New file.
1597	* configure.in (gmp_mpn_functions): Add redc_n.
1598	* gmp-impl.h (REDC_2_THRESHOLD, REDC_N_THRESHOLD): Default, and define
1599	for tuneup.
1600
16012009-11-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
1602
1603	* mpn/generic/mullow_n.c: Disable Mulders' trick for small operands,
1604	use fft for bigger ones.
1605	* tests/mpn/t-mullo.c: New test file.
1606
16072009-11-22  Torbjorn Granlund  <tege@gmplib.org>
1608
1609	* tune/tuneup.c (tune_mullow): Rewrite.
1610
16112009-11-21  Marco Bodrato <bodrato@mail.dm.unipi.it>
1612
1613	* gmp-impl.h: Removed unused macros (CACHED_ABOVE_THRESHOLD and
1614	CACHED_BELOW_THRESHOLD).
1615
1616	* mpn/generic/mullow_n.c: Use Mulders' trick.
1617	* tune/tuneup.c (tune_mullow): MULLOW_MUL_N_THRESHOLD range of
1618	search depends on FFT tuning;
1619	(all): Anticipate tune_fft_{mul,sqr}.
1620
1621	* tune/speed.c (routine): Add entry related to mpn_mulmod_bnm1.
1622
16232009-11-19  Niels M�ller  <nisse@lysator.liu.se>
1624
1625	* mpn/generic/toom_eval_dgr3_pm2.c (mpn_toom_eval_dgr3_pm2)
1626	[HAVE_NATIVE_mpn_add_n_sub_n]: Fixed typo in mpn_add_n_sub_n call
1627	(spotted by Marco Bodrato).
1628	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): Likewise.
1629	* mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Likewise.
1630
1631	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2) [HAVE_NATIVE_mpn_addlsh_n]:
1632	Fixed missing declaration.
1633
1634	* mpn/asm-defs.m4 (define_mpn): Add addlsh_n.
1635	* gmp-impl.h (mpn_addlsh_n): Added prototype and name-mangling.
1636
16372009-11-19  Niels M�ller  <nisse@lysator.liu.se>
1638
1639	* mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): New file.
1640	* mpn/generic/toom53_mul.c (mpn_toom53_mul): Use mpn_toom_eval_pm2.
1641	* mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
1642	* configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
1643
16442009-11-18  Torbjorn Granlund  <tege@gmplib.org>
1645
1646	* gmp-impl.h (mpn_and_n, etc): Adapt to now-public logic functions.
1647
1648	* config.guess: Recognise VIA nano.
1649	* config.sub: Likewise.
1650	* configure.in: Generalise x86_64 support; recognise VIA nano.
1651
16522009-11-16  Torbjorn Granlund  <tege@gmplib.org>
1653
1654	* tune/speed.c (routine): Add measurement of mpn_addlsh2_n,
1655	mpn_sublsh2_n, mpn_rsblsh2_n.
1656	* tune/common.c: Add speed routines for lsh2 functions.
1657
1658	* mpn/generic/divis.c: Use MU_BDIV_QR_THRESHOLD.
1659
1660	* configure.in (gmp_mpn_functions_optional): Add *lsh_n functions.
1661
1662	* mpn/generic/toom_eval_pm2exp.c: Make HAVE_NATIVE_mpn_addlsh_n code
1663	work.
1664
1665	* mpn/x86_64/aorrlsh2_n.asm: Optimise inner loop.
1666
1667	* configure.in (gmp_mpn_functions_optional): Remove copyi,copyd, they
1668	are now in gmp_mpn_functions.  Analogously move logical functions.
1669
16702009-11-16  Marco Bodrato <bodrato@mail.dm.unipi.it>
1671
1672	* mpn/generic/toom53_mul.c: Use addlsh2 for evaluation (and fix typo).
1673	* mpn/generic/toom_eval_dgr3_pm2.c: Likewise (affects toom44 and 43).
1674
1675	* mpn/asm-defs.m4: Fix comments for op_lsh2 new functions.
1676	* gmp-impl.h: Likewise.
1677	* tests/mpz/t-fac_ui.c: Fix a comment.
1678
16792009-11-15  Torbjorn Granlund  <tege@gmplib.org>
1680
1681	* mpn/x86_64/aorrlsh2_n.asm: New file.
1682	* configure.in: Add support for addlsh2_n, sublsh2_n, and rsblsh2_n,
1683	including mulfuncs.
1684	* gmp-impl.h (mpn_addlsh2_n, mpn_sublsh2_n, mpn_rsblsh2_n): Declare.
1685	* mpn/asm-defs.m4: Likewise.
1686
1687	* mpn/generic/copyi.c: New file.
1688	* mpn/generic/copyd.c: Likewise.
1689	* mpn/generic/zero.c: Likewise.
1690	* gmp-h.in: Declare new functions.
1691	* configure.in (gmp_mpn_functions): Add new functions.
1692
16932009-11-15  Marco Bodrato <bodrato@mail.dm.unipi.it>
1694
1695	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): fix typo
1696
1697	* mpn/generic/toom33_mul.c: Use rsblsh1 for evaluation.
1698	* mpn/generic/toom3_sqr.c: Likewise.
1699
17002009-11-14  Torbjorn Granlund  <tege@gmplib.org>
1701
1702	* mpn/generic/toom52_mul.c: Use mpn_addlsh1_n.
1703
1704	* mpn/generic/toom52_mul.c: Toggle the right flag bit in an
1705	HAVE_NATIVE_mpn_add_n_sub_n arm.
1706
1707	* tests/mpz/t-remove.c: New file.
1708
1709	* mpn/generic/remove.c: Major overhaul.  Add parameter 'cap'.
1710
1711	* mpn/generic/binvert.c: Fix typo in last change.
1712
1713	* mpn/generic/bdiv_qr.c: Make it actually work.  Also use passed-in
1714	scratch space.
1715
1716	* mpn/generic/mu_bdiv_qr.c: Reset FFT parameters for each call.
1717
17182009-11-12  Torbjorn Granlund  <tege@gmplib.org>
1719
1720	* mpn/x86/k7/gcd_1.asm (MASK): Compute from MAXSHIFT.
1721
17222009-11-11  Torbjorn Granlund  <tege@gmplib.org>
1723
1724	* mpn/generic/binvert.c: Simplify, fix comments.
1725
1726	* tests/devel/try.c: Test mpn_invert and mpn_binvert.
1727
1728	* tests/refmpn.c (refmpn_invert, refmpn_binvert): New functions.
1729	* tests/tests.h: Declare new functions.
1730
17312009-11-10  Torbjorn Granlund  <tege@gmplib.org>
1732
1733	* configure.in: Supply compiler options for atom in 32-bit mode.
1734
1735	* acinclude.m4 (X86_64_PATTERN): New.
1736	* configure.in: Setup and use X86_64_PATTERN.
1737
1738	* mpn/x86_64/fat/fat.c: New file.
1739	* mpn/x86_64/fat/fat_entry.asm: New file.
1740	* mpn/x86_64/fat: Copy C placeholder files from mpn/x86/fat.
1741	* mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): New, copied from
1742	mpn/x86/x86-defs.m4.
1743	* configure.in: Move down x86 fat setup code until after ABI has been
1744	determined; generalise to handle x86_64.
1745
17462009-11-09  Torbjorn Granlund  <tege@gmplib.org>
1747
1748	* mpn/x86/fat/mod_1.c: New file.
1749
1750	* acinclude.m4 (GMP_C_FOR_BUILD_ANSI): Avoid poor quoting.
1751
17522009-11-08  Torbjorn Granlund  <tege@gmplib.org>
1753
1754	* gmp-impl.h (MPN_LOGOPS_N_INLINE): Rewrite, update interface.  Callers
1755	updated.
1756	* mpn/generic/logops_n.c: New file.
1757	* doc/gmp.texi (Low-level Functions): Document logical mpn functions.
1758
17592009-11-07  Torbjorn Granlund  <tege@gmplib.org>
1760
1761	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): Adapt to new
1762	mpn_mulmod_bnm1 interface.
1763
17642009-11-07  Marco Bodrato <bodrato@mail.dm.unipi.it>
1765
1766	* mpn/generic/mulmod_bnm1.c: New interface, with size
1767	specified for all operands in mpn_mulmod_bnm1.
1768	* gmp-impl.h: Changed mpn_mulmod_bnm1 prototype.
1769
17702009-11-05  Torbjorn Granlund  <tege@gmplib.org>
1771
1772	* mpn/x86/k7/gcd_1.asm: Actually use div-reduced value.
1773	Mnemonic cleanup.
1774
1775	* mpn/x86_64/gcd_1.asm: New file.
1776
17772009-11-03  Torbjorn Granlund  <tege@gmplib.org>
1778
1779	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqr_n.c.
1780
17812009-11-03  Marco Bodrato <bodrato@mail.dm.unipi.it>
1782
1783	* mpn/generic/toom_interpolate_6pts.c: removed an addmul_1 and cleanup.
1784
17852009-11-02  Torbjorn Granlund  <tege@gmplib.org>
1786
1787	* configure.in (gmp_mpn_functions): Remove obsolete functions
1788	dc_divrem_n and sb_divrem_mn.
1789	* gmp-impl.h: Misc cleanup.
1790	(mpn_sb_divrem_mn, mpn_dc_divrem_n): Remove.
1791	(DIV_DC_THRESHOLD): Remove.
1792	* mpn/generic/dc_divrem_n.c: Remove.
1793	* mpn/generic/sb_divrem_mn.c: Remove.
1794	* mpn/generic/tdiv_qr.c: Use DC_DIV_QR_THRESHOLD, not DIV_DC_THRESHOLD.
1795
1796	* tests/devel/try.c: Replace mpn_sb_divrem_mn by mpn_sbpi1_div_qr.
1797	* tests/refmpn.c (refmpn_sb_div_qr): New name for refmpn_sb_divrem_mn.
1798
1799	* tune/Makefile.am (libspeed_la_SOURCES): Remove sb_div.c and sb_inv.c.
1800	(TUNE_MPN_SRCS_BASIC): Remove sb_divrem_mn.c.
1801	* tune/common.c (speed_mpn_dcpi1_div_qr_n): New function.
1802	 Remove mpn_sb_divrem_mn related functions.
1803	* tune/speed.c (routine): Remove entries related to mpn_dc_divrem and
1804	mpn_sb_divrem.
1805	(routine): New entry for mpn_dc_div_qr_n.
1806	* tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_CALL): Compute inverse
1807	needed by pi1 calls.
1808	(SPEED_ROUTINE_MPN_SB_DIVREM_M3): Remove.
1809	* tune/tuneup.c (tune_sb_preinv): Remove.
1810	(tune_dc): Update to measure DC_DIV_QR_THRESHOLD.
1811
1812	* mpn/generic/sb_divappr_q.c: Remove.
1813
18142009-11-01  Torbjorn Granlund  <tege@gmplib.org>
1815
1816	* gmp-impl.h: Misc minor cleanups.
1817
18182009-10-31  Torbjorn Granlund  <tege@gmplib.org>
1819
1820	* gmp-impl.h (toom itch functions): Simplify, make some into macros.
1821	(MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Remove.
1822	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove.
1823	* mpn/generic/mul_n.c (mpn_sqr_n): Move from here...
1824	* mpn/generic/sqr_n.c: ...to this new file.
1825	* configure.in (gmp_mpn_functions): Add sqr_n.
1826
1827	* Globally change
1828	  MUL_TOOM3_THRESHOLD => MUL_TOOM33_THRESHOLD,
1829	  MUL_KARATSUBA_THRESHOLD => MUL_TOOM22_THRESHOLD,
1830	  SQR_KARATSUBA_THRESHOLD => SQR_TOOM2_THRESHOLD,
1831	and associated names analogously.
1832
18332009-10-31  Niels M�ller  <nisse@lysator.liu.se>
1834
1835	* mpn/generic/toom_interpolate_7pts.c: Changed evaluation points,
1836	replacing -1/2 by -2.
1837	* mpn/generic/toom44_mul.c: Updated to use new evaluation points,
1838	and use mpn_toom_eval_dgr3_pm2.
1839	* mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Likewise.
1840	* mpn/generic/toom53_mul.c (mpn_toom53_mul): Updated to use new
1841	evaluation points, and use mpn_toom_eval_pm1 and
1842	mpn_toom_eval_pm2exp.
1843	* mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise.
1844
1845	* mpn/generic/toom_eval_pm2exp.c: New file.
1846	* mpn/generic/toom_eval_pm1.c: New file.
1847
1848	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
1849	mpn_toom_eval_dgr3_pm2.
1850
18512009-10-30  Torbjorn Granlund  <tege@gmplib.org>
1852
1853	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom2* and toom3* files.
1854
18552009-10-30  Niels M�ller  <nisse@lysator.liu.se>
1856
1857	* configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2.
1858	* gmp-impl.h: Added prototype for mpn_toom_eval_dgr3_pm2.
1859	* mpn/generic/toom_eval_dgr3_pm2.c: New file.
1860
18612009-10-29  Niels M�ller  <nisse@lysator.liu.se>
1862
1863	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use
1864	mpn_toom_eval_dgr3_pm1.
1865	* mpn/generic/toom42_mul.c (mpn_toom42_mul): Likewise.
1866
18672009-10-29  Torbjorn Granlund  <tege@gmplib.org>
1868
1869	* mpn/generic/mulmod_bnm1.c: Replace some add_1 by INCR.
1870
1871	* gmp-impl.h (mpn_mulmod_bnm1_itch): New macro.
1872
1873	* mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Call mpn_mul_fft.
1874	(mpn_mulmod_bnm1_next_size): Adopt to SS FFT.
1875
1876	* mpn/generic/mul_fft.c (mpn_mul_fft): Make it return high limb.
1877	(mpn_mul_fft_internal): Likewise.
1878
1879	* mpn/generic/mulmod_bnm1.c: New file, by Niels M�ller.
1880	* configure.in (gmp_mpn_functions): Add mulmod_bnm1.
1881	* gmp-impl.h: Add related declarations.
1882	* tune/tuneup.c: Tune MULMOD_BNM1_THRESHOLD.
1883	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): New macro.
1884	* tune/common.c (speed_mpn_mulmod_bnm1): New function.
1885	* Makefile.am (TUNE_MPN_SRCS_BASIC): Add mulmod_bnm1.c.
1886
1887	* gmp-impl.h (mpn_kara_mul_n, mpn_kara_sqr_n): Remove declarations.
1888	* tune/common.c: Remove/rename kara functions.
1889	* tune/speed.h: Likewise.
1890
1891	* tests/devel/try.c: Clean up usage of %p printf arguments.
1892
1893	* gmp-impl.h: Update MUL/SQR MINSIZE macros to reflect new function
1894	names and limitations
1895	* tune/tuneup.c: Use updated macro names.
1896	* tune/speed.h: Likewise.
1897	* tests/devel/try.c: Test new mul/sqr functions, remove old tests.
1898
18992009-10-29  Niels M�ller  <nisse@lysator.liu.se>
1900
1901	* tune/speed.c: Added support for mpn_toom4_sqr,
1902
1903	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM4_SQR): New macro.
1904	(SPEED_ROUTINE_MPN_KARA_MUL_N): Deleted.
1905	(SPEED_ROUTINE_MPN_TOOM3_MUL_N): Deleted.
1906	(SPEED_ROUTINE_MPN_TOOM2_SQR): Use mpn_toom2_sqr_itch.
1907
1908	* gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove
1909	declarations.
1910	(mpn_toom2_sqr_itch): Add margin for recursive calls.
1911
19122009-10-28  Niels M�ller  <nisse@lysator.liu.se>
1913
1914	* mpn/generic/mul_n.c (mpn_kara_mul_n): Deleted old Karatsuba
1915	implementation.
1916	(mpn_kara_sqr_n): Likewise deleted.
1917
1918	* mpn/generic/mul_n.c (mpn_sqr_n): Use mpn_toom2_sqr and
1919	mpn_toom3_sqr, not the old implementations.
1920
1921	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE): Deleted, replaced by
1922	mpn_toom33_mul_itch.
1923	(MPN_TOOM3_SQR_N_TSIZE): Deleted, replaced by
1924	mpn_toom3_sqr_itch.
1925	(mpn_toom33_mul_itch): Needs more scratch.
1926	(mpn_toom3_sqr_itch): Likewise.
1927	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Use
1928	mpn_toom33_mul_itch.
1929	(SPEED_ROUTINE_MPN_TOOM3_SQR_N): Use mpn_toom3_sqr_itch.
1930	* mpn/generic/mul_n.c (mpn_mul_n): Use mpn_toom33_mul_itch.
1931	(mpn_sqr_n): Use mpn_toom3_sqr_itch.
1932
1933	* mpn/generic/toom33_mul.c (mpn_toom33_mul): Avoid TMP_ALLOC. Needs
1934	some more supplied scratch instead.
1935	* mpn/generic/toom3_sqr.c (mpn_toom3_sqr): Likewise.
1936
19372009-10-26  Torbjorn Granlund  <tege@gmplib.org>
1938
1939	* gmp-impl.h (invert_pi1): Streamline, as suggested by Niels.
1940
19412009-10-24  Torbjorn Granlund  <tege@gmplib.org>
1942
1943	* mpn/generic/bdiv_q.c: Update to call new functions.
1944	* mpn/generic/bdiv_qr.c: Likewise.
1945	* mpn/generic/binvert.c: Likewise.
1946	* mpn/generic/divexact.c: Likewise.
1947	* mpn/generic/divis.c: Likewise.
1948	* mpn/generic/perfpow.c: Likewise.
1949	* mpn/generic/tdiv_qr.c: Likewise.
1950	* mpn/generic/dcpi1_bdiv_q.c: New file.
1951	* mpn/generic/dcpi1_bdiv_qr.c: New file.
1952	* mpn/generic/dcpi1_div_q.c: New file.
1953	* mpn/generic/dcpi1_div_qr.c: New file.
1954	* mpn/generic/dcpi1_divappr_q.c: New file.
1955	* mpn/generic/sbpi1_bdiv_q.c: New file.
1956	* mpn/generic/sbpi1_bdiv_qr.c: New file.
1957	* mpn/generic/sbpi1_div_q.c: New file.
1958	* mpn/generic/sbpi1_div_qr.c: New file.
1959	* mpn/generic/sbpi1_divappr_q.c: New file.
1960	* mpn/generic/dc_bdiv_q.c: Removed.
1961	* mpn/generic/dc_bdiv_qr.c: Removed.
1962	* mpn/generic/dc_div_q.c: Removed.
1963	* mpn/generic/dc_div_qr.c: Removed.
1964	* mpn/generic/dc_divappr_q.c: Removed.
1965	* mpn/generic/sb_bdiv_q.c: Removed.
1966	* mpn/generic/sb_bdiv_qr.c: Removed.
1967	* mpn/generic/sb_div_q.c: Removed.
1968	* mpn/generic/sb_div_qr.c: Removed.
1969
1970	* configure.in (gmp_mpn_functions): Add new division functions, remove
1971	obsolete division functions.
1972
1973	* gmp-impl.h: Add declarations of new division functions, remove
1974	corresponding obsolete declarations.
1975	(gmp_pi1_t, gmp_pi2_t): New types.
1976	(invert_pi1): New macro for computing 2/1 and 3/2 inverses.
1977
19782009-10-23  Niels M�ller  <nisse@lysator.liu.se>
1979
1980	* gmp-impl.h (mpn_toom62_mul_itch): New function.
1981
1982	* tests/mpn/t-toom53.c: New test program.
1983	* tests/mpn/t-toom62.c: New test program.
1984
19852009-10-23  Torbjorn Granlund  <tege@gmplib.org>
1986
1987	* mpn/generic/get_d.c: Fix code handling denorms for 64-bit machines.
1988	* tests/mpf/t-get_d.c (test_denorms): New function.
1989
19902009-10-23  Niels M�ller  <nisse@lysator.liu.se>
1991
1992	* mpn/generic/toom52_mul.c (mpn_toom52_mul): Use supplied scratch
1993	space, not TMP_ALLOC. Interface change, now requires input sizes
1994	such that s + t >= 5.
1995
1996	* gmp-impl.h (mpn_toom52_mul_itch): New function.
1997
1998	* tests/mpn/t-toom52.c: New test program.
1999
20002009-10-22  Torbjorn Granlund  <tege@gmplib.org>
2001
2002	* mpn/x86_64/sqr_basecase.asm: Tune for speed and a 7% size decrease.
2003
20042009-10-22  Niels M�ller  <nisse@lysator.liu.se>
2005
2006	* tests/mpn/t-toom44.c: New test program.
2007	* tests/mpn/t-toom33.c: New test program.
2008
2009	* tests/mpn/toom-shared.h (main): Reorganized input generation.
2010	Users are now supposed to define macros MAX_AN, MIN_BN and MAX_BN.
2011	Updated existing toom test programs.
2012
20132009-10-22  Torbjorn Granlund  <tege@gmplib.org>
2014
2015	* tests/devel/try.c: Fix typos in last change.
2016
20172009-10-21  Torbjorn Granlund  <tege@gmplib.org>
2018
2019	* mpn/asm-defs.m4 (define_mpn): Add mullow_basecase.
2020
2021	* tests/devel/try.c: Test mpn_mullow_n.
2022
2023	* tests/refmpn.c (refmpn_mullow_n): New function.
2024	* tests/tests.h: Declare it.
2025
20262009-10-21  Niels M�ller  <nisse@lysator.liu.se>
2027
2028	* tests/mpn/toom-shared.h (main): Check for writes outside of the
2029	product or scratch area.
2030
2031	* gmp-impl.h (mpn_toom43_mul_itch): New function.
2032
2033	* mpn/generic/toom43_mul.c (mpn_toom43_mul): Use supplied scratch
2034	space, not TMP_ALLOC. Interface change, now requires input sizes
2035	such that s + t >= 5.
2036
20372009-10-20  Niels M�ller  <nisse@lysator.liu.se>
2038
2039	* tests/mpn/toom-shared.h (MIN_BLOCK): New constant, which can be
2040	overridden by users. Needed by t-toom42 and t-toom43.
2041
2042	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom32,
2043	t-toom42 and t-toom43.
2044	* tests/mpn/t-toom43.c: New test program.
2045	* tests/mpn/t-toom42.c: New test program.
2046	* tests/mpn/t-toom32.c: New test program.
2047
2048	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom22.
2049	* tests/mpn/t-toom22.c: New test file.
2050	* tests/mpn/toom-shared.h: New file. Test framework for Toom
2051	functions.
2052
20532009-10-14  Niels M�ller  <nisse@lysator.liu.se>
2054
2055	* mpn/generic/hgcd.c (mpn_hgcd_itch): Thanks to the new
2056	mpn_matrix22_mul_strassen, the scratch need is reduced by 16%.
2057
20582009-10-14  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2059
2060	* mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): New
2061	Strassen-like algorithm, to reduce the amount of temporary
2062	storage.
2063	(mpn_matrix22_mul_itch): Updated to reflect the reduced storage
2064	need.
2065
20662009-10-03  Torbjorn Granlund  <tege@gmplib.org>
2067
2068	* Rename mpn_addsub_n to mpn_add_n_sub_n.
2069
20702009-10-01  Torbjorn Granlund  <tege@gmplib.org>
2071
2072	* mpn/generic/tdiv_qr.c: Call mpn_divrem_1 and mpn_dc_div_qr instead of
2073	old functions.
2074
2075	* mpn/generic/mul_n.c: Call toom22 and toom33 instead of old functions.
2076
2077	* mpn/generic/toom42_mul.c (TOOM42_MUL_N_REC): Renamed from
2078	TOOM22_MUL_N_REC.  Unconditionally call the generic mpn_mul_n.
2079	* mpn/generic/toom32_mul.c: Analogous changes.
2080
20812009-09-28  Niels M�ller  <nisse@lysator.liu.se>
2082
2083	* mpn/x86_64/invert_limb.asm: Rewrite. Exploit cancellation in the
2084	Newton iteration.
2085
20862009-09-27  Niels M�ller  <nisse@lysator.liu.se>
2087
2088	* mpn/x86/invert_limb.asm: Reduce register usage. Eliminated $1
2089	arguments to add, sub and shift.
2090
20912009-09-25  Niels M�ller  <nisse@lysator.liu.se>
2092
2093	* mpn/x86/invert_limb.asm: New file.
2094
20952009-09-24  Torbjorn Granlund  <tege@gmplib.org>
2096
2097	* mpn/generic/toom33_mul.c: Use new toom functions for all recursive
2098	products.
2099	* mpn/generic/toom3_sqr.c: Likewise.
2100	* mpn/generic/toom44_mul.c: Likewise.
2101	* mpn/generic/toom4_sqr.c: Likewise.
2102
2103	* mpn/generic/add_n.c: Relax operand overlap ASSERTs.
2104	* mpn/generic/sub_n.c: Likewise.
2105
21062009-09-15  Torbjorn Granlund  <tege@gmplib.org>
2107
2108	Suggested by Uwe Mueller:
2109	* printf/doprnt.c: Use "%ld" for exponent printing.
2110	* printf/doprntf.c (__gmp_doprnt_mpf): Make expval "long".
2111
21122009-09-14  Torbjorn Granlund  <tege@gmplib.org>
2113
2114	* configure.in: Handle mingw64.
2115	* gmp-impl.h (gmp_intptr_t): Declare.
2116	* tests/amd64check.c (calling_conventions_values): Use CNST_LIMB.
2117	* tests/memory.c: Use gmp_intptr_t; print pointers using C90 "%p".
2118	* tests/misc.c: Use gmp_intptr_t.
2119	* tests/mpq/t-get_str.c: Print pointers using C90 "%p".
2120
21212009-08-12  Torbjorn Granlund  <tege@gmplib.org>
2122
2123	* mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Remove silly ASSERT code.
2124
2125	* mpn/asm-defs.m4 (define_mpn): Remove mod_1s_1p, add mod_1_1p.
2126
2127	* mpn/arm/invert_limb.asm: Complete rewrite.
2128
2129	* longlong.h: Document LONGLONG_STANDALONE and NO_ASM.
2130
21312009-08-05  Torbjorn Granlund  <tege@gmplib.org>
2132
2133	* tests/mpz/dive_ui.c (check_random): Avoid zero divisors.
2134
21352009-07-31  Torbjorn Granlund  <tege@gmplib.org>
2136
2137	* mpn/generic/mod_1_1.c: Tweak to handle any modulus (possibility
2138	pointed out by Per Austrin).
2139	(mpn_mod_1_1p): Renamed from mpn_mod_1s_1p.
2140	(mpn_mod_1_1p_cps): Renamed from mpn_mod_1s_1p_cps.
2141	*mpn/generic/mod_1.c (mpn_mod_1): Reorganise to call mpn_mod_1_1p for
2142	any modulus.
2143
21442009-07-28  Torbjorn Granlund  <tege@gmplib.org>
2145
2146	* configure.in: Pass arch for x86 also in 64-bit mode.
2147
21482009-07-26  Torbjorn Granlund  <tege@swox.com>
2149
2150	* config.guess (_cpuid): Recognise more Intel "Core" processors.
2151
21522009-07-13  Torbjorn Granlund  <tege@gmplib.org>
2153
2154	* mpf/eq.c: Rewrite.
2155
2156	* tests/mpf/t-eq.c: New test.
2157
21582009-07-06  Torbjorn Granlund  <tege@gmplib.org>
2159
2160	* gmp-impl.h (__mp_bases): Remove this alias.
2161
2162	* mpf/get_str.c: Use less overflow prone expression for computing limb
2163	allocation.
2164	* mpz/inp_str.c: Likewise.
2165	* mpf/set_str.c: Likewise.
2166	* mpz/set_str.c: Likewise.
2167
21682009-07-03  Niels M�ller  <nisse@lysator.liu.se>
2169
2170	* mpn/generic/gcd_1.c (mpn_gcd_1): Use masking tricks to reduce
2171	the number of branches in the loop.
2172
21732009-06-28  Torbjorn Granlund  <tege@gmplib.org>
2174
2175	* demos/factorize.c (factor_using_pollard_rho): Rewrite.
2176
2177	* mpz/clears.c: New file.
2178	* mpq/clears.c: New file.
2179	* mpf/clears.c: New file.
2180	* gmp-h.in (mpz_clears, mpq_clears, mpf_clears): Declare.
2181	* mpz/Makefile.am: Add clears.c.
2182	* mpq/Makefile.am: Add clears.c.
2183	* mpf/Makefile.am: Add clears.c.
2184	* Makefile.am: Add these also to respective OBJECTS variables.
2185	* doc/gmp.texi: Document inits function and clears functions.
2186
21872009-06-20  Torbjorn Granlund  <tege@gmplib.org>
2188
2189	* mp-h.in (mp_bitcnt_t): Declare here too.
2190
21912009-06-19  Torbjorn Granlund  <tege@gmplib.org>
2192
2193	* mpq/inits.c: New file.
2194	* mpf/inits.c: New file.
2195	* gmp-h.in (mpz_inits, mpq_inits, mpf_inits): Declare .
2196
2197	* mpn/generic/remove.c: New file.
2198	* configure.in (gmp_mpn_functions): Add remove.
2199	* gmp-impl.h (mpn_remove): Declare.
2200
2201	* gmp-h.in (mp_bitcnt_t): New basic type.
2202	* mpn/generic/perfpow.c (mp_bitcnt_t): Remove private definition.
2203
2204	* mpn/generic/bdiv_qr.c: Make it actually work.
2205
2206	* mpn/x86_64/core2/aorsmul_1.asm: Rewrite to use shorter pipeline and
2207	to need fewer registers.
2208
22092009-06-17  Torbjorn Granlund  <tege@gmplib.org>
2210
2211	* mpn/x86_64/rsh1aors_n.asm: New file.
2212	* mpn/x86_64/rsh1add_n.asm: Remove.
2213	* mpn/x86_64/rsh1sub_n.asm: Remove.
2214
2215	* mpz/inits.c: New file.
2216
2217	* gen-trialdivtab.c: Wrap limb constants into CNST_LIMB.
2218
2219	With Martin Boij:
2220	* mpn/generic/perfpow.c (binv_root, binv_sqroot): Change from being
2221	recursive to being iterative.
2222	(mpn_perfect_power_p): Reorganise temp memory usage to avoid a buffer
2223	overrun.  Trim allocation of next and prev.  Never create oversize
2224	products in the multiplicity binary search.
2225
2226	* mpn/generic/dc_div_q.c: Add missing TMP_FREE.
2227
22282009-06-16  Torbjorn Granlund  <tege@gmplib.org>
2229
2230	Revert:
2231	* mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
2232
22332009-06-16  Martin Boij  <mboij@kth.se>
2234
2235	* mpn/generic/perfpow.c (logs): Use more conservative table.
2236
22372009-06-15  Torbjorn Granlund  <tege@gmplib.org>
2238
2239	* mpn/pa64/aors_n.asm: New file.
2240	* mpn/pa64/add_n.asm: Remove.
2241	* mpn/pa64/sub_n.asm: Remove.
2242
2243	* mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive.
2244
22452009-06-14  Torbjorn Granlund  <tege@gmplib.org>
2246
2247	* mpn/x86_64/bdiv_q_1.asm: Optimise away a mov insn.
2248	* mpn/x86_64/dive_1.asm: Likewise.
2249
2250	* mpn/generic/perfpow.c (binv_root): Use mpn_bdiv_q_1, not
2251	mpn_divexact_itch for 2-adic division.
2252	(all functions): Micro optimise.
2253
2254	* Makefile.am (libmp_la_SOURCES): Add nextprime.c.
2255
22562009-06-13  Torbjorn Granlund  <tege@gmplib.org>
2257
2258	* gmp-h.in (mpn_perfect_power_p): Declare.
2259	* configure.in (gmp_mpn_functions): Add perfpow.
2260	* mpz/perfpow.c: Now trivial, simply calls mpn_perfect_power_p.
2261
22622009-06-13  Martin Boij  <mboij@kth.se>
2263
2264	* mpn/generic/perfpow.c: New file.
2265	* tests/mpz/t-perfpow.c: Rewrite.
2266
22672009-06-12  Torbjorn Granlund  <tege@gmplib.org>
2268
2269	* mpn/generic/bdiv_qr.c: New file.
2270	* mpn/generic/bdiv_q.c: New file.
2271	* configure.in (gmp_mpn_functions): Add bdiv_qr and bdiv_q.
2272	* gmp-impl.h: Declare new functions.
2273
2274	* nextprime.c: New file.
2275	* gmp-impl.h (gmp_primesieve_t, gmp_init_primesieve, gmp_nextprime):
2276	Declare
2277	* Makefile.am (libgmp_la_SOURCES): Add nextprime.c.
2278
22792009-06-11  Torbjorn Granlund  <tege@gmplib.org>
2280
2281	* mpn/generic/trialdiv.c: New file.
2282	* gen-trialdivtab.c: New file.
2283	* configure.in (gmp_mpn_functions): Add trialdiv.
2284	* gmp-impl.h (mpn_trialdiv): Declare
2285	* Makefile.am: Add rules for gen-trialdivtab and trialdiv.
2286
2287	* longlong.h (arm count_leading_zeros): Define for armv5.
2288
2289	* gmp-impl.h: Move down toom itch functions to after we've #defined
2290	all THRESHOLDs.
2291
2292	* dumbmp.c (isprime): Replace with slightly less inefficient code.
2293	(mpz_tdiv_r): New function.
2294
22952009-06-11  Niels M�ller  <nisse@lysator.liu.se>
2296
2297	Support for mpn_toom32_mul in speed:
2298	* tune/speed.c (routine): Added mpn_toom32_mul.
2299	* tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_MUL): New macro.
2300	* tune/common.c (speed_mpn_toom32_mul): New function.
2301
2302	* gmp-impl.h (mpn_toom32_mul_itch): Count scratch space needed
2303	for the calls to mpn_toom22_mul.
2304	(ABOVE_THRESHOLD): Moved this and related macros so it can be used
2305	by mpn_toom32_mul_itch.
2306	(mpn_toom22_mul_itch): Count scratch space for recursive calls.
2307
23082009-06-11  Torbjorn Granlund  <tege@gmplib.org>
2309
2310	* mpn/x86/k7/mod_1_4.asm: New file, mainly for k7, but perhaps useful
2311	also for k6 and non-sse p6.
2312
23132009-06-10  Torbjorn Granlund  <tege@gmplib.org>
2314
2315	* mpn/x86_64/mod_1_4.asm: Minor size reducing tweaks.
2316
2317	* mpn/x86/mod_1.asm: Remove obsolete file.
2318	* mpn/x86/k7/mmx/mod_1.asm: Likewise.
2319	* mpn/x86/pentium4/sse2/mod_1.asm: Likewise.
2320	* mpn/x86/p6/mod_1.asm: Likewise.
2321	* mpn/x86/pentium/mod_1.asm: Likewise.
2322
23232009-06-08  Niels M�ller  <nisse@lysator.liu.se>
2324
2325	* mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Reorganized, to reduce
2326	the need for scratch space, and get rid of TMP_ALLOC. Also use
2327	mpn_toom_eval_dgr3_pm1.
2328
2329	* mpn/generic/toom_interpolate_6pts.c (mpn_toom_interpolate_6pts):
2330	Stricter ASSERTs based on maximum size of polynomial coefficients.
2331	Improved comments on the signedness of intermediate values.
2332
23332009-06-07  Torbjorn Granlund  <tege@gmplib.org>
2334
2335	* mpn/generic/toom2_sqr.c: Make it actually work.
2336
2337	* mpn/generic/toom3_sqr.c: Reduce local scratch space.
2338
23392009-06-05  Torbjorn Granlund  <tege@gmplib.org>
2340
2341	* mpn/generic/mul_fft.c (FFT_TABLE2_SIZE): Default to 200.
2342	(MUL_FFT_TABLE2_SIZE, SQR_FFT_TABLE2_SIZE): Let these decide
2343	FFT_TABLE2_SIZE if they are defined.
2344	(struct nk): Use bit field.
2345
23462009-06-05  Niels M�ller  <nisse@lysator.liu.se>
2347
2348	* mpn/generic/toom44_mul.c (mpn_toom44_mult): Use
2349	mpn_toom_eval_dgr3_pm1.
2350
2351	* mpn/generic/toom_eval_dgr3_pm1.c: New file.
2352
2353	* mpn/generic/toom_interpolate_7pts.c (mpn_toom_interpolate_7pts):
2354	Minor cleanup, use mpn_add rather than mpn_add_n + MPN_INCR_U.
2355
2356	* mpn/generic/toom44_mul.c (mpn_toom44_mul): Reorganized, to
2357	reduce the need for scratch space, and get rid of TMP_ALLOC.
2358
23592009-06-05  Torbjorn Granlund  <tege@gmplib.org>
2360
2361	* mpn/generic/toom_interpolate_7pts.c: Fall back mpn_divexact_byN to
2362	mpn_bdiv_q_1_pi1, if the latter is NATIVE.
2363
23642009-06-04  Torbjorn Granlund  <tege@gmplib.org>
2365
2366	* mpn/x86_64/bdiv_q_1.asm: New file.
2367
2368	* configure.in (HAVE_NATIVE): Add recently added functions.
2369	(GMP_MULFUNC_CHOICES): Handle addlsh_n, sublsh_n, rsblsh_n.
2370
2371	* tune/common.c (speed_mpn_bdiv_q_1, speed_mpn_bdiv_q_1_pi1):
2372	New functions.
2373	* tune/speed.c (routine): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
2374	* tune/speed.h (SPEED_ROUTINE_MPN_BDIV_Q_1_PI1): New #define.
2375	(SPEED_ROUTINE_MPN_BDIV_Q_1): Mew #define.
2376
2377	* configure.in (gmp_mpn_functions): Add bdiv_q_1.
2378	* mpn/generic/bdiv_q_1.c: New file.
2379	* mpn/asm-defs.m4 (define_mpn): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1.
2380	* gmp-impl.h (mpn_bdiv_q_1, mpn_bdiv_q_1_pi1): Declare.
2381
2382	* mpn/x86_64/lshift.asm: Cleanup.
2383	* mpn/x86_64/rshift.asm: Cleanup.
2384
2385	* mpn/x86_64/addlsh1_n.asm: Removed.
2386	* mpn/x86_64/aorrlsh1_n.asm: Generalised addlsh1_n.asm to handle
2387	addlsh1_n and rsblsh1_n functionality.
2388
2389	* tests/refmpn.c (refmpn_rsblsh1_n): New function.
2390	* tests/devel/try.c: Test mpn_rsblsh1_n.
2391	* tests/tests.h: Declare refmpn_rsblsh1_n.
2392	* tune/common.c (speed_mpn_rsblsh1_n): New function.
2393	* tune/speed.c (routine): Add mpn_rsblsh1_n.
2394	* tune/speed.h (mpn_rsblsh1_n): Declare.
2395
2396	* configure.in (gmp_mpn_functions_optional): Add rsblsh1_n.
2397	(GMP_MULFUNC_CHOICES): Handle rsblsh1_n defined with a mulfunc.
2398	* mpn/asm-defs.m4 (define_mpn): Add rsblsh1_n.
2399	* gmp-impl.h (mpn_rsblsh1_n): Declare.
2400
2401	* mpn/generic/toom32_mul.c: Consistently use TOOM22_MUL_N_REC.
2402
24032009-06-03  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2404
2405	* mpn/generic/toom43_mul.c: New file.
2406	* mpn/generic/toom52_mul.c: New file.
2407	* mpn/generic/toom_interpolate_6pts.c: New file.
2408
24092009-06-03  Torbjorn Granlund  <tege@gmplib.org>
2410
2411	* configure.in (gmp_mpn_functions): Add toom43_mul, toom52_mul, and
2412	toom_interpolate_6pts, but also some previously forgotten functions.
2413	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Likewise.
2414	* gmp-impl.h: Declare new functions. Sort toom function declarations.
2415
2416	* gmp-impl.h: Rename  toom4_* flags enum to toom7_*.  Relevant C files
2417	updated.
2418
2419	* mpn/generic/toom_interpolate_7pts (divexact_2exp): Remove.
2420
24212009-06-02  Torbjorn Granlund  <tege@gmplib.org>
2422
2423	* demos/factorize.c: Add -q command line option.
2424
24252009-06-02  Marco Bodrato  <bodrato@mail.dm.unipi.it>
2426
2427	* mpn/generic/toom_interpolate_7pts.c: Streamline, resulting in speed
2428	improvements.
2429
2430	* mpn/generic/toom_interpolate_5pts.c: Likewise, but also completely
2431	do away with explicit scratch space.
2432	* gmp-impl.h (mpn_toom_interpolate_5pts): Update prototype.
2433
2434	* mpn/generic/mul_n.c (mpn_toom3_sqr_n, mpn_toom3_mul_n):
2435	Update toom_interpolate_5pts call without scratch space parameter.
2436	* mpn/generic/toom3_sqr.c: Likewise.
2437	* mpn/generic/toom42_mul.c: Likewise.
2438	* mpn/generic/toom33_mul.c: Likewise.
2439
2440	* mpn/generic/toom33_mul.c: Reduce local scratch space.
2441	* mpn/generic/toom32_mul.c: Rewrite to not use local scratch space.
2442
24432009-06-02  Torbjorn Granlund  <tege@gmplib.org>
2444
2445	* mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): New macro, use it for
2446	oo point.
2447
24482009-06-01  Torbjorn Granlund  <tege@gmplib.org>
2449
2450	* mpn/generic/mul.c: Loop to avoid excessive recursion in toom33 and
2451	toom44 slicing code.
2452
2453	* mpz/remove.c: Correctly handle multiplicity that does not fit an int.
2454
2455	* Makefile.am (dist-hook): Check library version consistency.
2456
2457	* mpn/generic/mul.c: Rewrite.
2458
24592009-05-29  Torbjorn Granlund  <tege@gmplib.org>
2460
2461	* tests/mpz/t-divis.c (check_random): Create huge test operands.
2462
2463	* mpn/generic/toom44_mul.c: Allocate temp space using one TMP_ALLOC
2464	call, not multiple TMP_SALLOC.
2465	* mpn/generic/toom4_sqr.c: Likewise.
2466
2467	* gmp-impl.h (mpn_toom22_mul_itch): Replace totally wrong code.
2468
2469	* mpn/generic/mullow_n.c: Relax overlap requirement implied by ASSERT.
2470
2471	* mpn/generic/divis.c: Rewrite.
2472
2473	* gmp-impl.h (mpn_mu_bdiv_qr): Now returns mp_limb_t.
2474	(mpn_toom2_sqr_itch): Simplify.
2475
2476	* mpn/generic/mu_bdiv_qr.c: Implement properly.
2477
24782009-05-27  Torbjorn Granlund  <tege@gmplib.org>
2479
2480	* mpn/generic/mod_1_1.c: Add proper ASSERT functionality cps function.
2481	* mpn/generic/mod_1_2.c: Likewise.
2482	* mpn/generic/mod_1_3.c: Likewise.
2483	* mpn/generic/mod_1_4.c: Likewise.
2484
2485	* tune: Add speed measuring of toom22, toom33, and toom44.
2486
2487	* mpn/generic/toom22_mul.c: Handle potentially unbalanced coefficient
2488	product better.
2489
24902009-05-26  Torbjorn Granlund  <tege@gmplib.org>
2491
2492	* tests/mpz/t-mul.c (ref_mpn_mul): Use mpn_toom44_mul in FFT range for
2493	better huge-operands performance.
2494
24952009-05-24  Torbjorn Granlund  <tege@gmplib.org>
2496
2497	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Try "$L" too, before "$".
2498
24992009-05-23  Torbjorn Granlund  <tege@gmplib.org>
2500
2501	* gmp-impl.h (mpn_mod_1s_1p,mpn_mod_1s_2p,mpn_mod_1s_3p,mpn_mod_1s_4p):
2502	Declare using __GMP_ATTRIBUTE_PURE.
2503
2504	* tune/tuneup.c (tune_mod_1): Specify check_size for measuring mod_1_N
2505	functions.
2506	(one): Remove redundant size loop exit condition.
2507
25082009-05-20  Torbjorn Granlund  <tege@gmplib.org>
2509
2510	* mpn/x86/pentium4/sse2/mod_1_4.asm: New file.
2511	* mpn/x86/p6/sse2/mod_1_4.asm: New file (grabbing pentium4 code).
2512
25132009-05-18  Torbjorn Granlund  <tege@gmplib.org>
2514
2515	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 4.
2516	(__GNU_MP_VERSION_PATCHLEVEL): Set to -1.
2517
2518	* mpn/x86_64/mod_1_4.asm: New file.
2519
2520	* mpn/asm-defs.m4: Correct names for mod_1_N functions.
2521	Add defines for corresponding cps functions.
2522
2523	* mpn/generic/mod_1_2.c: Support any sizes > 1.
2524	* mpn/generic/mod_1_3.c: Likewise.
2525	* mpn/generic/mod_1_4.c: Likewise.
2526
25272009-05-12  Torbjorn Granlund  <tege@gmplib.org>
2528
2529	* Version 4.3.1 released.
2530
25312009-05-11  Torbjorn Granlund  <tege@gmplib.org>
2532
2533	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
2534
2535	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
2536	Bump version info.
2537
25382009-05-09  Torbjorn Granlund  <tege@gmplib.org>
2539
2540	* tests/mpz: Add MPZ_CHECK_FORMAT to many tests.
2541
25422009-05-07  Torbjorn Granlund  <tege@gmplib.org>
2543
2544	* mpn/x86/pentium4/sse2/mul_basecase.asm: Avoid L(ret), "ret" is
2545	defined in x86-defs.m4.
2546
25472009-05-06  Torbjorn Granlund  <tege@gmplib.org>
2548
2549	* mpn/x86/p6/aors_n.asm: Use L() for labels.
2550	* mpn/x86/pentium4/sse2/addmul_1.asm: Likewise.
2551	* mpn/x86/pentium4/sse2/mul_1.asm: Likewise.
2552	* mpn/x86/pentium4/sse2/mul_basecase.asm: Likewise.
2553	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
2554	* mpn/x86_64/lshift.asm: Likewise.
2555	* mpn/x86_64/rshift.asm: Likewise.
2556
2557	* tests/cxx/t-locale.cc (point_string): Declare as extern "C" to
2558	placate compilers that mangle variable names.
2559
25602009-05-04  Torbjorn Granlund  <tege@gmplib.org>
2561
2562	* tests/mpz/t-gcd.c: Generate operands that are multiple of each other.
2563
25642009-05-01  Torbjorn Granlund  <tege@gmplib.org>
2565
2566	* gmp-h.in (__GMP_EXTERN_INLINE): Support for more systems.
2567	(gmp_randinit_set): Add missing __GMP_DECLSPEC.
2568
25692009-04-28  Torbjorn Granlund  <tege@gmplib.org>
2570
2571	* mpn/generic/neg_n.c: New file.
2572	* configure.in (gmp_mpn_functions): Add neg_n.
2573	* mpn/asm-defs.m4 (define_mpn): Add neg_n.
2574	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add neg_n.c.
2575	* gmp-h.in: Handle mpn_neg_n properly.
2576
2577	* mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Nailify.
2578
2579	* mpn/generic/gcdext.c: Change some MPN_NORMALIZE to
2580	MPN_NORMALIZE_NOT_ZERO.
2581	* mpn/generic/gcdext_lehmer.c: Likewise.
2582	Add a MPN_NORMALIZE_NOT_ZERO.
2583
2584	* mpn/generic/binvert.c: Remove own mpn_neg_n.
2585
2586	* tests/mpz/t-gcd.c: Add some MPZ_CHECK_FORMAT calls.
2587
25882009-04-27  Torbjorn Granlund  <tege@gmplib.org>
2589
2590	* mpn/Makefile.am (TARG_DIST): Add minithres.
2591
2592	* mpn/generic/bdiv_dbm1c.c: Handle nails.
2593
25942009-04-26  Torbjorn Granlund  <tege@gmplib.org>
2595
2596	* config.guess: Recognise more POWER processor types.
2597
25982009-04-25  Torbjorn Granlund  <tege@gmplib.org>
2599
2600	* mpn/x86/pentium4/sse2/popcount.asm: Work around Apple reloc bug.
2601	* mpn/x86/darwin.m4: Define symbol "DARWIN".
2602
26032009-04-19  Torbjorn Granlund  <tege@gmplib.org>
2604
2605	* mpn/generic/powm.c (mpn_redc_n): Use ASSERT_ALWAYS, not abort().
2606	* mpn/generic/powm_sec.c: Likewise.
2607
2608	* mpn/powerpc64/aix.m4 (EXTERN_FUNC): New define.  Add dummy variants
2609	for other m4 files.
2610	* mpn/powerpc64/mode64/divrem_1.asm: Use EXTERN_FUNC.
2611	* mpn/powerpc64/mode64/divrem_1.asm: Likewise.
2612
26132009-04-16  Torbjorn Granlund  <tege@gmplib.org>
2614
2615	* mpn/x86_64/x86_64-defs.m4 (JUMPTABSECT): New define.
2616	* mpn/x86_64/darwin.m4: Likewise.
2617	* mpn/x86_64/sqr_basecase.asm: Rework switch code using JUMPTABSECT.
2618
2619	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
2620	Remove an unused variable.
2621
2622	* mpn/x86/x86-defs.m4 (LEA): Get SIZE arguments right.
2623
26242009-04-14  Torbjorn Granlund  <tege@gmplib.org>
2625
2626	* Version 4.3.0 released.
2627
2628	* scanf/doscan.c (__gmp_doscan): Pad 3-operand scanf call with dummy
2629	argument.
2630	* scanf/sscanffuns.c (scan): Disable vsscanf variant for now.
2631
26322009-04-13  Torbjorn Granlund  <tege@gmplib.org>
2633
2634	* scanf/sscanffuns.c (scan): Rewrite to use stdarg.
2635
2636	* tests/mpz/t-root.c: Rewrite.  Add unconditional gcc 4.3.2 tests.
2637
26382009-04-09  Torbjorn Granlund  <tege@gmplib.org>
2639
2640	* mpn/generic/powm.c: New file.
2641	* mpn/generic/powlo.c: New file.
2642	* mpn/generic/powm_sec.c: New file.
2643	* configure.in (gmp_mpn_functions): List new functions.
2644
26452009-04-08  Torbjorn Granlund  <tege@gmplib.org>
2646
2647	* mpz/urandomm.c: Amend last fix.
2648
26492009-04-06  Torbjorn Granlund  <tege@gmplib.org>
2650
2651	* configure.in: Support Sun cc for x86_64.
2652
2653	* mpz/urandomm.c: Handle operand overlap.
2654
26552009-03-11  Torbjorn Granlund  <tege@gmplib.org>
2656
2657	* configure.in (powerpc): Brave removing -Wa,-mppc64, in the hope that
2658	GCC now passes the proper options.
2659
26602009-03-09  Torbjorn Granlund  <tege@gmplib.org>
2661
2662	* mpn/x86_64/divrem_1.asm: Add a nop to save a cycle in unnormalised
2663	case.
2664
26652009-03-05  Torbjorn Granlund  <tege@gmplib.org>
2666
2667	* ia64/gmp-mparam.h, arm/gmp-mparam.h, x86/p6/mmx/gmp-mparam.h,
2668	pa32/hppa2_0/gmp-mparam.h sparc32/v9/gmp-mparam.h: Update.
2669
26702009-03-03  Torbjorn Granlund  <tege@gmplib.org>
2671
2672	* mpn/ia64/bdiv_dbm1c.asm: Accept/return carry.
2673
26742009-03-02  Torbjorn Granlund  <tege@gmplib.org>
2675
2676	* configure.in (64-bit sparc/solaris): Pass -xO3, not -O3 to solaris
2677	system compiler.
2678
26792009-03-01  Torbjorn Granlund  <tege@gmplib.org>
2680
2681	* longlong.h (mips, powerpc): Provide assembly-free umul_ppmm for newer
2682	gcc.
2683
26842009-02-04  Torbjorn Granlund  <tege@gmplib.org>
2685
2686	* mpn/generic/redc_2.c: Remove code for testing and timing.  Update
2687	to current FSF header.
2688	* mpn/generic/redc_1.c: Update to current FSF header.
2689
26902009-01-21  Torbjorn Granlund  <tege@gmplib.org>
2691
2692	* mpz/powm.c (redc): Remove.
2693	(mpz_powm): Use mpn_redc_1 instead of redc.
2694
2695	* tests/mpz/t-powm.c: Rewrite reference code.
2696
26972009-01-18  Torbjorn Granlund  <tege@gmplib.org>
2698
2699	* tests/mpz: Increase reps for many tests.
2700
2701	* mpn/generic/rootrem.c (mpn_rootrem_internal): Use MPN_DECR_U instead of
2702	mpn_sub_1 (works around gcc 4.3 bugs and is also faster).
2703
27042009-01-16  Torbjorn Granlund  <tege@gmplib.org>
2705
2706	* tests/tests.h: Declare refmpn_divrem_2.
2707
27082009-01-15  Torbjorn Granlund  <tege@gmplib.org>
2709
2710	* mpz/perfpow.c: Add TMP_FREE before every return statement.
2711
2712	* mpn/generic/rootrem.c (mpn_rootrem_internal): Add a missing TMP_FREE.
2713
2714	* configure.in (gcc_cflags, gcc_64_cflags): Revert from -O3 to -O2,
2715	the change was accidental and cause too much miscompilation.
2716
27172009-01-14  Torbjorn Granlund  <tege@gmplib.org>
2718
2719	* tune/tuneup.c (tune_mod_1): Run MOD_1_x_THRESHOLD tests also when
2720	longlong.h specified UDIV_PREINV_ALWAYS.
2721
2722	* mpn/generic/mod_1.c (mpn_mod_1): Properly check for normalisation
2723	divisor.
2724
27252009-01-13  Torbjorn Granlund  <tege@gmplib.org>
2726
2727	* tune/tuneup.c (tune_mod_1): Tune for MOD_1_1_THRESHOLD,
2728	MOD_1_2_THRESHOLD, and MOD_1_4_THRESHOLD.
2729
2730	* mpn/generic/mod_1.c: Rewrite.
2731	* mpn/generic/mod_1_1.c: New file.
2732	* mpn/generic/mod_1_2.c: New file.
2733	* mpn/generic/mod_1_3.c: New file.
2734	* mpn/generic/mod_1_4.c: New file.
2735	* configure.in (gmp_mpn_functions): Add mod_1_*.
2736	* mpn/asm-defs.m4 (define_mpn): Add mod_1_*.
2737	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mod_1_*.c.
2738	* gmp-impl.h: Declare new mpn_mod_1s_* functions and associated
2739	THRESHOLD macros.
2740	(udiv_rnd_preinv): New macro.
2741
27422009-01-12  Torbjorn Granlund  <tege@gmplib.org>
2743
2744	* tune/tuneup.c (tune_gcd_dc,tune_gcdext_dc): Lower step_factor to 0.1.
2745
27462009-01-08  Torbjorn Granlund  <tege@gmplib.org>
2747
2748	* tests/mpz/t-nextprime.c: New test file.
2749	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-nextprime.
2750
2751	From Niels M�ller:
2752	* mpz/nextprime.c: Handle large prime gaps by limiting incr.
2753
27542009-01-04  Torbjorn Granlund  <tege@gmplib.org>
2755
2756	* mpz/and.c, mpz/ior.c, mpz/xor.c: Re-read only necessary source
2757	pointers after reallocation.  Misc cleanup.
2758
2759	* gmp-impl.h (MPN_TOOM44_MAX_N): New define, replaces MPN_TOOM3_MAX_N.
2760
2761	* mpn/x86/fat/diveby3.c: New file.
2762
27632008-12-30  Niels M�ller  <nisse@lysator.liu.se>
2764
2765	* doc/gmp.texi (Greatest Common Divisor Algorithms): Updated
2766	section on GCD algorithms.
2767
27682008-12-29  Torbjorn Granlund  <tege@gmplib.org>
2769
2770	* doc/gmp.texi (Multiplication Algorithms): Add descriptions of Toom-4
2771	and unbalanced multiplication.
2772	(Radix to Binary): Add warning that text is outdated,
2773	(Contributors): Fix typos.
2774
2775	* mpn/generic/toom*.c: Use coherent MAYBE_ macros for trimming
2776	unreachable recursive functions.
2777	* gmp-impl.h: Update toom itch functions.
2778
2779	* mpn/x86_64/sqr_basecase.asm: Slightly increase stack allocation, to
2780	placate tuneup.
2781
27822008-12-28  Torbjorn Granlund  <tege@gmplib.org>
2783
2784	* mpn/x86_64/pentium4/aors_n.asm: Tune prologue code.
2785
2786	* mpn/x86_64/pentium4/aorslsh1_n.asm: New file.
2787
2788	* mpn/x86_64/darwin.m4: Define symbol "DARWIN".
2789	* mpn/x86_64/invert_limb.asm: Work around darwin quirks.
2790
2791	* mpn/x86_64/sqr_basecase.asm: Further optimize, support Darwin.
2792
2793	* mpn/x86_64/invert_limb.asm: New file.
2794
27952008-12-27  Torbjorn Granlund  <tege@gmplib.org>
2796
2797	* mpn/x86_64/core2/aorslsh1_n.asm: New file.
2798
27992008-12-26  Torbjorn Granlund  <tege@gmplib.org>
2800
2801	* mpz/perfpow.c: Handle negative arguments properly.
2802	* tests/mpz/t-perfpow.c: New file.
2803	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-perfpow.
2804
28052008-12-23  Torbjorn Granlund  <tege@gmplib.org>
2806
2807	* tests/mpz/t-mul.c (dump_abort): Improve error message.
2808
2809	* gcd.c gcd_subdiv_step.c gcdext.c gcdext_subdiv_step.c:
2810	Remove private mpn_zero_p.
2811
2812	* tune/tuneup.c (tune_mul): Tune for MUL_TOOM44_THRESHOLD.
2813	(tune_sqr): Tune for SQR_TOOM4_THRESHOLD.
2814
2815	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom44_mul.c and
2816	toom4_sqr.c.
2817
2818	* configure.in (gmp_mpn_functions): Toom function updates.
2819
2820	* Rename mpn/mul_toomMN.c to mpn/toomMN_mul.c.  Function names changed
2821	accordingly.
2822
2823	* mpn/toomMN_mul.c: Add scratch parameter.  Do recursive multiplies
2824	properly.  Misc tuning.  Remove CHECK and TIMING code.
2825
2826	* mpn/toom2_sqr.c, mpn/toom3_sqr.c, mpn/toom4_sqr.c: New files.
2827
2828	* gmp-impl.h (mpn_toomMN_mul_itch): Several new functions.
2829	(mpn_zero_p): New functions.
2830	Add various TOOM4/TOOM44 related parameters.
2831	Update mpn_toomMN_mul prototypes.
2832
2833	* mpn/generic/mul_n.c (mpn_mul_n): Call mpn_toom44_mul.  Use TMP_BALLOC
2834	instead of malloc.
2835	(mpn_sqr_n): Analogous changes.
2836
2837	* mpn/generic/mul.c: Update unbalanced toom code to pass scratch space.
2838
28392008-12-21  Torbjorn Granlund  <tege@gmplib.org>
2840
2841	* mpz/nextprime.c: Add TMP_SDECL/MARK/FREE.
2842
28432008-12-20  Torbjorn Granlund  <tege@gmplib.org>
2844
2845	* mpn/generic/sqrtrem.c (mpn_sqrtrem1): Rewrite, improve interface.
2846	(invsqrttab): New table, remove table approx_tab.
2847	(mpn_sqrtrem2): Optimize, update mpn_sqrtrem1 call.
2848	(mpn_sqrtrem): Update mpn_sqrtrem1 call.
2849
28502008-12-18  Torbjorn Granlund  <tege@gmplib.org>
2851
2852	* mpz/nextprime.c: Run 10 mpz_millerrabin tests (was 5).
2853	Give credit to authors.
2854
2855	* mpn/x86_64/redc_1.asm: Align stack as mandated by ABI.
2856
2857	* mpn/x86_64/divrem_2.asm: Add some comments.
2858
2859	* mpn/x86_64/darwin.m4: New file.
2860	* configure.in: Use x86_64/darwin.m4.
2861
28622008-12-15  Torbjorn Granlund  <tege@gmplib.org>
2863
2864	* doc/projects.html: Remove GCD and division projects, update text on
2865	multiplication.
2866
2867	* doc/tasks.html: Add a caution about that the file is somewhat
2868	outdated.
2869
28702008-12-14  Torbjorn Granlund  <tege@gmplib.org>
2871
2872	* mpn/alpha/ev6/aorsmul_1.asm: New file (same code for mpn_addmul_1,
2873	much improved for mpn_submul_1).
2874	* mpn/alpha/ev6/addmul_1: File removed.
2875	* mpn/alpha/ev6/submul_1: File removed.
2876
28772008-12-09  Torbjorn Granlund  <tege@gmplib.org>
2878
2879	From David Harvey:
2880	* mpn/x86_64/mul_basecase.asm: Further tweaks for code size and speed.
2881
2882	* mpn/powerpc64/mode64/divrem_1.asm: Rewrite.
2883
2884	* mpn/powerpc64/mode64/mul_basecase.asm: New file.
2885
28862008-12-08  Torbjorn Granlund  <tege@gmplib.org>
2887
2888	* mpn/powerpc64/mode64/gmp-mparam.h: New file.
2889
2890	* gmp-impl.h: Additional cleanups.
2891	(mpn_set_str_compute_powtab): New prototype.
2892	(mpn_powm, mpn_powlo): New prototypes.
2893
2894	* mpz/pow_ui.c: Handle some small exponents locally.
2895
28962008-12-07  Torbjorn Granlund  <tege@gmplib.org>
2897
2898	* mpn/generic/set_str.c: Remove prototypes (they are in gmp-impl.h).
2899
2900	* tune/set_strs.c, tune/set_strb.c: Make prototypes effective by moving
2901	the #define mpn_set_str* before including gmp-impl.h.
2902
2903	* All files: Change _PROTO => __GMP_PROTO.
2904
2905	* tune/speed.c (routine): Remove non-working choice mpn_set_str_subquad.
2906	* tune/common.c (speed_mpn_dc_set_str): Remove, it is broken.
2907
2908	* mpn/generic/toom_interpolate_7pts.c (divexact_2exp): Make this static,
2909	and inline it.
2910
2911	* gmp-impl.h: Major cleanup.
2912	(Remove formal parameter names.  Use __GMP_PROTO consistently.  Move
2913	__GMP_PROTO and __MPN use to adjacent lines for declared function.
2914	Fix typos.  Remove code inside #if 0.)
2915
2916	* configure.in (gmp_mpn_functions): Add mul_toom33.  Reformat.
2917
29182008-12-05  Torbjorn Granlund  <tege@gmplib.org>
2919
2920	* mpn/generic/redc_1.c: New file.
2921	* mpn/generic/redc_2.c: New file.
2922
2923	* configure.in (gmp_mpn_functions): List redc_1 and redc_2.
2924	(HAVE_NATIVE): Likewise.
2925
2926	* tune/common.c (speed_mpn_redc_1): Renamed from speed_redc.
2927	* tune/speed.c (routine): Remove "redc", and "mpn_redc_1".
2928	* tune/speed.h (SPEED_ROUTINE_REDC_1): Renamed from SPEED_ROUTINE_REDC.
2929	Updated call.
2930	* tune/tuneup.c (tune_powm): Update redc call.
2931
29322008-12-04  Torbjorn Granlund  <tege@gmplib.org>
2933
2934	* mpn/x86_64/sqr_basecase.asm: Inline a combined diagonal product code
2935	and addlsh1 loop.  Misc cleanup.
2936
29372008-12-02  Torbjorn Granlund  <tege@gmplib.org>
2938
2939	* mpn/x86_64/sqr_basecase.asm: New file.
2940
29412008-11-30  Torbjorn Granlund  <tege@gmplib.org>
2942
2943	* mpn/generic/sqr_basecase.c: Fix typo in mpn_addmul_2s variant.
2944
29452008-11-28  Torbjorn Granlund  <tege@gmplib.org>
2946
2947	* mpn/x86_64/redc_1.asm: Rewrite.
2948
29492008-11-27  Torbjorn Granlund  <tege@gmplib.org>
2950
2951	* tests/refmpn.c (refmpn_redc_1): New function.
2952
29532008-11-25  Torbjorn Granlund  <tege@gmplib.org>
2954
2955	* mpn/x86/k7/aorsmul_1.asm: Actually handle mpn_submul_1.
2956
29572008-11-23  Torbjorn Granlund  <tege@gmplib.org>
2958
2959	* mpn/x86_64/divrem_1.asm: Rewrite.
2960
2961	* alpha/divrem_2.asm: New file.
2962	* powerpc32/divrem_2.asm: New file.
2963	* powerpc64/mode64/divrem_2.asm: New file.
2964	* x86/divrem_2.asm: New file.
2965	* x86_64/divrem_2.asm: New file.
2966	* tests/refmpn.c (refmpn_divrem_2): New function.
2967
29682008-11-22  Torbjorn Granlund  <tege@gmplib.org>
2969
2970	* mpn/x86/k7/mul_1.asm: Rewrite for smaller size and better speed.
2971	* mpn/x86/k7/aorsmul_1.asm: Likewise.
2972
2973	* acinclude.m4 (GMP_VERSION): Include last component even when zero.
2974
29752008-11-21  Torbjorn Granlund  <tege@gmplib.org>
2976
2977	* mpn/x86_64/README: Rewrite.
2978
2979	* tests/devel/try.c (malloc_region, mprotect_maybe): Add casts for
2980	printf type correctness.
2981
2982	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump.
2983
2984	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
2985	Bump version info.
2986
29872008-11-20  Torbjorn Granlund  <tege@gmplib.org>
2988
2989	* gmp-impl.h: Rename modlimb_invert to binvert_limb.
2990	* tune/speed.h: Likewise.
2991	* tune/modlinv.c: Likewise.
2992	* tune/common.c: Likewise.
2993	* tests/t-modlinv.c: Likewise.
2994	* tests/t-constants.c: Likewise.
2995	* mpn/sparc64/mode1o.c: Likewise.
2996	* mpn/alpha/dive_1.c: Likewise.
2997	* mpn/sparc64/dive_1.c: Likewise.
2998	* mpn/generic/mode1o.c: Likewise.
2999	* mpn/generic/dive_1.c: Likewise.
3000	* mpn/generic/bdivmod.c: Likewise.
3001	* mpn/alpha/mode1o.asm: Likewise.
3002	* mpn/asm-defs.m4: Likewise.
3003	* mpn/ia64/mode1o.asm: Likewise.
3004	* mpn/powerpc32/README: Likewise.
3005	* mpn/powerpc32/mode1o.asm: Likewise.
3006	* mpn/powerpc64/mode64/dive_1.asm: Likewise.
3007	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
3008	* mpn/x86/dive_1.asm: Likewise.
3009	* mpn/x86/k6/mmx/dive_1.asm: Likewise.
3010	* mpn/x86/k6/mode1o.asm: Likewise.
3011	* mpn/x86/k7/dive_1.asm: Likewise.
3012	* mpn/x86/k7/mode1o.asm: Likewise.
3013	* mpn/x86/p6/dive_1.asm: Likewise.
3014	* mpn/x86/p6/mode1o.asm: Likewise.
3015	* mpn/x86/pentium/dive_1.asm: Likewise.
3016	* mpn/x86/pentium/mode1o.asm: Likewise.
3017	* mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
3018	* mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
3019	* mpn/x86_64/dive_1.asm: Likewise.
3020	* mpn/x86_64/mode1o.asm: Likewise.
3021
3022	* mpn/x86_64/aors_n.asm: Replace with slightly faster, more alignment
3023	neutral loop.
3024
30252008-11-18  Torbjorn Granlund  <tege@gmplib.org>
3026
3027	* configure.in: Remove gcd_finda related declarations.
3028	* gmp-impl.h (mpn_gcd_finda): Remove declaration.
3029	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Remove gcd_finda.
3030	* mpn/asm-defs.m4: Remove define_mpn(gcd_finda).
3031	* mpn/x86/k6/gcd_finda.asm: Remove file.
3032	* tests/devel/try.c (param_init): Remove mpn_gcd_finda.
3033	(choice_array): Remove mpn_gcd_finda.
3034	* tests/mpn/t-instrument.c (check): Remove testing of mpn_gcd_finda.
3035	* tests/refmpn.c (refmpn_gcd_finda): Remove.
3036	* tests/tests.h (refmpn_gcd_finda): Remove declaration.
3037	* tune/common.c (speed_mpn_gcd_finda): Remove.
3038	* tune/gcd_finda_gen.c: Remove file.
3039	* tune/speed.h (speed_mpn_gcd_finda): Remove declaration.
3040	* tune/speed.c (routine): Remove mpn_gcd_finda entry.
3041
3042	* tests/mpz/t-powm.c: Print test number when failing a test.
3043
3044	* mpn/x86_64/redc_1.asm (CALL): Move from here...
3045	* mpn/x86_64/x86_64-defs.m4: ...to here.
3046
3047	* gmp-impl.h (mpn_jacobi_base): Remove parameter names.
3048
30492008-11-11  Torbjorn Granlund  <tege@gmplib.org>
3050
3051	* tests/mpf/t-conv.c: Add some specific tests, supplementing the random
3052	tests.
3053
30542008-11-09  Torbjorn Granlund  <tege@gmplib.org>
3055
3056	* mpf/set_str.c: Default 'base' before letting exp_base inherit it.
3057
3058	* tests/cxx/t-prec.cc: Use the right precision for all float constants.
3059
30602008-11-08  Torbjorn Granlund  <tege@gmplib.org>
3061
3062	* doc/gmp.texi (Float Comparison): Update mpf_eq documentation.
3063
3064	* mpf/eq.c: Compare the right number of bits.
3065
30662008-11-02  Torbjorn Granlund  <tege@gmplib.org>
3067
3068	Undo, it made testing too slow:
3069	* tests/mpz/t-mul.c: Use slower geometric progression for operand
3070	sizes.
3071
3072	* mpn/x86/k7/mod_34lsub1.asm: Use movzb for masking low 8 bits.
3073
30742008-10-31  Niels M�ller  <nisse@lysator.liu.se>
3075
3076	* mpn/generic/hgcd2.c (div1): New function (taken from old gcdext
3077	implementation)
3078	(mpn_hgcd2): Use single precision for the second half of the work.
3079
30802008-10-30  Torbjorn Granlund  <tege@gmplib.org>
3081
3082	* mpn/x86/p6/sse2/gmp-mparam.h: New file.
3083
30842008-10-29  Torbjorn Granlund  <tege@gmplib.org>
3085
3086	* configure.in (x86 fat_path): Add "x86/p6/sse2".
3087
3088	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Recognize sse2 capable p6
3089	(pentiumm, core2).
3090
3091	* mpn/x86/p6/sse2/mul_1.asm: New file.
3092	* mpn/x86/p6/sse2/addmul_1.asm: New file.
3093	* mpn/x86/p6/sse2/submul_1.asm: New file.
3094	* mpn/x86/p6/sse2/mul_basecase.asm: New file.
3095	* mpn/x86/p6/sse2/sqr_basecase.asm: New file.
3096	* mpn/x86/p6/sse2/popcount.asm: New file.
3097
3098	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Handle "extended" fields for
3099	model and family.
3100
31012008-10-28  Torbjorn Granlund  <tege@gmplib.org>
3102
3103	From Mickael Gastineau:
3104	* gmp-h.in (gmp_urandomm_ui, gmp_urandomb_ui): Add __GMP_DECLSPEC.
3105
31062008-10-27  Torbjorn Granlund  <tege@gmplib.org>
3107
3108	* gmp-h.in (mpn_gcdext_1): Remove bogus __GMP_ATTRIBUTE_PURE.
3109
31102008-10-27  Niels M�ller  <nisse@lysator.liu.se>
3111
3112	* tune/common.c (speed_mpn_hgcd): Call mpn_hgcd_matrix_init once
3113	for each call to mpn_hgcd.
3114	(speed_mpn_hgcd_lehmer): Likewise.
3115
31162008-10-26  Torbjorn Granlund  <tege@gmplib.org>
3117
3118	* configure.in: Point to p6/sse2 for pentiumm and core2.
3119
3120	* gmp-impl.h (mpn_add_nc, mpn_sub_nc): Move these macros to after fat
3121	definitions.
3122
3123	* tune/common.c, tune/speed.c, tune/speed.h:
3124	Add speed measurement of mpn_bdiv_dbm1c.
3125
31262008-10-24  Torbjorn Granlund  <tege@gmplib.org>
3127
3128	* mpn/x86_64/gmp-mparam.h (MUL_FFT_TABLE2, SQR_FFT_TABLE2): Extend.
3129
3130	* mpz/nextprime.c: Move declarations to function beginning.
3131
31322008-10-23  Niels M�ller  <nisse@lysator.liu.se>
3133
3134	* gmp-impl.h (DECL_gcdext_1): Deleted.
3135
31362008-10-22  Torbjorn Granlund  <tege@gmplib.org>
3137
3138	* mpn/x86_64/atom/aors_n.asm: New file.
3139	* mpn/x86_64/atom/gmp-mparam.h: New file.
3140
31412008-10-21  Torbjorn Granlund  <tege@gmplib.org>
3142
3143	With Neils M�ller:
3144	* mpz/nextprime.c: Rewrite.
3145
3146	* tests/devel/try.c (main): Use strtol for 's' and 'S' optargs.
3147
3148	* mpn/x86_64/pentium4/rshift.asm: Misc cleanups.
3149	* mpn/x86_64/pentium4/lshift.asm: Likewise.
3150
3151	* mpn/x86_64/pentium4/aors_n.asm: Use fewer registers.
3152
3153	* configure.in: Set up specific path for x86_64/atom.
3154
31552008-10-21  Niels M�ller  <nisse@lysator.liu.se>
3156
3157	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Removed
3158	qstack.c.
3159	* mpn/generic/qstack.c: Deleted obsolete file.
3160
31612008-10-20  Torbjorn Granlund  <tege@gmplib.org>
3162
3163	* mpn/x86_64/core2/aorsmul_1.asm: New file.
3164
31652008-10-19  Torbjorn Granlund  <tege@gmplib.org>
3166
3167	* mpn/x86_64/aors_n.asm: Remove redundant MULFUNC_PROLOGUE.
3168
3169	* gmp-impl.h (popc_limb): Remove redundant checks of GMP_LIMB_BITS
3170	inside several of these macros.
3171
31722008-10-17  Torbjorn Granlund  <tege@gmplib.org>
3173
3174	* tests/mpz/t-mul.c: Use slower geometric progression for operand
3175	sizes.  Do every other tests for same size operands.
3176
31772008-10-15  Torbjorn Granlund  <tege@gmplib.org>
3178
3179	* mpn/x86_64/mul_basecase.asm: Simplify addressing in epilogue.
3180
3181	* mpn/mips64/divrem_1.asm: Remove file, it is n32-only, and uses an old
3182	algorithm.
3183
3184	* config.guess, config.sub, configure.in: Support Intel Atom processor.
3185
31862008-10-10  Torbjorn Granlund  <tege@gmplib.org>
3187
3188	* mpq/mul.c: Fix typo in last change.
3189
31902008-10-09  Torbjorn Granlund  <tege@gmplib.org>
3191
3192	* tests/refmpn.c (refmpn_sb_divrem_mn): Work around a gcc bug.
3193
31942008-10-08  Torbjorn Granlund  <tege@gmplib.org>
3195
3196	* mpq/mul.c: Use TMP_ALLOC.  Cleanup.
3197	* mpq/div.c: Likewise.
3198
3199	* mpn/x86_64/mul_basecase.asm: Use lea directly for loading entry point
3200	addresses.
3201
32022008-10-09  Niels M�ller  <nisse@lysator.liu.se>
3203
3204	* mpn/x86/k7/gmp-mparam.h: Updated GCD-related values.
3205
32062008-10-05  Torbjorn Granlund  <tege@gmplib.org>
3207
3208	* mpn/generic/mul_fft.c (mpn_mul_fft_internal): Do store
3209	mpn_fft_norm_modF return value, if (rec).
3210
32112008-10-04  Torbjorn Granlund  <tege@gmplib.org>
3212
3213	* mpn/x86_64/aorsmul_1.asm: Replace with faster code.
3214	* mpn/x86_64/mul_1.asm: Likewise.
3215	* mpn/x86_64/addmul_2.asm: Likewise.
3216	* mpn/x86_64/mul_2.asm: Likewise.
3217	* mpn/x86_64/mul_basecase.asm: Likewise.
3218
32192008-10-02  Torbjorn Granlund  <tege@gmplib.org>
3220
3221	* mpn/minithres/gmp-mparam.h: Update FFT values.
3222
32232008-10-02  Niels M�ller  <nisse@lysator.liu.se>
3224
3225	* hgcd.c (mpn_hgcd_matrix_mul): Fixed normalization bug.
3226
32272008-09-24  Torbjorn Granlund  <tege@gmplib.org>
3228
3229	* configure.in: Handle --enable-minithres.
3230	* mpn/minithres/gmp-mparam.h: Update all values.
3231
32322008-09-22  Torbjorn Granlund  <tege@gmplib.org>
3233
3234	* tune/speed.c (routine): New entry for mpn_mul.
3235	* tune/speed.h (SPEED_ROUTINE_MPN_MUL): Renamed from
3236	SPEED_ROUTINE_MPN_MUL_BASECASE.
3237	(speed_mpn_mul): Renamed from speed_mpn_mul_basecase.
3238	(SPEED_ROUTINE_MPN_MUL): Allocate our own memory of xp operand.
3239
3240	* tune/common.c: Corresponding changes.
3241
32422008-09-22  Niels M�ller  <nisse@lysator.liu.se>
3243
3244	* mpn/generic/gcdext.c (hgcd_mul_matrix_vector): New function,
3245	replaces addmul2_n. Needs less copying.
3246	(mpn_gcdext): Use hgcd_mul_matrix_vector. Updated for interface
3247	change in mpn_gcdext_subdiv_step
3248
3249	* mpn/generic/hgcd.c (hgcd_matrix_mul_1): Rewritten to use
3250	mpn_hgcd_mul_matrix1_vector.
3251	(hgcd_step): Updated for interface change in
3252	mpn_hgcd_mul_matrix1_inverse_vector.
3253
3254	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for
3255	interface changes in mpn_hgcd_mul_matrix1_vector,
3256	mpn_hgcd_mul_matrix1_inverse_vector and mpn_gcdext_subdiv_step.
3257
3258	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Updated for
3259	interface change in mpn_hgcd_mul_matrix1_inverse_vector.
3260
3261	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): Use
3262	separate scratch arguments for the quotient and for the cofactor
3263	update.
3264
3265	* mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Interface
3266	change. Store first element in rp and leave ap unmodified. No
3267	additional scratch space or copying needed. Callers that require
3268	modification in place still need to copy one of the inputs.
3269	(mpn_hgcd_mul_matrix1_inverse_vector): Likewise.
3270
32712008-09-22  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3272
3273	* mpn/generic/hgcd.c (hgcd_matrix_mul_1): Use mpn_addaddmul_1msb0.
3274	* mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_vector): Likewise.
3275
3276	* mpn/generic/gcd.c: Use libspeed for timing measurements.
3277
3278	* gmp-impl.h: Declare mpn_addaddmul_1msb0.
3279	* mpn/asm-defs.m4: Added addaddmul_1msb0.
3280	* mpn/x86_64/addaddmul_1msb0.asm: New file.
3281	* configure.in (gmp_mpn_functions_optional): Added
3282	addaddmul_1msb0.
3283	(HAVE_NATIVE): List addaddmul_1msb0.
3284
32852008-09-21  Torbjorn Granlund  <tege@gmplib.org>
3286
3287	* mpn/generic/get_str.c (GET_STR_DC_THRESHOLD): Remove default.
3288	(GET_STR_PRECOMPUTE_THRESHOLD): Likewise.
3289	Misc code cleanups.
3290
3291	* gmp-impl.h (mpn_dc_set_str_itch): Allocate GMP_LIMB_BITS more limbs.
3292
3293	Revert:
3294	* mpn/generic/set_str.c:
3295	(mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
3296
32972008-09-18  Torbjorn Granlund  <tege@gmplib.org>
3298
3299	* mpn/alpha/ev6/gmp-mparam.h (DIVEXACT_BY3_METHOD): Define.
3300
3301	* mpn/ia64/diveby3.asm: Remove.
3302	* mpn/x86/diveby3.asm: Remove.
3303	* mpn/x86/k6/diveby3.asm: Remove.
3304	* mpn/x86/k7/diveby3.asm: Remove.
3305	* mpn/x86/p6/diveby3.asm: Remove.
3306	* mpn/x86/pentium/diveby3.asm: Remove.
3307	* mpn/x86_64/diveby3.asm: Remove.
3308	* mpn/x86/pentium4/sse2/diveby3.asm: Remove.
3309
3310	* configure.in (HAVE_NATIVE): List divexact_by3c.
3311
3312	* gmp-impl.h (mpn_divexact_by3c): Override gmp-h.in's definition.
3313	(DIVEXACT_BY3_METHOD): Don't default to 0 if
3314	HAVE_NATIVE_mpn_divexact_by3c.
3315
33162008-09-18  Niels M�ller  <nisse@lysator.liu.se>
3317
3318	* mpn/generic/gcd.c (main): Added code for tuning of CHOOSE_P.
3319
3320	* mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Assert that inputs are
3321	normalized.
3322
33232008-09-17  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3324
3325	* mpn/generic/gcdext.c (mpn_gcdext): p = n/5 caused a
3326	slowdown for large inputs. As a compromise, use p = n/2 for the
3327	first iteration, and p = n/3 for the rest. Handle the first
3328	iteration specially, since the initial u0 and u1 are trivial.
3329
3330	* mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
3331	from 409 to 390.
3332
3333	* mpn/generic/gcdext.c (CHOOSE_P): New macro. Use p = n/5.
3334	(mpn_gcdext): Use CHOOSE_P, and generalized the calculation of
3335	scratch space.
3336
3337	* tune/tuneup.c (tune_hgcd): Use default step factor.
3338
3339	* mpn/x86_64/gmp-mparam.h: (GCD_DC_THRESHOLD): Reduced from 493 to
3340	412.
3341
3342	* mpn/generic/gcd.c (CHOOSE_P): New macro, to determine the
3343	split when calling hgcd. Use p = 2n/3, as that seems better than
3344	the more obvious split p = n/2.
3345	(mpn_gcd): Use CHOOSE_P, and generalized the calculation of
3346	scratch space.
3347
33482008-09-16  Torbjorn Granlund  <tege@gmplib.org>
3349
3350	* mpn/generic/toom_interpolate_7pts.c: Use new mpn_divexact_byN
3351	functions.
3352
3353	* gmp-impl.h (mpn_divexact_by3, mpn_divexact_by5, mpn_divexact_by7,
3354	mpn_divexact_by9, mpn_divexact_by11, mpn_divexact_by13,
3355	mpn_divexact_by15): New macros, defined in terms of mpn_bdiv_dbm1.
3356
3357	* configure.in (gmp_mpn_functions): List bdiv_dbm1c.
3358	(HAVE_NATIVE): Likewise.
3359	* mpn/asm-defs.m4: Define bdiv_dbm1c.
3360	* gmp-impl.h (mpn_bdiv_dbm1c): Declare.
3361	(mpn_bdiv_dbm1): New macro.
3362	* mpn/generic/bdiv_dbm1c.c: New file.
3363	* mpn/alpha/bdiv_dbm1c.asm: New file.
3364	* mpn/ia64/bdiv_dbm1c.asm: New file.
3365	* mpn/powerpc32/bdiv_dbm1c.asm: New file.
3366	* mpn/powerpc64/mode64/bdiv_dbm1c.asm: New file.
3367	* mpn/x86/bdiv_dbm1c.asm: New file.
3368	* mpn/x86_64/bdiv_dbm1c.asm: New file.
3369
3370	* mpn/generic/diveby3.c: Add mpn_bdiv_dbm1c based function.
3371	Choose function depending on DIVEXACT_BY3_METHOD.
3372	* gmp-impl.h (DIVEXACT_BY3_METHOD): Provide default.
3373
33742008-09-16  Niels M�ller  <nisse@lysator.liu.se>
3375
3376	* mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Moved function to
3377	gcdext.c, where it is used.
3378	* mpn/generic/gcdext.c (addmul2_n): Moved and renamed, was
3379	mpn_hgcd_addmul2_n. Made static. Deleted input normalization.
3380	Deleted rn argument.
3381	(mpn_gcdext): Updated calls to addmul2_n, and added assertions.
3382
3383	* gmp-impl.h (MPN_HGCD_MATRIX_INIT_ITCH): Increased storage by four limbs.
3384	(MPN_HGCD_LEHMER_ITCH): Reduced storage by one limb.
3385	(MPN_GCD_SUBDIV_STEP_ITCH): Likewise.
3386	(MPN_GCD_LEHMER_N_ITCH): Likewise.
3387
3388	* mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Use two extra limbs.
3389	(hgcd_step): Use overlapping arguments to mpn_tdiv_qr.
3390	(mpn_hgcd_matrix_mul): Deleted normalization code. Tigher bounds
3391	for the element size of the product. Needs two extra limbs of
3392	storage for the elements.
3393	(mpn_hgcd_itch): Updated storage calculation.
3394
3395	* mpn/generic/gcd_subdiv_step.c (mpn_gcd_subdiv_step): Use
3396	overlapping arguments to mpn_tdiv_qr. Use mpn_zero_p.
3397
3398	* mpn/generic/gcd.c (mpn_gcd): Use mpn_zero_p.
3399
34002008-09-15  Niels M�ller  <nisse@lysator.liu.se>
3401
3402	* mpn/generic/hgcd.c (mpn_hgcd_matrix_init): Updated for deleted
3403	tp pointer.
3404	(hgcd_matrix_update_q): Likewise.
3405	(mpn_hgcd_matrix_mul): Likewise.
3406	(mpn_hgcd_itch): Updated calculation of scratch space.
3407
3408	* gmp-impl.h (struct hgcd_matrix): Deleted tp pointer.
3409	(MPN_HGCD_MATRIX_INIT_ITCH): Reduced storage.
3410	(mpn_hgcd_step, MPN_HGCD_STEP_ITCH): Deleted declarations.
3411
34122008-09-15  Niels M�ller <nisse@lysator.liu.se>  <nisse@king.swox.se>
3413
3414	* mpn/x86_64/gmp-mparam.h (MATRIX22_STRASSEN_THRESHOLD): New
3415	threshold.
3416
3417	* mpn/generic/hgcd.c (mpn_hgcd_matrix_mul): Use mpn_matrix22_mul.
3418	(mpn_hgcd_itch): Updated calculation of scratch space. Use
3419	count_leading_zeros to get the recursion depth.
3420
3421	* mpn/generic/gcd.c (mpn_gcd): Fixed calculation of scratch space,
3422	and use mpn_hgcd_itch.
3423
34242008-09-15  Niels M�ller  <nisse@lysator.liu.se>
3425
3426	* tune/tuneup.c (tune_matrix22_mul): New function.
3427	(all): Use it.
3428
3429	* tune/common.c (speed_mpn_matrix22_mul): New function.
3430
3431	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Added matrix22_mul.c.
3432
3433	* tests/mpn/t-matrix22.c: Use MATRIX22_STRASSEN_THRESHOLD to
3434	select sizes for tests.
3435
3436	* gmp-impl.h (MATRIX22_STRASSEN_THRESHOLD): New threshold
3437
3438	* configure.in (gmp_mpn_functions): Added matrix22_mul.
3439	* gmp-impl.h: Added declarations for mpn_matrix22_mul and related
3440	functions.
3441
3442	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added
3443	matrix22_mul.c.
3444	* tests/mpn/Makefile.am (check_PROGRAMS): Added t-matrix22.
3445
3446	* tests/mpn/t-matrix22.c: New file.
3447	* mpn/generic/matrix22_mul.c: New file.
3448
34492008-09-11  Niels M�ller  <nisse@king.swox.se>
3450
3451	* tune/tuneup.c: Updated tuning of gcdext.
3452
3453	* mpn/x86_64/gmp-mparam.h (GCDEXT_DC_THRESHOLD): Reduced threshold
3454	from 713 to 409.
3455
34562008-09-11  Niels M�ller  <nisse@lysator.liu.se>
3457
3458	* gmp-impl.h: Updated for gcdext changes.
3459	(GCDEXT_DC_THRESHOLD): New constant, renamed from
3460	GCDEXT_SCHOENHAGE_THRESHOLD.
3461
3462	* mpn/generic/gcdext.c (compute_v): Accept non-normalized a and b
3463	as inputs.
3464	(mpn_gcdext): Rewrote and simplified. Now uses the new mpn_hgcd
3465	interface.
3466
3467	* mpn/generic/hgcd.c (mpn_hgcd_addmul2_n): Renamed from addmul2_n
3468	and made non-static. Changed interface to take non-normalized
3469	inputs, and only two size arguments.
3470	(mpn_hgcd_matrix_mul): Simplified using new mpn_hgcd_addmul2_n.
3471
3472	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): Deleted
3473	function.
3474	(mpn_gcdext_lehmer_n): Renamed from mpn_gcd_lehmer. Now takes
3475	inputs of equal size. Moved the code for the division step to a
3476	separate function...
3477	* mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): New
3478	file, new function.
3479
3480	* configure.in (gmp_mpn_functions): Added gcdext_subdiv_step.
3481
34822008-09-10  Torbjorn Granlund  <tege@gmplib.org>
3483
3484	* tests/devel/anymul_1.c: Include <string.h>.
3485
3486	* gmp-h.in: Unconditionally include <cstdio>.
3487
34882008-09-10  Niels M�ller  <nisse@lysator.liu.se>
3489
3490	* tune/common.c: #if:ed out speed_mpn_gcd_binary and
3491	speed_mpn_gcd_accel.
3492	* tune/speed.c (routine): #if:ed out mpn_gcd_binary, mpn_gcd_accel
3493	and find_a.
3494	* tune/Makefile.am (libspeed_la_SOURCES): Removed gcd_bin.c
3495	gcd_accel.c gcd_finda_gen.c.
3496	* tune/tuneup.c: Enable tuning of GCD_DC_THRESHOLD.
3497
3498	* mpn/generic/gcd.c (mpn_gcd): Rewrote and simplified. Now uses
3499	the new mpn_hgcd interface.
3500
3501	* */gmp-mparam.h: Renamed GCD_SCHOENHAGE_THRESHOLD to
3502	GCD_DC_THRESHOLD.
3503
3504	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Renamed (was
3505	mpn_gcd_lehmer). Now takes inputs of equal size.
3506
3507	* mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer): Reintroduced gcd_2,
3508	to get better performance for small inputs.
3509
3510	* mpn/generic/hgcd.c: Don't hardcode small HGCD_THRESHOLD.
3511	* mpn/x86_64/gmp-mparam.h (HGCD_THRESHOLD): Reduced from 145 to
3512	120.
3513	* */gmp-mparam.h: Renamed HGCD_SCHOENHAGE_THRESHOLD to
3514	HGCD_THRESHOLD.
3515
35162008-09-09  Torbjorn Granlund  <tege@gmplib.org>
3517
3518	* doc/gmp.texi: Fix a typo and clarify mpn_gcdext docs.
3519
35202008-09-09  Niels M�ller  <nisse@lysator.liu.se>
3521
3522	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Adapted
3523	to new hgcd interface.
3524
3525	* gmp-impl.h (MPN_HGCD_LEHMER_ITCH): New macro.
3526
3527	* hgcd.c (mpn_hgcd_lehmer): Renamed function, from hgcd_base. Made
3528	non-static.
3529
3530	* gcd_lehmer.c (mpn_gcd_lehmer): Use hgcd2 also for n == 2.
3531
3532	* gcdext_lehmer.c (mpn_gcdext_lehmer): Simplified code for
3533	division step. Added proper book-keeping of swaps, which affect
3534	the sign of the returned cofactor.
3535
3536	* tests/mpz/t-gcd.c (one_test): Display co-factor when mpn_gcdext
3537	fails.
3538
3539	* gcd_lehmer.c (mpn_gcd_lehmer): At end of loop, need to handle
3540	the special case n == 1 correctly.
3541
3542	* gcd_subdiv_step.c (mpn_gcd_subdiv_step): Simplified function.
3543	The special cancellation logic is not needed here.
3544
35452008-09-08  Torbjorn Granlund  <tege@gmplib.org>
3546
3547	* mpn/generic/invert.c: Add working but slow code.
3548
3549	* mpn/x86_64/x86_64-defs.m4 (R32, R8): New macros.
3550
3551	* mpn/ia64/submul_1.asm: Move some labels for broader assembler
3552	compatibility.
3553
3554	* gmp-impl.h (mpn_mul_3, mpn_mul_4): Declare.
3555	* tests/tests.h (refmpn_mul_3, refmpn_mul_4): Declare.
3556	* tests/try.c (param_init): Set things up for mpn_mul_3 and mpn_mul_4.
3557	(choice_array): Likewise.
3558	(call): Likewise.
3559	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES):
3560	Add mul_3.c and mul_4.
3561	* mpn/asm-defs.m4: Define mul_3 and mul_4.
3562	* tests/refmpn.c (refmpn_mul_N): New function.
3563	(refmpn_mul_2): Remove old definition, call refmpn_mul_N.
3564	(refmpn_mul_3, refmpn_mul_4): New functions.
3565	* tune/common.c (speed_mpn_mul_3, speed_mpn_mul_4): New functions.
3566	* tune/speed.h (speed_mpn_mul_3, speed_mpn_mul_4): Declare.
3567	* tune/speed.c (routine): New entries for mpn_mul_2 and mpn_mul_3.
3568
3569	* ltmain.sh: Update to libtool 1.5.24.
3570
3571	* mpn/generic/mul_toom22.c: Compute s and t more cleverly.
3572
35732008-09-08  Niels M�ller  <nisse@lysator.liu.se>
3574
3575	* tests/mpn/t-hgcd.c: Updated tests. Rewrite of hgcd_ref.
3576
3577	* mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_itch): New function.
3578	(mpn_gcdext_lehmer): Various bugfixes.
3579
3580	* gcdext.c (mpn_gcdext): Allocate scratch space for gcdext_lehmer.
3581
3582	* mpn/generic/gcd_lehmer.c (gcd_2): ASSERT that inputs are odd.
3583	(mpn_gcd_lehmer): Added tp argument, for scratch space. Make both
3584	arguments odd before calling gcd_2.
3585
3586	* mpn/generic/hgcd.c (mpn_hgcd): Allow the trivial case n <= 2,
3587	and return 0 immediately.
3588
3589	* gmp-impl.h (MPN_EXTRACT_NUMB): New macro.
3590
3591	* configure.in (gmp_mpn_functions): Added gcdext_lehmer.
3592
35932008-09-05  Torbjorn Granlund  <tege@gmplib.org>
3594
3595	* mpn/generic/toom_interpolate_7pts.c: Use mpn_divexact_by3c instead of
3596	divexact_odd.
3597
3598	* doc/texinfo.tex: Update to 2007-06-29.13.
3599
3600	* doc/gmp.texi: Update GMP site URL.  Fix some typos.
3601
3602	* demos/pexpr.c (main): Allow bases up to 62.
3603
3604	* gmp-impl.h: Remove formal parameter names from function prototypes.
3605
3606	* config.guess: Recognize recent AMD and Itanium CPUs.
3607	Default X86 CPU recognition to configfsf.guess' value.
3608
3609	* configure.in: Handle core2 separately from athlon64.
3610
36112008-09-05  Niels M�ller  <nisse@lysator.liu.se>
3612
3613	* */Makefile.in, configure, aclocal.m4, config.in: Removed files
3614	from repository. They're instead generated by automake and
3615	autoconf before distribution.
3616
36172008-08-25  Torbjorn Granlund  <tege@gmplib.org>
3618
3619	* mpf/set_str.c: Allocate mantissa space based on mantissa size,
3620	not on destination variable space.
3621	* mpf/set_str.c: Accept unary plus before exponent.
3622
36232008-08-06  Torbjorn Granlund  <tege@gmplib.org>
3624
3625	* mpn/generic/mul_toom22.c: Add statistics gathering functionality,
3626	triggered by cpp predef STAT.
3627
3628	From David Harvey:
3629	* mpn/generic/mul_toom22.c: Decrease scratch space usage.
3630
36312008-08-02  Torbjorn Granlund  <tege@gmplib.org>
3632
3633	* tests/misc/t-scanf.c: Avoid negative arguments to _ui functions.
3634	* tests/misc/t-printf.c: Likewise.
3635
3636	* acinclude.m4 (X86_PATTERN): Add geode.
3637
3638	* acinclude.m4 (CL_AS_NOEXECSTACK): Avoid -q flag to grep.
3639
36402008-08-01  Torbjorn Granlund  <tege@gmplib.org>
3641
3642	* acinclude.m4 (CL_AS_NOEXECSTACK): New.
3643	* configure.in: Use CL_AS_NOEXECSTACK.
3644	* mpn/Makeasm.am: Use ASM_FLAGS (defined by CL_AS_NOEXECSTACK).
3645
3646	* gmpxx.h (__GMP_DBL_LIMBS): Use DBL_MAX_EXP instead of
3647	std::numeric_limits<double>::max_exponent for better portability.
3648
36492008-07-29  Torbjorn Granlund  <tege@gmplib.org>
3650
3651	* gmpxx.h (__GMP_DBL_LIMBS): New #define.
3652	(__GMP_ULI_LIMBS): New #define.
3653	(__GMPXX_TMP_UI): New macro.
3654	(__GMPXX_TMP_SI): New macro.
3655	(__GMPXX_TMP_D): New macro.
3656	(struct __gmp_binary_and): Rewrite, using the new macros.
3657	(struct __gmp_binary_ior): Likewise.
3658	(struct __gmp_binary_xor): Likewise.
3659
36602008-07-28  Torbjorn Granlund  <tege@gmplib.org>
3661
3662	* tests/cxx/t-binary.cc: Add some tests for logical operations.
3663
36642008-07-24  Torbjorn Granlund  <tege@gmplib.org>
3665
3666	* gmpxx.h: Use __GMPZ_* instead of __GMPZZ_* for bitwise ops, remove
3667	__GMPZZ_*.
3668	Remove repeated #undefs.
3669	(__gmp_alloc_cstring): Declare freefunc as extern "C".
3670
36712008-07-23  Torbjorn Granlund  <tege@gmplib.org>
3672
3673	* gmp-h.in (__GMP_CC): New define, undocumented for now.
3674	(__GMP_CFLAGS): Likewise.
3675
36762008-07-21  Torbjorn Granlund  <tege@gmplib.org>
3677
3678	* tests/amd64check.c: Fix a printf type clash.
3679
3680	* mpz/realloc.c: Amend last fix.
3681
3682	* gmp-h.in: Include <cstdlib> for C++.
3683	* gmp-h.in: Handle new gcc 4.3 inline semantics defaults.
3684
3685	* configfsf.guess: Update to version of 2008-04-14.
3686	* configfsf.sub: Update to version of 2008-06-16.
3687
3688	* configure.in: Separate core2 and athlon64 flags handling.
3689
36902008-06-19  Torbjorn Granlund  <tege@gmplib.org>
3691
3692	* config.guess: Recognize pentiumm and AMD geode.
3693	* config.sub: Likewise.
3694	* configure.in: Likewise.
3695
36962008-06-02  Torbjorn Granlund  <tege@gmplib.org>
3697
3698	* configure.in: Disallow odd nails sizes.
3699	* configure.in: Inherit default gcc_cflags/gcc_64_cflags everywhere.
3700
37012008-05-23  Torbjorn Granlund  <tege@gmplib.org>
3702
3703	* mpz/init2.c: Rewrite to avoid internal overflow and to detect mpz_t
3704	overflow.
3705	* mpz/realloc2.c: Likewise.
3706	* mpz/realloc.c: Detect mpz_t overflow.
3707
37082008-05-22  Torbjorn Granlund  <tege@gmplib.org>
3709
3710	* configure.in (sparc): Remove -fast, it causes documented
3711	miscompilation.
3712
3713	* config.guess: Properly handle the "extended" variants of x86 cpuid.
3714
37152008-05-09  Torbjorn Granlund  <tege@gmplib.org>
3716
3717	* gmp-impl.h (mpn_mul_fft): Now void.
3718	(udiv_qrnnd_preinv3): Special case for constant (nl).
3719
37202008-05-08  Torbjorn Granlund  <tege@gmplib.org>
3721
3722	* mpn/generic/mul_fft.c: Clean up types in TRACE (printf (...)).
3723	(TRACE): Redefine to allow command line control.
3724	(mpn_mul_fft_internal): Now void, remove return value.
3725	(mpn_mul_fft): Likewise.
3726	(MPN_FFT_TABLE2_SIZE): Up size fro 256 to 512.
3727	(mpn_fft_fft): Call mpn_fft_mul_2exp_modF just once instead of twice,
3728	then add/subtract result.  Get rid of temp allocation as a result.
3729	Remove some redundant CNST_LIMB.
3730	(mpn_fft_fftinv): Analogous changes.
3731	(mpn_fft_sub_modF): Re-enable, now needed by mpn_fft_fft and
3732	mpn_fft_fftinv.
3733
37342008-03-10  Torbjorn Granlund  <tege@gmplib.org>
3735
3736	* tests/mpz/t-mul.c (main): Let GMP_CHECK_FFT mean largest allowed
3737	power-of-2 of test operands.
3738
37392008-02-28  Torbjorn Granlund  <tege@gmplib.org>
3740
3741	* tests/cxx/t-binary.cc (check_mpz): Expect floor rounding for right
3742	shift.
3743
37442008-02-27  Torbjorn Granlund  <tege@gmplib.org>
3745
3746	* mpz/mul_i.h: Check sml's size (not the signed small_mult).
3747
3748	* longlong.h (umul_ppmm) [alpha]: Define using __builtin_alpha_umulh
3749	when possible.
3750
3751	* longlong.h (count_trailing_zeros): Force destination register mode.
3752
3753	* gmpxx.h (struct __gmp_binary_rshift): Use floor rounding, not
3754	truncation.
3755
3756	* gmpxx.h (__gmp_binary_and, __gmp_binary_ior, __gmp_binary_xor):
3757	Add variants with unsigned long int argument.
3758
3759	* config.sub: Recog geode.
3760	* config.guess: Likewise.
3761	* acinclude.m4 (X86_PATTERN): Likewise.
3762
37632008-02-10  Torbjorn Granlund  <tege@gmplib.org>
3764
3765	* mpn/x86/p6/aors_n.asm: Use Zdisp to work around GNU as bug.
3766	* mpn/x86/x86-defs.m4 (Zdisp): Add more instructions.
3767
37682008-02-08  Torbjorn Granlund  <tege@gmplib.org>
3769
3770	* mpn/x86_64/aors_n.asm: New file.
3771	* mpn/x86_64/add_n.asm: Delete.
3772	* mpn/x86_64/sub_n.asm: Delete.
3773
37742008-02-07  Torbjorn Granlund  <tege@gmplib.org>
3775
3776	* mpn/x86/k6/mmx/dive_1.asm: Fix typo in last change.
3777
37782007-12-10  Torbjorn Granlund  <tege@swox.com>
3779
3780	* mpf/set_str.c (mpf_set_str): Write own code for converting the
3781	exponent, avoids strtol base < 36 limitation.
3782
37832007-10-28  Torbjorn Granlund  <tege@swox.com>
3784
3785	* gmp-impl.h (mpn_dc_get_str_itch): New macro.
3786	(mpn_dc_get_str_powtab_alloc): New macro.
3787	(struct powers): Add field "shift".
3788
3789	* mpn/generic/get_str.c: Compute powers without low zero limbs; all
3790	functions modified.  Correct temporary allocation.  Misc cleanups.
3791
3792	* mpn/generic/set_str.c: Compute powers without low zero limbs; all
3793	functions modified.
3794	(mpn_dc_set_str): Remove impossible case, replace by an ASSERT.
3795
37962007-10-26  Torbjorn Granlund  <tege@swox.com>
3797
3798	* mpn/generic/set_str.c: Remove default thresholds, not in gmp-impl.h.
3799	(mpn_dc_set_str): Insert ASSERT_ALWAYS in a presumably dead code arm.
3800
38012007-10-22  Torbjorn Granlund  <tege@swox.com>
3802
3803	* gmp-impl.h (mpn_add_nc): Define as inline function, unless NATIVE.
3804	(mpn_sub_nc): Likewise.
3805
38062007-10-17  Torbjorn Granlund  <tege@swox.com>
3807
3808	* tests/misc/t-printf.c: Fix a printf type clash.
3809	* tests/mpq/t-get_str.c: Likewise.
3810	* tests/mpz/t-import.c: Likewise.
3811
3812	* acinclude.m4: Conditionally disable some tests when compiled by a C++
3813	compiler.
3814
3815	* gmp-impl.h (udiv_qrnnd_preinv3): Remove an unused variable.
3816
3817	* mpn/generic/hgcd.c: Add some WANT_ASSERTs to shut up warnings.
3818
38192007-10-08  Torbjorn Granlund  <tege@swox.com>
3820
3821	* mpn/powerpc64/elf.m4 (LEAL): Define as an alias for LEA.
3822	* mpn/powerpc32/darwin.m4 (LEAL): Likewise.
3823	* mpn/powerpc64/aix.m4: Likewise.
3824
3825	* mpn/powerpc64/vmx/popcount.asm: Use LEAL.
3826
3827	* mpn/powerpc64/darwin.m4 (LEAL): New name for LEA, since it is only
3828	usable for local symbols.
3829	(LEA): Replace with code for external references.
3830
3831	* mpn/powerpc32/vmx/mod_34lsub1.asm: Use LEAL.
3832
38332007-10-07  Torbjorn Granlund  <tege@swox.com>
3834
3835	* mpn/x86/dive_1.asm: Use LEA, remove explicit movl_eip_*.
3836	* mpn/x86/k6/mode1o.asm: Likewise.
3837	* mpn/x86/k6/mmx/dive_1.asm: Likewise.
3838	* mpn/x86/k7/dive_1.asm: Likewise.
3839	* mpn/x86/k7/mode1o.asm: Likewise.
3840	* mpn/x86/p6/dive_1.asm: Likewise.
3841	* mpn/x86/p6/mode1o.asm: Likewise.
3842	* mpn/x86/pentium4/sse2/dive_1.asm: Likewise.
3843	* mpn/x86/pentium4/sse2/mode1o.asm: Likewise.
3844	* mpn/x86/pentium4/sse2/popcount.asm: Likewise.
3845
3846	* mpn/x86/p6/aors_n.asm: Table cycle counts.
3847
3848	* mpn/x86/k7/mod_34lsub1.asm: Fix over-optimistic cycle count claims.
3849
3850	* mpn/x86/x86-defs.m4 (DEF_OBJECT, END_OBJECT): New define's.
3851
3852	* mpn/x86/darwin.m4 (LEA): Put also movl_eip_XX into EPILOGUE_cpu.
3853	Expect target register to have prepended %.
3854
3855	* mpn/x86_64/add_n.asm: Use L() for labels.
3856	* mpn/x86_64/addlsh1_n.asm: Likewise.
3857	* mpn/x86_64/addmul_2.asm: Likewise.
3858	* mpn/x86_64/aorrlsh_n.asm: Likewise.
3859	* mpn/x86_64/aorsmul_1.asm: Likewise.
3860	* mpn/x86_64/com_n.asm: Likewise.
3861	* mpn/x86_64/copyd.asm: Likewise.
3862	* mpn/x86_64/copyi.asm: Likewise.
3863	* mpn/x86_64/diveby3.asm: Likewise.
3864	* mpn/x86_64/logops_n.asm: Likewise.
3865	* mpn/x86_64/lshsub_n.asm: Likewise.
3866	* mpn/x86_64/mul_1.asm: Likewise.
3867	* mpn/x86_64/mul_2.asm: Likewise.
3868	* mpn/x86_64/mul_basecase.asm: Likewise.
3869	* mpn/x86_64/popham.asm: Likewise.
3870	* mpn/x86_64/redc_1.asm: Likewise.
3871	* mpn/x86_64/rsh1add_n.asm: Likewise.
3872	* mpn/x86_64/rsh1sub_n.asm: Likewise.
3873	* mpn/x86_64/rshift.asm: Likewise.
3874	* mpn/x86_64/sub_n.asm: Likewise.
3875	* mpn/x86_64/sublsh1_n.asm Likewise.
3876	* mpn/x86_64/pentium4/aors_n.asm: Likewise.
3877	* mpn/x86_64/pentium4/lshift.asm: Likewise.
3878	* mpn/x86_64/pentium4/rshift.asm: Likewise.
3879
3880	* mpn/x86_64/x86_64-defs.m4: New file, defining LEA, DEF_OBJECT, and
3881	END_OBJECT.
3882
3883	* mpn/generic/mul.c: Put TMP_DECL as last decl.
3884
38852007-10-06  Torbjorn Granlund  <tege@swox.com>
3886
3887	* mpn/x86/pentium4/sse2/popcount.asm: New file.
3888
38892007-09-26  Torbjorn Granlund  <tege@swox.com>
3890
3891	* mpz/get_str.c: Cast a char index to int to shut up compilers.
3892
3893	* mpn/generic/dc_div_qr.c: Pass dummy scratch argument to mpn_invert.
3894	* mpn/generic/dc_divappr_q.c: Likewise.
3895	* mpn/generic/mu_div_qr.c: Likewise.
3896	* mpn/generic/mu_divappr_q.c: Likewise.
3897	* mpn/generic/mu_div_q.c: Likewise.
3898	* mpn/generic/divexact.c: Likewise.
3899
3900	* mpn/generic/invert.c: New file, placeholder for now.
3901
39022007-09-24  Torbjorn Granlund  <tege@swox.com>
3903
3904	* mpn/generic/toom_interpolate_5pts.c: New file, contents from
3905	mpn/generic/mul_n.c
3906	* mpn/generic/mul_n.c (mpn_toom3_interpolate): Function removed.
3907
3908	* mpn/generic/toom_interpolate_7pts.c: New file.
3909
3910	* mpn/x86/k7/mmx/popham.asm: Table cycle counts.
3911
3912	* mpn/x86/k6/README: Update URLs.
3913
3914	* mpn/powerpc32/README: Update URL's, company names.
3915
3916	* mpn/generic/get_d.c: Complete rewrite.
3917
3918	* mpn/generic/mul_toom33.c: New file.
3919
3920	* mpn/generic/mul_toom22.c: Make orthogonal with other toomXY files.
3921	* mpn/generic/mul_toom32.c: Likewise.
3922	* mpn/generic/mul_toom42.c: Likewise.
3923
3924	* mpn/alpha/invert_limb.asm: Update cycle counts.  Fix a comment typo.
3925
3926	* mpf/get_str.c: Include stdlib.h, not stdio.h for NULL.
3927
3928	* doc/gmp.texi: Fix a typo.
3929
3930	* memory.c (__gmp_default_allocate, __gmp_default_reallocate):
3931	Cast size operands in error fprintf's.
3932
3933	* longlong.h (sub_ddmmss) [powerpc 64]: Add more variants for constant
3934	args.
3935
3936	* gmp-impl.h (udiv_qrnnd_preinv3): New define.
3937	* gmp-impl.h (ULONG_PARITY): Exclude masquerading __INTEL_COMPILER from
3938	ia64 asm.
3939
3940	* gmp-h.in (mpn_neg_n): New function.
3941
39422007-09-18  Torbjorn Granlund  <tege@swox.com>
3943
3944	* demos/pexpr.c (main): Add -v option.
3945	(enum op_t): New tag TIMING.
3946	(mpz_eval_expr): Execute TIMING.
3947	(fns): Add TIMING entry.
3948
3949	* gmp-impl.h: Add decls and THRESHOLDs for new toom multiplication
3950	functions and division functions.
3951
39522007-09-10  Torbjorn Granlund  <tege@swox.com>
3953
3954	* mpn/powerpc32/addlsh1_n.asm: Use L() for labels.
3955	* mpn/powerpc32/sublsh1_n.asm: Likewise.
3956
39572007-09-09  Torbjorn Granlund  <tege@swox.com>
3958
3959	* mpn/x86/x86-defs.m4 (LEA): New define.
3960	* mpn/x86/darwin.m4: New file, for now just defining LEA.
3961	* configure.in: Pick up x86/darwin.m4.
3962	* mpn/x86/*: Use LEA for PIC references.
3963
3964	* configure.in: For X86/32, treat core2 like pentium3.
3965
39662007-09-06  Torbjorn Granlund  <tege@swox.com>
3967
3968	* tests/amd64check.c (calling_conventions_values): Put constants,
3969	dynamic values in this array (was in scalars).
3970	(calling_conventions_check): Corresponding changes.
3971	* tests/amd64call.asm: Rewrite to be PIC, smaller, using amd64check.c's
3972	array.
3973
39742007-09-04  Torbjorn Granlund  <tege@swox.com>
3975
3976	* mpn/x86/pentium4/sse2/mul_basecase.asm: Misc cleanups.
3977	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Likewise.
3978
3979	* mpn/x86_64/mod_34lsub1.asm: Optimize loop, reduce code size.
3980
3981	* tests/amd64call.asm: Remove bogus no-op moves.
3982
39832007-09-03  Torbjorn Granlund  <tege@swox.com>
3984
3985	From Richard Guenther:
3986	* gmp-h.in (__GMP_EXTERN_INLINE): Declare conditionally on
3987	__GNUC_STDC_INLINE__.
3988
3989	* tests/cxx/t-locale.cc: #include <cstdlib>, for abort.
3990
3991	* mpn/x86_64/core2/popcount.asm: New file.
3992	* mpn/x86_64/pentium4/popcount.asm: New file.
3993
3994	* mpn/x86_64/addmul_2.asm: New file.
3995	* mpn/x86_64/mul_2.asm: New file.
3996
3997	* mpn/x86_64/aorsmul_1.asm: Use 32-bit mov for zeroing registers
3998	(saves space).
3999
40002007-09-01  Torbjorn Granlund  <tege@swox.com>
4001
4002	* configure.in: Handle athlon64, core2, and pentium4 separately for
4003	64-bit ABI.
4004
4005	* config.sub: Recog athlon64, core2, and opteron.
4006
4007	* config.guess: Do two x86 variants, for 32-bit ABI and 64-bit ABI.
4008	Return "athlon64" and "core2", not x86_64.
4009
40102007-08-31  Torbjorn Granlund  <tege@swox.com>
4011
4012	From Patrick Pelissier:
4013	* gmp-h.in: Don't refer to FILE from C++ unless we've seen FILE.
4014
40152007-08-30  Torbjorn Granlund  <tege@swox.com>
4016
4017	* demos/isprime.c: Include string.h for strcmp.
4018
4019	* demos/factorize.c (main): Declare to int.
4020
40212007-06-22  Torbjorn Granlund  <tege@swox.com>
4022
4023	* mpn/x86_64/pentium4/lshift.asm: Minor tuning.
4024	* mpn/x86_64/pentium4/rshift.asm: Likewise.
4025
40262007-05-30  Torbjorn Granlund  <tege@swox.com>
4027
4028	* mpn/powerpc64/mode64/aors_n.asm: Add _nc entry points.
4029
40302007-05-22  Torbjorn Granlund  <tege@swox.com>
4031
4032	* tests/memory.c: Cast calls to new mem* calls to avoid unaligned ops.
4033
40342007-05-16  Torbjorn Granlund  <tege@swox.com>
4035
4036	* tests/mpz/convert.c: Tweak operand sizes for best coverage.
4037
4038	* tests/memory.c: Add red zones around allocations.
4039
40402007-05-15  Torbjorn Granlund  <tege@swox.com>
4041
4042	* mpn/ia64/mul_1.asm: Make mul_1c entry point actually work.
4043
4044	* mpn/generic/set_str.c (mpn_dc_set_str): Avoid calling mpn_add_n when
4045	ln == 0.
4046
4047	* tests/mpz/convert.c (string_urandomb): New function.
4048	(main): Use it by enabling ifdef'ed out code.
4049
40502007-04-30  Torbjorn Granlund  <tege@swox.com>
4051
4052	* mpn/x86_64/mul_basecase.asm: Complete rewrite.
4053
4054	* mpn/x86_64/copyi.asm: Use short shift-by-one form.  Misc cleanups.
4055	* mpn/x86_64/copyi.asm: Likewise.
4056	* mpn/x86_64/popham.asm: Likewise.
4057
4058	* mpn/x86_64/aorsmul_1.asm: Cleanup formatting.
4059
40602007-04-25  Torbjorn Granlund  <tege@swox.com>
4061
4062	* mpz/divexact.c: Handle undefined case of |N| < |D| to avoid segfaults.
4063
40642007-02-24  Torbjorn Granlund  <tege@swox.com>
4065
4066	* doc/gmp.texi (Toom 3-Way Multiplication): Fix typo.
4067	(mpz_scan0, mpz_scan1): Fix typos.
4068	(Float Internals): Rewrite paragraph about struct types.
4069
40702007-02-12  Torbjorn Granlund  <tege@swox.com>
4071
4072	* mpn/x86/pentium4/sse2/sqr_basecase.asm: Complete rewrite (except
4073	diagonal code).
4074
40752007-02-05  Torbjorn Granlund  <tege@swox.com>
4076
4077	* mpn/generic/mul_fft.c (mpn_fft_fft): New name for mpn_fft_fft_sqr,
4078	old mpn_fft_fft removed.
4079	(mpn_mul_fft_internal): Call mpn_fft_fft separately for each operand.
4080	(mpn_fft_add_modF): Rewrite to avoid random branches.
4081	(mpn_fft_sub_modF): Likewise.
4082
4083	* mpn/x86/pentium4/sse2/addmul_1.asm: Complete rewrite.
4084	* mpn/x86/pentium4/sse2/mul_1.asm: Complete rewrite.
4085	* mpn/x86/pentium4/sse2/mul_basecase.asm: Complete rewrite, based on
4086	new addmul and mul code.
4087
40882007-01-31  Torbjorn Granlund  <tege@swox.com>
4089
4090	* mpn/generic/get_str.c (mpn_sb_get_str): Get loop count for frac
4091	development right.
4092
4093	* mpn/powerpc32/vmx/mod_34lsub1.asm: New file.
4094
4095	* mpn/powerpc32/aors_n.asm: New file, complete rewrite.
4096	* mpn/powerpc32/add_n.asm: Remove.
4097	* mpn/powerpc32/sub_n.asm: Remove.
4098
40992007-01-25  Torbjorn Granlund  <tege@swox.com>
4100
4101	* mpn/x86_64/core2/aors_n.asm: Add _nc entry points, minor cleanups.
4102
4103	* mpn/x86_64/core2/lshift.asm: Rewrite.
4104	* mpn/x86_64/core2/rshift.asm: Rewrite.
4105
4106	* mpn/x86_64/pentium4/lshift.asm: Swap some loop insns for a small
4107	speedup.
4108	* mpn/x86_64/pentium4/rshift.asm: New file, based on lshift.asm.
4109
4110	* mpn/x86_64/pentium4/gmp-mparam.h: New file.
4111
4112	* mpn/x86_64/pentium4/aors_n.asm: Complete rewrite of add/subtract
4113	code.
4114	* mpn/x86_64/pentium4/add_n.asm: Remove.
4115	* mpn/x86_64/pentium4/sub_n.asm: Remove.
4116
41172007-01-20  Torbjorn Granlund  <tege@swox.com>
4118
4119	* mpn/x86_64/lshift.asm: Add special case for cnt=1.
4120
41212007-01-19  Torbjorn Granlund  <tege@swox.com>
4122
4123	* mpn/x86_64/aorsmul_1.asm: New file, written from scratch, finally at
4124	3.0 c/l on K8 (addmul_1 was 3.3; submul_1 was 3.5).
4125	* mpn/x86_64/addmul_1.asm: Remove.
4126	* mpn/x86_64/submul_1.asm: Remove.
4127
41282006-12-29  Torbjorn Granlund  <tege@swox.com>
4129
4130	* randmt.c (__gmp_randclear_mt): Initialize ALLOC field, like in
4131	__gmp_randinit_mt_noseed.
4132	(__gmp_randclear_mt, __gmp_randinit_mt_noseed): Make similar functions
4133	look similar.
4134	(__gmp_randclear_mt): Pass actually allocated size.
4135
4136	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Add mul_toom22.c,
4137	mul_toom32.c, mul_toom42.c.
4138
4139	* configure.in: Recognize athlon64 and core2 as alternatives to x86_64.
4140	Provide special settings for core2.
4141
4142	* configure.in (gmp_mpn_functions): Add mul_toom22, mul_toom32,
4143	mul_toom42.
4144
4145	* mpn/generic/mul_toom22.c: New file.
4146	* mpn/generic/mul.c: Use mpn_mul_toom22.  Trim cutoff points between
4147	the mpn_mul_toomN2 functions.  Handle balanced operands at function
4148	entry.
4149
41502006-12-29  Marco Bodrato  <bodrato@mail.dm.unipi.it>
4151
4152	* mpn/generic/mul_n.c: Rewrite interpolation code.
4153
41542006-12-28  Torbjorn Granlund  <tege@swox.com>
4155
4156	* mpn/generic/mul_toom32.c: New file.
4157	* mpn/generic/mul_toom42.c: New file.
4158	* mpn/generic/mul.c: Use mpn_mul_toom32 and mpn_mul_toom42 for
4159	unbalanced operands.
4160
41612006-12-17  Torbjorn Granlund  <tege@swox.com>
4162
4163	* mpn/x86_64/aorrlsh_n.asm: New file.
4164	* mpn/x86_64/lshsub_n.asm: New file.
4165
4166	* mpn/x86_64/core2/aors_n.asm: New file.
4167	* mpn/x86_64/core2/lshift.asm: New file.
4168	* mpn/x86_64/core2/rshift.asm: New file.
4169
4170	* mpn/x86/p6/aors_n.asm: Replace K7 grabbing code with P6 specific
4171	code.
4172
4173	* mpn/x86/p6/lshsub_n.asm: New file.
4174
41752006-11-23  Torbjorn Granlund  <tege@swox.com>
4176
4177	* tune/speed.h (SPEED_ROUTINE_MPN_MUL_BASECASE): Allocate space for xp
4178	locally, s->xp might be insufficient.
4179
41802006-11-22  Torbjorn Granlund  <tege@swox.com>
4181
4182	* randmt.c (__gmp_randinit_mt_noseed): Initialize ALLOC field of result
4183	param.
4184
41852006-11-06  Torbjorn Granlund  <tege@swox.com>
4186
4187	* tune/set_strp.c: New file.
4188
41892006-11-04  Torbjorn Granlund  <tege@swox.com>
4190
4191	* extract-dbl.c: Rewrite to handle nails better, and for general
4192	optimization.
4193
4194	* mpz/bin_uiui.c: Simplify.
4195
4196	* longlong.h (umul_ppmm) [mmix]: New.
4197
4198	* tune/tuneup.c, tune/common.c, tune/speed.c, tune/speed.h,
4199	tune/set_strb.c, tune/set_strs.c: Add tuning and speed measurements
4200	of separate SET_STR_DC_THRESHOLD and SET_STR_PRECOMPUTE_THRESHOLD.
4201	Add tuning and speed measurement of mpn_addsub_n.
4202
42032006-10-31  Torbjorn Granlund  <tege@swox.com>
4204
4205	* gmpxx.h: Remove ternary stuff, it is hardly an optimization and it
4206	writes to destination before reading all source operands.
4207
42082006-10-25  Torbjorn Granlund  <tege@swox.com>
4209
4210	* mpn/generic/set_str.c: Complete rewrite.
4211	* mpn/generic/get_str.c: Likewise.
4212
4213	* gmp-impl.h (struct powers, powers_t): New types.
4214	Restructure GET_STR_* and SET_STR_* thresholds.
4215
42162006-09-21  Torbjorn Granlund  <tege@swox.com>
4217
4218	* mpn/generic/rootrem.c: Remove some redundant casts.
4219
42202006-07-12  Torbjorn Granlund  <tege@swox.com>
4221
4222	* mpn/alpha/ev6/nails/addmul_2.asm: Make it run at claimed speed.
4223	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
4224
4225	* mpf/get_str.c: Avoid copying result when not needed.  Misc cleanups.
4226
4227	* tests/amd64call.asm: Use jmp instead of jmpq to placate Solaris.
4228
42292006-06-30  Torbjorn Granlund  <tege@swox.com>
4230
4231	* configure.in (powerpc-*): Remove repeated path component.
4232
42332006-06-15  Torbjorn Granlund  <tege@swox.com>
4234
4235	* configure.in: (ia64-*-linux*): Don't use -O3.
4236
42372006-06-14  Torbjorn Granlund  <tege@swox.com>
4238
4239	* mpq/get_str.c: Fix upper base limit boundary in an ASSERT.
4240
4241	* tests/refmpn.c (refmpn_sb_divrem_mn): Use ASSERT_CARRY for add-back.
4242
42432006-05-31  Torbjorn Granlund  <tege@swox.com>
4244
4245	* tests/mpz/t-set_d.c (check_data): Add more data points.
4246
4247	* mpz/set_d.c: Handle negative return values from __gmp_extract_double.
4248
42492006-05-17  Torbjorn Granlund  <tege@swox.com>
4250
4251	* configure.in: Clear out gcc_cflags_cpu and gcc_cflags_arch for a fat
4252	build.
4253
42542006-05-16  Torbjorn Granlund  <tege@swox.com>
4255
4256	* demos/primes.c (find_primes): Increase mpz_probab_prime_p cnt to 10.
4257
4258	* mpn/generic/addsub_n.c: Fix criteria form when to call _nc functions.
4259
42602006-05-12  Torbjorn Granlund  <tege@swox.com>
4261
4262	* config.guess: Recognize more ppc processor types.
4263
42642006-05-11  Torbjorn Granlund  <tege@swox.com>
4265
4266	* tune/speed.c (usage): Update URL for gnuplot and quickplot.
4267
42682006-05-10  Torbjorn Granlund  <tege@swox.com>
4269
4270	* configure.in (powerpc-*-*): Pass -maltivec to assembler for
4271	appropriate CPUs.
4272
42732006-05-08  Torbjorn Granlund  <tege@swox.com>
4274
4275	* mpn/powerpc32/aix.m4 (LEA): Remove [RW] attribute.
4276
42772006-05-03  Torbjorn Granlund  <tege@swox.com>
4278
4279	* mpn/powerpc64/vmx/popcount.asm: Conditionally zero extend n.
4280
42812006-04-27  Torbjorn Granlund  <tege@swox.com>
4282
4283	* mpz/divexact.c: Call mpz_tdiv_q for large operands.
4284
4285	* configure.in (powerpc-*-darwin): Remove -fast, it affects PIC.
4286
42872006-04-26  Torbjorn Granlund  <tege@swox.com>
4288
4289	* config.guess: Try to recognize Ultrasparc T1 (as ultrasparct1).
4290	* config.sub: Handle ultrasparct1.
4291
42922006-04-25  Torbjorn Granlund  <tege@swox.com>
4293
4294	* mpn/sparc64/gmp-mparam.h: Retune, without separation of GNUC and
4295	non-GNUC data.
4296
42972006-04-20  Torbjorn Granlund  <tege@swox.com>
4298
4299	* tests/mpz/convert.c: Increase operands range.
4300
43012006-04-19  Torbjorn Granlund  <tege@swox.com>
4302
4303	* configure.in: Support powerpc eABI.
4304	* mpn/powerpc32/eabi.m4: New file.
4305
4306	* configure.in: Support powerpc *bsd.
4307	* mpn/powerpc64/elf.m4: New name for mpn/powerpc64/linux64.m4.
4308	* mpn/powerpc32/elf.m4: New name for mpn/powerpc32/linux.m4.
4309
4310	* mpn/powerpc64/linux64.m4 (ASM_END): Quote TOC_ENTRY.
4311
43122006-04-18  Torbjorn Granlund  <tege@swox.com>
4313
4314	* configure.in (gmp_mpn_functions_optional): Add lshiftc.
4315	(HAVE_NATIVE): Add lshiftc.
4316
4317	* mpn/powerpc64/mode64/invert_limb.asm: Use LEA, not LDSYM.
4318	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
4319	* mpn/powerpc64/mode64/dive_1.asm: Likewise.
4320
4321	* mpn/powerpc64/linux64.m4 (TOC_ENTRY): Define to empty.
4322	* mpn/powerpc64/aix.m4 (TOC_ENTRY): Likewise.
4323	* mpn/powerpc32/aix.m4 (TOC_ENTRY): Likewise.
4324
4325	* mpn/powerpc32/aix.m4 (EXTERN): New, copied form powerpc64/aix.m4.
4326	* mpn/powerpc32/mode1o.asm: Use EXTERN.
4327	* mpn/powerpc32/linux.m4 (EXTERN): Provide dummy definition.
4328	* mpn/powerpc32/darwin.m4 (EXTERN): Likewise.
4329
43302006-04-13  Torbjorn Granlund  <tege@swox.com>
4331
4332	* mpn/generic/mul_fft.c: Use new thresholds mechanism if MUL_FFT_TABLE2
4333	is defined.
4334	(mpn_lshiftc): New name for mpn_lshift_com (for consistency with some
4335	stuff already in 4.1.4.
4336	(mpn_fft_mul_2exp_modF): Reorganize initial operand reductions to avoid
4337	divisions.
4338
4339	* tests/devel/try.c (choice_array): Add mpn_addsub_n[c].
4340
43412006-04-11  Torbjorn Granlund  <tege@swox.com>
4342
4343	* aclocal.m4: Regenerate with patched libtool.
4344
4345	* mpn/asm-defs.m4 (ASM_END): Provide (empty) default.
4346
43472006-04-08  Torbjorn Granlund  <tege@swox.com>
4348
4349	* configure.in (gmp_mpn_functions_optional): Add addsub.
4350
4351	* gmpxx.h: Remove missed MPFR references.
4352
4353	* gmp-impl.h (LIMBS_PER_DOUBLE): Adjust formula to not be pessimistic.
4354
4355	* gmp-impl.h (TMP_*, WANT_TMP_DEBUG): Don't expect marker argument;
4356	define TMP_SALLOC and TMP_BALLOC.
4357
4358	* mpn/minithres/gmp-mparam.h: New file.
4359
4360	* tests/mpz/t-io_raw.c: Fix printf type/arg mismatches.
4361	* tests/mpz/t-export.c: Likewise.
4362	* tests/mpz/io.c: Likewise.
4363	* tests/t-constants.c: Likewise.
4364
4365	* mpn/ia64/popcount.asm: Append "cond.dptk" to conditional branches to
4366	placate icc.
4367	* mpn/ia64/hamdist.asm: Likewise.
4368	* mpn/ia64/lorrshift.asm: Likewise.
4369	* mpn/ia64/dive_1.asm: Likewise.
4370
43712006-04-05  Torbjorn Granlund  <tege@swox.com>
4372
4373	* tal-notreent.c (__gmp_tmp_mark): Add "struct" tag for tmp_marker.
4374	(__gmp_tmp_free): Likewise.
4375
4376	* mpn/generic/mul_fft.c: Optimize many scalar divisions and mod
4377	operations into masks and shifts.
4378	(mpn_fft_mul_modF_K): Fix a spurious ASSERT_NOCARRY.
4379
43802006-03-26  Torbjorn Granlund  <tege@swox.com>
4381
4382	* Version 4.2 released.
4383
4384	* mpn/powerpc64/aix.m4 (LEA): Renamed from LDSYM.
4385	* mpn/powerpc64/darwin.m4: Likewise.
4386	* mpn/powerpc64/linux64.m4: Likewise.
4387	* mpn/powerpc64/vmx/popcount.asm: Use LEA, not LDSYM.
4388
43892006-03-23  Torbjorn Granlund  <tege@swox.com>
4390
4391	* gmp-impl.h: (class gmp_allocated_string): Prefix strlen with std::.
4392
4393	* gmpxx.h (__GMP_DEFINE_TERNARY_EXPR2): Remove for now.
4394	(struct __gmp_ternary_addmul2): Likewise.
4395	(struct __gmp_ternary_submul2): Likewise.
4396
4397	* gmpxx.h: #include <cstring>.
4398	(struct __gmp_alloc_cstring): Prefix strlen with std::.
4399
4400	* mpn/x86/pentium/com_n.asm: Add TEXT and ALIGN.
4401	* mpn/x86/pentium/copyi.asm: Likewise.
4402	* mpn/x86/pentium/copyd.asm: Likewise.
4403
44042006-03-22  Torbjorn Granlund  <tege@swox.com>
4405
4406	* gmp-h.in: Add a "using std::FILE" for C++.
4407	(_GMP_H_HAVE_FILE): Check also _ISO_STDIO_ISO_H.
4408
4409	* gmpxx.h: Remove mpfr code.
4410	* tests/cxx: Likewise.
4411
4412	* gmp-impl.h (FORCE_DOUBLE): Rename a tempvar to avoid a clash with
4413	GNU/Linux public include file.
4414
4415	* configure.in (powerpc64, darwin): New optional, gcc_cflags_subtype.
4416	Grab powerpc32/darwin.m4 for ABI=mode32.
4417
4418	* configure.in: Use host_cpu whenever just the cpu type is needed.
4419
44202006-03-08  Torbjorn Granlund  <tege@swox.com>
4421
4422	* mpz/get_si.c: Fix a typo.
4423
4424	* tests/mpq/t-get_d.c (check_random): Improve random generation for
4425	nails.
4426
44272006-02-28  Torbjorn Granlund  <tege@swox.com>
4428
4429	* tests/mpq/t-get_d.c (check_random): New function.
4430	(main): Call check_random.
4431
4432	* mpq/set_d.c: Make choices based on LIMBS_PER_DOUBLE, not
4433	BITS_PER_MP_LIMB.  Make it work for LIMBS_PER_DOUBLE == 4.
4434	Use MPZ_REALLOC.
4435
4436	* mpz/set_d.c: Make it work for LIMBS_PER_DOUBLE == 4.
4437
4438	* extract-dbl.c: Make it work for LIMBS_PER_DOUBLE > 3.
4439
44402006-02-27  Torbjorn Granlund  <tege@swox.com>
4441
4442	* mpz/cmp_d.c: Declare `i'.
4443	* mpz/cmpabs_d.c: Likewise.
4444
44452006-02-23  Torbjorn Granlund  <tege@swox.com>
4446
4447	* mpn/powerpc32/vmx/copyd.asm: Set right VRSAVE bits.
4448	* mpn/powerpc32/vmx/copyi.asm: Likewise.
4449
44502006-02-22  Torbjorn Granlund  <tege@swox.com>
4451
4452	* mpn/powerpc32/vmx/logops_n.asm: New file.
4453
4454	* mpn/powerpc32/diveby3.asm: Rewrite.
4455
44562006-02-21  Torbjorn Granlund  <tege@swox.com>
4457
4458	* mpn/powerpc32/vmx/copyi.asm: New file.
4459	* mpn/powerpc32/vmx/copyd.asm: New file.
4460
44612006-02-17  Torbjorn Granlund  <tege@swox.com>
4462
4463	* mpn/alpha/ev6/nails/aors_n.asm (CYSH): Import proper setting from
4464	deleted mpn_sub_n.
4465
44662006-02-16  Torbjorn Granlund  <tege@swox.com>
4467
4468	* mpn/alpha/ev6/addmul_1.asm: Correct slotting comments.
4469
44702006-02-15  Torbjorn Granlund  <tege@swox.com>
4471
4472	* tests/devel/anymul_1.c: Copy error reporting code from addmul_N.c.
4473
4474	* tests/devel/addmul_N.c: New file.
4475	* tests/devel/mul_N.c: New file.
4476
4477	* mpn/alpha/default.m4 (PROLOGUE_cpu): Align functions at 16-byte
4478	boundary.
4479
4480	* mpn/alpha/ev6/nails/aors_n.asm: New file.
4481	* mpn/alpha/ev6/nails/add_n.asm: Remove.
4482	* mpn/alpha/ev6/nails/sub_n.asm: Remove.
4483
4484	* mpn/alpha/ev6/nails/addmul_1.asm: Rewrite.
4485	* mpn/alpha/ev6/nails/submul_1.asm: Likewise.
4486	* mpn/alpha/ev6/nails/mul_1.asm: Likewise.
4487
4488	* mpn/alpha/ev6/nails/addmul_2.asm: Use L() for labels.
4489	* mpn/alpha/ev6/nails/addmul_3.asm: Use L() for labels.
4490	* mpn/alpha/ev6/nails/addmul_4.asm: Use L() for labels.
4491
44922006-02-13  Torbjorn Granlund  <tege@swox.com>
4493
4494	* mpn/powerpc32/diveby3.asm: Trivially reorder loop insns to save
4495	1 c/l.
4496
4497	* mpn/x86_64/dive_1.asm: Use movabsq to support large model non-PIC.
4498
4499	* mpn/x86_64/rsh1add_n.asm: Replace high register with rbx.
4500	* mpn/x86_64/rsh1sub_n.asm: Likewise.
4501
45022006-02-10  Torbjorn Granlund  <tege@swox.com>
4503
4504	* mpn/powerpc64/sqr_diagonal.asm: Software pipeline.
4505
4506	* mpn/powerpc64/vmx/popcount.asm: Add prefetching.
4507
45082006-02-07  Torbjorn Granlund  <tege@swox.com>
4509
4510	* mpn/powerpc64/mode64/diveby3.asm: Rewrite.
4511
45122006-02-04  Torbjorn Granlund  <tege@swox.com>
4513
4514	* mpn/powerpc64/vmx/popcount.asm: Remove mpn_hamdist partial code.
4515	Move compare for huge n so that it is always executed.
4516
45172006-02-03  Torbjorn Granlund  <tege@swox.com>
4518
4519	* mpn/powerpc32/linux.m4 (LEA): Add support for PIC.
4520
4521	* configure.in (powerpc): New optional, gcc_cflags_subtype.
4522
4523	* mpn/x86_64/pentium4/add_n.asm: New file.
4524	* mpn/x86_64/pentium4/sub_n.asm: New file.
4525	* mpn/x86_64/pentium4/lshift.asm: New file.
4526
4527	* mpn/powerpc64/linux64.m4 (PROLOGUE_cpu): Align function start to
4528	16-multiple.
4529	* mpn/powerpc64/aix.m4: Likewise.
4530	* mpn/powerpc64/darwin.m4: Likewise.
4531
4532	* mpn/powerpc64/copyi.asm: Align loop to 16-multiple.
4533	* mpn/powerpc64/copyd.asm: Likewise
4534
4535	* configure.in (powerpc): Add vmx to relevant paths.
4536
4537	* mpn/powerpc64/linux64.m4 (DEF_OBJECT): Accept 2nd argument, for
4538	alignment.
4539	* mpn/powerpc64/aix.m4: Likewise.
4540	* mpn/powerpc64/darwin.m4: Likewise.
4541
4542	* mpn/powerpc32/linux.m4 (DEF_OBJECT, END_OBJECT): New macros,
4543	inherited from powerpc64 versions.
4544	* mpn/powerpc32/aix.m4: Likewise.
4545	* mpn/powerpc32/darwin.m4: Likewise.
4546
4547	* mpn/powerpc64/vmx/popcount.asm: New file, for ppc32 and ppc64.
4548	* mpn/powerpc32/vmx/popcount.asm: New file, grabbing above file.
4549
45502006-01-22  Torbjorn Granlund  <tege@swox.com>
4551
4552	* configure.in: Generalize OS-dependent patterns for powerpcs.
4553
45542006-01-20  Torbjorn Granlund  <tege@swox.com>
4555
4556	* mpn/x86_64/popham.asm: Optimize.
4557
4558	* config.guess: Recognize power4 and up under linux-gnu.
4559	* config.sub: Generalize power recognition code.
4560	* acinclude.m4 (POWERPC64_PATTERN): Add 64-bit powerpc processors.
4561	* configure.in: Recognize powerpc processors masquerading as power
4562	processors.
4563
45642006-01-19  Torbjorn Granlund  <tege@swox.com>
4565
4566	* mpn/x86_64/logops_n.asm: Rewrite for more stable speed and smaller
4567	code.
4568	* mpn/x86_64/com_n.asm: Likewise.
4569
45702006-01-18  Torbjorn Granlund  <tege@swox.com>
4571
4572	* mpn/x86_64/addlsh1_n.asm: Rewrite to use indexed addressing.
4573	* mpn/x86_64/sublsh1_n.asm: Likewise.
4574
45752006-01-17  Torbjorn Granlund  <tege@swox.com>
4576
4577	* mpn/generic/diveby3.c: Use GMP standard parameter names.  Nailify
4578	alternative code.  Use restrict for params.
4579
4580	* configure.in: Recognize andn_n as not needing nailification.
4581
4582	* tests/mpq/t-equal.c (check_various): Disable a test that gives common
4583	factors for GMP_NUMB_BITS == 62.
4584
45852006-01-16  Torbjorn Granlund  <tege@swox.com>
4586
4587	* mpn/generic/get_str.c (mpn_sb_get_str): Fix digit count computation,
4588	was inaccurate for nails.
4589
45902006-01-15  Torbjorn Granlund  <tege@swox.com>
4591
4592	* mpn/x86_64/mode1o.asm: Remove unneeded carry register zeroing.
4593
45942006-01-08  Torbjorn Granlund  <tege@swox.com>
4595
4596	* mpn/alpha/ev6/sqr_diagonal.asm: New file.
4597
45982006-01-06  Torbjorn Granlund  <tege@swox.com>
4599
4600	* mpn/powerpc64/mode64/mod_34lsub1.asm: Tune to 1.5 c/l.
4601
4602	* mpn/generic/mullow_n.c (MUL_BASECASE_ALLOC): New #define.
4603	(mpn_mullow_n): Use it.
4604
4605	* mpn/powerpc64/mode64/dive_1.asm: Use EXTERN.
4606	* mpn/powerpc64/mode64/mode1o.asm: Likewise.
4607
4608	* mpn/powerpc64/aix.m4 (EXTERN): Define to import symbol.
4609	(LDSYM): Remove [RW] attribute.
4610	* mpn/powerpc64/linux64.m4 (EXTERN): Dummy definition.
4611	* mpn/powerpc64/darwin.m4 (EXTERN): Likewise.
4612
46132006-01-05  Torbjorn Granlund  <tege@swox.com>
4614
4615	* mpn/powerpc64/mode64/mode1o.asm: New file.
4616
4617	* mpn/powerpc64/mode64/dive_1.asm: Use L() for labels.  Invoke ASM_END.
4618
4619	* mpn/powerpc64/mode64/invert_limb.asm: Invoke ASM_END.
4620
4621	* mpn/powerpc64/linux64.m4: Move toc entry generation from direct at
4622	DEF_OBJECT to delayed via LDSYM, define ASM_END to output it.
4623	* mpn/powerpc64/aix.m4: Likewise.
4624	* mpn/powerpc64/darwin.m4: Define a dummy ASM_END.
4625
4626	* mpn/powerpc64/mode64/addmul_1.asm: Add POWER5 timings.
4627	* mpn/powerpc64/mode64/mul_1.asm: Likewise.
4628
4629	* mpn/powerpc64/mode64/submul_1.asm: Tweak to save 1.5 c/l for POWER5.
4630
46312006-01-04  Torbjorn Granlund  <tege@swox.com>
4632
4633	* mpn/powerpc64/mode64/dive_1.asm: New file.
4634
4635	* mpn/powerpc64/mode64/invert_limb.asm: Add missing ASM_START.
4636
4637	* mpn/powerpc64/mode64/addmul_1.asm: Fix a comment typo.
4638
4639	* mpn/x86_64/diveby3.asm: Rewrite.
4640
46412006-01-03  Torbjorn Granlund  <tege@swox.com>
4642
4643	* configure.in: Update bugs reporting address.
4644
4645	* mpn/powerpc64/mode64/diveby3.asm: Trim a cycle off of POWER4 timing.
4646	Misc cleanup.
4647
46482006-01-02  Torbjorn Granlund  <tege@swox.com>
4649
4650	* mpn/powerpc64/linux64.m4 (CALL): New macro.
4651	* mpn/powerpc64/aix.m4: Likewise.
4652	* mpn/powerpc64/darwin.m4: Likewise, also define macro "DARWIN".
4653
46542005-12-28  Torbjorn Granlund  <tege@swox.com>
4655
4656	* mpn/powerpc64/mode64/mod_34lsub1.asm: New file.
4657
46582005-12-26  Torbjorn Granlund  <tege@swox.com>
4659
4660	* mpn/x86_64/mod_34lsub1.asm: New file.
4661
46622005-12-20  Torbjorn Granlund  <tege@swox.com>
4663
4664	* mpn/x86_64/submul_1.asm: Save a push/pop by not using register r12.
4665	Use addq instead of leaq for pointer updates; schedule them.  (These
4666	changes shaves one cycle of overhead and 0.25 c/l.)
4667
46682005-12-18  Torbjorn Granlund  <tege@swox.com>
4669
4670	* mpf/ui_div.c: Implement workaround for GCC bug triggered on alpha.
4671	* mpf/set_q.c: Likewise.
4672
46732005-12-16  Torbjorn Granlund  <tege@swox.com>
4674
4675	* mpn/generic/tdiv_qr.c: Remove statement with no effect.
4676	Rename dead variable to `dummy'.
4677
46782005-12-15  Torbjorn Granlund  <tege@swox.com>
4679
4680	* demos/pexpr.c (setup_error_handler): Add a missing ";".
4681
46822005-11-27  Torbjorn Granlund  <tege@swox.com>
4683
4684	* mpn/generic/mul.c: Crudely call mpn_mul_fft_full before checking
4685	for unbalanced operands.
4686
4687	* mpn/generic/mul_fft.c: Remove many scalar divisions.
4688	(mpn_mul_fft_lcm): Simplify.
4689	(mpn_mul_fft_decompose): Rewrite to handle arbitrarily unbalanced
4690	operands.
4691
46922005-11-22  Torbjorn Granlund  <tege@swox.com>
4693
4694	* configure.in: Properly recognize all 32-bit Solaris releases.
4695
46962005-11-10  Torbjorn Granlund  <tege@swox.com>
4697
4698	* mpn/generic/mul_fft.c: Inline mpn_fft_mul_2exp_modF,
4699	mpn_fft_add_modF and mpn_fft_normalize.
4700
47012005-11-02  Torbjorn Granlund  <tege@swox.com>
4702
4703	* tests/mpz/reuse.c: Increase operand size, decrease # of reps.
4704
4705	* mpz/rootrem.c: Adapt to new mpn_rootrem.
4706	* mpz/root.c: Likewise.
4707
4708	* tests/mpz/reuse.c: Test mpz_rootrem.
4709
4710	With Paul Zimmermann:
4711	* mpn/generic/rootrem.c: Complete rewrite.
4712
47132005-10-31  Torbjorn Granlund  <tege@swox.com>
4714
4715	* mpz/pprime_p.c (mpz_probab_prime_p): Considerably limit trial
4716	dividing.
4717
4718	* mpz/perfpow.c (mpz_perfect_power_p): Use mpz_divisible_ui_p instead
4719	of mpz_tdiv_ui.
4720
4721	* mpz/divegcd.c: Correct probability number for GCD == 1.
4722
4723	* mpn/x86_64/mul_basecase.asm: Remove an obsolete comment.
4724
4725	* mpn/x86: Add cycle counts for array of x86 processors.
4726
4727	* mpn/x86/k7/mod_34lsub1.asm: Remove spurious mentions of ebp.
4728
4729	* mpn/powerpc32: Add POWER5 timings.
4730
4731	* mpn/powerpc32/README: Describe global reference variations.
4732
4733	* mpn/ia64/divrem_2.asm: Add some comments.
4734
4735	* mpn/ia64/divrem_1.asm: Reformat.
4736
4737	* mpn/ia64/addmul_2.asm: Correct a comment on slotting.
4738	* mpn/ia64/logops_n.asm: Likewise.
4739
4740	* mpn/ia64/addmul_1.asm: Remove a redundant preg mutex decl.
4741
4742	* mpn/generic/dive_1.c: Whitespace cleanup.
4743
4744	* mpn/alpha/ev6/nails/addmul_1.asm: Correct comments on slotting.
4745	* mpn/alpha/ev6/nails/addmul_2.asm: Likewise.
4746	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
4747
4748	* mpf/out_str.c: List some allocation improvement ideas.
4749
4750	* doc/gmp.texi: Update many URLs and email addresses.
4751
4752	* gmp-h.in (_GMP_H_HAVE_FILE): Check also _STDIO_H_INCLUDED.
4753
47542005-10-26  Torbjorn Granlund  <tege@swox.com>
4755
4756	* tune/tuneup.c (tune_mullow): Update param.max_size for each threshold
4757	measurement.
4758
4759	* configure.in (POWERPC64_PATTERN/*-*-darwin*): Set
4760	SPEED_CYCLECOUNTER_OBJ_mode64 and cyclecounter_size_mode64.
4761	(POWERPC64_PATTERN/*-*-linux*): Likewise.
4762
47632005-10-03  Torbjorn Granlund  <tege@swox.com>
4764
4765	* demos/factorize.c (factor_using_division_2kp): Honor verbose flag.
4766	(factor_using_pollard_rho): Divide out new factor before it's
4767	clobbered.  Don't stop factoring after a composite factor was found.
4768
47692005-09-17  Torbjorn Granlund  <tege@swox.com>
4770
4771	* demos/pexpr.c (fns): Add factorial keywords.
4772
47732005-08-16  Torbjorn Granlund  <tege@swox.com>
4774
4775	* tune/Makefile.am (EXTRA_DIST): Change "amd64" => "x86_64".
4776	* mpn/Makefile.am (TARG_DIST): Change "amd64" => "x86_64".
4777
47782005-08-15  Torbjorn Granlund  <tege@swox.com>
4779
4780	* configure.in: Change "amd64" => "x86_64".
4781
47822005-06-13  Torbjorn Granlund  <tege@swox.com>
4783
4784	* mpn/generic/pre_mod_1.c: Canonicalize variable names.
4785
4786	* mpn/generic/divrem.c: Rate qxn test as UNLIKELY.
4787
4788	* mpn/generic/gcdext.c (sanity_check_row): Invoke TMP_MARK.
4789
4790	* tune/tuneup.c (tune_mullow): Fix all max_size fields.
4791
4792	* gmp-impl.h (SQR_TOOM3_THRESHOLD_LIMIT): New #define.
4793	* tune/tuneup.c (tune_sqr): Use SQR_TOOM3_THRESHOLD_LIMIT.
4794	(sqr_toom3_threshold): Initialize from SQR_TOOM3_THRESHOLD_LIMIT.
4795
4796	* mpn/generic/mul_n.c (mpn_sqr_n): Use SQR_TOOM3_THRESHOLD_LIMIT.
4797
4798	* gmp-impl.h (mpn_nand_n, mpn_iorn_n, mpn_nior_n, mpn_xnor_n):
4799	Handle nails.
4800
48012005-06-13  Niels M�ller  <nisse@lysator.liu.se>
4802
4803	* mpn/generic/gcdext.c (gcdext_schoenhage): Check for the
4804	(unlikely) case that one of the hgcd/euclid steps results in two
4805	remainders of one limb each. Then use gcdext_1.
4806
48072005-06-12  Torbjorn Granlund  <tege@swox.com>
4808
4809	* mpn/alpha/ev6/sub_n.asm: Analogous changes as to add_n.asm last.
4810
48112005-06-11  Torbjorn Granlund  <tege@swox.com>
4812
4813	* mpn/alpha/ev6/add_n.asm: Rewrite inner loop to load later.
4814	Add mpn_add_nc entry.
4815
4816	* mpn/alpha/ev6/addmul_1.asm: Remove redundant initial loads.
4817
48182005-06-09  Torbjorn Granlund  <tege@swox.com>
4819
4820	* mpn/ia64/dive_1.asm: Fix issues with HP-UX.
4821
48222005-06-08  Torbjorn Granlund  <tege@swox.com>
4823
4824	* mpn/ia64/diveby3.asm: Update TODO list.
4825
4826	* mpn/ia64/mode1o.asm: Fix comment typos.
4827
4828	* mpn/ia64/dive_1.asm: New file.
4829
48302005-06-07  Torbjorn Granlund  <tege@swox.com>
4831
4832	* mpn/ia64/mode1o.asm: Add prefetching.
4833
4834	* mpn/generic/dive_1.c: Use variable h for upper umul_ppmm result.
4835
48362005-06-06  Torbjorn Granlund  <tege@swox.com>
4837
4838	* mpn/ia64/hamdist.asm: Complete rewrite.
4839	* mpn/ia64/popcount.asm: Rewrite to use multi-pronged feed-in.
4840
4841	* mpn/ia64/aors_n.asm: Rewrite feed-in code.
4842	* mpn/ia64/rsh1aors_n.asm: Likewise.
4843	* mpn/ia64/aorslsh1_n.asm: Likewise.
4844	* mpn/ia64/lorrshift.asm: Likewise.
4845
48462005-06-04  Torbjorn Granlund  <tege@swox.com>
4847
4848	* tests/devel/try.c (choice_array): Exclude mpn_preinv_mod_1 unless
4849	USE_PREINV_MOD_1.
4850	(choice_array): Exclude mpn_sqr_basecase if SQR_KARATSUBA_THRESHOLD
4851	is zero.
4852
48532005-06-03  Torbjorn Granlund  <tege@swox.com>
4854
4855	* mpn/alpha/ev6/addmul_1.asm: Prefix all labels with "$".
4856	* mpn/alpha/ev6/mul_1.asm: Likewise.
4857
48582005-06-02  Torbjorn Granlund  <tege@swox.com>
4859
4860	* tests/refmpn.c (refmpn_divmod_1c_workaround): Implement workaround
4861	to gcc 3.4.x bug triggered on powerpc64 with 32-bit ABI.
4862
48632005-06-01  Torbjorn Granlund  <tege@swox.com>
4864
4865	* tests/devel/try.c (main): Fix a typo.
4866
48672005-05-31  Torbjorn Granlund  <tege@swox.com>
4868
4869	* mpn/alpha/ev6/addmul_1.asm: Rewrite for L1 cache, add prefetch.
4870
48712005-05-30  Torbjorn Granlund  <tege@swox.com>
4872
4873	* tests/misc.c (tests_rand_start): Mask random seed to 32 bits.
4874
48752005-05-29  Torbjorn Granlund  <tege@swox.com>
4876
4877	* mpn/powerpc64/mode32/mul_1.asm: Handle BROKEN_LONGLONG_PARAM.
4878	* mpn/powerpc64/mode32/addmul_1.asm: Likewise.
4879	* mpn/powerpc64/mode32/submul_1.asm: Likewise.
4880
4881	* mpn/powerpc32/mode1o.asm: Rewrite to actually work.
4882
4883	* mpn/powerpc32/aix.m4 (LEA): New macro.
4884	(ASM_END): New macro.
4885
4886	* mpn/powerpc32/linux.m4: New file.
4887	* mpn/powerpc32/darwin.m4: New file.
4888	* configure.in: Use linux.m4 and darwin.m4.
4889	(powerpc64-linux-gnu): Add support for mode32.
4890
48912005-05-25  Torbjorn Granlund  <tege@swox.com>
4892
4893	* mpn/generic/mullow_n.c: Remove FIXME mentioning fixed flaw.
4894
4895	* tests/mpz/t-cmp_d.c (check_one): Fix printf fmt string typo.
4896
4897	* demos/isprime.c: #include stdlib.h.
4898	* tests/rand/t-urbui.c: Likewise.
4899	* tests/rand/t-urmui.c: Likewise.
4900
4901	* tests/mpz/t-popcount.c (check_random): Remove spurious printf arg.
4902
4903	* mpn/ia64/lorrshift.asm: Cleanup code layout.
4904	* mpn/ia64/popcount.asm: Likewise.
4905
49062005-05-24  Torbjorn Granlund  <tege@swox.com>
4907
4908	* tests/devel/try.c (param_init) [TYPE_GET_STR]: Set retval field.
4909	(compare): Handle SIZE_GET_STR as SIZE_RETVAL.
4910
4911	* tests/refmpn.c (refmpn_get_str): Rewrite to make it work.
4912
49132005-05-23  Torbjorn Granlund  <tege@swox.com>
4914
4915	* mpn/amd64/add_n.asm: Add mpn_add_nc entry point.
4916	* mpn/amd64/sub_n.asm: Add mpn_sub_nc entry point.
4917
4918	* longlong.h (many places): Remove lvalue casts.
4919
4920	* gmp-impl.h (MPF_SIGNIFICANT_DIGITS): Cast prec to avoid overflow
4921	for > 4G digits.
4922
4923	* mpn/alpha/ev6/add_n.asm: Prefetch using ldl.
4924	* mpn/alpha/ev6/sub_n.asm: Likewise.
4925
4926	* mpn/alpha/ev6/slot.pl (optable): Recognize negq and ldl.
4927
4928	* mpn/ia64/aors_n.asm: Prefetch using lfetch.
4929	* mpn/ia64/lorrshift.asm: Likewise.
4930	* mpn/ia64/popcount.asm: Likewise.
4931	* mpn/ia64/diveby3.asm: Likewise.
4932
49332005-05-22  Torbjorn Granlund  <tege@swox.com>
4934
4935	* mpn/alpha/ev67/popcount.asm: Prefetch.
4936	* mpn/alpha/ev67/hamdist.asm: Prefetch.
4937
4938	* longlong.h (add_ssaaaa) [x86]: Remove lvalue casts.
4939	(sub_ddmmss) [x86]: Likewise.
4940
4941	* tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Add DATA_SRC1_ODD.
4942	(param_init) [TYPE_MPZ_KRONECKER]: Clear inherited DATA_SRC1_ODD.
4943	(param_init) [TYPE_DIVEXACT_1]: Use symbolic name DIVISOR_LIMB.
4944
49452005-05-21  Torbjorn Granlund  <tege@swox.com>
4946
4947	* tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Initialize divisor
4948	field according to UDIV_NEEDS_NORMALIZATION.
4949
4950	* mpz/mul_i.h: Remove left-over TMP_XXXX marker arguments.
4951
49522005-05-20  Torbjorn Granlund  <tege@swox.com>
4953
4954	* mpn/x86/pentium4/sse2/addmul_1.asm (mpn_addmul_1c): Put carry in
4955	proper register.
4956
4957	* mpn/generic/sqr_basecase.c (mpn_sqr_basecase, addmul_2 version):
4958	Avoid accesses out-of-bound in MPN_SQR_DIAGONAL applicate code.
4959
49602005-05-19  Torbjorn Granlund  <tege@swox.com>
4961
4962	* mpn/alpha/diveby3.asm: Make it actually work.
4963
4964	* gmp-impl.h (MULLOW_BASECASE_THRESHOLD_LIMIT): New #define.
4965	* mpn/generic/mullow_n.c: Use fixed stack allocation for the smallest
4966	operands; use TMP_S* allocation for medium operands.
4967
4968	* gmp-impl.h: Remove nested TUNE_PROGRAM_BUILD test.
4969
49702005-05-18  Torbjorn Granlund  <tege@swox.com>
4971
4972	* mpn/generic/mul_n.c: Make squaring and multiplication code more
4973	similar.  Use TMP_S* functions.
4974
4975	* gmp-impl.h (TMP_DECL, TMP_MARK, TMP_FREE): Get rid of argument.
4976	(TMP_SALLOC): New macro for "small" allocations.
4977	(TMP_BALLOC): New macro for "big" allocations.
4978	(TMP_SDECL, TMP_SMARK, TMP_SFREE): New macros for functions that use
4979	just TMP_SALLOC.
4980	(WANT_TMP_ALLOCA): Make default functions choose alloca or reentrant
4981	functions, depending on size.
4982
4983	* *.c: Remove TMP_XXXX marker arguments.
4984
4985	* acinclude.m4 (WANT_TMP): Want tal-reent.lo also for alloca case.
4986
49872005-05-16  Torbjorn Granlund  <tege@swox.com>
4988
4989	* mpn/ia64/gmp-mparam.h: Further extend FFT tables.
4990
49912005-05-15  Torbjorn Granlund  <tege@swox.com>
4992
4993	* gmp-impl.h (udiv_qrnnd_preinv2): Pull an add into add_ssaaaa.
4994	(udiv_qrnnd_preinv2gen): Likewise.
4995
49962005-05-14  Torbjorn Granlund  <tege@swox.com>
4997
4998	* longlong.h (add_ssaaaa) [x86_64]: Restrict allowed immediate
4999	operands.
5000	* (sub_ddmmss) [x86_64]: Likewise.
5001
50022005-05-02  Torbjorn Granlund  <tege@swox.com>
5003
5004	* acinclude.m4 (GMP_HPC_HPPA_2_0): Make gmp_tmp_v1 sed pattern handle
5005	version numbers like B.11.X.32509-32512.GP.
5006
5007	* mpn/m68k/aors_n.asm: Correct MULFUNC_PROLOGUE.
5008
5009	* mpn/powerpc64/mode64/aors_n.asm: Add a MULFUNC_PROLOGUE.
5010
5011	* mpf/inp_str.c: Use plain int for mpf_set_str return value (works
5012	around gcc 4 bug).
5013
5014	* acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): Handle darwin's assembly
5015	syntax.
5016	(long long reliability test 1): New GMP_PROG_CC_WORKS_PART test.
5017	(long long reliability test 2): New GMP_PROG_CC_WORKS_PART test.
5018
5019	* configure.in: Add mode64 support for darwin.  Use darwin.m4.
5020	Add cflags_opt flags for mode32 darwin.
5021
5022	* mpn/powerpc64: Use L() for all asm files.
5023
5024	* mpn/asm-defs.m4 (PIC_ALWAYS): Define PIC just iff PIC_ALWAYS = "yes".
5025
5026	* mpn/powerpc64/darwin.m4: New file.
5027
5028	* mpn/powerpc64/linux64.m4: Remove TOCREF, add LDSYM.
5029	Rework DEF_OBJECT to need just one argument.
5030	* mpn/powerpc64/aix.m4: Likewise.
5031
5032	* mpn/powerpc64/mode64/invert_limb.asm: Load approx_tab address with
5033	LDSYM.  Optimize somewhat.  Remove 2nd DEF_OBJECT operand.
5034
50352005-05-01  Torbjorn Granlund  <tege@swox.com>
5036
5037	* mpn/generic/popham.c: Compute final summation differently for 64-bit.
5038
5039	* tests/mpz/t-popcount.c (check_random): New function.
5040	(main): Call it.
5041
50422005-04-28  Torbjorn Granlund  <tege@swox.com>
5043
5044	* mpn/amd64/add_n.asm: Use r9 instead of rbx to save push/pop.
5045	* mpn/amd64/sub_n.asm: Likewise.
5046
50472005-04-09  Torbjorn Granlund  <tege@swox.com>
5048
5049	* mpn/powerpc64/copyi.asm: If HAVE_ABI_mode32, ignore upper 32 bits of
5050	mp_size_t argument.
5051	* mpn/powerpc64/copyd.asm: Likewise.
5052	* mpn/powerpc64/sqr_diagonal.asm: Likewise.
5053	* mpn/powerpc64/lshift.asm: Likewise.
5054	* mpn/powerpc64/rshift.asm: Likewise.
5055	* mpn/powerpc64/logops_n.asm: Likewise.
5056	* mpn/powerpc64/com_n.asm: Likewise.
5057
50582005-04-08  Torbjorn Granlund  <tege@swox.com>
5059
5060	* mpn/generic/rootrem.c: Allocate PP_ALLOC limbs also for qp.
5061
50622005-04-07  Torbjorn Granlund  <tege@swox.com>
5063
5064	* mpn/powerpc32/add_n.asm: Add nc entry point.
5065	* mpn/powerpc32/sub_n.asm: Likewise.
5066
5067	* mpn/amd64/*.asm: Add Prescott/Nocona cycle/limb numbers.
5068
5069	* mpn/alpha/add_n.asm: Add correct cycle/limb numbers.
5070	* mpn/alpha/sub_n.asm: Likewise.
5071	* mpn/alpha/ev5/add_n.asm: Likewise.
5072	* mpn/alpha/ev5/sub_n.asm: Likewise.
5073
50742005-03-31  Torbjorn Granlund  <tege@swox.com>
5075
5076	* mpn/x86/k7/gmp-mparam.h: Fix typo in last change.
5077
50782005-03-19  Torbjorn Granlund  <tege@swox.com>
5079
5080	* mpn/amd64/gmp-mparam.h: Update.
5081
5082	* mpn/alpha/gmp-mparam.h: Update.
5083	* mpn/alpha/ev5/gmp-mparam.h: Update.
5084	* mpn/alpha/ev6/gmp-mparam.h: Update.
5085
5086	* mpn/ia64/gmp-mparam.h: Update.
5087
5088	* mpn/x86/p6/mmx/gmp-mparam.h: Update.
5089	* mpn/x86/pentium4/sse2/gmp-mparam.h: Update.
5090	* mpn/x86/k7/gmp-mparam.h: Update.
5091
5092	* tests/mpz/t-gcd.c (main): Honor command line reps argument.
5093
5094	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Simplify and correct code
5095	for generating test operands.
5096
50972005-03-17  Niels M�ller  <nisse@lysator.liu.se>
5098
5099	* mpn/generic/hgcd.c (qstack_adjust): New argument d, saying how much
5100	to adjust the top quotient.
5101	(hgcd_adjust): The quotient can be off by either 1 or 2.
5102
51032005-03-16  Torbjorn Granlund  <tege@swox.com>
5104
5105	* tests/mpz/t-gcd.c (MAX_SCHOENHAGE_THRESHOLD): Set to largest of
5106	gcd,gcdext thresholds.
5107
51082005-03-15  Niels M�ller  <nisse@lysator.liu.se>
5109
5110	* mpn/generic/gcdext.c (gcdext_schoenhage): When calling gcdext_lehmer,
5111	reuse all temporary limb storage, including the storage used for the
5112	qstack.
5113
51142005-03-09  Torbjorn Granlund  <tege@swox.com>
5115
5116	* mpn/amd64/logops_n.asm: Add MULFUNC_PROLOGUE.
5117
51182005-03-05  Torbjorn Granlund  <tege@swox.com>
5119
5120	* mpn/amd64/gmp-mparam.h: Extend MUL_FFT_TABLE and SQR_FFT_TABLE.
5121	* mpn/ia64/gmp-mparam.h: Likewise.
5122
51232005-02-17  Torbjorn Granlund  <tege@swox.com>
5124
5125	* mpn/ia64/divrem_1.asm: Add preinv entry point.
5126
51272005-01-13  Torbjorn Granlund  <tege@swox.com>
5128
5129	* gmp-impl.h (MPN_SIZEINBASE): Count bits in type size_t.
5130	(MPN_SIZEINBASE_16): Likewise.
5131
51322004-12-17  Torbjorn Granlund  <tege@swox.com>
5133
5134	* tune/speed.c (run_gnuplot): Use lines, not linespoints.
5135	Output a reset gnuplot command initially.
5136
51372004-12-04  Torbjorn Granlund  <tege@swox.com>
5138
5139	* mpn/generic/random2.c (gmp_rrandomb): Rework again.
5140	* mpz/rrandomb.c (gmp_rrandomb): Likewise.
5141
5142	* mpn/amd64/redc_1.asm: Call via PLT when PIC.
5143
51442004-11-29  Torbjorn Granlund  <tege@swox.com>
5145
5146	* mpn/amd64/divrem_1.asm: Add preinv entry point.
5147	* mpn/amd64/gmp-mparam.h: Set USE_PREINV_DIVREM_1 to 1.
5148
51492004-11-24  Torbjorn Granlund  <tege@swox.com>
5150
5151	* mpn/alpha/diveby3.asm: Use correct prefetch instruction.
5152
51532004-11-19  Torbjorn Granlund  <tege@swox.com>
5154
5155	* mpn/alpha/diveby3.asm: Add ",gp" glue in PROLOGUE.
5156	Add r31 dummy operand to `br' instruction.
5157
51582004-11-17  Torbjorn Granlund  <tege@swox.com>
5159
5160	* mpn/powerpc64/mode64/addmul_1.asm: Rewrite.
5161	* mpn/powerpc64/mode64/mul_1.asm: Rewrite.
5162
5163	* configure.in: Invoke AC_C_RESTRICT.
5164
51652004-11-16  Torbjorn Granlund  <tege@swox.com>
5166
5167	* mpn/alpha/diveby3.asm: New file.
5168
51692004-11-13  Torbjorn Granlund  <tege@swox.com>
5170
5171	* mpn/amd64/popham.asm: New file.
5172
51732004-11-12  Torbjorn Granlund  <tege@swox.com>
5174
5175	* mpn/amd64/add_n.asm: Correct cycle count.
5176	* mpn/amd64/sub_n.asm: Likewise.
5177
5178	* mpn/amd64/dive_1.asm: Speed divisors with many factors of 2.
5179
51802004-11-11  Torbjorn Granlund  <tege@swox.com>
5181
5182	* mpn/amd64/dive_1.asm: New file.
5183
51842004-11-10  Torbjorn Granlund  <tege@swox.com>
5185
5186	* mpn/generic/popham.c: Add comment.
5187
51882004-11-09  Torbjorn Granlund  <tege@swox.com>
5189
5190	* mpn/amd64/com_n.asm: New file.
5191
5192	* mpn/amd64/logops_n.asm: New file.
5193
51942004-11-08  Torbjorn Granlund  <tege@swox.com>
5195
5196	* mpn/powerpc64/com_n.asm: New file.
5197
51982004-11-05  Torbjorn Granlund  <tege@swox.com>
5199
5200	* mpn/amd64/diveby3.asm: New file.
5201
5202	* config.guess: Strip any PPC string in /proc/cpuinfo.
5203	Recognize 970 in that code.
5204
52052004-11-01  Torbjorn Granlund  <tege@swox.com>
5206
5207	* mpn/amd64/mul_basecase.asm: New file.
5208
5209	* mpn/amd64/redc_1.asm: New file.
5210
52112004-10-25  Torbjorn Granlund  <tege@swox.com>
5212
5213	* mpn/powerpc64/mode64/addlsh1_n.asm: Correct cycle counts.
5214
5215	* mpn/powerpc64/README: Update POWER5/PPC970 pipeline information.
5216
5217	* mpn/generic/mul_basecase.c (MAX_LEFT): Add comment.
5218
5219	* doc/gmp.texi: Consistently use "x86" denotation.
5220	(Assembler SIMD Instructions): Mention SSE2 usage.
5221
5222	* demos/pexpr.c (main): Handle "negative" base in mpz_sizeinbase call.
5223
52242004-10-18  Torbjorn Granlund  <tege@swox.com>
5225
5226	* mpn/powerpc64/mode64/submul_1.asm: Shave 2 cycles/limb with new carry
5227	inversion trick.
5228
52292004-10-16  Torbjorn Granlund  <tege@swox.com>
5230
5231	* configure.in: Support icc under x86.
5232	(ia64-*-linux*): Pass -no-gcc to icc.
5233
52342004-10-15  Torbjorn Granlund  <tege@swox.com>
5235
5236	* longlong.h (ia64 umul_ppmm): Add version for icc.
5237
5238	* configure.in: Support icc under ia64-*-linux*.
5239
5240	* acinclude.m4: New "compiler works" test for icc 8.1 bug.
5241	(GMP_PROG_CC_IS_GNU): Don't let Intel's icc fool us it is GCC.
5242
52432004-10-14  Torbjorn Granlund  <tege@swox.com>
5244
5245	* mpn/generic/gcdext.c: Add a few missing TMP_MARK.
5246
52472004-10-14  Torbjorn Granlund  <tege@swox.com>
5248
5249	* acinclude.m4 (GMP_ASM_W32): Try also "data4".
5250
5251	* mpn/ia64/logops_n.asm: Don't use naked "br", rejected by Intel
5252	assembler.
5253	* mpn/ia64/aors_n.asm: Likewise.
5254
5255	* mpn/ia64/divrem_2.asm: Add ".prologue".
5256
5257	* mpn/ia64/hamdist.asm: Put alloc first in bundle, enforced by the
5258	Intel assembler.
5259
5260	* longlong.h: Exclude masquerading __INTEL_COMPILER from ia64 asm.
5261	* gmp-impl.h: Likewise.
5262
52632004-10-12  Torbjorn Granlund  <tege@swox.com>
5264
5265	* mpn/ia64/mul_2.asm: Rewrite function entry code, write new code for
5266	n=2.
5267	* mpn/ia64/addmul_2.asm: Likewise.
5268
5269	* tests/devel/try.c: Handle mpn_mul_2 like mpn_addmul_2.
5270
5271	* tune/speed.c (routine): Make R parameter optional for mpn_mul_2.
5272
52732004-10-11  Torbjorn Granlund  <tege@swox.com>
5274
5275	* mpn/sparc64/addmul_1.asm: Update a comment.
5276
5277	* tests/devel/aors_n.c: #include tests.h.
5278	* tests/devel/anymul_1.c: Likewise.
5279	* tests/devel/shift.c: Likewise.
5280	* tests/devel/copy.c: Likewise.
5281
5282	* tests/devel/aors_n.c: Handle also mpn_addlsh1_n, mpn_sublsh1_n,
5283	mpn_rsh1add_n, and mpn_rsh1sub_n.
5284
5285	* mpn/ia64/submul_1.asm: Add TODO item.
5286
5287	* mpn/ia64/aors_n.asm: Rewrite function entry code (again).
5288	* mpn/ia64/aorslsh1_n.asm: Likewise.
5289	* mpn/ia64/logops_n.asm: Likewise.
5290
5291	* mpn/ia64/rsh1aors_n.asm: Tune function entry and feed-in code.
5292	* mpn/ia64/lorrshift.asm: Likewise.  Remove several spurious loads.
5293
5294	* tests/devel/Makefile.am (EXTRA_PROGRAMS): Updates for yesterday's
5295	file removals and additions.
5296
52972004-10-10  Torbjorn Granlund  <tege@swox.com>
5298
5299	* mpn/ia64/copyi.asm: Tune function entry code.
5300	* mpn/ia64/copyd.asm: Likewise.
5301
5302	* mpn/ia64/logops_n.asm: Tune function entry and feed-in code for speed
5303	and size.
5304	* mpn/ia64/aors_n.asm: Likewise.
5305
5306	* mpn/powerpc64/logops_n.asm: Correct cycles counts.
5307	* mpn/powerpc64/mode64/aors_n.asm: Likewise.
5308
5309	* tests/devel/copy.c: Handle both MPN_COPY_INCR and MPN_COPY_DECR.
5310
5311	* tests/devel/logops_n.c: New file, handle all logical operations.
5312
5313	* tests/devel/anymul_1.c: New file, handle mpn_mul_1, mpn_addmul_1, and
5314	mpn_submul_1
5315	* tests/devel/mul_1.c: Remove.
5316	* tests/devel/addmul_1.c: Remove.
5317	* tests/devel/submul_1.c: Remove.
5318
5319	* tests/devel/shift.c: New file, handle mpn_lshift and mpn_rshift.
5320	* tests/devel/lshift.c: Remove.
5321	* tests/devel/rshift.c: Remove.
5322
5323	* tests/devel/aors_n.c: New file, handle mpn_add_n and mpn_sub_n.
5324	* tests/devel/add_n.c: Remove.
5325	* tests/devel/sub_n.c: Remove.
5326
53272004-10-09  Torbjorn Granlund  <tege@swox.com>
5328
5329	* mpn/powerpc64/linux64.m4: Define DEF_OBJECT, END_OBJECT, and TOCREF.
5330	* mpn/powerpc64/aix.m4: Likewise.
5331	* mpn/powerpc64/mode64/invert_limb.asm: Use DEF_OBJECT, END_OBJECT, and
5332	TOCREF for approx_tab.
5333
5334	* mpn/amd64/mul_1.asm: Add mpn_mul_1c entry point.
5335
53362004-10-08  Torbjorn Granlund  <tege@swox.com>
5337
5338	* mpn/powerpc64/copyi.asm: New file.
5339	* mpn/powerpc64/copyd.asm: New file.
5340	* gmp-h.in: Remove PPC MPN_COPY variants.
5341	* gmp-impl.h: Likewise.
5342
5343	* mpn/powerpc64/logops_n.asm: New file.
5344
5345	* mpn/powerpc64/mode64/invert_limb.asm: New file.
5346
53472004-10-07  Torbjorn Granlund  <tege@swox.com>
5348
5349	* mpn/powerpc64/mode64/aors_n.asm: New file, optimized for POWER4 and
5350	its derivatives.
5351	* mpn/powerpc64/mode64/add_n.asm: Delete.
5352	* mpn/powerpc64/mode64/sub_n.asm: Delete.
5353
5354	* configfsf.guess: Patch HP-UX code to accommodate HP compiler's new
5355	inability to read from stdin.
5356
5357	* mpn/powerpc64/mode64/addsub_n.asm: Remove accidentally added file.
5358
53592004-10-02  Torbjorn Granlund  <tege@swox.com>
5360
5361	* mpn/amd64/README: Update for new developments, fix typos.
5362
5363	* mpn/amd64/mul_1.asm: Tweak addressing (3.25 => 3.0 cycles/limb).
5364
5365	* mpn/amd64/addmul_1.asm: Remove unreachable code block.
5366
53672004-09-30  Torbjorn Granlund  <tege@swox.com>
5368
5369	* mpn/amd64/addmul_1.asm: Rewrite, now 3.25 cycles/limb.
5370
5371	* mpn/ia64/addmul_1.asm: Slightly enhance cross-jumping for code
5372	density.
5373	* mpn/ia64/mul_1.asm: Analogous changes.
5374
53752004-09-29  Torbjorn Granlund  <tege@swox.com>
5376
5377	* gmp-impl.h (x86 ULONG_PARITY): Work around GCC change of "q" register
5378	flag.
5379
53802004-09-28  Torbjorn Granlund  <tege@swox.com>
5381
5382	* mpn/ia64/divrem_1.asm: Add cycle counts to loop.
5383
5384	* mpn/ia64/divrem_2.asm: New file.
5385
53862004-09-28  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
5387
5388	* mpn/generic/mul_fft.c (mpn_mul_fft): Fix a bug in the choice of the
5389	recursive fft parameters.
5390
53912004-09-20  Torbjorn Granlund  <tege@swox.com>
5392
5393	* tests/misc.c (tests_rand_start): Default to strtoul for re-seeding.
5394
5395	* tests/mpz/t-mul.c (ref_mpn_mul): Fudge tmp allocation for toom3.
5396
53972004-09-19  Torbjorn Granlund  <tege@swox.com>
5398
5399	* tests/misc.c (tests_rand_start): Shift tv_usec for better seeding.
5400
54012004-09-18  Torbjorn Granlund  <tege@swox.com>
5402
5403	* tests/misc.c (tests_rand_start): Invoke fflush after printing seed.
5404
5405	* tests/mpz/t-mul.c (main): Check environment for GMP_CHECK_FFT, run
5406	extra FFT tests if set.
5407	(ref_mpn_mul): Use library code for kara and toom, but skewded so that
5408	we never use the same algorithm that we're testing.
5409	(mul_kara): Delete.
5410	(debug_mp): Print just one line of large numbers.
5411	(ref_mpn_mul): Rework usage of tp temporary space.
5412
54132004-09-15  Torbjorn Granlund  <tege@swox.com>
5414
5415	* mpn/ia64/mul_2.asm: For HAVE_ABI_32, convert vp.
5416	* mpn/ia64/addmul_2.asm: Likewise.
5417
54182004-09-13  Torbjorn Granlund  <tege@swox.com>
5419
5420	* mpn/ia64/invert_limb.asm: Rewrite.
5421
5422	* mpn/ia64/logops_n.asm: Insert some more stops.
5423
54242004-09-12  Torbjorn Granlund  <tege@swox.com>
5425
5426	* mpn/ia64/gmp-mparam.h: Update.
5427	* mpn/amd64/gmp-mparam.h: Update.
5428
5429	* mpn/ia64/sqr_diagonal.asm: Shave off a few cycles.
5430
54312004-09-11  Torbjorn Granlund  <tege@swox.com>
5432
5433	* mpn/ia64/mul_2.asm: New file.
5434	* mpn/ia64/addmul_2.asm: New file.
5435
5436	* mpn/ia64/addmul_1.asm: Tune a cycle from prologue.
5437
5438	* mpn/ia64/lorrshift.asm: Insert stops after several branches.
5439	* mpn/ia64/aorslsh1_n.asm: Likewise.
5440	* mpn/ia64/rsh1aors_n.asm: Likewise.
5441
5442	* mpn/generic/sqr_basecase.c: In variant for HAVE_NATIVE_mpn_addmul_2,
5443	accumulate carry also for when HAVE_NATIVE_mpn_addlsh1_n.
5444
54452004-09-07  Torbjorn Granlund  <tege@swox.com>
5446
5447	* mpn/ia64/submul_1.asm: Rewrite.
5448
5449	* mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
5450	* mpn/ia64/mul_1.asm: Likewise.
5451
54522004-09-02  Torbjorn Granlund  <tege@swox.com>
5453
5454	* mpn/ia64/mul_1.asm: Optimize feed-in code.
5455	* mpn/ia64/addmul_1.asm: Rewrite feed-in code.
5456
54572004-08-29  Torbjorn Granlund  <tege@swox.com>
5458
5459	* tests/mpz/t-sizeinbase.c: Disable mpz_fake_bits and check_sample.
5460
54612004-07-16  Torbjorn Granlund  <tege@swox.com>
5462
5463	* mpn/ia64/addmul_1.asm: Format to placate HP-UX assembler.
5464
54652004-06-17  Kevin Ryde  <kevin@swox.se>
5466
5467	* doc/gmp.texi: Use @. when sentence ends with a capital, for good
5468	spacing in tex.
5469	(Language Bindings): Add gmp-d, reported by Ben Hinkle.  Update SWI
5470	Prolog URL, reported by Jan Wielemaker.
5471
54722004-06-09  Torbjorn Granlund  <tege@swox.com>
5473
5474	* configure.in: Handle --enable-fat.  Use that to enable x86 fat
5475	builds, remove magic meaning of i386-*-*.
5476
54772004-06-03  Kevin Ryde  <kevin@swox.se>
5478
5479	* gmp-impl.h (memset): Use a local char* pointer, in case parameter is
5480	something else (eg. tune/common.c).  Reported by Emmanuel Thom�.
5481
54822004-06-01  Kevin Ryde  <kevin@swox.se>
5483
5484	* config.guess (i?86-*-*): Avoid "Illegal instruction" message which
5485	goes to stdout on 80386 freebsd4.9.
5486
54872004-05-23  Niels M�ller  <nisse@lysator.liu.se>
5488
5489	* mpn/generic/gcdext.c (gcdext_1_u): New function.
5490	(mpn_gcdext): Use it.
5491
54922004-05-23  Torbjorn Granlund  <tege@swox.com>
5493
5494	* mpn/generic/gcdext.c (gcdext_1_odd): Use masking to avoid jumps.
5495
54962004-05-22  Torbjorn Granlund  <tege@swox.com>
5497
5498	* mpn/x86/pentium4/sse2/addmul_1.asm: Add Prescott cycle numbers.
5499
5500	* mpn/amd64/divrem_1.asm: Shave a cycle from fraction development code.
5501
5502	* mpn/powerpc32/lshift.asm: Add more cycle numbers.
5503	* mpn/powerpc32/rshift.asm: Likewise.
5504
5505	* mpn/ia64/addmul_1.asm: Reformat.
5506
55072004-05-21  Torbjorn Granlund  <tege@swox.com>
5508
5509	* gmp-impl.h (mpn_mullow_n, mpn_mullow_basecase): Declare.
5510
5511	* tune/Makefile.am: Compile gcdext.c.
5512
5513	* gmp-impl.h (GET_STR_THRESHOLD_LIMIT): Lower outrageous value to 150.
5514	(GCDEXT_SCHOENHAGE_THRESHOLD): Set reasonable default.  Override when
5515	TUNE_PROGRAM_BUILD.
5516	(GCDEXT_THRESHOLD): Remove.
5517
5518	* tune/tuneup.c (gcdext_schoenhage_threshold): New variable.
5519	(gcdext_threshold): Remove variable.
5520	(tune_gcd_schoenhage): Lower step_factor to 0.1.
5521	(tune_gcdext_schoenhage): New function, based on tune_gcd_schoenhage.
5522	(tune_gcdext): Remove function.
5523	(all): Corresponding changes.
5524
55252004-05-21  Niels M�ller  <nisse@lysator.liu.se>
5526
5527	* mpn/generic/gcdext.c: Complete rewrite.  Uses fast Lehmer code for
5528	small operands, and Schoenhage code for large operands.
5529
5530	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Ensure first operand is
5531	not smaller than 2nd operand.
5532
55332004-05-17  Kevin Ryde  <kevin@swox.se>
5534
5535	* gmp-h.in (mpz_get_ui): Use #if instead of plain if, and for nails
5536	use ?: same as normal case, to avoid warnings from Borland C++ 6.0.
5537	Reported by delta trinity.
5538
55392004-05-15  Kevin Ryde  <kevin@swox.se>
5540
5541	* tune/time.c (getrusage_backwards_p): New function
5542	(speed_time_init): Use it to exclude broken netbsd1.4.1 getrusage.
5543	* configure.in (m68*-*-netbsd1.4*): Remove code pretending getrusage
5544	doesn't exist.
5545	* tune/README (NetBSD 1.4.1 m68k): Update notes.
5546
5547	* configure.in (mips*-*-* ABI=n32): Remove gcc_n32_ldflags and
5548	cc_n32_ldflags, libtool knows to put the linker in n32 mode.
5549
55502004-05-15  Torbjorn Granlund  <tege@swox.com>
5551
5552	* config.guess (powerpc*-*-*): Add more processor types to mfpvr code.
5553	* configure.in: Generalize powerpc subtype matching code.
5554
5555	* mpz/fac_ui.c: Misc cleanups, spelling corrections.
5556
55572004-05-14  Kevin Ryde  <kevin@swox.se>
5558
5559	* mpf/sub.c: When one operand cancels high limbs of the other, strip
5560	high zeros on the balance before truncating to destination precision.
5561	Truncating first loses accuracy and can lead to a result 0 despite
5562	operands being not equal.  Reported by John Abbott.
5563	Also, ensure exponent is zero when result is zero, for instance if
5564	operands are exactly equal.
5565	* tests/mpf/t-sub.c (check_data): New function, exercising these.
5566
55672004-05-12  Kevin Ryde  <kevin@swox.se>
5568
5569	* configure.in (AC_PROG_RANLIB): New macro, supposedly required by
5570	automake, though it doesn't complain.
5571
5572	* demos/expr/Makefile.am (ARFLAGS): Add a default setting, to
5573	workaround an automake bug.
5574
55752004-05-10  Kevin Ryde  <kevin@swox.se>
5576
5577	* */Makefile.in, install-sh, aclocal.m4: Update to automake 1.8.4.
5578
5579	* doc/gmp.texi (Demonstration Programs): Add a remark about expression
5580	evaluation in the main gmp library.
5581
5582	* demos/expr/exprfa.c (mpf_expr_a): Correction to mpX_init, use
5583	mpf_init2 to follow requested precision.
5584	* demos/expr/exprza.c, demos/expr/exprqa.c: Use wrappers for mpX_init,
5585	to make parameters match.
5586
5587	* demos/expr/run-expr.c: Don't use getopt, to avoid needing configury
5588	for optarg declaration.  Remove TRY macro, rename foo and bar to var_a
5589	and var_b, for clarity.
5590	* demos/expr/expr-impl.h: Don't use expr-config.h.
5591	* configure.in (demos/expr/expr-config.h): Remove.
5592	* demos/expr/expr-config.in: Remove file.
5593
55942004-05-08  Kevin Ryde  <kevin@swox.se>
5595
5596	* doc/configuration (Configure): Update for current automake not
5597	copying acinclude.m4 into aclocal.m4.
5598
5599	* configure.in, Makefile.am, doc/gmp.texi, doc/configuration,
5600	tests/cxx/Makefile.am, demos/expr/Makefile.am, demos/expr/README,
5601	demos/expr/expr.c, demos/expr/expr.h, demos/expr/expr-config-h.in,
5602	demos/expr/expr-impl.h, demos/expr/run-expr.c, demos/expr/t-expr.c:
5603	MPFR now published separately, remove various bits.
5604	* mpfr/*, tests/cxx/t-headfr.cc, demos/expr/exprfr.c,
5605	demos/expr/exprfra.c: Remove.
5606
56072004-05-07  Kevin Ryde  <kevin@swox.se>
5608
5609	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Amend c++ shared library
5610	path hack, on k62-unknown-dragonfly1.0 /usr/bin/make runs its commands
5611	"set -e", so we need an "|| true" in case there's nothing to copy (for
5612	instance in a static build).
5613
56142004-05-06  Kevin Ryde  <kevin@swox.se>
5615
5616	* mpn/alpha/mode1o.c: Remove, in favour of ...
5617	* mpn/alpha/mode1o.asm: New file.
5618	* mpn/alpha/alpha-defs.m4 (bwx_available_p): New macro.
5619
5620	* tune/amd64.asm: Save rbx in r10 rather than on the stack.
5621
5622	* configure.in (x86_64-*-*): Try also "-march=k8 -mno-sse2", in case
5623	we're in ABI=32 on an old OS not supporting xmm regs.
5624	(GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): Run these tests under
5625	-march=k8 too, and not under ABI=64.
5626
5627	* doc/gmp.texi (Converting Integers): For mpz_get_d, note truncation
5628	and overflows.  For mpz_get_d_2exp note truncation, note result if
5629	OP==0, and cross reference libc frexp.
5630	(Rational Conversions): For mpq_get_d, note truncation and overflows.
5631	(Converting Floats): For mpf_get_d, note truncation and overflows.
5632	For mpf_get_d_2exp, note truncation, note result if OP==0.
5633	(Assembler Code Organisation): Note nails subdirectories.
5634	Clarification of get_d_2exp OP==0 reported by Sylvain Pion.
5635
56362004-05-05  Torbjorn Granlund  <tege@swox.com>
5637
5638	* mpn/generic/mullow_n.c, mpn/generic/mullow_basecase.c: New files
5639	(mainly by Niels M�ller).
5640	* configure.in, mpn/Makefile.am: Add them.
5641
5642	* gmp-impl.h (MULLOW_BASECASE_THRESHOLD, MULLOW_DC_THRESHOLD,
5643	MULLOW_MUL_N_THRESHOLD): Override for TUNE_PROGRAM_BUILD.
5644
5645	* tune/Makefile.am: Compile mullow_n.c.
5646	* tune/common.c (speed_mpn_mullow_n, speed_mpn_mullow_basecase):
5647	New functions.
5648	* tune/speed.c (routine): Add entries for mpn_mullow_n and
5649	mpn_mullow_basecase.
5650	* tune/speed.h (SPEED_ROUTINE_MPN_MULLOW_N_CALL,
5651	SPEED_ROUTINE_MPN_MULLOW_BASECASE): New #defines.
5652	* tune/tuneup.c (tune_mullow): New function.
5653
5654	* gmp-impl.h (invert_limb): Compute branch-freely.
5655
56562004-05-02  Kevin Ryde  <kevin@swox.se>
5657
5658	* mpn/amd64/mode1o.asm: Use movabsq to support large model non-PIC.
5659	Use 32-bit insns to save code bytes, and to save a couple of cycles on
5660	the initial setup multiplies.
5661
56622004-05-01  Kevin Ryde  <kevin@swox.se>
5663
5664	* doc/gmp.texi (References): Update gcc online docs url to
5665	gcc.gnu.org.
5666
5667	* configure.in (mips*-*-irix[6789]*): Correction to m4 quoting of this
5668	pattern.  (Believe the mips64*-*-* part also used picks up all current
5669	irix6 tuples anyway.)  Reported by Rainer Orth.
5670
56712004-04-30  Kevin Ryde  <kevin@swox.se>
5672
5673	* acinclude.m4 (GMP_PROG_CC_X86_GOT_EAX_EMITTED,
5674	GMP_ASM_X86_GOT_EAX_OK): New macros.
5675	(GMP_PROG_CC_WORKS): Use them to detect an old gas bug tickled by
5676	recent gcc.  Reported by David Newman.
5677
5678	* doc/gmp.texi (Reentrancy): Note also gmp_randinit_default as an
5679	alternative to gmp_randinit.
5680
56812004-04-29  Torbjorn Granlund  <tege@swox.com>
5682
5683	* configfsf.guess: Update to 2004-03-12.
5684	* configfsf.sub: Likewise.
5685
56862004-04-27  Torbjorn Granlund  <tege@swox.com>
5687
5688	* mpz/rrandomb.c (gmp_rrandomb): Rework to avoid extra limb allocation
5689	and to generate even numbers.
5690	* mpn/generic/random2.c (gmp_rrandomb): Likewise.
5691
56922004-04-25  Kevin Ryde  <kevin@swox.se>
5693
5694	* gmp-impl.h (FORCE_DOUBLE): Don't use an asm with a match constraint
5695	on a memory output, apparently not supported and provokes a warning
5696	from gcc 3.4.
5697
56982004-04-24  Kevin Ryde  <kevin@swox.se>
5699
5700	* longlong.h (count_leading_zeros_gcc_clz,
5701	count_trailing_zeros_gcc_ctz): New macros.
5702	(count_leading_zeros, count_trailing_zeros) [x86]: Use them on gcc
5703	3.4.
5704
5705	* configure.in (x86-*-* gcc_cflags_cpu): Give a -mtune at the start of
5706	each option list, for use by gcc 3.4 to avoid deprecation warnings
5707	about -mcpu.
5708
5709	* mpz/aorsmul.c, mpz/aorsmul_i.c, mpz/cfdiv_q_2exp.c,
5710	mpz/cfdiv_r_2exp.c, mpq/aors.c, mpf/ceilfloor.c: Give REGPARM_ATTR()
5711	on function definition too, as demanded by gcc 3.4.
5712
57132004-04-22  Kevin Ryde  <kevin@swox.se>
5714
5715	* tests/rand/t-lc2exp.c (check_bigc1): New test.
5716
5717	* doc/fdl.texi: Tweak @appendixsubsec -> @appendixsec to match our
5718	preference for this in an @appendix, and because texi2pdf doesn't
5719	support @appendixsubsec directly within an @appendix.
5720
57212004-04-20  Kevin Ryde  <kevin@swox.se>
5722
5723	* doc/texinfo.tex: Update to 2004-04-07.08 from texinfo 4.7.
5724	* doc/gmp.texi, mpfr/mpfr.texi (@copying): Don't put a line break in
5725	@ref within @copying, recent texinfo.tex doesn't like that.
5726
5727	* demos/perl/GMP.xs (static_functable): Treat cygwin the same as mingw
5728	DLLs.
5729
5730	* */Makefile.in, install-sh: Update to automake 1.8.3.
5731	* ltmain.sh, aclocal.m4, configure: Update to libtool 1.5.6.
5732
5733	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): Use a compile-time constant
5734	expression, rather than a configure test.
5735	* acinclude.m4, configure.in (GMP_C_RIGHT_SHIFT): Remove, no longer
5736	needed.
5737	* tests/t-hightomask.c: New file.
5738	* tests/Makefile.am (check_PROGRAMS): Add it.
5739
5740	* macos/configure (parse_top_configure): Look for PACKAGE_NAME and
5741	PACKAGE_VERSION now used by autoconf.
5742	(what_objects): Only demand 9 object files, as for instance occurs in
5743	the scanf directory.
5744	(asm files): Transform labels L(foo) -> Lfoo.  Take func name from
5745	PROLOGUE to support empty "EPILOGUE()".  Recognise and substitute
5746	register name "define()"s.
5747	* macos/Makefile.in (CmnObjs): Add tal-notreent.o.
5748
57492004-04-19  Torbjorn Granlund  <tege@swox.com>
5750
5751	* tune/speed.h (SPEED_ROUTINE_MPN_ROOTREM): New #define.
5752	(speed_mpn_rootrem): Declare.
5753	* tune/common.c (speed_mpn_rootrem): New function.
5754	* tune/speed.c (routine): Add entry for mpn_rootrem.
5755
57562004-04-16  Kevin Ryde  <kevin@swox.se>
5757
5758	* doc/fdl.texi: Update from FSF, just fixing a couple of typos.
5759
5760	* macos/configure, macos/Makefile.in: Add printf and scanf directories.
5761
5762	* tests/mpz/t-gcd.c (check_data): New function, exercising K6
5763	gcd_finda bug.
5764
57652004-04-14  Kevin Ryde  <kevin@swox.se>
5766
5767	* doc/gmp.texi (Reentrancy, Random State Initialization): Note
5768	gmp_randinit use of gmp_errno is not thread safe.  Reported by Vincent
5769	Lef�vre.
5770
5771	* doc/gmp.texi (Random State Initialization): Add index entries for
5772	gmp_errno and constants.
5773
5774	* mpn/m68k/README: Update _SHORT_LIMB -> __GMP_SHORT_LIMB.
5775
5776	* configure.in (--enable-mpbsd): Typo Berkley -> Berkeley in help msg.
5777
57782004-04-12  Kevin Ryde  <kevin@swox.se>
5779
5780	* demos/perl/GMP.xs (static_functable): New macro, use it for all
5781	function tables, to support mingw DLL builds.
5782	* demos/perl/INSTALL (NOTES FOR PARTICULAR SYSTEMS): Remove note on
5783	DLLs, should be ok now.
5784
5785	* demos/perl/sample.pl: Print the module and library versions in use.
5786
5787	* demos/perl/GMP.pm, Makefile.PL (VERSION): Set to '2.00'.
5788	* demos/perl/GMP.pm (COPYRIGHT): New in the doc section.
5789
5790	* Makefile.am: Note 4.1.3 libtool versioning info, and REVISION policy.
5791
5792	* tal-debug.c: Add <stdlib.h> for abort.
5793
57942004-04-07  Torbjorn Granlund  <tege@swox.com>
5795
5796	* tests/refmpf.c (refmpf_add_ulp): Adjust exponent when needed.
5797
5798	* mpn/generic/random2.c: Rewrite (clone mpz/rrandomb.c).
5799
58002004-04-07  Kevin Ryde  <kevin@swox.se>
5801
5802	* mpn/x86/k6/gcd_finda.asm: Correction jbe -> jb in initial setups.
5803	Zero flag is wrong here, it relects only the high limb of the compare,
5804	leading to n1>=n2 not satisfied and wrong results.  cp[1]==0x7FFFFFFF
5805	with cp[0]>=0x80000001 provokes this.
5806
5807	* doc/gmp.texi (BSD Compatible Functions): Note "pow" name clash under
5808	the pow function description too.
5809	(Language Bindings): Add XEmacs (betas at this stage).  Reported by
5810	Jerry James.
5811
5812	* tests/refmpn.c (refmpn_mod2): Correction to ASSERTs, r==a is allowed.
5813
5814	* gen-psqr.c (generate_mod): Cast mpz_invert_ui_2exp args, for K&R.
5815	* gen-bases.c, gen-fib.c, gen-psqr.c: For mpz_out_str, use stdout
5816	instead of 0, in case a K&R treats int and FILE* params differently.
5817
58182004-04-04  Kevin Ryde  <kevin@swox.se>
5819
5820	* gmp-impl.h (BSWAP_LIMB) [amd64]: New macro.
5821	(FORCE_DOUBLE): Use this for amd64 too.
5822
5823	* tests/amd64check.c, tests/amd64call.asm: New files, derived in part
5824	from x86check.c and x86call.asm.
5825	* tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add them.
5826	* configure.in (x86_64-*-* ABI=64): Use them.
5827
58282004-04-03  Kevin Ryde  <kevin@swox.se>
5829
5830	* mpn/amd64/mode1o.asm: New file.
5831	* mpn/amd64/amd64-defs.m4 (ASSERT): New macro.
5832
5833	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/pentium4/sse2/divrem_1.asm: Add
5834	note on how "dr" part of algorithm is handled.
5835
5836	* mpn/x86/k7/dive_1.asm, mpn/x86/k7/mod_34lsub1.asm,
5837	mpn/x86/k7/mode1o.asm: Note Hammer (32-bit mode) speeds.
5838
58392004-03-31  Kevin Ryde  <kevin@swox.se>
5840
5841	* doc/gmp.texi (Language Bindings): Add GOO, MLGMP and Numerix.
5842
5843	* mpf/mul_2exp.c, mpf/div_2exp.c: Rate u==0 as UNLIKELY.
5844
58452004-03-28  Torbjorn Granlund  <tege@swox.com>
5846
5847	* mpn/amd64/divrem_1.asm: Trim a few cycles.
5848
58492004-03-27  Torbjorn Granlund  <tege@swox.com>
5850
5851	* mpn/amd64/sublsh1_n.asm: Fix typo.
5852
5853	* mpn/generic/divrem_1.c: Fix typo.
5854
5855	* mpn/generic/sqr_basecase.c: Fix typo.
5856
5857	* mpn/amd64/divrem_1.asm: New file.
5858
58592004-03-20  Kevin Ryde  <kevin@swox.se>
5860
5861	* longlong.h (power, powerpc): Add comments on how we select this code.
5862
5863	* gmp-h.in (mpz_get_ui): Use ?: instead of mask style, gcc treats the
5864	two identically but ?: is a bit clearer.
5865
5866	* insert-dbl.c: Remove file, no longer used, scaling is now integrated
5867	in mpn_get_d.
5868	* Makefile.am (libgmp_la_SOURCES): Remove insert-dbl.c.
5869	* gmp-impl.h (__gmp_scale2): Remove prototype.
5870
58712004-03-17  Kevin Ryde  <kevin@swox.se>
5872
5873	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init, fake_cpuid_table): Add x86_64.
5874
5875	* mpq/get_d.c: Use mpn_tdiv_qr, demand den>0 per canonical form.
5876
58772004-03-16  Torbjorn Granlund  <tege@swox.com>
5878
5879	* mpn/generic/sqr_basecase.c: Add versions using mpn_addmul_2 and
5880	mpn_addmul_2s.
5881
58822004-03-14  Kevin Ryde  <kevin@swox.se>
5883
5884	* mpf/mul_ui.c: Incorporate carry from low limbs, for exactness.
5885	* tests/mpf/t-mul_ui.c: New file.
5886	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5887
5888	* mpf/div.c: Use mpn_tdiv_qr.  Use just one TMP_ALLOC.  Use full
5889	divisor, since truncating can lose accuracy.
5890	* tests/mpf/t-div.c: New file.
5891	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5892
5893	* tests/mpf/t-set_q.c, tests/mpf/t-ui_div.c (check_various): Amend
5894	bogus 99/4 test.
5895	* tests/mpf/t-ui_div.c (check_rand): Exercise r==v overlap.
5896
5897	* tests/refmpf.c, tests/tests.h (refmpf_set_overlap): New function.
5898
5899	* mpf/cmp_si.c [nails]: Correction, cast vval in exp comparisons, for
5900	when vval=-0x800..00 and limb==longlong.
5901
5902	* mpf/cmp_si.c [nails]: Correction, return usign instead of 1 when
5903	uexp==2 but value bigger than an mp_limb_t.
5904	* tests/mpf/t-cmp_si.c (check_data): Add test cases.
5905
5906	* tests/trace.c (mpf_trace): Use ABS(mp_trace_base) to allow for
5907	negative bases used for upper case hex in integer traces.
5908
59092004-03-12  Torbjorn Granlund  <tege@swox.com>
5910
5911	* mpn/generic/sb_divrem_mn.c: Correct header comment.
5912
59132004-03-11  Kevin Ryde  <kevin@swox.se>
5914
5915	* aclocal.m4, configure, ltmain.sh: Downgrade to libtool 1.5, version
5916	1.5.2 doesn't remove .libs/*.a files when rebuilding, which is bad for
5917	development when changing contents or with duplicate named files like
5918	we have.
5919
5920	Revert this, ie restore AR_FLAGS=cq:
5921	* acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
5922	does this itself on detecting duplicate object filenames in piecewise
5923	linking mode.
5924
5925	* randbui.c, randmui.c [longlong+nails]: Correction to conditionals
5926	for second limb.
5927
5928	* mpz/aors_ui.h, mpz/cdiv_q_ui.c, mpz/cdiv_qr_ui.c, mpz/cdiv_r_ui.c,
5929	mpz/cdiv_ui.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr_ui.c, mpz/fdiv_r_ui.c,
5930	mpz/fdiv_ui.c, mpz/gcd_ui.c, mpz/iset_ui.c, mpz/lcm_ui.c,
5931	mpz/set_ui.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr_ui.c, mpz/tdiv_r_ui.c,
5932	mpz/tdiv_ui.c, mpz/ui_sub.c, mpf/div_ui.c, mpf/mul_ui.c
5933	[longlong+nails]: Amend #if to avoid warnings about shift amount.
5934
59352004-03-07  Kevin Ryde  <kevin@swox.se>
5936
5937	* mpf/reldiff.c: Use rprec+ysize limbs for d, to ensure accurate
5938	result.  Inline mpf_abs(d,d) and mpf_cmp_ui(x,0), and rate the latter
5939	UNLIKELY.
5940
5941	* mpf/ui_div.c: Use mpn_tdiv_qr.  Use just one TMP_ALLOC.  Use full
5942	divisor, since truncating can lose accuracy.
5943	* tests/mpf/t-ui_div.c: New file.
5944	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5945
5946	* mpf/set_q.c: Expand TMP_ALLOC_LIMBS_2, to make conditional clearer
5947	and avoid 1 limb alloc when not wanted.
5948
5949	* gmp-impl.h (WANT_TMP_DEBUG): Define to 0 if not defined.
5950	(TMP_ALLOC_LIMBS_2): Use "if" within macro rather than "#if", for less
5951	preprocessor conditionals.
5952
5953	* mpf/mul_2exp.c, mpf/div_2exp.c: Add some comments.
5954
5955	* tests/refmpn.c (refmpn_sb_divrem_mn, refmpn_tdiv_qr): Nailify.
5956
59572004-03-04  Kevin Ryde  <kevin@swox.se>
5958
5959	* gen-psqr.c (print): Add CNST_LIMB in PERFSQR_MOD_TEST, for benefit
5960	of K&R.
5961	* tests/mpn/t-perfsqr.c (PERFSQR_MOD_1): Use CNST_LIMB for K&R.
5962
5963	* doc/configuration (Configure): Remove mkinstalldirs, no longer used.
5964
5965	* acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
5966	does this itself on detecting duplicate object filenames in piecewise
5967	linking mode.
5968
5969	* configure.in (hppa2.0*-*-*): Test sizeof(long) == 4 or 8 to verify
5970	ABI=2.0n versus ABI=2.0w.  In particular this lets CC=cc_bundled
5971	correctly fall back to ABI=2.0n (we don't automatically add CC=+DD64
5972	to that compiler, currently).
5973
5974	* doc/gmp.texi (Reentrancy): Note C++ mpf_class constructors using
5975	global default precision.
5976	(Random State Miscellaneous): Describe gmp_urandomb_ui as giving N
5977	bits.
5978	(C++ Interface Floats): Describe operator= copying the value, not the
5979	precision, and what this can mean about copy constructor versus
5980	default constructor plus assignment.
5981
5982	* mpf/set_q.c: Use mpn_tdiv_qr rather than mpn_divrem, so no shifting.
5983	Don't truncate the divisor, it can make the result inaccurate.
5984	* tests/mpf/t-set_q.c: New file.
5985	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5986
5987	* mpf/set.c: Use MPN_COPY_INCR, in case r==u and ABSIZ(u) > PREC(r)+1.
5988	No actual bug here, because MPN_COPY has thusfar been an alias for
5989	MPN_COPY_INCR, only an ASSERT failure.
5990	* tests/mpf/t-set.c: New file.
5991	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5992
5993	* mpf/set.c, mpf/iset.c: Do MPN_COPY last, for possible tail call.
5994
5995	* mpf/set_d.c: Rate d==0 as UNLIKELY.  Store size before extract call,
5996	to shorten lifespan of "negative".
5997
5998	* mpf/init.c, mpf/init2.c, mpf/iset_d.c, mpf/iset_si.c,
5999	mpf/iset_str.c, mpf/iset_ui.c: Store prec before alloc call, for one
6000	less live quantity across that call.
6001	* mpf/init.c, mpf/init2.c, mpf/iset_str.c: Store size and exp before
6002	alloc call, to overlap with other operations.
6003
6004	* tests/refmpf.c, tests/tests.h (refmpf_fill, refmpf_normalize,
6005	refmpf_validate, refmpf_validate_division): New functions.
6006
6007	* tests/refmpn.c, tests/tests.h (refmpn_copy_extend,
6008	refmpn_lshift_or_copy_any, refmpn_rshift_or_copy_any): New functions.
6009
6010	* tal-debug.c: Add <string.h> for strcmp.
6011
6012	* tests/cxx/t-istream.cc (check_mpz, check_mpq, check_mpf): Use size_t
6013	for loop index, to quieten g++ warning.
6014
60152004-03-02  Kevin Ryde  <kevin@swox.se>
6016
6017	* tests/mpn/t-hgcd.c: Use __GMP_PROTO on prototypes.
6018
60192004-03-01  Torbjorn Granlund  <tege@swox.com>
6020
6021	With Karl Hasselstr�m:
6022	* mpn/generic/dc_divrem_n.c (mpn_dc_div_2_by_1): New function, with
6023	meat from old mpn_dc_divrem_n.  Accept scratch parameter.  Rewrite to
6024	avoid a recursive call.
6025	(mpn_dc_div_3_by_2): New function, with meat from old
6026	mpn_dc_div_3_halves_by_2.  Accept scratch parameter.
6027	(mpn_dc_divrem_n): Now just allocate scratch space and call new
6028	mpn_dc_div_2_by_1.
6029
60302004-02-29  Kevin Ryde  <kevin@swox.se>
6031
6032	* longlong.h (count_leading_zeros) [alpha gcc]: New version, inlining
6033	mpn/alpha/cntlz.asm cmpbge technique.
6034
6035	* aclocal.m4, configure, install-sh, missing, ltmain.sh,
6036	*/Makefile.in: Update to automake 1.8.2 and libtool 1.5.2.
6037
6038	* doc/gmp.texi (C++ Interface Integers): Note / and % rounding follows
6039	C99 / and %.
6040	(Exact Remainder): Index entries for divisibility testing algorithm.
6041
6042	* tune/time.c (speed_endtime): Return 0.0 for negative time measured.
6043	Revise usage comments for clarity.
6044	* tune/common.c (speed_measure): Recognise speed_endtime 0.0 for
6045	failed measurement.
6046
6047	* tests/mpn/t-get_d.c (check_rand): Correction to nhigh_mask setup.
6048
60492004-02-27  Torbjorn Granlund  <tege@swox.com>
6050
6051	* tune/tuneup.c (tune_dc, tune_set_str): Up param.step_factor.
6052
6053	* tests/mpz/t-gcd.c: Decrease # of tests to 50.
6054
60552004-02-27  Kevin Ryde  <kevin@swox.se>
6056
6057	* tests/devel/try.c: Add a comment that this is not for Cray systems.
6058
6059	* mpf/set_q.c: Don't support den(q)<0, demand canonical form in the
6060	usual way.
6061
60622004-02-24  Torbjorn Granlund  <tege@swox.com>
6063
6064	From Kevin:
6065	* mpn/generic/mul_fft.c (mpn_fft_add_modF): Loop until normalization
6066	criterion met.
6067
60682004-02-22  Kevin Ryde  <kevin@swox.se>
6069
6070	* acinclude.m4 (GMP_PROG_CC_WORKS, GMP_OS_X86_XMM, GMP_PROG_CXX_WORKS):
6071	Remove files that might look like compiler output, so our "||"
6072	alternatives are not fooled.
6073
6074	* acinclude.m4 (GMP_PROG_CC_WORKS): Add test for lshift_com code
6075	mis-compiled by certain IA-64 HP cc at +O3.
6076
6077	* gmp-impl.h (USE_LEADING_REGPARM): Disable under prof or gprof, for
6078	the benefit of freebsd where .mcount clobbers registers.  Spotted by
6079	Torbjorn.
6080	* configure.in (WANT_PROFILING_PROF, WANT_PROFILING_GPROF): New
6081	AC_DEFINEs.
6082
60832004-02-21  Kevin Ryde  <kevin@swox.se>
6084
6085	* configure.in (sparc64-*-*bsd*): Amend -m32 setup for ABI=32, so it's
6086	not used in ABI=64 on the BSD systems.
6087
60882004-02-18  Niels M�ller  <nisse@lysator.liu.se>
6089
6090	* tests/mpz/t-gcd.c (gcdext_valid_p): New function.
6091	(ref_mpz_gcd): Deleted function.
6092	(one_test): Rearranged to call mpz_gcdext first, so that the
6093	returned value can be validated.
6094	(main): Don't use ref_mpz_gcd.
6095
60962004-02-18  Torbjorn Granlund  <tege@swox.com>
6097
6098	* gmp-impl.h (MPN_TOOM3_MAX_N): Move to !WANT_FFT section.
6099
6100	* tests/mpz/t-mul.c: Exclude special huge operands unless WANT_FFT.
6101
6102	* mpz/rrandomb.c (gmp_rrandomb): Rewrite.
6103
6104	* mpn/generic/mul_n.c (mpn_toom3_sqr_n): Remove write-only variable c5.
6105
61062004-02-18  Kevin Ryde  <kevin@swox.se>
6107
6108	* mpf/iset_si.c, mpf/iset_ui.c, mpf/set_si.c, mpf/set_ui.c [nails]:
6109	Always store second limb, to avoid a conditional.
6110
6111	* tests/mpf/t-get_ui.c: New file.
6112	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6113	* tests/mpf/t-get_si.c (check_limbdata): Further tests.
6114	* gmp-impl.h (MP_EXP_T_MAX, MP_EXP_T_MIN): New defines.
6115
6116	* mpf/get_ui.c, mpf/get_si.c: Remove size==0 test, it's covered by
6117	other conditions.  Attempt greater clarity by expressing conditions as
6118	based on available data range.
6119	* mpf/get_si.c [nails]: Correction, don't bail on exp > abs_size,
6120	since may still have second limb above radix point available.
6121	* mpf/get_ui.c: Nailify.
6122
61232004-02-16  Kevin Ryde  <kevin@swox.se>
6124
6125	* mpz/scan0.c, mpz/scan1.c: Use count_trailing_zeros, instead of
6126	count_leading_zeros on limb&-limb.
6127
6128	* mpf/sqrt.c: Use "/ 2" for exp, avoiding C undefined behaviour on
6129	">>" of negatives.  Correction to comment, exp is rounded upwards.
6130	SIZ(r) always prec now, no need for tsize expression.  Store EXP(r)
6131	and SIZ(r) where calculated to reduce variable lifespans.  Make tsize
6132	mp_size_t not mp_exp_t, though of course those are currently the same.
6133
6134	* gmp-h.in (GMP_ERROR_ALLOCATE, GMP_ERROR_BAD_STRING,
6135	GMP_ERROR_UNUSED_ERROR): Remove, never used or documented, and we
6136	don't want to use globals for communicating error information.
6137
6138	* mpz/gcd_ui.c [nails]: Correction, actually return a value.
6139
6140	* mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails==1]: Add code.
6141
61422004-02-15  Kevin Ryde  <kevin@swox.se>
6143
6144	* tests/mpz/t-jac.c (check_data): Remove unnecessary variable
6145	"answer".
6146
61472004-02-14  Torbjorn Granlund  <tege@swox.com>
6148
6149	* mpn/ia64/aors_n.asm: Break a group with a RAW conflict.
6150
61512004-02-14  Kevin Ryde  <kevin@swox.se>
6152
6153	* acinclude.m4 (GMP_C_RIGHT_SHIFT): Note that it's "long"s which we're
6154	concerned about.
6155
6156	* mpn/generic/mul_n.c: Add some remarks about toom3 high zero
6157	stripping.
6158
6159	* mpn/generic/scan0.c, mpn/generic/scan1.c: Remove design issue
6160	remarks.  What to do about going outside `up' space is a problem, but
6161	anything to address it would be an incompatible change.
6162
61632004-02-12  Torbjorn Granlund  <tege@swox.com>
6164
6165	* tests/mpn/t-hgcd.c: Remove unused variables.
6166
6167	* mpn/ia64/hamdist.asm: Remove bundling incompatible with HP-UX
6168	assembler.  Misc HP-UX changes.
6169	* mpn/ia64/gcd_1.asm: Add some syntax to placid the HP-UX assembler.
6170
61712004-02-11  Kevin Ryde  <kevin@swox.se>
6172
6173	* longlong.h (power, powerpc): Use HAVE_HOST_CPU_FAMILY_power and
6174	HAVE_HOST_CPU_FAMILY_powerpc rather than various cpp defines.
6175
6176	* gmp-impl.h: Add remarks about limits.h and Cray etc.
6177
6178	* mpn/ia64/mul_1.asm: Don't put .pred directives on labelled lines,
6179	hpux 11.23 assembler doesn't like that.
6180	* mpn/ia64/README: Add a note on this.
6181
6182	* dumbmp.c (mpz_mul): Set ALLOC(r) for new data block used.  Reported
6183	by Jason Moxham.
6184
6185	* mpn/pa32/README, mpn/pa64/README (REFERENCES): New sections.
6186
61872004-02-10  Torbjorn Granlund  <tege@swox.com>
6188
6189	* tests/mpz/t-gcd.c: Decrease # of tests run.
6190
6191	* mpn/*/gmp-mparam.h: Add HGCD values, update TOOM values.
6192
61932004-02-01  Torbjorn Granlund  <tege@swox.com>
6194
6195	From Kevin:
6196	* config.guess: Recognize AMD's hammer processors, return x86_64.
6197
61982004-01-31  Niels M�ller  <nisse@lysator.liu.se>
6199
6200	* mpn/generic/hgcd.c (mpn_cmp_sum3): Declare static.
6201
62022004-01-25  Niels M�ller  <nisse@lysator.liu.se>
6203
6204	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-hgcd.
6205
6206	* mpn/generic/hgcd.c (hgcd_jebelean): Simplify, use mpn_cmp_sum3.
6207	(mpn_cmp_sum3): New function.
6208	(mpn_diff_smaller_p): Remove.
6209	(hgcd_final, hgcd_jebelean, hgcd_small_1, hgcd_small_2, euclid_step):
6210	Remove tp,talloc arguments.  Callers changed.
6211
62122004-01-25  Torbjorn Granlund  <tege@swox.com>
6213
6214	* tune/tuneup.c (all): Reenable calls of tune_gcd_schoenhage and
6215	tune_hgcd.
6216
6217	* mpn/generic/gcd.c: Reenable Schoenhage code.
6218
6219	With Niels M�ller:
6220	* mpn/generic/hgcd.c: Add const and inline to several functions.
6221	(qstack_push_start qstack_push_end qstack_push_quotient): Remove.
6222	(euclid_step): Insert removed functions here.
6223	(hgcd_adjust): Simplify, don't handle d != 1.
6224	(qstack_adjust): Corresponding changes.
6225	(mpn_hgcd2_lehmer_step): Remove redundant tests for bh against zero.
6226	(hgcd_start_row_p): Tweak.
6227	(hgcd_final): Shorten life of ralloc.
6228
62292004-01-24  Kevin Ryde  <kevin@swox.se>
6230
6231	* tests/mpf/t-sqrt.c (check_rand1): Further diagnostic printouts.
6232
6233	* mpn/generic/sqrtrem.c (mpn_sqrtrem): Add ASSERT_MPN.
6234	(mpn_dc_sqrtrem): Add casts for K&R.
6235
6236	* mpf/sqrt_ui.c: Nailify.
6237
6238	* mpf/set_z.c: Do MPN_COPY last, for possible tail call.
6239
6240	* doc/gmp.texi (Miscellaneous Float Functions): For mpf_random2, note
6241	exponent is in limbs.
6242
6243	* mpn/ia64/README: Add remark about concentrating on itanium-2.
6244
62452004-01-22  Kevin Ryde  <kevin@swox.se>
6246
6247	* mpf/sqrt.c: Change tsize calculation to get prec limbs result
6248	always, previously got prec+1 when exp was odd.
6249	* tests/mpf/t-sqrt.c (check_rand1): New function, code from main.
6250	(check_rand2): New function.
6251
6252	* mpf/sqrt_ui.c: Change rsize calculation to get prec limbs result,
6253	previously got prec+1.
6254	* tests/mpf/t-sqrt_ui.c: New file.
6255	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
6256
6257	* tests/refmpf.c, tests/tests.h (refmpf_add_ulp,
6258	refmpf_set_prec_limbs): New functions.
6259
6260	* mpz/get_d_2exp.c, mpf/get_d_2exp.c: Remove x86+m68k force to double,
6261	mpn_get_d now does this.  Remove res==1.0 check for round upwards,
6262	mpn_get_d now rounds towards zero.  Move exp store to make mpn_get_d a
6263	tail call.
6264
6265	* configure.in (x86-*-*): Use ABI=32 rather than ABI=standard.
6266	Use gcc -m32 when available, to force mode on bi-arch amd64 gcc.
6267	* configure.in, acinclude.m4 (x86_64-*-*): Merge into plain x86 setups
6268	as ABI=64.  Support ABI=32, using athlon code.  Use gcc -mcpu=k8,
6269	-march=k8.
6270	(amd64-*-*): Remove pattern, config.sub only gives x86_64.
6271	* doc/gmp.texi (ABI and ISA): Add x86_64 dual ABIs.
6272
6273	* mpn/amd64/README: Add reference to ABI spec.
6274
62752004-01-17  Niels M�ller  <nisse@lysator.liu.se>
6276
6277	* mpn/generic/hgcd.c (hgcd_adjust): Backed out mpn_addlsh1_n
6278	change for now.
6279
6280	* mpn/generic/hgcd.c (hgcd_adjust): Fixed calls of mpn_addlsh1_n.
6281
62822004-01-17  Kevin Ryde  <kevin@swox.se>
6283
6284	* tune/README: Remove open/mpn versions of toom3, no longer exist.
6285	* tune/powerpc64.asm: Remove unused L(again).
6286	* tune/time.c (mftb): Note single mftb possible for powerpc64.
6287
6288	* mpn/generic/mode1o.c: Use "c<s" to do underflow detection in last
6289	step, for better parallelism.
6290
6291	* mpn/generic/get_d.c: Preserve comments about hppa fcnv,udw,dbl from
6292	previous mpz_get_d code.
6293
6294	* tune/freq.c: Add some comments about systems not covered.
6295
6296	* gmp-h.in (_GMP_H_HAVE_FILE): Add _MSL_STDIO_H for Metrowerks.
6297	Reported by Tomas Zahradnicky.
6298
62992004-01-16  Niels M�ller  <nisse@lysator.liu.se>
6300
6301	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Use MPN_DECR_U.
6302	(hgcd_adjust): Use mpn_addlsh1_n when available.
6303
63042004-01-16  Kevin Ryde  <kevin@swox.se>
6305
6306	* configure.in (powerpc64-*-linux*): Try gcc64.  Try -m64 with
6307	"cflags_maybe" to get it used in all probing.  Add sizeof-long-8 test
6308	to check the mode is right if -m64 is not applicable.
6309
63102004-01-15  Kevin Ryde  <kevin@swox.se>
6311
6312	* configure.in (--with-readline=detect): Check for readline/readline.h
6313	and readline/history.h.  Report result of detection.
6314
63152004-01-14  Niels M�ller  <nisse@lysator.liu.se>
6316
6317	* tune/speed.c (routine): Disabled speed_mpn_hgcd_lehmer.
6318	* tune/common.c (speed_mpn_hgcd_lehmer): Disabled function.
6319
6320	* mpn/generic/hgcd.c (mpn_hgcd_lehmer_itch, mpn_hgcd_lehmer)
6321	(mpn_hgcd_equal): Deleted functions.
6322
6323	* mpn/generic/gcd.c (hgcd_start_row_p): Deleted function.
6324	(gcd_schoenhage): Deleted assertion code using mpn_hgcd_lehmer.
6325
6326	* mpn/generic/hgcd.c (hgcd_final): Fixed ASSERT typos.
6327	(mpn_hgcd): To use Lehmer's algorithm, call hgcd_final directly,
6328	not mpn_hgcd_lehmer.
6329
6330	* mpn/generic/gcd.c (gcd_schoenhage): Updated for changes to
6331	mpn_hgcd and mpn_hgcd_fix. (Schoenhage code is still disabled).
6332
6333	* gmp-impl.h (mpn_hgcd_fix): Updated prototype.
6334
6335	* mpn/generic/hgcd.c (mpn_hgcd_fix): Replaced a bunch of arguments
6336	by a pointer const struct hgcd_row *s. Updated callers.
6337
6338	* mpn/generic/hgcd.c (hgcd_start_row_p): Use const for the input.
6339	Moved function definition before hgcd_jebelean.
6340	(hgcd_jebelean): Interface change, analogous to hgcd2.
6341	(mpn_hgcd_fix): Normalize v. Require that v > 0.
6342	(hgcd_adjust): Fix bug in carry update.
6343	(mpn_hgcd): Reorganized again, to adapt to mpn_hgcd/hgcd_jebelean
6344	now sometimes returning 1. Reintroduced hgcd_adjust.
6345
6346	* mpn/generic/hgcd.c (hgcd_final): Streamlined logic for the first
6347	hgcd2 call.
6348
6349	* mpn/generic/hgcd2.c (mpn_hgcd2): Interface change. Return 1
6350	instead of 2, in the no progress case r0=A, r1=B.
6351
6352	* mpn/generic/hgcd.c (hgcd_adjust): Changed arguments and return
6353	value. Now takes a struct hgcd_row * and the uv size, and returns
6354	updated uvsize.
6355	(hgcd_final): Special handling of the case hgcd2 returning 1. Now
6356	uses hgcd_adjust, instead of a full Euclid division.
6357
63582004-01-13  Niels M�ller  <nisse@lysator.liu.se>
6359
6360	* mpn/generic/hgcd.c (euclid_step, hgcd_case0): Merged into a
6361	single function euclid_step.
6362	(mpn_hgcd): Reorganized the logic for the second recursive call.
6363	Avoid unnecessary Euclid steps.
6364
6365	* tests/mpn/t-hgcd.c (hgcd_values): One more test value.
6366
6367	* tests/mpn/t-hgcd.c (hgcd_values): Added values that trigged the
6368	hgcd_jebelean bug.
6369
6370	* mpn/generic/hgcd.c (hgcd_jebelean): Fixed off by one error.
6371	(mpn_hgcd): Simplified the logic for the first recursive call. Now
6372	it uses only the correct values from the recursive call, and
6373	doesn't do tricks with hgcd_adjust (hgcd_adjust will probably be
6374	reintroduced later, though).
6375
6376	* tests/mpn/t-hgcd.c (mpz_mpn_equal, hgcd_ref_equal)
6377	(hgcd_ref_init, hgcd_ref_clear): New functions.
6378	(hgcd_ref): Reference implementation of hgcd, using mpz.
6379	(one_test): Use hgcd_ref. Don't use mpn_hgcd_lehmer.
6380	(main): Skip one_step if both input values are zero.
6381
63822004-01-12  Niels M�ller  <nisse@lysator.liu.se>
6383
6384	* mpn/generic/hgcd.c (hgcd_final): Rewritten, now uses Lehmer
6385	steps instead of a division loop.
6386	(mpn_hgcd_lehmer): Deleted old Lehmer code, instead just
6387	initialize and then call hgcd_final.
6388
6389	* tests/tests.h: Added refmpn_free_limbs prototype.
6390	* tests/refmpn.c (refmpn_free_limbs): New function.
6391
6392	* tests/mpn/t-hgcd.c: Try the same kind of random inputs as for
6393	mpz/t-gcd.
6394
63952004-01-11  Niels M�ller  <nisse@lysator.liu.se>
6396
6397	* mpn/generic/hgcd.c (mpn_hgcd_lehmer): Rewritten, after some more
6398	analysis of the size reduction for one Lehmer step.
6399
6400	* tests/mpn/t-hgcd.c: New file.
6401
64022004-01-11  Torbjorn Granlund  <tege@swox.com>
6403
6404	With Niels M�ller:
6405	* mpn/generic/hgcd.c (hgcd_normalize): Fix ASSERTs.
6406	(hgcd_mul): Normalize R[1].uvp[1].  Add some more ASSERTs.
6407	(hgcd_update_uv): Streamline.  ASSERT that input and output is
6408	normalized.
6409
64102004-01-11  Kevin Ryde  <kevin@swox.se>
6411
6412	* mpn/alpha/ev6/slot.pl: New file, derived in part from
6413	mpn/x86/k6/cross.pl.
6414
6415	* mpn/alpha/alpha-defs.m4 (ASSERT): New macro.
6416
6417	* mpn/asm-defs.m4 (m4_ifdef): New macro, avoiding OSF 4.0 m4 bug.
6418	(m4_assert_defined): Use it.
6419
6420	* mpn/alpha/default.m4, mpn/alpha/unicos.m4 (LDGP): New macro.
6421	* mpn/alpha/ev67/gcd_1.asm: Use it to re-establish gp after jsr.
6422
6423	* configure.in, demos/calc/Makefile.am: Use -lcurses or -lncurses with
6424	readline, when available.
6425
6426	* longlong.h (sub_ddmmss) [generic]: Use al<bl for the borrow rather
6427	than __x>al, since the former can be done without waiting for __x,
6428	helping superscalar chips, in particular alpha ev5 and ev6.
6429
6430	* longlong.h (sub_ddmmss) [ia64]: New macro.
6431
6432	* tests/t-sub.c: New file.
6433	* tests/Makefile.am (check_PROGRAMS): Add it.
6434	* tests/refmpn.c, tests/tests.h (refmpn_sub_ddmmss): New function.
6435
64362004-01-09  Kevin Ryde  <kevin@swox.se>
6437
6438	* mpn/x86/p6/mod_34lsub1.asm: New file, derived in part from
6439	mpn/x86/mod_34lsub1.asm.
6440
6441	* configure.in (IA64_PATTERN): Use -mtune on gcc 3.4.
6442
64432004-01-07  Kevin Ryde  <kevin@swox.se>
6444
6445	* gmp-h.in, mp-h.in (__GMP_SHORT_LIMB): Renamed from _SHORT_LIMB, to
6446	keep in our namespace.  (Not actually used anywhere currently.)
6447	Reported by Patrick Pelissier.
6448
6449	* mp-h.in: Use "! defined (__GMP_WITHIN_CONFIGURE)" in the same style
6450	as gmp-h.in (though mp-h.in is not actually used during configure).
6451
6452	* mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
6453	Use __dllexport__ and __dllimport__ to keep out of application
6454	namespace.  Same previously done in gmp-h.in.
6455
64562004-01-06  Kevin Ryde  <kevin@swox.se>
6457
6458	* configfsf.sub, configfsf.guess: Update to 2004-01-05.
6459	* configure.in (amd64-*-* | x86_64-*-*): Update comments on what
6460	configfsf.sub does.
6461
64622004-01-04  Kevin Ryde  <kevin@swox.se>
6463
6464	* mpn/alpha/README (REFERENCES): Add tru64 assembly manuals.
6465	(ASSEMBLY RULES): Note what gcc says about !literal! etc.
6466
64672004-01-03  Kevin Ryde  <kevin@swox.se>
6468
6469	* mpn/alpha/ev67/gcd_1.asm: New file.
6470
6471	* mpn/x86/pentium4/sse2/rsh1add_n.asm: New file, derived in part from
6472	mpn/x86/pentium4/sse2/addlsh1_n.asm.
6473
6474	* mpn/x86/p6/p3mmx/popham.asm: Note measured speeds.
6475
6476	* mpn/ia64/hamdist.asm: Correction to inputs vs locals in alloc (makes
6477	no difference to the generated code).  Corrections to a couple of
6478	comments.
6479
6480	* mpn/x86/pentium4/sse2/addlsh1_n.asm (PARAM_CARRY): Remove macro, not
6481	used, no such parameter.
6482
6483	* mpn/generic/gcd.c: Use <stdio.h> for NULL.
6484
6485	* doc/gmp.texi (Single Limb Division): Correction to tex expression
6486	for (1/2)x1.  And minor wording tweaks elsewhere.
6487
6488	* gmp-impl.h (mpn_rsh1add_n, mpn_rsh1sub_n): Correction to comments
6489	about how carries returned.
6490
6491	* longlong.h (umul_ppmm) [generic]: Add comments about squaring
6492	(dropped from tasks list)
6493
64942003-12-31  Kevin Ryde  <kevin@swox.se>
6495
6496	* demos/perl/GMP.xs (scan0, scan1): Return ~0 for not-found.
6497	* demos/perl/GMP.pm: Describe this, remove the note about ULONG_MAX
6498	being the same as ~0 (which is not true in old perl).
6499	* demos/perl/test.pl: Update tests.
6500	* demos/perl/typemap (gmp_UV): New type.
6501
6502	* demos/perl/test.pl (fits_slong_p): Comment out uv_max test, it won't
6503	necessarily exceed a long.
6504
6505	* demos/perl/GMP.pm: Add a remark about get_str to the bugs section.
6506
6507	* mpn/generic/sqrtrem.c, mpz/fac_ui.c, tests/mpf/reuse.c: Add casts
6508	for K&R.
6509	* tests/mpf/t-muldiv.c: Make ulimb, vlimb into ulongs, which is how
6510	they're used, for the benefit of K&R calling.
6511
6512	* doc/gmp.texi (Square Root Algorithm): Add a summary of the algorithm.
6513	And add further index entries in various places.
6514
6515	* mpz/lucnum_ui.c, mpz/lucnum2_ui.c: Use mpn_addlsh1_n when available.
6516
6517	* gmp-impl.h, mpn/generic/mul_n.c (mpn_addlsh1_n, mpn_sublsh1_n,
6518	mpn_rsh1add_n, mpn_rsh1sub_n): Move descriptions to gmp-impl.h with
6519	the prototypes, for ease of locating.
6520
65212003-12-30  Torbjorn Granlund  <tege@swox.com>
6522
6523	* tune/tuneup.c (all): Disable calls of tune_gcd_schoenhage and
6524	tune_hgcd for now.
6525
65262003-12-29  Torbjorn Granlund  <tege@swox.com>
6527
6528	* tests/mpz/t-gcd.c: Rewrite, based on suggestions by Kevin.
6529
6530	* mpn/ia64/mul_1.asm: Amend TODO list.
6531
6532	* mpn/sparc64/README: Remove mpn_Xmul_2, done.
6533	Add blurb about L1 cache conflicts.
6534
6535	* mpn/generic/gcd.c: Disable Schoenhage code for now.
6536
65372003-12-29  Kevin Ryde  <kevin@swox.se>
6538
6539	* mpn/generic/mul_fft.c, mpz/root.c, mpq/cmp_ui.c: Add casts for K&R.
6540
65412003-12-27  Kevin Ryde  <kevin@swox.se>
6542
6543	* tests/mpz/t-mul.c (mul_kara, mul_basecase): Use __GMP_PROTO.
6544
6545	* mpn/generic/gcd.c (NHGCD_SWAP4_2, NHGCD_SWAP3_LEFT),
6546	mpn/generic/hgcd.c (HGCD_SWAP4_LEFT, HGCD_SWAP4_RIGHT, HGCD_SWAP4_2,
6547	HGCD_SWAP3_LEFT): Aggregate initializers for automatics is an
6548	ANSI-ism, avoid.
6549
6550	* Makefile.am (AUTOMAKE_OPTIONS): Restore this, giving no directory on
6551	ansi2knr to avoid a circular build rule.
6552	* configure.in (AM_INIT_AUTOMAKE): Note options also in Makefile.am.
6553
6554	* configure.in (cflags_maybe): Don't loop adding cflags_maybe if the
6555	user has set CFLAGS.
6556
65572003-12-24  Torbjorn Granlund  <tege@swox.com>
6558
6559	* mpn/generic/gcd.c (gcd_schoenhage_itch): Avoid unary "+".
6560	(mpn_gcd): Allocate scratch space on heap for gcd_schoenhage.
6561	(mpn_gcd): Don't invoke MPN_NORMALIZE on input operands.
6562
65632003-12-23  Kevin Ryde  <kevin@swox.se>
6564
6565	* configure.in (*sparc*-*-*): Test sizeof(long)==4 or 8 for ABIs, to
6566	get the right mode when the user sets the CFLAGS.
6567	(testlist): Introduce "any_<abi>_testlist" to apply to all compilers.
6568
6569	* demos/perl/typemap (MPZ_ASSUME, MPQ_ASSUME, MPF_ASSUME): Remove
6570	output rules, these are only meant for inputs.
6571	(MPZ_MUTATE): Remove, not used since changes for magic.
6572
6573	* demos/perl/GMP.xs (mpz_class_hv, mpq_class_hv, mpf_class_hv): New
6574	variables, initialized in BOOT.
6575	* demos/perl/GMP.xs, demos/perl/typemap: Use them and explicit
6576	sv_bless, to save a gv_stashpv for every new object.
6577
65782003-12-22  Kevin Ryde  <kevin@swox.se>
6579
6580	* mpn/alpha/mode1o.c, mpn/alpha/dive_1.c: Moved from ev5/mode1o.c and
6581	ev5/dive_1.c, these are good for ev4, and would like them in a generic
6582	alpha build.
6583
65842003-12-21  Kevin Ryde  <kevin@swox.se>
6585
6586	* doc/gmp.texi (Integer Logic and Bit Fiddling): Say "bitwise" in
6587	mpz_and, mpz_ior and mpz_xor, to avoid any confusion with what C means
6588	by "logical".  Reported by R�diger Sch�tz.
6589
6590	* gmp-h.in (_GMP_H_HAVE_FILE): Note why defined(EOF) is not good.
6591
65922003-12-20  Torbjorn Granlund  <tege@swox.com>
6593
6594	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Use mpn_cmp instead of
6595	mpn_sub_n where possible.  Use mp_size_t for relevant variables.
6596
65972003-12-20  Kevin Ryde  <kevin@swox.se>
6598
6599	* tune/speed.h (SPEED_TMP_ALLOC_LIMBS): Correction to last change,
6600	don't want "- 1" on the TMP_ALLOC_LIMBS.
6601
6602	* demos/expr/expr.h: Test #ifdef MPFR_VERSION_MAJOR for when mpfr.h is
6603	included, not GMP_RNDZ which is now an enum.
6604
6605	* demos/expr/exprfra.c (e_mpfr_ulong_p): Use mpfr_integer_p and
6606	mpfr_fits_ulong_p.
6607	(e_mpfr_get_ui_fits): Use mpfr_get_ui.
6608
6609	* mpfr/*: Update to mpfr cvs head 2003-12-20.
6610
6611	* configure, config.in: Update to autoconf 2.59.
6612	* */Makefile.in, configure, aclocal.m4, ansi2knr.c, install-sh,
6613	doc/mdate-sh: Update to automake 1.8.
6614
6615	* mkinstalldirs: Remove, not required by automake 1.8.
6616	* doc/gmp.texi (Build Options): HTML is a usual target in automake 1.8.
6617
6618	* configure.in (AC_PREREQ): Require autoconf 2.59.
6619	(AM_INIT_AUTOMAKE): Require automake 1.8.
6620	(AC_C_INLINE): Use rather than GMP_C_INLINE, now has #ifndef
6621	__cplusplus we want.
6622	(gettimeofday): Use AC_CHECK_FUNCS rather than our workaround code,
6623	autoconf now ok.
6624
6625	* acinclude.m4 (GMP_C_INLINE): Remove.
6626	(GMP_H_EXTERN_INLINE): Use AC_C_INLINE.
6627	(GMP_PROG_AR): Comment on automake $ARFLAGS.
6628
66292003-12-19  Niels M�ller  <nisse@lysator.liu.se>
6630
6631	* mpn/generic/hgcd.c (mpn_diff_smaller_p): Rewrote function. Tried
6632	to explain how it works.
6633	(slow_diff_smaller_p, wrap_mpn_diff_smaller_p) [WANT_ASSERT]: Use
6634	CPP to wrap assertion checks around all calls to
6635	mpn_diff_smaller_p.
6636
6637	* mpn/generic/hgcd.c (mpn_addmul2_n_1) [nails]: Fixed carry handling.
6638
6639	* mpn/generic/hgcd.c (mpn_diff_smaller_p) [nails]: Use
6640	GMP_NUMB_MAX, not MP_LIMB_T_MAX.
6641	(mpn_hgcd_itch): Improved size calculation.
6642	(mpn_hgcd_max_recursion): Moved function from qstack.c. Should to
6643	be recompiled when HGCD_SCHOENHAGE_THRESHOLD is tuned.
6644
6645	* mpn/generic/qstack.c (mpn_hgcd_max_recursion): ... moved from
6646	here.
6647
66482003-12-19  Torbjorn Granlund  <tege@swox.com>
6649
6650	* tests/mpf/t-get_d.c: Print message before aborting.
6651
6652	* mpn/generic/hgcd2.c (mpn_hgcd2): Substitute always-zero variable
6653	with 0.  Remove bogus comment.
6654
6655	* mpn/generic/get_d.c: Make ONE_LIMB case actually work for nails.
6656
66572003-12-18  Niels M�ller  <niels@lysator.liu.se>
6658
6659	* mpn/generic/hgcd.c (hgcd_update_r): Assert that the output r2 is
6660	smaller than the input r1.
6661
66622003-12-18  Torbjorn Granlund  <tege@swox.com>
6663
6664	* mpz/get_d.c: Don't include longlong.h.
6665
6666	* tests/mpz/t-mul.c (ref_mpn_mul): Handle un == vn specially, to avoid
6667	a dummy r/w outside of allocated area.
6668
66692003-12-18  Kevin Ryde  <kevin@swox.se>
6670
6671	* mpn/alpha/unicos.m4 (ALIGN): Add comments on what GCC does.
6672
6673	* configure.in (fat setups), acinclude.m4 (GMP_INIT): Obscure
6674	include() from automake 1.8 aclocal.
6675	* acinclude.m4: Quote names in AC_DEFUN, for automake 1.8 aclocal.
6676
66772003-12-17  Niels M�ller  <nisse@lysator.liu.se>
6678
6679	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer) [nails]:
6680	Enabled code also for GMP_NAIL_BITS > 0.
6681	* tune/speed.c [nails]: Enable speed_mpn_hgcd and
6682	speed_mpn_hgcd_lehmer.
6683	* tune/tuneup.c (tune_hgcd) [nails]: Likewise.
6684
6685	* mpn/generic/gcd.c [nails]: Use Sch�nhage's algorithm also for
6686	GMP_NAIL_BITS > 0.
6687
6688	* mpn/generic/hgcd.c [nails]: Enable the code for GMP_NAIL_BITS > 0.
6689	(MPN_EXTRACT_LIMB) [nails]: Handle nails.
6690	(__gmpn_hgcd_sanity): Allocate temporaries on the heap, not on the
6691	stack. Also check that r[i] >= r[i+1].
6692	(mpn_hgcd2_lehmer_step) [nails]: Handle nails.
6693	(mpn_hgcd_lehmer): When we temporarily have r3 > r2, avoid
6694	trigging that assert in __gmpn_hgcd_sanity.
6695	(mpn_hgcd): Likewise.
6696
6697	* mpn/generic/hgcd2.c (div2) [nails]: Alternative nail-aware
6698	version.
6699	(SUB_2): New macro of Kevin's, which reduces do sub_ddmmss in the
6700	non-nail case.
6701	(HGCD2_STEP): Use SUB_2, not sub_ddmmss. Added alternative version
6702	for K&R compilers.
6703	(mpn_hgcd2) [nails]: Use SUB_2, not sub_ddmmss. New nail-aware
6704	code for checking Jebelean's condition.
6705
67062003-12-13  Kevin Ryde  <kevin@swox.se>
6707
6708	* mpq/get_d.c: Amend comments per mpn_get_d change.
6709	(limb2dbl): Remove, no longer used.
6710
6711	* gmp-impl.h (DIVREM_1_NORM_THRESHOLD etc) [nails]: Correction to
6712	comments, MP_SIZE_T_MAX means preinv never.
6713
6714	* gmp-impl.h (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD) [nails]:
6715	Remove overrides, divexact_1 and modexact_1 have been nailified.
6716
6717	* mpz/inp_str.c (mpz_inp_str_nowhite): Use ASSERT_ALWAYS for EOF value
6718	requirement.
6719
6720	* tests/refmpn.c (refmpn_rsh1add_n, refmpn_rsh1sub_n): Parens around
6721	GMP_NUMB_BITS - 1 with ">>", to quieten gcc -Wall.
6722	* tests/t-constants.c (main), tests/t-count_zeros.c (check_clz),
6723	tests/t-modlinv.c (one), tests/mpz/t-jac.c (try_si_zi),
6724	tests/mpq/t-get_d.c (check_onebit): : Correction to printfs.
6725	* tests/mpn/t-fat.c: Add <string.h> for memcpy.
6726	* tests/mpz/t-scan.c (check_ref): Remove unused variable "isigned".
6727	* tests/mpq/t-get_d.c (check_onebit): Remove unused variable "limit".
6728	* tests/mpf/t-set_si.c, tests/mpf/t-set_ui.c (check_data): Braces for
6729	initializers.
6730	* tests/devel/try.c (mpn_divexact_by3_fun, mpn_modexact_1_odd_fun):
6731	Correction to return values.
6732
6733	* doc/gmp.texi (Miscellaneous Integer Functions): Note mpz_sizeinbase
6734	can be used to locate the most significant bit.  Reword a bit for
6735	clarity.
6736
67372003-12-12  Niels M�ller  <niels@lysator.liu.se>
6738
6739	* mpn/generic/hgcd.c (__gmpn_hgcd_sanity): Fixed stack buffer
6740	overrun.
6741	* mpn/generic/hgcd.c: Improved comments.
6742
67432003-12-11  Torbjorn Granlund  <tege@swox.com>
6744
6745	* gmp-impl.h: Change asm => __asm__, tabify.
6746	* mpz/get_d_2exp.c: Likewise.
6747	* mpf/get_d_2exp.c: Likewise.
6748
6749	* tests/cxx/t-ops.cc: #if .. #endif out tests that cause ambiguities.
6750
67512003-12-10  Torbjorn Granlund  <tege@swox.com>
6752
6753	* tests/mpz/t-gcd.c: Generate operands with sizes as a geometric
6754	progression, to allow for larger operands and less varying timing.
6755
6756	* tune/tuneup.c (tune_gcd_schoenhage): Set param.step_factor.
6757	(tune_hgcd): Likewise.
6758
67592003-12-10  Kevin Ryde  <kevin@swox.se>
6760
6761	* demos/perl/test.pl: Should be $] for perl version in old perl.
6762
6763	* configure.in (sparc64-*-*): Single block of gcc configs for all
6764	systems, on unknown systems try both ABI 32 and 64.
6765
6766	* configure.in (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New AC_SUBSTs with
6767	options to generate .def files with windows DLLs.
6768	* Makefile.am (libgmp_la_LDFLAGS, libgmpxx_la_LDFLAGS): Use them.
6769
6770	* mpn/generic/gcd.c: Use ABOVE_THRESHOLD / BELOW_THRESHOLD, to follow
6771	convention and cooperate with tune/tuneup.c.
6772
6773	* tune/tuneup.c (tune_gcd_schoenhage): Increase max_size to 3000, side
6774	default 1000 is approx the crossover point on athlon.
6775
6776	* tune/common.c, tune/speed.c, tune/speed.h, tune/speed-ext.c,
6777	tune/tuneup.c (SPEED_TMP_ALLOC_LIMBS): Take variable as parameter
6778	rather than returning a value, avoids alloca in a function call.
6779	* tune/common.c, tune/speed.h (speed_tmp_alloc_adjust): Remove, now
6780	inline in SPEED_TMP_ALLOC_LIMBS, and using ptr-NULL for alignment
6781	extraction.
6782
6783	* gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal,
6784	__gmp_binary_less, __gmp_binary_less_equal, __gmp_binary_greater,
6785	__gmp_binary_greater_equal, __gmp_cmp_function): Use mpfr_cmp_si and
6786	mpfr_cmp_d.
6787	* tests/cxx/t-ops.cc: Exercise this.
6788
6789	* demos/perl/Makefile.PL: Don't install sample.pl and test2.pl.
6790
6791	* demos/perl/GMP.xs (use_sv): Prefer PV over IV or NV to avoid any
6792	rounding.
6793	* demos/perl/test.pl: Exercise this.
6794
6795	* demos/perl/GMP/Mpf.pm (overload_string): Corrections to $# usage.
6796	* demos/perl/test.pl: Exercise this.
6797
67982003-12-08  Kevin Ryde  <kevin@swox.se>
6799
6800	* demos/perl/GMP.pm: Correction to canonicalize example.
6801
6802	* demos/perl/GMP.xs: New type check scheme, support magic scalars,
6803	support UV when available.  Remove some unused local variables.
6804	(coerce_long): Check range of double.
6805	(get_d_2exp): Remove stray printf.
6806
6807	* demos/perl/test.pl: Exercise magic, rearrange to make it clearer
6808	what's being tested.
6809
68102003-12-07  Kevin Ryde  <kevin@swox.se>
6811
6812	* mpn/generic/hgcd.c (mpn_hgcd): Use BELOW_THRESHOLD, to follow the
6813	convention of N<THRESH for the lower algorithm, not <=.  Fixes
6814	algorithm selection in tuneup.c.
6815
6816	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Use intended
6817	align_xp, align_yp.
6818
6819	* tune/tuneup.c (mul_toom3_threshold): Use MUL_TOOM3_THRESHOLD_LIMIT,
6820	for the benefit of ASSERT in mpn_mul_n.
6821
6822	* tune/tuneup.c (tune_mul): Correction to toom3 param.min_size, should
6823	use MPN_TOOM3_MUL_N_MINSIZE.
6824
6825	* tune/speed.c (check_align_option): Correction to printf format.
6826	* tune/freq.c (freq_sysctl_hw_model): Remove unused "i" variable.
6827
6828	* scanf/doscan.c: Correction to a couple of trace printfs.
6829	Add <stdlib.h> for strtol.
6830
6831	* tests/misc/t-scanf.c (test_sscanf_eof_ok): New function.
6832	(check_misc): Use it to suppress tests broken by libc.
6833	And should be EOF rather than -1 in various places.
6834
68352003-12-06  Torbjorn Granlund  <tege@swox.com>
6836
6837	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer):
6838	Move SPEED_TMP_ALLOC_LIMBS invocations out from calls.
6839
6840	* mpn/generic/get_str.c (mpn_get_str, POW2_P case):
6841	Don't append extra '\0' byte.
6842
68432003-12-05  Niels M�ller  <niels@lysator.liu.se>
6844
6845	* tune/common.c (speed_mpn_hgcd_lehmer, speed_mpn_hgcd):
6846	Updated for the renaming hgcd_sanity -> ASSERT_HGCD.
6847
6848	* mpn/generic/gcd.c (gcd_schoenhage): TMP_DECL must be the final
6849	declaration in the declaration section of a block.
6850
6851	* tune/speed.h (mpn_gcd_accel): Added prototype.
6852
68532003-12-05  Torbjorn Granlund  <tege@swox.com>
6854
6855	* randmt.c (__gmp_mt_recalc_buffer): Put parens around "&" expressions
6856	inside "!=".
6857
6858	* mpf/get_str.c: Remove unused variable "fracn".
6859
68602003-12-03  Kevin Ryde  <kevin@swox.se>
6861
6862	* configure.in, Makefile.am (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New
6863	AC_SUBSTs, use them to create .def files with Windows DLLs.
6864	* doc/gmp.texi (Notes for Particular Systems): Update notes on mingw
6865	DLL with MS C.
6866
6867	* mpz/export.c: Allow NULL for countp.
6868	* doc/gmp.texi (Integer Import and Export): Describe this.
6869	Suggested by Jack Lloyd.
6870
6871	* mpn/x86/p6/aors_n.asm: New file, grabbing the K7 code.
6872	Superiority of this reported by Patrick Pelissier.
6873
68742003-11-30  Kevin Ryde  <kevin@swox.se>
6875
6876	* mpn/alpha/ev67/popcount.asm, mpn/alpha/ev67/hamdist.asm: New files.
6877
6878	* mpn/alpha/ev67: New directory.
6879	* configure.in (alphaev67, alphaev68, alphaev7*): Use it.
6880
6881	* doc/gmp.texi (GMPrefu, GMPpxrefu): Change back to plain ref and
6882	pxref, remove macros.
6883	(GMPreftopu, GMPpxreftopu): Remove URL parameter, rename to GMPreftop
6884	and GMPpxreftop.
6885	(Debugging): Remove debauch, seems to have disappeared.
6886	(Language Bindings): Corrections to URLs for CLN, Omni F77, Pike.
6887
68882003-11-29  Kevin Ryde  <kevin@swox.se>
6889
6890	* demos/perl/GMP/Mpf.pm (overload_string): Use $OFMT to avoid warnings
6891	about $#.
6892
6893	* demos/perl/GMP.xs (fits_slong_p): Use LONG_MAX+1 to avoid possible
6894	rounding of 0x7F..FF in a double on 64-bit systems.
6895
6896	* configure.in (ppc601-*-*): Remove this case, it never matched
6897	anything, the name adopted is powerpc601.
6898	(powerpc601-*-*): Use gcc -mcpu=601, xlc -qarch=601.
6899
6900	* configure.in: Introduce ${cc}_cflags_maybe, used if they work.
6901	(*sparc*-*-*) [ABI=32]: Add gcc_cflags_maybe=-m32 to force that mode.
6902
6903	* doc/gmp.texi (Introduction to GMP): Add AMD64 to optimizations list.
6904	(Build Options): Add cpu types alphaev7 and amd64.  Update texinfo
6905	html cross reference.
6906
69072003-11-28  Niels M�ller  <nisse@lysator.liu.se>
6908
6909	* tune/tuneup.c (tune_hgcd): Disable if GMP_NAIL_BITS > 0.
6910	* tune/speed.c (routine): Likewise.
6911	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): Likewise.
6912
6913	* mpn/generic/gcd.c, mpn/generic/hgcd.c, mpn/generic/hgcd2.c
6914	[GMP_NAIL_BITS]: Disabled new code if we have nails.
6915
6916	* mpn/generic/gcd.c (MPN_LEQ_P): Copied macro definition (needed
6917	for compilation with --enable-assert).
6918
6919	* tune/tuneup.c (hgcd_schoenhage_threshold,
6920	gcd_schoenhage_threshold): New variables.
6921	(tune_hgcd, tune_gcd_schoenhage): New functions.
6922	(all): Call tune_hgcd and tune_gcd_schoenhage.
6923
6924	* tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer)
6925	(speed_mpn_gcd_accel): New functions.
6926	* tune/speed.c (routine): Added mpn_hgcd, mpn_hgcd_lehmer and
6927	mpn_gcd _accel.
6928	* tune/speed.h: Added corresponding prototypes.
6929
6930	* tune/gcd_accel.c: New file.
6931
6932	* tune/gcd_bin.c (GCD_SCHOENHAGE_THRESHOLD): Set to MP_SIZE_T_MAX.
6933
6934	* tune/Makefile.am (libspeed_la_SOURCES): Added gcd_accel.c.
6935	(TUNE_MPN_SRCS_BASIC): Added hgcd.c.
6936
6937	* mpn/x86/k7/gmp-mparam.h (HGCD_SCHOENHAGE_THRESHOLD)
6938	(GCD_SCHOENHAGE_THRESHOLD): Tuned values.
6939
6940	* mpn/generic/gcd.c (mpn_gcd, gcd_binary_odd): Renamed the
6941	old mpn_gcd function (which implements accelerated binary gcd) to
6942	gcd_binary_odd.
6943	(gcd_binary): New function, with the additional book keeping
6944	needed when using gcd_binary_odd to compute the gcd of non-odd
6945	numbers.
6946	(hgcd_tdiv): New function.
6947	(gcd_lehmer): New function, currently #if:ed out.
6948	(hgcd_start_row_p): New function, duplicatd from hgcd.c.
6949	(gcd_schoenhage_itch): New function.
6950	(gcd_schoenhage): New function.
6951	(mpn_gcd): New advertised gcd function, which calls
6952	mpn_gcd_binary_odd or mpn_gcd_schoenhage, depending on the size of
6953	the input.
6954
6955	* mpn/generic/hgcd.c (mpn_hgcd2_lehmer_step): Renamed function
6956	(was lehmer_step), and made non-static. Updated callers.
6957
6958	* gmp-impl.h (GCD_LEHMER_THRESHOLD): #if:ed out this macro.
6959	(mpn_hgcd2_lehmer_step): Added prototype.
6960
69612003-11-27  Niels M�ller  <nisse@lysator.liu.se>
6962
6963	* tests/mpz/t-gcd.c (gcd_values): Moved definition, so that we
6964	don't need to forward declare the array.
6965
69662003-11-26  Niels M�ller  <nisse@lysator.liu.se>
6967
6968	* mpn/generic/hgcd.c (mpn_hgcd2_fix): Deleted duplicate definition
6969	(the function belongs to hgcd2.c).
6970
69712003-11-26  Torbjorn Granlund  <tege@swox.com>
6972
6973	* tests/mpz/t-gcd.c: Generate random operands up to 32767 bits;
6974	decrease # of test to 1000.
6975	(gcd_values): Remove oversize test case.
6976
69772003-11-26  Niels M�ller  <niels@lysator.liu.se>
6978
6979	* gmp-impl.h: Added name mangling for hgcd-related functions. Also
6980	use __GMP_PROTO.
6981	(MPN_LEQ_P, MPN_EXTRACT_LIMB): Moved macros to hgcd.c.
6982	* mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
6983	Adapted to name changes.
6984
6985	* tests/mpz/t-gcd.c (main): Added some tests with non-random
6986	input.
6987
69882003-11-25  Niels M�ller  <nisse@lysator.liu.se>
6989
6990	* gmp-impl.h (MPN_LEQ_P, MPN_EXTRACT_LIMB): New macros.
6991	(struct qstack, struct hgcd2_row, struct hgcd2, struct hgcd_row)
6992	(struct hgcd): New structs. Also added prototypes for new hgcd,
6993	hgcd2, qstack and gcd functions.
6994
6995	* configure.in (gmp_mpn_functions): Added hgcd2, hgcd and qstack.
6996
6997	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added hgcd2.c,
6998	hgcd.c and qstack.c.
6999
7000	* mpn/generic/hgcd.c, mpn/generic/hgcd2.c, mpn/generic/qstack.c:
7001	New files, needed for the sub-quadratic gcd.
7002
70032003-11-25  Kevin Ryde  <kevin@swox.se>
7004
7005	* doc/gmp.texi (Language Bindings): Add Axiom.
7006
70072003-11-22  Kevin Ryde  <kevin@swox.se>
7008
7009	* mpn/alpha/README: More notes on assembler syntax variations.
7010
7011	* mpn/alpha/alpha-defs.m4, mpn/alpha/unicos.m4 (unop): Should be ldq_u
7012	not bis, and move to alpha-defs.m4 since it can be happily used
7013	everywhere.
7014
7015	* mpn/alpha/alpha-defs.m4, mpn/alpha/default.m4, mpn/alpha/unicos.m4
7016	(bigend): Move to alpha-defs.m4 and base it on HAVE_LIMB_BIG_ENDIAN or
7017	HAVE_LIMB_LITTLE_ENDIAN, so as not to hard code system endianness.
7018
7019	* mpn/alpha/alpha-defs.m4: New file.
7020	* configure.in (alpha*-*-*): Use it.
7021
70222003-11-21  Kevin Ryde  <kevin@swox.se>
7023
7024	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-21.
7025
7026	* mpn/alpha/ev5/com_n.asm: Change "not" to "ornot r31", since "not"
7027	isn't recognised by on Cray Unicos.  Add missing "gp" to PROLOGUE.
7028	* mpn/alpha/README: Add a note on "not".
7029
70302003-11-19  Torbjorn Granlund  <tege@swox.com>
7031
7032	* mpn/alpha/aorslsh1_n.asm: Slightly rework feed-in code, avoiding
7033	spurious reads beyond operand limits.
7034
7035	* mpn/alpha/ev5/com_n.asm: Add ASM_START/ASM_END.
7036
7037	* mpn/generic/mul_fft.c (mpn_fft_zero_p): Remove unused function.
7038	(mpn_lshift_com): Make static, nailify properly.
7039
70402003-11-19  Kevin Ryde  <kevin@swox.se>
7041
7042	* mpn/generic/diveby3.c: Use a "q" variable to make it clearer what
7043	the code is doing.
7044
7045	* mpn/powerpc32/750/lshift.asm, mpn/powerpc32/750/rshift.asm: New
7046	files.
7047
7048	* mpn/alpha/ev5/com_n.asm: New file.
7049
7050	* doc/gmp.texi (Assembler Functional Units, Assembler Writing Guide):
7051	New sections by Torbjorn, tweaked by me.
7052
70532003-11-17  Torbjorn Granlund  <tege@swox.com>
7054
7055	* mpn/powerpc32: Add power4/powerpc970 cycle counts.
7056	Use cmpwi instead of cmpi to placate darwin.
7057
70582003-11-15  Kevin Ryde  <kevin@swox.se>
7059
7060	* config.guess: Add comments on MacOS "machine" command.
7061
7062	* tests/devel/try.c (main): Use gmp_randinit_default explicitly on
7063	__gmp_rands, since RANDS doesn't allow seeding.
7064
7065	* doc/gmp.texi (Assigning Integers): Remove notes on possible change
7066	to disallow whitespace, this would be an incompatible change and
7067	really can't be made.
7068	(Toom 3-Way Multiplication): Updates for Paul's new code.
7069
7070	* mpn/generic/mul_n.c (toom3_interpolate, mpn_toom3_mul_n): Put
7071	if/else braces around whole of #if code, for readability.
7072
7073	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
7074	refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps
7075	etc.
7076
7077	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-15.
7078
70792003-11-14  Torbjorn Granlund  <tege@swox.com>
7080
7081	* mpn/alpha/aorslsh1_n.asm: Use Cray-friendly syntax for "br".
7082
70832003-11-13  Torbjorn Granlund  <tege@swox.com>
7084
7085	* mpn/alpha/aorslsh1_n.asm: New file.
7086
70872003-11-12  Kevin Ryde  <kevin@swox.se>
7088
7089	* acinclude.m4 (GMP_PROG_CC_WORKS): Add case provoking AIX power2
7090	assembler, test code by Torbjorn.
7091	* configure.in (power*-*-*): Add a comment about -mcpu=rios2 fallback.
7092
7093	* tune/speed.c (main): Use gmp_randinit_default explicitly on
7094	__gmp_rands, since RANDS doesn't allow seeding.
7095
7096	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-12.
7097
7098	* gmp-impl.h, randmt.h (__gmp_randinit_mt_noseed): Move prototype to
7099	gmp-impl.h, for use by RANDS.
7100
7101	* mpn/Makeasm.am (.s, .S, .asm): Quote $< in test -f, per automake.
7102	(.obj): Use test -f and $(CYGPATH_W) as per automake.
7103
71042003-11-11  Kevin Ryde  <kevin@swox.se>
7105
7106	* configure.in: Make umul and udiv standard-optional objects, rather
7107	than under various extra_functions.
7108
7109	* mpn/pa32/hppa1_1/pa7100/add_n.asm,
7110	mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
7111	mpn/pa32/hppa1_1/pa7100/lshift.asm,
7112	mpn/pa32/hppa1_1/pa7100/rshift.asm,
7113	mpn/pa32/hppa1_1/pa7100/sub_n.asm,
7114	mpn/pa32/hppa1_1/pa7100/submul_1.asm: Use LDEF for labels.
7115
7116	* mpf/set_str.c: Don't use memcmp for decimal point testing, just a
7117	loop is enough and avoids any chance of memcmp reading past the end of
7118	the given string.
7119
7120	* randmts.c, randmt.h: New files.
7121	* Makefile.am (libgmp_la_SOURCES): Add them.
7122	* randmt.c: Move seeding to randmts.c, common defines in randmt.h.
7123	* gmp-impl.h (RANDS): Use __gmp_randinit_mt_noseed.
7124	* tests/misc.c (tests_rand_start): Use gmp_randinit_default
7125	explicitly, not RANDS.
7126
7127	* mpn/ia64/ia64-defs.m4 (PROLOGUE_cpu): Use 32-byte alignment, for the
7128	benefit of itanium 2.
7129	* mpn/ia64/gcd_1.asm: Remove own .align 32.
7130
7131	* mpn/ia64/ia64-defs.m4 (ALIGN): New define, using IA64_ALIGN_OK.
7132	* mpn/ia64/hamdist.asm: Use ALIGN instead of .align.
7133
7134	* acinclude.m4 (GMP_ASM_IA64_ALIGN_OK): New macro.
7135	* configure.in (IA64_PATTERN): Use it.
7136	* mpn/ia64/README: Add notes on gas big endian align problem.
7137
71382003-11-10  Torbjorn Granlund  <tege@swox.com>
7139
7140	* mpn/ia64/mul_1.asm: Rewrite.
7141
71422003-11-08  Torbjorn Granlund  <tege@swox.com>
7143
7144	* mpn/x86/aors_n.asm: Align loop to a multiple of 16.  Also align
7145	M4_function_n to a multiple of 16, to minimize alignment padding.
7146	Update P6 cycle counts reflecting improvements with new alignment.
7147
71482003-11-07  Kevin Ryde  <kevin@swox.se>
7149
7150	* gmp-impl.h (HAVE_HOST_CPU_alpha_CIX): New define.
7151	(ULONG_PARITY, popc_limb): Use it, to pick up ev7 as well as 67 and 68.
7152	* longlong.h (count_leading_zeros, count_trailing_zeros): Ditto.
7153
7154	* doc/gmp.texi (Notes for Package Builds): Add notes on multi-ABI
7155	system packaging.
7156	(ABI and ISA): Add GNU/Linux ABI=64.
7157	(Binary GCD): Add notes on 1x1 GCD algorithms.
7158
7159	* mpn/alpha/README: Add some literature references.
7160
7161	* mpn/ia64/mode1o.asm: Various corrections to initial checkin.
7162	* mpn/ia64/ia64-defs.m4 (ASSERT): Correction to arg quoting.
7163
71642003-11-05  Torbjorn Granlund  <tege@swox.com>
7165
7166	* mpn/powerpc64/linux64.m4: New file.
7167	* configure.in (POWERPC64_PATTERN): Handle *-*-linux*.
7168	Use linux64.m4.
7169
7170	* mpn/ia64/logops_n.asm: New file.
7171
71722003-11-05  Kevin Ryde  <kevin@swox.se>
7173
7174	* tune/freq.c (freq_sysctl_hw_model): Relax to just look for "%u MHz",
7175	for the benefit of sparc cypress under netbsd 1.6.1.
7176
7177	* mpfr/*: Update to mpfr-2-0-2-branch 2003-11-05.
7178
7179	* mpn/alpha/ev5/dive_1.c: New file.
7180
7181	* configure.in (x86_64-*-*): Accept together with amd64-*-*.
7182
7183	* tune/speed.c: Check range of -x,-y,-w,-W alignment specifiers.
7184	* tune/speed.h (CACHE_LINE_SIZE): Amend comments.
7185
71862003-11-04  Torbjorn Granlund  <tege@swox.com>
7187
7188	* tune/speed.c: Fix typo in testing HAVE_NATIVE_mpn_modexact_1_odd.
7189
71902003-11-03  Kevin Ryde  <kevin@swox.se>
7191
7192	* mpn/ia64/hamdist.asm: New file.
7193	* mpn/ia64/mode1o.asm: New file.
7194	* mpn/ia64/ia64-defs.m4 (ASSERT): New macro.
7195
7196	* tests/mpz/t-set_d.c (check_2n_plus_1): New test.
7197
71982003-11-01  Kevin Ryde  <kevin@swox.se>
7199
7200	* mpz/fac_ui.c (BSWAP_ULONG) [limb==2*long]: Remove this case, it
7201	provokes code gen problems on HP cc.
7202	(BSWAP_ULONG) [generic]: Rename __dst variable to avoid conflicts with
7203	BITREV_ULONG.
7204	Fix by Jason Moxham.
7205
7206	* mpn/powerpc32/mode1o.asm: Use 16-bit i*i for early out, no need to
7207	truncate divisor.  Amend stated 750/7400 speeds, and note operands
7208	that give the extremes.
7209
7210	* mpz/set_d.c: Don't use a special case for d < MP_BASE_AS_DOUBLE, gcc
7211	3.3 -mpowerpc64 on darwin gets ulonglong->double casts wrong.
7212
7213	* mpn/generic/diveby3.c: Show a better style carry handling in the
7214	alternative pipelined sample code.
7215
7216	Revert this, the longlong.h macros need -mpowerpc64:
7217	* acinclude.m4 (GMP_GCC_POWERPC64): New macro.
7218	* configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
7219	when bad.
7220
72212003-10-31  Torbjorn Granlund  <tege@swox.com>
7222
7223	* mpn/powerpc64/mode64/submul_1.asm: Move an instruction to save a
7224	cycle on POWER4.
7225
7226	* mpn/powerpc64/mode64/divrem_1.asm: Fix several syntax problems
7227	revealed on Mac OS X.
7228
7229	* mpn/powerpc64/mode64/*.asm: Add cycle counts for POWER4.
7230
7231	* mpn/powerpc64/sqr_diagonal.asm: Rewrite to save a cycle on POWER4.
7232
72332003-10-31  Kevin Ryde  <kevin@swox.se>
7234
7235	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-31.
7236
7237	* mpn/powerpc64/README: Add subdirectory organisation notes.
7238
7239	* tests/mpn/t-get_d.c: Don't use limits.h, LONG_MIN is wrong on gcc
7240	2.95 with -mcpu=ultrasparc.
7241
7242	* acinclude.m4 (GMP_GCC_POWERPC64): New macro.
7243	* configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
7244	when bad.
7245
7246	* configure.in (powerpc64-*-darwin*) [ABI=mode32]: Use gcc -mcpu flags.
7247
7248	* mpn/ia64/divrem_1.asm, mpn/ia64/gcd_1.asm: Use "C" for comments.
7249	* mpn/ia64/README, mpn/ia64/ia64-defs.m4: Note this.
7250
7251	* mpn/ia64/ia64-defs.m4: Renamed from default.m4, per other defs files.
7252	* configure.in (IA64_PATTERN): Update GMP_INCLUDE_MPN.
7253
7254	* doc/gmp.texi (Notes for Particular Systems): Remove m68k ABI notes
7255	for -mshort and PalmOS, now works.
7256	(References): Correction, GMP Square Root proof already there, just
7257	wanting URL from RRRR 4475.
7258
72592003-10-29  Kevin Ryde  <kevin@swox.se>
7260
7261	* configure.in (sparc*-*-*): Use gcc -m32 when that option works, to
7262	force 32-bit mode on dual 32/64 configurations like GNU/Linux.
7263	(sparc64-*-linux*): Add support for ABI=64.
7264
7265	* mpn/generic/pre_divrem_1.c: In fraction part, use CNST_LIMB(0) with
7266	udiv_qrnnd_preinv to avoid warning about shift > type.
7267
7268	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-29.
7269
7270	* tests/cxx/t-istream.cc: Avoid tellg() checks if putback() doesn't
7271	update that, avoids certain g++ 2.96 problems.
7272
7273	* tests/mpn/t-fat.c: New file.
7274	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
7275
7276	* configure.in (CPUVEC_INSTALL, ITERATE_FAT_THRESHOLDS): New macros
7277	for fat.h.
7278	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Use CPUVEC_INSTALL instead
7279	of memcpy.  Correction to location of "initialized" set.  Improve
7280	various comments.
7281
72822003-10-27  Torbjorn Granlund  <tege@swox.com>
7283
7284	* mpn/sparc64/mul_1.asm: Change addcc => add in a few places.
7285	* mpn/sparc64/addmul_1.asm: Likewise.
7286
7287	* mpn/sparc32/v9/mul_1.asm: Apply cross-jumping.
7288	* mpn/sparc32/v9/addmul_1.asm: Likewise.
7289	* mpn/sparc32/v9/submul_1.asm: Likewise.
7290	* mpn/sparc32/v9/sqr_diagonal.asm: Likewise.
7291
72922003-10-27  Kevin Ryde  <kevin@swox.se>
7293
7294	* tests/cxx/t-misc.cc: Don't use <climits>, on g++ 2.95.4 (debian 3.0)
7295	-mcpu=ultrasparc LONG_MIN is wrong and kills the compile.
7296
7297	* tests/cxx/t-istream.cc: Correction to tellg tests, don't assume
7298	streampos is zero based.
7299
7300	* configure.in (HAVE_HOST_CPU_FAMILY_alpha): New define for config.h.
7301	* mpn/generic/get_d.c: Use it instead of __alpha for alpha workaround,
7302	since Cray cc doesn't define __alpha.
7303
7304	* mpn/x86/README: Revise PIC coding notes a bit, add gcc visibility
7305	attribute.
7306
73072003-10-25  Kevin Ryde  <kevin@swox.se>
7308
7309	* mpn/ia64/gcd_1.asm: New file.
7310
7311	* tune/many.pl: Allow for PROLOGUE(fun,...), as used on alpha.
7312
7313	* doc/gmp.texi (C++ Formatted Input): Describe base indicator handling.
7314
7315	* tests/cxx/t-istream.cc: New file.
7316	* tests/cxx/Makefile.am: Add it.
7317
7318	* cxx/ismpznw.cc: New file, integer input without whitespace ...
7319	* cxx/ismpz.cc: ... from here.
7320	* gmp-impl.h (__gmpz_operator_in_nowhite): Add prototype.
7321	* cxx/ismpq.cc: Rewrite using mpz input routines.  Change to accept a
7322	separate base indicator on numerator and denominator.  Fix base
7323	indicator case where "123/0456" would stop at "123/0".
7324	* Makefile.am, cxx/Makefile.am: Add cxx/ismpznw.cc.
7325
7326	* tests/mpz/t-set_d.c: New file, derived from tests/mpz/t-set_si.c
7327	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
7328
7329	* mpn/m68k/lshift.asm, mpn/m68k/rshift.asm: Support 16-bit int and
7330	stack alignment.
7331	* mpn/m68k/README: Add notes on this.
7332	* configure.in (SIZEOF_UNSIGNED): New define in config.m4.
7333	* mpn/m68k/m68k-defs.m4 (m68k_definsn): Add cmpw, movew.
7334	Reported by Patrick Pelissier.
7335
7336	* mpn/m68k/t-m68k-defs.pl: Don't use -> with hashes, to avoid
7337	deprecation warnings from perl 5.8.
7338
7339	* configure.in (viac3-*-*): Use just x86/pentium in $path not x86/p6.
7340	If gcc is to be believed the old C3s don't have cmov.
7341
7342	* Makefile.am: Amend comments about not building from libtool
7343	convenience libraries.
7344
7345	* mpn/asm-defs.m4 (PROLOGUE): Use m4_file_seen, for correct filename
7346	in missing EPILOGUE error messages.
7347	(m4_file_seen): Amend comments about where used.
7348
7349	* Makefile.am (CXX_OBJECTS): Remove $U, C++ files are not subject to
7350	ansi2knr rules.
7351
7352	* gmp-h.in (mpn_divmod_1): Use __GMP_CAST, to avoid warnings in
7353	applications using g++ -Wold-style-cast.
7354
7355	* mpn/z8000/README: New file.
7356
73572003-10-22  Kevin Ryde  <kevin@swox.se>
7358
7359	* mpn/generic/get_d.c (CONST_1024, CONST_NEG_1023,
7360	CONST_NEG_1022_SUB_53): Replace ALPHA_WORKAROUND with a non-gcc-ism,
7361	and use on Cray Unicos alpha too, which has the same problem.
7362
7363	* configure.in (powerpc64-*-darwin*): Make ABI=32 available as the
7364	final fallback, remove mode64 until we know how it will work.
7365
7366	* doc/gmp.texi (Build Options): Add powerpc970 to available CPUs.
7367	(ABI and ISA): Add mode32 for Darwin.
7368
7369	* configure.in (gettimeofday): Use an explicit AC_TRY_LINK, to avoid
7370	known autoconf 2.57 problems with gettimeofday in AC_CHECK_FUNCS on
7371	HP-UX.
7372
7373	* configure.in (powerpc*-*-*): Use ABI=32 instead of ABI=standard for
7374	the default 32-bit ABI.  Fixes powerpc64-*-aix* which is documented as
7375	choices "aix64 32" but had "aix64 standard".
7376
7377	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-22.
7378
7379	* doc/gmp.texi (Notes for Particular Systems): Note m68k gcc -mshort
7380	and PalmOS calling conventions not supported.  Reported by Patrick
7381	Pelissier.
7382	(References): Add Paul Zimmermann's Inria 4475 paper.
7383
73842003-10-21  Torbjorn Granlund  <tege@swox.com>
7385
7386	* mpn/ia64/submul_1.asm: Slightly reschedule loop to accommodate
7387	Itanium 2 getf.sig latency.
7388
73892003-10-21  Kevin Ryde  <kevin@swox.se>
7390
7391	* tests/mpn/t-instrument.c: Add mpn_addlsh1_n, mpn_rsh1add_n,
7392	mpn_rsh1sub_n, mpn_sub_nc, mpn_sublsh1_n.  Typo in mpn_preinv_divrem_1
7393	conditional.
7394
73952003-10-20  Torbjorn Granlund  <tege@swox.com>
7396
7397	* mpn/powerpc64/mode32/add_n.asm: New file.
7398	* mpn/powerpc64/mode32/sub_n.asm: New file.
7399	* mpn/powerpc64/mode32/mul_1.asm: New file.
7400	* mpn/powerpc64/mode32/addmul_1.asm: New file.
7401	* mpn/powerpc64/mode32/submul_1.asm: New file.
7402
74032003-10-19  Torbjorn Granlund  <tege@swox.com>
7404
7405	* longlong.h (AMD64): __x86_64__ => __amd64__.
7406	(64-bit powerpc): Only define carry-dependent macros if
7407	!_LONG_LONG_LIMB.
7408
7409	* acinclude.m4 (POWERPC64_PATTERN): Add powerpc970-*-*.
7410
7411	* configure.in (POWERPC64_PATTERN): Handle *-*-darwin*.
7412	(POWERPC64_PATTERN, *-*-aix*): Prepend powerpc64/mode64 to path_aix64.
7413
7414	* mpn/powerpc64/mode64/mul_1.asm: Change cal => addi.
7415	* mpn/powerpc64/mode64/addmul_1.asm: Likewise.
7416	* mpn/powerpc64/mode64/submul_1.asm: Likewise.
7417	* mpn/powerpc64/sqr_diagonal.asm: Likewise.
7418
7419	* mpn/powerpc64/mode64/mul_1.asm: Move from "..".
7420	* mpn/powerpc64/mode64/addmul_1.asm: Likewise.
7421	* mpn/powerpc64/mode64/submul_1.asm: Likewise.
7422	* mpn/powerpc64/mode64/divrem_1.asm: Likewise.
7423	* mpn/powerpc64/mode64/rsh1sub_n.asm: Likewise.
7424	* mpn/powerpc64/mode64/add_n.asm: Likewise.
7425	* mpn/powerpc64/mode64/addsub_n.asm: Likewise.
7426	* mpn/powerpc64/mode64/sub_n.asm: Likewise.
7427	* mpn/powerpc64/mode64/addlsh1_n.asm: Likewise.
7428	* mpn/powerpc64/mode64/diveby3.asm: Likewise.
7429	* mpn/powerpc64/mode64/rsh1add_n.asm: Likewise.
7430	* mpn/powerpc64/mode64/sublsh1_n.asm: Likewise.
7431
7432	* mpn/powerpc64/lshift.asm: Handle mode32 ABI.
7433	* mpn/powerpc64/rshift.asm: Likewise.
7434	* mpn/powerpc64/umul.asm: Likewise.
7435
7436	* tune/powerpc64.asm: Make it actually work.
7437
74382003-10-19  Kevin Ryde  <kevin@swox.se>
7439
7440	* mpn/generic/get_d.c: Add a workaround for alpha gcc signed constant
7441	comparison bug.
7442
7443	* gmpxx.h (gmp_randclass gmp_randinit_lc_2exp_size constructor): Throw
7444	std::length_error if size is too big.
7445	* tests/cxx/t-rand.cc (check_randinit): Exercise this.
7446
7447	* mpn/x86/pentium4/sse2/addlsh1_n.asm: New file, derived in part from
7448	mpn/x86/pentium4/sse2/add_n.asm.
7449
7450	* doc/gmp.texi (C++ Interface Integers, C++ Interface Rationals, C++
7451	Interface Floats): Note std::invalid_argument exception for invalid
7452	strings to constructors and operator=.
7453	(C++ Interface Random Numbers): Note std::length_error exception for
7454	size too big in gmp_randinit_lc_2exp_size.
7455
74562003-10-18  Kevin Ryde  <kevin@swox.se>
7457
7458	* mpfr/*: Update to mpfr-2-0-2-branch 2003-10-18.
7459
7460	* gmpxx.h (mpz_class, mpq_class, mpf_class, mpfr_class constructors
7461	and operator= taking string or char*): Throw std::invalid_argument if
7462	string cannot be converted.
7463	* tests/cxx/t-constr.cc, tests/cxx/t-assign.cc: Exercise this.
7464
7465	* cxx/ismpz.cc, cxx/ismpq.cc, cxx/ismpf.cc: Use istream std::locale
7466	ctype facet for isspace when available.  Only accept space at the
7467	start of the input, same as g++ libstdc++.  Use ASSERT_NOCARRY to
7468	check result of mpz_set_str etc.
7469	* cxx/ismpf.cc: Don't accept "@" for exponent indicator.
7470
7471	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Remove
7472	_open and _mpn variants of mpn_toom3_mul_n, only one style now.
7473	* tune/mul_n_open.c, tune/mul_n_mpn.c: Remove files.
7474
7475	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
7476	(udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
7477
7478	* tests/mpz/t-import.c, tests/mpz/t-export.c: Use octal for character
7479	constants, hex is an ANSI-ism.
7480
7481	* mpn/alpha/ev5/mode1o.c: Corrections to ASSERTs, as per
7482	mpn/generic/mode1o.c.
7483
7484	* mpn/generic/diveby3.c: Add commented out alternative code and notes
7485	for taking the multiply off the dependent chain.  Amend/clarify some
7486	of the other comments.
7487
7488	* configure.in (powerpc970-*-*): Use gcc -mcpu=970 when available.
7489	(powerpc7400-*-*): Fallback on gcc -mcpu=750 if -mcpu=7400 not
7490	available.
7491
7492	* doc/gmp.texi (C++ Formatted Input): Note locale digit grouping not
7493	supported.
7494	(C++ Formatted Input, C++ Formatted Output): Cross reference class
7495	interface on overloading.
7496
7497	* mpn/m68k/README: Add various ideas from doc/tasks.html.
7498
7499	* mpn/m88k/README: New file.
7500
75012003-10-16  Torbjorn Granlund  <tege@swox.com>
7502
7503	* config.sub: Recognize powerpc970.
7504
75052003-10-15  Torbjorn Granlund  <tege@swox.com>
7506
7507	* config.guess: Recognize powerpc970 under MacOS.
7508
75092003-10-15  Kevin Ryde  <kevin@swox.se>
7510
7511	* configure.in, acinclude.m4 (GMP_C_RIGHT_SHIFT): New test.
7512	* gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
7513	(udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
7514
7515	* mpn/amd64/amd64-defs.m4: New file, with a non-aligning PROLOGUE.
7516	* configure.in (amd64-*-*): Use it.
7517	* mpn/amd64/addlsh1_n.asm: Add ALIGN(16).
7518
7519	* mpfr/*: Update to mpfr cvs 2003-10-15.
7520
7521	* mpn/generic/get_d.c: Rewrite, simplifying and truncating towards
7522	zero unconditionally.
7523	* tests/mpn/t-get_d.c: Add various further tests.
7524	* gmp-impl.h (FORCE_DOUBLE): New macro.
7525
7526	* gmp-h.in (__mpz_struct): Add comment on __mpz_struct getting into
7527	C++ mangled function names.
7528
7529	* doc/gmp.texi (Build Options): Update notes for new doc subdir.
7530	(Low-level Functions): Note mpn functions don't check for zero limbs
7531	etc, it's up to an application to strip.
7532
7533	* doc/configuration (Configure): mdate-sh now in doc subdir, add
7534	generated fat.h.
7535
75362003-10-14  Torbjorn Granlund  <tege@swox.com>
7537
7538	* mpn/ia64/lorrshift.asm: Rewrite.
7539
7540	* mpn/ia64/diveby3.asm: Remove explicit bundling; add branch hints.
7541
75422003-10-13  Torbjorn Granlund  <tege@swox.com>
7543
7544	* mpn/ia64/diveby3.asm: New file.
7545
75462003-10-13  Kevin Ryde  <kevin@swox.se>
7547
7548	* mpn/powerpc32/mod_34lsub1.asm: New file.
7549
7550	* mpn/powerpc32/diveby3.asm, mpn/powerpc64/diveby3.asm: src[] in
7551	second operand of mullw, to allow possible early-out, which the
7552	0xAA..AB inverse cannot give.  This improvement noticed by Torbjorn.
7553
7554	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Print to config.log whether
7555	local label is purely temporary or appears in object files, for
7556	development purposes.
7557
7558	* doc/gmp.texi, doc/fdl.texi, doc/texinfo.tex, doc/mdate-sh: Moved
7559	from top-level.
7560	* doc/Makefile.am: New file.
7561	* configure.in (AC_OUTPUT): Add doc/Makefile.
7562	* Makefile.am (SUBDIRS): Move doc subdirectory from EXTRA_DIST.
7563	(info_TEXINFOS, gmp_TEXINFOS): Moved to doc/Makefile.am.
7564	* mpfr/Makefile.am (mpfr_TEXINFOS): fdl.texi now in doc subdir.
7565	(TEXINFO_TEX): texinfo.tex now in doc subdir.
7566	(AM_MAKEINFOFLAGS): Set -I to doc subdir.
7567
7568	* mpz/and.c: For positive/positive, use mpn_and_n, rate a realloc as
7569	UNLIKELY.
7570
7571	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Don't test
7572	for high zero limbs.
7573
75742003-10-12  Torbjorn Granlund  <tege@swox.com>
7575
7576	* mpn/powerpc64/diveby3.asm: New file (trivial edits of
7577	powerpc32/diveby3.asm).
7578
7579	* mpn/powerpc32/diveby3.asm: Update cycle counts with more processors.
7580	* mpn/powerpc32/sqr_diagonal.asm: Likewise.
7581
7582	* mpn/pa64/add_n.asm: Correct PA8500 cycle counts.
7583	* mpn/pa64/sub_n.asm: Likewise.
7584
7585	* mpn/m68k/aors_n.asm (INPUT PARAMETERS): Fix typo.
7586	* mpn/m68k/lshift.asm: Likewise.
7587	* mpn/m68k/rshift.asm: Likewise.
7588
7589	* mpn/m68k/README: Correct an URL; add some STATUS comments.
7590
7591	* mpn/ia64/aorslsh1_n.asm: Avoid shrp when shl/shr works just as well.
7592
7593	* mpn/powerpc32/addlsh1_n.asm: New file.
7594	* mpn/powerpc32/sublsh1_n.asm: New file.
7595
75962003-10-12  Kevin Ryde  <kevin@swox.se>
7597
7598	* mpn/sparc64/divrem_1.c, mpn/sparc64/mod_1.c: New files.
7599	* mpn/sparc64/sparc64.h (HALF_ENDIAN_ADJ, count_leading_zeros_32,
7600	invert_half_limb, udiv_qrnnd_half_preinv): New macros.
7601
7602	* gmp-impl.h (udiv_qrnnd_preinv2): Use a ? : for getting the n1 bit,
7603	so as not to depend on signed right shifts being arithmetic.
7604
7605	* mpn/powerpc32/diveby3.asm: New file.
7606
7607	* mpn/generic/divrem_1.c: Use CNST_LIMB(0) to avoid warnings from
7608	udiv_qrnnd_preinv about shift count when int<long.  Do the same with
7609	udiv_qrnnd, for consistency.
7610
7611	* Makefile.am (install-data-hook): Print a warning recommending "make
7612	check" to watch out for compiler bugs.  Proposed by Torbjorn.
7613
7614	* mpn/ia64/README (mpn_lshift, mpn_rshift): Amend prospective itanium2
7615	speed, 0.75 c/l with shrp plus shl/shr.
7616
7617	* mpn/ia64/popcount.asm: Add comment on optimality.
7618
76192003-10-11  Torbjorn Granlund  <tege@swox.com>
7620
7621	* mpn/ia64/rsh1aors_n.asm: New file.
7622
7623	* mpn/asm-defs.m4: Handle rsh1aors_n.
7624
7625	* configure.in (tmp_mulfunc): Handle rsh1aors_n.
7626
76272003-10-11  Kevin Ryde  <kevin@swox.se>
7628
7629	* mpn/x86/pentium4/sse2/diveby3.asm: Remove non-PIC RODATA memory
7630	access for 0xAAAAAAAB constant.
7631
7632	* gmp-impl.h (popc_limb, ULONG_PARITY) [ev67, ev68]: Add gcc asm
7633	versions using ctpop.
7634
7635	* mpn/x86/k6/aorsmul_1.asm: Tweak some comments, remove M4_description
7636	and M4_desc_retval used only in comments.
7637
7638	* mpn/x86/k6/mul_basecase.asm: Add comment on using mpn_mul_1.
7639
76402003-10-09  Torbjorn Granlund  <tege@swox.com>
7641
7642	* mpn/powerpc64/addlsh1_n.asm: Tweak for 0.25 c/l better loop speed.
7643	* mpn/powerpc64/sublsh1_n.asm: Likewise.
7644
76452003-10-09  Kevin Ryde  <kevin@swox.se>
7646
7647	* mpfr/*: Update to mpfr cvs 2003-10-09.
7648
7649	* tests/devel/try.c (_SC_PAGESIZE): Define from _SC_PAGE_SIZE on
7650	systems which use that, eg. hpux 9.
7651
76522003-10-07  Kevin Ryde  <kevin@swox.se>
7653
7654	* tune/freq.c (freq_sysctl_hw_model): Correction to last sscanf change.
7655
7656	* configure.in: Check for psp_iticksperclktick in struct pst_processor.
7657	* tune/freq.c (freq_pstat_getprocessor): Use this.
7658
7659	* tests/devel/try.c (divisor_array): Add a couple of half-limb values.
7660
7661	* acinclude.m4 (GMP_PROG_CC_WORKS): Correction to last change, need to
7662	set result "yes" when cross compiling.
7663
76642003-10-06  Torbjorn Granlund  <tege@swox.com>
7665
7666	* mpn/generic/mul_n.c: Use __GMPN_ADD_1/_GMPN_SUB_1 instead of
7667	mpn_add_1 and mpn_sub_1.
7668
7669	* mpn/pa64/aorslsh1_n.asm: Schedule register save and restore code.
7670
76712003-10-05  Torbjorn Granlund  <tege@swox.com>
7672
7673	* mpn/pa64/mul_1.asm: Misc comment cleanups.
7674	* mpn/pa64/addmul_1.asm: Likewise.
7675	* mpn/pa64/submul_1.asm: Likewise.
7676
7677	* mpn/pa64/README: Correct cycle counts.
7678
7679	* mpn/pa64/aorslsh1_n.asm: New file.
7680
76812003-10-04  Kevin Ryde  <kevin@swox.se>
7682
7683	* tune/freq.c (freq_sysctl_hw_model, freq_sunos_sysinfo,
7684	freq_sco_etchw, freq_bsd_dmesg, freq_irix_hinv): Demand matching of
7685	MHz etc at end of sscanf format string.  In particular need this for
7686	freq_bsd_dmesg on i486-pc-freebsd4.7 to avoid the 486 cpu being used
7687	for the frequency.
7688
7689	* tests/misc.c, tests/tests.h (tests_setjmp_sigfpe,
7690	tests_sigfpe_handler, tests_sigfpe_done, tests_sigfpe_target,
7691	tests_dbl_mant_bits): New.
7692
7693	* configure.in (viac3*-*-*): Add gcc VIA c3 options.
7694
7695	* mpfr/*: Update to mpfr cvs 2003-10-04.
7696
7697	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
7698	refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps.
7699	* tests/tests.h (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
7700	refmpn_rsh1sub_n): Add prototypes.
7701
7702	* tests/devel/try.c, tune/many.pl: Add mpn_addlsh1_n, mpn_sublsh1_n,
7703	mpn_rsh1add_n, mpn_rsh1sub_n.
7704
77052003-10-03  Torbjorn Granlund  <tege@swox.com>
7706
7707	* tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
7708	refmpn_rsh1sub_n): New functions.
7709
77102003-10-03  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
7711
7712	* mpn/generic/mul_n.c (toom3_interpolate): Use mpn_add_1/mpn_sub_1
7713	instead of MPN_INCR_/MPN_DECR_U.
7714
77152003-10-02  Torbjorn Granlund  <tege@swox.com>
7716
7717	* configure.in (ia64*-*-hpux*): Fall back to +O1, not +O.
7718
77192003-10-02  Kevin Ryde  <kevin@swox.se>
7720
7721	* configure.in (ia64*-*-hpux*): For cc, let +O optimization level
7722	fallback if +O3 doesn't work.
7723
7724	* acinclude.m4 (GMP_PROG_CC_WORKS): Add a test of __builtin_alloca
7725	when available, to pick up Itanium HP-UX cc internal errors in +O2.
7726	Provoking code by Torbjorn.
7727
77282003-10-01  Torbjorn Granlund  <tege@swox.com>
7729
7730	* mpn/ia64/gmp-mparam.h: Retune.
7731
7732	* mpn/asm-defs.m4: Handle aorslsh1_n.
7733
7734	* configure.in (tmp_mulfunc): Handle aorslsh1_n.
7735
7736	* mpn/ia64/aorslsh1_n.asm: New file.
7737
7738	* mpn/ia64/aors_n.asm: New file, complete rewrite of mpn_add_n and
7739	mpn_sub_n.
7740	* mpn/ia64/add_n.asm: Replace by aors_n.asm.
7741	* mpn/ia64/sub_n.asm: Replace by aors_n.asm.
7742
77432003-10-01  Kevin Ryde  <kevin@swox.se>
7744
7745	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Make bad ARM last byte into a
7746	separate case and consider it non-IEEE, since it looks like this is
7747	due to some sort of restricted or incorrect software floats.
7748
7749	* demos/calc/Makefile.am: Use automake yacc/lex support, seems fine in
7750	separate objdir now.
7751
7752	* cxx/dummy.cc: Moved from top-level dummy.cc.
7753	* Makefile.am (libgmpxx_la_SOURCES): Update to cxx/dummy.cc,
7754	correction to comment about this.
7755
77562003-09-30  Torbjorn Granlund  <tege@swox.com>
7757
7758	* demos/pexpr.c: Correct documentation of -split.
7759	(TIME): Remove cast of result to double.
7760	(main): Change timing variables to int.
7761	(main): #ifdef LIMIT_RESOURCE_USAGE, don't convert numbers of more than
7762	100000 digits.
7763
77642003-09-28  Torbjorn Granlund  <tege@swox.com>
7765
7766	* mpn/*/*.asm: Clean up spacing, tabify.
7767
7768	* mpn/alpha/rshift.asm: Table cycle counts.
7769	* mpn/alpha/lshift.asm: Likewise.
7770	* mpn/alpha/ev5/rshift.asm: Likewise.
7771	* mpn/alpha/ev5/lshift.asm: Likewise.
7772	* mpn/alpha/ev6/add_n.asm: Likewise.
7773	* mpn/alpha/ev6/sub_n.asm: Likewise.
7774
7775	* mpn/ia64/lorrshift.asm: Amend comments about performance.
7776
7777	* mpn/pa64/mul_1.asm: Fix comment typo.
7778	* mpn/pa64/addmul_1.asm: Likewise.
7779	* mpn/pa64/submul_1.asm: Likewise.
7780
7781	* mpn/amd64/addlsh1_n.asm: Save/restore carry using two insn to break
7782	recurrency.  Add remarks about possible further speedup.
7783	* mpn/amd64/sublsh1_n.asm: Likewise.
7784
7785	* mpn/amd64/rsh1add_n.asm: Add remarks about possible further speedup.
7786	* mpn/amd64/rsh1sub_n.asm: Likewise.
7787
77882003-09-27  Torbjorn Granlund  <tege@swox.com>
7789
7790	* mpn/powerpc64/README: Update with POWER4/PPC970 pipeline info.
7791
7792	* mpn/powerpc64/rsh1add_n.asm: New file.
7793	* mpn/powerpc64/rsh1sub_n.asm: New file.
7794	* mpn/powerpc64/rshift.asm: Rewrite.
7795	* mpn/powerpc64/lshift.asm: Rewrite.
7796
77972003-09-26  Torbjorn Granlund  <tege@swox.com>
7798
7799	* mpn/powerpc64/addlsh1_n.asm: New file.
7800	* mpn/powerpc64/sublsh1_n.asm: New file.
7801
78022003-09-25  Torbjorn Granlund  <tege@swox.com>
7803
7804	* tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
7805	speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): Conditionalize on
7806	corresponding HAVE_NATIVE_*.
7807
78082003-09-25  Kevin Ryde  <kevin@swox.se>
7809
7810	* mpz/combit.c: Use GMP_NUMB_BITS not BITS_PER_MP_LIMB.
7811
7812	* demos/expr/exprfr.c: Allow for mpfr_inf_p, mpfr_nan_p and
7813	mpfr_number_p merely returning non-zero, rather than 1 or 0.
7814
7815	* demos/expr/exprfr.c, demos/expr/t-expr.c: Add erf, integer_p, zeta.
7816
7817	* demos/expr/Makefile.am (LDADD): Update comments on $(LIBM).
7818
78192003-09-24  Torbjorn Granlund  <tege@swox.com>
7820
7821	* tune/speed.c (routine): Add entires for mpn_addlsh1_n, mpn_sublsh1_n,
7822	mpn_rsh1add_n, and mpn_rsh1sub_n.
7823
7824	* tune/speed.h: Declare speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
7825	speed_mpn_rsh1add_n, and speed_mpn_rsh1sub_n.
7826
7827	* tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
7828	speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): New functions.
7829
7830	* gmp-impl.h: Declare mpn_addlsh1_n, mpn_sublsh1_n, mpn_rsh1add_n, and
7831	mpn_rsh1sub_n.
7832
7833	* mpn/asm-defs.m4: Add define_mpn's for addlsh1_n, sublsh1_n,
7834	rsh1add_n, and rsh1sub_n.
7835
7836	* mpn/powerpc64/*.asm: Add cycle counts in consistent style.  Misc
7837	styling edits.
7838
7839	* mpn/amd64/gmp-mparam.h: Retune.
7840
7841	* configure.in: Add #undefs for HAVE_NATIVE_mpn_addlsh1_n,
7842	HAVE_NATIVE_mpn_sublsh1_n, HAVE_NATIVE_mpn_rsh1add_n,
7843	HAVE_NATIVE_mpn_rsh1sub_n.
7844	(gmp_mpn_functions_optional): List addlsh1_n, sublsh1_n, rsh1add_n,
7845	and rsh1sub_n.
7846
7847	* mpn/amd64/addlsh1_n.asm: New file.
7848	* mpn/amd64/sublsh1_n.asm: New file.
7849	* mpn/amd64/rsh1add_n.asm: New file.
7850	* mpn/amd64/rsh1sub_n.asm: New file.
7851
78522003-09-24  Kevin Ryde  <kevin@swox.se>
7853
7854	* mpfr/*: Update to mpfr cvs 2003-09-24.
7855
7856	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Remove conftest* temporary files.
7857
78582003-09-23  Torbjorn Granlund  <tege@swox.com>
7859
7860	* gmp-impl.h (MUL_TOOM3_THRESHOLD, SQR_TOOM3_THRESHOLD): Now 128.
7861
78622003-09-23  Kevin Ryde  <kevin@swox.se>
7863
7864	* gmp-h.in (gmp_randinit_set): Use __gmp_const rather than const.
7865
78662003-09-22  Torbjorn Granlund  <tege@swox.com>
7867
7868	* tune/mul_n_mpn.c: (__gmpn_sqr_n): New #define.
7869	* tune/mul_n_open.c (__gmpn_sqr_n): New #define.
7870
7871	* mpn/generic/mul.c (mpn_sqr_n): Move from here...
7872	* mpn/generic/mul_n.c (mpn_sqr_n): ...to here.
7873	(mpn_sqr_n): Allocate workspace for toom3 using TMP_* mechanism except
7874	for very large operands when !WANT_FFT.
7875
7876	* mpn/generic/mul_n.c: Add a missing ";". Misc comment fixes.
7877
7878	* mpn/generic/mul.c: Remove spurious #include <stdio.h>.
7879
7880	* mpn/x86/k7/gmp-mparam.h: Retune.
7881
7882	* mpn/generic/mul_n.c (mpn_mul_n): Allocate workspace for toom3 using
7883	TMP_* mechanism except for very large operands when !WANT_FFT.
7884
7885	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE):
7886	Define conditionally on WANT_FFT and HAVE_NATIVE_mpn_sublsh1_n.
7887	(MPN_TOOM3_MAX_N): New #define.
7888
7889	* mpn/amd64/gmp-mparam.h: Retune.
7890
7891	* mpn/Makefile.am (TARG_DIST): Add amd64.
7892
7893	* mpn/generic/sqr_basecase.c: Use mpn_addlsh1_n when available.
7894
7895	* mpn/generic/mul_n.c: Use proper form for HAVE_NATIVE macros.
7896
78972003-09-22  Kevin Ryde  <kevin@swox.se>
7898
7899	* mpfr/*: Update to mpfr cvs 2003-09-22.
7900
79012003-09-21  Kevin Ryde  <kevin@swox.se>
7902
7903	* mpn/x86/pentium4/sse2/gmp-mparam.h (USE_PREINV_DIVREM_1,
7904	USE_PREINV_MOD_1): Set to 1 for new asm versions.
7905
7906	* mpfr/*: Update to mpfr cvs 2003-09-21.
7907
79082003-09-21  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
7909
7910	* mpn/generic/mul_n.c (mpn_toom3_mul_n): Conditionally use
7911	mpn_sublsh1_n, mpn_rsh1add_n and mpn_rsh1sub_n, in addition to
7912	mpn_addlsh1_n.  Avoid all copying, at the expense of some additional
7913	workspace.
7914
7915	* gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Accomodate
7916	latest toom3 code.
7917
79182003-09-19  Kevin Ryde  <kevin@swox.se>
7919
7920	* mpn/x86/pentium4/sse2/divrem_1.asm, mpn/x86/pentium4/sse2/mod_1.asm:
7921	New files.
7922
79232003-09-16  Kevin Ryde  <kevin@swox.se>
7924
7925	* tune/speed.c (run_one): Don't scale the -1.0 not-available return.
7926	Print "n/a" for times not-available.
7927
79282003-09-13  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
7929
7930	* mpn/generic/mul_n.c (toom3_interpolate): New function.
7931	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Call toom3_interpolate.
7932
79332003-09-12  Torbjorn Granlund  <tege@swox.com>
7934
7935	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove unused
7936	variables.
7937	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Use offset `+ 1', not `+ 2' in last
7938	MPN_DECR_U calls.
7939
79402003-09-12  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
7941
7942	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Rewrite.
7943
79442003-09-12  Torbjorn Granlund  <tege@swox.com>
7945
7946	* gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Reformulate
7947	to use the same form as MPN_TOOM3_MUL_N_TSIZE.
7948	(MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Update for new Toom3
7949	code requirements.
7950	* mpn/generic/mul_n.c (evaluate3, interpolate3, add2Times): Remove.
7951	(USE_MORE_MPN): Remove.
7952
79532003-08-31  Kevin Ryde  <kevin@swox.se>
7954
7955	* mpfr/*: Update to mpfr cvs 2003-08-31.
7956
79572003-08-30  Kevin Ryde  <kevin@swox.se>
7958
7959	* mpfr/*: Update to mpfr cvs 2003-08-30.
7960
79612003-08-29  Torbjorn Granlund  <tege@swox.com>
7962
7963	* mpn/amd64/copyi.asm: New file.
7964	* mpn/amd64/copyd.asm: New file.
7965	* mpn/amd64/README: New file.
7966
79672003-08-28  Torbjorn Granlund  <tege@swox.com>
7968
7969	* mpn/amd64/lshift.asm: New file.
7970	* mpn/amd64/rshift.asm: New file.
7971	* mpn/amd64/gmp-mparam.h: Retune.
7972
79732003-08-23  Kevin Ryde  <kevin@swox.se>
7974
7975	* tune/freq.c (freq_getsysinfo): Correction to speed_cycletime value
7976	established.
7977
7978	* mpz/rootrem.c, gmp-h.in, gmp.texi (mpz_rootrem): Don't return
7979	exactness indication, can get that from testing the remainder.
7980
7981	* mpn/x86/k7/aors_n.asm, mpn/x86/k7/mmx/copyi.asm: Amend to comments
7982	about loads and stores and what speed should be possible.
7983
79842003-08-22  Torbjorn Granlund  <tege@swox.com>
7985
7986	* mpn/amd64/add_n.asm: New file.
7987	* mpn/amd64/sub_n.asm: New file.
7988	* mpn/amd64/mul_1.asm: New file.
7989	* mpn/amd64/addmul_1.asm: New file.
7990	* mpn/amd64/submul_1.asm: New file.
7991
79922003-08-19  Kevin Ryde  <kevin@swox.se>
7993
7994	* longlong.h (add_ssaaaa, sub_ddmmss) [hppa 64]: Move down into main
7995	__GNUC__ block.  Exclude for _LONG_LONG_LIMB (ie. ABI=2.0n) since
7996	these forms are only for ABI=2.0w.
7997
7998	* longlong.h (count_leading_zeros) [__mcpu32__]: Check __mcpu32__ to
7999	avoid bfffo on GCC 3.4 in CPU32 mode.  Reported by Bernardo Innocenti.
8000
8001	* longlong.h (count_trailing_zeros) [x86_64]: Use "%q0" to force
8002	64-bit register destination.  Pointed out by Torbjorn.
8003
8004	* mpz/combit.c: Correction to carry handling when extending a
8005	negative, and use __GMPN_ADD_1.  Correction to complement limb for a
8006	negative when there's a non-zero low limb.
8007	* tests/mpz/bit.c (check_clr_extend, check_com_negs): Exercise these.
8008
8009	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add
8010	get_d_2exp.
8011	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Rand.pm,
8012	demos/perl/test.pl: Add gmp_urandomb_ui, gmp_urandomm_ui.
8013	(GMP::Rand::randstate): Accept a randstate object to copy.
8014	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Mpz.pm,
8015	demos/perl/test.pl: Add combit, rootrem.
8016
80172003-08-19  Torbjorn Granlund  <tege@swox.com>
8018
8019	* tune/Makefile.am (EXTRA_DIST): Add amd64.asm.
8020
80212003-08-17  Kevin Ryde  <kevin@swox.se>
8022
8023	* gmpxx.h [__MPFR_H]: Include full <iostream> for inlines.
8024	* tests/cxx/t-headfr.cc: New file, exercising this.
8025	* tests/cxx/Makefile.am: Add it.
8026
8027	* tests/cxx/t-constr.cc: Include config.h for WANT_MPFR.
8028
8029	* gmpxx.h: Correction to temp variable type in mpf -> mpfr assignment.
8030	Reported by Derrick Bass.
8031	* tests/cxx/t-assign.cc (check_mpfr): Exercise this.
8032
8033	* configure.in (WANT_MPFR): AC_DEFINE this, for the benefit of
8034	tests/cxx/t-*.cc.  (Was always meant to have been defined.)
8035	* tests/cxx/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpfr.
8036
8037	* gmpxx.h: __gmp_default_rounding_mode -> __gmpfr_default_rounding_mode
8038	(struct __gmp_hypot_function): Correction to mpfr_hypot addition.
8039	* tests/cxx/t-misc.cc (check_mpfr_hypot): Corrections to mpfr/long
8040	tests.
8041
80422003-08-16  Torbjorn Granlund  <tege@swox.com>
8043
8044	* configure.in (amd64): New.
8045
8046	* mpn/amd64/gmp-mparam.h: New file.
8047
8048	* tune/amd64.asm: New file, derived in part from tune/pentium.asm.
8049
80502003-08-15  Kevin Ryde  <kevin@swox.se>
8051
8052	* tune/freq.c (freq_irix_hinv): Reinstate, for the benefit of IRIX 6.2.
8053	(freq_attr_get_invent): Conditionalize on INFO_LBL_DETAIL_INVENT too.
8054
80552003-08-14  Kevin Ryde  <kevin@swox.se>
8056
8057	* mpq/get_d.c: Use mpn_get_d.
8058	* tests/mpq/t-get_d.c (check_onebit): New test.
8059
8060	* gmp.texi (Notes for Particular Systems): Under x86 cpu types, note
8061	i386 is a fat binary, remove pentium4 recommendation since i386 is now
8062	quite reasonable for p4.
8063	(Notes for Particular Systems): Under Windows DLLs, remove caveat
8064	about --enable-cxx now ok, update .lib creation for new libtool,
8065	remove .exp not needed for MS C.
8066	(Notes for Package Builds): i386 is a fat binary.
8067	(Reentrancy): Remove SCO ctype.h note, don't want to list every system
8068	misfeature, and was quite possibly for non-threading mode anyway.
8069	(Autoconf): Remove notes on gmp 2 detection, too old to want to
8070	encourage anyone to use.
8071	(Karatsuba Multiplication): Correction to threshold increase/decrease
8072	for a and b terms.  Reported by Richard Brent and Paul Zimmermann.
8073	Also add various further index entries.
8074
8075	* tune/freq.c (freq_attr_get_invent): New function.
8076	(freq_irix_hinv): Remove, in favour or freq_attr_get_invent.
8077	* configure.in (AC_CHECK_FUNCS): Add attr_get.
8078	(AC_CHECK_HEADERS): Add invent.h, sys/attributes.h, sys/iograph.h.
8079
80802003-08-03  Kevin Ryde  <kevin@swox.se>
8081
8082	* tune/tuneup.c (tune_mul): Use MUL_KARATSUBA_THRESHOLD_LIMIT.
8083
80842003-08-02  Kevin Ryde  <kevin@swox.se>
8085
8086	* mpn/asm-defs.m4: Tweak some comments, add hpux11 to m4wrap 0xFF
8087	problem systems.
8088
8089	* configure.in (*-*-sco3.2v5*): Remove lt_cv_archive_cmds_need_lc=no,
8090	since libtool no longer uses it.  This was a workaround fixing ctype.h
8091	in SCO 5 shared libraries; not sure if libtool now gets it right on
8092	its own, let's hope so.
8093
8094	* configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Remove, libtool no
8095	longer demands HOST_CC.
8096
8097	* configure.in: When C or C++ compiler not found, refer user to
8098	config.log.
8099
8100	* configure.in (i386-*-*): Turn i386 into a fat binary build.
8101	* mpn/x86/fat/fat.c, mpn/x86/fat/fat_entry.asm,
8102	mpn/x86/fat/gmp-mparam.h, mpn/x86/fat/gcd_1.c, mpn/x86/fat/mode1o.c:
8103	New files.
8104	* gmp-impl.h (struct cpuvec_t) [x86 fat]: New structure.
8105	* longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB) [x86 fat]: Define.
8106	* mpn/asm-defs.m4 (foreach): New macro.
8107	* mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): New define.
8108	* mpn/x86/sqr_basecase.asm: New file, primarily as a fallback for fat
8109	binaries.
8110	* mpn/x86/p6/gmp-mparam.h, mpn/x86/p6/mmx/gmp-mparam.h: Add comments
8111	about fat binary SQR_KARATSUBA_THRESHOLD for p6 and p6/mmx.
8112
8113	* configure.in: Add various supports for fat binaries, via fat_path,
8114	fat_functions and fat_thresholds variables.
8115	* acinclude.m4 (GMP_STRIP_PATH): Mung $fat_path too.
8116	(GMP_FAT_SUFFIX, GMP_REMOVE_FROM_LIST): New macros.
8117	* gmp-impl.h: Add various supports for fat binaries.
8118	(DECL_add_n etc): New macros.
8119	(mpn_mul_basecase etc): Define only if not already defined.
8120	* mpn/asm-defs.m4 (m4_config_gmp_mparam): Mention fat binary.
8121	(MPN): Use m4_unquote, for the benefit of fat binary name expansion.
8122	* doc/configuration: Notes on fat binaries.
8123	* gmp-impl.h (MUL_TOOM3_THRESHOLD_LIMIT): Define always.
8124	(MUL_KARATSUBA_THRESHOLD_LIMIT): New define.
8125	* mpn/generic/mul.c, mpn/generic/mul_n.c: Use these.
8126	* tune/divrem1div.c, tune/divrem1inv.c, tune/mod_1_div.c,
8127	tune/mod_1_inv.c: Define OPERATION_divrem_1 and OPERATION_mod_1, to
8128	tell fat.h what's being done.
8129
8130	* config.guess (alpha-*-*): Update comments on what configfsf.guess
8131	does and doesn't do for us.
8132
81332003-07-31  Kevin Ryde  <kevin@swox.se>
8134
8135	* config.guess: Remove $dummy.o files everywhere, in case vendor
8136	compilers produce that even when not asked.
8137
8138	* demos/perl/GMP.xs (class_or_croak): Rename "class" parameter to
8139	avoid C++ keyword.
8140	(coerce_ulong, coerce_long): Move croaks to stop g++ 3.3 complaining
8141	about uninitialized variables.
8142
8143	* demos/perl/INSTALL: Add notes on building with a DLL.
8144
8145	* longlong.h (count_trailing_zeros) [x86_64]: Ensure bsfq destination
8146	is a 64-bit register.  Diagnosed by Francois G. Dorais.
8147
81482003-07-31  Torbjorn Granlund  <tege@swox.com>
8149
8150	* longlong.h [ppc]: Remove nested test for vxworks.
8151
81522003-07-24  Kevin Ryde  <kevin@swox.se>
8153
8154	* gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si for
8155	mpz*long and long*mpz.
8156	* tests/cxx/t-ops.cc (check_mpz): Exercise mpz*long and mpz*ulong.
8157
8158	* cxx/ismpf.cc: Use std::locale decimal point when available.  Expect
8159	localeconv available always.
8160	* tests/cxx/t-locale.cc: Enable check_input tests.
8161
8162	* gmpxx.h (struct __gmp_hypot_function): Use mpfr_hypot.
8163	* tests/cxx/t-misc.cc (check_mpfr_hypot): New tests.
8164
8165	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-ops.cc,
8166	tests/cxx/t-prec.cc, tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc:
8167	Include config.h for WANT_MPFR.
8168
8169	* tests/mpz/bit.c (check_single): Correction to a diagnostic print.
8170
81712003-07-24  Niels M�ller  <nisse@lysator.liu.se>
8172
8173	* mpz/combit.c: New file.
8174	* Makefile.am, mpz/Makefile.am: Add it.
8175	* gmp-h.in (mpz_combit): Add prototype.
8176	* tests/mpz/bit.c (check_single): Exercise mpz_combit.
8177
81782003-07-16  Kevin Ryde  <kevin@swox.se>
8179
8180	* mpn/generic/get_d.c: Correction to infinity handling for large exp.
8181
81822003-07-14  Kevin Ryde  <kevin@swox.se>
8183
8184	* mpz/get_d.c, mpz/get_d_2exp.c, mpf/get_d.c, mpf/get_d_2exp.c: Use
8185	mpn_get_d.
8186
8187	* mpn/generic/get_d.c: New file, based on mpz/get_d.c and insert-dbl.c.
8188	* configure.in, mpn/Makefile.am: Add it.
8189	* gmp-impl.h (mpn_get_d): Add prototype.
8190
8191	* tests/mpn/t-get_d.c: New file.
8192	* tests/mpn/Makefile.am: Add it.
8193
8194	* tests/mpz/t-get_d_2exp.c (check_onebit, check_round): Test negatives.
8195	(check_onebit): Add a few more bit sizes.
8196
8197	* tests/misc.c, tests/tests.h (tests_isinf): New function.
8198
81992003-07-12  Kevin Ryde  <kevin@swox.se>
8200
8201	* configure.in (GMP_PROG_CXX_WORKS): Include $CPPFLAGS, same as
8202	automake does in the actual build.
8203
8204	* acinclude.m4 (GMP_PROG_CXX_WORKS): In the namespace test, declare
8205	namespace before trying to use.  In std iostream test, provoke a
8206	failure from Compaq C++ in pre-standard mode.
8207
82082003-07-08  Kevin Ryde  <kevin@swox.se>
8209
8210	* acinclude.m4 (GMP_PROG_CC_WORKS): Use separate compiles for various
8211	known problems, and indicate to the user the reason for rejecting.
8212	(GMP_PROG_CXX_WORKS): Ditto, and insist on being able to execute each
8213	compiled program.
8214
82152003-07-05  Kevin Ryde  <kevin@swox.se>
8216
8217	* config.sub: Add comments to our alias transformations.
8218
8219	* configfsf.sub, configfsf.guess: Update to 2003-07-04.
8220
8221	* acinclude.m4 (GMP_PROG_CC_WORKS, GMP_PROG_CC_WORKS_LONGLONG): Show
8222	failing program in config.log, per other autoconf tests.
8223
8224	* configure.in (i786-*-*): Recognise as pentium4, per configfsf.sub.
8225
82262003-06-28  Kevin Ryde  <kevin@swox.se>
8227
8228	* mpz/get_d_2exp.c, mpf/get_d_2exp.c: Avoid res==1.0 when floats round
8229	upwards.
8230
8231	* tests/mpz/t-get_d_2exp.c: New file.
8232	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
8233	* tests/mpf/t-get_d_2exp.c: New file.
8234	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
8235	* tests/x86call.asm, test/tests.h (x86_fldcw, x86_fstcw): New
8236	functions.
8237	* tests/misc.c, tests/tests.h (tests_hardware_getround,
8238	tests_hardware_setround): New functions.
8239
82402003-06-25  Kevin Ryde  <kevin@swox.se>
8241
8242	* mpn/sparc64/dive_1.c: New file.
8243
8244	* mpn/sparc64/sparc64.h: New file.
8245	* mpn/sparc64/mode1o.c: Remove things now in sparc64.h.
8246
8247	* mpfr/*: Update to mpfr cvs 2003-06-25.
8248
8249	* acinclude.m4 (GMP_PROG_CC_WORKS): In last change provoking gnupro
8250	gcc, don't use ANSI style function definition.
8251
82522003-06-22  Kevin Ryde  <kevin@swox.se>
8253
8254	* mpn/pa32/hppa1_1/udiv.asm: Remove .proc, .entry, .exit and .procend,
8255	handled by PROLOGUE and EPILOGUE.  Comment out .callinfo, per other
8256	asm files.
8257
8258	* gmpxx.h (mpz_class __gmp_binary_divides, __gmp_binary_modulus): Fix
8259	long/mpz and long%mpz for dividend==LONG_MIN divisor==-LONG_MIN.
8260	(mpz_class __gmp_binary_modulus): Fix mpz%long for negative dividend.
8261	* tests/cxx/t-ops.cc (check_mpz): Add test cases for these, merging
8262	operator/ and operator% sections for clarity.
8263
82642003-06-21  Kevin Ryde  <kevin@swox.se>
8265
8266	* mpfr/*: Update to mpfr cvs 2003-06-21.
8267
8268	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code by Torbjorn provoking an
8269	ICE from gcc 2.9-gnupro-99r1 under -O2 -mcpu=ev6.
8270	* configure.in (alpha*-*-* gcc_cflags_cpu): Fallback on -mcpu=ev56 for
8271	this compiler.
8272
8273	* gmpxx.h (get_d): Remove comments about long double, double is
8274	correct for get_d, a future long double form would be get_ld.
8275
82762003-06-19  Kevin Ryde  <kevin@swox.se>
8277
8278	* mpfr/*: Update to mpfr cvs 2003-06-19.
8279
8280	* mpn/generic/dive_1.c: Share src[0] fetch among all cases.  No need
8281	for separate final umul_ppmm in even case, make it part of the loop.
8282
8283	* mpz/get_d_2exp.c, mpq/set_si.c, mpq/set_ui.c: Nailify.
8284
8285	* mpf/iset_si.c: Rewrite using mpf/set_si.c code, in particular this
8286	nailifies it.
8287	* tests/mpf/t-set_si.c: Nailify tests.
8288
8289	* mpf/iset_ui.c: Nailify, as per mpf/set_ui.c
8290	* tests/mpf/t-set_ui.c: New file.
8291	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
8292
82932003-06-15  Kevin Ryde  <kevin@swox.se>
8294
8295	* mpfr/*: Update to mpfr cvs 2003-06-15.
8296
8297	* mpn/x86/k6/mode1o.asm: Remove a bogus ASSERT.
8298
82992003-06-12  Kevin Ryde  <kevin@swox.se>
8300
8301	* configure.in (--enable-assert): Emit WANT_ASSERT to config.m4.
8302	* mpn/powerpc32/powerpc-defs.m4, mpn/x86/x86-defs.m4 (ASSERT): Check
8303	WANT_ASSERT is defined.
8304
8305	* mpn/sparc32/v9/udiv.asm: Amend heading, this file is for sparc v9.
8306
8307	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): In libtool openbsd hack,
8308	disard error messages from cp, for the benefit of --disable-shared or
8309	systems not using names libgmp.so.*.
8310
8311	* tests/devel/try.c (try_one): When overlapping, copy source data
8312	after filling dst.  Previously probably used only DEADVAL in
8313	overlapping cases.
8314
83152003-06-11  Torbjorn Granlund  <tege@swox.com>
8316
8317	* mpf/random2.c: Rewrite.  Ignore sign of exp parameter.
8318
83192003-06-10  Kevin Ryde  <kevin@swox.se>
8320
8321	* mpn/sparc64/mode1o.c: New file.
8322
83232003-06-09  Torbjorn Granlund  <tege@swox.com>
8324
8325	* mpn/powerpc32/lshift.asm: Add more cycle counts.
8326	* mpn/powerpc32/rshift.asm: Add more cycle counts.
8327
8328	* mpn/ia64/addmul_1.asm: Reformat comments for 80 columns.
8329
8330	* gmp-impl.h (udiv_qrnnd_preinv1): New name for udiv_qrnnd_preinv.
8331	(udiv_qrnnd_preinv2): New name for udiv_qrnnd_preinv2norm.
8332	(udiv_qrnnd_preinv): New #define, making udiv_qrnnd_preinv2
8333	the default.
8334	* tune/speed.c: Corresponding changes.
8335	* tune/speed.h: Likewise.
8336	* tune/common.c: Likewise.
8337
8338	* mpf/get_str.c: Simplify `off' computation.
8339
8340	* longlong.h: Tabify.
8341
83422003-06-09  Kevin Ryde  <kevin@swox.se>
8343
8344	* gmp.texi (ABI and ISA): FreeBSD has sparc64 too, just say "BSD" to
8345	cover all flavours.
8346	* configure.in: Ditto in some comments.
8347
8348	* mpfr/*: Update to mpfr cvs 2003-06-09.
8349
8350	* tests/cxx/Makefile.am (LDADD): Add -L$(top_builddir)/$(LIBS), for
8351	the benefit of gcc 3.2 on itanium2-hp-hpux11.22.
8352
8353	* tune/many.pl (mul_2): Add speed routine settings.
8354	(MAKEFILE): Close when done, for the benefit of development hackery.
8355
83562003-06-08  Kevin Ryde  <kevin@swox.se>
8357
8358	* mpfr/*: Update to mpfr cvs 2003-06-08.
8359
8360	* mpn/x86/x86-defs.m4 (femms): Remove fallback to emms.
8361	(cmovCC, psadbw): Remove simulated versions.
8362	(cmov_available_p, psadbw_available_p): Remove.
8363	This trickery was only ever for development purposes on machines
8364	without those instructions.  Removing it simplifies gmp and in
8365	particular avoids complications for fat binary builds.  Development
8366	can be done with a wrapper around "as" if really needed.
8367
8368	* mpn/x86/divrem_1.asm: Don't use loop_or_decljnz, now K6 has its own
8369	mpn/x86/k6/divrem_1.asm.  Amend K6 comments now moved to there.
8370	* mpn/x86/x86-defs.m4 (loop_or_decljnz): Remove, no longer used.
8371
8372	* mpn/x86/k6/divrem_1.asm: New file, derived from mpn/x86/divrem_1.asm.
8373
8374	* mpn/x86/k6/pre_mod_1.asm: Remove comments now in mpn/x86/mod_1.asm.
8375
8376	* mpn/x86/mod_1.asm: Put mpn_mod_1c after mpn_mod_1 for better branch
8377	prediction.  Put done_zero at end for less wastage in alignment.  Use
8378	decl+jnz unconditionally since in fact it's ok on k6.  Amend comments.
8379
83802003-06-07  Kevin Ryde  <kevin@swox.se>
8381
8382	* mpn/generic/mode1o.c: Fix ASSERTs on return value.
8383
8384	* gmp.texi (Build Options): Add viac3 and viac32 cpu types.
8385	(ABI and ISA): Note on sparcv9 ABI=32 vs ABI=64 speed.  More indexing.
8386
8387	* configfsf.guess, configfsf.sub: Update to 2003-06-06.
8388	* config.guess: Remove $RANDOM hack supporting netbsd 1.4, not needed
8389	by new configfsf.guess.
8390
83912003-06-06  Torbjorn Granlund  <tege@swox.com>
8392
8393	* mpn/ia64/submul_1.asm: Add branch over .align block.
8394
83952003-06-05  Torbjorn Granlund  <tege@swox.com>
8396
8397	* longlong.h (add_ssaaaa) [pa64]: Output zero operand as register 0.
8398	Allow more immediate operands.
8399	(sub_ddmmss) [pa64]: Likewise.
8400	(add_ssaaaa) [pa32]: Likewise.
8401	(sub_ddmmss) [pa32]: Likewise.
8402
8403	* mpn/pa64: Change ".level 2.0W" to ".level 2.0w" to please
8404	picky GNU assembler.
8405
84062003-06-05  Kevin Ryde  <kevin@swox.se>
8407
8408	* gmp.texi (Integer Special Functions): In mpz_array_init, fix type
8409	shown for integer_array and give an example use.
8410
84112003-06-04  Torbjorn Granlund  <tege@swox.com>
8412
8413	* mpf/set_str.c (mpf_set_str): Work around gcc 2 bug triggered on
8414	alpha.
8415
84162003-06-03  Kevin Ryde  <kevin@swox.se>
8417
8418	* mpn/x86/pentium/README: Add 7 c/l mmx mul_1, tweak wordings.
8419
8420	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Use octal char constants in test
8421	program, hex is not supported by K&R.
8422
84232003-06-02  Torbjorn Granlund  <tege@swox.com>
8424
8425	* mpn/mips64/divrem_1.asm: New file.
8426
84272003-06-01  Torbjorn Granlund  <tege@swox.com>
8428
8429	* mpn/powerpc32/lshift.asm: Reformat code.
8430	* mpn/powerpc32/rshift.asm: Reformat code.
8431
84322003-05-30  Kevin Ryde  <kevin@swox.se>
8433
8434	* tests/misc.c (tests_start): Set stdout and stderr to unbuffered, to
8435	avoid any chance of losing output on segv etc.
8436
84372003-05-28  Torbjorn Granlund  <tege@swox.com>
8438
8439	* mpf/get_str.c: Move label `done' to match TMP_MARK and TMP_FREE.
8440	Remove redundant variable prec.
8441
84422003-05-26  Torbjorn Granlund  <tege@swox.com>
8443
8444	* tests/mpz/convert.c: Test bases up to 62.
8445
8446	* tests/mpf/t-conv.c: Test bases up to 62.
8447
8448	* demos/pexpr.c: Don't iterate to get accurate timing.
8449
8450	* mpf/set_str.c (mpn_pow_1_highpart): Cleanup.
8451
8452	* mp_dv_tab.c: Fix typo.
8453
8454	* mpf/get_str.c: Rewrite (now sub-quadratic).
8455
84562003-05-22  Kevin Ryde  <kevin@swox.se>
8457
8458	* tests/mpn/t-divrem_1.c: New file.
8459	* tests/mpn/Makefile.am: Add it.
8460
84612003-05-22  Torbjorn Granlund  <tege@swox.com>
8462
8463	* config.sub: Recognize viac3* processors.
8464
84652003-05-20  Torbjorn Granlund  <tege@swox.com>
8466
8467	* mpn/sparc64/addmul_2.asm: New file.
8468
84692003-05-19  Torbjorn Granlund  <tege@swox.com>
8470
8471	* configure.in: Recognize alphaev7* as alphaev67.
8472
8473	* config.guess: Recognize viac3* processors.
8474	* configure.in: Set up path for viac3* processors.
8475	* acinclude.m4 (X86_PATTERN): Include viac3* processors.
8476
84772003-05-19  Kevin Ryde  <kevin@swox.se>
8478
8479	* tune/freq.c (freq_pstat_getprocessor): New function.
8480	(freq_all): Use it.
8481	* configure.in (AC_CHECK_HEADERS): Add sys/pstat.h.
8482	(AC_CHECK_FUNCS): Add pstat_getprocessor.
8483
84842003-05-15  Kevin Ryde  <kevin@swox.se>
8485
8486	* mpn/generic/mul_fft.c (mpn_mul_fft_decompose): Remove "inline",
8487	since the code is a bit too big.  gcc doesn't actually inline when
8488	alloca (TMP_ALLOC) is used anyway.
8489
84902003-05-13  Kevin Ryde  <kevin@swox.se>
8491
8492	* gmp.texi (Notes for Particular Systems): Libtool directory is .libs
8493	not _libs for mingw dll.  Reported by Andreas Fabri.
8494
84952003-05-07  Kevin Ryde  <kevin@swox.se>
8496
8497	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code to generate sse2/xmm code
8498	from gcc -march=pentium4, to check the assembler supports that.
8499	(GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): New macros.
8500	* configure.in (pentium4-*-*): Use them to see if gcc -march=pentium4
8501	(with sse2) is ok.
8502
85032003-05-06  Kevin Ryde  <kevin@swox.se>
8504
8505	* mpz/com.c: Rate size==0 as UNLIKELY, fix comment to mpn_add_1.
8506
8507	* tune/freq.c (<sys/sysinfo.h>): Include only when needed for
8508	getsysinfo(), to avoid a problem with this file on AIX 5.1.
8509
85102003-05-03  Torbjorn Granlund  <tege@swox.com>
8511
8512	* mpf/set_str.c: Do not ignore supposedly superfluous digits (in part
8513	reverting last change).
8514
85152003-05-03  Kevin Ryde  <kevin@swox.se>
8516
8517	* gmp.texi: Use @code for files in @cindex entries, it looks nicer
8518	than @file.
8519
8520	* Makefile.am: Note gmp 4.1.1 and 4.1.2 version info.
8521
8522	* configure.in, acinclude.m4 (GMP_CRAY_OPTIONS): New macro for Cray
8523	system setups, letting AC_REQUIRE do its job instead of a hard coded
8524	AC_PROG_EGREP.
8525
8526	* config.guess: Amend fake RANDOM to avoid ". configfsf.guess" which
8527	segfaults on Debian "ash" 0.4.16.
8528
85292003-05-01  Kevin Ryde  <kevin@swox.se>
8530
8531	* configure.in (AC_CHECK_FUNCS): Add getsysinfo.
8532	(AC_CHECK_HEADERS): Add sys/sysinfo.h and machine/hal_sysinfo.h.
8533	* tune/freq.c (freq_getsysinfo): New function.
8534	(freq_all): Use it.
8535	(freq_sysctlbyname_i586_freq, freq_sysctlbyname_tsc_freq,
8536	freq_sysctl_hw_cpufrequency, freq_sysctl_hw_model): Set
8537	speed_cycletime before trying to print it, when verbose.
8538
85392003-04-28  Torbjorn Granlund  <tege@swox.com>
8540
8541	* mpf/set_str.c: Major overhaul.
8542	(mpn_pow_1_highpart): New helper function, meat extracted from
8543	mpf_set_str.
8544
85452003-04-24  Kevin Ryde  <kevin@swox.se>
8546
8547	* acinclude.m4 (GMP_GCC_ARM_UMODSI): Quote result string against m4.
8548
8549	* configure, ltmain.sh, aclocal.m4: Update to libtool 1.5.
8550
8551	* longlong.h (add_ssaaaa) [all]: Remove first "%" commutative in each,
8552	since gcc only supports one per asm.
8553
8554	* printf/doprnt.c: Add M for mp_limb_t.
8555	* tests/misc/t-printf.c: Exercise this.
8556
8557	* tests/mpz/t-cmp_d.c: Test infinities.
8558	* tests/mpf/t-cmp_d.c: New file.
8559	* tests/mpf/Makefile.am: Add it.
8560
8561	* mpz/cmp_d.c, mpz/cmpabs_d.c, mpf/cmp_d.c: NaN invalid, Inf bigger
8562	than any value.
8563	* mpz/set_d.c, mpq/set_d.c, mpf/set_d.c: Nan or Inf invalid.
8564
8565	* configure.in (AC_CHECK_FUNCS): Add raise.
8566	* invalid.c: New file.
8567	* Makefile.am: Add it.
8568	* gmp-impl.h (__gmp_invalid_operation): Add prototype.
8569	(DOUBLE_NAN_INF_ACTION): New macro.
8570
8571	* tests/trace.c, tests/tests.h (d_trace): New function.
8572	* tests/misc.c, tests/tests.h (tests_infinity_d): New function.
8573	* tests/misc.c (mpz_erandomb, mpz_errandomb): Use gmp_urandomm_ui.
8574
8575	* tune/tuneup.c, tune/common.c, tests/devel/try.c: Cast various
8576	mp_size_t values for printf %ld in case mp_size_t==int.  Use
8577	gmp_printf for mp_limb_t values.
8578
8579	* gmp.texi (Nomenclature and Types): Add mp_exp_t, mp_size_t,
8580	gmp_randstate_t.  Note ulong for bit counts and size_t for byte
8581	counts.  Don't bother with @noindent.
8582	(Debugging): New valgrind is getting MMX/SSE.
8583	(Integer Comparisons): mpz_cmp_d and mpz_cmpabs_d on NaNs and Infs.
8584	(Float Comparison): mpf_cmp_d behaviour on NaNs and Infs.
8585	(Low-level Functions): Note with mpn_hamdist what hamming distance is.
8586	(Formatted Output Strings): Add type M.
8587	(Internals): Remove remarks on ulong bits and size_t bytes.  Move int
8588	field remarks to ...
8589	(Integer Internals, Float Internals): ... here.
8590
85912003-04-19  Kevin Ryde  <kevin@swox.se>
8592
8593	* configure.in (*sparc*-*-* ABI=32): Add umul to extra_functions.
8594
8595	* mpn/x86/p6/mul_basecase.asm: New file.
8596
85972003-04-18  Kevin Ryde  <kevin@swox.se>
8598
8599	* configure.in (m68060-*-*): Fallback to gcc -m68000 when -m68060 not
8600	available, and don't use mpn/m68k/mc68020 asm routines.  (Avoids 32x32
8601	mul and 64/32 div which trap to the kernel on 68060.  Advice by
8602	Richard Zidlicky.)
8603	* mpn/m68k/README: Update notes on directory usage.
8604
8605	* tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Add a hack to let the
8606	test programs run with a shared libgmpxx on openbsd 3.2.
8607
8608	* gmp.texi (Language Bindings): Add Guile.
8609
86102003-04-12  Kevin Ryde  <kevin@swox.se>
8611
8612	* configure.in (cygwin*, mingw*, pw32*, os2*): Add
8613	-Wl,--export-all-symbols to GMP_LDFLAGS, no longer the default in
8614	latest mingw and libtool.
8615
8616	* acinclude.m4 (GMP_ASM_COFF_TYPE): New macro.
8617	* configure.in (x86s): Use it.
8618	* mpn/x86/x86-defs.m4 (COFF_TYPE): New macro.
8619	(PROLOGUE_cpu): Use it, for the benefit of mingw DLLs.
8620
8621	* gmp-impl.h (mpn_copyi, mpn_copyd): Add __GMP_DECLSPEC.
8622
8623	* gmp.texi (Known Build Problems): Remove windows test program .exe
8624	repeated built, fixed by new libtool.  Remove MacOS C++ shared library
8625	creation, fixed by new libtool.
8626	(Notes for Package Builds, Known Build Problems): Remove DESTDIR notes
8627	on libgmpxx, fixed in new libtool.
8628
86292003-04-10  Torbjorn Granlund  <tege@swox.com>
8630
8631	* configure.in: Match turbosparc.
8632	* config.guess: Recognize turbosparc (just for *bsd for now).
8633
86342003-04-09  Kevin Ryde  <kevin@swox.se>
8635
8636	* mpf/mul_ui.c [nails]: Call mpf_mul to handle v > GMP_NUMB_MAX.
8637
8638	* tests/mpz/t-mul.c (main): Don't try FFT sizes when FFT disabled via
8639	MP_SIZE_T_MAX, eg. for nails.
8640
8641	* tests/cxx/t-ternary.cc: Split up tests to help compile speed and
8642	memory usage.
8643
8644	* tests/devel/try.c: Print seed under -R, add -E to reseed, use ulong
8645	for seed not uint.
8646
8647	* gmp.texi: Add @: after various abbreviations, more index entries.
8648	(leftarrow): New macro, for non-tex.
8649	(Random State Initialization): Remove commented gmp_randinit_lc, not
8650	going to be implemented.
8651	(Random Number Algorithms): New section.
8652	(References): Add Matsumoto and Nishimura on Mersenne Twister, add
8653	Bertot, Magaud and Zimmermann on GMP Square Root.
8654
86552003-04-06  Kevin Ryde  <kevin@swox.se>
8656
8657	* tests/mpz/t-gcd_ui.c: New file.
8658	* tests/mpz/Makefile.am: Add it.
8659
8660	* mpz/gcd_ui.c: Correction to return value on longlong limb systems,
8661	limb might not fit a ulong.
8662
86632003-04-04  Kevin Ryde  <kevin@swox.se>
8664
8665	* configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
8666	2003-04-02.
8667
86682003-04-02  Kevin Ryde  <kevin@swox.se>
8669
8670	* configure.in (*-*-cygwin*): No longer force lt_cv_sys_max_cmd_len,
8671	libtool has addressed this now.
8672	(AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): Remove this, libtool _LT_AC_LOCK
8673	no longer needs it.
8674
8675	* acinclude.m4 (GMP_PROG_AR): Also set ac_cv_prog_AR and
8676	ac_cv_prog_ac_ct_AR when adding flags to AR, so they're not lost by
8677	libtool's call to AC_CHECK_TOOL.
8678
86792003-04-01  Kevin Ryde  <kevin@swox.se>
8680
8681	* configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
8682	2003-03-31.
8683
8684	* configure.in (AC_PROG_F77): Add a dummy AC_PROVIDE to stop libtool
8685	running F77 probes.
8686
8687	* randlc2x.c (gmp_rand_lc_struct): Add comments about what exactly is
8688	in each field.
8689	(randseed_lc): Rename seedp to seedz to avoid confusion with seedp in
8690	the lc function.  Suggested by Pedro Gimeno.
8691	(gmp_randinit_lc_2exp): Use __GMP_ALLOCATE_FUNC_TYPE.  No need for
8692	"+1" in mpz_init2 of _mp_seed.  Don't bother with mpz_init2 for _mp_a.
8693
86942003-03-29  Kevin Ryde  <kevin@swox.se>
8695
8696	* configure.in (m68k-*-*): Use -O2, no longer need to fallback to -O.
8697	* acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): Remove macro.
8698
8699	* configure.in (AC_CHECK_TYPES): Add notes on why tested.
8700
8701	* gmp.texi (GMPrefu, GMPpxrefu, GMPreftopu, GMPpxreftopu): New macros,
8702	use them for all external references to get URLs into HTML output.
8703	(Random State Initialization): Add gmp_randinit_set.
8704	(Random State Miscellaneous): New section.
8705
87062003-03-29  Kevin Ryde  <kevin@swox.se>
8707
8708	* randbui.c, randmui.c: New files.
8709	* Makefile.am: Add them.
8710	* gmp-h.in (gmp_urandomb_ui, gmp_urandomm_ui): Add prototypes.
8711	* tests/rand/t-urbui.c, tests/rand/t-urmui.c: New files.
8712	* tests/rand/Makefile.am: Add them.
8713
8714	* gmp-impl.h (gmp_randstate_srcptr): New typedef.
8715	(gmp_randfnptr_t): Add randiset_fn.
8716	* randiset.c: New file.
8717	* Makefile.am: Add it.
8718	* gmp-h.in (gmp_randinit_set): Add prototype.
8719	* randlc2x.c, randmt.c: Add gmp_randinit_set support.
8720	* tests/rand/t-iset.c: New file.
8721	* tests/rand/Makefile.am: Add it.
8722
8723	* tests/misc.c, tests/tests.h (call_rand_algs): New function.
8724
87252003-03-27  Kevin Ryde  <kevin@swox.se>
8726
8727	* mpz/bin_uiui.c: Use plain "*" for kacc products rather than
8728	umul_ppmm since high not needed, except for an ASSERT now amended.
8729
87302003-03-26  Kevin Ryde  <kevin@swox.se>
8731
8732	* demos/expr/exprfr.c (cbrt, cmpabs, exp2, gamma, nextabove,
8733	nextbelow, nexttoward): New functions.
8734	* demos/expr/t-expr.c: Exercise these.
8735
8736	* mpfr/*: Update to mpfr cvs 2003-03-26.
8737
8738	* gmp-impl.h (MPZ_REALLOC): Use UNLIKELY, to expect no realloc.
8739
8740	* tune/time.c (cycles_works_p): Scope variables down to relevant part
8741	to avoid warnings about unused.
8742
8743	* configfsf.guess, configfsf.sub: Update to 2003-02-22.
8744	* config.guess: Fake a $RANDOM variable when running configfsf.guess,
8745	to workaround a problem on m68k NetBSD 1.4.1.
8746
8747	* mpz/fac_ui.c: Remove unused variable "z1".
8748
8749	* tune/freq.c (freq_irix_hinv): Allow "Processor 0" line from IRIX 6.5.
8750
87512003-03-24  Torbjorn Granlund  <tege@swox.com>
8752
8753	* randlc2x.c (randget_lc): Remove write-only variable rn.
8754	* mpf/eq.c: Remove write-only variable usign.
8755	* gen-psqr.c (main): Remove write-only variable numb_bits.
8756
87572003-03-17  Torbjorn Granlund  <tege@swox.com>
8758
8759	* Makefile.am (libgmp_la_SOURCES): Add mp_dv_tab.c.
8760	(libmp_la_SOURCES): Add mp_dv_tab.c.
8761
8762	* mpn/alpha/invert_limb.asm: Add a few comments.
8763
8764	* mp_dv_tab.c: New file, defining __gmp_digit_value_tab.
8765
8766	* mpz/set_str.c: Get rid of function digit_value_in_base and use table
8767	__gmp_digit_value_tab instead.
8768	* mpz/inp_str.c: Likewise.
8769	* mpf/set_str.c: Likewise.
8770	* mpbsd/min.c: Likewise.
8771	* mpbsd/xtom.c: Likewise.
8772
8773	* mpz/set_str.c: Allow bases <= 62.  Return error for invalid bases.
8774	* mpz/inp_str.c: Likewise.
8775	* mpf/set_str.c: Likewise.
8776	* mpz/out_str.c: Likewise.
8777	* mpz/get_str.c: Likewise.
8778	* mpf/get_str.c: Likewise.
8779
8780	* mpz/inp_str.c: Restucture to allocate more string space just
8781	before needed.
8782	* mpbsd/min.c: Likewise.
8783
8784	* longlong.h (__udiv_qrnnd_c): Remove redundant casts.
8785	(32-bit sparc): Test HAVE_HOST_CPU_supersparc in addition to various
8786	sparc_v8 spellings.
8787
87882003-03-17  Kevin Ryde  <kevin@swox.se>
8789
8790	* mpfr/*: Update to mpfr cvs 2003-03-17.
8791
87922003-03-15  Kevin Ryde  <kevin@swox.se>
8793
8794	* Makefile.am (EXTRA_libgmp_la_SOURCES): Use this for TMP_ALLOC
8795	sources, instead of a libdummy.la.
8796
87972003-03-16  Torbjorn Granlund  <tege@swox.com>
8798
8799	* config.guess: Recognize supersparc and microsparc for *BSD systems.
8800	Generalize some superscalar recognition patterns.
8801
88022003-03-14  Torbjorn Granlund  <tege@swox.com>
8803
8804	* mpn/sparc64/udiv.asm: New file.
8805
88062003-03-13  Torbjorn Granlund  <tege@swox.com>
8807
8808	* mpn/sparc64: Table cycle counts.  Update some comments.
8809
8810	* mpn/powerpc64/divrem_1.asm: New file.
8811
88122003-03-10  Torbjorn Granlund  <tege@swox.com>
8813
8814	* mpn/generic/mul.c (mpn_mul): Don't blindly expect
8815	MUL_KARATSUBA_THRESHOLD to be a constant.
8816
88172003-03-07  Torbjorn Granlund  <tege@swox.com>
8818
8819	* mpn/generic/mul.c (mpn_mul): New operand splitting code for
8820	avoiding cache misses when un >> MUL_KARATSUBA_THRESHOLD > vn.
8821	(MUL_BASECASE_MAX_UN): New #define, default to 500 for now.
8822
88232003-03-07  Kevin Ryde  <kevin@swox.se>
8824
8825	* Makefile.am: Put gmp.h and mp.h under $(exec_prefix)/include.
8826	* gmp.texi (Build Options): Add notes on this.
8827	Reported by Vincent Lef�vre.
8828
88292003-03-06  Kevin Ryde  <kevin@swox.se>
8830
8831	* configure.in (alpha*-*-* gcc): Add asm option before testing -mcpu,
8832	for the benefit of gcc 2.9-gnupro-99r1 on alphaev68-dec-osf5.1 which
8833	doesn't otherwise put the assembler in the right mode for -mcpu=ev6.
8834
88352003-03-05  Torbjorn Granlund  <tege@swox.com>
8836
8837	* mpn/powerpc32/powerpc-defs.m4: Set up renaming for v registers.
8838
8839	* mpz/powm.c (redc): Instead of repeated mpn_incr_u invocations,
8840	accumulate carries and add at the end.
8841	(mpz_powm): Trim tp allocation, now as redc doesn't need carry guard.
8842
88432003-02-25  Torbjorn Granlund  <tege@swox.com>
8844
8845	* mpn/x86/pentium4/copyd.asm: Correct header comment.
8846
8847	* mpn/arm/addmul_1.asm: Correct cycle counts.
8848	* mpn/arm/submul_1.asm: Likewise.
8849
88502003-02-20  Kevin Ryde  <kevin@swox.se>
8851
8852	* demos/factorize.c (factor_using_pollard_rho): Test k>0 to avoid
8853	infinite loop if k=0 and gcd!=1 reveals a factor.  Reported by John
8854	Pongsajapan.
8855
8856	* gmp.texi, fdl.texi: Update to FDL version 1.2.
8857
88582003-02-18  Torbjorn Granlund  <tege@swox.com>
8859
8860	* mpn/arm/mul_1.asm: Fix typo introduced in last change.
8861
88622003-02-17  Torbjorn Granlund  <tege@swox.com>
8863
8864	* mpn/ia64/gmp-mparam.h: Retune.
8865
8866	* mpn/sparc64/copyi.asm: Add some header comments.
8867	* mpn/sparc64/copyd.asm: Likewise.
8868
8869	* mpn/arm/mul_1.asm: Put vl operand last for umull/umlal.
8870	Add some header comments.
8871	* mpn/arm/addmul_1.asm: Rewrite.
8872	* mpn/arm/submul_1.asm: Rewrite.
8873	* mpn/arm/gmp-mparam.h: Retune.
8874
88752003-02-16  Torbjorn Granlund  <tege@swox.com>
8876
8877	* mpn/arm/copyi.asm: New file.
8878	* mpn/arm/copyd.asm: New file.
8879
88802003-02-16  Kevin Ryde  <kevin@swox.se>
8881
8882	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Tolerate incorrect last data
8883	byte seen on an arm system.
8884
88852003-02-15  Torbjorn Granlund  <tege@swox.com>
8886
8887	* mpn/arm/gmp-mparam.h: Retune.
8888
88892003-02-13  Torbjorn Granlund  <tege@swox.com>
8890
8891	* mpn/powerpc32/750/com_n.asm: Add more cycle counts.
8892
88932003-02-13  Kevin Ryde  <kevin@swox.se>
8894
8895	* configure.in (AC_PREREQ): Bump to 2.57.
8896
8897	* configure.in, acinclude.m4 (GMP_GCC_WA_OLDAS): New macro, applying
8898	-Wa,-oldas only when necessary.
8899
8900	* configure.in (powerpc*-*-*): Don't use -Wa,-mppc with gcc, it
8901	overrides options recent gcc adds for -mcpu, making generated code
8902	fail to assemble.
8903
8904	* tune/tuneup.c (mpn_fft_table): Remove definition, it's in mul_fft.c.
8905
89062003-02-12  Torbjorn Granlund  <tege@swox.com>
8907
8908	* mpn/x86/pentium4/sse2/gmp-mparam.h: Retune.
8909	* mpn/x86/k7/gmp-mparam.h: Retune.
8910	* mpn/x86/k6/gmp-mparam.h: Retune.
8911	* mpn/x86/p6/gmp-mparam.h: Retune.
8912	* mpn/x86/p6/mmx/gmp-mparam.h: Retune.
8913
8914	* tests/mpz/t-mul.c (main): Rewrite FFT testing code.
8915
89162003-02-10  Torbjorn Granlund  <tege@swox.com>
8917
8918	* config.guess: Recognize "power2" systems.
8919
8920	* mpn/powerpc64/gmp-mparam.h: Fix indentation.
8921	* mpn/power/gmp-mparam.h: Retune.
8922	* mpn/alpha/ev6/nails/gmp-mparam.h: Retune.
8923	* mpn/sparc64/gmp-mparam.h: Retune.
8924	* mpn/pa64/gmp-mparam.h: Retune.
8925	* mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
8926	* mpn/sparc32/v8/gmp-mparam.h: Retune.
8927	* mpn/mips64/gmp-mparam.h: Retune.
8928	* mpn/alpha/ev6/gmp-mparam.h: Retune.
8929	* mpn/powerpc32/gmp-mparam.h: Retune.
8930	* mpn/powerpc32/750/gmp-mparam.h: Retune.
8931	* mpn/alpha/ev5/gmp-mparam.h: Retune.
8932	* mpn/m68k/gmp-mparam.h: Retune.
8933	* mpn/cray/gmp-mparam.h: Set GET_STR_PRECOMPUTE_THRESHOLD.
8934
8935	* configure.in: Undo this, problem doesn't happen any more:
8936	(mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
8937
89382003-02-03  Kevin Ryde  <kevin@swox.se>
8939
8940	* gmp-impl.h (MPN_NORMALIZE, MPN_NORMALIZE_NOT_ZERO): Add parens
8941	around macro parameters.  Reported by Jason Moxham.
8942
89432003-02-01  Kevin Ryde  <kevin@swox.se>
8944
8945	* gmp.texi (Low-level Functions): No overlap permitted by mpn_mul_n.
8946	Reported by Jason Moxham.
8947	(Formatted Input Strings): Correction to strtoul cross reference
8948	formatting.
8949	(BSD Compatible Functions): Add index entry for MINT.
8950
89512003-01-29  Torbjorn Granlund  <tege@swox.com>
8952
8953	* gmp-impl.h (mpn_mul_fft): Now returns int.
8954
89552003-01-29  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
8956
8957	* mpn/generic/mul_fft.c: Major rewrite.
8958
89592003-01-25  Kevin Ryde  <kevin@swox.se>
8960
8961	* config.guess (powerpc*-*-*): Remove $dummy.core file when mfpvr
8962	fails on NetBSD.
8963	(trap): Remove $dummy.core on abnormal termination too.
8964
8965	* mpfr/*: Update to mpfr cvs 2003-01-25.
8966
89672003-01-24  Torbjorn Granlund  <tege@swox.com>
8968
8969	* mpn/ia64/README: Update cycle counts to match current code.
8970
89712003-01-18  Kevin Ryde  <kevin@swox.se>
8972
8973	* mpfr/*: Update to mpfr cvs 2003-01-18.
8974
89752003-01-17  Torbjorn Granlund  <tege@swox.com>
8976
8977	* gmp.texi: Canonicalize URLs.
8978
89792003-01-15  Kevin Ryde  <kevin@swox.se>
8980
8981	* gmp.texi (Notes for Particular Systems): Add hardware floating point
8982	precision mode.
8983
8984	* mpfr/*, configure, aclocal.m4, config.in: Update to mpfr cvs
8985	2003-01-15.
8986
89872003-01-11  Kevin Ryde  <kevin@swox.se>
8988
8989	* mpfr/*: Update to mpfr cvs 2003-01-11.
8990
89912003-01-09  Kevin Ryde  <kevin@swox.se>
8992
8993	* mpfr/get_str.c: Update to mpfr cvs 2003-01-09.
8994
8995	* doc/configuration: Various updates.
8996
89972003-01-06  Torbjorn Granlund  <tege@swox.com>
8998
8999	* mpn/alpha/copyi.asm: Avoid `nop' mnemonic, unsupported on Cray.
9000	* mpn/alpha/copyd.asm: Likewise.
9001
90022003-01-05  Kevin Ryde  <kevin@swox.se>
9003
9004	* demos/expr/t-expr.c (check_r): Tolerate mpfr_set_str new return
9005	value.
9006
9007	* configure, aclocal.m4 (*-*-osf4*, *-*-osf5*): Regenerate with
9008	libtool patch to avoid bash printf option problem when building shared
9009	libraries with cxx.
9010
9011	* configure.in (pentium4-*-*): Use "-march=pentium4 -mno-sse2" since
9012	sse2 causes buggy code from gcc 3.2.1 and is only supported on new
9013	enough kernels.
9014
9015	* acinclude.m4 (GMP_PROG_NM): Add some notes about failures, per
9016	report by Krzysztof Kozminski.
9017
9018	* gmp-h.in (mpz_mdivmod_ui, mpz_mmod_ui): Add parens around "r".
9019
9020	* gmp-h.in (__GMP_CAST): New macro, clean to g++ -Wold-style-cast.
9021	(GMP_NUMB_MASK, mpz_cmp_si, mpq_cmp_si, mpz_odd_p, mpn_divexact_by3,
9022	mpn_divmod): Use it.  Reported by Krzysztof Kozminski.
9023	(mpz_odd_p): No need for the outermost cast to "int".
9024	* tests/cxx/t-cast.cc: New file.
9025	* tests/cxx/Makefile.am: Add it.
9026
90272003-01-04  Kevin Ryde  <kevin@swox.se>
9028
9029	* mpfr/set_str.c: Update to mpfr cvs 2003-01-04.
9030
9031	* demos/expr/exprfra.c (e_mpfr_number): Tolerate recent mpfr_set_str
9032	returning count of characters accepted.
9033
90342003-01-03  Torbjorn Granlund  <tege@swox.com>
9035
9036	* mpn/alpha/copyi.asm: New file.
9037	* mpn/alpha/copyd.asm: New file.
9038
90392003-01-03  Kevin Ryde  <kevin@swox.se>
9040
9041	* demos/expr/t-expr.c: Use __gmpfr on some mpfr internals that have
9042	changed.
9043
9044	* mpfr/*, aclocal.m4, config.in, configure: Update to mpfr cvs
9045	2003-01-03.
9046
9047	* gmp.texi (Introduction to GMP): Mention release announcements
9048	mailing list, and put home page and ftp before mailing lists.
9049
90502002-12-28  Torbjorn Granlund  <tege@swox.com>
9051
9052	* mpn/generic/mul_fft.c (mpn_fft_next_size): Simplify.
9053
90542002-12-28  Kevin Ryde  <kevin@swox.se>
9055
9056	* acinclude.m4 (M68K_PATTERN): New macro.
9057	(GMP_GCC_M68K_OPTIMIZE): Use it to avoid m6811 and friends.
9058	* configure.in: Ditto.
9059
9060	* tests/mpz/t-import.c, tests/mpz/t-export.c: Use '\xHH' to avoid
9061	warnings about char overflows.
9062	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Ditto.
9063
90642002-12-28  Pedro Gimeno  <pggimeno@wanadoo.es>
9065
9066	* randmt.c (randseed_mt, default_state): Fix off-by-one bug on padding.
9067	(randseed_mt): Add ASSERT checking result of mpz_export.
9068
90692002-12-24  Kevin Ryde  <kevin@swox.se>
9070
9071	* gmp.texi (Integer Import and Export): Clarify treatment of signs,
9072	reported by Kent Boortz.
9073
9074	* randmt.c: Use gmp_uint_least32_t.
9075	(randseed_mt): Add nails to mpz_export in case mt[i] more than 32 bits.
9076
9077	* gmp-impl.h (gmp_uint_least32_t): New typedef, replacing GMP_UINT32.
9078	* configure.in (AC_CHECK_TYPES): Add uint_least32_t.
9079	(AC_CHECK_SIZEOF): Add unsigned short.
9080
90812002-12-22  Kevin Ryde  <kevin@swox.se>
9082
9083	* gmp-impl.h (ULONG_PARITY) [generic C]: Mask result to a single bit.
9084	(ULONG_PARITY) [_CRAY, __ia64]: New macros.
9085	* tests/t-parity.c: New test.
9086	* tests/Makefile.am (check_PROGRAMS): Add it.
9087
9088	* longlong.h (count_trailing_zeros) [ia64]: New macro.
9089
9090	* tests/t-count_zeros.c (check_various): Remove unused variable "n".
9091
9092	* mpn/x86/README: Revise notes on PIC, PLT and GOT.
9093
9094	* demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add "mt"
9095	to GMP::Rand::randstate.
9096
90972002-12-22  Pedro Gimeno  <pggimeno@wanadoo.es>
9098
9099	* randmt.c (randseed_mt): Fix bug that might cause the generator to
9100	return all zeros with certain seeds.  Fix WARM_UP==0 case.
9101	(gmp_randinit_mt): Initialize to a known state by default.
9102	(randget_mt): Remove check for uninitialized buffer: no longer needed.
9103	(recalc_buffer): Use ?: instead of two-element array.
9104
9105	* tests/rand/t-mt.c: New test.
9106	* tests/rand/Makefile.am (check_PROGRAMS): Add it.
9107
91082002-12-21  Kevin Ryde  <kevin@swox.se>
9109
9110	* cxx/osdoprnti.cc: Use <cstdarg> and <cstring> rather than <stdarg.h>
9111	and <string.h>.  No need for <stdio.h>.
9112
9113	* demos/expr/expr.c, demos/expr/exprfa.c, demos/expr/exprfra.c,
9114	demos/expr/exprza.c: Use mp_get_memory_functions, not
9115	__gmp_allocate_func etc.
9116	* demos/expr/t-expr.c: Don't use gmp-impl.h.
9117	(numberof): New macro.
9118
9119	* gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
9120	__gmp_free_func): Move declarations to gmp-impl.h
9121
9122	* mp_get_fns.c: New file.
9123	* Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
9124	* gmp-h.in (mp_get_memory_functions): Add prototype.
9125	* gmp.texi (Custom Allocation): Add mp_get_memory_functions, refer to
9126	"free" not "deallocate" function.
9127	* gmpxx.h (struct __gmp_alloc_cstring): Use mp_get_memory_functions,
9128	not __gmp_free_func.
9129
9130	* gmp-impl.h [__cplusplus]: Add <cstring> for strlen.
9131	(gmp_allocated_string): Hold length in a field.
9132	* cxx/osdoprnti.cc, cxx/osmpf.cc: Use this.
9133
91342002-12-20  Torbjorn Granlund  <tege@swox.com>
9135
9136	* tests/mpz/t-perfsqr.c (check_sqrt): Print more variables upon
9137	failure.
9138
9139	* mpn/generic/rootrem.c: In Newton loop, pad qp with leading zero.
9140
91412002-12-19  Torbjorn Granlund  <tege@swox.com>
9142
9143	* mpn/generic/rootrem.c: Allocate 1.585 (log2(3)) times more space
9144	for pp temporary to allow for worst case overestimate of root.
9145	Add some asserts.
9146
9147	* tests/mpz/t-root.c: Generalize and speed up.
9148
91492002-12-19  Kevin Ryde  <kevin@swox.se>
9150
9151	* tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt test.
9152
9153	* gmp-h.in: Don't bother trying to support Compaq C++ in pre-standard
9154	I/O mode.
9155	* gmp.texi (Notes for Particular Systems): Compaq C++ must be used in
9156	"standard" iostream mode.
9157
91582002-12-18  Torbjorn Granlund  <tege@swox.com>
9159
9160	* mpn/alpha/mod_34lsub1.asm: Add code for big-endian, using existing
9161	little-endian code only if HAVE_LIMB_LITTLE_ENDIAN is defined.
9162
91632002-12-18  Kevin Ryde  <kevin@swox.se>
9164
9165	* configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): New
9166	defines in config.m4.
9167
91682002-12-17  Torbjorn Granlund  <tege@swox.com>
9169
9170	* printf/printffuns.c (gmp_fprintf_reps): Make it actually work
9171	for padding > 256.
9172
91732002-12-17  Kevin Ryde  <kevin@swox.se>
9174
9175	* tune/freq.c: Add <string.h> for memcmp.
9176
9177	* mpz/pprime_p.c: Use MPN_MOD_OR_MODEXACT_1_ODD.
9178
9179	* gmp.texi (Formatted Output Strings): %a and %A are C99 not glibc.
9180	(Formatted Input Strings): Type "l" is for double too.  Hex floats are
9181	accepted for mpf_t.
9182	(Formatted Input Functions): Describe tightened parse rule, clarify
9183	return value a bit.
9184
9185	* scanf/doscan.c: Add hex floats, tighten matching to follow C99, for
9186	instance "0x" is no longer acceptable to "%Zi".
9187	Rename "invalid" label to avoid "invalid" variable, SunOS cc doesn't
9188	like them the same.
9189	* tests/misc/t-scanf.c: Update tests.
9190	* tests/misc/t-locale.c (check_input): Don't let "0x" appear from fake
9191	decimal point.
9192
9193	* config.guess (sparc*-*-*): Look at BSD sysctl hw.model to recognise
9194	ultrasparcs.
9195
9196	* mpfr/tests/dummy.c: New file.
9197	* mpfr/tests/Makefile.am (libfrtests_a_SOURCES): Add it.
9198
91992002-12-14  Kevin Ryde  <kevin@swox.se>
9200
9201	* mpbsd/Makefile.am (nodist_libmpbsd_la_SOURCES): Move these mpz
9202	sources to libmpbsd_la_SOURCES directly, automake 1.7.2 now gets the
9203	ansi2knr setups right for sources in other directories.
9204
9205	* mpfr/tests/Makefile.am: Add libfrtests.a in preparation for new mpfr.
9206
92072002-12-13  Kevin Ryde  <kevin@swox.se>
9208
9209	* mpfr/Makefile.am (mpfr_TEXINFOS, AM_MAKEINFOFLAGS): Allow for
9210	fdl.texi in recent mpfr.
9211
9212	* configure.in (AC_PROG_EGREP): Ensure this is run outside the Cray
9213	conditional AC_EGREP_CPP.
9214
9215	* configure.in (alpha*-*-*): Use gcc -Wa,-oldas if it works, to avoid
9216	problems with new compaq "as" on OSF 5.1.
9217
9218	* mpn/Makefile.am (EXTRA_DIST): Remove Makeasm.am, automake 1.7.2 does
9219	it automatically.
9220
9221	* acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Remove this hack, fixed by
9222	autoconf 2.57.
9223
9224	* configure.in (AC_CONFIG_LIBOBJ_DIR): Set to mpfr, for the benefit of
9225	new mpfr using LIBOBJ.
9226
9227	* configure.in: (AM_INIT_AUTOMAKE): Use "gnu no-dependencies
9228	$(top_builddir)/ansi2knr".
9229	* */Makefile.am (AUTOMAKE_OPTIONS): Remove, now in configure.in.
9230
9231	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.57.
9232	* */Makefile.in, configure, aclocal.m4, install-sh, mkinstalldirs:
9233	Update to automake 1.7.2.
9234
9235	* gmp.texi (Build Options): Add hppa64 to cpu types.
9236	(ABI and ISA): Add gcc to hppa 2.0.
9237	(Debugging): Add maximum debuggability config options.
9238	(Language Bindings): Add Arithmos, reported by Johan Vervloet.
9239	(Formatted Output Strings): 128 bits is about 40 digits, ll is only
9240	for long long not long double.
9241	(Formatted Input Strings): ll is only for long long not long double.
9242
9243	* mpz/divis.c, mpz/divis_ui.c, mpz/cong.c, mpz/cong_ui.c: Allow d=0,
9244	under the rule n==c mod d iff exists q satisfying n=c+q*d.
9245	* gmp.texi (Integer Division): Describe this.
9246	Suggested by Jason Moxham.
9247
92482002-12-13  Pedro Gimeno  <pggimeno@wanadoo.es>
9249
9250	* randlc2x.c (lc): Remove check for seedn < an, which is now
9251	superfluous.  Add ASSERT to ensure it's correct.  Add ASSERT to check
9252	precondition of __GMPN_ADD.
9253	(gmp_randinit_lc_2exp): Avoid reallocation by allocating one extra bit
9254	for both seed and a.  Simplify seedn < p->_cn case.
9255
9256	* tests/rand/t-lc2exp.c (check_bigs): Test negative seeds.
9257
92582002-12-12  Torbjorn Granlund  <tege@swox.com>
9259
9260	* mpn/pa32/pa-defs.m4 (PROLOGUE_cpu): Zap spurious argument to `.proc'.
9261	Add empty `.callinfo'.
9262
92632002-12-11  Torbjorn Granlund  <tege@swox.com>
9264
9265	* mpn/x86/pentium4/sse2/addmul_1.asm: Don't reuse `ret' symbol for a
9266	label.
9267
92682002-12-11  Kevin Ryde  <kevin@swox.se>
9269
9270	* configure.in (hppa*-*-*): Don't use gcc -mpa-risc-2-0 in ABI=1.0.
9271
9272	* mpn/pa32/pa-defs.m4: New file, arranging for .proc/.procend.
9273	* configure.in (hppa*-*-*): Use it.
9274
9275	* printf/doprnt.c: Comments on "ll" versus "L".
9276
9277	* tests/mpz/t-div_2exp.c: Reduce tests, especially the random ones.
9278
92792002-12-11  Torbjorn Granlund  <tege@swox.com>
9280
9281	* mpz/get_d.c (limb2dbl): New macro for conversion to `double'.
9282	Define it to something non-trivial for 64-bit hppa.
9283	* mpq/get_d.c: Likewise.
9284	* mpf/get_d.c: Likewise.
9285
9286	* mpn/x86/pentium4/sse2/addmul_1.asm: Unroll to save one c/l.
9287
92882002-12-09  Kevin Ryde  <kevin@swox.se>
9289
9290	* tune/Makefile.am: Don't use -static under --disable-static, it tends
9291	not to work.
9292	* configure.in (ENABLE_STATIC): New AM_CONDITIONAL.
9293
9294	* gmp-h.in: Use <iostream> instead of <iosfwd> with Compaq C++ in
9295	pre-standard I/O mode.
9296
9297	* tests/mpz/t-jac.c, tests/mpz/t-scan.c: Reduce tests.
9298
92992002-12-08  Kevin Ryde  <kevin@swox.se>
9300
9301	* configure.in (*-*-ultrix*): Remove forcible --disable-shared,
9302	believe this was a generic problem with libtool, now gone.
9303
93042002-12-08  Torbjorn Granlund  <tege@swox.com>
9305
9306	* gmp-impl.h (USE_LEADING_REGPARM): Disable for PIC code generation.
9307
93082002-12-07  Torbjorn Granlund  <tege@swox.com>
9309
9310	* tests/cxx/t-misc.cc (check_mpq): Use 0/1 for canonical 0 in
9311	mpq_cmp_ui calls.
9312
9313	* configure.in (hppa2.0*-*-*): Pass +O2 instead of +O3 to work around
9314	compiler bug with mpfr/tests/tdiv.
9315
93162002-12-07  Kevin Ryde  <kevin@swox.se>
9317
9318	* configure.in (hppa2.0*-*-* ABI=2.0n): Make -mpa-risc-2-0 optional.
9319	New hppa-level-2.0 test using GMP_HPPA_LEVEL_20 to detect assembler
9320	support for 2.0n.
9321	* acinclude.m4 (GMP_PROG_CC_WORKS): Add code that provokes an error
9322	from gcc -mpa-risc-2-0 if the assembler doesn't know 2.0 instructions.
9323	(GMP_HPPA_LEVEL_20): New macro.
9324
93252002-12-07  Pedro Gimeno  <pggimeno@wanadoo.es>
9326
9327	* gmp-impl.h (gmp_randfnptr_t.randseed_fn) Return void.
9328	(LIMBS_PER_ULONG, MPN_SET_UI): New macros.
9329	(MPZ_FAKE_UI): Rename couple of parameters.
9330
9331	* randlc2x.c (gmp_rand_lc_struct): _mp_c and _mp_c_limbs replaced
9332	with mpn style _cp and _cn.  All callers changed.
9333	(randseed_lc): Fix limbs(seed) > bits_to_limbs(m2exp) case.
9334	Remove return value.
9335	(gmp_randinit_lc_2exp): Attempt to avoid redundant reallocation.
9336
9337	* randmt.c (mangle_seed): New function by Kevin.
9338	(randseed_mt): Use it instead of mpz_powm, for performance.  Remove
9339	return value.  Remove commented out code (an inferior alternative to
9340	mpz_export).
9341
9342	* randsdui.c (gmp_randseed_ui): Use MPZ_FAKE_UI.
9343
9344	* tests/rand/t-lc2exp.c (check_bigm, check_bigs): New tests.
9345	* tests/rand/t-urndmm.c: Add L to constants in calls, for K&R.
9346
93472002-12-06  Torbjorn Granlund  <tege@swox.com>
9348
9349	* configure.in: Remove -g.
9350	(hppa*-*-*): Pass -Wl,+vnocompatwarnings with +DA2.0.
9351
93522002-12-05  Torbjorn Granlund  <tege@swox.com>
9353
9354	* mpn/pa64/sqr_diagonal.asm: Remove .entry, .proc, .procend.
9355	* mpn/pa64/udiv.asm: Likewise.
9356
93572002-12-05  Kevin Ryde  <kevin@swox.se>
9358
9359	* mpn/pa64/sub_n.asm: Remove space in "sub, db" which gas objects to.
9360	* mpn/pa64/*.asm, tune/hppa2.asm: Use ".level 2.0" for 2.0n, since gas
9361	doesn't like ".level 2.0N".
9362
9363	* configure.in (hppa*-*-*): Group path and flags choices, for clarity.
9364	(hppa1.0*-*-*): Use gcc -mpa-risc-1-0 when available.
9365	(hppa2.0*-*-*): Ditto -mpa-risc-2-0.
9366	(*-*-hpux*): Exclude ABI=2.0w for hpux[1-9] and hpux10, rather than
9367	the converse of allowing it for hpux1[1-9]; ie. list the bad systems
9368	rather than try to guess the good systems.
9369	(hppa2.0*-*-*) [ABI=2.0n ABI=2.0w]: Add gcc to likely compilers.
9370	(hppa*-*-*) [gcc]: Test sizeof(long) to differentiate a 32-bit or
9371	64-bit build of the compiler.
9372	(hppa64-*-*): Add this as equivalent to hppa2.0-*-*.
9373	* acinclude.m4 (GMP_C_TEST_SIZEOF): New macro.
9374
9375	* tests/tests.h (ostringstream::str): Must null-terminate
9376	ostrstream::str() for the string constructor.
9377
93782002-12-04  Torbjorn Granlund  <tege@swox.com>
9379
9380	* mpn/pa32/hppa1_1/udiv.asm: Don't wrap symbol to INT64 in L() stuff.
9381
9382	* longlong.h (mpn_udiv_qrnnd_r based udiv_qrnnd): Fix typo.
9383
9384	* mpn/powerpc32/powerpc-defs.m4: Define float registers with `f'
9385	prefix.
9386
93872002-12-04  Kevin Ryde  <kevin@swox.se>
9388
9389	* gmp.texi (Floating-point Functions): Note the mantissa is binary and
9390	decimal fractions cannot be represented exactly.  Suggested by Serge
9391	Winitzki.
9392	(Known Build Problems): Note libtool stripping options when linking.
9393	Reported by Vincent Lefevre.
9394
9395	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Don't make an empty result a
9396	failure, that's a valid result.
9397	(GMP_ASM_GLOBL): Establish this from the host cpu type.
9398	(IA64_PATTERN): New macro.
9399	(GMP_PROG_EXEEXT_FOR_BUILD, GMP_C_FOR_BUILD_ANSI,
9400	GMP_CHECK_LIBM_FOR_BUILD): Remove temporary files created.
9401	* configure.in: Use IA64_PATTERN.
9402
94032002-12-03  Torbjorn Granlund  <tege@swox.com>
9404
9405	* tune/hppa.asm: Use config.m4.
9406	* tune/hppa2.asm: Likewise.
9407	* tune/hppa2w.asm: Likewise.
9408
9409	* mpn/pa64: Use LDEF.
9410
94112002-12-03  Kevin Ryde  <kevin@swox.se>
9412
9413	* INSTALL: Use return rather than exit in the example programs.
9414	Suggested by Richard Dawe.
9415
9416	* gmp.texi (Build Options): Move non-unix notes to ...
9417	(Notes for Particular Systems): ... here.  Mention MS Interix,
9418	reported by Paul Leyland.
9419	(C++ Interface Random Numbers): Add gmp_randinit_mt to examples.
9420
9421	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Must test empty suffix first,
9422	for the benefit of hppa hp-ux.
9423	(GMP_ASM_UNDERSCORE): Grep the output of "nm" instead of trying to
9424	construct an asm file, and in case of failure fallback on no
9425	underscore and a warning.
9426
9427	* longlong.h (count_leading_zeros, count_trailing_zeros) [ev67, ev68]:
9428	Restrict __asm__ ctlz and cttz to __GNUC__.
9429
9430	* gen-psqr.c (HAVE_CONST, const): New macros.
9431
9432	* tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt.
9433
94342002-12-02  Torbjorn Granlund  <tege@swox.com>
9435
9436	* gmp-impl.h: Split popc_limb again, combined version gives too many
9437	compiler warnings.
9438
94392002-12-01  Torbjorn Granlund  <tege@swox.com>
9440
9441	* mpn/generic/gcdext.c (div1): Disable unused function.
9442
9443	* mpz/root.c: Don't include stdlib.h or longlong.h.
9444	* mpz/rootrem.c: Likewise.
9445
9446	* extract-dbl.c: abort => ASSERT_ALWAYS.
9447	* mpz/set_d.c: Likewise.
9448	* mpn/generic/tdiv_qr.c: Likewise.
9449
9450	* gen-psqr.c (f_cmp_fraction, f_cmp_divisor): Change parameter to
9451	`const void *', to match qsort spec.
9452
94532002-12-01  Kevin Ryde  <kevin@swox.se>
9454
9455	* gmp.texi (Integer Division): Fix a couple of @math's for tex.
9456	Use @dots in more places.
9457
9458	* tests/cxx/t-locale.cc: Test non std::locale systems too.
9459	* tests/cxx/clocale.c: New file, reinstating what was localeconv.c,
9460	and subverting nl_langinfo too.
9461	* tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
9462
9463	* tests/tests.h (ostringstream, istringstream): Provide fakes of these
9464	if <sstream> not available.
9465	* tests/cxx/t-locale.cc, tests/cxx/t-ostream.cc: Remove <sstream>.
9466	* configure.in (AC_CHECK_HEADERS) [C++]: Add <sstream>.
9467
94682002-11-30  Torbjorn Granlund  <tege@swox.com>
9469
9470	* printf/doprnt.c (__gmp_doprnt): Comment out a `break' to shut up
9471	compiler warnings.
9472
9473	* mpn/ia64/invert_limb.asm: Add `many' hints to return insns.
9474
9475	* mpn/ia64/divrem_1.asm: Allocate more local registers; put b0 in
9476	one of them.
9477
9478	* mpn/ia64/popcount.asm: Properly restore register ar.lc.
9479
9480	* longlong.h (umul_ppmm) [ia64]: Form both product parts in asm.
9481
9482	* mpz/bin_uiui.c: Cast umul_ppmm operands.
9483
9484	* scanf/doscan.c (gmpscan): Remove unused label store_get_digits.
9485
9486	* gmp-impl.h: #undef MIN and MAX before #defining.
9487
9488	* mpn/ia64/copyi.asm: Add `;' after bundle declarators.
9489	* mpn/ia64/copyd.asm: Likewise.
9490
9491	* mpn/ia64/divrem_1.asm: Add some syntax to placid the HP-UX assembler.
9492
94932002-11-30  Kevin Ryde  <kevin@swox.se>
9494
9495	* configure.in (AC_CHECK_HEADERS): Add nl_types.h.
9496	* tests/misc/t-locale.c: Use this, for nl_item on netbsd 1.4.1.
9497
94982002-11-29  Torbjorn Granlund  <tege@swox.com>
9499
9500	* tests/devel/addmul_1.c: Provide prototype for mpn_print.
9501	(OPS): Account for function overhead.
9502	* tests/devel/{submul_1.c,mul_1.c,add_n.c,sub_n.c}: Likewise.
9503
9504	* mpn/ia64/addmul_1.asm: Rewrite.
9505
95062002-11-28  Torbjorn Granlund  <tege@swox.com>
9507
9508	* mpn/ia64/sqr_diagonal.asm: Don't allocate any registers.
9509
9510	* mpn/ia64/submul_1.asm: Adapt to Itanium 2.
9511
9512	* mpn/ia64/mul_1.asm: Fix typo in HAVE_ABI_32 code.
9513
9514	* mpn/ia64/add_n.asm: Rewrite.
9515	* mpn/ia64/sub_n.asm: Rewrite.
9516
95172002-11-28  Kevin Ryde  <kevin@swox.se>
9518
9519	* mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Use this rather
9520	than libdummy.
9521	* tests/Makefile.am (EXTRA_libtests_la_SOURCES): Use this for
9522	x86call.asm and x86check.c rather than libdummy.
9523
95242002-11-27  Torbjorn Granlund  <tege@swox.com>
9525
9526	* tests/mpz/t-mul.c: Implement reference Karatsuba multiplication.
9527	Rewrite testing scheme to run fewer really huge tests.
9528
95292002-11-26  Torbjorn Granlund  <tege@swox.com>
9530
9531	* tests: Decrease repetition count for some of the slowest tests.
9532
9533	* mpn/ia64/divrem_1.asm: New file.
9534
95352002-11-25  Torbjorn Granlund  <tege@swox.com>
9536
9537	* mpfr/tests/tdiv.c: Decrease number of performed tests.
9538
95392002-11-23  Torbjorn Granlund  <tege@swox.com>
9540
9541	* mpn/ia64/mul_1.asm: Rewrite.
9542
95432002-11-23  Kevin Ryde  <kevin@swox.se>
9544
9545	* mpn/ia64/README: Add some references.
9546
9547	* gmp.texi (Build Options): Add itanium and itanium2, mention DocBook
9548	and XML from makeinfo, add texinfo top level cross reference.
9549	(Integer Division): Try to clarify 2exp functions a bit.
9550	(C++ Interface Floats): Giving bad string to constructor is undefined.
9551	(C++ Interface Integers, C++ Interface Rationals): Ditto, and show
9552	default base in prototype, not the description.
9553
9554	* config.sub, config.guess, configure.in (itanium, itanium2): New cpu
9555	types.
9556
9557	* tests/misc/t-printf.c, tests/misc/t-scanf.c (check_misc): Suppress
9558	%zd test on glibc prior to 2.1, it's not supported.
9559
95602002-11-22  Torbjorn Granlund  <tege@swox.com>
9561
9562	* mpn/ia64/copyi.asm: Optimize for Itanium 2.
9563	* mpn/ia64/copyd.asm: Likewise.
9564
95652002-11-20  Torbjorn Granlund  <tege@swox.com>
9566
9567	* mpn/ia64/sqr_diagonal.asm: New file.
9568
9569	* mpn/ia64/submul_1.asm: Handle vl == 0 specially.
9570
95712002-11-20  Kevin Ryde  <kevin@swox.se>
9572
9573	* tests/cxx/t-locale.cc: Test with locales imbued into stream, use
9574	<sstream>, eliminated some C-isms.  istream tests disabled, not yet
9575	locale-ized.
9576	* tests/cxx/Makefile.am (t_locale_SOURCES): Remove localeconv.c.
9577	* tests/cxx/localeconv.c: Remove file.
9578
9579	* configure.in (AC_CHECK_TYPES) [C++]: Add std::locale.
9580	* printf/doprntf.c: Add decimal point parameter, remove localeconv use.
9581	* gmp-impl.h (__gmp_doprnt_mpf): Update prototype, bump symbol to
9582	__gmp_doprnt_mpf2 to protect old libgmpxx.
9583	* cxx/osmpf.cc: Use this with ostream locale decimal_point facet.
9584	* printf/doprnt.c: Ditto, with GMP_DECIMAL_POINT.
9585
9586	* gmp-h.in: More comments on __declspec for windows DLLs.
9587
9588	* mpf/set_str.c, scanf/doscan.c: Cast through "unsigned char" for
9589	decimal point string, same as input chars.
9590
9591	* configure.in (AC_CHECK_HEADERS): Add langinfo.h.
9592	(AC_CHECK_FUNCS): Add nl_langinfo.
9593	* gmp-impl.h (GMP_DECIMAL_POINT): New macro.
9594	* mpf/out_str.c, mpf/set_str.c, scanf/doscan.c: Use it, and don't
9595	bother with special code for non-locale systems.
9596	* tests/misc/t-locale.c: Subvert nl_langinfo too.
9597
9598	* configure.in, acinclude.m4 (GMP_ASM_X86_GOT_UNDERSCORE): New macro.
9599	* mpn/x86/x86-defs.m4 (_GLOBAL_OFFSET_TABLE_): New macro, inserting
9600	extra underscore for OpenBSD.
9601	* mpn/x86/README (_GLOBAL_OFFSET_TABLE_): Update notes.
9602	Reported by Christian Weisgerber.
9603
9604	* tests/cxx/t-rand.cc (check_randinit): New function, collecting up
9605	constructor tests.
9606
9607	* tests/cxx/t-ostream.cc: Use <sstream> instead of <strstream>, use
9608	compare instead of strcmp.
9609
9610	* gmpxx.h (__gmp_randinit_lc_2exp_size_t): Return type is int.
9611
96122002-11-18  Kevin Ryde  <kevin@swox.se>
9613
9614	* tune/speed.c (r_string): Use CNST_LIMB with <N>bits, spotted by
9615	Torbjorn.
9616
96172002-11-19  Torbjorn Granlund  <tege@swox.com>
9618
9619	* mpn/ia64/mul_1.asm: Remove redundant cmp from prologue code.
9620	Streamline prologue.
9621	* mpn/ia64/addmul_1.asm: Likewise.
9622	* mpn/ia64/submul_1.asm: New file.
9623	* mpn/ia64/submul_1.c: Remove.
9624
96252002-11-17  Torbjorn Granlund  <tege@swox.com>
9626
9627	* mpn/generic/popham.c: New file, using new faster algorithm.
9628	* mpn/generic/popcount.c: Remove.
9629	* mpn/generic/hamdist.c: Remove.
9630
9631	* mpn/ia64/addmul_1.asm: Don't clobber callee-saves register f16.
9632	* mpn/ia64/mul_1.asm: Likewise.
9633
9634	* mpn/ia64/addmul_1.asm: Add pred.rel declarations.  Resolve RAW
9635	hazards for condition code registers, duplicating code as needed.  Add
9636	prediction to all branches.
9637	* mpn/ia64/mul_1.asm: Likewise.
9638	* mpn/ia64/add_n.asm: Likewise.
9639	* mpn/ia64/sub_n.asm: Likewise.
9640	* mpn/ia64/copyi.asm: Likewise.
9641	* mpn/ia64/copyd.asm: Likewise.
9642
9643	* mpn/generic/random2.c: Add a cast to silence some compilers.
9644
96452002-11-16  Torbjorn Granlund  <tege@swox.com>
9646
9647	* mpz/powm.c: Cap allocation by limiting k to 10 (512 precomputed
9648	values).
9649
96502002-11-16  Kevin Ryde  <kevin@swox.se>
9651
9652	* configure.in, gmp.texi: Remove powerpc64 ABI=32L, doesn't work and
9653	is unlikely to ever do so.
9654	* configure.in: Allow ABI=32 for powerpc64.
9655	Reported by David Edelsohn.
9656
96572002-11-14  Kevin Ryde  <kevin@swox.se>
9658
9659	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add addmul_2.c
9660	addmul_3.c addmul_4.c addmul_5.c addmul_6.c addmul_7.c addmul_8.c.
9661
9662	* gmp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
9663	Use __dllexport__ and __dllimport__ to keep out of application
9664	namespace.
9665
96662002-11-14  Gerardo Ballabio <gerardo.ballabio@unimib.it>
9667
9668	* gmpxx.h (__gmp_randinit_default_t, __gmp_randinit_lc_2exp_t,
9669	__gmp_randinit_lc_2exp_size_t): Use extern "C" { typedef ... }, for
9670	the benefit of g++ prior to 3.2.
9671
96722002-11-12  Kevin Ryde  <kevin@swox.se>
9673
9674	* gmpxx.h (gmp_randclass constructors): Patch from Roberto Bagnara to
9675	use extern "C" on C function pointer arguments.
9676
96772002-11-09  Kevin Ryde  <kevin@swox.se>
9678
9679	* configure.in, Makefile.am, printf/Makefile.am,
9680	printf/repl-vsnprintf.c: Handle vsnprintf replacement with C
9681	conditionals.
9682
9683	* acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Workaround troubles recent
9684	HP cc +O3 causes for AC_CHECK_FUNCS.
9685
9686	* gmp.texi (Notes for Particular Systems): Add Sparc app regs.
9687	(Debugging): Note gcc -fstack options to detect overflow.
9688	(Formatted Output Strings, Formatted Input Strings): Format strings
9689	are not multibyte.
9690
96912002-11-06  Torbjorn Granlund  <tege@swox.com>
9692
9693	* mpn/generic/tdiv_qr.c: Remove a bogus assert.
9694
96952002-11-05  Torbjorn Granlund  <tege@swox.com>
9696
9697	* mpn/generic/tdiv_qr.c: Remove two dead mpn_divrem_2 calls.
9698
96992002-11-04  Kevin Ryde  <kevin@swox.se>
9700
9701	* acinclude.m4 (GMP_C_INLINE): Don't define "inline" for C++.
9702
9703	* demos/expr/expr-impl.h (stdarg.h): Test __DECC same as gmp.h.
9704
9705	* mpbsd/mtox.c, printf/obprintf.c, printf/obvprintf.c,
9706	scanf/vsscanf.c, demos/expr/expr.c, demos/expr/exprf.c,
9707	demos/expr/exprfa.c, demos/expr/exprfr.c, demos/expr/exprq.c,
9708	demos/expr/exprz.c, demos/expr/exprza.c: Add <string.h> for strlen and
9709	memcpy.
9710
97112002-11-02  Kevin Ryde  <kevin@swox.se>
9712
9713	* longlong.h: Test __x86_64__ not __x86_64.  Reported by Andreas
9714	Jaeger.
9715
9716	* mpz/import.c, mpz/export.c: Use char* subtract from NULL to get
9717	pointer alignment, for the benefit of Cray vector systems.
9718
9719	* cxx/ismpf.cc: Use <clocale>.
9720	* tests/cxx/t-locale.cc: No need to conditionalize <clocale>.
9721
9722	* scanf/doscan.c: Don't use isascii, rely on C99 ctype.h.
9723
9724	* gmp.texi (Build Options): Describe CC_FOR_BUILD, cross reference
9725	texinfo manual.
9726	(ABI and ISA): Add powerpc620 and powerpc630 to powerpc64, add NetBSD
9727	and OpenBSD sparc64.
9728	(Notes for Package Builds): Cross reference libtool manual.
9729	(Notes for Particular Systems): Add OpenBSD to non-MMX versions of gas.
9730	(Known Build Problems): Add MacOS X C++ shared libraries.
9731
97322002-10-31  Kevin Ryde  <kevin@swox.se>
9733
9734	* gmp-impl.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
9735	tests/devel/try.c, tests/tests.h, tests/refmpn.c (mpn_addmul_5,
9736	mpn_addmul_6, mpn_addmul_7, mpn_addmul_8): Add testing and measuring.
9737	* configure.in (config.in): Add #undefs of HAVE_NATIVE_mpn_addmul_5,
9738	HAVE_NATIVE_mpn_addmul_6, HAVE_NATIVE_mpn_addmul_7,
9739	HAVE_NATIVE_mpn_addmul_8.
9740	(gmp_mpn_functions_optional): Add addmul_5 addmul_6 addmul_7 addmul_8.
9741
9742	* tests/devel/try.c (ASSERT_CARRY): Remove, now in gmp-impl.h
9743	(try_one): Do dest setups after sources, for benefit of
9744	dst0_from_src1.
9745
97462002-11-01  Torbjorn Granlund  <tege@swox.com>
9747
9748	* mpn/generic/tdiv_qr.c: Avoid quadratic behaviour for
9749	sub-division when numerator is more than twice the size of the
9750	denominator.  Simplify loop logic for the same case.  Clean up a
9751	few comments.
9752
97532002-10-29  Torbjorn Granlund  <tege@swox.com>
9754
9755	* configure.in (*-cray-unicos*): Pass -hnofastmd again.
9756
97572002-10-25  Torbjorn Granlund  <tege@swox.com>
9758
9759	* tests/tadd.c: Disable test of denorms.
9760
97612002-10-23  Linus Nordberg  <linus@swox.se>
9762
9763	* gmp.texi (Introduction to GMP): Update section about mailing
9764	lists.
9765
97662002-10-23  Kevin Ryde  <kevin@swox.se>
9767
9768	* gmp-h.in (__GMP_ATTRIBUTE_PURE): Suppress this when
9769	__GMP_NO_ATTRIBUTE_CONST_PURE is defined.
9770	* gmp-impl.h (ATTRIBUTE_CONST): Ditto.
9771	* tune/common.c: Use __GMP_NO_ATTRIBUTE_CONST_PURE.
9772
9773	* tune/speed.h, tune/many.pl: Remove ATTRIBUTEs from prototypes.
9774	* tune/speed.h: Remove various "dummy" variables attempting to keep
9775	"pure" calls live, no longer necessary.  They weren't sufficient for
9776	recent MacOS cc anyway.
9777
97782002-10-21  Torbjorn Granlund  <tege@swox.com>
9779
9780	* mpn/cray/ieee/addmul_1.c: Handle overlap as in mul_1.c.
9781	* mpn/cray/ieee/submul_1.c: Likewise.
9782
97832002-10-19  Kevin Ryde  <kevin@swox.se>
9784
9785	* configure.in (sparcv9 etc -*-*bsd*): Add support for NetBSD and
9786	OpenBSD sparc64.  Reported by Christian Weisgerber.
9787	(AC_CHECK_HEADERS): Add sys/param.h for sys/sysctl.h on *BSD.
9788
9789	* demos/calc/calc.y: Change ={ to {, needed for bison 1.50.
9790
9791	* longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]:
9792	Should be UDItype.
9793
9794	* mpz/set_str.c, mpf/set_str.c, mpbsd/xtom.c, scanf/sscanffuns.c: Cast
9795	chars through "unsigned char" to zero extend, required by C99 ctype.h.
9796
97972002-10-18  Torbjorn Granlund  <tege@swox.com>
9798
9799	* tests/mpz/t-root.c: Test also mpz_rootrem.
9800
9801	* mpn/generic/rootrem.c: Avoid overflow problem when n is huge.
9802
9803	* mpz/root.c: Avoid overflow problems in allocation computation; also
9804	simplify it.  Misc cleanups.
9805
9806	* mpz/rootrem.c: New file.
9807	* Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
9808
98092002-10-17  Torbjorn Granlund  <tege@swox.com>
9810
9811	* gmp-impl.h (popc_limb): Combine variants.
9812
98132002-10-14  Kevin Ryde  <kevin@swox.se>
9814
9815	* configure.in (AC_CHECK_HEADERS): Add sys/time.h for sys/resource.h
9816	test, needed by SunOS, and next autoconf will insist headers actually
9817	compile.
9818
98192002-10-08  Kevin Ryde  <kevin@swox.se>
9820
9821	* tune/time.c (speed_time_init): Allow for Cray times() apparently
9822	being a cycle counter.
9823
9824	* dumbmp.c (mpz_get_str): Fix buf size allocation.
9825
9826	* tests/trace.c, tests/tests.h (mp_limb_trace): New function.
9827
9828	* tune/speed-ext.c (SPEED_EXTRA_PROTOS): Use __GMP_PROTO.
9829	* tests/devel/try.c (malloc_region): Add a cast for SunOS cc.
9830
9831	* configure.in (AC_CHECK_FUNCS): Add strerror.
9832	(AC_CHECK_DECLS): Add sys_errlist, sys_nerr.
9833	* tune/time.c, tests/devel/try.c: Use them.
9834
98352002-10-05  Kevin Ryde  <kevin@swox.se>
9836
9837	* configure.in (AC_CHECK_HEADERS): Test float.h, not in SunOS cc.
9838	* printf/repl-vsnprintf.c: Use this.
9839
9840	* configure.in (*sparc*-*-*): Collect up various options for clarity,
9841	use gcc -mcpu=supersparc and ultrasparc3, use cc -xchip, don't use
9842	-xtarget=native, use cc configs with acc, merge SunOS bundled cc and
9843	SunPRO cc configs.
9844
9845	* gmp-impl.h (gmp_randfnptr_t): Use __GMP_PROTO.
9846	(MPZ_REALLOC): Cast _mpz_realloc return value to mp_ptr, for the
9847	benefit of SunOS cc which requires pointers of the same type on the
9848	two legs of a ?:.
9849
9850	* dumbmp.c (mpz_realloc): Add a cast to avoid a warning from SunOS cc.
9851
9852	* acinclude.m4: Allow for i960 b.out default cc output.
9853
9854	* gmp.texi (Random State Initialization): Add gmp_randinit_mt.
9855	(Perfect Square Algorithm): Describe new mpn_mod_34lsub1 use.
9856	(Factorial Algorithm): Describe Jason's new code.
9857	(Binomial Coefficients Algorithm): Ideas about improvements
9858	moved to doc/projects.html.
9859	(Contributors): Add Jason Moxham and Pedro Gimeno.
9860
98612002-10-03  Kevin Ryde  <kevin@swox.se>
9862
9863	* gen-psqr.c: New file.
9864	* Makefile.am, mpn/Makefile.am: Use it to generate mpn/perfsqr.h.
9865	* mpn/generic/perfsqr.c: Use generated data, put mod 256 data into
9866	limbs to save space, use mpn_mod_34lsub1 when good.
9867	* tests/mpn/t-perfsqr.c: New file.
9868	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
9869	* tests/mpz/t-perfsqr.c (check_modulo): New test.
9870	(check_sqrt): New function holding current tests.
9871
9872	* configure.in (AC_INIT): Modernize to package name and version here
9873	rather than AM_INIT_AUTOMAKE, add bug report email.
9874	(AC_CONFIG_SRCDIR): New macro.
9875
9876	* gmp-impl.h (ROUND_UP_MULTIPLE): Fix for non-power-of-2 moduli (not
9877	normal in current uses), clarify the comments a bit.
9878
98792002-09-30  Kevin Ryde  <kevin@swox.se>
9880
9881	* mpn/Makeasm.am (.s.lo): Add --tag=CC for the benefit of CCAS!=CC,
9882	same as .S.lo and .asm.lo.
9883
9884	* Makefile.am (gen-fac_ui, gen-fib, gen-bases): Quote source files in
9885	test -f stuff to avoid Sun make rewriting them.
9886
98872002-09-28  Kevin Ryde  <kevin@swox.se>
9888
9889	* tests/devel/try.c, tune/speed.c: Avoid strings longer than C99
9890	guarantees.
9891
9892	* tests/refmpn.c, tests/tests.h (refmpn_zero_extend, refmpn_normalize,
9893	refmpn_sqrtrem): New functions.
9894	* tests/devel/try.c (TYPE_SQRTREM): Use refmpn_sqrtrem.
9895	(compare): Correction to tr->dst_size subscripting.
9896
9897	* dumbmp.c: Add several new functions, allow for initial n<d in
9898	mpz_tdiv_q (now in mpz_tdiv_qr actually).
9899
9900	* gen-bases.c (chars_per_limb): Get GMP_NUMB_BITS for base==2,
9901	similarly other powers of 2, which this was in the past.
9902	* tests/refmpn.c (refmpn_chars_per_limb): Ditto.
9903	* tests/mpn/t-mp_bases.c: Test chars_per_limb for power-of-2 bases too.
9904
9905	* Makefile.am, mpz/Makefile.am: Setups for gen-fac_ui.c generating
9906	mpz/fac_ui.h.
9907
99082002-09-28  Jason Moxham <J.L.Moxham@maths.soton.ac.uk>
9909
9910	* dumbmp.c (mpz_pow_ui, mpz_addmul_ui, mpz_root): New functions.
9911	* gen-fac_ui.c: New file.
9912	* mpz/fac_ui.c: Rewrite.
9913
99142002-09-26  Kevin Ryde  <kevin@swox.se>
9915
9916	* tests/cxx/localeconv.c: New file, split from t-locale.cc.
9917	* tests/cxx/t-locale.cc: Use it.
9918	* tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
9919
9920	* tests/cxx/Makefile.am: Updates for Gerardo's new test programs.
9921
99222002-09-26  Gerardo Ballabio <gerardo.ballabio@unimib.it>
9923
9924	* gmpxx.h (__gmp_cmp_function): Bug fixes in double/mpq and
9925	double/mpfr comparisons.
9926
9927	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-constr.cc,
9928	tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: Revise and add various
9929	tests, including some for mpfr, some split from t-expr.cc.
9930	* tests/cxx/t-locale.cc: Modernize include files.
9931	* tests/cxx/t-ostream.cc: Modernize include files, use cout rather
9932	than printf for diagnostics.
9933	* tests/cxx/t-misc.cc, tests/cxx/t-rand.cc: New file, split from
9934	t-allfuns.cc.
9935	* tests/cxx/t-ops.cc: New file, some split from t-allfuns.cc.
9936	* tests/cxx/t-prec.cc: New file.
9937	* tests/cxx/t-allfuns.cc, tests/cxx/t-expr.cc: Remove files.
9938
99392002-09-25  Torbjorn Granlund  <tege@swox.com>
9940
9941	* configure.in (*-cray-unicos*): Remove -hscalar0, it causes too much
9942	performance loss.  Let's trust Cray to fix their compilers.
9943
99442002-09-24  Torbjorn Granlund  <tege@swox.com>
9945
9946	* mpn/powerpc32/add_n.asm: Rewrite.
9947	* mpn/powerpc32/sub_n.asm: Rewrite.
9948
99492002-09-24  Pedro Gimeno  <pggimeno@wanadoo.es>
9950
9951	* randlc2x.c: Prepare for nails by changing type of _mp_c to mpz_t,
9952	make _mp_seed fixed-size, disallow SIZ(a)==0 to optimize comparisons
9953	for mpn_mul.
9954	* gmp-impl.h (MPZ_FAKE_UI): New macro.
9955
9956	* randmt.c: Some constants made long for K&R compliance; remove UL at
9957	the end of other constants; use mp_size_t where appropriate; use
9958	mpz_export to split the seed.
9959
9960	* gmp-impl.h: Remove type cast in RNG_FNPTR and RNG_STATE, to allow
9961	them to be used as lvalues.
9962	* randclr.c, randlc2x.c, randmt.c, randsd.c: All callers changed.
9963
9964	* mpz/urandomm.c: Replace mpn_cmp with MPN_CMP.
9965
9966	* tests/rand/gen.c: Get rid of gmp_errno.
9967
99682002-09-24  Kevin Ryde  <kevin@swox.se>
9969
9970	* gmp.texi (Custom Allocation): Keep allocate_function etc out of the
9971	function index by using @deftypevr.
9972	More index entries.
9973
99742002-09-24  Gerardo Ballabio <gerardo.ballabio@unimib.it>
9975
9976	* gmpxx.h (mpfr_class constructors from strings): Precision was set
9977	incorrectly, fixed.
9978
99792002-09-23  Torbjorn Granlund  <tege@swox.com>
9980
9981	* mpf/urandomb.c: Don't crash for overlarge nbits argument.
9982	Let nbits==0 mean to fill number with random bits.
9983
99842002-09-21  Torbjorn Granlund  <tege@swox.com>
9985
9986	* mpn/alpha/mod_34lsub1.asm: Add r31 dummy operand to `br' instruction.
9987
99882002-09-20  Gerardo Ballabio <gerardo.ballabio@unimib.it>
9989
9990	* gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken
9991	mpq/double functions.
9992
99932002-09-18  Torbjorn Granlund  <tege@swox.com>
9994
9995	* randmt.c (randget_mt): Fix typo.
9996
99972002-09-18  Kevin Ryde  <kevin@swox.se>
9998
9999	* gmp-impl.h (_gmp_rand): Avoid evaluating "state" more than once, for
10000	the benefit places calling it with RANDS.
10001
10002	* randmt.c (randseed_mt): Use mpz_init for mod and seed1, for safety.
10003
10004	* tune/tuneup.c (sqr_karatsuba_threshold): Initialize to
10005	TUNE_SQR_KARATSUBA_MAX so mpn_sqr_n works for randmt initialization.
10006
10007	* gmp.texi (Integer Comparisons): Remove mention of non-existent
10008	mpz_cmpabs_si, reported by Conrad Curry.
10009
10010	* tune/speed.c, tune/speed.h, tune/common.c: Add gmp_randseed,
10011	gmp_randseed_ui and mpz_urandomb.
10012
100132002-09-18  Pedro Gimeno  <pggimeno@wanadoo.es>
10014
10015	* tests/rand/gen.c: Add mt, remove lc and bbs.
10016
10017	* Makefile.am (libgmp_la_SOURCES): Add randmt.c, remove randlc.c and
10018	randraw.c.
10019
10020	* randmt.c: New file.
10021	* gmp-h.in (gmp_randinit_mt): Add prototype.
10022	* randdef.c: Use gmp_randinit_mt.
10023
10024	* gmp-impl.h (RNG_FNPTR, RNG_STATE): New macros.
10025	(gmp_randfnptr_t): New structure.
10026	(_gmp_rand): Now a macro not a function.
10027	* gmp-h.in (__gmp_randata_lc): Remove, now internal to randlc2x.c.
10028	(__gmp_randstate_struct): Revise comments on field usage.
10029	* randsd.c, randclr.c: Use function pointer scheme.
10030	* randsdui.c: Use gmp_randseed.
10031	* randraw.c: Remove file.
10032	* randlc2x.c: Collect up lc_2exp related code from randsd.c, randclr.c
10033	and randraw.c, use function pointer scheme, integrate seed==0/a==0
10034	into main case and fix case where bits(a) < m2exp.
10035
10036	* randlc.c: Remove file, never documented and never worked.
10037	* gmp-h.in (gmp_randinit_lc): Remove prototype.
10038
100392002-09-16  Torbjorn Granlund  <tege@swox.com>
10040
10041	* mpn/alpha/mod_34lsub1.asm: New file.
10042
100432002-09-16  Kevin Ryde  <kevin@swox.se>
10044
10045	* configure.in, acinclude.m4 (GMP_C_RESTRICT): Remove this, not
10046	currently used, and #define restrict upsets Microsoft C headers on
10047	win64.  Reported by David Librik.
10048
10049	* configure.in (x86): Add gcc 3.2 -march and -mcpu flags, remove some
10050	unnecessary -march=i486 fallbacks.
10051
10052	* gmp.texi (Notes for Particular Systems): Note cl /MD is required for
10053	Microsoft C and MINGW to cooperate on I/O.  Explained by David Librik.
10054	(Language Bindings): Add linbox.
10055	* gmp.texi (Language Bindings):
10056
100572002-09-12  Kevin Ryde  <kevin@swox.se>
10058
10059	* mpz/aorsmul_i.c: Allow for w==x overlap with nails.  Test
10060	BITS_PER_ULONG > GMP_NUMB_BITS rather than GMP_NAIL_BITS != 0.
10061	* tests/mpz/t-aorsmul.c: Test this.
10062
10063	* tune/common.c: mpn_mod_34lsub1 only exists for GMP_NUMB_BITS%4==0
10064	* tune/speed.c: Add mpn_mod_34lsub1.
10065
100662002-09-10  Pedro Gimeno  <pggimeno@wanadoo.es>
10067
10068	* rand.c: Remove old disabled BBS code.
10069	* mpf/urandomb.c: Use BITS_TO_LIMBS.
10070
100712002-09-10  Kevin Ryde  <kevin@swox.se>
10072
10073	* gmp.texi (Multiplication Algorithms): FFT is now enabled by default.
10074
100752002-09-10  Pedro Gimeno  <pggimeno@wanadoo.es>
10076
10077	* mpz/urandomm.c: Use mpn level functions, avoid an infinite loop if
10078	_gmp_rand forever returns all "1" bits.
10079	* tests/rand/t-urndmm.c: New file
10080	* tests/rand/Makefile.am (check_PROGRAMS): Add it.
10081
10082	* gmp-impl.h (BITS_TO_LIMBS): New macro.
10083	* mpz/urandomb.c: Use it, and use MPZ_REALLOC.
10084
100852002-09-08  Kevin Ryde  <kevin@swox.se>
10086
10087	* acinclude.m4 (GMP_GCC_WA_MCPU): New macro.
10088	* configure.in (alpha*-*-*): Use it to avoid -Wa,-mev67 if gas isn't
10089	new enough to know ev67.  Reported by David Bremner.
10090
100912002-07-30  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10092
10093	* gmpxx.h (__gmpz_value etc): Remove, use mpz_t etc instead.
10094	(__gmp_expr): Reorganise specializations, use __gmp_expr<T,T> not
10095	mpz_class etc.
10096	(mpfr evals): Remove mode parameter, was always
10097	__gmp_default_rounding_mode anyway.
10098
100992002-09-07  Kevin Ryde  <kevin@swox.se>
10100
10101	* gmp-h.in, mp-h.in: Use #ifdef for tests, for the benefit of
10102	applications using gcc -Wundef.
10103
10104	* longlong.h: Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB for all alphas,
10105	since mpn/alpha/cntlz.asm always goes into libgmp.so, even for ev67
10106	and ev68 which don't need it.  Reported by David Bremner.
10107
10108	* gmp.texi (Demonstration Programs): New section, expanding on what
10109	was under "Build Options".
10110	(Converting Floats): Don't need \ for _ in @var within @math.
10111	Add and amend various index entries.
10112
10113	* demos/qcn.c: Add -p prime limit option.
10114
101152002-08-30  Kevin Ryde  <kevin@swox.se>
10116
10117	* mpz/pprime_p.c: Handle small negatives with isprime, in particular
10118	must do so for n==-2.
10119	* tests/mpz/t-pprime_p.c: New file.
10120	* tests/mpz/Makefile.am: Add it.
10121
101222002-08-26  Torbjorn Granlund  <tege@swox.com>
10123
10124	* gmp.texi (Converting Floats): Fix typo in mpf_get_d_2exp docs,
10125	reported by Paul Zimmermann.
10126
101272002-08-26  Kevin Ryde  <kevin@swox.se>
10128
10129	* configure.in: Echo the ABI being tried for the compilers.
10130	(powerpc*-*-*): Use powerpc64/aix.m4 for ABI=aix64 too.
10131	(AC_CHECK_FUNCS): Add strtol, for tests/rand/gen.c.
10132
101332002-08-24  Kevin Ryde  <kevin@swox.se>
10134
10135	* configure.in (HAVE_HOST_CPU_, HAVE_HOST_CPU_FAMILY_, HAVE_NATIVE_):
10136	Setup templates for these using AH_VERBATIM rather than acconfig.h,
10137	preferred by latest autoconf.  Prune lists to just things used.
10138	* acconfig.h: Remove file.
10139
10140	* mpn/powerpc32/mode1o.asm: Forgot ASM_START.
10141
10142	* tune/time.c (have_cgt_id): Renamed from HAVE_CGT_ID so avoid
10143	confusion with autoconf outputs, and turn it into a "const" variable.
10144
101452002-08-23  Torbjorn Granlund  <tege@swox.com>
10146
10147	* configure.in: Choose powerpc32/aix.m4 or powerpc64/aix.m4 based on
10148	ABI, not configuration triple.
10149
10150	* mpz/pprime_p.c: Partially undo last change--handle small and
10151	negative numbers in the same test.
10152
101532002-08-22  Kevin Ryde  <kevin@swox.se>
10154
10155	* gmp-impl.h (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD): Note
10156	mpn/generic/mul_fft.c is not nails-capable, and don't bother setting
10157	other FFT data for nails.
10158
10159	* configfsf.guess: Update to 2002-08-19.
10160	* configfsf.sub: Update to 2002-08-20.
10161
10162	* config.guess (powerpc*-*-*): Use a { } construct to suppress SIGILL
10163	message on AIX.
10164
101652002-08-20  Kevin Ryde  <kevin@swox.se>
10166
10167	* gmp.texi (Build Options): Add ia64 under cpu types.
10168	(ABI and ISA): Describe IRIX 6 ABI=o32.
10169	(Notes for Particular Systems): Remove -march=pentiumpro, now ok.
10170	(Known Build Problems): Binutils 2.12 is ok for libgmp.a.
10171	(Emacs): New section.
10172	(Language Bindings): Update MLton URL, reported by Stephen Weeks.
10173	(Prime Testing Algorithm): New section.
10174	Don't put a blank line after @item in @table since it can make a page
10175	break between the heading and the entry.
10176	Misc tweaks elsewhere, in particular more index entries.
10177
10178	* mpz/millerrabin.c: Need x to be size+1 for change to urandomm.
10179
10180	* gmp-impl.h: Comments on the use of __GMP_DECLSPEC.
10181
10182	* tune/time.c (freq_measure_mftb_one): Use struct_timeval, for the
10183	benefit of mingw.
10184
10185	* tests/refmpn.c, tests/tests.h (ref_addc_limb, ref_subc_limb):
10186	Renamed from add and sub, following gmp-impl.h ADDC_LIMB and SUBC_LIMB.
10187
101882002-08-17  Kevin Ryde  <kevin@swox.se>
10189
10190	* mpn/powerpc32/mode1o.asm: New file.
10191	* configure.in, acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): New macro.
10192	* mpn/asm-defs.m4: Use it to help setting up PIC.
10193
10194	* configure.in (AC_PREREQ): Bump to 2.53.
10195
10196	* mpn/powerpc32/powerpc-defs.m4 (ASSERT): New macro.
10197	(PROLOGUE_cpu): New macro, giving ALIGN(4) not 8.
10198
101992002-08-16  Torbjorn Granlund  <tege@swox.com>
10200
10201	* mpn/m68k/lshift.asm: Fix typo in !scale_available_p code.
10202	* mpn/m68k/rshift.asm: Likewise.
10203
102042002-08-16  Kevin Ryde  <kevin@swox.se>
10205
10206	* configure.in (--enable-profiling=instrument): New option.
10207	* gmp.texi (Profiling): Describe it.
10208	* mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_instrument, ret_internal):
10209	Add support.
10210	(call_mcount): Share PIC setups with call_instrument.
10211	* mpn/x86/*.asm: Use ret_internal.
10212	* mpn/asm-defs.m4 (m4_unquote): New macro.
10213	* tests/mpn/t-instrument.c: New file.
10214	* tests/mpn/Makefile.am: Add it.
10215
10216	* mpn/alpha/umul.asm: Add ASM_END.
10217
102182002-08-12  Kevin Ryde  <kevin@swox.se>
10219
10220	* mpz/pprime_p.c: Fake up a local mpz_t to take abs(n), rather than
10221	using mpz_init etc.
10222
10223	* mpz/millerrabin.c: Use mpz_urandomm for uniform selection of x,
10224	reported by Jason Moxham.  Exclude x==n-1, ie. -1 mod n.  Use
10225	gmp_randinit_default.
10226
10227	* mpn/alpha/umul.asm: Use "r" registers, for the benefit of Unicos.
10228
10229	* tests/devel/try.c: Add mpn_copyi and mpn_copyd.
10230
102312002-08-09  Kevin Ryde  <kevin@swox.se>
10232
10233	* Makefile.am: Remove configure.lineno from DISTCLEANFILES and gmp.tmp
10234	from MOSTLYCLEANFILES, automake does these itself now.
10235
10236	* */Makefile.in, aclocal.m4, configure, install-sh, missing,
10237	mkinstalldirs: Update to automake 1.6.3.
10238
10239	* mpn/ia64/README: Some notes on assembler syntax.
10240
10241	* mpn/ia64/add_n.asm, mpn/ia64/sub_n.asm: Add .body.
10242	* mpn/ia64/add_n.asm, mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm,
10243	mpn/ia64/sub_n.asm: Position .save ar.lc just before relevant
10244	instruction.
10245	* mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm: Add .save ar.pfs and pr.
10246	* mpn/ia64/copyd.asm, mpn/ia64/copyi.asm: Correction to .body position.
10247	* mpn/ia64/lorrshift.asm: Add .prologue stuff.
10248
10249	* configure.in (*-*-unicos*): Remove forcible --disable-shared,
10250	libtool gets this right itself now.
10251
102522002-08-07  Kevin Ryde  <kevin@swox.se>
10253
10254	* mpn/x86/pentium/mmx/hamdist.asm: New file, adapted from
10255	mpn/x86/pentium/mmx/popham.asm.
10256	* mpn/x86/pentium/mmx/popham.asm: Remove file, not faster than plain
10257	mpn/x86/pentium/popcount.asm for the popcount.
10258
10259	* mpn/alpha/umul.asm: Use PROLOGUE/EPILOGUE, rename it mpn_umul_ppmm.
10260	* configure.in (alpha*-*-*): Add umul to extra_functions.
10261
10262	* mpz/remove.c: Make src==0 return 0, not do DIVIDE_BY_ZERO.
10263
102642002-08-05  Torbjorn Granlund  <tege@swox.com>
10265
10266	* acconfig.h: Remove spurious undefs for mpn_divrem_newton and
10267	mpn_divrem_classic.
10268
102692002-08-05  Kevin Ryde  <kevin@swox.se>
10270
10271	* tests/refmpn.c, tests/tests.h, tests/misc/t-printf.c,
10272	tests/mpf/t-trunc.c, tests/mpn/t-mp_bases.c, tests/mpn/t-scan.c,
10273	tests/mpq/t-cmp_ui.c, tests/mpz/bit.c, tests/mpz/t-aorsmul.c,
10274	tests/mpz/t-powm_ui.c tests/mpz/t-root.c, tests/mpz/t-scan.c: More
10275	care with long and mp_size_t parameters, for the benefit of K&R.
10276
10277	* demos/perl/GMP.pm, demos/perl/GMP.xs, demos/perl/GMP/Mpz.pm,
10278	demos/perl/test.pl: Add mpz_import and mpz_export.
10279	* demos/perl/GMP.pm: Remove "preliminary" warning.
10280
10281	* mpn/lisp/gmpasm-mode.el: Set add-log-current-defun-header-regexp to
10282	pick up m4 defines etc.
10283
10284	* Makefile.am (libgmpxx_la_DEPENDENCIES): libgmp.la should be here,
10285	not libgmpxx_la_LIBADD, for the benefit of "make -j2".
10286
10287	* mpn/ia64/*.asm [hpux ABI=32]: Extend 32-bit operands to 64-bits, not
10288	optimal and might not be sufficient, but seems to work.
10289
102902002-08-03  Kevin Ryde  <kevin@swox.se>
10291
10292	* gmp.texi (Profiling): Use a table and expand for clarity.
10293	(Integer Special Functions): New section for mpz_array_init,
10294	_mpz_realloc, mpz_getlimbn and mpz_size, to discourage their use.
10295
10296	* configure.in (*-*-msdosdjgpp*): Remove forcible --disable-shared,
10297	libtool gets this right itself now.
10298
102992002-07-30  Kevin Ryde  <kevin@swox.se>
10300
10301	* mpn/powerpc32/lshift.asm, mpn/powerpc32/rshift.asm: Lose final mr,
10302	and make final stwu into an stw.
10303
10304	* gmp.texi (Known Build Problems): An easier workaround for DESTDIR,
10305	using LD_LIBRARY_PATH.
10306	(C++ Interface MPFR): Remove mpfrxx.h.
10307
10308	* mpfrxx.h: Remove file.
10309	* Makefile.am: Remove mpfrxx.h.
10310	* tests/cxx/Makefile.am: Add Gerardo's new test programs.
10311
103122002-07-30  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10313
10314	* gmpxx.h: Use mpz_addmul etc for ternary a+b*c etc.  Reorganise some
10315	macros for maintainability.  Merge mpfrxx.h.
10316	* tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: Various updates.
10317	* tests/cxx/t-assign.cc, tests/cxx/t-binary.cc,
10318	tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: New files.
10319
103202002-07-27  Kevin Ryde  <kevin@swox.se>
10321
10322	* longlong.h (count_trailing_zeros) [ia64 __GNUC__]: Don't use
10323	__builtin_ffs for now, doesn't seem to work.
10324
10325	* configure.in: Establish CONFIG_SHELL to avoid a problem with
10326	AC_LIBTOOL_SYS_MAX_CMD_LEN on ia64-*-hpux*.
10327
10328	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_FINDA): Don't let calls to
10329	mpn_gcd_finda go dead.
10330
10331	* mpn/generic/tdiv_qr.c: Inline mpn_rshift and MPN_COPY of 2 limbs.
10332
103332002-07-24  Kevin Ryde  <kevin@swox.se>
10334
10335	* demos/primes.c: Use __GMP_PROTO and don't use signed, for the
10336	benefit of K&R.
10337
10338	* demos/calc/calclex.l: Add <string.h> for strcmp.
10339
10340	* mpn/ia64/invert_limb.asm: Use .rodata which works on ia64-*-hpux*
10341	and should be standard, rather than worrying about RODATA.
10342
10343	* gmp.texi (Function Classes): Add cross references.
10344	(Integer Import and Export): Fix return value grouping.
10345
10346	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add // for
10347	ia64.  Add notes on what the various styles are for.
10348
10349	* mpn/ia64/default.m4 (ASM_START): Define to empty, not dnl, so as not
10350	to kill text on the same line.
10351	(EPILOGUE_cpu): Force a newline after "#", so as not to suppress macro
10352	expansion in the rest of the EPILOGUE line.
10353
103542002-07-21  Kevin Ryde  <kevin@swox.se>
10355
10356	* tune/speed.h: Fix some missing _PROTOs.
10357
10358	* Makefile.am (DISTCLEANFILES): Add configure.lineno.
10359
10360	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Define
10361	HAVE_DOUBLE_IEEE_BIG_ENDIAN and HAVE_DOUBLE_IEEE_LITTLE_ENDIAN in
10362	config.m4 too.
10363	* mpn/ia64/invert_limb.asm: Add big-endian data.
10364
10365	* tests/mpz/t-jac.c (try_si_zi): Correction to "a" parameter type.
10366
103672002-07-20  Kevin Ryde  <kevin@swox.se>
10368
10369	* mpz/bin_ui.c, mpz/jacobi.c, mpz/pprime_p.c, mpn/generic/divis.c:
10370	More care with long and mp_size_t parameters, for the benefit of K&R.
10371
10372	* gmp-impl.h (invert_limb): Use parens around macro arguments.
10373	(mpn_invert_limb): Give prototype and define unconditionally.
10374
10375	* gmp-impl.h (CACHED_ABOVE_THRESHOLD, CACHED_BELOW_THRESHOLD): New
10376	macros.
10377	* mpn/generic/sb_divrem_mn.c: Use them to help gcc let preinv code go
10378	dead when not wanted.
10379
103802002-07-17  Kevin Ryde  <kevin@swox.se>
10381
10382	* tests/refmpz.c (refmpz_hamdist): Ensure mp_size_t parameters are
10383	that type, for the benefit of hpux ia64 bundled cc ABI=64.
10384
10385	* configure.in (ia64*-*-hpux*): Need +DD64 in cc_64_cppflags to get
10386	the right headers for ansi2knr.
10387
10388	* acinclude.m4 (GMP_TRY_ASSEMBLE, GMP_ASM_UNDERSCORE): Use $CPPFLAGS
10389	with $CCAS and when linking, as done by the makefiles.
10390	(GMP_ASM_X86_MMX, GMP_ASM_X86_SSE2): Show $CPPFLAGS in diagnostics.
10391
10392	* gmp-impl.h (ieee_double_extract): Setup using HAVE_DOUBLE_IEEE_*.
10393	(GMP_UINT32): New define, 32 bit type for ieee_double_extract.
10394	* configure.in: Add AC_CHECK_SIZEOF unsigned.
10395	* configure.in, acinclude.m4 (GMP_IMPL_H_IEEE_FLOATS): Remove.
10396	(GMP_C_DOUBLE_FORMAT): Instead warn about unknown float here.
10397
10398	* configure.in, acinclude.m4 (GMP_C_SIZES): Remove.
10399	* acinclude.m4 (GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB): Remove this
10400	scheme, not required.
10401	* configure.in (unsigned long, mp_limb_t): Run AC_CHECK_SIZEOF for
10402	these unconditionally, check mp_limb_t against gmp-mparam.h values.
10403	* gmp-impl.h (BYTES_PER_MP_LIMB, BITS_PER_MP_LIMB): Define based on
10404	SIZEOF_MP_LIMB_T if not provided by gmp-mparam.h.
10405	(BITS_PER_ULONG): Define here now.
10406
10407	* gmp.texi (ABI and ISA): Add HP-UX IA-64 choices.
10408	(Random State Initialization): Typo in m2exp described for
10409	gmp_randinit_lc_2exp_size.
10410	(Formatted Output Functions): Clarify gmp_obstack_printf a bit.
10411	(Formatted Input Strings): Typo in %n summary.
10412
10413	* mpz/inp_raw.c (NTOH_LIMB_FETCH): Use simple generic default, since
10414	endianness detection is now cross-compile friendly.
10415	* mpz/out_raw.c (HTON_LIMB_STORE): Ditto.
10416
10417	* mpz/fib_ui.c: Nailify.
10418	* mpz/random.c: Nailify.
10419
10420	* mpfr/acinclude.m4 (MPFR_CONFIGS): Patch by Vincent for an apparent
10421	float rounding gremlin on powerpc.
10422
104232002-07-15  Kevin Ryde  <kevin@swox.se>
10424
10425	* Makefile.am (PRINTF_OBJECTS): Avoid ending in a backslash, hpux ia64
10426	make doesn't like that.
10427
10428	* mpn/ia64/*.asm: Add .sptk to unconditional branches, add ";" after
10429	.mib etc, for the benefit of hpux.
10430
10431	* configure.in (ia64*-*-*): Use ABI=64 on non-HPUX systems, for
10432	consistency.
10433
10434	* gmp-impl.h (ieee_double_extract): Test __sparc__, used by gcc 3.1.
10435	Reported by nix@esperi.demon.co.uk.
10436	* mpfr/mpfr-math.h (_MPFR_NAN_BYTES etc): Ditto.
10437
104382002-07-13  Kevin Ryde  <kevin@swox.se>
10439
10440	* mpn/powerpc32/rshift.asm: Rewrite, transformed from lshift.asm.
10441
10442	* tune/tuneup.c (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD):
10443	Always zero for native mpn_divexact_1, mpn_modexact_1_odd.
10444
10445	* gmp-h.in (__GMP_EXTERN_INLINE): Don't use this during configure,
10446	ie. __GMP_WITHIN_CONFIGURE, to avoid needing dependent routines.
10447	* acinclude.m4 (GMP_H_EXTERN_INLINE): Consequent changes.
10448
10449	* gmp-impl.h, mpn/asm-defs.m4 (mpn_addmul_2, mpn_addmul_3,
10450	mpn_addmul_4): Add prototypes and defines.
10451
10452	* gmp.texi (Number Theoretic Functions): Clarify return value.
10453	Reported by Peter Keller.
10454
104552002-07-10  Kevin Ryde  <kevin@swox.se>
10456
10457	* configure.in, acinclude.m4 (GMP_PROG_LEX): Remove this in favour of
10458	AM_PROG_LEX, now ok when lex is missing.
10459
10460	* longlong.h (count_leading_zeros) [pentiummmx]: Don't use __clz_tab
10461	variant under LONGLONG_STANDALONE.
10462	(count_trailing_zeros) [ia64 __GNUC__]: Use __builtin_ffs.
10463
10464	* gmp-impl.h (popc_limb): Add an ia64 asm version.
10465	(DItype): Use HAVE_LONG_LONG to choose long long, avoiding _LONGLONG
10466	which is in gcc but means something unrelated in MS Visual C 7.0.
10467	Reported by David Librik.
10468
10469	* mpz/divexact.c: Add an ASSERT that den divides num.
10470
10471	* mpn/asm-defs.m4 (LDEF): New macro.
10472	(INT32, INT64): Use it.
10473	* mpn/pa32/*.asm: Use it.
10474	* mpn/pa32/README: Update notes on labels.
10475
10476	* tests/refmpn.c, tests/tests.h, tests/t-bswap.c (ref_bswap_limb):
10477	Renamed from refmpn_bswap_limb.
10478	* tests/t-bswap.c: Add tests_start/tests_end for randomization.
10479
10480	* tests/refmpn.c, tests/tests.h (ref_popc_limb): New function.
10481	* tests/t-popc.c: New file.
10482	* tests/Makefile.am: Add it.
10483
10484	* mpn/ia64/invert_limb.asm: Use RODATA since ".section .rodata" is not
10485	accepted by ia64-*-hpux*.
10486
10487	* acinclude.m4 (GMP_ASM_BYTE): New macro.
10488	(GMP_ASM_ALIGN_LOG, GMP_ASM_W32): Use it.
10489	(GMP_ASM_LABEL_SUFFIX): Use test compiles, not $host.
10490	(GMP_ASM_GLOBL): Ditto, and add .global for ia64-*-hpux*.
10491	(GMP_ASM_GLOBL_ATTR): Use GMP_ASM_GLOBL result, not $host.
10492	(GMP_ASM_LSYM_PREFIX): Allow any "a-z" nm symbol code, add ".text" to
10493	test program, required by ia64-*-hpux*.
10494	(GMP_ASM_LABEL_SUFFIX): Make LABEL_SUFFIX just the value, not a "$1:",
10495	the former being how it's currently being used in fact.
10496
10497	* configure.in, acinclude.m4 (GMP_PROG_CC_WORKS_LONGLONG): New macro.
10498	* configure.in (ia64-*-hpux*): Add 32 and 64 bit ABI modes.
10499
105002002-07-06  Kevin Ryde  <kevin@swox.se>
10501
10502	* tests/cxx/t-allfuns.cc: New file.
10503	* tests/cxx/Makefile.am: Add it.
10504
10505	* mpz/clrbit.c, mpz/setbit.c: Only MPN_NORMALIZE if high limb changes
10506	to zero.  Use _mpz_realloc return value.
10507
10508	* gmp.texi (Build Options, C++ Formatted Output, C++ Formatted Input):
10509	Cross reference to Headers and Libraries for libgmpxx stuff.
10510	(Low-level Functions): mpn_divexact_by3 result based on GMP_NUMB_BITS.
10511	mpn_set_str takes "unsigned char *", reported by Mark Sofroniou.
10512	(C++ Interface General): Describe linking with libgmpxx and libgmp.
10513
105142002-07-01  Kevin Ryde  <kevin@swox.se>
10515
10516	* tune/tuneup.c, gmp-impl.h: Eliminate the array of thresholds in
10517	one(), tune just one at a time and let the callers hand dependencies.
10518	Eliminate the second_start_min hack, handle SQR_KARATSUBA_THRESHOLD
10519	oddities in tune_sqr() instead.
10520
10521	* mpn/pa64/umul.asm, mpn/pa64/udiv.asm, mpn/asm-defs.m4, acconfig.h,
10522	longlong.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
10523	tests/devel/try.c: Introduce mpn_umul_ppmm_r and mpn_udiv_qrnnd_r
10524	rather than having variant parameter order for mpn_umul_ppmm and
10525	mpn_udiv_qrnnd on pa64.
10526
10527	* gmp-h.in (mpz_export): Remove a spurious parameter name.
10528	* gmp-impl.h (mpn_rootrem): Use __MPN.
10529
105302002-06-29  Kevin Ryde  <kevin@swox.se>
10531
10532	* longlong.h (udiv_qrnnd) [hppa32]: Remove mpn_udiv_qrnnd version, the
10533	general mechanism for that suffices.
10534
10535	* mpf/inp_str.c: Fix returned count of chars read, reported by Paul
10536	Zimmermann.  Also fix a memory leak for invalid input.
10537	* tests/mpf/t-inp_str.c: New file.
10538	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
10539
10540	* tests/devel/try.c (mpn_mod_34lsub1): Only exists for
10541	GMP_NUMB_BITS%4==0.
10542	(SIZE2_FIRST): Respect option_firstsize2 for "fraction" case.
10543
10544	* mpn/generic/diveby3.c: Further nailifications.
10545	* gmp-impl.h (MODLIMB_INVERSE_3): Allow for GMP_NUMB_BITS odd.
10546	(GMP_NUMB_CEIL_MAX_DIV3, GMP_NUMB_CEIL_2MAX_DIV3): New constants.
10547	* tests/t-constants.c: Check them.
10548
10549	* gmp-h.in (__GMP_CRAY_Pragma): New macro.
10550	(__GMPN_COPY_REST): Use it.
10551	* gmp-impl.h (CRAY_Pragma): Use it.
10552
105532002-06-25  Kevin Ryde  <kevin@swox.se>
10554
10555	* mpz/import.c, mpz/export.c: Cast data pointer through "char *" in
10556	alignment tests, for the benefit of Cray vector systems.
10557
10558	* configure.in (x86-*-*): Remove -march=pentiumpro check, seems ok
10559	with current code.
10560	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO, GMP_GCC_VERSION_GE): Remove
10561	macros, no longer needed
10562
10563	* acinclude.m4 (GMP_ASM_RODATA): Remove temporary files.
10564
10565	* configure.in (GMP_ASM_GLOBL_ATTR): Reposition to avoid duplication
10566	through AC_REQUIRE.
10567
105682002-06-23  Kevin Ryde  <kevin@swox.se>
10569
10570	* tests/mpz/t-fib_ui.c (check_fib_table): Check table values, not just
10571	that they're non-zero.
10572
10573	* acinclude.m4 (GMP_GCC_ARM_UMODSI): Match bad "gcc --version" output
10574	exactly, rather than parsing it with GMP_GCC_VERSION_GE.
10575	(GMP_ASM_UNDERSCORE): Use GLOBL_ATTR.
10576
10577	* mpn/pa32/udiv.asm, mpn/pa32/hppa1_1/udiv.asm, mpn/pa64/udiv.asm:
10578	Renamed from udiv_qrnnd.asm, for consistency with other udiv's.
10579	* mpn/pa64/umul.asm: Renamed from umul_ppmm.asm likewise.
10580	* configure.in (hppa*-*-*): Update extra_functions.
10581	(NAILS_SUPPORT): Remove umul_ppmm, udiv_qrnnd, udiv_fp, udiv_nfp from
10582	nails-neutral list, no longer needed.
10583
10584	* gmp-h.in (__DECC): Add notes on testing this for ANSI-ness.
10585	(__GMP_EXTERN_INLINE): Add static __inline for DEC C.
10586	(mpz_mod_ui): Move up to main section, it's still documented.
10587
105882002-06-22  Kevin Ryde  <kevin@swox.se>
10589
10590	* mpz/jacobi.c, mpz/kronsz.c, mpz/kronuz.c, mpz/kronzs.c,
10591	mpz/kronzu.c: Allow for odd GMP_NUMB_BITS, tweak a few variable setups.
10592	* gmp-impl.h (JACOBI_STRIP_LOW_ZEROS): New macro.
10593
10594	* mpn/generic/mod_34lsub1.c: Nailify.
10595	* tests/devel/try.c (CNST_34LSUB1): Nailify.
10596	* gmp-impl.h (ADDC_LIMB): New macro.
10597
10598	* gmpxx.h (mpf_class::get_str): Make exponent mp_exp_t&, default
10599	base=10 and ndigits=0.
10600	(mpz_class::set_str, mpq_class::set_str, mpf_class::set_str): Add
10601	versions accepting "const char *".
10602	* mpfrxx.h (mpfr_class::get_str, mpfr_class::set_str): Ditto, and
10603	uncommenting set_str and operator=.
10604	* gmp.texi (C++ Interface Integers, C++ Interface Rationals)
10605	(C++ Interface Floats): Update.
10606
10607	* gmp-impl.h (modlimb_invert): Merge the <=64bits and general versions.
10608	(const, signed): Move to near top of file, fixes --enable-alloca=debug
10609	on K&R.
10610
10611	* gen-fib.c: New file, derived from mainline in mpn/generic/fib2_ui.c.
10612	* dumbmp.c (mpz_init_set_ui): New function.
10613	* Makefile.am, mpn/Makefile.am: Generate fib_table.h, mpn/fib_table.c.
10614	* gmp-impl.h: Use fib_table.h, add __GMP_DECLSPEC to __gmp_fib_table
10615	(for the benefit of tests/mpz/t-fib_ui.c).
10616	* mpn/generic/fib2_ui.c: Remove __gmp_fib_table and generating code.
10617
10618	* Makefile.am: Add mp.h to BUILT_SOURCES, distclean all BUILT_SOURCES,
10619	use += more.
10620
10621	* acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_BRANCHES):
10622	Don't let "unknown" get into the cache variables.
10623	(GMP_ASM_TEXT): See what assembles, don't hard-code hpux and aix.
10624	(GMP_PROG_EXEEXT_FOR_BUILD): Add ,ff8 for RISC OS, per autoconf cvs.
10625	(GMP_PROG_CPP_FOR_BUILD): Restructure per AC_PROG_CPP, print correct
10626	result if CPP_FOR_BUILD overrides the cache variable.
10627	(GMP_PROG_CC_FOR_BUILD_WORKS): New macro split from
10628	GMP_PROG_CC_FOR_BUILD.  Allow for "conftest" default compiler output.
10629	* configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Reinstate this,
10630	separating HOST_CC establishment from GMP_PROG_CC_FOR_BUILD.
10631
10632	* configure.in (mpn_objs_in_libgmp): Move mpn/mp_bases.lo ...
10633	* Makefile.am (MPN_OBJECTS): ... to here, add $U, and arrange
10634	MPN_OBJECTS to be common between libgmp and libmp.
10635
106362002-06-20  Torbjorn Granlund  <tege@swox.com>
10637
10638	* mpn/generic/mul_n.c (TOOM3_MUL_REC, TOOM3_SQR_REC): Don't check if
10639	basecase is to be invoked when *_TOOM3_THRESHOLD is more than 3 times
10640	the corresponding *_THRESHOLD.
10641
106422002-06-20  Kevin Ryde  <kevin@swox.se>
10643
10644	* mpn/ia64/submul_1.c: Add missing TMP_DECL, TMP_MARK, TMP_FREE.
10645	Reported by Paul Zimmermann.
10646
10647	* configure.in, acinclude.m4 (AC_DEFINE): Make templates read "Define
10648	to 1", for clarity as per autoconf.
10649	* acinclude.m4 (GMP_OPTION_ALLOCA): Group WANT_TMP templates.
10650
106512002-06-20  Gerardo Ballabio <gerardo.ballabio@unimib.it>
10652
10653	* gmpxx.h, mpfrxx.h: Remove mpz_classref, let mpq_class::get_num and
10654	mpq_class::get_den return mpz_class& as per the documentation.
10655	Reported by Roberto Bagnara.
10656
106572002-06-18  Kevin Ryde  <kevin@swox.se>
10658
10659	* tests/rand/t-lc2exp.c: New file.
10660	* tests/rand/Makefile.am: Add it, and use tests/libtests.la.
10661
10662	* randraw.c (lc): Pad seed==0 case with zero limbs, return same
10663	(m2exp+1)/2 bits as normal, right shift "c" result as normal.
10664
10665	* configure.in: Don't bother with line numbers in some diagnostics.
10666	(*-*-mingw*): Use -mno-cygwin if it works, suggested by delta trinity.
10667
10668	* tests/mpz/Makefile.am, tests/mpq/Makefile.am,
10669	tests/misc/Makefile.am, (CLEANFILES): Set to *.tmp for test program
10670	temporaries, to get t-scanf.tmp and reduce future maintenance.
10671
106722002-06-16  Torbjorn Granlund  <tege@swox.com>
10673
10674	* mpn/generic/get_str.c (mpn_dc_get_str): Pass scratch memory area in
10675	new `tmp' parameter.  Trim allocation needs by reusing input parameter.
10676
106772002-06-15  Torbjorn Granlund  <tege@swox.com>
10678
10679	* mpn/sparc32/v9/udiv.asm: New file.
10680
106812002-06-15  Kevin Ryde  <kevin@swox.se>
10682
10683	* acinclude.m4 (GMP_GCC_VERSION_GE): Correction to recognising mingw
10684	gcc 3.1 version number.  Reported by Jim Fougeron.
10685
10686	* configure.in (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): New define, to make
10687	AC_LIBTOOL_WIN32_DLL work with autoconf 2.53.
10688
10689	* acinclude.m4 (GMP_C_SIZES): Establish BITS_PER_MP_LIMB as a value,
10690	not an expression, for the benefit of the gen-bases invocation.
10691
10692	* config.guess (CC_FOR_BUILD): Try c99, same as configfsf.guess.
10693
106942002-06-15  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
10695
10696	* mpfr/set_q.c: Allow for 1 bit numerator or denominator.
10697
106982002-06-14  Kevin Ryde  <kevin@swox.se>
10699
10700	* configure.in (AC_C_BIGENDIAN): Use new style action parameters.
10701
10702	* randlc2x.c: Allow for a<0, allow for c>=2^m2exp.
10703	* randraw.c (lc): Allow for a==0.
10704
10705	* mpn/sparc32/udiv.asm: Renamed from udiv_fp.asm.  Don't know if float
10706	is the best way for v7, but it's what configure has chosen since gmp 3.
10707	* configure.in (*sparc*-*-* ABI=32): extra_functions="udiv" for all,
10708	in particular sparc32/v8/udiv.asm is faster (on ultrasparc2) than
10709	udiv_fp previously used for v9 chips.
10710
10711	* gen-bases.c: New file, derived from mpn/mp_bases.c.
10712	* dumbmp.c: New file, mostly by Torbjorn, some by me.
10713	* configure.in, acinclude.m4 (GMP_PROG_CC_FOR_BUILD,
10714	GMP_PROG_CPP_FOR_BUILD, GMP_PROG_EXEEXT_FOR_BUILD,
10715	GMP_C_FOR_BUILD_ANSI, GMP_CHECK_LIBM_FOR_BUILD): New macros.
10716	(GMP_PROG_HOST_CC): Remove, superceded by GMP_PROG_CC_FOR_BUILD.
10717	* Makefile.am: Run gen-bases to create mp_bases.h and mpn/mp_bases.c.
10718	* gmp-impl.h: Use mp_bases.h.
10719	* mpn/mp_bases.c: Remove file.
10720	* mpn/Makefile.am: mp_bases.c now in nodist_libmpn_la_SOURCES.
10721
10722	* tests/mpz/t-cmp_d.c (check_one_2exp): Use volatile to force to
10723	double, fixes gcc 3.1 with -O4.  Reported by Michael Lee.
10724	* configure.in (AC_C_VOLATILE): New macro.
10725
10726	* tests/misc/t-scanf.c: (fromstring_gmp_fscanf): Add missing va_end.
10727	Don't mix varargs and fixed args functions, not good on x86_64.
10728	Reported by Marcus Meissner.
10729
10730	* Makefile.am (EXTRA_DIST): Remove mpfr/README, now in mpfr/Makefile.in
10731
10732	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.53.
10733	* */Makefile.in, install-sh, mdate-sh, missing, aclocal.m4, configure:
10734	Update to automake 1.6.1.
10735	* configfsf.guess, configfsf.sub: Update to 2002-05-29.
10736
107372002-06-12  Kevin Ryde  <kevin@swox.se>
10738
10739	* acinclude.m4 (GMP_GCC_VERSION_GE): Recognise mingw gcc 3.1 version.
10740	(GMP_PROG_CC_WORKS): Allow for a_out.exe, as per autoconf.
10741	(GMP_GCC_NO_CPP_PRECOMP, GMP_ASM_UNDERSCORE): Ditto, plus a.exe.
10742
107432002-06-09  Torbjorn Granlund  <tege@swox.com>
10744
10745	* randraw.c (lc): Remove broken ASSERT_ALWAYS.
10746
10747	* mpn/x86: Update gmp-mparam.h files with current measures *_THRESHOLD
10748	values.
10749	* mpn/x86/p6/mmx/gmp-mparam.h: New file.
10750
107512002-06-09  Kevin Ryde  <kevin@swox.se>
10752
10753	* mpn/x86/*/gmp-mparam.h (USE_PREINV_DIVREM_1): Add tuned settings.
10754
10755	* acconfig.h (HAVE_NATIVE_mpn_preinv_divrem_1): New template.
10756
10757	* tests/refmpn.c, tests/tests.h (refmpn_chars_per_limb,
10758	refmpn_big_base): New functions.
10759	* tests/mpn/t-mp_bases.c: Use them, and don't test big_base_inverted
10760	unless it's being used.
10761
10762	* gmp.texi (Notes for Particular Systems): Using Microsoft C with DLLs.
10763	(Known Build Problems): Notes on MacOS and GCC.
10764	(Integer Logic and Bit Fiddling): Use ULONG_MAX for maximum ulong.
10765	(Low-level Functions): mpn_get_str accepts base==256.
10766	(Formatted Output Functions): Note output is not atomic.
10767	(Internals): Note mp_size_t for limb counts.
10768
10769	* mp-h.in, gmp-h.in (mp_ptr, mp_srcptr, mp_size_t, mp_exp_t): Remove
10770	these types from mp.h, not needed.
10771
10772	* mpfr/tests/tadd.c, mpfr/tests/tmul.c (check): Apply a hack to the
10773	parameter order to make sparc gcc 2.95.2 happy.
10774
10775	* doc/configuration: Notes on bootstrapping.
10776
107772002-06-08  Kevin Ryde  <kevin@swox.se>
10778
10779	* mpfr/tests/tsqrt.c, mpfr/tests/tsqrt_ui.c: Suppress tests if sqrt is
10780	not affected by mpfr_set_machine_rnd_mode.
10781
10782	* mpfr/mul_2si.c: Workaround a mips gcc 2.95.3 bug under -O2 -mabi=n32.
10783
10784	* configure.in (alphev56): Fix to use ev5 path.
10785
107862002-06-06  Kevin Ryde  <kevin@swox.se>
10787
10788	* gmp-h.in: Use __gmp_const not const, in a number of places.
10789
10790	* configure.in (sparc): Use ABI=32 instead of ABI=standard on v7 and
10791	v8, for consistency with v9 choices.
10792	(sparc64): Restrict GMP_ASM_SPARC_REGISTER to ABI=64.
10793	(x86): Move MMX $path munging to before printout.
10794	(CCAS): Move upward to support this.
10795
10796	* gmp-impl.h (modlimb_invert): Merge macros for specific limb sizes,
10797	add a version for arbitrary limb size, use GMP_NUMB_BITS.
10798	(modlimb_invert, MODLIMB_INVERSE_3): Fix comments to say GMP_NUMB_BITS.
10799
10800	* gmp-h.in (__GMP_LIKELY, __GMP_UNLIKELY): New macros.
10801	(mpz_getlimbn, mpz_perfect_square_p, mpz_popcount): Use them, make the
10802	fetch or mpn call likely, unconditionally calculate the alternative so
10803	as to avoid an "else" clause.
10804	* gmp-impl.h (LIKELY, UNLIKELY): Aliases.
10805
10806	* configure.in, mpfr/tests/Makefile.am: Add $LIBM to $LIBS for
10807	MPFR_CONFIGS so it detects fesetround, and let it go through to
10808	$MPFR_LIBS.
10809	* mpfr/rnd_mode.c: Use gmp-impl.h to get MPFR_HAVE_FESETROUND.
10810
10811	* tests/mpz/t-sizeinbase.c: Disable fake bits test, such pointer
10812	setups are bogus and have been seen failing on hppa.
10813
10814	* tests/misc.c, tests/refmpz.c, tests.tests.h, tests/mpz/t-cong.c:
10815	Rename mpz_flipbit to refmpz_combit and move from misc.c to refmpz.c.
10816
108172002-06-05  Torbjorn Granlund  <tege@swox.com>
10818
10819	* tests/mpz/t-powm_ui.c Print proper routine name in error message.
10820
108212002-06-03  Kevin Ryde  <kevin@swox.se>
10822
10823	* tune/time.c, tune/freq.c, tune/speed.h: Add powerpc mftb support.
10824	(FREQ_MEASURE_ONE): Move to speed.h, fix tv_sec factor.
10825	(freq_measure): Use for mftb measuring too.
10826	* tune/powerpc.asm, tune/powerpc64.asm: New files.
10827	* configure.in, tune/Makefile.am: Add them.
10828
10829	* gmp-impl.h (popc_limb): Add versions for Cray and fallback for
10830	arbitrary limb size.
10831
10832	* mpn/sparc32/sparc-defs.m4: New file.
10833	* configure.in (sparc*-*-*): Use it.
10834	* acinclude.m4 (GMP_ASM_SPARC_REGISTER): New macro.
10835	* configure.in (sparc64): Use it.  Also, use -Wc,-m64 for linking.
10836	* mpn/sparc64/add_n.asm, mpn/sparc64/addmul_1.asm,
10837	mpn/sparc64/copyd.asm, mpn/sparc64/copyi.asm, mpn/sparc64/lshift.asm,
10838	mpn/sparc64/mul_1.asm, mpn/sparc64/rshift.asm,
10839	mpn/sparc64/sqr_diagonal.asm, mpn/sparc64/sub_n.asm,
10840	mpn/sparc64/submul_1.asm: Use REGISTER for .register.
10841
108422002-06-01  Kevin Ryde  <kevin@swox.se>
10843
10844	* mpz/powm_ui.c: Fix for result range in certain circumstances.
10845
10846	* mpn/x86/k6/diveby3.asm: Speedup to 10 c/l, same as divexact_1.
10847	Anomaly pointed out by Alexander Kruppa.
10848
108492002-05-31  Torbjorn Granlund  <tege@swox.com>
10850
10851	* mpz/export.c: Cast pointer via `unsigned long' when checking
10852	alignment to avoid compiler warnings.
10853
108542002-05-29  Kevin Ryde  <kevin@swox.se>
10855
10856	* gmp-impl.h (BSWAP_LIMB): Versions for m68k, powerpc, and arbitrary
10857	limb size.
10858	* configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_m68k): New define.
10859
108602002-05-27  Torbjorn Granlund  <tege@swox.com>
10861
10862	* mpn/generic/mul_basecase.c: Improve MAX_LEFT handling, returning
10863	when possible.  Add code for mpn_addmul_5 and mpn_addmul_6.
10864
108652002-05-25  Kevin Ryde  <kevin@swox.se>
10866
10867	* tune/tuneup.c: Misc nailifications, and disable preinv thresholds
10868	with nails.
10869	* tune/speed.h: Use GMP_NUMB_HIGHBIT with mpn_sb_divrem_mn and
10870	mpn_divrem_2.
10871	* mpz/powm.c (redc): Nailify q.
10872
10873	* tests/mpn/t-scan.c: Reduce the amount of testing, to go faster.
10874
108752002-05-23  Torbjorn Granlund  <tege@swox.com>
10876
10877	* Version 4.1 released.
10878
10879	* mpn/alpha/ev6/nails/gmp-mparam.h: New file.
10880
10881	* tests/devel/add_n.c (refmpn_add_n): Nailify.
10882	* tests/devel/sub_n.c (refmpn_sub_n): Nailify.
10883	* tests/devel/addmul_1.c (refmpn_addmul_1): Nailify.
10884	* tests/devel/submul_1.c (refmpn_submul_1): Nailify.
10885
10886	* mpn/alpha/ev6/nails/add_n.asm: New file.
10887	* mpn/alpha/ev6/nails/sub_n.asm: New file.
10888	* mpn/alpha/ev6/nails/mul_1.asm: New file.
10889	* mpn/alpha/ev6/nails/submul_1.asm: New file.
10890
108912002-05-22  Torbjorn Granlund  <tege@swox.com>
10892
10893	* mpn/alpha/ev6/nails/addmul_1.asm: New file.
10894
10895	* mpz/inp_str.c (mpz_inp_str_nowhite): Nailify.
10896
10897	* mpn/generic/mul_basecase.c: Update pointers before conditional
10898	MAX_LEFT break statements.
10899
109002002-05-21  Torbjorn Granlund  <tege@swox.com>
10901
10902	* tests/mpz/t-gcd.c: Test mpz_gcd_ui.
10903
10904	* mpz/lcm_ui.c: Nailify.
10905
10906	* mpz/gcd_ui.c: Nailify.  Make it work as documented, allowing
10907	NULL to be passed for result parameter.  Fix gcd(0,0) case.
10908
10909	* mpz/set_str.c: Nailify.
10910
10911	* randlc2x.c (gmp_randinit_lc_2exp): Nailify.
10912
10913	From Jakub Jelinek:
10914	* longlong.h (add_ssaaaa,sub_ddmmss) [64-bit sparc]:
10915	Make it actually work.
10916
109172002-05-18  Torbjorn Granlund  <tege@swox.com>
10918
10919	* mpf/ui_div.c: Shut up compiler warning.
10920
10921	* mpn/generic/mul_basecase.c: Use mpn_addmul_2, mpn_addmul_3, and
10922	mpn_addmul_4, as available.
10923
10924	* mpn/alpha/ev6/nails/addmul_2.asm: Adjust NAILS_SUPPORT decls.
10925	* mpn/alpha/ev6/nails/addmul_3.asm: Likewise
10926	* mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
10927
10928	* configure.in (*-cray-unicos*): Back again to -hscalar0.
10929	(gmp_mpn_functions_optional): Add mul_3, mul_4, addmul_2, addmul_3,
10930	and addmul_4.
10931	* acconfig.h: Add #undefs for new optional mpn functions.
10932
109332002-05-18  Kevin Ryde  <kevin@swox.se>
10934
10935	* gmp.texi (Integer Import and Export): Mention Cray unfilled words.
10936
10937	* mpz/set_d.c, mpq/set_d.c: Use LIMBS_PER_DOUBLE for the output of
10938	__gmp_extract_double.  Reported by Henrik Johansson.
10939
109402002-05-17  Torbjorn Granlund  <tege@swox.com>
10941
10942	* mpn/alpha/ev6/nails/addmul_2.asm: New file.
10943	* mpn/alpha/ev6/nails/addmul_3.asm: New file.
10944	* mpn/alpha/ev6/nails/addmul_4.asm: New file.
10945
10946	* mpn/generic/dump.c: Rewrite and nailify.
10947
109482002-05-16  Kevin Ryde  <kevin@swox.se>
10949
10950	* mpfr/Makefile.am (EXTRA_DIST): Add BUGS file.
10951
109522002-05-15  Torbjorn Granlund  <tege@swox.com>
10953
10954	* configure.in (*-cray-unicos*): Remove -hscalar0, add -hnofastmd
10955	as workaround for compiler bug.
10956	(mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
10957
109582002-05-14  Torbjorn Granlund  <tege@swox.com>
10959
10960	* configure.in (*-cray-unicos*): Pass -hscalar0 to work around
10961	compiler bug for mpz/import.c.
10962
109632002-05-11  Torbjorn Granlund  <tege@swox.com>
10964
10965	* mpz/import.c: Cast pointer via `unsigned long' when checking
10966	alignment to avoid compiler warnings.
10967
10968	* mpn/generic/rootrem.c: Adjust allocation of qp temporary area.
10969
109702002-05-09  Kevin Ryde  <kevin@swox.se>
10971
10972	* mpz/import.c: Corrections to size store, special case tests, and
10973	general case ACCUMULATE.
10974	* tests/mpz/t-import.c, tests/mpz/t-export.c: More test data.
10975
109762002-05-09  Torbjorn Granlund  <tege@swox.com>
10977
10978	* mpn/generic/rootrem.c: Use temp space for root, copy value in place
10979	before returning.
10980	* mpz/root.c: Don't allocate extra limb for root value.
10981	* mpz/perfpow.c: Undo last change.
10982
109832002-05-08  Torbjorn Granlund  <tege@swox.com>
10984
10985	* gmp-impl.h (powerpc BSWAP_LIMB_FETCH): Rename local variable to make
10986	it not clash with caller.
10987
10988	* mpn/generic/rootrem.c: New file.
10989	* configure.in (gmp_mpn_functions): Add rootrem and pow_1.
10990	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add rootrem.c and
10991	pow_1.c
10992	* gmp-impl.h (mpn_rootrem): Add declaration.
10993	* mpz/perfpow.c: Amend allocations for mpn_rootrem requirements.
10994	* mpz/root.c: Rewrite to use mpn_rootrem.
10995
109962002-05-08  Kevin Ryde  <kevin@swox.se>
10997
10998	* gmp-impl.h (MUL_KARATSUBA_THRESHOLD etc): Remove forced nail values.
10999
11000	* mpf/fits_u.h, mpf/fits_s.h, tests/mpf/t-fits.c: Ignore fraction
11001	part, making the code match the documentation.
11002
11003	* gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.
11004
110052002-05-07  Kevin Ryde  <kevin@swox.se>
11006
11007	* mpn/powerpc32/README: New file.
11008
11009	* mpz/root.c: Use unsigned long with mpz_sub_ui not mp_limb_t.
11010
11011	* tune/README: Misc updates including sparc32/v9 smoothness, low res
11012	timebase, and mpn_add_n operand overlaps.
11013	* tune/many.pl: Add udiv.asm support.
11014
11015	* gmp.texi (Build Options): A couple of --build better as --host.
11016	(Known Build Problems, Notes for Package Builds): Add DESTDIR problem.
11017	(Compatibility with older versions): Compatible with 4.x versions.
11018	(Converting Integers): Remove mpz_get_ui + mpz_tdiv_q_2exp decompose.
11019	(Integer Import and Export): New section.
11020	(Miscellaneous Integer Functions): Clarify mpz_sizeinbase returns 1
11021	for operand of 0.
11022	(Language Bindings): Add GNU Pascal.
11023	(Low-level Functions): Add GMP_NUMB_MAX.
11024
11025	* tests/mpz/t-import.c, tests/mpz/t-export.c, tests/mpz/t-get_d.c:
11026	New tests.
11027	* tests/mpz/Makefile.am: Add them.
11028
11029	* mpz/import.c, mpz/export.c: New files.
11030	* Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
11031
11032	* gmp-h.in, gmp-impl.h (GMP_NUMB_MAX): Move to gmp.h.
11033	* gmp-impl.h (CNST_LIMB): Add cast to mp_limb_t to ensure unsigned.
11034	(CRAY_Pragma, MPN_REVERSE, MPN_BSWAP, MPN_BSWAP_REVERSE,
11035	ASSERT_ALWAYS_LIMB, ASSERT_ALWAYS_MPN): New macros.
11036	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS_MPN.
11037
110382002-05-07  Torbjorn Granlund  <tege@swox.com>
11039
11040	* mpz/aors_ui.h: Nailify.
11041
11042	* tests/mpz/t-addsub.c: New file.
11043	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-addsub.
11044
11045	* mpz/ui_sub.c: New file.
11046	* mpz/Makefile.am (libmpz_la_SOURCES): Add ui_sub.c.
11047	* Makefile.am (MPZ_OBJECTS): Ditto.
11048	* gmp-h.in (mpz_ui_sub): Add declaration.
11049
11050	* gmp-impl.h (MPZ_REALLOC): Rewrite to allow the use of _mpz_realloc
11051	return value.
11052
11053	* gmp-h.in (mpn_pow_1): Add declaration.
11054
11055	* mpn/generic/pow_1.c: Handle exp <= 1.  Reverse rp/tp parity scheme
11056	for bn == 1 arm.
11057
11058	* Rename MP_LIMB_T_HIGHBIT => GMP_LIMB_HIGHBIT.
11059
110602002-05-06  Torbjorn Granlund  <tege@swox.com>
11061
11062	* demos/pexpr.c (main): Don't call mpz_sizeinbase with negative base.
11063
11064	* randraw.c (lc): Remove an unused variable.
11065
11066	* mpn/generic/get_str.c: Clarify an algorithm description.
11067
11068	* tests/mpf/t-trunc.c: Nailify.
11069	* tests/mpf/t-set_si.c: Disable for nails.
11070
11071	* mpf/cmp_si.c: Nailify.
11072	* mpf/cmp_ui.c: Nailify.
11073	* mpf/div.c: Nailify.
11074	* mpf/div_2exp.c: Nailify.
11075	* mpf/div_ui.c: Nailify.
11076	* mpf/eq.c: Nailify.
11077	* mpf/get_d.c: Nailify.
11078	* mpf/get_d_2exp.c: Nailify.
11079	* mpf/get_si.c: Nailify.
11080	* mpf/get_str.c: Nailify.
11081	* mpf/get_ui.c: Nailify.
11082	* mpf/mul_2exp.c: Nailify.
11083	* mpf/random2.c: Nailify.
11084	* mpf/set_q.c: Nailify.
11085	* mpf/set_si.c: Nailify.
11086	* mpf/set_str.c: Nailify.
11087	* mpf/set_ui.c: Nailify.
11088	* mpf/sub.c: Nailify.
11089	* mpf/ui_div.c: Nailify.
11090	* mpf/ui_sub.c: Nailify.
11091	* mpf/urandomb.c: Nailify.
11092
11093	* gmp-impl.h (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Nailify.
11094
11095	* mpz/get_si.c: Misc variable name changes.
11096
11097	* mpf/fits_u.h: Rewrite - nailify.
11098	* mpf/fits_s.h: Likewise.
11099
11100	* mpz/mod.c: Disambiguate if-statament with extra {}.
11101
11102	* mpf/int_p.c: Fix type of size variables.
11103	* mpf/get_ui: Likewise.
11104	* mpf/get_si: Likewise.
11105	* mpq/equal.c: Likewise.
11106	* mpq/get_d.c: Likewise.
11107	* mpz/cmp_d.c: Likewise.
11108	* mpz/cmpabs_d.c: Likewise.
11109	* mpz/divis_2exp.c: Likewise.
11110	* mpz/kronuz.c: Likewise.
11111	* mpz/kronzu.c: Likewise.
11112	* mpz/kronzs.c: Likewise.
11113	* mpz/kronsz.c: Likewise.
11114	* mpz/scan0.c: Likewise.
11115	* mpz/scan1.c: Likewise.
11116	* mpz/tstbit.c: Likewise.
11117	* mpz/cong_2exp.c: Likewise.
11118	* mpz/divis.c: Likewise.
11119
111202002-05-04  Torbjorn Granlund  <tege@swox.com>
11121
11122	* mpn/generic/gcd.c: Additional nailify changes.
11123
111242002-05-04  Kevin Ryde  <kevin@swox.se>
11125
11126	* gmp-h.in (__GNU_MP_VERSION): Set to 4.1.
11127	* Makefile.am (-version-info): Bump for new release.
11128
111292002-04-30  Torbjorn Granlund  <tege@swox.com>
11130
11131	* mpn/generic/divrem_1.c: Additional nailify changes.
11132	* mpn/generic/mod_1.c: Likewise.
11133
11134	* tests/mpq/t-get_d.c: Print floats with all 16 digits.
11135
11136	* mpq/get_d.c: Nailify.
11137
11138	* tests/mpq/t-set_f.c: Disable for nails.
11139
11140	* mpz/get_d.c: Nailify.
11141
11142	* gmp-impl.h (LIMBS_PER_DOUBLE, MP_BASE_AS_DOUBLE): Nailify.
11143
11144	* gmp-h.in (__GMPZ_FITS_UTYPE_P): Cast maxval to before shifting it.
11145
11146	* extract-dbl.c: Nailify.
11147
111482002-04-29  Torbjorn Granlund  <tege@swox.com>
11149
11150	* mpq/md_2exp.c (mord_2exp): Nailify.
11151
11152	* mpq/cmp_ui.c: Nailify.
11153
11154	* mpq/cmp.c (mpq_cmp): Nailify.
11155
11156	* mpn/generic/gcd.c: Nailify.  GNUify code layout.
11157
11158	* mpn/generic/gcdext.c: Nailify.  Misc changes.
11159
11160	* tests/mpz/t-sqrtrem.c: Let argv[1] mean # of repetitions.
11161	* tests/mpz/t-gcd.c: Likewise.
11162
11163	* mpz/gcd.c: Nailify.
11164
11165	* mpn/generic/random.c: Nailify.
11166
11167	* gmp-impl.h (modlimb_invert): Nailify.
11168
111692002-04-27  Torbjorn Granlund  <tege@swox.com>
11170
11171	* mpn/generic/gcdext.c (div2): Remove qh parameter.
11172	(mpn_gcdext): Streamline double-limb code.
11173	Move GCDEXT_THRESHOLD check to after initial division.
11174
111752002-04-27  Kevin Ryde  <kevin@swox.se>
11176
11177	* gmp-impl.h (JACOBI_MOD_OR_MODEXACT_1_ODD): Allow for odd
11178	GMP_NUMB_BITS.
11179
11180	* tune/time.c (sgi_works_p): Allow for 64-bit counter, and fix
11181	SGI_CYCLECNTR_SIZE handling.
11182
11183	* demos/expr/exprfr.c: Add nan and inf constants.
11184	* demos/expr/t-expr.c: Exercise them.
11185
111862002-04-26  Torbjorn Granlund  <tege@swox.com>
11187
11188	* mpz/cmp_ui.c: Fix overflow conditions for nails.
11189
11190	* gmp-h.in (mpz_get_ui): Fix typo from last change.
11191
11192	* mpz/n_pow_ui.c: Adjust allocation for nails.
11193	(GMP_NUMB_HALFMAX): Renamed from MP_LIMB_T_HALFMAX.
11194	Fix umul_ppmm invocation for for nails.
11195
111962002-04-24  Torbjorn Granlund  <tege@swox.com>
11197
11198	* mpn/generic/gcdext.c: Simplify by using mpn_tdiv_qr instead of
11199	mpn_divmod.
11200
112012002-04-24  Kevin Ryde  <kevin@swox.se>
11202
11203	* configure.in (*-*-cygwin*): Give a sensible default command line
11204	limit, to avoid blowups reported by Jim Fougeron on windows 9x.
11205	(--enable-nails): Make the default 2, since mp_bases has data for that.
11206
11207	* mpfr/mpfr-math.h (__mpfr_nan): Use a "double" for the bytes, to
11208	avoid a mis-conversion on alpha gcc 3.0.2.
11209	(_MPFR_INFP_BYTES, _MPFR_INFM_BYTES): Should be a zero mantissa.
11210
112112002-04-23  Torbjorn Granlund  <tege@swox.com>
11212
11213	* mpz/dive_ui.c: Fix typo.
11214
11215	* mpz/fits_s.h: Rewrite.
11216
11217	* mpz/jacobi.c: Nailify.
11218	* mpz/kronuz.c: Additional nailify changes.
11219	* mpz/kronsz.c: Likewise.
11220
112212002-04-23  Kevin Ryde  <kevin@swox.se>
11222
11223	* demos/expr/Makefile.am (LDADD): Add $(LIBM) for the benefit of mpfr.
11224
11225	* mpz/divis_ui.c, mpz/cong_ui.c: Nailify.
11226	* mpn/generic/bdivmod.c, mpz/divexact.c, mpz/dive_ui.c: Nailify.
11227	* mpn/generic/sb_divrem_mn.c, mpn/generic/divrem.c,
11228	mpn/generic/divrem_2.c: Nailify ASSERTs.
11229	* mpn/x86/k6/mmx/logops_n.asm, mpn/x86/k6/mmx/com_n.asm: Nailify.
11230	* mpz/inp_raw.c, mpz/out_raw.c: Nailify.
11231	* mpz/kronzu.c, mpz/kronuz.c, mpz/kronzs.c, mpz/kronsz.c: Nailify.
11232	* mpn/generic/divis.c, mpz/cong.c, mpz/cong_2exp.c: Nailify.
11233	* gmp-impl.h (NEG_MOD): Nailify.
11234
11235	* gmp-impl.h, mpn/mp_bases.c: Add back GMP_NUMB_BITS==30 bases data.
11236
11237	* mpfr/get_d.c: Patch from Paul to avoid problem with constant folding
11238	in gcc on OSF.
11239
11240	* mpn/lisp/gmpasm-mode.el: Remove mention of defunct LF macro.
11241
112422002-04-22  Torbjorn Granlund  <tege@swox.com>
11243
11244	* demos/pexpr.c: Handle "binomial" operator.
11245
11246	* mpz/cmp_ui.c: Move assignments of `up' out of conditionals.
11247
11248	* mpn/generic/gcdext.c: Fix fencepost error in STAT code.
11249
11250	* gmp-impl.h (mpn_com_n): Nailify.
11251
11252	* tests/mpz/t-cdiv_ui.c: New file.
11253	* tests/mpz/Makefile.am (check_PROGRAMS): Add t-cdiv_ui.
11254	* mpz/cdiv_qr_ui.c: Nailify.
11255	* mpz/cdiv_q_ui.c: Nailify.
11256	* mpz/cdiv_r_ui.c: Nailify.
11257	* mpz/cdiv_ui.c: Nailify.
11258
11259	* tests/misc/t-printf.c (CHECK_N): Add cast to allow `char' to be an
11260	unsigned type.
11261	* tests/misc/t-scanf.c: Likewise.
11262
11263	* mpz/mul_i.h: Rework nails code to handle parameter overlap.
11264
11265	* tests/mpz/t-set_f.c: Disable for nails.
11266
112672002-04-21  Torbjorn Granlund  <tege@swox.com>
11268
11269	* mpz/set_si.c: Add cast to support LONG_LONG_LIMB.
11270	* mpz/iset_si.c: Likewise.
11271
11272	* mpz/bin_ui.c: Nailify.
11273	* mpz/bin_uiui.c: Nailify.
11274
11275	* mpz/cmpabs_ui.c: Nailify.
11276
11277	* tests/mpz/t-aorsmul.c: Nailify.
11278	* mpz/aorsmul_i.c (mpz_addmul_ui, mpz_submul_ui): Nailify better.
11279
112802002-04-20  Torbjorn Granlund  <tege@swox.com>
11281
11282	* tests/mpz/t-fdiv_ui.c: Check mpz_fdiv_ui.
11283	* tests/mpz/t-tdiv_ui.c: Check mpz_tdiv_ui.
11284
11285	* mpz/tdiv_ui.c: Rewrite nails code.
11286	* mpz/fdiv_ui.c: Nailify.
11287
11288	* tests/mpz/t-tdiv_ui.c: Check returned remainders.
11289	* tests/mpz/t-fdiv_ui.c: Merge in recent t-tdiv_ui changes.
11290
11291	* mpz/tdiv_q_ui.c: Remove spurious TMP_* calls.
11292
11293	* mpz/fdiv_qr_ui.c: Nailify.
11294	* mpz/fdiv_q_ui.c: Nailify.
11295	* mpz/fdiv_r_ui.c: Nailify.
11296
11297	* mpz/get_si.c: Misc nailify changes to shut up compiler warnings.
11298
11299	* mpz/ui_pow_ui.c: Fix typo in last change.
11300
113012002-04-20  Kevin Ryde  <kevin@swox.se>
11302
11303	* tests/misc/t-printf.c, tests/misc/t-scanf.c: Check all %n types.
11304
11305	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/p6/mmx/divrem_1.asm
11306	(mpn_preinv_divrem_1): New entrypoint.
11307	(mpn_divrem_1): Avoid a branch when testing high<divisor.
11308	* mpn/asm-defs.m4: Add define_mpn(preinv_divrem_1).
11309	* configure.in: Allow divrem_1.asm to provide mpn_preinv_divrem_1.
11310
11311	* gmp-impl.h [nails]: Add #undefs of MUL_KARATSUBA_THRESHOLD etc, to
11312	override CPU gmp-mparam.h.  Remove JACOBI_BASE_METHOD override since
11313	it's nails-neutral.
11314
11315	* tests/mpn/t-mp_bases.c: New file.
11316	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
11317	* tests/t-constants.c: Move MP_BASES constants checks to it.
11318
11319	* mpn/mp_bases.c: Fix big_base_inverted values for nails.
11320	* gmp-impl.h (MP_BASES_BIG_BASE_INVERTED_10,
11321	MP_BASES_NORMALIZATION_STEPS_10): Fix nails values.
11322	(MP_BASES_*): Remove GMP_NUMB_BITS == 30 data.
11323
11324	* mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm: Add
11325	NAILS_SUPPORT indicators.
11326
11327	* configure.in: Grep for NAILS_SUPPORT in cpu-specific code, and look
11328	in "nails" subdirectories, print path used.
11329	* mpn/asm-defs.m4 (NAILS_SUPPORT): New macro.
11330
11331	* mpfr/mpfr-test.h: Include config.h, for the benefit of test programs
11332	not using gmp-impl.h.
11333
113342002-04-19  Torbjorn Granlund  <tege@swox.com>
11335
11336	* tests/mpz/t-scan.c: Nailify.
11337
11338	* mpz/tdiv_qr_ui.c: Nailify.
11339	* mpz/tdiv_q_ui.c: Nailify.
11340	* mpz/tdiv_r_ui.c: Nailify.
11341	* mpz/tdiv_ui.c: Nailify.
11342
11343	* mpz/cmp_ui.c: Nailify.
11344
11345	* mpz/ui_pow_ui.c: Misc nailify changes to shut up compiler warnings.
11346
11347	* mpz/scan0.c: Nailify.
11348	* mpz/scan1.c: Nailify.
11349
11350	* tests/mpz/t-sizeinbase.c (mpz_fake_bits): Nailify.
11351
113522002-04-18  Torbjorn Granlund  <tege@swox.com>
11353
11354	* mpz/aorsmul_i.c: Nailify.
11355
11356	* mpz/cmp_si.c: Nailify (botched).
11357
11358	* mpz/ui_pow_ui.c: Nailify.
11359
11360	* gmp-h.in (__GMPZ_FITS_UTYPE_P): Nailify.
11361
11362	* mpz/fits_s.h: Nailify.
11363
11364	* tests/mpz/bit.c (check_tstbit): Nailify.
11365
11366	From Paul Zimmermann:
11367	* mpn/generic/sqrtrem.c: Nailify.
11368
11369	* mpz/n_pow_ui.c: Nailify.
11370
11371	* mpz/cfdiv_r_2exp.c: Nailify.
11372
11373	* randraw.c (lc): Undo: Let mpn_rshift put result in place to avoid
11374	extra MPN_COPY.
11375
113762002-04-17  Torbjorn Granlund  <tege@swox.com>
11377
11378	* mpz/clrbit.c: Add two GMP_NUMB_MASK masks after addition.
11379
11380	* mpn/generic/random2.c (LOGBITS_PER_BLOCK): Decrease to 4.
11381
11382	* gmp-impl.h (nail DIV_DC_THRESHOLD): Decrease to 50 to allow fast
11383	division.
11384
11385	* mpn/generic/random2.c: Nailify.
11386
11387	* mpz/fac_ui.c: Nailify.
11388
11389	* mpz/mul_i.h: #if ... #endif code block to shut up gcc warnings.
11390
11391	* mpn/generic/sqrtrem.c: Adopt to GNU coding standards.
11392	(mpn_dc_sqrtrem): New name for mpn_dq_sqrtrem.
11393	Partial nailification.
11394
11395	* configure.in: As a temporary hack, clear extra_functions for nails
11396	builds.
11397
11398	* gmp-h.in (mpz_get_ui): #if ... #endif else code block to shut up gcc
11399	warnings.
11400
114012002-04-17  Kevin Ryde  <kevin@swox.se>
11402
11403	* texinfo.tex: Update to 2002-03-26.08 per texinfo 4.2.
11404	* gmp.texi: Must have @top in @ifnottex (or @contents doesn't come out
11405	in one run).
11406
11407	* mpn/generic/scan0.c, mpn/generic/scan1.c: Nailify.
11408
11409	* tests/mpn/t-scan.c: New file.
11410	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
11411
11412	* tests/refmpn.c, tests/tests.h (refmpn_tstbit): Use unsigned long for
11413	bit index.
11414	(refmpn_setbit, refmpn_clrbit, refmpn_scan0, refmpn_scan1): New
11415	functions.
11416
11417	* mpfr/cmp_ui.c (mpfr_cmp_si_2exp): Fix b==0 i!=0 case.
11418
114192002-04-17  Gerardo Ballabio <gerardo.ballabio@unimib.it>
11420
11421	* gmpxx.h, mpfrxx.h: Remove mpfr_class bool combinations, remove
11422	mpfr_class::get_str2, use mp_rnd_t for rounding modes, use
11423	8*sizeof(double) for mpfr_t's holding doubles.
11424
114252002-04-17  Torbjorn Granlund  <tege@swox.com>
11426
11427	* mpz/powm.c: Nailify.
11428	* mpz/powm_ui.c: Nailify.
11429
114302002-04-16  Torbjorn Granlund  <tege@swox.com>
11431
11432	* mpz/hamdist.c: Nailify.
11433	* tests/misc.c (urandom): Nailify.
11434
11435	* mpz/get_si.c: Nailify.
11436	* gmp-h.in (mpz_get_ui): Nailify.  Streamline (and probably upset
11437	memory checkers).
11438
11439	* gmp-impl.h (mp_bases[10] values): Add versions for GMP_NUMB_BITS
11440	being 28, 60, and 63.
11441	* mpn/mp_bases.c: Add tables for GMP_NUMB_BITS being 28, 60, and 63.
11442
11443	* mpz/iset_si.c: Nailify.
11444	* mpz/iset_ui.c: Nailify
11445
11446	* tests/mpz/convert.c (main): Print test number in error message.
11447
11448	* mpn/generic/get_str.c (mpn_sb_get_str): Shift up `frac' into nails
11449	field after bignum division.
11450
114512002-04-16  Kevin Ryde  <kevin@swox.se>
11452
11453	* gmp-h.in, gmp-impl.h (GMP_NAIL_MASK): Move to gmp.h.
11454
11455	* gmp.texi: Use @documentdescription and @copying, per texinfo 4.2.
11456	(Low-level Functions): Clarify mpn_gcd overlap requirements, rewrite
11457	mpn_set_str description, add nails section.
11458	(C++ Interface General): Remove bool from types that mix with classes.
11459	(Language Bindings): Add STklos, GNU Smalltalk, Regina.
11460	(Binary to Radix, Radix to Binary): Describe new code.
11461	(Assembler Cache Handling): More notes, mostly by Torbjorn.
11462
11463	* macos/configure (%vars): Remove __GMP from substitutions, per change
11464	to main configure.
11465
11466	* mpn/generic/dive_1.c: Nailify.
11467	* mpn/generic/mode1o.c: Nailify, remove bogus ASSERT in commented-out
11468	alternate implementation.
11469	* gmp-impl.h (SUBC_LIMB): New macro.
11470
11471	* tests/devel/try.c (validate_divexact_1): Correction to compare.
11472	(udiv_qrnnd): New testing.
11473	(SHIFT_LIMIT): Nailify.
11474	(-b): New option, remove spurious "H" from getopt string.
11475
11476	* mpz/clrbit.c: Nailify.
11477	* tests/mpz/t-hamdist.c: Nailify.
11478	* gmp-impl.h (MPN_FIB2_SIZE): Nailify.
11479	(PP): Nailify conditionals.
11480	* tests/mpz/t-fib_ui.c (MPZ_FIB_SIZE_FLOAT): Nailify.
11481
11482	* configure.in, acinclude.m4: Establish GMP_NAIL_BITS and
11483	GMP_LIMB_BITS for gmp-h.in configure tests.
11484
11485	* mpfr/*, configure.in: Update to final mpfr 2.0.1.
11486	* mpfr/acinclude.m4 (MPFR_CONFIGS): Use $host, not uname stuff.
11487	* mpfr/tests/tout_str.c: Patch from Paul for denorm fprintf tests.
11488
114892002-04-15  Torbjorn Granlund  <tege@swox.com>
11490
11491	* mpn/generic/divrem_1.c (EXTRACT): Remove.
11492
11493	* tests/mpz/t-tdiv_ui.c (dump_abort): Accept argument for error string.
11494
11495	* mpz/rrandomb.c: Nailify.  Needs further work.
11496
11497	* mpn/generic/mod_1.c: Nailify.
11498
11499	* gmp-impl.h: Set various *_THRESHOLD values to be used for nails to
11500	avoid not yet qualified algorithms.
11501	(MPZ_CHECK_FORMAT): Check that nail part is zero.
11502
11503	* tests/mpz/t-mul.c (main): Test squaring even for huge operands.
11504	(base_mul): Nailify.
11505	(dump_abort): Accept argument for error string.  Print product
11506	difference.
11507
11508	* mpn/generic/set_str.c: Nailify.
11509
11510	* gmp-h.in (__GMPN_ADD, __GMPN_SUB): Nailify.
11511
115122002-04-14  Torbjorn Granlund  <tege@swox.com>
11513
11514	* randraw.c (lc): Return non-nonsense return value for seed=0 case.
11515	Check for m2exp being non-zero early; remove all other tests of m2exp.
11516	Remove redundant MPN_ZERO call.
11517	Let mpn_rshift put result in place to avoid extra MPN_COPY.
11518	Remove confusing comment before function `lc' describing BBS algorithm.
11519	Misc simplification and cleanups.
11520	Nailify.  Needs further work.
11521
11522	* mpz/set_si.c: Nailify.
11523	* mpz/set_ui.c: Nailify.
11524	* mpz/mul_i.h: Nailify.
11525
11526	* tests/mpz/t-mul_i.c: Actually test _ui routines.  Add some more test
11527	values.
11528
11529	* mpn/generic/mul_n.c: Finish nailifying toom3 code.
11530
115312002-04-13  Kevin Ryde  <kevin@swox.se>
11532
11533	* mpfr/*: Update to another new mpfr 2.0.1.
11534	* configure.in, Makefile.am, mpfr/Makefile.am, mpfr/tests/Makefile.am:
11535	Use MPFR_CONFIGS macro, establish separate MPFR_CFLAGS for mpfr build.
11536
11537	* mpfr/tests/Makefile.am: Correction to convenience rule for libmpfr.a.
11538
115392002-04-11  Kevin Ryde  <kevin@swox.se>
11540
11541	* mpfr/set_q.c: gmp-impl.h before mpfr.h to avoid _PROTO redefine.
11542
11543	* mpfr/*, configure.in: Update to new mpfr 2.0.1.
11544
11545	* tests/refmpn.c (refmpn_udiv_qrnnd, refmpn_divmod_1c_workaround):
11546	Fixes for nails.
11547
11548	* tests/t-constants.c (MODLIMB_INVERSE_3): Nailify tests.
11549	(MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): Only
11550	check these under USE_PREINV_DIVREM_1.
11551	* tests/t-modlinv.c: Nailify tests.
11552
115532002-04-11  Gerardo Ballabio <gerardo.ballabio@unimib.it>
11554
11555	* gmpxx.h: Remove bool combinations, remove mpf_class::get_str2, only
11556	need <iosfwd> now.
11557
115582002-04-11  Torbjorn Granlund  <tege@swox.com>
11559
11560	* mpn/generic/diveby3.c: Nailify.
11561	* gmp-impl.h (MODLIMB_INVERSE_3): Nailify.
11562
11563	* mpn/generic/mul_n.c: Nailify Toom3 code.
11564
115652002-04-10  Kevin Ryde  <kevin@swox.se>
11566
11567	* gmp-impl.h (MPN_KARA_MUL_N_MINSIZE, MPN_KARA_SQR_N_MINSIZE): Set to
11568	3, as needed by nails case.
11569
11570	* mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails]: Fix vl
11571	assert, add rp,n and up,n asserts.
11572
11573	* mpfr/Makefile.am: Add new mpfr-math.h, install mpf2mpfr.h.
11574
115752002-04-10  Torbjorn Granlund  <tege@swox.com>
11576
11577	* mpn/generic/divrem_1.c: Nailify.  Update mp_size_t variables to use
11578	`n' suffix instead of `size' suffix.
11579	* mpn/generic/divrem_2.c: Likewise.
11580	* mpn/generic/sb_divrem_mn.c: Nailify.
11581	* mpn/generic/tdiv_qr.c: Nailify.
11582	(SHL): Remove silly macro.
11583
11584	* mpn/generic/mul_n.c (mpn_kara_mul_n): Replace open-coded increment by
11585	mpn_incr_u call.  Handle nails in ws[n] increment.
11586	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Likewise.
11587
11588	* gmp-h.in (GMP_NUMB_MASK): New #define.
11589	(__GMPN_AORS_1): Add version for nails.
11590
11591	* gmp-impl.h (GMP_NUMB_MASK): Comment out, now in gmp.h.
11592	(mpn_incr_u): Don't assume `incr' is non-zero.
11593	(mpn_decr_u): Similarly.
11594
115952002-04-09  Kevin Ryde  <kevin@swox.se>
11596
11597	* mpfr/*, configure.in: Update to mpfr 2.0.1.
11598
11599	* tests/refmpn.c (refmpn_mul_1c, lshift_make): Corrections for nails.
11600	* tssts/refmpn.c, tests/tests.h (refmpn_cmp_allowzero): New function.
11601
11602	* mpn/generic/mul_1.c [nails]: Fix vl assert, add {up,n} assert.
11603
11604	* mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
11605	mpn/pa32/hppa1_1/pa7100/submul_1.asm: Rename "size" define, to avoid
11606	ELF .size directive.  Reported by LaMont Jones.
11607
11608	* tests/mpz/t-set_si.c: Add nails support.
11609
116102002-04-05  Torbjorn Granlund  <tege@swox.com>
11611
11612	* gmp-impl.h: Replace nail mpn_incr_u, mpn_decr_u with faster versions.
11613	(mp_bases[10] values): Check GMP_NUMB_BITS instead of BITS_PER_MP_LIMB.
11614	Add GMP_NUMB_BITS == 30 version.
11615	(__gmp_doprnt, etc): Remove parameter names.
11616
11617	* mpn/generic/mul_n.c: Nailify Karatsuba code.
11618	* mpn/generic/get_str.c: Nailify.
11619	* mpn/generic/sqr_basecase.c: Nailify.
11620	* mpn/generic/lshift.c: Nailify.
11621	* mpn/generic/rshift.c: Likewise.
11622	* mpn/generic/add_n.c: Nailify.  Revamp non-nail code.
11623	* mpn/generic/sub_n.c: Likewise.
11624	* mpn/generic/mul_1.c: Likewise.
11625	* mpn/generic/addmul_1.c: Likewise.
11626	* mpn/generic/submul_1.c: Likewise.
11627
116282002-04-02  Kevin Ryde  <kevin@swox.se>
11629
11630	* gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE) [powerpc]:
11631	Corrections to constraints, and restrict to bigendian.
11632
116332002-03-31  Kevin Ryde  <kevin@swox.se>
11634
11635	* tests/mpz/dive.c: Better diagnostics.
11636
11637	* tests/devel/try.c (mpn_get_str, mpn_umul_ppmm_r): New tests.
11638
11639	* tests/misc.c, tests/tests.h (byte_diff_lowest, byte_diff_highest):
11640	New functions.
11641
11642	* tests/t-bswap.c: New file.
11643	* tests/Makefile.am (check_PROGRAMS): Add it.
11644
11645	* tests/mpn/t-aors_1.c, tests/mpn/t-iord_u.c: Add nails support.
11646
11647	* gmp-impl.h (MPN_IORD_U) [x86]: Eliminate unnecessary jiord and iord,
11648	rename "n" to incr per generic versions, restrict to nails==0.
11649	(mpn_incr_u, mpn_decr_u): Add nails support.
11650	(GMP_NAIL_LOWBIT, GMP_NUMB_MAX): New macros.
11651
11652	* tests/trace.c, tests/tests.h (byte_trace, byte_tracen): New
11653	functions.
11654	* tests/trace.c: Handle NULL operands.
11655
11656	* tests/refmpn.c, tests/devel/try.c, tune/speed.c: Add preliminary
11657	nail support.
11658
11659	* tests/refmpn.c, test/tests.h (byte_overlap_p, refmpn_equal_anynail,
11660	refmpn_umul_ppmm_r, refmpn_udiv_qrnnd_r, refmpn_get_str,
11661	refmpn_bswap_limb, refmpn_random, refmpn_random2, refmpn_bswap_limb):
11662	New functions.
11663
11664	* gmp-impl.h, tests/refmpn.c (ASSERT_LIMB): Renamed from
11665	ASSERT_MP_LIMB_T.
11666
11667	* mpn/x86/*/*.asm, mpn/powerpc32/*/*.asm, mpn/powerpc64/*/*.asm: Put
11668	speeds after the copyright notice, so as to keep that clear.
11669
116702002-03-29  Kevin Ryde  <kevin@swox.se>
11671
11672	* configure.in (powerpc*-*-aix*): Correction to xlc -qarch selection,
11673	for 32-bit mode.
11674
116752002-03-28  Torbjorn Granlund  <tege@swox.com>
11676
11677	* mpn: Fix spacing in many files.
11678
11679	* mpn/generic/aorsmul_1.c: Split into addmul_1.c and submul_1.c.
11680	* mpn/generic/aors_n.c: Split into add_n.c and sub_n.c.
11681
11682	* mpn/pa64/add_n.asm: Trim another 0.125 cycle/limb.  Fix a comment.
11683	* mpn/pa64/sub_n.asm: Likewise.
11684
11685	* mpn/pa64/mul_1.asm: Change comclr, comb to proper forms cmpclr, cmpb.
11686	* mpn/pa64/addmul_1.asm: Likewise.
11687	* mpn/pa64/submul_1.asm: Likewise.
11688
116892002-03-28  Kevin Ryde  <kevin@swox.se>
11690
11691	* gmp.texi (Converting Integers): Fix type of exp in mpz_get_d_2exp,
11692	reported by epl@unimelb.edu.au.
11693	(References): Update Burnikel and Ziegler URL, reported by Keith
11694	Briggs.
11695
11696	* gmp-h.in, mp-h.in, configure.in, acinclude.m4: Remove __GMP from
11697	AC_SUBSTs, since autoconf says leading "_" in makefile variables is
11698	not portable.
11699
11700	* demos/expr/run-expr.c: Declare optarg, optind, opterr if necessary.
11701	* configure.in, demos/expr/expr-config-h.in: Configs for this.
11702
117032002-03-27  Torbjorn Granlund  <tege@swox.com>
11704
11705	* mpn/Makefile.am (TARG_DIST): Remove pa64w and hppa, add pa32.
11706
11707	* configure.in (path_20w): Remove pa64w.
11708
11709	* mpn/pa64/udiv_qrnnd.asm: Tweak for PA8000 performance comparative to
11710	that on PA8500.
11711
117122002-03-26  Torbjorn Granlund  <tege@swox.com>
11713
11714	* mpn/pa32: New name for mpn/hppa.
11715	* configure.in: Corresponding changes.
11716
11717	* mpn/pa64/umul_ppmm.asm: New file, generalized for both 2.0N and 2.0W.
11718	* mpn/pa64/umul_ppmm.S: Remove.
11719
11720	* mpn/pa64/udiv_qrnnd.asm: Generalize for both 2.0N and 2.0W.
11721	* mpn/pa64w/udiv_qrnnd.asm: Remove.
11722
117232002-03-26  Kevin Ryde  <kevin@swox.se>
11724
11725	* mpfr/tests/tdiv.c, mpfr/tests/tui_div.c: Don't depend on nan and inf
11726	handling in "double", for the benefit of alpha.
11727
11728	* configure (hppa2.0w): Set path to "pa64w pa64".
11729
11730	* acinclude.m4, configure.in (GMP_C_INLINE): New macro.
11731	* acinclude.m4 (GMP_H_EXTERN_INLINE): Use it, and fix "yes" handling.
11732
117332002-03-25  Torbjorn Granlund  <tege@swox.com>
11734
11735	* mpn/pa64w/add_n.s: Remove.
11736	* mpn/pa64w/sub_n.s: Remove.
11737	* mpn/pa64w/lshift.s: Remove.
11738	* mpn/pa64w/rshift.s: Remove.
11739	* mpn/pa64w/mul_1.S: Remove.
11740	* mpn/pa64w/addmul_1.S: Remove.
11741	* mpn/pa64w/submul_1.S: Remove.
11742	* mpn/pa64w/sqr_diagonal.asm: Remove.
11743
11744	* mpn/pa64/mul_1.asm: New file with twice faster code; generalized
11745	for both 2.0N and 2.0W.
11746	* mpn/pa64/submul_1.asm: Likewise.
11747	* mpn/pa64/mul_1.S: Remove.
11748	* mpn/pa64/submul_1.S: Remove.
11749
11750	* mpn/pa64/sqr_diagonal.asm: Generalize for both 2.0N and 2.0W.
11751
11752	* mpn/pa64/add_n.asm: New file, generalized for both 2.0N and 2.0W.
11753	* mpn/pa64/sub_n.asm: Likewise.
11754	* mpn/pa64/lshift.asm: Likewise.
11755	* mpn/pa64/rshift.asm: Likewise.
11756	* mpn/pa64/add_n.s: Remove.
11757	* mpn/pa64/sub_n.s: Remove.
11758	* mpn/pa64/lshift.s: Remove.
11759	* mpn/pa64/rshift.s: Remove.
11760
117612002-03-24  Kevin Ryde  <kevin@swox.se>
11762
11763	* gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE): New macros.
11764	* mpz/inp_raw.c, mpz/out_raw.c: Use them.
11765	* acconfig.h (HAVE_HOST_CPU): Add some powerpc types.
11766
11767	* mpn/powerpc32/750/com_n.asm: New file.
11768
11769	* mpfr/tests/tout_str.c: Disable random tests, since they fail on
11770	alphaev56-unknown-freebsd4.1 and do nothing by default.
11771
11772	* mpfr/tests/tsqrt.c: Don't depend on nan, inf or -0 in "double", for
11773	the benefit of alpha.
11774	* mpfr/sqrt.c: Clear nan flag on -0.
11775
11776	* demos/factorize.c: Use mpn_random() instead of random(), to avoid
11777	portability problems.
11778
11779	* demos/isprime.c (print_usage_and_exit): Declare as "void" to avoid
11780	warnings.
11781
11782	* demos/pexpr.c (setup_error_handler): Corrections to sigstack code.
11783
11784	* demos/calc/calc.y: Add some `;'s to make bison 1.34 happy.
11785
117862002-03-23  Torbjorn Granlund  <tege@swox.com>
11787
11788	* mpn/pa64/addmul_1.asm: New file with twice faster code; generalized
11789	for both 2.0N and 2.0W.
11790
117912002-03-22  Kevin Ryde  <kevin@swox.se>
11792
11793	* tune/time.c: Add SGI hardware counter measuring method, change some
11794	abort()s into ASSERT_FAIL()s.
11795
11796	* configure.in (AC_CHECK_HEADERS): Add fcntl.h and sys/syssgi.h.
11797	(AC_CHECK_FUNCS): Add syssgi.
11798
11799	* configure.in, mpfr/Makefile.am, mpfr/tests/Makefile.am: Use
11800	-mieee-with-inexact or -ieee_with_inexact for mpfr on alpha, so
11801	denorms work.
11802
11803	* mpfr/isinteger.c: Fix a memory leak.
11804
118052002-03-21  Torbjorn Granlund  <tege@swox.com>
11806
11807	* tune/speed.c (struct choice_t): Make `r' an mp_limb_t.
11808
118092002-03-21  Kevin Ryde  <kevin@swox.se>
11810
11811	* configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): Use an
11812	AH_VERBATIM and better explanation.
11813	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Similarly for the HAVE_DOUBLE
11814	constants.
11815
11816	* gmp.texi (Number Theoretic Functions): Clarify sign of GCD returned
11817	by mpz_gcdext.
11818
11819	* demos/pexpr.c, demos/pexpr-config-h.in, configure.in: Use an
11820	autoconf test for stack_t.
11821
11822	* configure.in, gmp-h.in, mp-h.in, macos/configure, tests/mpz/reuse.c,
11823	tests/mpf/reuse.c: Use __GMP_LIBGMP_DLL to enable windows declspec,
11824	don't require _WIN32 (etc), remove __GMP_LIBGMP_SHARED and
11825	__GMP_LIBGMP_STATIC.
11826
11827	* gmp-impl.h (mp_bases): Add __GMP_DECLSPEC, for the benefit of
11828	tests/t-constants.c.
11829
11830	* tune/many.pl, tune/speed.h: Remove suffix hack for back.asm.
11831
118322002-03-21  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
11833
11834	* mpfr/sin_cos.c (mpfr_sin_cos): New file.
11835	* mpfr/mpfr.h, mpfr/mpfr.texi, mpfr/Makefile.am: Add it.
11836	* mpfr/tan.c: Fix sign in 2nd and 4th quadrants.
11837
11838	* mpfr/log10.c: Fix hangs on certain inputs.
11839
118402002-03-20  Torbjorn Granlund  <tege@swox.com>
11841
11842	* demos/pexpr.c (setup_error_handler): Declare `s', the first
11843	sigaltstack parameter, using `stack_t' just on AIX.
11844
118452002-03-19  Torbjorn Granlund  <tege@swox.com>
11846
11847	* mpn/powerpc32/mul_1.asm: Use free caller-saves registers instead
11848	of the callee-saves r30 and r31.
11849
118502002-03-19  Kevin Ryde  <kevin@swox.se>
11851
11852	* tune/freq.c (freq_proc_cpuinfo): Recognise powerpc "clock", where
11853	previously got the wrong result from "bogomips".
11854
11855	* mpn/powerpc32/add_n.asm, mpn/powerpc32/sub_n.asm: Rewrite, faster on
11856	750, and smaller too.
11857	* mpn/powerpc32/*.asm: Use L(), add some measured speeds.
11858
11859	* longlong.h (count_trailing_zeros) [vax]: Add a version using ffs,
11860	but commented out.
11861
118622002-03-17  Kevin Ryde  <kevin@swox.se>
11863
11864	* tune/speed.c, tune/speed.h, tune/common.c, many.pl: Use optional
11865	".r" to specify operand overlaps for mpn_add_n, mpn_sub_n and logops.
11866	Remove mpn_add_n_inplace and mpn_add_n_self.
11867	* tune/many.pl: Fix MULFUNC_PROLOGUE parsing.
11868
11869	* gmp.texi (Known Build Problems): Note `make' problem with long
11870	libgmp.la dependencies list.
11871
11872	* printf/doprnt.c, scanf/doscan.c (%zn): Remove test of non-existent
11873	HAVE_SIZE_T, just use size_t unconditionally.
11874	* printf/doprnt.c (%zd etc): Fix 'z' type parsing.
11875	* tests/misc/t-printf.c, tests/misc/t-scanf.c: More tests.
11876
11877	* configure.in: Use AC_COPYRIGHT.
11878	Add m4_pattern_allow(GMP_MPARAM_H_SUGGEST).
11879
11880	* tune/Makefile.am (libdummy.la): Remove this, sqr_basecase.c already
11881	gets an ansi2knr rule from nodist_tuneup_SOURCES.
11882
11883	* longlong.h (count_leading_zeros) [pentiumpro gcc<3]: Test
11884	HAVE_HOST_CPU_i686 too.
11885
11886	* mpz/out_raw.c (HTON_LIMB_STORE): Fix a typo in big endian #if.
11887
118882002-03-14  Kevin Ryde  <kevin@swox.se>
11889
11890	* mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm,
11891	mpn/x86/k6/mmx/com_n.asm: Add nails support.
11892
11893	* texinfo.tex: Update to 2002-03-01.06 (per texinfo 4.1).
11894	* gmp.texi (@ma): Remove, @math does this now.
11895
11896	* mpfr/tests/reuse.c: Clear op1 and op2 flags only in their respective
11897	outer loops.
11898
11899	* configure.in (--enable-cxx): Correction to the default stated in the
11900	help string.
11901	(power*-*-aix*, not powerpc): Use aix.m4, don't run
11902	GMP_ASM_POWERPC_R_REGISTERS or use powerpc-defs.m4.
11903
119042002-03-13  Torbjorn Granlund  <tege@swox.com>
11905
11906	* mpn/sparc32/gmp-mparam.h: New file.
11907
119082002-03-13  Kevin Ryde  <kevin@swox.se>
11909
11910	* demos/expr/exprfr.c: More mpfr functions, corrections to agm, cos,
11911	sin, rename log2 constant to loge2 to make room for log2 function.
11912	* demos/expr/t-expr.c: More tests.
11913
11914	* mpz/inp_raw.c (NTOH_LIMB_FETCH) [generic 16bit]: Remove spurious "+".
11915
11916	* mpfr/acos.c: Avoid a memory leak for certain operands.
11917
11918	* acinclude.m4, configure.in (GMP_C_DOUBLE_FORMAT): New macro.
11919
11920	* acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
11921	GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
11922	Change ac_objext to OBJEXT, which is the documented variable.
11923
11924	* config.guess (powerpc*-*-*): Use #ifdef on constants POWER_630 etc
11925	in the AIX test, since old versions don't have them all.
11926
119272002-03-11  Kevin Ryde  <kevin@swox.se>
11928
11929	* configure.in (LIBC211): New AC_DEFINE, for mpfr.
11930
11931	* configure.in (mips*-*-*): Support ABI=o32 on irix 6, allow gcc 2.7.2
11932	to fall back on it, but detect it doesn't work with gcc 2.95.  Use
11933	single mips-defs.m4 for both mips32 and mips64.
11934	* acinclude.m4 (GMP_GCC_MIPS_O32): New macro.
11935	* mpn/mips32/mips-defs.m4: Renamed from mips.m4.
11936	* mpn/mips64/mips.m4: Remove (was a copy of mips32/mips.m4).
11937
11938	* mpn/powerpc32/750: New directory.
11939	* configure.in (powerpc740, powerpc750, powerpc7400): Use it.
11940	* mpn/powerpc32/750/gmp-mparam.h: New file.
11941
11942	* config.sub, gmp.texi (ultrasparc1): Remove this, just use plain
11943	"ultrasparc".
11944
119452002-03-10  Kevin Ryde  <kevin@swox.se>
11946
11947	* mpfr: Update to 20020301, except internal_ceil_exp2.c,
11948	internal_ceil_log2.c, internal_floor_log2.c renamed to i_ceil_exp2.c,
11949	i_ceil_log2.c, i_floor_log2.c to be unique in DOS 8.3.  And sqrtrem.c
11950	removed since no longer required.
11951	* mpfr/mpfr.texi: Fix some formatting.
11952	* mpfr/tests/reuse.c: Patch by Paul to fix test4 variable handling.
11953	* mpfr/sinh.c: Patch by Paul to fix err calculation when t==0.
11954	* mpfr/tests/tget_d.c: Disable until portability of rnd_mode.c can be
11955	sorted out.
11956
11957	* configure.in (powerpc*-*-*): Separate gcc and xlc cpu flags setups
11958	for clarity.
11959
11960	* longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]: New
11961	macros.
11962
119632002-03-07  Kevin Ryde  <kevin@swox.se>
11964
11965	* gmp.texi (Build Options): Note all the ultrasparcs accepted.
11966	(Language Bindings): Add Math::BigInt::GMP.
11967
11968	* config.sub (ultrasparc2i): New cpu type.
11969	* config.guess (sparc-*-*, sparc64-*-*): Add some exact CPU detection.
11970
119712002-03-05  Kevin Ryde  <kevin@swox.se>
11972
11973	* longlong.h (count_leading_zeros, count_trailing_zeros) [alphaev67,
11974	alphaev68]: Use ctlz and cttz insns (as per gcc longlong.h).
11975	(count_leading_zeros) [sparclite]: Fix parameter order (as per gcc
11976	longlong.h).
11977	* acconfig.h (HAVE_HOST_CPU_alphaev68): New define.
11978
11979	* config.guess [i?86-*-*]: Suppress error messages if compiler not
11980	found or test program won't run.
11981	[rs6000-*-*, powerpc-*-*]: Force code alignment for mfpvr test.
11982
119832002-03-04  Torbjorn Granlund  <tege@swox.com>
11984
11985	* mpn/generic/pow_1.c: New file.
11986
119872002-03-03  Kevin Ryde  <kevin@swox.se>
11988
11989	* gmp.texi (Build Options): Note compiler must be able to fully link,
11990	add alphapca57 and alphaev68, give a clearer example of MPN_PATH
11991	(Debugging): Add notes on valgrind.
11992	(C++ Formatted Output): Clarify mpf showbase handling, in particular
11993	note "00.4" in octal.
11994
11995	* printf/doprntf.c: Do a showbase on octal float fractions, for
11996	instance "00.4" where previously it gave "0.4".
11997	* tests/cxx/t-ostream.cc: Update.
11998
11999	* gmp-h.in, mp-h.in (__GMP_DECLSPEC, __GMP_DECLSPEC_XX): Test
12000	__WIN32__ for Borland C, reported by "delta trinity".
12001
12002	* gmp-h.in, mp-h.in: Use <cstddef> for size_t under C++, suggested by
12003	Hans Aberg some time ago.
12004	* gmp-h.in (<iosfwd>): Move to top of file for clarity.
12005
12006	* Makefile.am (libgmpxx_la_SOURCES): Use dummy.cc to force C++.
12007	(CXX_OBJECTS): Add osfuns$U.lo.
12008	* dummy.cc: New file.
12009	* cxx/Makefile.am (INCLUDES): Use __GMP_WITHIN_GMPXX.
12010	(libcxx_la_SOURCES): Add osfuns.cc.
12011	* gmp-h.in (__GMP_DECLSPEC_XX): New define, use it on libgmpxx funs.
12012	* gmp-impl.h: Add __GMP_DECLSPEC to libgmp functions used by libgmpxx.
12013
12014	* longlong.h (COUNT_TRAILING_ZEROS_TIME): Remove, no longer used.
12015
12016	* gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): Correction to
12017	__totbits for nails.
12018
12019	* gmp-impl.h (JACOBI_LS0): Test size before limb, to pacify valgrind.
12020	(JACOBI_0LS): Ditto, and fix parens around arguments.
12021
12022	* mpn/x86/x86-defs.m4 (call_mcount): Add a counter to make data labels
12023	unique, since simplified L() scheme no longer gives that effect.
12024	(notl_or_xorl_GMP_NUMB_MASK): New macro.
12025	Add m4_assert_numargs in a few places.
12026
12027	* configure.in (*sparc*): Fix cycle counter setups for ABI=64.
12028
120292002-02-28  Torbjorn Granlund  <tege@swox.com>
12030
12031	* mpn/vax/gmp-mparam.h: New file.
12032
120332002-02-28  Kevin Ryde  <kevin@swox.se>
12034
12035	* gmp-h.in (gmp_errno, gmp_version): Move into extern "C" block,
12036	reported by librik@panix.com.
12037
12038	* gmp-h.in, mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT):
12039	Use __declspec(dllexport) and __declspec(dllimport) on Borland.
12040	* gmp-h.in (_GMP_H_HAVE_FILE): Test __STDIO_H for Borland.
12041	Reported by "delta trinity".
12042
12043	* gmp-impl.h (va_copy): Fall back on memcpy, not "=".
12044
12045	* mpn/generic/pre_mod_1.c: Add a comment about obsolescence.
12046
12047	* tune/time.c (MICROSECONDS_P): Don't trust time differences of 1
12048	microsecond.
12049
12050	* tests/cxx/t-ostream.cc: Use "const char *" not just "char *" for
12051	test data strings, avoids warnings on Sun CC.
12052
120532002-02-27  Torbjorn Granlund  <tege@swox.com>
12054
12055	* configure.in: For sparc under solaris2.[7-9], pass -fsimple=1 to
12056	disable some crazy -fast optimizations.
12057
120582002-02-25  Torbjorn Granlund  <tege@swox.com>
12059
12060	* configure.in: For sparc under solaris2.[7-9], pass -fns=no to enable
12061	denorm handling under -fast.
12062
120632002-02-25  Kevin Ryde  <kevin@swox.se>
12064
12065	* configure.in (alpha*-*-*): Rearrange -mcpu selection for gcc,
12066	provide an ev67 -> ev6 fallback.  Fix -arch,-tune selection for DEC C.
12067	Allow ~ for space in optional options lists.
12068
12069	* tune/tuneup.c (tune_preinv_divrem_1): Compare against an assembler
12070	mpn_divrem_1 if it exists, not the generic C mpn_divrem_1_div.
12071	(tune_preinv_mod_1): Ditto with mpn_mod_1.
12072
12073	* tune/time.c (DIFF_SECS_ROUTINE): Eliminate the unused "type"
12074	parameter, try to make the code a bit clearer.
12075
12076	* tune/freq.c: Reduce the period measured for cycles versus
12077	gettimeofday, add cycles versus microsecond getrusage.
12078
12079	* mpz/array_init.c: "i" should be mp_size_t, noticed by E. Khong.
12080
120812002-02-24  Torbjorn Granlund  <tege@swox.com>
12082
12083	* configure.in: For sparc under solaris2.[7-9], pass -fast instead of
12084	other optimization options.
12085
120862002-02-23  Kevin Ryde  <kevin@swox.se>
12087
12088	* mpn/asm-defs.m4 (GMP_NUMB_MASK): New macro.
12089	(PROLOGUE, EPILOGUE): Relax quoting for the benefit of tune/many.pl
12090	when GSYM_PREFIX non-empty.
12091
12092	* tune/time.c, tune/speed.h (speed_time_init): Include clock tick
12093	period in speed_time_string.
12094	* tune/time.c, configure.in (clock_gettime): New measuring method.
12095
12096	* tune/many.pl: Add -DHAVE_NATIVE_mpn_foo to C objects, to avoid
12097	conflicts with a macro version in gmp-impl.h, eg. mpn_com_n.
12098
120992002-02-22  Torbjorn Granlund  <tege@swox.com>
12100
12101	* demos/pexpr.c: Increase RLIMIT_STACK to 4Mibyte.
12102
121032002-02-22  Kevin Ryde  <kevin@swox.se>
12104
12105	* tune/tuneup.c: Don't confuse gcc with mipspro cc in diagnostic.
12106
121072002-02-20  Torbjorn Granlund  <tege@swox.com>
12108
12109	* configure.in (mips*-*-irix[6789]*]): Set `extra_functions_n32', not
12110	`extra_functions'.
12111
12112	* printf/doprnt.c: Conditionally include inttypes.h.
12113	* printf/repl-vsnprintf.c: Likewise.
12114	* scanf/doscan.c: Likewise.
12115
121162002-02-20  Kevin Ryde  <kevin@swox.se>
12117
12118	* mpn/x86/k7/mmx/com_n.asm: New file.
12119
12120	* mpz/n_pow_ui.c (SWAP_RP_TP): Use ASSERT_CODE on ralloc and talloc,
12121	to ensure they needn't live past the initial allocs in a normal build.
12122
12123	* mpn/generic/mod_34lsub1.c: Note this is for internal use.
12124
121252002-02-19  Torbjorn Granlund  <tege@swox.com>
12126
12127	* Clean up *_THRESHOLD names.  Many files affected.
12128
12129	* mpn/mips32: Asm-ify 32-bit mips code.
12130	Move files from `mips2' to `mips32' directory.
12131	* mpn/mips64: Move files from `mips3' to `mips64' directory.
12132	* configure.in: Change `mips2' => `mips32' and `mips3' => `mips64'.
12133
121342002-02-19  Kevin Ryde  <kevin@swox.se>
12135
12136	* acinclude.m4, configure.in (GMP_PROG_LEX): New macro.
12137
12138	* tune/tuneup.c (one): Start next threshold at a max of previous ones,
12139	in order to get a good starting point for TOOM3_SQR_THRESHOLD if
12140	KARATSUBA_SQR_THRESHOLD is 0 (ie. using mpn_mul_basecase only).
12141
12142	* configure.in, tune/tuneup.c (GMP_MPARAM_H_SUGGEST): New AC_DEFINE
12143	replacing GMP_MPARAM_H_FILENAME.  Suggest a new file in a cpu specific
12144	subdirectory rather than mpn/generic.
12145
12146	* acinclude.m4 (POWERPC64_PATTERN): New macro.
12147	* configure.in (powerpc*-*-*): Use it.
12148	(powerpc*-*-*): Use umul in 32L and aix64.
12149	(mips*-*-*): Use umul, 32 and 64 bit versions.
12150
121512002-02-18  Torbjorn Granlund  <tege@swox.com>
12152
12153	* longlong.h: Add basic x86-64 support.
12154
121552002-02-17  Torbjorn Granlund  <tege@swox.com>
12156
12157	* demos/pexpr.c: Support `-X' for upper case hex, make `-x' output
12158	lower case hex.
12159
12160	* mpn/mips2/umul.s: Make it actually work.
12161	* mpn/mips3/umul.asm: New file.
12162
12163	* mpn/mips2/gmp-mparam.h: New file.
12164
121652002-02-16  Torbjorn Granlund  <tege@swox.com>
12166
12167	* mpn/generic/get_str.c (mpn_sb_get_str): Round frac upwards after
12168	umul_ppmm calls.
12169
121702002-02-16  Kevin Ryde  <kevin@swox.se>
12171
12172	* config.guess (alpha-*-*): Do alpha exact cpu probes on any system,
12173	and only if configfsf.guess gives a plain "alpha".
12174
12175	* acinclude.m4 (GMP_PROG_CC_WORKS): Detect a gcc 3.0.3 powerpc64
12176	linker invocation problem.
12177
121782002-02-15  Torbjorn Granlund  <tege@swox.com>
12179
12180	* mpn/generic/get_str.c (mpn_sb_get_str): For base 10, develop initial
12181	digits using umul_ppmm, then switch to plain multiplication.
12182
12183	* config.guess: Rewrite Alpha subtype detection code for *bsd systems.
12184
121852002-02-15  Kevin Ryde  <kevin@swox.se>
12186
12187	* gmp.texi (Build Options): Note powerpc exact cpu types.
12188	(Debugging): Advertise DEBUG in memory.c.
12189
12190	* config.sub, config.guess: Add some powerpc exact cpus.
12191	* configure.in: Add configs for them.
12192
12193	* memory.c [__NeXT__]: Remove unused #define of "static".
12194	(__gmp_default_allocate, __gmp_default_reallocate): Print size if
12195	allocation fails, don't use perror.
12196
12197	* gmp-h.in: g++ 3 demands __GMP_NOTHROW is before other attributes.
12198
121992002-02-14  Torbjorn Granlund  <tege@swox.com>
12200
12201	* mpn/alpha/mul_1.asm: Fix typo preventing build on T3E systems.
12202
122032002-02-14  Kevin Ryde  <kevin@swox.se>
12204
12205	* tune/tuneup.c (tune_set_str): Increase max_size, for the benefit of
12206	alpha.
12207
12208	* macos/README: Bug reports to bug-gmp@gnu.org, clarify MacOS X a bit.
12209
12210	* mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Add missing TMP_FREE.
12211
12212	* tune/speed.c, tune/tuneup.c: Allow for speed_cycletime of 0.0 in
12213	some diagnostic printouts.
12214	* tune/time.c (speed_cycletime): Note can be 0.0.
12215
122162002-02-12  Torbjorn Granlund  <tege@swox.com>
12217
12218	* mpn/alpha/mul_1.asm: Add mpn_mul_1c entry.
12219
12220	* mpn/pa64w/sqr_diagonal.asm: Use L() for labels.
12221
122222002-02-11  Torbjorn Granlund  <tege@swox.com>
12223
12224	* mpn/generic/get_str.c (mpn_sb_get_str): Change declaration of rp to
12225	accommodate tuneup compiles.
12226
122272002-02-11  Kevin Ryde  <kevin@swox.se>
12228
12229	* mpn/alpha/default.m4, mpn/alpha/unicos.m4 (PROLOGUE_cpu): Add
12230	noalign option.
12231	* mpn/alpha/default.m4 (PROLOGUE_cpu): use ALIGN instead of ".align".
12232
12233	* gmp.texi (Debugging): Notes on Checker.
12234	(Other Multiplication): Move note on float FFTs to here.
12235	(Assembler Floating Point): New text and revisions by Torbjorn,
12236	picture formatting by me.
12237	Simplify tex pictures elsewhere a bit, share heights, eliminate some
12238	gaps at line joins.
12239
122402002-02-11  Torbjorn Granlund  <tege@swox.com>
12241
12242	* mpn/generic/get_str.c (mpn_sb_get_str): Rewrite to generate fraction
12243	limbs and use multiplication for digit development.  Trim allocation of
12244	buf.  Get rid of code for !USE_MULTILIMB.
12245
122462002-02-10  Torbjorn Granlund  <tege@swox.com>
12247
12248	* mpn/generic/set_str.c (mpn_set_str): Undo this:
12249	Change invocations of mpn_add_1 to instead use mpn_incr_u.
12250
12251	* tests/mpz/convert.c: Free str only after it is used in error message.
12252
12253	* mpn/generic/get_str.c (mpn_sb_get_str): Combine tail code for base 10
12254	and generic bases.
12255
12256	* mpn/mp_bases.c: Add entries for base 256.  Remove __ prefix from
12257	table name.
12258	* gmp-impl.h (__mp_bases): Remove superflous `mp_' part of name, making
12259	it __gmpn_bases instead of __gmpn_mp_bases.
12260	(mp_bases): New #define.
12261	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Allow bases up to 256.
12262	(SPEED_ROUTINE_MPN_GET_STR): Likewise.
12263
122642002-02-09  Torbjorn Granlund  <tege@swox.com>
12265
12266	* mpn/generic/set_str.c (mpn_set_str): Use mpn_mul_1c if available.
12267	Change invocations of mpn_add_1 to instead use mpn_incr_u.
12268
122692002-02-09  Kevin Ryde  <kevin@swox.se>
12270
12271	* mpz/array_init.c, mpz/cfdiv_q_2exp.c, mpz/cfdiv_r_2exp.c,
12272	mpz/cong_2exp.c, mpz/divis_2exp.c, mpz/hamdist.c, mpz/init2.c,
12273	mpz/mul_2exp.c, mpz/realloc2.c, mpz/scan0.c, mpz/scan1.c,
12274	mpz/setbit.c, mpz/tdiv_q_2exp.c, mpz/tdiv_r_2exp.c, mpz/tstbit.c,
12275	mpz/urandomb.c: Use GMP_NUMB_BITS.
12276
12277	* mpz/iset_str.c [__CHECKER__]: Store a dummy value to the low limb to
12278	stop it appearing uninitialized.
12279
12280	* gmp-h.in (__GMP_NOTHROW): New macro.
12281	(mp_set_memory_functions, mpz_cmp, mpz_cmp_si, mpz_cmp_ui, mpz_cmpabs,
12282	mpz_cmpabs_ui, mpz_congruent_2exp_p, mpz_divisible_2exp_p,
12283	mpz_fits_sint_p, mpz_fits_slong_p, mpz_fits_sshort_p, mpz_fits_uint_p,
12284	mpz_fits_ulong_p, mpz_fits_ushort_p, mpz_get_si, mpz_get_ui,
12285	mpz_getlimbn, mpz_hamdist, mpz_popcount, mpz_scan0, mpz_scan1,
12286	mpz_size, mpz_sizeinbase, mpz_swap, mpz_tstbit, mpq_equal, mpq_swap,
12287	mpf_cmp, mpf_cmp_si, mpf_cmp_ui, mpf_fits_sint_p, mpf_fits_slong_p,
12288	mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p,
12289	mpf_fits_ushort_p, mpf_get_default_prec, mpf_get_prec, mpf_get_si,
12290	mpf_get_ui, mpf_integer_p, mpf_set_default_prec, mpf_set_prec_raw,
12291	mpf_size, mpf_swap, mpn_add_1, mpn_cmp, mpn_hamdist, mpn_popcount,
12292	mpn_sub_1): Use it.
12293
12294	* gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): New macros from
12295	mpn_sizeinbase, and use GMP_NUMB_BITS.
12296	* mpz/get_str.c, mpz/sizeinbase.c, mpbsd/mout.c, tune/speed.h: Use
12297	MPN_SIZEINBASE.
12298	* mpbsd/mtox.c: Use MPN_SIZEINBASE_16.
12299
12300	* configure.in, mpn/Makefile.am, gmp-impl.h (mpn_sizeinbase): Remove.
12301	* mpn/generic/sizeinbase.c: Remove file.
12302
12303	* gmp-impl.h (MPN_GET_STR_SIZE): Remove.
12304	* tests/mpn/t-g_str_size.c: Remove file.
12305	* tests/mpn/Makefile.am: Update.
12306
12307	* Makefile.am (dist-hook): Don't distribute cvs merge ".#" files.
12308
123092002-02-08  Torbjorn Granlund  <tege@swox.com>
12310
12311	* configure.in: Override extra_functions for all sparcv8 systems, not
12312	just supersparc.
12313
123142002-02-06  Kevin Ryde  <kevin@swox.se>
12315
12316	* tune/tuneup.c (tune_mul, tune_sqr): Disable FFTs until tuned.
12317	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix memory clobber in
12318	destination cache priming.
12319
12320	* printf/doprnt.c: Fix parsing of %s and %p conversions.
12321	* tests/misc/t-printf.c (check_misc): Add some tests.
12322
123232002-02-03  Torbjorn Granlund  <tege@swox.com>
12324
12325	* mpn/sparc32/v8/udiv.asm: New file, from v8/supersparc.
12326
12327	* mpn/generic/set_str.c: Rename indigits_per_limb => chars_per_limb.
12328	Remove redundant chars_per_limb.  Reverse 4 loops in basecase code for
12329	speed.  Use MP_BASES_CHARS_PER_LIMB_10.
12330
123312002-02-03  Kevin Ryde  <kevin@swox.se>
12332
12333	* acinclude.m4 (GMP_PROG_NM): Ensure -B or -p get used when doing a
12334	cross compile with the native nm, helps OSF for instance.
12335	(GMP_ASM_LSYM_PREFIX): Remove ".byte 0" for the benefit of irix 6,
12336	allow "N" from nm for OSF, allow for "t" for other systems, but prefer
12337	no mention of the symbol at all.
12338
12339	* tune/tuneup.c (print_define_remark): New function.
12340	Turn some "#if"s into plain "if"s.
12341
12342	* tune/tuneup.c, gmp-impl.h, tune/Makefile.am
12343	(GET_STR_BASECASE_THRESHOLD, GET_STR_PRECOMPUTE_THRESHOLD): Tune these.
12344	* mpn/generic/get_str.c [TUNE_PROGRAM_BUILD]: Cope with non-constant
12345	GET_STR_PRECOMPUTE_THRESHOLD.
12346
123472002-02-02  Torbjorn Granlund  <tege@swox.com>
12348
12349	* mpn/generic/get_str.c (mpn_get_str): Fix typo in a declaration.
12350
123512002-02-02  Kevin Ryde  <kevin@swox.se>
12352
12353	* mpn/generic/set_str.c: Use MP_PTR_SWAP and POW2_P, add __GMP_PROTO
12354	to convert_blocks prototype, disable SET_STR_BLOCK_SIZE sanity check.
12355
12356	* tune/set_strb.c, tune/set_strs.c: New files.
12357	* tune/speed.h, tune/speed.c, tune/common.c,tune/Makefile.am: Add them.
12358	* tune/tuneup.c: Tune SET_STR_THRESHOLD.
12359	(DEFAULT_MAX_SIZE): Renamed from MAX_SIZE, allow any param.max_size[].
12360
123612002-02-01  Torbjorn Granlund  <tege@swox.com>
12362
12363	* tests/mpz/convert.c: Increase operand size.  Add (yet disabled) code
12364	for testing with random strings.
12365
12366	* mpn/generic/get_str.c (mpn_get_str): Rewrite to become sub-quadratic.
12367	(mpn_dc_get_str, mpn_sb_get_str): New functions.
12368
123692002-01-31  Kevin Ryde  <kevin@swox.se>
12370
12371	* gmpxx.h (cmp): Renamed from "compare".
12372
12373	* configure.in (AC_C_BIGENDIAN): Don't abort when cross compiling.
12374	(PROLOGUE): Allow new style optional second parameter when grepping.
12375
12376	* acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
12377	GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
12378	Use $ac_objext for object filenames.
12379	(GMP_ASM_UNDERSCORE): Use CCAS to assemble.
12380
12381	* demos/pexpr-config-h.in: New file.
12382	* configure.in: Generate demos/pexpr-config.h.
12383	(AC_CHECK_FUNCS): Add clock, cputime, setrlimit, sigaction,
12384	sigaltstack, sigstack.
12385	* acinclude.m4 (GMP_SUBST_CHECK_FUNCS, GMP_SUBST_CHECK_HEADERS): New
12386	macros.
12387	* demos/pexpr.c: Use pexpr-config.h, not various #ifdefs.
12388	(setup_error_handler): Use signal if sigaction not available, allow
12389	for SIGBUS missing on mingw.
12390	(main): Use time() for random seed if gettimeofday not available.
12391	(cleanup_and_exit): Move SIGFPE out of LIMIT_RESOURCE_USAGE.
12392
123932002-01-30  Torbjorn Granlund  <tege@swox.com>
12394
12395	* mpn/generic/set_str.c: Rewrite to become sub-quadratic.
12396	(convert_blocks): New function.
12397
123982002-01-30  Kevin Ryde  <kevin@swox.se>
12399
12400	* gmp-impl.h (GMP_NUMB_MASK, GMP_NAIL_MASK, GMP_NUMB_HIGHBIT,
12401	ASSERT_MPN, ASSERT_MP_LIMB_T): New macros.
12402
12403	* mpn/generic/fib2_ui.c: Use GMP_NUMB_BITS, simplify the data
12404	generator program, share __gmp_fib_table initializers between bit
12405	sizes, cope with bit sizes other than those specifically setup.
12406	* gmp-impl.h (FIB_TABLE_LIMIT, FIB_TABLE_LUCNUM_LIMIT): Corresponding
12407	rearrangement of conditionals.
12408	* tests/mpz/t-fib_ui.c (check_fib_table): New test.
12409
124102002-01-28  Kevin Ryde  <kevin@swox.se>
12411
12412	* mpz/set_si.c, mpz/iset_si.c: Store to _mp_d[0] unconditionally, use
12413	an expression for _mp_size.
12414
12415	* mpz/init.c, mpz/init2.c, mpz/iset.c, mpq/init.c [__CHECKER__]: Store
12416	dummy values to low limbs to stop them appearing uninitialized.
12417
124182002-01-26  Kevin Ryde  <kevin@swox.se>
12419
12420	* mpfr/mpfr-test.h (MAX, MIN, ABS): Use instead a patch from Paul and
12421	Vincent.
12422
124232002-01-24  Kevin Ryde  <kevin@swox.se>
12424
12425	* configure.in: Extra quoting to get argument help messages right.
12426
12427	* gmp.texi (Efficiency): Suggest hex or octal for input and output.
12428	(Formatted Output Strings): Mention "*" for width and precision.
12429
12430	* mpn/generic/sizeinbase.c: New file, adapted from mpz/sizeinbase.c.
12431	Use POW2_P, use __mp_bases[base].big_base for log2(base).
12432	* configure.in, mpn/Makefile.am: Add it.
12433	* gmp-impl.h: Add prototype.
12434	* mpz/sizeinbase.c, tune/speed.h, mpn/generic/get_str.c,
12435	mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c: Use it.
12436	* mpz/get_str.c: Write directly to user buffer, skip at most one
12437	leading zero, eliminate special case for x==0.
12438	* mpbsd/mtox.c: Allocate exact result space at the start, eliminate
12439	special case for x==0.
12440	* mpbsd/mout.c: Only need to skip one high zero with mpn_sizeinbase.
12441
12442	* configure.in (--enable-nails): New option.
12443	(GMP_NAIL_BITS, GMP_LIMB_BITS, GMP_NUMB_BITS): New defines for gmp.h
12444	and config.m4.
12445	* gmp-h.in: Add templates.
12446
12447	* mpfr/mpfr-test.h (MAX, MIN, ABS): Use #ifndef to avoid a redefine
12448	error on AIX xlc.
12449
124502002-01-23  Torbjorn Granlund  <tege@swox.com>
12451
12452	* mpn/generic/get_str.c: Correct type of `out_len'.
12453
124542002-01-22  Kevin Ryde  <kevin@swox.se>
12455
12456	* mpn/generic/pre_divrem_1.c: Corrections to some ASSERTs.
12457
12458	* mpfr/mul_ui.c: Don't call mpn_lshift with 0 shift.
12459
12460	* mpfr/mpz_set_fr.c: Produce correct mpz_t for f==0.
12461
124622002-01-21  Torbjorn Granlund  <tege@swox.com>
12463
12464	* longlong.h (32-bit powerpc add_ssaaaa): Remove spurious commutative
12465	declaration.
12466	(64-bit powerpc add_ssaaaa): Likewise.
12467
124682002-01-20  Kevin Ryde  <kevin@swox.se>
12469
12470	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Use %n to better detect sparc
12471	solaris 2.7 problems.
12472
124732002-01-19  Torbjorn Granlund  <tege@swox.com>
12474
12475	* demos/pexpr.c (mpz_eval_expr): Optimize s^rhs for -1 <= s <= 1.
12476	(cleanup_and_exit): Improve error message wording.
12477
124782002-01-19  Kevin Ryde  <kevin@swox.se>
12479
12480	* mpfr/mpfr.h (_PROTO): Use __GMP_PROTO, for compatibility with
12481	gmp-impl.h.
12482
124832002-01-17  Torbjorn Granlund  <tege@swox.com>
12484
12485	* mpfr/mpfr-test.h: Test "__hpux", not "hpux".  Mask off mrand48
12486	return value to 31 bits to work around sloppy mpfr #include practices.
12487
12488	* mpfr/tests/*.c: Use #include "", not <>, for gmp.h and mpfr.h.
12489	Make sure to #include mpfr-test.h from all files that use random().
12490
124912002-01-17  Kevin Ryde  <kevin@swox.se>
12492
12493	* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE_TYPE): New macro.
12494	* gmp-impl.h, mpz/get_str.c, mpz/out_raw.c, mpq/get_str.c,
12495	mpq/set_str.c, mpf/get_str.c, printf/asprntffuns.c, printf/doprnt.c,
12496	printf/repl-vsnprintf.c, printf/snprntffuns.c, scanf/doscan.c,
12497	mpbsd/mtox.c: Some fixes to compile as C++.
12498
12499	* mpn/generic/jacbase.c (JACOBI_BASE_METHOD): New tuned parameter,
12500	replacing COUNT_TRAILING_ZEROS_TIME test.  Add a third method too.
12501	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
12502	measuring of mpn_jacobi_base methods.
12503	* tune/jacbase1.c, tune/jacbase2.c, tune/jacbase3.c: New files.
12504	* tune/tuneup.c (JACOBI_BASE_METHOD): Tune this.
12505	* mpn/x86/*/gmp-mparam.h (COUNT_TRAILING_ZEROS_TIME): Remove macro.
12506
12507	* gmp-h.in: Use __gmp prefix on variables in inlines.
12508
12509	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Remove __i, unused.
12510
12511	* mpn/generic/mul_fft.c: Use HAVE_NATIVE_mpn_addsub_n, not ADDSUB.
12512	Use CNST_LIMB for some constants.
12513
125142002-01-15  Kevin Ryde  <kevin@swox.se>
12515
12516	* tests/mpbsd/Makefile.am: Add a convenience rule for ../libtests.la.
12517
12518	* printf/Makefile.am: libdummy.la should be in EXTRA_LTLIBRARIES.
12519
12520	* mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and
12521	mpf_get_str give the same for ndigits==0.
12522
12523	* mpfr/exceptions.c (mpfr_set_emin, mpfr_set_emax): Work around a
12524	powerpc64 gcc 3.0 -O2 bug.
12525
12526	* tests/memory.c, tests/tests.h (tests_memory_validate): New function.
12527
125282002-01-14  Kevin Ryde  <kevin@swox.se>
12529
12530	* mpn/generic/sb_divrem_mn.c, mpn/generic/divrem_1.c,
12531	mpn/generic/divrem_2.c, mpn/generic/mod_1.c: Don't use UMUL_TIME and
12532	UDIV_TIME, just default to preinv.
12533	* gmp-impl.h (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Ditto.
12534	(DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD): Don't use UMUL_TIME
12535	and UDIV_TIME, make default thresholds 0.
12536	(UDIV_NORM_PREINV_TIME, UDIV_UNNORM_PREINV_TIME): Remove macros.
12537	* mpn/x86/*/gmp-mparam.h (UMUL_TIME, UDIV_TIME,
12538	UDIV_NORM_PREINV_TIME): Remove macros.
12539
12540	* gmp.texi (Headers and Libraries): New section, being the header
12541	notes from "GMP Basics" and some new stuff.
12542	(Parameter Conventions): Notes on "const" parameters.
12543	(Formatted Output Strings): Add type N, tweak some wording.
12544
12545	* tests/refmpn.c (refmpn_divmod_1c): Avoid a bug in i386 gcc 3.0.
12546
125472002-01-12  Kevin Ryde  <kevin@swox.se>
12548
12549	* mpz/root.c: Add <stdlib.h>, for abort().
12550
12551	* mpfr/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
12552	* mpfr/mpfr.h, mpfr/mpfr-tests.h, reuse.c, tadd.c, tadd_ui.c, tagm.c,
12553	tatan.c, tcmp2.c, tcos.c, tdiv.c, tdiv_ui.c, teq.c, texp.c,
12554	tget_str.c, thyperbolic.c, tlog.c, tmul.c, tout_str.c, tpow.c,
12555	trandom.c, tset_z.c, tsin.c, tsqrt.c, tsqrt_ui.c, tsub_ui.c, ttan.c,
12556	tui_div.c: Fixes for K&R.
12557
12558	* tests/misc/t-scanf.c (check_misc, check_misc):
12559
12560	* tests/mpz/t-inp_str.c, tests/mpq/t-inp_str.c, tests/misc/t-scanf.c:
12561	Avoid strings in ASSERT, not enjoyed by K&R.
12562	* gmp-impl.h (ASSERT): Note this.
12563
12564	* tests/tests.h (refmpn_mod_34lsub1): Add __GMP_PROTO.
12565
12566	* mpbsd/Makefile.am: Avoid an automake problem with ansi2knr and
12567	sources in a different directory.
12568
12569	* printf/repl-vsnprintf.c: Test HAVE_LONG_DOUBLE for long double.
12570
12571	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mod_34lsub1.c,
12572	mul_2.c, pre_divrem_1.c.
12573
12574	* gmp-h.in, gmp-impl.h (mpn_add_nc, mpn_addmul_1c, mpn_addsub_n,
12575	mpn_addsub_nc, mpn_divrem_1c, mpn_dump, mpn_mod_1c, mpn_mul_1c,
12576	mpn_mul_basecase, mpn_sqr_n, mpn_sqr_basecase, mpn_sub_nc,
12577	mpn_submul_1c): Move to gmp-impl.h, since they're undocumented.
12578
12579	* gmp-impl.h (mpn_reciprocal): Remove, unused.
12580
12581	* tune/many.pl (cntlz, cnttz): Use new SPEED_ROUTINE_COUNT_ZEROS.
12582
125832002-01-11  Kevin Ryde  <kevin@swox.se>
12584
12585	* mpn/hppa/*.asm, mpn/pa64/*.asm, mpn/pa64w/*.asm: Use L().
12586
125872002-01-08  Kevin Ryde  <kevin@swox.se>
12588
12589	* mpn/asm-defs.m4 (PROLOGUE, EPILOGUE): New scheme, optional function
12590	name to EPILOGUE, check for missing or wrong function name EPILOGUE.
12591	* mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/m68k/m68k-defs.m4,
12592	mpn/mips3/mips.m4, mpn/ia64/default.m4, mpn/powerpc32/aix.m4,
12593	mpn/powerpc64/aix.m4, mpn/x86/x86-defs.m4: Consequent updates, add a
12594	few more asserts.
12595	* mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/alpha/cntlz.asm,
12596	mpn/alpha/invert_limb.asm (PROLOGUE_GP): Change to an optional "gp"
12597	parameter on plain PROLOGUE.
12598
12599	* gmp.texi (Low-level Functions): mpn_get_str doesn't clobber an extra
12600	limb, and doesn't clobber at all for power of 2 bases.
12601	(Language Bindings): Add python gmpy.
12602
12603	* mpz/get_str.c: Determine realloc size arithmetically.
12604
12605	* mpbsd/mtox.c: Size memory block returned to actual space needed.
12606	* gmp.texi (BSD Compatible Functions): Describe this.
12607
12608	* mpz/get_str.c: Don't copy mpn_get_str input for power of 2 bases.
12609	* mpbsd/mtox.c: Ditto, and as a side effect avoid a memory leak from a
12610	missing TMP_FREE.
12611
12612	* mpz/get_str.c, mpbsd/mout.c: No longer need for +1 limb for
12613	mpn_get_str clobber.
12614
12615	* gmp-impl.h (MPN_GET_STR_SIZE): New macro.
12616	* mpn/generic/get_str.c, mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c,
12617	tune/speed.h: Use it.
12618	* tests/mpn/t-g_str_size.c: New test.
12619	* tests/mpn/Makefile.am: Add it.
12620
12621	* gmp-impl.h (POW2_P): New macro.
12622	* mpn/generic/get_str.c, tests/misc.c: Use it.
12623
12624	* printf/doprnt.c: Add "N" for mpn, share some code between N, Q and Z.
12625	* tests/misc/t-printf.c: Add tests.
12626	* gmp-impl.h (ASSERT_CODE): New macro.
12627
12628	* tests/mpbsd/t-mtox.c: New test.
12629	* tests/mpbsd/Makefile.am: Add it.
12630	(allfuns_LDADD): Don't link against libgmp when testing everything in
12631	libmp can link.
12632
126332002-01-07  Torbjorn Granlund  <tege@swox.com>
12634
12635	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Rewrite generic versions.
12636
126372002-01-06  Kevin Ryde  <kevin@swox.se>
12638
12639	* mpn/generic/pre_divrem_1.c: Don't support size==0.
12640	* tests/devel/try.c: Update.
12641
12642	* mpn/generic/get_str.c: Add special case for base==10.
12643	* gmp-impl.h (MP_BASES_CHARS_PER_LIMB_10, MP_BASES_BIG_BASE_10,
12644	MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): New
12645	constants.
12646	* tests/t-constants.c: Add checks.
12647	* mpn/mp_bases.c [GENERATE_TABLE]: Print defines for gmp-impl.h, print
12648	all standard bits-per-limb by default.
12649
12650	* demos/pexpr.c, demos/expr/expr.h, demos/expr/expr-impl.h: Use
12651	__GMP_PROTO.
12652
12653	* gmp-h.in (mpn_divexact_by3c): Remove variables from prototype, to
12654	keep out of application namespace.
12655
126562002-01-04  Torbjorn Granlund  <tege@swox.com>
12657
12658	* gmp-impl.h: Move _PROTO declaration to before its first usages.
12659
126602002-01-04  Kevin Ryde  <kevin@swox.se>
12661
12662	* gmp-h.in, mp-h.in, tests/tests.h: Rename _PROTO to __GMP_PROTO, and
12663	don't use #ifndef just define it ourselves.
12664	* gmp-impl.h: Provide _PROTO as an alias for __GMP_PROTO, to avoid big
12665	edits internally, for the moment.
12666
126672002-01-03  Torbjorn Granlund  <tege@swox.com>
12668
12669	* tune/speed.c (usage): Insert "\n\" into a string.
12670
126712001-12-30  Torbjorn Granlund  <tege@swox.com>
12672
12673	* mpn/pa64/udiv_qrnnd.c: Remove file.
12674	* mpn/pa64w/udiv_qrnnd.c: Remove file.
12675
12676	* gmp-impl.h (MPN_IORD_U): Change formatting (labels in pos 0, insns
12677	indented by tab).
12678	(MPN_INCR_U): Use "addl $1,foo; jc", not "incl foo; jz".
12679
12680	* gmp-impl.h (udiv_qrnnd_preinv): Use plain subtract, not sub_ddmmss,
12681	in one more case.
12682
126832001-12-30  Kevin Ryde  <kevin@swox.se>
12684
12685	* mpn/generic/get_str.c (udiv_qrnd_unnorm): New macro.
12686	Use "do while" for dig_per_u loop since it's non-zero.
12687	* acconfig.h (HAVE_HOST_CPU_m68k etc): Add templates.
12688
12689	* mpn/generic/mul_basecase.c, mpz/mul.c, mpz/n_pow_ui.c,
12690	mpn/x86/pentium/mul_2.asm, tests/devel/try.c, tests/tests.h,
12691	tests/refmpn.c, tune/speed.c, tune/speed.h, tune/common.c,
12692	tune/many.pl (mpn_mul_2): New parameter style.
12693	* gmp-impl.h (mpn_mul_2): Add prototype.
12694	* configure.in (gmp_mpn_functions_optional): Add mul_2.
12695
12696	* longlong.h (__vxworks__): Remove from powerpc tests, not correct,
12697	not on its own at least.
12698
12699	* tune/speed.c: Add "aas" to specify 0xAA..AA data.
12700
12701	* tune/tuneup.c (print_define_end): Indicate "never" and "always".
12702
127032001-12-29  Torbjorn Granlund  <tege@swox.com>
12704
12705	* mpq/set_d.c: ANSI-fy.
12706	* mpz/invert.c: Use PTR and SIZ (cosmetic change).
12707
12708	* mpz/cong.c: Rename `xor' to `sign' to avoid C++ reserved word.
12709
127102001-12-28  Torbjorn Granlund  <tege@swox.com>
12711
12712	* mpn/sparc64/sqr_diagonal.asm: New file.
12713
127142001-12-28  Kevin Ryde  <kevin@swox.se>
12715
12716	* mpn/generic/get_str.c: Avoid one mpn_divrem_1 by running main loop
12717	only until msize==1.
12718
12719	* tune/tuneup.c: Break up all() for clarity.
12720	(USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Compare against plain
12721	division udiv_qrnnd, not the tuned and possibly preinv version.
12722
12723	* tune/freq.c: Split sysctl and sysctlbyname probes into separate
12724	functions, shorten some identifiers, put descriptions inside
12725	functions, define functions unconditionally and do nothing if
12726	requisites not available.
12727
12728	* mpz/inp_raw.c: Avoid a gcc 3.0 powerpc64 bug on AIX.
12729
12730	* acinclude.m4, configure.in (GMP_C_RESTRICT): New macro.
12731
12732	* mpfr/sin.c: Patch from Paul to fix sign of sin(3pi/2).
12733
12734	* demos/calc/calc.y: Improve some error messages.
12735
127362001-12-28  Torbjorn Granlund  <tege@swox.com>
12737
12738	* mpn/sparc64/mul_1.asm: Rename r72 -> r80.
12739	* mpn/sparc64/addmul_1.asm: Likewise.
12740
127412001-12-27  Torbjorn Granlund  <tege@swox.com>
12742
12743	* mpn/generic/tdiv_qr.c: Misc formatting cleanups.
12744	For switch case 2, replace `dn' with its value (2).
12745
127462001-12-25  Torbjorn Granlund  <tege@swox.com>
12747
12748	* tests/devel/mul_1.c: Add FIXED_XLIMB.
12749	* tests/devel/addmul_1.c: Likewise.
12750	* tests/devel/submul_1.c: Likewise.
12751
12752	* tests/devel/add_n.c: Improve error message.
12753	Accept command line argument for # of tests.
12754	* tests/devel/sub_n.c: Likewise.
12755
12756	* tests/devel/: Remove CLOCK settings.
12757
12758	* mpn/sparc32/v9/mul_1.asm: Rewrite.
12759	* mpn/sparc32/v9/addmul_1.asm: Rewrite.
12760	* mpn/sparc32/v9/submul_1.asm: Rewrite.
12761
127622001-12-24  Torbjorn Granlund  <tege@swox.com>
12763
12764	* mpn/sparc64/mul_1.asm: Get rid of global constant 0.0 (L(noll)).
12765	* mpn/sparc64/addmul_1.asm: Likewise.
12766
127672001-12-23  Torbjorn Granlund  <tege@swox.com>
12768
12769	* mpn/generic/get_str.c: Move final ASSERT to just before zero fill
12770	loop.
12771
127722001-12-22  Torbjorn Granlund  <tege@swox.com>
12773
12774	* mpn/generic/get_str.c: Move ASSERTs out of loops.  Split digit
12775	generation code into two loops, saving a test of msize in the loop.
12776
127772001-12-22  Kevin Ryde  <kevin@swox.se>
12778
12779	* mpn/x86/x86-defs.m4, mpn/x86/*/*.asm: Remove L / LF scheme putting
12780	function name in local labels.
12781
12782	* mpn/generic/get_str.c: Use mpn_preinv_divrem_1, add a couple of
12783	ASSERTs.
12784
12785	* mpn/generic/pre_divrem_1.c: New file.
12786	* configure.in (gmp_mpn_functions): Add it.
12787	* gmp-impl.h (mpn_preinv_divrem_1): Add prototype.
12788	(USE_PREINV_DIVREM_1, MPN_DIVREM_OR_PREINV_DIVREM_1): New macros.
12789	* tests/devel/try.c, tune/speed.c, tune/speed.h, tune/common.c,
12790	tune/many.pl, tune/Makefile.am (mpn_preinv_divrem_1): Add testing and
12791	measuring.
12792	* tune/tuneup.c: Determine USE_PREINV_DIVREM_1.
12793	* tune/pre_divrem_1.c: New file.
12794	* tests/refmpn.c, tests/tests.h (refmpn_preinv_divrem_1): New function.
12795
12796	* tests/mpz/t-io_raw.c: New file.
12797	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
12798
12799	* mpz/inp_raw.c, mpz/out_raw.c: Rewrite.
12800	* acinclude.m4, configure.in (AC_C_BIGENDIAN): New test.
12801	* gmp-impl.h (BSWAP_LIMB): New macro.
12802
12803	* acinclude.m4 (GMP_PROG_CC_WORKS): For a native compile, demand
12804	executables will run, per AC_PROG_CC.  This detects ABI=64 is unusable
12805	in a native sparc solaris 7 build with the kernel in 32-bit mode.
12806	* gmp.texi (ABI and ISA): Add notes on this, add an example configure
12807	setting an ABI.
12808
12809	* tune/tuneup.c, configure.in: Print the gmp-mparam.h filename.
12810	* tune/tuneup.c: Print the CPU frequency.
12811
12812	* tune/time.c, tune/speed.h: Add s390 "stck" method, flatten
12813	conditionals in speed_time_init a bit, use have_* variables to let
12814	some code go dead in speed_starttime and speed_endtime.
12815
12816	* tune/freq.c (speed_cpu_frequency_irix_hinv): New function.
12817
12818	* Makefile.am, configure.in: Restore mpfr.
12819
12820	* configure.in: Add --with-readline, AC_PROG_YACC and AM_PROG_LEX.
12821	* demos/calc/calc.y, demos/calc/calclex.l: Add readline support, add
12822	lucnum function.
12823	* demos/calc/Makefile.am: Add calcread.c, calc-common.h, use $(YACC),
12824	$(LEX) and $(LEXLIB).
12825	* demos/calc/calcread.c, demos/calc/calc-common.h,
12826	demos/calc/calc-config-h.in, demos/calc/README: New files.
12827
12828	* configure.in: Put demos/expr configs in expr-config.h.
12829	* demos/expr/expr-config-h.in: New file.
12830	* demos/expr/expr-impl.h: Renamed from expr-impl-h.in, get configs
12831	from expr-config.h.
12832	* demos/expr/Makefile.am: Update.
12833
12834	* demos/expr/exprfr.c: Use mpfr_sin and mpfr_cos, remove some spurious
12835	returns.
12836
128372001-12-20  Torbjorn Granlund  <tege@swox.com>
12838
12839	* mpn/sparc64/mul_1.asm: Trim an instruction.
12840	* mpn/sparc64/addmul_1.asm: Likewise.
12841
12842	* mpn/ia64/add_n.asm: Rewrite.
12843	* mpn/ia64/sub_n.asm: Rewrite.
12844
128452001-12-19  Torbjorn Granlund  <tege@swox.com>
12846
12847	* mpn/ia64/mul_1.asm: Rewrite.
12848	* mpn/ia64/addmul_1.asm: Rewrite.
12849	* mpn/ia64/submul_1.c: Use TMP_ALLOC_LIMBS.
12850
12851	* tests/devel/mul_1.c: Improve error message.
12852	Accept command line argument for # of tests.
12853	* tests/devel/addmul_1.c: Likewise.
12854	* tests/devel/submul_1.c: Likewise.
12855
128562001-12-18  Torbjorn Granlund  <tege@swox.com>
12857
12858	* mpn/mips3/mul_1.asm: Add NOPs to save a cycle on R1x000.
12859
128602001-12-18  Kevin Ryde  <kevin@swox.se>
12861
12862	* gmpxx.h (gmp_randclass): Don't allow copy constructors or "=",
12863	implementation by Gerardo.
12864
12865	* gmp-h.in (operator<<, operator>>): Remove parameter names from
12866	prototypes, to keep out of user namespace.
12867
12868	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Let the test program work as C++.
12869
128702001-12-16  Torbjorn Granlund  <tege@swox.com>
12871
12872	* mpn/sparc64/mul_1.asm: Rewrite.
12873	* mpn/sparc64/addmul_1.asm: Rewrite.
12874	* mpn/sparc64/submul_1.asm: Rewrite.
12875
12876	* mpn/sparc64/addmul1h.asm: Remove.
12877	* mpn/sparc64/submul1h.asm: Remove.
12878	* mpn/sparc64/mul1h.asm: Remove.
12879
128802001-12-15  Kevin Ryde  <kevin@swox.se>
12881
12882	* gmp-h.in (mpn_add, mpn_add_1, mpn_cmp, mpn_sub, mpn_sub_1): Follow
12883	__GMP_INLINE_PROTOTYPES for whether to give prototype with inline.
12884
12885	* configure.in (i686*-*-*, pentiumpro-*-*, pentium[23]-*-*,
12886	athlon-*-*, pentium4-*-*): Fall back on -march=pentium if
12887	-march=pentiumpro or higher is not good (eg. solaris cmov).
12888
128892001-12-12  Torbjorn Granlund  <tege@swox.com>
12890
12891	* gmp-impl.h (MPN_ZERO): Rewrite generic version to be similar to
12892	powerpc version.
12893
128942001-12-12  Kevin Ryde  <kevin@swox.se>
12895
12896	* acinclude.m4 (GMP_PROG_CC_WORKS): Detect cmov problems with gcc
12897	-march=pentiumpro on solaris 2.8.
12898
12899	* tune/common.c, tune/speed.h: Allow for commas in count_leading_zeros
12900	and count_trailing_zeros macros.
12901
12902	* demos/expr/Makefile.am: Distribute exprfr.c and exprfra.c.
12903
12904	* tune/Makefile.am (speed_ext_SOURCES): Should be speed-ext.c.
12905
129062001-12-10  Torbjorn Granlund  <tege@swox.com>
12907
12908	* mpn/s390/addmul_1.asm: New file.
12909	* mpn/s390/submul_1.asm: New file.
12910	* mpn/s390/mul_1.asm: New file.
12911	* mpn/s390/gmp-mparam.h: Update.
12912
129132001-12-07  Kevin Ryde  <kevin@swox.se>
12914
12915	* gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start of
12916	prototypes, for the benefit of Microsoft C.
12917
12918	* gmp.texi (Introduction to GMP): Mention ABI and ISA section.
12919	(Known Build Problems): Recommend GNU sed on solaris 2.6.
12920	(Assigning Integers): Direct feedback to bug-gmp.
12921	(References): Typo Knuth vol 2 is from 1998.
12922
12923	* gmpxx.h (gmp_randclass): Add initializers for gmp_randinit_default
12924	and gmp_randinit_lc_2exp_size.
12925	gmp.texi (C++ Interface Random Numbers): Describe them.
12926
12927	* tests/misc/t-locale.c, tests/cxx/t-locale.cc: Ensure mpf_clear is
12928	done when the localconv override doesn't work.  Reported by Mike
12929	Jetzer.
12930
12931	* printf/doprnti.c: Don't showbase on a zero mpq denominator.
12932	* tests/misc/t-printf.c, tests/cxx/t-ostream.c: Add test cases.
12933
129342001-12-04  Kevin Ryde  <kevin@swox.se>
12935
12936	* gmp.texi (Known Build Problems): Update to gmp_randinit_lc_2exp_size
12937	for the sparc solaris 2.7 problem.
12938	(Reentrancy): SCO ctype.h affects all text-based input functions.
12939	(Formatted Output Strings): Correction to the mpf example.
12940	(Single Limb Division): Correction, should be q-1 not q+1.
12941	(Extended GCD): Clarify why single-limb is inferior.
12942	(Raw Output Internals): Clarify size is twos complement, note limb
12943	order means _mp_d doesn't get directly read or written.
12944	(Contributors): Clarify mpz_jacobi.
12945	And a couple of formatting tweaks elsewhere.
12946
12947	* tests/cxx/t-headers.cc: New file.
12948	* tests/cxx/Makefile.am: Add it.
12949
12950	* gmpxx.h: Add <strstream>, needed by mpf_class::get_str2.
12951
12952	* gmp-h.in (mpq_inp_str, mpn_hamdist): Add __GMP_DECLSPEC.
12953
129542001-12-01  Torbjorn Granlund  <tege@swox.com>
12955
12956	* Version 4.0 released.
12957
12958	* mpfr/README: Replace contents with explanation of why mpfr is gone.
12959
129602001-12-01  Kevin Ryde  <kevin@swox.se>
12961
12962	* Makefile.am, configure.in: Temporarily remove mpfr, just leave a
12963	README.
12964
12965	* mpn/Makefile.am (EXTRA_DIST): Add Makeasm.am.
12966
129672001-11-30  Gerardo Ballabio  <ballabio@sissa.it>
12968
12969	* tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: New files.
12970	* tests/cxx/Makefile.am (check_PROGRAMS): Add them.
12971
129722001-11-30  Kevin Ryde  <kevin@swox.se>
12973
12974	* mpfr: Update to 2001-11-16.  Patch TMP handling of agm.c and sqrt.c,
12975	use plain mpn_sqrtrem in sqrt.c, separate .c files for floor and ceil,
12976	disable an expression style assert in add1.c.
12977
12978	* mpn/s370: Rename to s390.
12979	* configure.in (s3[6-9]0*-*-*): Update.
12980	* mpn/Makefile.am (TARG_DIST): Add s390.
12981
12982	* mpz/fits_s.c, mpf/fits_s.c, mpf/fits_u.c: Remove files, unused since
12983	change to .h style.
12984
129852001-11-29  Torbjorn Granlund  <tege@swox.com>
12986
12987	* gmp-h.in: Declare mpz_get_d_2exp and mpf_get_d_2exp.
12988	* Makefile.am: Add mpz/get_d_2exp$U.lo and mpf/get_d_2exp$U.lo.
12989	* mpf/Makefile.am: Add get_d_2exp.c.
12990	* mpz/Makefile.am: Add get_d_2exp.c.
12991
129922001-11-29  Kevin Ryde  <kevin@swox.se>
12993
12994	* mpn/*/gmp-mparam.h: Update measured thresholds.
12995	* mpn/s370/gmp-mparam.h: New file.
12996
12997	* mpz/millerrabin.c: Mark for internal use only, for now.
12998	* gmp.texi (Number Theoretic Functions): Remove documentation.
12999
130002001-11-28  Torbjorn Granlund  <tege@swox.com>
13001
13002	* mpf/get_d_2exp.c: New file.
13003	* mpz/get_d_2exp.c: New file.
13004
13005	* mpz/realloc2.c: Fix typo.  Make more similar to mpz_realloc.
13006	* mpz/realloc.c: Use __GMP_REALLOCATE_FUNC_LIMBS.
13007
130082001-11-27  Gerardo Ballabio  <ballabio@sissa.it>
13009
13010	* gmpxx.h, mpfrxx.h: Various updates and improvements.
13011
130122001-11-27  Kevin Ryde  <kevin@swox.se>
13013
13014	* gmp.texi (Useful Macros and Constants): Add gmp_version, add @findex
13015	for mp_bits_per_limb.
13016
13017	* demos/perl/GMP.pm, demos/perl/GMP.xs: Use new style gmp_randinit's.
13018	* demos/perl/test.pl: Update for this, and for mpz_perfect_power_p
13019	handling of 0 and 1.
13020
130212001-11-26  Torbjorn Granlund  <tege@swox.com>
13022
13023	* mpz/realloc.c: Clear variable when decreasing allocation to less than
13024	needed.  Misc updates.
13025
130262001-11-25  Kevin Ryde  <kevin@swox.se>
13027
13028	* tests/misc/t-locale.c: Avoid printf in the normal case, since the
13029	replacement localeconv breaks it on SunOS 4.
13030
13031	* gmp.texi (Build Options, Notes for Package Builds): Note libgmpxx
13032	depends on libgmp from same GMP version.
13033
13034	* acinclude.m4, configure.in (GMP_FUNC_SSCANF_WRITABLE_INPUT): New
13035	test.
13036	* scanf/sscanf.c, scanf/vsscanf.c: Use it to ensure sscanf input is
13037	writable, if necessary.
13038
13039	* tests/misc/t-scanf.c: Ensure sscanf arguments are writable, always.
13040	* configure.in (AC_CHECK_DECLS): Remove sscanf, no longer required.
13041
13042	* configure.in (none-*-*): Fix default CFLAGS setups.
13043
13044	* doc/configuration: Misc updates.
13045
130462001-11-23  Kevin Ryde  <kevin@swox.se>
13047
13048	* mpz/init2.c, mpz/realloc2.c: New files.
13049	* Makefile.am, mpz/Makefile.am: Add them.
13050	* gmp-h.in: Add prototypes.
13051	* gmp.texi (Efficiency): Mention these instead of _mpz_realloc.
13052	(Initializing Integers): Add documentation, reword other parts.
13053
130542001-11-22  Torbjorn Granlund  <tege@swox.com>
13055
13056	* mpn/cray/ieee/addmul_1.c: Fix logic for more_carries scalar loop.
13057	* mpn/cray/ieee/submul_1.c: Likewise.
13058
130592001-11-20  Kevin Ryde  <kevin@swox.se>
13060
13061	* gmp.texi (Known Build Problems): Note an out of memory on DJGPP.
13062	(Function Classes): Update function counts.
13063	Misc tweaks elsewhere.
13064
13065	* configure.in (AC_CHECK_DECLS): Add sscanf.
13066	* tests/misc/t-scanf.c: Use it, for the benefit of SunOS 4.
13067
13068	* tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREE
13069	consistency.
13070
13071	* mpfr/Makefile.am (AR): Explicit AR=@AR@ to override automake
13072	default, necessary for powerpc64 ABI=aix64.
13073
130742001-11-18  Torbjorn Granlund  <tege@swox.com>
13075
13076	* mpz/powm.c: Move TMP_MARK to before any TMP_ALLOCs.
13077
130782001-11-18  Kevin Ryde  <kevin@swox.se>
13079
13080	* configure.in (--enable-fft): Make this the default.
13081	* gmp.texi (Build Options): Update.
13082
13083	* Makefile.am (libmp_la_DEPENDENCIES): Revise mpz objects needed by
13084	new mpz/powm.c.
13085
13086	* gmp.texi (Random State Initialization): Add gmp_randinit_default and
13087	gmp_randinit_lc_2exp_size, mark gmp_randinit as obsolete.
13088	(Random State Seeding): New section, taken from "Random State
13089	Initialization" and "Random Number Functions".
13090
13091	* configure.in (AC_CHECK_DECLS): Add fgetc, fscanf, ungetc.
13092	* scanf/fscanffuns.c: Use these, for the benefit of SunOS 4.
13093
13094	* gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back to
13095	gmp-impl.h now not required for inlined mpf.
13096
13097	* randlc2s.c (gmp_randinit_lc_2exp_size): New file, the size-based LC
13098	selection from rand.c.
13099	* rand.c (gmp_randinit): Use it.
13100	* randdef.c (gmp_randinit_default): New file.
13101	* gmp-impl.h (RANDS): Use it.
13102	(ASSERT_CARRY): New macro.
13103	* gmp-h.in (gmp_randinit_default, gmp_randinit_lc_2exp_size: Add
13104	prototypes.
13105	* Makefile.am (libgmp_la_SOURCES): Add randdef.c and randlc2s.c.
13106
13107	* printf/asprntffuns.c: Include config.h before using its defines.
13108
13109	* gmp-impl.h: Move C++ <string> to top of file to avoid the memset
13110	redefine upsetting configure tests.  Remove <iostream> since <iosfwd>
13111	in gmp.h suffices.
13112
131132001-11-16  Kevin Ryde  <kevin@swox.se>
13114
13115	* gmp.texi (Integer Exponentiation): mpz_powm supports negative
13116	exponents.
13117	(Assigning Floats, I/O of Floats, C++ Formatted Output, C++ Formatted
13118	Input): Decimal point follows locale.
13119	(Formatted Output Strings): %n accepts any type.
13120	(Formatted Input Strings): New section.
13121	(Formatted Input Functions): New section.
13122	(C++ Class Interface): Corrections and clarifications suggested by
13123	Gerardo.
13124
13125	* scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
13126	scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c,
13127	scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files.
13128	* gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent
13129	additions.
13130
13131	* tests/misc: New directory.
13132	* tests/misc/Makefile.am: New file.
13133	* tests/misc/t-locale.c: New file.
13134	* tests/misc/t-printf.c: Moved from tests/printf.
13135	* tests/printf: Remove directory.
13136	* configure.in, tests/Makefile.am: Update.
13137
13138	* tests/cxx/t-locale.cc: New file.
13139	* tests/cxx/Makefile.am: Add it.
13140
13141	* mpf/set_str.c, cxx/ismpf.cc: Use localeconv for the decimal point.
13142
13143	* acinclude.m4 (GMP_ASM_X86_MCOUNT): Update to $lt_prog_compiler_pic
13144	for current libtool, recognise non-PIC style mcount in windows DLLs.
13145
13146	* gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.
13147
13148	* gmp-impl.h (__gmp_rands, __gmp_rands_initialized,
13149	modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test
13150	programs using them from a windows DLL.
13151	* longlong.h (__clz_tab): Ditto.
13152
13153	* mpn/x86/t-zdisp2.pl: New file.
13154
13155	* mpn/x86/pentium4/README: New file.
13156
131572001-11-15  Torbjorn Granlund  <tege@swox.com>
13158
13159	* mpz/powm.c (HANDLE_NEGATIVE_EXPONENT): #define to 1.
13160	* tests/mpz/reuse.c (main): Use mpz_invert to avoid undefined mpz_powm
13161	cases.
13162
131632001-11-14  Torbjorn Granlund  <tege@swox.com>
13164
13165	* mpz/powm_ui.c: Rewrite along the lines of mpz/powm.c (except still no
13166	redc).
13167	* mpz/powm.c: Adjust for negative b, after exponentiation done.  Add
13168	(still disabled) code for handling negative exponents.  Misc cleanups.
13169
131702001-11-14  Kevin Ryde  <kevin@swox.se>
13171
13172	* mpf/out_str.c: Use localeconv for the decimal point.
13173
13174	* tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
13175	available (eg. on mingw).
13176
131772001-11-11  Kevin Ryde  <kevin@swox.se>
13178
13179	* gmp-h.in: Remove parameter names from prototypes, to keep out of
13180	application namespace.
13181
131822001-11-08  Kevin Ryde  <kevin@swox.se>
13183
13184	* acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
13185	Solaris 8.
13186
13187	* printf/doprnt.c: Support %n of all types, per glibc.
13188
13189	* gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,
13190	mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c,
13191	mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order
13192	to leave open the possibility of keeping binary compatibility if mpf
13193	becomes mpfr.
13194
13195	* mpn/x86/k7/mmx/lshift.asm, mpn/x86/k7/mmx/rshift.asm: Use Zdisp to
13196	force code size for computed jumps.
13197	* mpn/x86/k6/mod_34lsub1.asm, mpn/x86/k6/k62mmx/copyd.asm: Use Zdisp
13198	to force good code alignment.
13199	* mpn/x86/x86-defs.m4 (Zdisp): More instructions.
13200
13201	* mpn/x86/pentium/sqr_basecase.asm, mpn/x86/k7/mmx/mod_1.asm,
13202	mpn/x86/k7/mmx/popham.asm: Remove some unnecessary "0" address offsets.
13203
13204	* mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
13205
132062001-11-07  Torbjorn Granlund  <tege@swox.com>
13207
13208	* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Work around gas bug.
13209
13210	* mpn/asm-defs.m4 (PROLOGUE): Change alignment to 8 (probably a good
13211	idea in general; required for hppa/hppa1_1/udiv_qrnnd.asm).
13212
132132001-11-06  Torbjorn Granlund  <tege@swox.com>
13214
13215	* gmp-impl.h (MPN_COPY_INCR): Prepend local variable by `__'.
13216	(MPN_COPY_DECR): Likewise.
13217
132182001-11-05  Torbjorn Granlund  <tege@swox.com>
13219
13220	* mpz/powm.c: Call mpn functions, not mpz functions, for computation
13221	mod m.  Streamline allocations to use a mixture of stack allocation and
13222	heap allocation.  Add currently disabled phi(m) exponent reduction
13223	code.  Misc optimizations and cleanups.
13224
132252001-11-05  Kevin Ryde  <kevin@swox.se>
13226
13227	* mpq/inp_str.c: Remove unused variable "ret".
13228
13229	* mpn/x86/k7/sqr_basecase.asm: Fix a 0(%edi) to use Zdisp, so the
13230	computed jumps hit the right spot on old gas.
13231
13232	* mpq/canonicalize.c: DIVIDE_BY_ZERO if denominator is zero.
13233
13234	* mpn/lisp/gmpasm-mode.el (comment-start-skip): Correction to the way
13235	the first \( \) pair is setup.
13236	(gmpasm-font-lock-keywords): Don't fontify the space before a "#" etc.
13237	Misc tweaks to some comments.
13238
132392001-11-03  Torbjorn Granlund  <tege@swox.com>
13240
13241	* tests/refmpn.c (refmpn_overlap_p): Reverse return values.
13242
132432001-11-02  Kevin Ryde  <kevin@swox.se>
13244
13245	* tune/many.pl: Setup CFLAGS_PIC and ASMFLAGS_PIC, since that's no
13246	longer done by configure.
13247
13248	* mpn/x86/pentium4/mmx/popham.asm: New file.
13249
13250	* mpn/x86/x86-defs.m4 (psadbw): New macro.
13251	* mpn/x86/k7/mmx/popham.asm: Use it.
13252
13253	* tests/refmpn.c (refmpn_overlap_p): New function, independent of
13254	MPN_OVERLAP_P.
13255
132562001-10-31  Torbjorn Granlund  <tege@swox.com>
13257
13258	* tests/mpz/t-powm.c: Print proper error message when finding
13259	discrepancy.
13260
132612001-10-31  Kevin Ryde  <kevin@swox.se>
13262
13263	* mpn/x86/pentium/mod_34lsub1.asm: New file.
13264	* mpn/x86/k7/mod_34lsub1.asm: New file.
13265	* mpn/x86/mod_34lsub1.asm: New file.
13266
132672001-10-30  Kevin Ryde  <kevin@swox.se>
13268
13269	* tests/printf/t-printf.c (check_misc): Add checks from the glibc docs.
13270	(check_vasprintf, check_vsnprintf): Run these unconditionally.
13271
13272	* gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.
13273	* mpq/cmp.c, mpq/cmp_si.c, mpq/cmp_ui.c, mpq/equal.c: Add ASSERTs for
13274	canonical inputs, where correctness depends on it.
13275
13276	* mpn/lisp/gmpasm-mode.el (comment-start-skip): Add "dnl".
13277
132782001-10-27  Torbjorn Granlund  <tege@swox.com>
13279
13280	* demos/pexpr.c: Remove some unused variables.
13281	(main): Allocate more buffer space to accommodate minus sign.
13282
132832001-10-27  Kevin Ryde  <kevin@swox.se>
13284
13285	* gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.h,
13286	tune/speed.c, tune/common.c, tune/many.pl, tests/devel/try.c: Add
13287	mpn_mod_34lsub1.
13288	* tests/refmpn.c, tests/tests.h (refmpn_mod_34lsub1): New function.
13289
13290	* mpn/generic/mod_34lsub1.c: New file.
13291	* mpn/x86/k6/mod_34lsub1.asm: New file.
13292	* mpn/x86/pentium4/sse2/mod_34lsub1.asm: New file.
13293	* mpn/x86/x86-defs.m4 (Zdisp): Add another instruction.
13294
13295	* gmp-h.in, gmpxx.h: Use <iosfwd> not whole <iostream>.
13296
13297	* gmp.texi (Known Build Problems): Add note on test programs with
13298	Windows DLLs.
13299
133002001-10-26  Kevin Ryde  <kevin@swox.se>
13301
13302	* tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
13303
13304	* gmp.texi (maybepagebreak): New macro, use it in a few places.
13305	(Notes for Particular Systems): C++ Windows DLLs are not supported.
13306	(Known Build Problems): Note sparc solaris 2.7 gcc 2.95.2 shared
13307	library problems.
13308	(Autoconf): Tweak version numbers shown.
13309	(Integer Roots): mpz_perfect_square_p and mpz_perfect_power_p consider
13310	0 and 1 perfect powers, mpz_perfect_power_p accepts negatives.
13311	(Number Theoretic Functions): Add mpz_millerrabin, combined with a
13312	reworded mpz_probab_prime_p.
13313	(Formatted Output Strings): Misc clarifications.
13314	(Formatted Output Functions): gmp_asprintf, gmp_vasprintf,
13315	gmp_snprintf, gmp_vsnprintf always available.
13316	(C++ Formatted Output): Misc rewordings.
13317	(Formatted Input): New chapter.
13318	(C++ Class Interface): New chapter, by Gerardo and me.
13319	(Language Bindings): Update GMP++ now in GMP.
13320	(C++ Interface Internals): New section, by Gerardo and me.
13321
13322	* printf/repl-vsnprintf.c: New file.
13323	* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am: Use it
13324	if libc vsnprintf missing or bad.
13325	* configure.in (AC_CHECK_FUNCS): Add strnlen.
13326
13327	* printf/snprntffuns.c, printf/vasprintf.c: Use
13328	__gmp_replacement_vsnprintf if libc vsnprintf not available.
13329	* printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
13330	printf/vsnprintf.c: Provide these functions unconditionally.
13331	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Remove warning about omissions
13332	when vsnprintf not available.
13333
133342001-10-24  Kevin Ryde  <kevin@swox.se>
13335
13336	* configure, aclocal.m4: Regenerate with a libtool patch for a stray
13337	quote in AC_LIBTOOL_PROG_LD_SHLIBS under mingw and cygwin.
13338
13339	* gmp-impl.h (modlimb_invert): More comments.
13340
13341	* printf/doprnt.c, printf/doprnti.c: Use the precision field to print
13342	leading zeros.
13343	* tests/printf/t-printf.c: Test this.
13344	* cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<.
13345
13346	* tune/speed.c, tune/speed.h, tune/common.c: Add mpn_mul_1_inplace.
13347
133482001-10-23  Torbjorn Granlund  <tege@swox.com>
13349
13350	* mpz/pprime_p.c (mpz_millerrabin): Remove function and its descendant.
13351
13352	* mpz/millerrabin.c: New file with code from pprime.c.
13353	* mpz/Makefile.am: Compile millerrabin.c.
13354	* Makefile.am (MPZ_OBJECTS): Ditto.
13355	* gmp-h.in: Declare mpz_millerrabin.
13356
133572001-10-22  Torbjorn Granlund  <tege@swox.com>
13358
13359	* tests/mpz/t-perfsqr.c: New file.
13360	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
13361
13362	* demos/factorize.c (factor): Check for number to factor == 0.
13363	(main): When invoked without arguments, read from stdin.
13364
13365	* mpz/perfpow.c: Add code to handle negative perfect powers ((-b)^odd).
13366	Treat 0 and 1 as perfect powers.
13367
13368	* mpn/sparc32/v9/sqr_diagonal.asm: Jump past .align.
13369
133702001-10-21  Torbjorn Granlund  <tege@swox.com>
13371
13372	* mpn/generic/perfsqr.c (sq_res_0x100): Remove bogus final `,'.
13373	(mpn_perfect_square_p): Suppress superfluous `&1' in sq_res_0x100 test.
13374	(mpn_perfect_square_p, O(n) test): Improve comments.  Combine remainder
13375	tests for some small primes.  Don't share code for different limb
13376	sizes.  Use single `if' with many `||' for better code density.
13377
133782001-10-22  Kevin Ryde  <kevin@swox.se>
13379
13380	* demos/perl/GMP.xs (mutate_mpz, tmp_mpf_grow): Make these "static".
13381
13382	* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm
13383	(mpn_popcount_table): Use GSYM_PREFIX.
13384
133852001-10-19  Kevin Ryde  <kevin@swox.se>
13386
13387	* mpn/x86/*.asm: Add some measured speeds on various x86s.
13388
13389	* tests/mpz/reuse.c, tests/mpf/reuse.c: Disable tests when using a
13390	windows DLL, because certain global variable usages won't compile.
13391
13392	* configure.in (AC_CHECK_FUNCS): Add alarm.
13393	* tests/spinner.c: Conditionalize alarm and SIGALRM availability, for
13394	the benefit of mingw32.
13395
13396	* acinclude.m4 (GMP_ASM_TYPE, GMP_ASM_SIZE): Suppress .type and .size
13397	on COFF.
13398
13399	* acinclude.m4 (GMP_PROG_HOST_CC): New macro.
13400	* configure.in: Use it for windows DLL cross-compiles.
13401	* aclocal.m4, configure: Regenerate with libtool patch to hold HOST_CC
13402	in the generated libtool script.
13403
13404	* aclocal.m4, configure: Regenerate with libtool patch to suppress
13405	warnings when probing command line limit on FreeBSD.
13406
13407	* demos/qcn.c (M_PI): Define if not already provided, helps mingw32.
13408
134092001-10-17  Kevin Ryde  <kevin@swox.se>
13410
13411	* printf/doprnt.c: Use <stdint.h> for intmax_t.
13412
13413	* longlong.h: Recognise __sparcv8 for gcc on Solaris.  Reported by
13414	Mark Mentovai <mark@mentovai.com>.
13415
13416	* gmp-impl.h (gmp_allocated_string): No need for inline on member funs.
13417
134182001-10-16  Kevin Ryde  <kevin@swox.se>
13419
13420	* gmp.texi (Debugging): Add mpatrol.
13421	(Integer Comparisons, Comparing Rationals, Float Comparison): Index
13422	entries for sign tests.
13423	(I/O of Floats): Clarify mpf_out_str exponent is in decimal.
13424	(C++ Formatted Output): mpf_t operator<< exponent now in decimal.
13425	(FFT Multiplication): Use an ascii art sigma.
13426	(Contributors): Add Gerardo Ballabio.
13427
13428	* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Always give mpf_t
13429	exponent in decimal, irrespective of ios::hex or ios::oct.
13430	* tests/cxx/t-ostream.cc (check_mpf): Update.
13431
13432	* printf/doprnt.c: Support %lln and %hhn.
13433
13434	* mpn/x86/pentium4/sse2/submul_1.asm: Use a psubq to negate the
13435	initial carry (helps the submul_1c case), and improve the comments.
13436
134372001-10-11  Kevin Ryde  <kevin@swox.se>
13438
13439	* acinclude.m4, configure.in (GMP_IMPL_H_IEEE_FLOATS): New macro.
13440
13441	* ltmain.sh: Send some rm errors to /dev/null, helps during compiles
13442	on Solaris 2.7 and HP-UX 10.
13443
13444	* tal-notreent.c: Renamed from stack-alloc.c.
13445	* Makefile.am, acinclude.m4, gmp-impl.h: Update.
13446
13447	* gmp-h.in: Don't give both prototypes and inlines, except on gcc.
13448
13449	* gmp-h.in, gmp-impl.h: Use #includes to get necessary standard
13450	classes, add std:: to prototypes.
13451	* cxx/*.cc, tests/cxx/t-ostream.cc: Add "use namespace std".
13452	* acinclude.m4 (GMP_PROG_CXX_WORKS): Ditto.
13453
13454	* tests/*/Makefile.in, mpfr/tests/Makefile.in: Regenerate with
13455	automake patch to avoid Ultrix problem with empty $(TESTS).
13456
13457	* */Makefile.in: Regenerate with automake patch to only rm *_.c in
13458	"make clean" when ansi2knr actually in use, helps DOS 8.3.
13459
13460	* Makefile.in: Regenerate with automake patch to fix stamp-h
13461	numbering, avoiding an unnecessary config.status run.
13462
134632001-10-09  Torbjorn Granlund  <tege@swox.com>
13464
13465	* mpn/hppa/hppa1_1/udiv_qrnnd.asm: Use L macros for labels.
13466	Quote L reloc operator.
13467
13468	* gmp-impl.h: Declare class string.
13469
13470	* mpn/asm-defs.m4 (INT32, INT64): Quote $1 to prevent further
13471	expansion.
13472
13473	* mpn/alpha/ev6/mul_1.asm: New file.
13474
134752001-10-09  Kevin Ryde  <kevin@swox.se>
13476
13477	* gmp.texi (Introduction to GMP): Add pentium 4 to optimized CPUs.
13478	(Build Options): Note macos directory.
13479	(Notes for Package Builds): GMP 4 series binary compatible with 3.
13480	(Known Build Problems): Remove $* and ansi2knr note, now fixed, except
13481	possibly under --host=none.
13482	(Formatted Output Strings): Remove -1 prec for all digits.
13483
13484	* mpz/add.c, mpz/sub.c: Don't use mpz path on #include (helps macos).
13485	* mpbsd/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpz.
13486
13487	* printf/doprnt.c, tests/printf/t-printf.c: Remove support for %.*Fe
13488	prec -1 meaning all digits.
13489
13490	* acinclude.m4 (GMP_PROG_AR): Override libtool, use AR_FLAGS="cq".
13491	(GMP_HPC_HPPA_2_0): Print version string to config.log.
13492
13493	* Makefile.am (AUTOMAKE_OPTIONS): Remove check-news (permission notice
13494	in NEWS file is too big).
13495	(dist-hook): Don't distribute numbered or unnumbered emacs backups.
13496
13497	* Makefile.am, cxx/Makefile.am: Updates for Gerardo's stuff.
13498
134992001-10-09  Gerardo Ballabio  <ballabio@sissa.it>
13500
13501	* cxx/isfuns.cc: New file.
13502	* gmp-impl.h: Add prototypes.
13503	* cxx/ismpf.cc, cxx/ismpq.cc, cxx/ismpz.cc: New files.
13504	* gmp-h.in: Add prototypes.
13505	* gmpxx.h, mpfrxx.h: New files.
13506
135072001-10-08  Kevin Ryde  <kevin@swox.se>
13508
13509	* configure.in (with_tags): Establish a default based on --enable-cxx.
13510
13511	* aclocal.m4: Regenerate with libtool patches for sed char range to
13512	help Cray, LTCC quotes and +Z warnings grep to help HP-UX.
13513
13514	* gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,
13515	doprnt_final_t): Use _PROTO.
13516
135172001-10-05  Torbjorn Granlund  <tege@swox.com>
13518
13519	* mpn/asm-defs.m4 (INT32, INT64): Use LABEL_SUFFIX.
13520
13521	* mpn/hppa: Convert files to `.asm'.
13522
135232001-10-05  Kevin Ryde  <kevin@swox.se>
13524
13525	* mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
13526	cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
13527	* mpn/cpp-ccas: New file.
13528	* mpn/Makefile.am (EXTRA_DIST): Add it.
13529
13530	* tune/common.c, tune/speed.h: Change SPEED_ROUTINE_MPN_COPY_CALL uses
13531	to SPEED_ROUTINE_MPN_COPY or new SPEED_ROUTINE_MPN_COPY_BYTES.  Avoids
13532	macro expansion problems on Cray.
13533
13534	* configure.in (AC_PROG_CXXCPP): Add this, to make libtool happier.
13535
135362001-10-04  Torbjorn Granlund  <tege@swox.com>
13537
13538	* mpz/rrandomb.c (gmp_rrandomb): Change bit_pos to be 0-based (was
13539	1-based); shift 2 (was 1) when making bit mask.  These two changes
13540	avoid undefined shift counts.
13541	(gmp_rrandomb): Avoid most calls to _gmp_rand by caching random values.
13542
13543	* mpn/generic/random2.c: Changes for mirroring mpz/rrandomb.c.
13544
135452001-10-04  Kevin Ryde  <kevin@swox.se>
13546
13547	* gmp.texi (Build Options): Add --enable-cxx.
13548	(Notes for Particular Systems): Mention pentium4 performance and SSE2.
13549	(Known Build Problems): Remove vax jsobgtr note, no longer needed.
13550	(Converting Floats): Tweak mpf_get_str description.
13551	(Low-level Functions): Correction to mpn_gcdext destination space
13552	requirements.
13553	(C++ Formatted Output): New section.
13554	(Language Bindings): Add ALP
13555	(Contributors): Add Paul Zimmermann's square root, update my things.
13556
13557	* acinclude.m4 (GMP_PROG_CC_IS_GNU, GMP_PROG_CXX_WORKS): Send compiler
13558	errors to config.log.
13559
13560	* mpq/Makefile.am (INCLUDES): Remove -DOPERATION_$*, not needed.
13561
13562	* mpn/x86/*.asm: Change references to old README.family to just README.
13563
13564	* mpz/README: Remove file, now adequately covered in the manual.
13565
135662001-10-03  Torbjorn Granlund  <tege@swox.com>
13567
13568	* mpn/x86/pentium4/copyi.asm: New file.
13569	* mpn/x86/pentium4/copyd.asm: New file.
13570
13571	* gmp-impl.h: Implement separate MPN_COPY_INCR and MPN_COPY_DECR
13572	macros for CRAY systems.
13573	(CRAY _MPN_COPY): Delete.
13574
135752001-10-02  Kevin Ryde  <kevin@swox.se>
13576
13577	* tests/mpz/t-popcount.c (check_data): Use "~ (unsigned long) 0" to
13578	avoid compiler warnings on sco.
13579
13580	* mpbsd/Makefile.am: Compile mpz files directly, no copying.
13581	Use mpz/add.c and mpz/sub.c rather than mpz/aors.c.
13582	(INCLUDES): Remove -DOPERATION_$*, no longer needed (by mpz).
13583
13584	* mpz/aors.h: Renamed from mpz/aors.c.
13585	* mpz/add.c, mpz/sub.c: New files, using mpz/aors.h.
13586	* mpz/aors_ui.h: Renamed from mpz/aors_ui.c.
13587	* mpz/add_ui.c, mpz/sub_ui.c: New files, using mpz/aors_ui.h.
13588	* mpz/fits_s.h: Renamed and adapted from mpz/fits_s.c.
13589	* mpz/fits_sshort.c, mpz/fits_sint.c, mpz/fits_slong.c: New files.
13590	* mpz/mul_i.h: Renamed from mpz/mul_siui.c.
13591	* mpz/mul_ui.c, mpz/mul_ui.c: New files, using mpz/mul_i.h.
13592	* mpz/Makefile.am: Consequent updates.
13593	(INCLUDES): Remove -DOPERATION_$*.
13594
13595	* mpf/fits_s.h: Renamed and adapted from mpf/fits_s.c.
13596	* mpf/fits_sshort.c, mpf/fits_sint.c, mpf/fits_slong.c: New files.
13597	* mpf/fits_u.h: Renamed and adapted from mpf/fits_u.c.
13598	* mpf/fits_ushort.c, mpf/fits_uint.c, mpf/fits_ulong.c: New files.
13599	* mpf/Makefile.am: Consequent updates.
13600	(INCLUDES): Remove -DOPERATION_$*.
13601
13602	* cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Don't use ios::hex etc
13603	as cases in a switch, they're not constant in g++ 3.0.
13604
13605	* mpn/Makeasm.am (.s.o, .s.obj, .S.o, .S.obj, .asm.o, .asm.obj):
13606	Locate source file with test -f the same as automake.
13607	(.S): Let CCAS do the preprocessing, and run libtool for .S.lo.
13608	(.asm.lo): Run libtool via m4-ccas to get new style foo.lo right.
13609	(COMPILE_FLAGS): Add $(DEFAULT_INCLUDES), per new automake.
13610	* mpn/m4-ccas: New file.
13611	* mpn/Makefile.am (EXTRA_DIST): Add it.
13612	* mpn/asm-defs.m4: Add m4_not_for_expansion(`DLL_EXPORT').
13613	* mpn/x86/x86-defs.m4: Undefine PIC if DLL_EXPORT is set.
13614	* configure.in (CFLAGS_PIC, ASMFLAGS_PIC): Remove, no longer needed.
13615
13616	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Warn what's omitted when
13617	vsnprintf not available.
13618
13619	* mpn/underscore.h: Remove file, not used since m68k converted to asm.
13620	* mpn/Makefile.am (EXTRA_DIST): Remove it.
13621
13622	* tests/refmpz.c: Add <stdlib.h>, for free().
13623
136242001-10-01  Torbjorn Granlund  <tege@swox.com>
13625
13626	* mpn/x86/pentium4/sse2/submul_1.asm: Apply some algebraic
13627	simplifications.
13628	* mpn/x86/pentium4/sse2/addmul_1.asm: Comment.
13629
136302001-10-01  Kevin Ryde  <kevin@swox.se>
13631
13632	* configure.in (--enable-cxx): New option for C++ support.
13633	Add cxx and tests/cxx subdirectories.
13634	* ltmain.sh, aclocal.m4: Update to libtool 2001-09-30.
13635
13636	* cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,
13637	cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files.
13638	* Makefile.am: Add them, in new libgmpxx.
13639	* gmp-h.in, gmp-impl.h: Prototypes and support.
13640	* tests/cxx/Makefile.am, tests/cxx/Makefile.in,
13641	tests/cxx/t-ostream.cc: New files.
13642
13643	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL,
13644	SPEED_ROUTINE_MPN_GCDEXT_ONE): mpn_gcdext needs size+1 for
13645	destinations.  Found by Torbjorn.
13646
13647	* gmp-h.in (__GNU_MP__, __GNU_MP_VERSION): Bump to 4.0.
13648	* mp-h.in (__GNU_MP__): Ditto.
13649	* gmp.texi, Makefile.am, compat.c: Amend version 3.2 to 4.0.
13650
13651	* acinclude.m4 (GMP_PROG_CXX_WORKS): New macro.
13652	(GMP_PROG_CC_WORKS): Write "conftest" test program, not a.out.
13653
13654	* gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.
13655	(GMP_ASPRINTF_T_INIT): New macro.
13656	(GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED().
13657	* printf/vasprintf.c: Use these.
13658
13659	* printf/asprntffuns.c: New file.
13660	* printf/Makefile.am, Makefile.am: Add it.
13661	* printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h
13662	(__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final):
13663	Move to asprntffuns.c, rename to __gmp and make global, remove
13664	spurious formal parameters from __gmp_asprintf_final.
13665
13666	* configure.in (j90-*-*, sv1-*-*): Don't duplicate $path in $add_path.
13667	(*-*-mingw*): Don't assemble with -DPIC (as per cygwin).
13668
13669	* printf/snprntffuns.c (gmp_snprintf_final): Remove spurious formal
13670	parameters.
13671
13672	* tune/tuneup.c (POWM_THRESHOLD): Reduce stop_factor to 1.1 to help
13673	Cray vector systems.
13674
13675	* tests/misc.c (tests_rand_start): Print GMP_CHECK_RANDOMIZE=NN to
13676	facilitate cut and paste when re-running.
13677	* tests/mpz/t-inp_str.c (check_data): Add more diagnostic prints.
13678
136792001-09-30  Kent Boortz  <kent@swox.com>
13680
13681	* macos/configure, macos/Makefile.in, macos/README: Updates for gmp 4.
13682	* gmp-h.in (_GMP_H_HAVE_FILE): Recognise Apple MPW.
13683
136842001-09-30  Torbjorn Granlund  <tege@swox.com>
13685
13686	* mpn/cray/ieee/submul_1.c: Rewrite.  Streamline multiplications;
13687	use `majority' logic.
13688
136892001-09-27  Torbjorn Granlund  <tege@swox.com>
13690
13691	* gmp-h.in (__GMPN_AORS_1): Rewrite to work around Cray compiler bug.
13692
136932001-09-26  Torbjorn Granlund  <tege@swox.com>
13694
13695	* mpn/x86/pentium4/sse2/gmp-mparam.h: New file.
13696
136972001-09-26  Kevin Ryde  <kevin@swox.se>
13698
13699	* mpn/x86/pentium4/sse2/dive_1.asm: New file.
13700	* mpn/x86/pentium4/sse2/submul_1.asm: New file.
13701	* mpn/x86/pentium4/sse2/sqr_basecase.asm: New file.
13702
13703	* mpn/x86/pentium/copyi.asm: New file, based on past work by Torbjorn.
13704	* mpn/x86/pentium/copyi.asm: New file, ditto.
13705	* mpn/x86/pentium/com_n.asm: Rewrite, ditto.
13706
13707	* printf/snprntffuns.c (gmp_snprintf_format): Copy va_list in case
13708	vsnprintf trashes it.
13709	* printf/vasprintf.c (gmp_asprintf_format): Ditto.
13710	* gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.
13711
13712	* tests/mpz/t-cmp_d.c (check_low_z_one): Patch by Torbjorn for vax
13713	limited float range.
13714
137152001-09-23  Torbjorn Granlund  <tege@swox.com>
13716
13717	* mpn/vax/lshift.s: Change `jsob*' to `sob*'.
13718	* mpn/vax/rshift.s: Likewise.
13719
137202001-09-23  Kevin Ryde  <kevin@swox.se>
13721
13722	* mpn/x86/pentium4/sse2/mul_basecase.asm: Some simple but real code.
13723
13724	* printf/doprnt.c: Use va_copy for va_list variables, copy function
13725	parameter in case it's call-by-reference.
13726
13727	* tune/freq.c (speed_cpu_frequency_bsd_dmesg): New function.
13728	(speed_cpu_frequency_table): Use it.
13729
13730	* tune/many.pl (popcount, hamdist): Fix declared return value.
13731	(sb_divrem_mn): Remove a spurious duplicate entry.
13732	(CLEAN): Add tmp-$objbase.c when using that for .h files.
13733	(macro_speed): Give a default for .h files.
13734	Add ATTRIBUTE_CONST or __GMP_ATTRIBUTE_PURE as appropriate.
13735
13736	* tune/speed.h (SPEED_ROUTINE_MPN_MOD_CALL,
13737	SPEED_ROUTINE_MPN_PREINV_MOD_1, SPEED_ROUTINE_MPN_POPCOUNT,
13738	SPEED_ROUTINE_MPN_HAMDIST, SPEED_ROUTINE_MPN_GCD_1N,
13739	SPEED_ROUTINE_MPN_GCD_1_CALL, SPEED_ROUTINE_MPZ_JACOBI): Use return
13740	values so gcc 3 won't discard calls to pure or const functions.
13741	(mpn_mod_1_div, mpn_mod_1_inv): Add __GMP_ATTRIBUTE_PURE.
13742
137432001-09-22  Torbjorn Granlund  <tege@swox.com>
13744
13745	* mpn/x86/pentium4/sse2/mul_basecase.asm: New file, placeholder
13746	for real code, hiding the default x86 mul_basecase.asm.
13747
137482001-09-22  Kevin Ryde  <kevin@swox.se>
13749
13750	* configure.in (AC_PREREQ): Bump to 2.52.
13751	(m4_pattern_forbid, m4_pattern_allow): New calls, forbid GMP_.
13752	(AC_CHECK_HEADERS): Remove sys/types.h, already done by autoconf.
13753	* acinclude.m4, configure.in (GMP_GCC_NO_CPP_PRECOMP): New macro.
13754
13755	* tests/devel/try.c (TYPE_PREINV_MOD_1): Don't run size==0.
13756	(malloc_region): Need fd=-1 for mmap MAP_ANON on BSD.
13757
137582001-09-20  Torbjorn Granlund  <tege@swox.com>
13759
13760	* mpz/cong.c (mpz_congruent_p): Fix one-limb c<d test.
13761
13762	* longlong.h: Rewrite __i370__ smul_ppmm; enable also for __s390__.
13763
13764	* configure.in: Add support for IBM 360, 370, 390 families.
13765
137662001-09-20  Kevin Ryde  <kevin@swox.se>
13767
13768	* mpn/x86/pentium4/sse2/diveby3.asm: New file.
13769	* mpn/x86/pentium4/sse2/mode1o.asm: New file.
13770
137712001-09-16  Kevin Ryde  <kevin@swox.se>
13772
13773	* printf/doprnt.c: '#' means showpoint and showtrailing for %e, %f, %g.
13774	* tests/printf/t-printf.c (check_f): More test cases.
13775
137762001-09-15  Torbjorn Granlund  <tege@swox.com>
13777
13778	* gmp-h.in (__GMPN_AORS_1): Remove param TEST, add OP and CB.
13779	Postpone zeroing of (cout).
13780	(__GMPN_ADD_1, __GMPN_SUB_1): Corresponding changes.
13781
137822001-09-14  Kevin Ryde  <kevin@swox.se>
13783
13784	* ChangeLog: Merge in tests/rand/ChangeLog.
13785	* tests/rand/ChangeLog: Remove file.
13786
13787	* printf/doprnt.c: Fix handling of a plain format after a GMP one; no
13788	need to protect against negative precision internally.
13789	* tests/printf/t-printf.c (check_misc): More checks.
13790
137912001-09-12  Torbjorn Granlund  <tege@swox.com>
13792
13793	* mpn/cray/ieee/invert_limb.c: Add a PROLOGUE in a comment to have
13794	HAVE_NATIVE_... defined.
13795
137962001-09-11  Kevin Ryde  <kevin@swox.se>
13797
13798	* configure.in, gmp-h.in (__GMP_HAVE_HOST_CPU_FAMILY_power,
13799	__GMP_HAVE_HOST_CPU_FAMILY_powerpc): New AC_SUBSTs.
13800	* gmp-h.in (__GMPN_COPY_INCR): Use them to select the power/powerpc
13801	code, rather than preprocessor defines.
13802
13803	* acinclude.m4, configure.in (GMP_H_ANSI): New macro.
13804
13805	* gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
13806
13807	* gmp-h.in, version.c (gmp_version): Make the pointer "const" as well
13808	as the string.
13809
13810	* acinclude.m4, configure.in (GMP_PROG_CC_IS_XLC): Recognise xlc when
13811	invoked under another name (cc, xlc128, etc).
13812	* acinclude.m4 (GMP_PROG_CC_IS_GCC): Print a message when recognised.
13813
138142001-09-11  Torbjorn Granlund  <tege@swox.com>
13815
13816	* gmp-h.in: Let __DECC mean __GMP_HAVE_CONST, etc.
13817	* mp-h.in: Likewise.
13818
138192001-09-10  Torbjorn Granlund  <tege@swox.com>
13820
13821	* mpn/x86/pentium4/mmx/lshift.asm: New file.
13822	* mpn/x86/pentium4/mmx/rshift.asm: New file.
13823
13824	* tests/mpn/t-iord_u.c (check_incr_data): Work around HP compiler bug.
13825	(check_decr_data): Likewise.
13826
138272001-09-08  Kevin Ryde  <kevin@swox.se>
13828
13829	* gmp.texi (Integer Logic and Bit Fiddling): Update mpz_hamdist
13830	behaviour, clarify mpz_popcount a touch.
13831	(Language Bindings): Add mlton, fix alphabetical order.
13832	(Single Limb Division): Describe 2 or 1/2 limbs at a time style.
13833
13834	* configure.in (AC_CHECK_FUNCS): Add mmap.
13835	* tests/devel/try.c (malloc_region): Use mmap if available.
13836
13837	* tests/refmpz.c, tests/tests.h (refmpz_hamdist): New function.
13838	* tests/mpz/t-hamdist.c: New file.
13839	* tests/mpz/Makefile.am: Add it.
13840
13841	* mpz/hamdist.c: Support neg/neg operands.
13842
13843	* macos/Makefile.in: Remove dual compile of mpq/aors.c and
13844	mpn/generic/popham.c.
13845
13846	* gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.
13847	For 64-bits reuse 0x33...33 constant.
13848	* mpn/generic/popcount.c, mpn/generic/hamdist.c: Split from popham.c,
13849	use popc_limb macro, remove unused "i", don't bother with "register"
13850	qualifiers.
13851	* mpn/generic/popham.c: Remove file.
13852
13853	* ltmain.sh, configure, aclocal.m4: Update to libtool 1.4.1, with one
13854	ltdll.c generation patch.
13855	* doc/configuration: Misc updates, note libtool patch used.
13856
13857	* mpn/x86/pentium4/sse2/mul_1.asm: Use pointer increments not indexed
13858	addressing, to get 4.0 c/l flat.
13859
13860	* tests/mpq/t-cmp_si.c (check_data): Use ULONG_MAX for denominators.
13861
13862	* tests/misc.c (mpz_negrandom): Use given rstate, not RANDS.
13863
138642001-09-07  Torbjorn Granlund  <tege@swox.com>
13865
13866	* mpn/x86/pentium4/sse2/addmul_1.asm: New file.
13867
138682001-09-04  Kevin Ryde  <kevin@swox.se>
13869
13870	* tune/freq.c: Define a HAVE for each speed_cpu_frequency routine to
13871	avoid duplicating conditionals.
13872	(speed_cpu_frequency_sco_etchw): New function.
13873	(speed_cpu_frequency_table): Use it.
13874	* tune/README: Mention SCO openunix 8 /etc/hw.
13875
13876	* mpz/fib_ui.c: Use ?: to avoid a gcc 3 bug on powerpc64.
13877	Store back a carry for limb<long.
13878
13879	* mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/k7/mmx/mod_1.asm,
13880	mpn/x86/p6/mmx/divrem_1.asm: Fix a couple of comments.
13881
13882	* config.guess: Give m68020 for 68020 or better, not m68k.
13883	* configfsf.guess: Update to 2001-09-04.
13884
138852001-09-02  Kevin Ryde  <kevin@swox.se>
13886
13887	* configure.in (m68k-*-*): Let m68k mean 68000, not 68020.
13888	* gmp.texi (Notes for Particular Systems): Update.
13889
13890	* gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since int
13891	might be only 16 bits.
13892
13893	* tests/mpq/t-aors.c: New file.
13894	* tests/mpq/Makefile.am: Add it.
13895
13896	* tests/refmpq.c: New file.
13897	* tests/Makefile.am: Add it.
13898	* tests/tests.h: Add prototypes.
13899
13900	* mpq/aors.c: Share object code for mpq_add and mpq_sub.
13901	* Makefile.am, mpq/Makefile.am: Single mpq/aors.lo now.
13902
13903	* tests/devel/try.c (TYPE_SUBMUL_1): Use correct reference routine.
13904
139052001-08-30  Kevin Ryde  <kevin@swox.se>
13906
13907	* mpn/x86/x86-defs.m4 (cmov_available_p): Add pentium4.
13908
13909	* gmp-h.in: Put #define renamings with prototypes.
13910	Remove commented out #defines of gmp-impl.h things.
13911	(mpn_invert_limb): Remove #define, already in gmp-impl.h.
13912	(mpn_lshiftc, mpn_rshiftc): Remove #defines, unused.
13913	(mpn_addsub_nc): Add prototype to #define.
13914
139152001-08-28  Kevin Ryde  <kevin@swox.se>
13916
13917	* gmp.texi: Switch to GFDL.
13918	(Top): Arrange copyright and conditions to appear here too.  For
13919	clarity have all this before the miscellaneous macro definitions.
13920	(Copying): Refer to COPYING.LIB file, mention plain GPL2 in demo
13921	programs.
13922	(Contributors, References): Use @appendix rather than @unnumbered.
13923	(GNU Free Documentation License): New appendix.
13924	(@contents): Move to start of document, use only for tex (not html).
13925	(Debugging): Add leakbug.
13926	(Build Options): Add pentium4.
13927	(I/O of Rationals): Add mpq_inp_str.
13928
13929	* fdl.texi: New file, with two @appendix directive tweaks.
13930	* Makefile.am (gmp_TEXINFOS): Add it.
13931
13932	* tests/mpz/io.c: Check mpz_inp_str return against ftell, send error
13933	messages just to stdout.
13934
13935	* mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function,
13936	and share a __gmp_free_func call.
13937	* mpq/inp_str.c: New file.
13938	* Makefile.am, mpq/Makefile.am: Add it.
13939	* tests/mpq/t-inp_str.c: New file.
13940	* tests/mpq/Makefile.am (check_PROGRAMS): Add it.
13941
13942	* configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,
13943	HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs
13944	for processor families.
13945	* gmp-impl.h: Use them, rather than cpp defines.
13946
13947	* demos/Makefile.am (primes_LDADD): Use $(LIBM), for log().
13948
13949	* tune/many.pl, tune/Makefile.am: Fix some from clean and distclean.
13950
139512001-08-26  Kevin Ryde  <kevin@swox.se>
13952
13953	* tests/devel/try.c (ARRAY_ITERATION): Make types match on "?:" legs.
13954	(TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER): Remove some superseded code.
13955
13956	* tests/printf/t-printf.c (check_plain): Don't compare "all digits"
13957	precision against plain printf.
13958
13959	* tune/Makefile.am: Eliminate empty TUNE_MPZ_SRCS.
13960
13961	* configure, config.in, INSTALL.autoconf: Update to autoconf 2.52.
13962	* */Makefile.in, mdate-sh, missing, aclocal.m4, configure: Update to
13963	automake 1.5.
13964	* configfsf.guess, configfsf.sub: Update to 2001-08-23.
13965
139662001-08-24  Torbjorn Granlund  <tege@swox.com>
13967
13968	* demos/primes.c: Complete rewrite.
13969
139702001-08-24  Kevin Ryde  <kevin@swox.se>
13971
13972	* longlong.h: Test __ppc__ for apple darwin cc, reported by Jon
13973	Becker.  Also test __POWERPC__, PPC and __vxworks__.
13974
13975	* tune/speed.h (speed_cyclecounter) [x86]: Don't clobber ebx in PIC.
13976
139772001-08-22  Kevin Ryde  <kevin@swox.se>
13978
13979	* configure.in (x86 mmx): Correction to mmx path stripping.
13980
139812001-08-17  Kevin Ryde  <kevin@swox.se>
13982
13983	* configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,
13984	tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++
13985	support, for the time being.
13986	* printf/doprntfx.cc, doprntix.cc, osfuns.cc, osmpf.cc, osmpq.cc,
13987	osmpz.cc, tests/printf/t-ostream.cc: Remove files.
13988
13989	* printf/doprnt.c, printf/doprntf.c, gmp-impl.h: Use a single
13990	__gmp_doprnt_mpf, rather than a separate ndigits calculation.
13991	* printf/doprnt.c, printf/doprntf.c, gmp-impl.h, gmp.texi,
13992	tests/printf/t-printf.c: Let empty or -1 prec mean all digits for mpf.
13993	* printf/doprnt.c, tests/printf/t-printf.c: Accept h or l in %n; let
13994	negative "*" style width mean left justify.
13995
13996	* gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro,
13997	extracted from mpf/get_str.c.
13998
13999	* libmp.sym: New file.
14000	* Makefile.am (libmp_la_LDFLAGS): Use it.
14001	(DISTCLEANFILES): Remove asm-syntax.h, no longer generated.
14002	Remove some comments about "make check".
14003
14004	* demos/perl/GMP.pm, GMP.xs, GMP/Mpf.pm: Add printf and sprintf,
14005	change get_str to string/exponent for floats, remove separate
14006	mpf_get_str.
14007	* demos/perl/GMP/Mpf.pm (overload_string): Use $# (default "%.g").
14008	* demos/perl/typemap: Fix some duplicate string entries.
14009	* demos/perl/test.pl: Update tests, split overloaded constants into ...
14010	* demos/perl/test2.pl: ... this new file.
14011	* demos/perl/Makefile.PL (clean): Add test.tmp.
14012
140132001-08-16  Kevin Ryde  <kevin@swox.se>
14014
14015	* printf/snprntffuns.c (gmp_snprintf_format): Correction to bufsize-1
14016	return value handling.
14017
14018	* demos/calc/calc.y: Reposition "%{" so copyright notice gets into
14019	generated files.
14020
14021	* INSTALL: Use gmp_printf.
14022
140232001-08-14  Kevin Ryde  <kevin@swox.se>
14024
14025	* mpz/inp_str.c: Fix return value (was 1 too big).
14026	* tests/mpz/t-inp_str.c: New file.
14027	* tests/mpz/Makefile.am: Add it.
14028
14029	* mpn/x86/pentium4/sse2/add_n.asm: New file.
14030	* mpn/x86/pentium4/sse2/sub_n.asm: New file.
14031	* mpn/x86/pentium4/sse2/mul_1.asm: New file.
14032
140332001-08-12  Kevin Ryde  <kevin@swox.se>
14034
14035	* printf/sprintffuns.c, printf/doprntf.c: Don't use sprintf return
14036	value (it's a pointer on SunOS 4).
14037
14038	* acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
14039	* configure.in: Add pentium4 support.
14040	* mpn/x86/pentium4, mpn/x86/pentium4/mmx, mpn/x86/pentium4/sse2: New
14041	directories.
14042	* mpn/x86/README: Update.
14043
140442001-08-10  Torbjorn Granlund  <tege@swox.com>
14045
14046	* demos/pexpr.c (setup_error_handler): Catch also SIGABRT.
14047
140482001-07-31  Kevin Ryde  <kevin@swox.se>
14049
14050	* tests/refmpn.c (refmpn_mul_1c): Allow low to high overlaps.
14051
14052	* gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.
14053
14054	* tune/Makefile.am (EXTRA_DIST): Add many.pl.
14055
140562001-07-28  Kevin Ryde  <kevin@swox.se>
14057
14058	* gmp.texi (Random Number Functions): Old rand functions no longer use
14059	the C library.
14060
14061	* configure.in, acinclude.m4 (GMP_FUNC_VSNPRINTF): New macro.
14062
14063	* mpn/generic/get_str.c: Add an ASSERT for high limb non-zero.
14064
140652001-07-24  Kevin Ryde  <kevin@swox.se>
14066
14067	* gmp.texi (Build Options): Add --enable-cxx.
14068	(Converting Floats): Note mpf_get_str only generates accurately
14069	representable digits.
14070	(Low-level Functions): Note mpn_get_str requires non-zero high limb.
14071	(Formatted Output): New chapter.
14072	(Multiplication Algorithms): Use @quotation with @multitable.
14073	(Toom-Cook 3-Way Multiplication): Ditto.
14074
14075	* tests/memory.c (tests_free_nosize): New function.
14076	* tests/tests.h (tests_allocate etc): Add prototypes.
14077
14078	* tests/printf: New directory.
14079	* tests/printf/Makefile.am, t-printf.c, t-ostream.cc: New files.
14080	* configure.in, tests/Makefile.am: Add them.
14081
14082	* configure.in, acinclude.m4 (GMP_PROG_CXX): New macro.
14083	* configure.in (--enable-cxx): New option.
14084	(AC_CHECK_HEADERS): Add locale.h and sys/types.h, remove unistd.h.
14085	(AC_CHECK_TYPES): Add intmax_t, long double, long long, ptrdiff_t,
14086	quad_t.
14087	(AC_CHECK_FUNCS): Add localeconv, memset, obstack_vprintf, snprintf,
14088	strchr, vsnprintf.
14089	(AC_CHECK_DECLS): Add vfprintf.
14090
14091	* gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.
14092
14093	* printf: New directory.
14094	* printf/Makefile.am, asprintf.c, doprnt.c, doprntf.c, doprntfx.cc,
14095	doprnti.c, doprntix.cc, fprintf.c, obprintf.c, obprntffuns.c,
14096	obvprintf.c, osfuns.cc, osmpf.cc, osmpq.cc, osmpz.cc, printf.c,
14097	printffuns.c, snprintf.c, snprntffuns.c, sprintf.c, sprintffuns.c,
14098	vasprintf.c, vfprintf.c, vprintf.c, vsnprintf.c, vsprintf.c: New
14099	files.
14100	* configure.in, Makefile.am: Add them.
14101
14102	* configure.in (HAVE_INLINE): Remove AC_DEFINE, unused.
14103	(AC_CHECK_TYPES): Don't test for void, assume it always exists.
14104
14105	* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
14106	* mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
14107
14108	* gmp-impl.h (mpn_fib2_ui): Use __MPN.
14109	(MPN_COPY_DECR): Fix an ASSERT.
14110	(CAST_TO_VOID): Remove macro.
14111
14112	* gmp-h.in (mpq_out_str): Give #define even without prototype.
14113	(mpz_cmp_d, mpz_cmpabs_d): Corrections to #defines.
14114
14115	* tests/devel/try.c: Add mpn_add and mpn_sub, don't use CAST_TO_VOID.
14116
141172001-07-23  Torbjorn Granlund  <tege@swox.com>
14118
14119	* config.guess: Recognize pentium4.
14120	* config.sub: Recognize pentium4.
14121
141222001-07-17  Kevin Ryde  <kevin@swox.se>
14123
14124	* gmp-h.in (__GMPN_AORS_1): Remove x86 and gcc versions, leave just
14125	one version.
14126	(__GMPN_ADD, __GMPN_SUB): New macros, rewrite of mpn_add and mpn_sub.
14127	(mpn_add, mpn_sub): Use them.
14128	(__GMPN_COPY_REST): New macro.
14129
14130	* gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L and
14131	__GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of
14132	LSYM_PREFIX.
14133
141342001-07-11  Kevin Ryde  <kevin@swox.se>
14135
14136	* gmp-h.in (__GMPN_ADD_1 etc) [x86]: Don't use this on egcs 2.91.
14137
14138	* mpz/fits_uint.c, fits_ulong.c, mpz/fits_ushort.c: Split up fits_u.c.
14139	* mpz/fits_u.c: Remove file.
14140	* mpz/Makefile.am, macos/Makefile.in: Update.
14141
14142	* tests/refmpn.c,tests.h (refmpn_copy): New function.
14143	* tests/devel/try.c (TYPE_ZERO): No return value from call.
14144	(TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD): Share call with
14145	TYPE_MOD_1 and TYPE_MOD_1C.
14146	(MPN_COPY, __GMPN_COPY, __GMPN_COPY_INCR): Add testing.
14147
141482001-07-10  Kevin Ryde  <kevin@swox.se>
14149
14150	* gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.
14151	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
14152	* mpn/powerpc64/copyi.asm, mpn/powerpc64/copyd.asm: Remove files.
14153
14154	* mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on
14155	i386 gcc 2.95.x), remove a bogus comment about quotient.
14156
14157	* errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,
14158	__gmp_sqrt_of_negative): New functions.
14159	* gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them.
14160
14161	* randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.
14162
141632001-07-07  Kevin Ryde  <kevin@swox.se>
14164
14165	* configure.in (powerpc*-*-*): Use -no-cpp-precomp for Darwin.
14166
14167	* tests/mpbsd/t-itom.c: Renamed from t-misc.c.
14168	* tests/mpbsd/t-misc.c: Remove file.
14169	* tests/mpbsd/Makefile.am: Update.
14170
14171	* tests/mpf/t-set_si.c,t-cmp_si.c,t-gsprec.c: Split from t-misc.c.
14172	* tests/mpf/t-misc.c: Remove file.
14173	* tests/mpf/Makefile.am: Update.
14174
14175	* tests/mpz/t-oddeven.c,t-set_si.c,t-cmp_si.c: Split from t-misc.c.
14176	* tests/mpz/t-misc.c: Remove file.
14177	* tests/mpz/Makefile.am: Update.
14178
14179	* stack-alloc.c: Add some alignment ASSERTs.
14180
14181	* gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
14182
14183	* tests/devel/try.c (MPN_ZERO): Add testing.
14184	* tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
14185
14186	* mpn/x86/divrem_1.asm: Update a remark about gcc and "loop".
14187
14188	* tests/mpq/t-cmp_si.c: New file.
14189	* tests/mpq/Makefile.am: Add it.
14190
14191	* tests/misc.c,tests.h (mpq_set_str_or_abort): New function.
14192
14193	* mpq/cmp_si.c: New file.
14194	* Makefile.am, mpq/Makefile.am: Add it.
14195	* gmp-h.in (mpq_cmp_si): Add prototype.
14196	* gmp.texi (Comparing Rationals): Add doco.
14197
14198	* gmp-h.in (_GMP_H_HAVE_FILE): Add _FILE_DEFINED for microsoft, add
14199	notes on what symbols are for what systems.
14200
142012001-07-06  Torbjorn Granlund  <tege@swox.com>
14202
14203	* longlong.h (ibm032 umul_ppmm): Fix typo.
14204	* longlong.h (sparclite sdiv_qrnnd): Fix typo.
14205
142062001-07-03  Kevin Ryde  <kevin@swox.se>
14207
14208	* mpz/bin_ui.c (DIVIDE): Use MPN_DIVREM_OR_DIVEXACT_1.
14209	* mpz/bin_uiui.c (MULDIV): Ditto, and use local variables for size and
14210	pointer.
14211
14212	* acinclude.m4 (GMP_INCLUDE_GMP_H): New macro, use it everywhere gmp.h
14213	is wanted at configure time.
14214	* acinclude.m4, configure.in (GMP_H_EXTERN_INLINE, GMP_H_HAVE_FILE):
14215	New macros.
14216
14217	* gmp-h.in (__GMP_EXTERN_INLINE): Set to "inline" for C++.
14218	(mpn_add, mpn_sub): Use new style __GMP_EXTERN_INLINE.
14219	* gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.
14220	* mpn/generic/add.c, mpn/generic/sub.c: New files.
14221	* mpn/generic/inlines.c: Remove file.
14222	* configure.in, mpn/Makefile.am: Update.
14223
14224	* gmp.texi (GMP Basics): Note the need for stdio.h to get FILE
14225	prototypes.
14226
142272001-07-01  Kevin Ryde  <kevin@swox.se>
14228
14229	* gmp.texi (Build Options, Reentrancy): Updates for new
14230	--enable-alloca behaviour.
14231	(Debugging): Describe --enable-alloca=debug.
14232	(Miscellaneous Integer Functions): Note mpz_sizeinbase ignores signs.
14233	(Low-level Functions): Give a formula for mpn_gcdext cofactor.
14234	(Factorial Algorithm): New section.
14235	(Binomial Coefficients Algorithm): New section.
14236	Misc tweaks elsewhere.
14237
14238	* mpf/set_prc.c: Merge the two truncation conditionals, misc cleanups,
14239	no functional changes.
14240
14241	* mpn/*/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Add tuned values.
14242	* gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
14243	2*UMUL_TIME < UDIV_TIME.
14244
14245	* mpn/x86/p6/dive_1.asm: New file.
14246
14247	* mpn/x86/dive_1.asm: New file.
14248	* mpn/x86/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Use it always.
14249
14250	* tests/refmpn.c, tests.h (refmpn_zero): New function.
14251	* tests/devel/try.c: Use it.
14252
14253	* tests/refmpn.c (refmpn_sb_divrem_mn): Use refmpn_cmp, not mpn_cmp.
14254
14255	* tests/mpf/t-get_d.c (main): Use || not |.
14256
14257	* tests/misc.c, tests/t-modlinv.c, tests/mpq/t-get_str.c,
14258	tests/mpf/reuse.c: Add string.h.
14259
142602001-06-29  Kevin Ryde  <kevin@swox.se>
14261
14262	* tune/speed.h (SPEED_ROUTINE_MPN_FIB2_UI,
14263	SPEED_ROUTINE_COUNT_ZEROS_C): Corrections to TMP block handling.
14264
14265	* gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):
14266	Corrections to these to account for adding tD into E.
14267	(MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size
14268	assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them.
14269	(MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
14270
14271	* assert.c: Add stdlib.h for abort prototype.
14272	* tests/spinner.c, trace.c, t-constants.c, t-count_zeros.c,
14273	t-gmpmax.c, t-modlinv.c: Ditto.
14274	* tests/mpz/t-bin.c, t-cmp.c, t-get_si.c, t-misc.c, t-popcount.c,
14275	t-set_str.c, t-sizeinbase.c: Ditto.
14276	* tests/mpq/t-equal.c, t-get_str.c, t-set_f.c, t-set_str.c: Ditto.
14277	* tests/mpf/t-fits.c, t-get_d.c, t-get_si.c, t-int_p.c, t-misc.c,
14278	t-trunc.c: Ditto.
14279	* tests/mpbsd/allfuns.c, t-misc.c: Ditto.
14280
14281	* mpn/generic/mul_n.c, mpz/cfdiv_r_2exp.c: Use MPN_INCR_U rather than
14282	mpn_incr_u.
14283
14284	* tests/devel/try.c (TYPE_SB_DIVREM_MN): More fixes for calling method.
14285
14286	* mpn/x86/k6/cross.pl: More insn exceptions.
14287
142882001-06-23  Kevin Ryde  <kevin@swox.se>
14289
14290	* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1) [i386]: Fix some asm output
14291	constraints.
14292
14293	* gmp-impl.h (modlimb_invert): Mask after shifting, so mask constant
14294	fits a signed byte.
14295
14296	* tests/devel/try.c (TYPE_SB_DIVREM_MN): Fix initial fill of quotient
14297	with garbage.
14298
142992001-06-20  Kevin Ryde  <kevin@swox.se>
14300
14301	* config.guess (rs6000-*-aix4* | powerpc-*-aix4*): Suppress error
14302	messages if $CC_FOR_BUILD or program don't work.
14303
14304	* mpz/sqrt.c,sqrtrem.c: Special case for op==0, to avoid TMP_ALLOC(0).
14305	* tests/refmpf.c (refmpf_add, refmpf_sub): Avoid TMP_ALLOC(0).
14306
14307	* tests/mpn/t-aors_1.c: New file.
14308	* tests/mpn/Makefile.am: Add it.
14309
14310	* gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1): New macros, rewrite of
14311	mpn_add_1 and mpn_sub_1, better code for src==dst and/or n==1,
14312	separate versions for gcc x86, gcc generic, and non-gcc.
14313	(mpn_add_1, mpn_sub_1): Use them.
14314	(mpn_add, mpn_sub): Ditto, to get inlines on all compilers.
14315	(extern "C") [__cplusplus]: Let this encompass the extern inlines too.
14316	* mpn/generic/add_1.c,sub_1.c: New files, force code from gmp.h.
14317	* configure.in, mpn/Makefile.am: Add them.
14318
14319	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
14320	rather than AC_DEFINE LSYM_PREFIX.
14321	* gmp-h.in (__GMP_LSYM_PREFIX): New substitution.
14322	(__GMP_ASM_L): New macro.
14323	* gmp-impl.h (ASM_L): Use it.
14324
14325	* acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
14326	* gmp-impl.h: Use it for all the malloc based TMP_ALLOCs.
14327
14328	* stack-alloc.h: Remove file.
14329	* tal-reent.c: New file.
14330	* Makefile.am: Update.
14331
14332	* acinclude.m4, configure.in (GMP_OPTION_ALLOCA): New macro, add
14333	malloc-reentrant method, use stack-alloc.c as malloc-notreentrant,
14334	make "reentrant" the default.
14335	* gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to
14336	determine the value, and demand only 4 bytes align on 32-bit systems.
14337	* gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of
14338	stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
14339	* gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations.
14340	* stack-alloc.c (tmp_stack): Move private parts of stack-alloc.h to
14341	here, use gmp-impl.h.
14342
14343	* gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
14344	* mpz/fib_ui.c, mpz/jacobi.c, mpq/cmp.c, mpn/generic/fib2_ui.c: Use it.
14345
14346	* mpfr/exp2.c: Patch by Paul to match TMP_MARK and TMP_FREE in loop.
14347	* mpfr/sqrt.c: Scope nested TMP_DECL into nested { } block, patch by
14348	Paul, tweaked by me.
14349	* mpfr/agm.c: Ditto, and add a final TMP_FREE(marker2).
14350
14351	* gmp-h.in (mpn_cmp): Add __GMP_ATTRIBUTE_PURE.
14352
14353	* INSTALL: Clarify "make install", tweak formatting a bit.
14354
143552001-06-17  Kevin Ryde  <kevin@swox.se>
14356
14357	* configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,
14358	selected with --enable-alloca=debug.
14359	* tal-debug.c: New file.
14360	* configure.in, Makefile.am: Compile stack-alloc.c only for
14361	--disable-alloca.
14362	* assert.c (__gmp_assert_header): New function, split from
14363	__gmp_assert_fail.
14364
14365	* mpz/lcm.c: Don't TMP_MARK and then just return. Remove unnecessary
14366	_mpz_realloc prototype.
14367
14368	* mpn/generic/mul.c (mpn_sqr_n): Use __gmp_allocate_func for toom3
14369	temporary workspace.
14370
143712001-06-15  Kevin Ryde  <kevin@swox.se>
14372
14373	* tests/mpz/t-set_f.c: New file.
14374	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14375
14376	* mpz/set_f.c: Share MPN_COPY between pad and trunc cases, do exp<=0
14377	test earlier, store SIZ(w) earlier.
14378
14379	* tests/t-count_zeros.c: New file.
14380	* tests/t-gmpmax.c: New file.
14381	* tests/Makefile.am (check_PROGRAMS): Add them.
14382
14383	* mp_clz_tab.c: Compile the table only if longlong.h says it's needed;
14384	add an internal-use-only comment.
14385	* tune/common.c: Force a __clz_tab for convenience when testing.
14386
14387	* mpn/x86/pentium/gmp-mparam.h, mpn/x86/pentium/mmx/gmp-mparam.h: Add
14388	COUNT_LEADING_ZEROS_NEED_CLZ_TAB, for mod_1.asm.
14389
14390	* longlong.h (count_leading_zeros) [pentium]: Decide to go with float
14391	method for p54.
14392	(count_leading_zeros) [alpha]: Add COUNT_LEADING_ZEROS_NEED_CLZ_TAB.
14393	(__clz_tab): Provide a prototype only if it's needed.
14394
14395	* tests/trace.c (mpz_trace): Don't use = on structures.
14396	(mpn_trace): Set _mp_alloc when creating mpz.
14397
143982001-06-12  Kevin Ryde  <kevin@swox.se>
14399
14400	* mpn/x86/divrem_1.asm: Amend some comments about P5 speed.
14401
14402	* tune/README: Clarify reconfigure on gmp-mparam.h update.
14403
14404	* mpn/x86/p6/copyd.asm: New file.
14405	* mpn/x86/p6/README: Update copyd and mod_1.
14406	* mpn/x86/copyd.asm: Amend some comments.
14407
14408	* gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.
14409	(mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the
14410	generic code on gcc.
14411
14412	* gmp-impl.h (ASSERT_ZERO_P, ASSERT_MPN_NONZERO_P): New macros.
14413	* mpn/generic/gcd_1.c, mpn/generic/mul_fft.c: Use them.
14414	* mpz/get_d.c: Add a private mpn_zero_p.
14415	* mpfr/trunc.c: Use own mpn_zero_p.
14416	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_1N): Use refmpn_zero_p.
14417	* gmp-impl.h (mpn_zero_p): Remove, no longer needed.
14418
14419	* gmp-h.in, gmp-impl.h: Move MPN_CMP to gmp.h as __GMPN_CMP, leave an
14420	MPN_CMP alias in gmp-impl.h.
14421	* gmp-h.in (mpn_cmp): Add an inline version.
14422	* mpn/generic/cmp.c: Use __GMP_FORCE_mpn_cmp to get code from gmp.h.
14423
14424	* acinclude.m4 (GMP_C_ATTRIBUTE_MODE): New macro.
14425	* configure.in: Call it.
14426	* gmp-impl.h (SItype etc): Use it.
14427
14428	* randraw.c (lc): Change mpn_mul_basecase->mpn_mul,
14429	mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
14430
14431	* longlong.h (count_leading_zeros) [pentiumpro]: Work around a partial
14432	register stall on gcc < 3.
14433
14434	* gmp.texi (Introduction to GMP): Add IA-64.
14435	(Notes for Particular Systems): i386 means generic x86.
14436
14437	* tests/t-modlinv.c: Use tests_start and tests_end.
14438
144392001-06-10  Kevin Ryde  <kevin@swox.se>
14440
14441	* gmp.texi (Number Theoretic Functions): mpz_jacobi only defined for b
14442	odd.  Separate the jacobi/legendre/kronecker descriptions.
14443	(Low-level Functions): Document mpn_mul_1 "incr" overlaps.
14444	(Language Bindings): New chapter.
14445
14446	* mpz/jacobi.c: Don't retaining old behaviour of mpz_jacobi on even b
14447	(it wasn't documented in 3.1.1).
14448	* mpz/jacobi.c, gmp-h.in (mpz_kronecker, mpz_legendre): Remove
14449	separate entrypoints, just #define to mpz_jacobi.
14450	* compat.c (__gmpz_legendre): Add compatibility entrypoint.
14451
14452	* mpn/generic/mul_1.c: Allow "incr" style overlaps.
14453	* tests/devel/try.c (param_init): Test this.
14454
14455	* mpf/mul_ui.c: Do size==0 test earlier.
14456
144572001-06-08  Kevin Ryde  <kevin@swox.se>
14458
14459	* gmp-impl.h (ULONG_HIGHBIT, UINT_HIGHBIT, USHRT_HIGHBIT): Cast
14460	ULONG_MAX etc to unsigned long etc before attempting to right shift.
14461
14462	* acinclude.m4 (GMP_ASM_LSYM_PREFIX): Add an AC_DEFINE of LSYM_PREFIX.
14463	* gmp-impl.h (ASM_L): New macro.
14464	(mpn_incr_u, mpn_decr_u, MPN_INCR_U, MPN_DECR_U): Add i386 optimized
14465	versions.
14466
14467	* mpn/hppa/*.s,S,asm: Use .label so the code works with gas on hppa
14468	GNU/Linux too, reported by LaMont Jones <lamont@smallone.fc.hp.com>.
14469	* mpn/hppa/README: Add some notes on this.
14470	* acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Ditto.
14471
14472	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add dive_1.c,
14473	fib2_ui.c.
14474
14475	* tests/mpn/t-iord_u.c: New file.
14476	* tests/mpn/Makefile.am (check_PROGRAMS): Add it.
14477
14478	* configure.in (mips*-*-irix[6789]*): Make ABI=n32 the default, same
14479	as in gmp 3.1.
14480	* gmp.texi (ABI and ISA): Update.
14481
14482	* gmp.texi (Build Options): Misc tweaks.
14483	(Notes for Particular Systems): Describe windows DLL handling.
14484	(Known Build Problems): DJGPP needs bash 2.04.
14485	(Number Theoretic Functions): mpz_invert returns 0<=r<modulus; add
14486	mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui.
14487	(Fibonacci Numbers Algorithm): Update for new formulas used.
14488	(Lucas Numbers Algorithm): New section.
14489
14490	* tune/speed.c,speed.h,common.c,many.pl: Add mpn_fib2_ui, mpz_fib2_ui,
14491	mpz_lucnum_ui, mpz_lucnum2_ui.
14492	* demos/expr/exprz.c,README: Add lucnum.
14493	* demos/perl/GMP.pm,GMP.xs,GMP/Mpz.pm,test.pl: Add fib2, lucnum,
14494	lucnum2.
14495
14496	* tests/mpz/t-lucnum_ui.c: New file.
14497	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14498	* tests/mpz/t-fib_ui.c: Check mpz_fib2_ui too, updates for new style
14499	MPN_FIB2_SIZE.
14500
14501	* tune/tuneup.c, tune/Makefile.am, gmp-impl.h, mpn/*/gmp-mparam.h:
14502	Remove FIB_THRESHOLD, no longer required.
14503
14504	* mpz/fib2_ui.c, mpz/lucnum_ui.c mpz/lucnum2_ui.c: New files.
14505	* Makefile.am, mpz/Makefile.am: Add them.
14506	* gmp-h.in (mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui): Add
14507	prototypes.
14508
14509	* mpn/generic/fib2_ui.c: New file.
14510	* configure.in (gmp_mpn_functions): Add it.
14511	* gmp-impl.h (mpn_fib2_ui, FIB_TABLE, etc): Add these.
14512	* mpz/fib_ui.c: Rewrite.
14513
14514	* acinclude.m4 (GMP_C_SIZES): Fix _LONG_LONG_LIMB define for mp_limb_t
14515	size test.
14516	(GMP_FUNC_ALLOCA): Add dummy __GMP_BITS_PER_MP_LIMB for gmp-h.in work.
14517
14518	* configure.in (CPPFLAGS): Remove -D__GMP_WITHIN_GMP, don't want it
14519	everywhere.
14520	* Makefile.am, mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am,
14521	mpf/Makefile.am, mpbsd/Makefile.am (INCLUDES): Set -D__GMP_WITHIN_GMP.
14522
14523	* configure.in (*-*-msdosdjgpp*): Forcibly disable shared libraries,
14524	to make libtests.la work.
14525
14526	* acconfig.h (_LONG_LONG_LIMB, HAVE_MPFR): Remove dummy defines, no
14527	longer needed.
14528
14529	* mpz/set_ui.c: Store to _mp_d[0] unconditionally.
14530
145312001-05-27  Kevin Ryde  <kevin@swox.se>
14532
14533	* configure.in, gmp-h.in, mp-h.in: Add support for windows DLLs.
14534
145352001-05-26  Kevin Ryde  <kevin@swox.se>
14536
14537	* gmp.texi (ABI and ISA, Reentrancy): Minor tweaks
14538	(Notes for Package Builds): Note gmp.h is a generated file.
14539	(Notes for Particular Systems): -march=pentiumpro is used for gcc
14540	2.95.4 and up.
14541	(Assembler Loop Unrolling): Mention non power-of-2 unrolling.
14542	(Internals): New chapter.
14543	* mpf/README: Remove file.
14544
14545	* demos/expr/README: Miscellaneous rewordings.
14546
14547	* demos/perl: New directory.
14548	* demos/Makefile.am: Add it.
14549	* demos/perl/INSTALL, Makefile.PL, GMP.pm, GMP.xs, typemap,
14550	GMP/Mpz.pm, GMP/Mpq.pm, GMP/mpf.pm, GMP/Rand.pm, sample.pl, test.pl:
14551	New files.
14552
14553	* configure, aclocal.m4: Update to autoconf 2.50.
14554
14555	* configure, aclocal.m4, ltmain.sh: Update to libtool 1.4.
14556
14557	* configure, aclocal.m4, missing, ansi2knr.c, */Makefile.in: Update to
14558	automake 1.4f.
14559	* Makefile.am: Conditionalize mpfr in $(SUBDIRS) to handle mpfr.info.
14560	* mpfr/Makefile.am (INFO_DEPS): Remove previous mpfr.info handling.
14561	* mpn/Makefile.am (GENERIC_SOURCES): Remove this, just put mp_bases.c
14562	in libmpn_la_SOURCES.
14563	* tests/Makefile.am (tests.h): Move from EXTRA_HEADERS to
14564	libtests_la_SOURCES.
14565	* ltconfig: Remove file, no longer needed.
14566
14567	* Makefile.am (gmp-impl.h, longlong.h, stack-alloc.h): Move from
14568	EXTRA_DIST to libgmp_la_SOURCES, so they get included in TAGS.
14569	* tests/rand/Makefile.am (gmpstat.h): Move to libstat_la_SOURCES
14570	similarly.
14571
14572	* config.guess (68k-*-*): Use $SHELL not "sh", tweak some comments.
14573
14574	* mpfr/mpfr.texi (Introduction to MPFR): Tweak table formatting, note
14575	non-free programs must be able to be re-linked.
14576
145772001-05-20  Kevin Ryde  <kevin@swox.se>
14578
14579	* mpn/powerpc64/addmul_1.asm, mpn/powerpc64/mul_1.asm,
14580	mpn/powerpc64/submul_1.asm: Add carry-in entrypoints.
14581
145822001-05-17  Kevin Ryde  <kevin@swox.se>
14583
14584	* gmp.texi (ge): Fix definition for info.
14585	(Notes for Particular Systems): Mention 68k dragonball and cpu32.
14586	(Efficiency): Add static linking, more about in-place operations,
14587	describe mpq+/-integer using addmul.
14588	(Reporting Bugs): A couple of words about self-contained reports.
14589	(Floating-point Functions): Note exponent limitations of mpf_get_str
14590	and mpf_set_str.
14591	(Initializing Floats): Clarify mpf_get_prec, mpf_set_prec and
14592	mpf_set_prec_raw a bit.
14593	(Float Comparison): Note current mpf_eq deficiencies.
14594
14595	* gmp-h.in (__GMP_HAVE_CONST, __GMP_HAVE_PROTOTYPES,
14596	__GMP_HAVE_TOKEN_PASTE): Merge GNU ansidecl.h tests for ANSI compilers.
14597	* demos/expr/expr-impl-h.in: Ditto.
14598
14599	* gmp-impl.h (BITS_PER_MP_LIMB): Define from __GMP_BITS_PER_MP_LIMB if
14600	not already in gmp-mparam.h.
14601	* tests/t-constants.c (BITS_PER_MP_LIMB, __GMP_BITS_PER_MP_LIMB):
14602	Check these are the same.
14603
14604	* gmp-h.in (mpf_get_default_prec, mpf_get_prec, mpf_set_default_prec,
14605	mpf_set_prec_raw): Provide "extern inline" versions, use __GMPF on the
14606	macros.
14607	* mpf/get_dfl_prc.c, mpf/get_prc.c, mpf/set_dfl_prc.c,
14608	mpf/set_prc_raw.c: Get code from gmp.h using __GMP_FORCE.
14609
14610	* gmp-h.in, gmp-impl.h (__gmp_default_fp_limb_precision): Move from
14611	gmp-impl.h to gmp-h.in.
14612	(__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Ditto, and use __GMPF
14613	prefix and add a couple of casts.
14614	* gmp-h.in (__GMP_MAX): New macro.
14615	* mpf/init2.c mpf/set_prc.c: Update for __GMPF prefix.
14616
14617	* gmp-h.in (__GMP_BITS_PER_MP_LIMB): New templated define.
14618	* acinclude.m4 (GMP_C_SIZES): Add AC_SUBST __GMP_BITS_PER_MP_LIMB,
14619	remove AC_DEFINE BITS_PER_MP_LIMB.
14620
146212001-05-13  Kevin Ryde  <kevin@swox.se>
14622
14623	* gmp-h.in, gmp.texi, Makefile.am, mpz/Makefile.am, tests/mpz/t-pow.c:
14624	Remove mpz_si_pow_ui, pending full si support.
14625	* mpz/si_pow_ui.c: Remove file.
14626
146272001-05-11  Kevin Ryde  <kevin@swox.se>
14628
14629	* mpn/x86/pentium/dive_1.asm: New file.
14630
14631	* mpn/powerpc32/umul.asm: Use r on registers.
14632	* mpn/powerpc64/umul.asm: New file.
14633	* configure.in (powerpc*-*-*): Enable umul in extra_functions.
14634
14635	* tests/refmpn.c, tests/tests.h (refmpn_umul_ppmm): Use same arguments
14636	as normal mpn_umul_ppmm.
14637	(refmpn_mul_1c): Update.
14638	* tests/devel/try.c, tune/many.pl: Add some umul_ppmm testing support.
14639
14640	* mpn/x86/k6/mmx/popham.asm, mpn/x86/k7/mmx/popham.asm: Don't support
14641	size==0.
14642	* mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm: Ditto,
14643	and shave a couple of cycles from the PIC entry code.
14644
14645	* mpz/mul.c: Use mpn_mul_1 for size==1 and mpn_mul_2 (if available)
14646	for size==2, to avoid copying; do vsize==0 test earlier.
14647
14648	* mpf/sub.c: Test r!=u before calling mpf_set.
14649	* mpf/add.c: Ditto, and share mpf_set between usize==0 and vsize==0.
14650
14651	* mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
14652	mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
14653	count_leading_zeros zero.
14654
14655	* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Print a message if extra
14656	flags are added.
14657
14658	* tests/mpz/t-mul_i.c: New file.
14659	* tests/mpz/Makefile.am: Add it.
14660
14661	* mpz/mul_siui.c (mpz_mul_si): Fix for -0x80..00 on long long limb.
14662
14663	* gmp-h.in (mpf_set_si, mpf_set_ui): Revert last change, set exp to 0
14664	when n==0.
14665	* mpf/ceilfloor.c, mpf/trunc.c: Fix exp to 0 when setting r to 0.
14666	* gmp-impl.h (MPF_CHECK_FORMAT): Check exp==0 when size==0.
14667
146682001-05-07  Kevin Ryde  <kevin@swox.se>
14669
14670	* gmp-h.in (mpf_set_si, mpf_set_ui): Don't bother setting _mp_exp to 0
14671	when n==0 (use 1 unconditionally).
14672	* tests/mpf/t-misc.c (check_mpf_set_si): Don't demand anything of
14673	_mp_exp when _mp_size is zero.
14674
14675	* mpn/x86/README: Note gas _GLOBAL_OFFSET_TABLE_ with leal problem.
14676
14677	* gmp-h.in (mpz_fits_uint_p, mpz_fits_ulong_p, mpz_fits_ushort_p):
14678	Provide these as "extern inline"s.
14679	(__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): New macros.
14680	(mpz_popcount): Use __GMP_ULONG_MAX.
14681	* gmp-impl.h (UINT_MAX, ULONG_MAX, USHRT_MAX): Use __GMP_U*_MAX, if
14682	not already defined.
14683	* mpz/fits_u.c: Use the code from gmp.h.
14684
146852001-05-06  Kevin Ryde  <kevin@swox.se>
14686
14687	* mpn/x86/k7/dive_1.asm: New file.
14688	* mpn/x86/k7/gcd_1.asm: New file.
14689	* mpn/asm-defs.m4 (m4_count_trailing_zeros): New macro.
14690
14691	* gmp-h.in (mpz_get_ui, mpz_getlimbn, mpz_set_q, mpz_perfect_square_p,
14692	mpz_popcount, mpz_size, mpf_set_ui, mpf_set_si, mpf_size): Provide
14693	these as "extern inlines".
14694	Use just one big extern "C" block.
14695	* mpz/getlimbn.c, mpz/get_ui.c, mpz/perfsqr.c, mpz/popcount.c
14696	mpz/set_q.c, mpz/size.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Use
14697	__GMP_FORCE to get code from gmp.h.
14698
146992001-05-03  Kevin Ryde  <kevin@swox.se>
14700
14701	* extract-dbl.c: Add ASSERT d>=0.
14702
14703	* gmp.texi (Efficiency): Add mpz_addmul etc for mpz+=integer, add
14704	mpz_neg etc in-place.
14705	(Integer Arithmetic): Add mpz_addmul, mpz_submul, mpz_submul_ui.
14706	(Initializing Rationals): Add mpq_set_str.
14707	(Low-level Functions): mpn_set_str requires strsize >= 1.
14708
14709	* gmp-h.in (__GMP_EXTERN_INLINE, __GMP_ABS): New macros.
14710	(mpz_abs, mpq_abs, mpf_abs, mpz_neg, mpq_neg, mpf_neg): Provide inline
14711	versions.
14712	* mpz/abs.c, mpq/abs.c, mpf/abs.c, mpz/neg.c, mpq/neg.c, mpf/neg.c:
14713	Add suitable __GMP_FORCE to turn off inline versions.
14714
14715	* tests/mpz/t-aorsmul.c,t-cmp_d.c,t-popcount,t-set_str.c: New files.
14716	* tests/mpz/Makefile.am: Add them.
14717
14718	* mpz/aorsmul_i.c: New file, rewrite of addmul_ui.c.  Add
14719	mpz_submul_ui entrypoint, share more code between some of the
14720	conditionals, use mpn_mul_1c if available.
14721	* mpz/addmul_ui.c: Remove file.
14722	* mpz/aorsmul.c: New file.
14723	* Makefile.am, mpz/Makefile.am: Update.
14724	* gmp-h.in (mpz_addmul, mpz_submul, mpz_submul_ui): Add prototypes.
14725	* gmp-impl.h (mpz_aorsmul_1): Add prototype.
14726
14727	* tests/mpq/t-set_str.c: New file.
14728	* tests/mpq/Makefile.am: Add it.
14729
14730	* mpq/set_str.c: New file.
14731	* Makefile.am, mpq/Makefile.am: Add it.
14732	* gmp-h.in (mpq_set_str): Add prototype.
14733
14734	* mpz/set_str.c: Fix for trailing white space on zero, eg. "0 ".
14735	* mpn/generic/set_str.c: Add ASSERT str_len >= 1.
14736
14737	* gmp-h.in, gmp-impl.h (mpn_incr_u, mpn_decr_u): Move to gmp-impl.h.
14738	* gmp-impl.h (MPN_INCR_U, MPN_DECR_U): New macros.
14739
147402001-04-30  Kevin Ryde  <kevin@swox.se>
14741
14742	* tests/mpz/t-lcm.c: New file.
14743	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14744
14745	* mpz/lcm.c: Add one limb special case.
14746
14747	* mpz/lcm_ui.c: New file.
14748	* Makefile.am, mpz/Makefile.am: Add it.
14749	* gmp-h.in (mpz_lcm_ui): Add prototype.
14750	* gmp.texi (Number Theoretic Functions): Add mpz_lcm_ui, document lcm
14751	now always positive.
14752
14753	* mp-h.in (mp_size_t, mp_exp_t): Fix typedefs to match gmp-h.in.
14754
14755	* gmp-h.in (mpn_add_1, mpn_add, mpn_sub_1, mpn_sub): Remove K&R
14756	function defines (ansi2knr will handle mpn/inline.c, and just ansi is
14757	enough for gcc extern inline).
14758
14759	* gmp-h.in (__GMP_HAVE_TOKEN_PASTE): New macro.
14760	(__MPN): Use it.
14761	* gmp-impl.h (CNST_LIMB): Ditto.
14762
14763	* gmp-h.in, mp-h.in (__gmp_const, __gmp_signed, _PROTO, __MPN): Use
14764	ANSI forms on Microsoft C.
14765	(__GMP_HAVE_CONST): New define.
14766	* gmp-impl.h (const, signed): Use it.
14767
14768	* demos/expr/expr-impl-h.in (<stdarg.h>): Use this with Microsoft C.
14769	(HAVE_STDARG): New define.
14770	* demos/expr/expr.c,exprz.c,exprq.c,exprf.c,exprfr.c: Use it.
14771
14772	* acinclude.m4 (GMP_C_STDARG): New macro.
14773	* configure.in: Call it.
14774	* rand.c: Use it.
14775
14776	* configure.in (AC_PROG_CC_STDC): New test.
14777
147782001-04-25  Kevin Ryde  <kevin@swox.se>
14779
14780	* mpn/x86/k6/mmx/dive_1.asm: New file.
14781	* mpn/x86/x86-defs.m4 (Zdisp): Two more insns.
14782
14783	* mpn/x86/pentium/mul_2.asm: New file.
14784	* mpn/asm-defs.m4: Add define_mpn(mul_2).
14785	* acconfig.h (HAVE_NATIVE_mpn_divexact_1, mul_2): Add templates.
14786
14787	* configure.in (ABI): Use AC_ARG_VAR.
14788
14789	* tests/devel/try.c: Run reference function when validate fails.
14790
14791	* mpq/get_str.c: Fixes for negative bases.
14792	* tests/mpq/t-get_str.c: Check negative bases.
14793	* tests/misc.c,tests.h (__gmp_allocate_strdup, strtoupper): New
14794	functions.
14795
147962001-04-24  Torbjorn Granlund  <tege@swox.com>
14797
14798	* mpz/lcm.c (mpz_lcm): Make result always positive.
14799
14800	* gmp-h.in (mpz_inp_binary, mpz_out_binary): Remove declarations.
14801
148022001-04-22  Kevin Ryde  <kevin@swox.se>
14803
14804	* mpn/powerpc64/addsub_n.asm: Use config.m4 not asm-syntax.m4.
14805
14806	* mpz/cmp_d.c, mpz/cmpabs_d.c: New files.
14807	* Makefile.am, mpz/Makefile.am: Add them.
14808	* mpf/cmp_d.c, mpf/get_dfl_prec.c: New files.
14809	* Makefile.am, mpf/Makefile.am: Add them.
14810	* gmp-h.in (mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d, mpf_get_default_prec):
14811	Add prototypes.
14812	* gmp.texi: Add documentation.
14813
14814	* mpf/set_prc.c: Avoid a realloc call if already the right precision.
14815
14816	* gmp-impl.h (MPF_BITS_TO_PREC, MPF_PREC_TO_BITS): New macros.
14817	* mpf/get_prc.c, init2.c, set_dfl_prec.c, set_prc.c, set_prc_raw.c:
14818	Use them.
14819
148202001-04-20  Kevin Ryde  <kevin@swox.se>
14821
14822	* tests/devel/try.c: Don't test size==0 on mpn_popcount and
14823	mpn_hamdist; add testing for mpn_divexact_1; print some limb values
14824	with mpn_trace not printf.
14825
14826	* mpz/popcount.c, mpz/hamdist.c: Don't pass size==0 to mpn_popcount
14827	and mpn_hamdist.
14828	* mpn/generic/popham.c: Don't support size==0.
14829
14830	* config.guess (m68k-*-*): Detect m68010, return m68360 for cpu32,
14831	cleanup the nesting a bit.
14832
14833	* gmp.texi (Integer Division): Fix mpz_congruent_2exp_p "c" type.
14834	(Integer Division): Add mpz_divexact_ui.
14835	(Number Theoretic Functions): Fix mpz_nextprime return type.
14836	(Exact Remainder): Divisibility tests now implemented.
14837	And more index entries in a few places.
14838
14839	* tests/mpz/dive_ui.c: New file.
14840	* tests/mpz/Makefile.am (check_PROGRAMS): Add it.
14841
14842	* mpz/dive_ui.c: New file.
14843	* Makefile.am, mpz/Makefile.am: Add it.
14844	* gmp-h.in (mpz_divexact_ui): Add prototype.
14845
14846	* tune/many.pl, tune/speed.h: Add special mpn_back_to_back for
14847	development.
14848
14849	* gmp-impl.h (MPN_DIVREM_OR_DIVEXACT_1): New macro.
14850	* mpz/divexact.c: Use it.
14851
14852	* gmp-impl.h (DIVEXACT_1_THRESHOLD): New threshold.
14853	* tune/tuneup.c: Tune it.
14854
14855	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
14856	mpn_divexact_1, mpn_copyi, mpn_copyd.
14857
14858	* mpn/generic/dive_1.c: New file.
14859	* configure.in (gmp_mpn_functions): Add it.
14860	* gmp-impl.h (mpn_divexact_1): Add prototype.
14861	* mpn/asm-defs.m4: Add define_mpn(divexact_1).
14862
14863	* tests/mpn: New directory.
14864	* tests/Makefile.am: Add it.
14865	* tests/mpn/Makefile.am: New file.
14866	* configure.in (AC_OUTPUT): Add it.
14867	* tests/mpn/t-asmtype.c: New file.
14868
14869	* configure, config.in: Update to autoconf 2.49d.
14870
14871	* configure.in, gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Revert
14872	to generating gmp.h, mp.h and expr-impl.h with AC_OUTPUT and AC_SUBST.
14873
14874	* configure.in (m68*-*-*): Oops, m683?2 is 68000, m68360 is cpu32.
14875	* mpn/m68k/m68k-defs.m4 (scale_available_p): Ditto.
14876
14877	* configure.in (underscore, asm_align): Remove these variables, unused.
14878	(GMP_ASM_*): Sort by AC_REQUIREs, to avoid duplication.
14879	* acinclude.m4 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_LOG): Remove support
14880	for actions, no longer needed.
14881
148822001-04-17  Kevin Ryde  <kevin@swox.se>
14883
14884	* config.guess (m68k-*-*): Look for cpu in linux kernel /proc/cpuinfo.
14885
14886	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): The -mpentiumpro problem is
14887	fixed in 2.95.4, so test for that.
14888	(GMP_ASM_TYPE): Amend some comments.
14889
14890	* tune/freq.c (speed_cpu_frequency_sysctl): Avoid having unused
14891	variables on GNU/Linux.
14892
14893	* mpn/asm-defs.m4 (m4_instruction_wrapper): Fix a quoting problem if
14894	the name of the file is a macro.
14895
148962001-04-15  Kevin Ryde  <kevin@swox.se>
14897
14898	* mpn/powerpc64/*.asm: Add speeds on ppc630.
14899
14900	* acconfig.h: Add dummy templates for _LONG_LONG_LIMB and HAVE_MPFR.
14901	* configure.in: Ensure config.in is the last AM_CONFIG_HEADER,
14902	which autoheader requires.
14903
14904	* mpn/x86/pentium/popcount.asm: New file.
14905	* mpn/x86/pentium/hamdist.asm: New file.
14906
14907	* mpn/asm-defs.m4: (m4_popcount): New macro.
14908	Amend a few comments elsewhere.
14909
14910	* acinclude.m4 (GMP_ASM_RODATA): If possible, grep compiler output for
14911	the right directive.
14912
14913	* tune/speed.c: Print clock speed in MHz, not cycle time.
14914
14915	* configure.in (AC_CHECK_HEADERS): Check for sys/processor.h.
14916	* tune/freq.c (speed_cpu_frequency_processor_info): Require
14917	<sys/processor.h> to exist, to differentiate the different
14918	processor_info on Darwin.
14919	(speed_cpu_frequency_sysctlbyname): Remove hw.model test which is in
14920	speed_cpu_frequency_sysctl.
14921	(speed_cpu_frequency_sysctl): Add hw.cpufrequency for Darwin.
14922
14923	* gmp-impl.h (MPN_LOGOPS_N_INLINE, mpn_and_n ... mpn_xnor_n): Use a
14924	single expression argument for the different operations, necessary for
14925	the Darwin "smart" preprocessor.
14926
14927	* mpn/m68k/t-m68k-defs.pl: Allow white space in m4_definsn and
14928	m4_defbranch.
14929
14930	* tune/many.pl: Change RM_TMP_S to RM_TMP to match mpn/Makeasm.am,
14931	avoid a possibly undefined array in a diagnostic, add more renaming to
14932	hamdist.
14933
149342001-04-13  Kevin Ryde  <kevin@swox.se>
14935
14936	* ltmain.sh, aclocal.m4, configure, config.in: Update to libtool 1.3d.
14937	* configure.in: Change ac_ to lt_ in lt_cv_archive_cmds_need_lc and
14938	lt_cv_proc_cc_pic.
14939
14940	* config.guess (m68*-*-*): Detect exact cpu with BSD sysctl hw.model,
14941	detect 68000/68010 with trapf, detect 68302 with bfffo.
14942
149432001-04-11  Kevin Ryde  <kevin@swox.se>
14944
14945	* acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_ADDRESSING,
14946	GMP_ASM_M68K_BRANCHES): New macros.
14947	* configure.in: Use them, remove old 68k configs, use mc68020 udiv and
14948	umul.
14949
14950	* mpn/m68k/m68k-defs.m4: New file.
14951	* mpn/m68k/t-m68k-defs.pl: New file.
14952	* mpn/m68k/*.asm: New files, converted from .S.  Merge add_n and sub_n
14953	to aors_n, ditto mc68020 addmul_1 and submul_1 to aorsmul_1.  No
14954	object code changes (except .type and .size now used on NetBSD 1.4).
14955	* mpn/m68k/README: New file.
14956	* mpn/m68k/*.S, */*.S, syntax.h: Remove files.
14957
14958	* configure.in (m68*-*-netbsd1.4*): Pretend getrusage doesn't exist.
14959	* tune/README: Update.
14960
14961	* configure.in (powerpc*-*-*): For the benefit of Darwin 1.3, add cc
14962	to cclist, make gcc_cflags -Wa,-mppc optional.
14963
149642001-04-06  Kevin Ryde  <kevin@swox.se>
14965
14966	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add | for 68k.
14967	(gmpasm-mode-syntax-table): Add to comments.
14968
14969	* tests/mpz/reuse.c (dsi_div_func_names): Add names for cdiv_[qr]_2exp.
14970
149712001-04-04  Kevin Ryde  <kevin@swox.se>
14972
14973	* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): Fix test so as to actually
14974	detect the problem, add notes on m68k netbsd 1.4.1.
14975
14976	* gmp.texi (Compatibility with older versions): Note libmp
14977	compatibility.
14978
149792001-04-03  Kevin Ryde  <kevin@swox.se>
14980
14981	* tests/mpz/reuse.c: Add mpz_cdiv_q_2exp and mpz_cdiv_r_2exp.
14982
14983	* tests/mpz/t-pow.c: Drag in refmpn.o when testing mpz_pow_ui etc with
14984	refmpn_mul_2.
14985
14986	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of mpn_com_n
14987	and mpn_mul_2.
14988	* tests/devel/try.c: Add testing of mpn_mul_2, and a
14989	DATA_MULTIPLE_DIVISOR attribute.
14990
14991	* gmp.texi (Build Options): List more m68k's.
14992	(Build Options): Add cross reference to tex2html.
14993	(Notes for Particular Systems): Add m68k means 68020 or up.
14994	(Rational Conversions): New section, with mpq_get_d, mpq_set_d and
14995	mpq_set_f from Miscellaneous, and new mpq_set_str.
14996	(Applying Integer Functions): Move mpq_get_num, mpq_get_den,
14997	mpq_set_num and mpq_set_den from Misc.
14998	(Miscellaneous Rational Functions): Remove section.
14999	(Custom Allocation): Partial rewrite for various clarifications.
15000	(References): Improve line breaks near URLs.
15001
15002	* acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): New macro.
15003	* configure.in (m68*-*-*): Use it to run gcc 2.95.x at -O not -O2.
15004	(m680?0-*-*, m683?2-*-*, m68360-*-*): Add optional gcc -m options.
15005
15006	* tests/mpz/t-cmp.c: New file.
15007	* tests/mpz/t-sizeinbase.c: New file.
15008	* tests/mpz/Makefile.am: Add them.
15009
15010	* gmp-impl.h (MPN_CMP): New macro.
15011	* mpz/cmp.c,cmpabs.c: Use it, and minor cleanups too.
15012
15013	* tests/mpq/t-equal.c: New file.
15014	* tests/mpq/t-get_str.c: New file.
15015	* tests/mpq/Makefile.am: Add them.
15016
15017	* mpq/get_str.c: New file.
15018	* Makefile.am, mpq/Makefile.am: Add it.
15019	* gmp-h.in (mpq_get_str): Add prototype.
15020
15021	* mpq/equal.c: Rewrite using inline compare loops.
15022
15023	* tests/refmpn.c,tests.h (refmpn_mul_2): Fix parameter order.
15024	* mpz/n_pow_ui.c: Fix mpn_mul_2 calls parameter order.
15025
150262001-03-29  Kevin Ryde  <kevin@swox.se>
15027
15028	* tests/mpf/t-trunc.c: New file.
15029	* tests/mpf/Makefile.am (check_PROGRAMS): Add it.
15030	* gmp-impl.h (MPF_CHECK_FORMAT): New macro.
15031
15032	* mpf/trunc.c: New file, rewrite of integer.c, preserve prec+1 in
15033	copy, don't copy if unnecessary.
15034	* mpf/ceilfloor.c: New file likewise, and use common subroutine for
15035	ceil and floor.
15036	* mpf/integer.c: Remove file.
15037	* Makefile.am, mpf/Makefile.am, macos/Makefile.in: Update.
15038
15039	* acinclude.m4 (GMP_GCC_VERSION_GE): New macro.
15040	(GMP_GCC_MARCH_PENTIUMPRO): Use it, remove CCBASE parameter (don't
15041	bother checking it's gcc).
15042	(GMP_GCC_ARM_UMODSI): New macro.
15043	* configure.in (GMP_GCC_MARCH_PENTIUMPRO): Update parameters.
15044	(arm*-*-*): Use GMP_GCC_ARM_UMODSI.
15045	* gmp.texi (Notes for Particular Systems): Add arm gcc requirements.
15046
150472001-03-28  Kevin Ryde  <kevin@swox.se>
15048
15049	* gmp.texi (Converting Integers): Document mpz_getlimbn using absolute
15050	value and giving zero for N out of range, move to end of section.
15051
15052	* tests/refmpn.c (refmpn_tdiv_qr): Use refmpn_divmod_1 rather than
15053	refmpn_divrem_1.
15054	* tests/tests.h: Add some prototypes that were missing.
15055
15056	* mpz/tdiv_q_ui.c: Remove a comment that belonged to mpz_tdiv_r_ui.
15057
150582001-03-26  Torbjorn Granlund  <tege@swox.com>
15059
15060	* mpn/generic/gcdext.c: Handle carry overflow after m*n multiply code
15061	in both arms.  Partially combine multiply arms.
15062
150632001-03-24  Kevin Ryde  <kevin@swox.se>
15064
15065	* longlong.h: Add comments to P5 count_leading_zeros.
15066
15067	* demos/expr/exprz.c,t-expr.c,README: Add congruent_p and divisible_p.
15068
150692001-03-23  Kevin Ryde  <kevin@swox.se>
15070
15071	* gmp.texi (GMPceil, GMPfloor, ge, le): New macros.
15072	(Integer Division, mpn_cmp, mpn_sqrtrem, Algorithms): Use them.
15073	(mpn_bdivmod): Refer to mp_bits_per_limb, not BITS_PER_MP_LIMB, and
15074	improve formatting a bit.
15075	(mpn_lshift, mpn_rshift): Clarify the return values, and use {rp,n}
15076	for the destination.
15077	Miscellaneous minor rewordings in a few places.
15078
15079	* mpn/arm/arm-defs.m4: New file.
15080	* configure.in (arm*-*-*): Use it.
15081	* mpn/arm/*.asm: Use changecom and registers from arm-defs.m4, use L()
15082	for local labels.
15083
15084	* mpn/x86/k6/mmx/com_n.asm: Relax code alignment (same speed).
15085
15086	* gmp-h.in (__GMP_ATTRIBUTE_PURE): Use __pure__ to avoid application
15087	namespace.
15088
15089	* gmp-impl.h (ABS): Add parens around argument.
15090
150912001-03-20  Kevin Ryde  <kevin@swox.se>
15092
15093	* acinclude.m4 (GMP_PROG_M4): Use AC_ARG_VAR on $M4.
15094
15095	* acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): New macro.
15096	* configure.in: Use it.
15097	* mpn/asm-defs.m4: Ditto.
15098
150992001-03-18  Kevin Ryde  <kevin@swox.se>
15100
15101	* mpn/x86/pentium/logops_n.asm: New file.
15102
15103	* mpn/x86/k6/k62mmx/copyd.asm: Rewrite, smaller and simpler, faster on
15104	small sizes, slower on big sizes (about half the time).
15105	* mpn/x86/k6/k62mmx/copyi.asm: Remove file, in favour of generic x86.
15106	* mpn/x86/copyi.asm: Add some comments.
15107	* mpn/x86/k6/README: Update.
15108
15109	* mpn/x86/k6/gcd_1.asm: New file.
15110
15111	* gmp-impl.h (NEG_MOD): Fix type of __dnorm.
15112
15113	* acinclude.m4 (GMP_C_SIZES): Fix use of __GMP_WITHIN_CONFIGURE.
15114
151152001-03-15  Kevin Ryde  <kevin@swox.se>
15116
15117	* gmp.texi (GMPabs): New macro.
15118	(Float Comparison - mpf_reldiff): Use it.
15119	(Integer Comparisons - mpz_cmpabs): Ditto, puts "abs" in info.
15120	(Reentrancy): Update notes on old random functions.
15121	(Karatsuba Multiplication): Better characterize the effect of basecase
15122	speedups on the thresholds, pointed out by Torbjorn.
15123
15124	* tune/README: Notes on the 1x1 div threshold for mpn_gcd_1.
15125
15126	* tests/misc.c (mpz_pow2abs_p, mpz_flipbit, mpz_errandomb,
15127	mpz_errandomb_nonzero, mpz_negrandom): New functions.
15128	(mpz_erandomb, mpz_erandomb_nonzero): Use urandom().
15129	* tests/spinner.c (spinner_wanted, spinner_tick): Make global.
15130	* tests/tests.h: Update prototypes.
15131
15132	* tests/mpz/t-cong.c, tests/mpz/t-cong_2exp.c: New files.
15133	* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
15134
15135	* mpz/cong.c, mpz/cong_2exp.c, mpz/cong_ui.c: New files.
15136	* Makefile.am, mpz/Makefile.am: Add them.
15137	* gmp-impl.h (NEG_MOD): New macro.
15138	* gmp-h.in (mpz_congruent_p, mpz_congruent_2exp_p,
15139	mpz_congruent_ui_p): Add prototypes.
15140	* gmp.texi (Integer Division, Efficiency): Add documentation.
15141
15142	* mpq/aors.c: No need for ABS on denominator sizes.
15143
15144	* gmp-impl.h (mpn_divisible_p): Use __MPN.
15145
15146	* gmp-impl.h (LOW_ZEROS_MASK): New macro.
15147	* mpz/divis_ui.c, mpn/generic/divis.c: Use it.
15148
15149	* mpz/setbit.c: Fix normalization for case of a negative ending up
15150	with a zero high limb.
15151	* tests/mpz/bit.c (check_single): New test for this problem.
15152
15153	* configure.in (none-*-*): Fix cclist for default ABI=long.
15154
151552001-03-10  Kevin Ryde  <kevin@swox.se>
15156
15157	* mpz/cfdiv_q_2exp.c: Don't scan for non-zero limbs if they don't
15158	matter to the rounding.
15159
15160	* mpz/get_ui.c: Fetch _mp_d[0] unconditionally, so the code can come
15161	out branch-free.
15162
151632001-03-08  Kevin Ryde  <kevin@swox.se>
15164
15165	* tests/devel/try.c (param_init): Fix reference functions for and_n
15166	and nand_n.
15167
15168	* tune/speed.c, tests/devel/try.c: Seed RANDS, not srandom etc.
15169	* configure.in (AC_CHECK_FUNCS): Remove srand48 and srandom.
15170	* macos/configure (coptions): Remove random/srandom, now unnecessary.
15171
15172	* configure.in (gmp.h, mp.h, demos/expr/expr-impl.h): Generate using
15173	AM_CONFIG_HEADER.
15174	(_LONG_LONG_LIMB, HAVE_MPFR): Change to AC_DEFINEs.
15175	* gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Change to #undef's.
15176	* acinclude.m4 (GMP_FUNC_ALLOCA, GMP_C_SIZES): Use gmp-h.in, not gmp.h.
15177	* Makefile.am (EXTRA_DIST): Remove gmp-h.in and mp-h.in, now done
15178	automatically.
15179	* acinclude.m4 (GMP_FUNC_ALLOCA), gmp-impl.h: Set and use
15180	__GMP_WITHIN_CONFIGURE rather than GMP_FUNC_ALLOCA_TEST.
15181
15182	* mpf/random2.c: Use _gmp_rand and RANDS instead of random() for the
15183	exponent, ensures full range of values too.
15184
15185	* tests/mpz/t-div_2exp.c (check_various): Start with d based on i, but
15186	don't let it go negative.
15187
15188	* tune/tuneup.c (KARATSUBA_MUL_THRESHOLD): Limit probing to
15189	TOOM3_MUL_THRESHOLD_LIMIT, the size of the workspace in mul_n.c.
15190	Use a -1 with this too, so size<LIMIT not <=.
15191
151922001-03-07  Torbjorn Granlund  <tege@swox.com>
15193
15194	* mpn/cray/cfp/mul_1.c: Don't call mpn_add_n with size 0.
15195	* mpn/cray/cfp/addmul_1.c: Likewise.
15196	* mpn/cray/cfp/submul_1.c: Don't call mpn_sub_n with size 0.
15197
15198	* tests/mpz/t-div_2exp.c (check_various): Start 2nd d loop from 0
15199	(avoid problems with Cray compilers).
15200
152012001-03-06  Torbjorn Granlund  <tege@swox.com>
15202
15203	* mpn/cray/ieee/submul_1.c: Don't call mpn_sub_n with size 0.
15204
15205	* mpn/cray/ieee/mul_basecase.c: New file.
15206	* mpn/cray/ieee/sqr_basecase.c: New file, derived from mul_basecase.c.
15207
152082001-03-06  Kevin Ryde  <kevin@swox.se>
15209
15210	* tests/devel/try.c (pointer_setup): Allow dst_size == SIZE_SIZE2 for
15211	the benefit of mpn_tdiv_qr.
15212
15213	* tune/tuneup.c (all): Start karatsuba probing at size==4, for the
15214	benefit of cray t90 ieee which has speed oddities at size==2.
15215
15216	* gmp-impl.h (USE_LEADING_REGPARM): Use __GMP_GNUC_PREREQ.
15217	Use __GMP_ATTRIBUTE_PURE and ATTRIBUTE_CONST in a few places.
15218
15219	* gmp-h.in (__GMP_GNUC_PREREQ) New macro.
15220	(__GMP_ATTRIBUTE_PURE): New macro, use it in many places.
15221
15222	* gmp-impl.h, gmp-h.in (mpn_jacobi_base): Move prototype to
15223	gmp-impl.h, use ATTRIBUTE_CONST.
15224
15225	* tune/speed.h (speed_cyclecounter): Inline asm version for i386.
15226
15227	* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Only reread "up" after second
15228	realloc, first is under w!=u.
15229
152302001-03-05  Torbjorn Granlund  <tege@swox.com>
15231
15232	* mpn/cray/sub_n.c: Rewrite using `majority' logic.
15233
15234	* mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
15235
15236	* mpn/cray/ieee/mul_1.c: Rewrite.  Streamline multiplications;
15237	use `majority' logic.
15238	* mpn/cray/ieee/addmul_1.c: Likewise.
15239
15240	* mpn/cray/add_n.c: Rewrite using `majority' logic.
15241
152422001-03-04  Torbjorn Granlund  <tege@swox.com>
15243
15244	* longlong.h (CRAY udiv_qrnnd): No longer conditional on CRAYMPP.
15245	(64-bit hppa add_ssaaaa): New.
15246	(64-bit hppa sub_ddmmss): New.
15247
15248	* mpn/cray/ieee/invert_limb.c: New file.
15249
15250	* gmp-impl.h (RANDS): Add a `,0' to make it compile on more compilers.
15251
152522001-03-03  Kevin Ryde  <kevin@swox.se>
15253
15254	* mpz/n_pow_ui.c (ULONG_PARITY): Move to gmp-impl.h.
15255	* gmp-impl.h (ULONG_PARITY): i386 part from n_pow_ui.c, new generic
15256	form by Torbjorn.
15257
15258	* tests/mpz/t-div_2exp.c: New file, rewrite of t-2exp.c.
15259	* tests/mpz/t-2exp.c: Remove file.
15260	* tests/mpz/Makefile.am (check_PROGRAMS): Update.
15261
15262	* gmp-h.in (mpz_cdiv_q_2exp, mpz_cdiv_q_2exp): Add prototypes.
15263	* gmp.texi (Integer Division): Add mpz_cdiv_q_2exp and mpz_cdiv_q_2exp.
15264
15265	* mpz/cfdiv_q_2exp.c: New file, partial rewrite of fdiv_q_2exp.c, add
15266	mpz_cdiv_q_2exp entrypoint.
15267	* mpz/cfdiv_r_2exp.c: New file, rewrite of fdiv_r_2exp.c, use all mpn,
15268	add mpz_cdiv_r_2exp entrypoint.
15269	* mpz/fdiv_q_2exp.c, mpz/fdiv_r_2exp.c: Remove files.
15270	* mpz/Makefile.am (libmpz_la_SOURCES): Update.
15271	* Makefile.am (MPZ_OBJECTS): Ditto.
15272
15273	* gmp-impl.h (USE_LEADING_REGPARM): Use __i386__ same as longlong.h
15274	(REGPARM_2_1, REGPARM_3_1, REGPARM_ATTR): New macros.
15275	* mpz/jacobi.c (jac_or_kron): Use them.
15276
15277	* configure.in (HAVE_ABI_$ABI): Re-enable this for config.m4, with
15278	dots changed to underscores (necessary for hppa).
15279
15280	* tests/mpz/t-divis.c, tests/mpz/t-divis_2exp.c: New files.
15281	* tests/mpz/Makefile.am (check_PROGRAMS): Add them.
15282
15283	* gmp-h.in (mpz_divisible_p, mpz_divisible_ui_p,
15284	mpz_divisible_2exp_p): Add prototypes.
15285	* gmp.texi (Integer Division): Add mpz_divisible_p.
15286	(Efficiency): Add remarks about divisibility testing.
15287
15288	* mpz/divis.c, mpz/divis_ui.c, mpz/divis_2exp.c: New files.
15289	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
15290	* Makefile.am (MPZ_OBJECTS): Ditto.
15291
15292	* mpn/generic/divis.c: New file.
15293	* configure.in (gmp_mpn_functions): Add it.
15294	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Ditto.
15295	* gmp-impl.h (mpn_divisible_p): Add prototype.
15296
15297	* urandom.h: Remove file.
15298	* Makefile.am (EXTRA_DIST): Remove it.
15299
15300	* tests/mpz/convert.c, dive.c, io.c, logic.c, reuse.c, t-2exp.c,
15301	t-fdiv.c, t-fdiv_ui.c, t-gcd.c, t-jac.c, t-mul.c, t-pow.c,
15302	t-powm.c, t-powm_ui.c, t-root.c, t-sqrtrem.c, t-tdiv.c,
15303	t-tdiv_ui.c: Use RANDS, initialized by tests_rand_start.
15304
15305	* tests/mpz/t-pow.c: New file, being t-pow_ui renamed and with some
15306	further tests added.
15307	* tests/mpz/t-pow_ui.c: Remove file.
15308	* tests/mpz/Makefile.am (check_PROGRAMS): Update.
15309
15310	* tests/t-modlinv.c: Don't use urandom.h.
15311	* tests/mpz/bit.c, tests/mpz/t-scan.c: Ditto.
15312	* tests/mpq/t-cmp.c, tests/mpq/t-cmp_ui.c, tests/mpq/t-get_d.c: Ditto.
15313	* tests/mpf/reuse.c, t-add.c, t-conv.c, t-dm2exp.c, t-muldiv.c,
15314	t-sqrt.c, t-sub.c: Ditto.
15315
15316	* tests/misc.c (tests_rand_start, tests_rand_end): New functions.
15317	(tests_start, tests_end): Use them.
15318	(urandom): New function.
15319	* tests/tests.h: Add prototypes.
15320
15321	* mpz/random.c: Rewrite using mpz_urandomb and RANDS.
15322	* mpn/generic/random.c: Rewrite using _gmp_rand and RANDS.
15323	* mpn/generic/random2.c: Use RANDS not random() etc.
15324
15325	* gmp-impl.h (__gmp_rands, __gmp_rands_initialized): Add externs.
15326	(gmp_randstate_ptr): New typedef.
15327	(RANDS, RANDS_CLEAR): New macros.
15328
15329	* rands.c: New file.
15330	* Makefile.am (libgmp_la_SOURCES): Add it.
15331
15332	* configure.in (mpn_objs_in_libmp): New AC_SUBST.
15333	* Makefile.am (libmp_la_DEPENDENCIES): Use it.
15334
153352001-03-02  Torbjorn Granlund  <tege@swox.com>
15336
15337	* mpn/pa64/udiv_qrnnd.asm: New file.
15338
153392001-03-01  Kevin Ryde  <kevin@swox.se>
15340
15341	* mpbsd/rpow.c: New file.
15342	* mpbsd/Makefile.am (libmpbsd_la_SOURCES): Add it
15343	(nodist_libmpbsd_la_SOURCES): Remove pow_ui.c.
15344	* Makefile.am (MPBSD_OBJECTS): Add rpow.lo, remove pow_ui.lo.
15345	(libmp_la_DEPENDENCIES): Add mpz/n_pow_ui.lo.
15346
15347	* mpz/ui_pow_ui.c: Rewrite using mpz_n_pow_ui.
15348	* mpz/pow_ui.c: Ditto, and no longer provide rpow for mpbsd.
15349
15350	* mpz/n_pow_ui.c: New file, rewrite of pow_ui.c and ui_pow_ui.c.  Use
15351	less temporary memory, strip factors of 2 from the base, use mpn_mul_2
15352	if available.
15353	* mpz/si_pow_ui.c: New file.
15354	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
15355	* Makefile.am (MPZ_OBJECTS): Ditto.
15356	* gmp-impl.h (mpz_n_pow_ui): Add prototype.
15357	* gmp-h.in (mpz_si_pow_ui): Add prototype.
15358	* gmp.texi (Integer Exponentiation): Add mpz_si_pow_ui.
15359
15360	* acinclude.m4 (GMP_C_SIZES): Add BITS_PER_ULONG.
15361	Correction to mp_limb_t working check.
15362	* configure.in (limb_chosen): New variable.
15363	* tests/t-constants.c (BITS_PER_ULONG): Check this value.
15364	Add some reminders about tests that fail on Cray.
15365
15366	* tests/refmpn.c (refmpn_mul_2): New function.
15367	* tests/refmpz.c (refmpz_pow_ui): Copied from tests/mpz/t-pow_ui.c
15368	* tests/tests.h: Add prototypes.
15369
15370	* configure.in (none-*-*): Add ABI=longlong.
15371	* doc/configuration (Long long limb testing): Describe it.
15372
15373	* gmp.texi (Low-level Functions): Move some commented out remarks ...
15374	* mpn/generic/mul_basecase.c: ... to here.
15375
15376	* mpn/x86/README: Note "%=" as an alternative to "1:" in __asm__.
15377
15378	* tests/trace.c (mp_trace_start): Print "bin" for binary.
15379
15380	* mpn/generic/dump.c: Add a couple of casts to keep gcc quiet.
15381
15382	* gmp-h.in (mpn_incr_u, mpn_decr_u): Add parens around arguments.
15383
15384	* mpbsd/mout.c, mpbsd/mtox.c (num_to_text): Remove unused variable.
15385
15386	* mpfr/set_d.c (mpfr_get_d2): Declare "q" for 64-bit limbs.
15387
153882001-02-28  Torbjorn Granlund  <tege@swox.com>
15389
15390	* mpn/pa64w/udiv_qrnnd.asm: Tune.
15391
153922001-02-27  Torbjorn Granlund  <tege@swox.com>
15393
15394	* mpn/pa64w/udiv_qrnnd.asm: New file.
15395
153962001-02-26  Torbjorn Granlund  <tege@swox.com>
15397
15398	* longlong.h (arm): Optimize sub_ddmmss by testing for constant
15399	operands.
15400	* mpn/arm/invert_limb.asm: New file.
15401
154022001-02-24  Torbjorn Granlund  <tege@swox.com>
15403
15404	* mpn/generic/lshift.c: Rewrite.
15405	* mpn/generic/rshift.c: Rewrite.
15406
15407	* longlong.h: Use UWtype for external interfaces that expect mp_limb_t.
15408
15409	* longlong.h (arm): #define invert_limb.
15410
15411	* mpn/arm: Make labels have local scope.
15412
15413	* configure.in (arm*-*-*): Set extra_functions.
15414	* longlong.h (arm): #define udiv_qrnnd.
15415	* mpn/arm/udiv.asm: New file.
15416
154172001-02-24  Kevin Ryde  <kevin@swox.se>
15418
15419	* tune/many.pl: Add mpn_count_leading_zeros, mpn_count_trailing_zeros
15420	and mpn_invert_limb.  Add count_leading_zeros, count_trailing_zeros
15421	from a .h file.  Correction to modexact_1_odd prototype.  Support
15422	ansi2knr.
15423	* tune/speed.h, tune/common.c: Consequent changes.
15424
15425	* demos/expr/*: Make a few more functions available in expressions,
15426	create only libexpr.a, misc minor updates.
15427
15428	* mpn/Makeasm.am: Add some comments about suffix ordering.
15429
15430	* tests/refmpn.c (rshift_make, lshift_make): No need to compare
15431	unsigned to zero.
15432
15433	* mpq/mul.c: Detect and optimize squaring.
15434
154352001-02-23  Torbjorn Granlund  <tege@swox.com>
15436
15437	* mpn/mips3: Convert files to `.asm'.
15438
15439	* mpn/arm: Convert files to `.asm'.  Misc cleanups.
15440	* mpn/arm/submul_1.asm: New file.
15441
154422001-02-21  Kevin Ryde  <kevin@swox.se>
15443
15444	* tune/tuneup.c (all): Only one compiler print should match, no need
15445	for #undef PRINTED_COMPILER.
15446
15447	* mpfr/mpfr.h (mpfr_sgn): Use mpfr_cmp_ui (patch from Paul).
15448
15449	* mpz/fib_ui.c: Update some remarks about alternative algorithms.
15450	* gmp.texi (Fibonacci Numbers Algorithm): Ditto.
15451	(Assigning Floats): Clarify mpf_swap swaps the precisions too.
15452	(Low-level Functions): Try to be clearer about negative cofactors.
15453
154542001-02-21  Torbjorn Granlund  <tege@swox.com>
15455
15456	* mpn/sparc64/copyi.asm: Streamline for small operands.
15457	* mpn/sparc64/add_n.asm: Likewise.
15458	* mpn/sparc64/sub_n.asm: Likewise.
15459
15460	* mpn/sparc64/copyd.asm: New file.
15461
154622001-02-20  Torbjorn Granlund  <tege@swox.com>
15463
15464	* mpn/sparc64/lshift.asm: Rewrite.
15465	* mpn/sparc64/rshift.asm: Rewrite.
15466
154672001-02-19  Torbjorn Granlund  <tege@swox.com>
15468
15469	* mpn/sparc64/add_n.asm: Rewrite using `majority' logic.
15470	* mpn/sparc64/sub_n.asm: Likewise.
15471
15472	* tune/tuneup.c (all): Recognise DECC and MIPSpro compilers.
15473
15474	* mpn/pa64/sqr_diagonal.asm: Use PROLOGUE/EPILOGUE.
15475	* mpn/pa642/sqr_diagonal.asm: Likewise.
15476
15477	* configure.in (HAVE_ABI_$abi): Disable for now.
15478
15479	* mpn/asm-defs.m4 (PROLOGUE): Use LABEL_SUFFIX.
15480
15481	* acinclude.m4 (GMP_ASM_ATTR): New check, for hppa oddities.
15482
154832001-02-18  Torbjorn Granlund  <tege@swox.com>
15484
15485	* mpn/hppa/hppa1_1/gmp-mparam.h: New file.
15486	* mpn/hppa/hppa2_0/gmp-mparam.h: New file.
15487
15488	* mpn/pa64/sqr_diagonal.asm: New file.
15489	* mpn/pa64w/sqr_diagonal.asm: New file.
15490	* mpn/hppa/hppa1_1/sqr_diagonal.asm: New file.
15491	* mpn/hppa/hppa2_0/sqr_diagonal.asm: New file.
15492
15493	* mpn/sparc32/v9/add_n.asm: Use `fitod' instead of `fxtod' for dummy
15494	FA-pipeline insns.
15495	* mpn/sparc32/v9/sub_n.asm: Likewise.
15496
154972001-02-18  Kevin Ryde  <kevin@swox.se>
15498
15499	* gmp.texi (Known Build Problems): Notes on make, $* and K&R, misc
15500	tweaks elsewhere.
15501	(Low-level Functions): Use {} notation in mpn_sqrtrem.
15502	(Basecase Multiplication): Mention BASECASE_SQR_THRESHOLD.
15503
15504	* mpfr/isnan.c (mpfr_number_p): Infinity is not a number.
15505	* mpfr/out_str.c: Pass strlen+1 for the block size to free.
15506	* mpfr/get_str.c: Correction for realloc to strlen+1.
15507
15508	* acinclude.m4 (GMP_C_SIZES): Generate an error if mp_limb_t doesn't
15509	seem to work for some reason.
15510
155112001-02-16  Torbjorn Granlund  <tege@swox.com>
15512
15513	* mpn/sparc32/v9/gmp-mparam.h: Retune.
15514
15515	* mpn/sparc32/v9/add_n.asm: New file.
15516	* mpn/sparc32/v9/sub_n.asm: New file.
15517
15518	* mpn/sparc32/v9/mul_1.asm: Tune function entry.
15519	* mpn/sparc32/v9/addmul_1.asm: Likewise.
15520	* mpn/sparc32/v9/submul_1.asm: Likewise.
15521
15522	* mpn/sparc32/v9/sqr_diagonal.asm: New file.
15523
155242001-02-16  Kevin Ryde  <kevin@swox.se>
15525
15526	* configure.in: Fix flags selection when $CC is a compiler known to us.
15527
15528	* demos/expr/exprfr.c (e_mpfr_cos, e_mpfr_sin): mpfr_sin_cos now
15529	allows NULL for one parameter.
15530
15531	* mpfr/*: Update to 20010215.
15532	* mpfr/trunc.c: Use -DOPERATION scheme, and gmp mpn_zero_p.
15533	* mpfr/sqrt.c: Use plain mpn_sqrtrem, not mpn_sqrtrem_new.
15534	* mpfr/sqrtrem.c: Remove file.
15535	* mpfr/Makefile.am (libmpfr_a_SOURCES): Add isnan.c and set_ui.c,
15536	remove sqrtrem.c and srandom.h.
15537
15538	* configfsf.guess: Update to 2001-02-13.
15539	* configfsf.sub: Update to 2001-02-16.
15540	* config.sub (j90, t90): Remove special handing, configfsf.sub now ok.
15541
15542	* Makefile.am (MPF_OBJECTS): Add a couple of missing $U's.
15543
15544	* tune/tuneup.c: Identify compiler used (GCC and Sun C so far).
15545
155462001-02-15  Torbjorn Granlund  <tege@swox.com>
15547
15548	* mpn/sparc32/v9/mul_1.asm: Change `ld' to `lduw' and `st' to `stw'.
15549	* mpn/sparc32/v9/addmul_1.asm: Likewise.
15550	* mpn/sparc32/v9/submul_1.asm: Likewise.
15551
155522001-02-14  Torbjorn Granlund  <tege@swox.com>
15553
15554	* mpn/mips3/mips.m4: New file.
15555	* configure.in (mips*-*-irix[6789]*): Use mips3/mips.m4.
15556
15557	* mpn/powerpc64/sqr_diagonal.asm: New file.
15558
15559	* mpn/mips3/sqr_diagonal.asm: New file.
15560
155612001-02-12  Torbjorn Granlund  <tege@swox.com>
15562
15563	* mpn/powerpc32/sqr_diagonal.asm: New file.
15564
15565	* mpn/generic/sqr_basecase.c: Remove declaration of mpn_sqr_diagonal.
15566	Fix typo in header comment.
15567
155682001-02-12  Kevin Ryde  <kevin@swox.se>
15569
15570	* mpn/generic/mul.c, mpn/generic/mul_n.c, gmp-impl.h: Use
15571	mpn_mul_basecase for squaring below new BASECASE_SQR_THRESHOLD.
15572	* tune/tuneup.c gmp-impl.h: Tune BASECASE_SQR_THRESHOLD.
15573
15574	* Makefile.am (libgmp.la, libmp.la): Revert change to build from
15575	mpn/libmpn.la etc, go back to explicitly listed objects.
15576
15577	* configure.in: Recognise sparc64-*-*, not just sparc64-*-linux*.
15578
155792001-02-11  Torbjorn Granlund  <tege@swox.com>
15580
15581	* mpn/asm-defs.m4 (sqr_diagonal): New define_mpn.
15582
15583	* mpn/alpha/sqr_diagonal.asm: New file.
15584
155852001-02-11  Kevin Ryde  <kevin@swox.se>
15586
15587	* gmp.texi (Low-level Functions): Note mpn_get_str clobbers its input
15588	plus 1 extra limb.
15589
15590	* mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
15591	set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
15592	* tests/mpz/reuse.c, tests/mpq/t-md_2exp.c, demos/pexpr.c,
15593	demos/expr/t-expr.c: Ditto.
15594
15595	* configure.in (HAVE_ABI_$abi): New define in config.m4.
15596
15597	* gmp-impl.h (mpn_sqr_diagonal): Add prototype and define.
15598	* tune/speed.c,speed.h,common.c,many.pl: Add measuring of
15599	mpn_sqr_diagonal.
15600
15601	* gmp.texi, acinclude.m4: Mention x86 solaris 2.7 has the reg->reg
15602	movq bug the same as 2.6.
15603
15604	* mpfr/Makefile.am (EXTRA_DIST): Add mpfr-test.h and mpf2mpfr.h.
15605
15606	* mpn/x86/README: Merge contents of README.family.
15607	* mpn/x86/README.family: Remove file.
15608
15609	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mode1o, gcd_finda,
15610	invert_limb, sqr_diagonal; remove mod_1_rs; sort alphabetically.
15611
156122001-02-10  Torbjorn Granlund  <tege@swox.com>
15613
15614	* configure.in (gmp_mpn_functions_optional): List sqr_diagonal.
15615
15616	* mpn/powerpc32/aix.m4: Use unnamed csects.
15617	* mpn/powerpc64/aix.m4: Likewise.
15618
15619	* acconfig.h: Add #undef of mpn_sqr_diagonal.
15620	Remove lots of spacing.
15621
15622	* configure.in (syntax testing section): Match power* instead of
15623	powerpc*.
15624	* mpn/power: Convert files to `.asm'.
15625	Prefix umul_ppmm and sdiv_qrnnd.
15626	Update some comments.
15627
156282001-02-09  Kevin Ryde  <kevin@swox.se>
15629
15630	* acconfig.h: Add HAVE_NATIVE_mpn_modexact_1_odd and
15631	HAVE_NATIVE_mpn_modexact_1c_odd.
15632
15633	* configure.in (CCAS): Don't override a user selection.
15634
15635	* mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
15636
156372001-02-08  Torbjorn Granlund  <tege@swox.com>
15638
15639	* mpn/generic/sqr_basecase.c: Use mpn_sqr_diagonal when appropriate.
15640
156412001-02-07  Kevin Ryde  <kevin@swox.se>
15642
15643	* gmp.texi (Low-level Functions): mpn_preinv_mod_1 now undocumented.
15644
15645	* mpn/generic/random2.c (myrandom): Use rand() on mingw.
15646
15647	* mpn/alpha/gmp-mparam.h: Update tuned parameters.
15648
156492001-02-05  Torbjorn Granlund  <tege@swox.com>
15650
15651	* mpn/alpha/ev6/gmp-mparam.h: Retune.
15652
156532001-02-05  Kevin Ryde  <kevin@swox.se>
15654
15655	* Makefile.am (libgmp, libmp): Construct from mpn/libmpn.la etc rather
15656	than explicitly listed objects.
15657
15658	* urandom.h: Use rand() on mingw.
15659
15660	* mpn/powerpc64/lshift.asm,addsub_n.asm: Use r1 not 1.
15661
156622001-02-04  Torbjorn Granlund  <tege@swox.com>
15663
15664	* mpn/ia64/copyi.asm: New file.
15665	* mpn/ia64/copyd.asm: New file.
15666
156672001-02-04  Kevin Ryde  <kevin@swox.se>
15668
15669	* mpn/alpha/ev5/gmp-mparam.h, mpn/mips3/gmp-mparam.h,
15670	mpn/powerpc32/gmp-mparam.h, mpn/powerpc64/gmp-mparam.h,
15671	mpn/sparc64/gmp-mparam.h, mpn/x86/*/gmp-mparam.h:
15672	Update tuned parameters.
15673
15674	* mpn/x86/i486: New directory.
15675	* configure.in (i486-*-*): Use it.
15676	* mpn/x86/i486/gmp-mparam.h: New file.
15677
15678	* mpn/x86/pentium/mode1o.asm: New file.
15679	* mpn/x86/p6/mode1o.asm: New file.
15680
15681	* tune/many.pl: Use $(ASMFLAGS_PIC) and $(CFLAGS_PIC).
15682
15683	* gmp.texi (Integer Division): Another rewording of 2exp divisions.
15684
156852001-02-03  Torbjorn Granlund  <tege@swox.com>
15686
15687	* mpn/arm/gmp-mparam.h: Tune.
15688
15689	* mpn/ia64/popcount.asm: Put a `;;' break at end of main loop.
15690
15691	* configure.in (arm*-*-*): Set gcc_cflags in order to pass
15692	$fomit_frame_pointer.
15693
15694	* tests/mpz/t-mul.c (base_mul): Remove an unused variable.
15695
156962001-02-02  Torbjorn Granlund  <tege@swox.com>
15697
15698	* demos/pexpr.c (TIME): New macro.
15699	(main): Use TIME--print timing more accurately.
15700	(setup_error_handler): Increase RLIMIT_DATA to 16 Mibyte.
15701
15702	* longlong.h (arm): Add __CLOBBER_CC to add_ssaaaa and sub_ddmmss.
15703
157042001-02-02  Kevin Ryde  <kevin@swox.se>
15705
15706	* configure.in: Don't remove gmp-mparam.h and mpn source links under
15707	--no-create since in that case they're not re-created.
15708
15709	* demos/expr: New directory.
15710	* Makefile.am (SUBDIRS, allprogs): Add it.
15711	* demos/expr/README, Makefile.am, expr.c, exprv.c, exprz.c, exprza.c,
15712	exprq.c, exprqa.c, exprfa.c, exprf.c, exprfr.c, exprfra.c, expr.h,
15713	expr-impl-h.in, run-expr.c, t-expr.c: New files.
15714	* configure.in: Generate demos/expr/Makefile & demos/expr/expr-impl.h.
15715
15716	* Makefile.am: Remove mpfr from main libgmp.
15717	* mpfr/Makefile.am: Build and install separate libmpfr.a.
15718	* mpfr/*: Update to mpfr 2001.
15719
15720	* gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 2.
15721	* Makefile.am (libtool -version-info): Bump appropriately.
15722	* NEWS: Updates.
15723
15724	* tune/divrem1div.c, tune/divrem1inv.c, tune/divrem2div.c,
15725	tune/divrem2inv.c: Renamed from divrem_1_div.c, divrem_1_inv.c,
15726	divrem_2_div.c, divrem_2_inv.c, to be unique in DOS 8.3 filenames.
15727	* tune/Makefile.am (libspeed_la_SOURCES): Update.
15728
15729	* mpn/x86/*/README, mpn/x86/README.family: Misc updates.
15730	* tune/README: Misc updates.
15731	* doc/configuration: Misc updates.
15732
15733	* mpn/x86/pentium/mmx/gmp-mparam.h: Change UDIV_PREINV_TIME to
15734	UDIV_NORM_PREINV_TIME.
15735
15736	* mpz/pprime_p.c: Use ASSERT_ALWAYS instead of abort.
15737
15738	* rand.c (__gmp_rand_lc_scheme): Add "const".
15739	(struct __gmp_rand_lc_scheme_struct): Make astr "const char *".
15740
15741	* demos/calc/calc.y, demos/calc/calclex.l: Add kron function.
15742
15743	* tests/devel/try.c: Partial rewrite, new scheme of function types,
15744	allow result validation functions, add sqrtrem and jacobi testing.
15745	* tune/many.pl: Corresponding updates.
15746	* tests/devel/Makefile.am: Add a convenience rule for libtests.la.
15747
15748	* tests/refmpz.c: New file.
15749	* tests/Makefile.am: Add it.
15750	* tests/misc.c (mpz_erandomb, mpz_erandomb_nonzero): New functions.
15751	* tests/tests.h: Add prototypes.
15752
15753	* mpn/x86/k6/cross.pl: Add a couple more exceptions.
15754
15755	* gmp.texi: Don't use @nicode{'\0'}, it doesn't come out right in tex.
15756	(Introduction to GMP): Mention Cray vector systems.
15757	(Build Options): Describe --enable-mpfr, refer to its manual.  Add
15758	Crays under supported CPUs.
15759	(Debugging): Add notes on source file paths.
15760	(Autoconf): New section.
15761	(Assigning Integers): Note truncation by mpz_set_d, mpz_set_q and
15762	mpz_set_f.
15763	(Converting Integers): Note the size mpz_get_str allocates.
15764	(Floating-point Functions): Rewrite introduction, clarifying some
15765	points about precision handling.
15766	(Converting Floats): Note the size mpf_get_str allocates, and that it
15767	gives an empty string for zero.  Add mpf_get_si and mpf_get_ui.
15768	(Float Comparison): Give the formula mpf_reldiff calculates.
15769	(Miscellaneous Float Functions): Add mpf_integer_p and mpf_fits_*_p.
15770	(Random Number Functions): Misc rewordings for clarity.
15771	(Random State Initialization): Ditto.
15772	(Custom Allocation): Remove note on deallocate_function called with 0,
15773	misc rewording and clarifications.
15774	(Exact Remainder): New section.
15775	(Binary GCD): A few words on initial reduction using division.
15776	(Accelerated GCD): Refer to exact remainder section.
15777	(Extended GCD): Extra remarks on single versus double selection.
15778	(Jacobi Symbol): Update for mpz/jacobi.c rewrite and modexact_1_odd.
15779	(Modular Powering Algorithm): Refer to exact remainder section.
15780	(Assembler SIMD Instructions): Update remarks on MMX.
15781	(Contributors): Amend to "Divide and Conquer" division.
15782	(References): Tweak some formatting.  Add "Proof of GMP Fast Division
15783	and Square Root Implementations" by Paul Zimmermann.
15784
157852001-01-31  Torbjorn Granlund  <tege@swox.com>
15786
15787	* configure.in: Don't ever pass -mips3; let ABI flags imply ISA.
15788
157892001-01-31  Kevin Ryde  <kevin@swox.se>
15790
15791	* tune/time.c: Remove unnecessary longlong.h.
15792	(speed_endtime): Add some extra diagnostics.
15793
15794	* tests/mpz/t-fdiv_ui.c, tests/mpz/t-tdiv_ui.c: Use unsigned long for
15795	the divisor, not mp_limb_t.
15796	* tests/mpz/t-jac.c (try_base): Use %llu for long long limb.
15797	* tests/trace.c: Add <string.h> for strlen.
15798
15799	* tune/freq.c (speed_cpu_frequency_proc_cpuinfo): Ignore "cycle
15800	frequency" of 0, allow "BogoMIPS" as well as "bogomips".
15801
15802	* macos/Makefile.in: Add mpf/fits_s.c and mpf/fits_u.c objects.
15803
158042001-01-30  Torbjorn Granlund  <tege@swox.com>
15805
15806	* longlong.h: Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
15807
158082001-01-29  Torbjorn Granlund  <tege@swox.com>
15809
15810	* mpn/powerpc64/addmul_1.asm: Prefix registers with an `r'.
15811	* mpn/powerpc64/submul_1.asm: Likewise.
15812	* mpn/powerpc64/mul_1.asm: Likewise.
15813
15814	* configure.in (alpha*-*-*): Amend last change to handle pca*.
15815
158162001-01-29  Kevin Ryde  <kevin@swox.se>
15817
15818	* tune/speed.h (SPEED_ROUTINE_INVERT_LIMB_CALL): Don't let the
15819	compiler optimize everything away.
15820
15821	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Measure
15822	operator_div, operator_mod, mpn_divrem_2_div, mpn_divrem_2_inv,
15823	mpn_sb_divrem_m3, mpn_sb_divrem_m3_div, mpn_sb_divrem_m3_inv,
15824	mpn_dc_divrem_sb_div, mpn_dc_divrem_sb_inv.
15825	* tune/divrem_2_div.c, tune/divrem_2_inv.c, tune/sb_div.c,
15826	tune/sb_inv.c: New files.
15827
15828	* tune/tuneup.c, gmp-impl.h, tune/speed.h, tune/common.c,
15829	tune/Makefile.am: Tune SB_PREINV_THRESHOLD and DIVREM_2_THRESHOLD.
15830
15831	* mpn/generic/divrem_2.c: Use new DIVREM_2_THRESHOLD.
15832	* mpn/generic/sb_divrem_mn.c: Use new SB_PREINV_THRESHOLD.
15833
15834	* mpn/x86/p6/mmx/lshift.asm, mpn/x86/p6/mmx/rshift.asm: New files,
15835	just m4 include()ing the P55 code.
15836	* configure.in (pentium[23]-*-*): Remove x86/pentium/mmx from path.
15837
158382001-01-27  Kevin Ryde  <kevin@swox.se>
15839
15840	* configure.in (AC_CHECK_FUNCS): Add srand48.
15841	* tune/speed.c: Use this test.
15842
15843	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): Allow "egcs-" prefix on gcc
15844	--version, warn if the format is unrecognised.
15845	(GMP_COMPARE_GE): Guard against empty $1 not only on last arg.
15846	(GMP_INIT, GMP_FINISH, GMP_PROG_M4): Obscure or eliminate literal
15847	"dnl"s since autoconf thinks they indicate faulty macros.
15848
15849	* mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
15850	strlen(str)+1 bytes.
15851	* mpz/dump.c, mpf/dump.c, tests/mpz/convert.c: Use this size when
15852	freeing.
15853	* tests/mpf/t-conv.c: Ditto, and ensure x==0 is exercised.
15854
15855	* tests/mpz/t-fits.c: New file.
15856	* tests/mpz/Makefile.am: Add it.
15857
15858	* tests/mpf/t-fits.c: New file.
15859	* tests/mpf/t-get_si.c: New file.
15860	* tests/mpf/t-int.c: New file.
15861	* tests/mpf/Makefile.am: Add them.
15862
15863	* mpf/fits_s.c: New file.
15864	* mpf/fits_u.c: New file.
15865	* mpf/get_si.c: New file.
15866	* mpf/get_ui.c: New file.
15867	* mpf/int_p.c: New file.
15868	* Makefile.am, mpf/Makefile.am: Add them.
15869	* gmp-h.in (mpf_fits_*_p, mpf_get_si, mpf_get_ui, mpf_integer_p): Add
15870	prototypes.
15871
15872	* tests/memory.c (tests_allocate, tests_reallocate): Guard against
15873	size==0.
15874
15875	* tests/mpz/*.c, tests/mpq/*.c, tests/mpf/*.c: Uses tests_start and
15876	tests_end.
15877
15878	* gmp-impl.h (USE_LEADING_REGPARM): Fix conditionals.
15879
158802001-01-23  Kevin Ryde  <kevin@swox.se>
15881
15882	* configure.in, mpn/Makeasm.am (ASMFLAGS_PIC): New substitution,
15883	allowing -DPIC to be suppressed on cygwin.
15884	(CFLAGS_PIC): New substitution, use it and $(CCAS) directly, rather
15885	than $(LIBTOOL), avoiding a problem with FreeBSD 2.2.8.
15886
15887	* mpn/x86/k6/mode1o.asm, mpn/x86/k7/mode1o.asm: Remove an unnecessary
15888	+[.-L(here)] from _GLOBAL_OFFSET_TABLE_, avoids a segv from gas 1.92.3.
15889	* mpn/x86/README.family: Add notes on the problem.
15890
158912001-01-20  Torbjorn Granlund  <tege@swox.com>
15892
15893	* configure.in (alpha*-*-*): Default `flavour' to ev4.
15894
158952001-01-19  Kevin Ryde  <kevin@swox.se>
15896
15897	* assert.c, gmp-impl.h (__gmp_assert_fail): Change return type to
15898	void, since it's no longer used in expressions.
15899
15900	* mpn/x86/addsub_n.S: Remove file, since it doesn't work and it upsets
15901	tune/many.pl.
15902
15903	* mpz/jacobi.c: Rewrite, but still binary algorithm; accept zero and
15904	negative denominators; merge mpz_jacobi and mpz_legendre, add
15905	mpz_kronecker; use mpn directly, add special cases for size==1.
15906	* gmp.texi (Number Theoretic Functions): Update.
15907	* gmp-h.in (mpz_kronecker): Add prototype.
15908	* gmp-impl.h (USE_LEADING_REGPARM): New macro.
15909	* tests/mpz/t-jac.c: Test mpz_kronecker.
15910	* mpz/legendre.c: Remove file.
15911	* Makefile.am, mpz/Makefile.am: Update.
15912
15913	* longlong.h (alpha count_leading_zeros): Use __attribute__ ((const))
15914	when possible, add parameter to prototype.
15915	(ia64 udiv_qrnnd): Use for all compilers, not just gcc.
15916	(pentium count_trailing_zeros): Use count_leading_zeros.
15917
15918	* acinclude.m4 (GMP_C_ATTRIBUTE_CONST, GMP_C_ATTRIBUTE_NORETURN): New
15919	macros.
15920	* configure.in: Use them.
15921	* gmp-impl.h (ATTRIBUTE_CONST, ATTRIBUTE_NORETURN): New macros.
15922	(mpn_invert_limb): Add ATTRIBUTE_CONST.
15923	(__gmp_assert_fail): Add ATTRIBUTE_NORETURN.
15924
159252001-01-18  Kevin Ryde  <kevin@swox.se>
15926
15927	* gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
15928	__gmp_free_func): Move prototypes from gmp-impl.h to gmp-h.in, for the
15929	benefit of gmp++.h.
15930
15931	* gmp-impl.h, tests/misc.c, tests/tests.h: Move MPZ_SET_STR_OR_ABORT
15932	and MPF_SET_STR_OR_ABORT to mpz_set_str_or_abort and
15933	mpf_set_str_or_abort in libtests.
15934	* tests/mpz/convert.c, tests/mpz/t-bin.c, tests/mpz/t-get_si.c,
15935	tests/mpz/t-jac.c, tests/mpz/t-misc.c, tests/mpq/t-md_2exp.c,
15936	tests/mpq/t-set_f.c, tests/mpf/t-conv.c, tests/mpf/t-misc.c: Update.
15937
15938	* mpn/generic/sqrtrem.c: Use MPN_COPY_INCR (for when rp==NULL).
15939
15940	* tests/mpz/reuse.c: Only run mpz_divexact_gcd on positive divisors.
15941
159422001-01-18  Torbjorn Granlund  <tege@swox.com>
15943
15944	* demos/pexpr.c (main): Accept -vml option.
15945	(fns): List `hamdist', `pow', `nextprime'.
15946	(mpz_eval_expr): Return -1 for `popc' of negative.
15947	(mpz_eval_expr): Handle `hamdist', `pow', `nextprime'.
15948
159492001-01-15  Kevin Ryde  <kevin@swox.se>
15950
15951	* mpn/alpha/ev5/mode1o.c: New file.
15952
15953	* tune/freq.c (speed_cpu_frequency_measure): Check cycles_works_p
15954	before running speed_cyclecounter.
15955	* tune/speed.h (cycles_works_p): Add prototype.
15956
159572001-01-13  Torbjorn Granlund  <tege@swox.com>
15958
15959	* tests/rand/t-rand.c (farr): Fix typo.
15960	(zarr): Fix typo.
15961
159622001-01-12  Kevin Ryde  <kevin@swox.se>
15963
15964	* mpz/kronsz.c: Don't depend on right shifting a negative.
15965
15966	* mpn/x86/gmp-mparam.h: New file.
15967
15968	* mpn/x86/pentium/mmx/mul_1.asm: New file.
15969
159702001-01-11  Torbjorn Granlund  <tege@swox.com>
15971
15972	* mpz/kronsz.c: Temporary workaround for Cray right shift oddities.
15973	Explicitly compare against zero in tests.
15974
159752001-01-10  Kevin Ryde  <kevin@swox.se>
15976
15977	* mpz/kronzs.c: Don't depend on right shifting a negative.
15978
159792001-01-09  Torbjorn Granlund  <tege@swox.com>
15980
15981	* tests/t-constants.c: Disable some undefined tests.
15982	(CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
15983
159842001-01-09  Kevin Ryde  <kevin@swox.se>
15985
15986	* tests/t-constants.c: Add more diagnostics.
15987	(CHECK_MAX_S): Fix for gcc 2.95.2 -mpowerpc64 -maix64.
15988
15989	* mpn/x86/k6/mode1o.asm: New file.
15990	* mpn/x86/k7/mode1o.asm: New file.
15991
15992	* mpn/asm-defs.m4 (modexact_1_odd, modexact_1c_odd): New define_mpn's.
15993	(__clz_tab, modlimb_invert_table, PROLOGUE, EPILOGUE): Add asserts for
15994	GSYM_PREFIX.
15995	* mpn/x86/x86-defs.m4 (Zdisp): Add a movzbl.
15996
15997	* tests/mpz/t-jac.c (check_a_zero): New test.
15998	(check_squares_zi): Fix to use (a^2/b), not (a*b/b); revert last
15999	change avoiding a,b=0, both are fine.
16000	(try_2den): Don't use mpz_kronecker_ui for the expected answer.
16001	(try_*): Call abort rather than exit.
16002
16003	* mpz/kronzu.c, mpz/kronzs.c: Fix for a=0.
16004
16005	* tune/tuneup.c (USE_PREINV_MOD_1): Fix to use new DATA_HIGH_LT_R.
16006
160072001-01-08  Torbjorn Granlund  <tege@swox.com>
16008
16009	* urandom.h: Amend 2000-11-21 change to also handle cygwin.
16010
160112001-01-08  Kevin Ryde  <kevin@swox.se>
16012
16013	* tune/many.pl: Updates for move to tests/devel, add modexact_1_odd,
16014	don't assume C files can't have carry-in entrypoints, remove
16015	$(TRY_TESTS_OBJS) now in libtests.
16016
16017	* tests/devel/try.c, tests/refmpn.c, tests/tests.h: Remove
16018	mpn_mod_1_rshift testing.
16019
16020	* tune/tuneup.c (fft_step_size): Test for overflow using the actual
16021	mp_size_t, don't use BITS_PER_INT.
16022
16023	* tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
16024	change LONG_ONES to LIMB_ONES.
16025	* tune/time.c (M_2POWU): Use INT_MAX rather than BITS_PER_INT.
16026
16027	* extract-dbl.c (BITS_PER_PART): Use BITS_PER_MP_LIMB not
16028	BITS_PER_LONGINT.
16029
16030	* mpz/inp_raw.c, mpz/out_raw.c: Add private defines of BITS_PER_CHAR.
16031	* mpz/fac_ui.c, tests/mpz/t-fac_ui.c: Don't use BITS_PER_LONGINT.
16032	* tests/mpz/t-get_si.c: Don't use BITS_PER_LONGINT, do the LONG_MAX
16033	tests with some explicit code.
16034
16035	* mpn/*/gmp-mparam.h, acinclude.m4, tests/t-constants.c
16036	(BITS_PER_LONGINT, BITS_PER_INT, BITS_PER_SHORTINT, BITS_PER_CHAR):
16037	Remove defines, remove probings, remove tests.
16038
16039	* tune/tuneup.c (MODEXACT_1_ODD_THRESHOLD): Add tuning.
16040
16041	* tune/speed.c,speed.h,common.c: Add measuring of mpn_modexact_1_odd,
16042	mpn_gcd_finda, and an "N" form for mpn_gcd_1.
16043
16044	* tests/mpz/t-jac.c (check_squares_zi): Ensure random a,b != 0.
16045
160462001-01-07  Kevin Ryde  <kevin@swox.se>
16047
16048	* configure.in (gmp_mpn_functions): Add mode1o, remove mod_1_rs.
16049
16050	* mpn/generic/mod_1_rs.c: Remove file, no longer needed.
16051	* gmp-h.in (mpn_mod_1_rshift): Remove prototype and define.
16052
16053	* mpq/set_f.c: Use MPN_STRIP_LOW_ZEROS_NOT_ZERO.
16054
16055	* mpz/kronzu.c, mpz/kronzs.c, mpz/kronuz.c, mpz/kronsz.c: Use
16056	mpn_modexact_1_odd, new style MPN_STRIP_LOW_ZEROS_NOT_ZERO, and new
16057	JACOBI macros.  Various rearrangements supporting all this.
16058
16059	* mpn/generic/gcd_1.c: Use mpn_modexact_1_odd, reduce u%v if u much
16060	bigger than v when size==1, some rearrangements supporting this.
16061
16062	* gmp-impl.h (JACOBI_*): More macros, add some casts to "int".
16063	(MPN_STRIP_LOW_ZEROS_NOT_ZERO): Add a "low" parameter.
16064	(mpn_modexact_1_odd, mpn_modexact_1c_odd): Add prototype and defines.
16065	(MODEXACT_1_ODD_THRESHOLD): New threshold.
16066	(MPN_MOD_OR_MODEXACT_1_ODD, JACOBI_MOD_OR_MODEXACT_1_ODD): New macros.
16067
16068	* mpn/generic/mode1o.c: New file.
16069
16070	* tests/mpz/reuse.c: Add testing of mpz_divexact_gcd.
16071	* tests/mpz/t-fac_ui.c: Use libtests for memory leak checking.
16072	* tests/mpz/t-fib_ui.c: Add a usage comment.
16073
16074	* tests/mpz/bit.c: Use libtests.
16075	* tests/mpz/t-scan.c: Remove unused subroutines.
16076	* tests/devel/try.c: Use libtests, define PROT_NONE if the system
16077	doesn't.
16078
16079	* tests/spinner.c, tests/x86check.c: Use tests.h.
16080	* tests/trace.c: Use tests.h, add mpf_trace.
16081	* tests/refmpn.c: Use tests.h, add refmpn_malloc_limbs_aligned,
16082	refmpn_tstbit, refmpn_neg.
16083
16084	* tune/common.c, tune/speed.h: Update for functions moved to
16085	tests/misc.c.
16086
16087	* tune/Makefile.am, tests/mpz/Makefile.am, tests/mpq/Makefile.am,
16088	tests/mpf/Makefile.am: Use tests/libtests.la.
16089
16090	* configure.in (AC_OUTPUT): Update for new directories.
16091	(x86 CALLING_CONVENTIONS_OBJS): Use .lo for libtests.la, allow
16092	ansi2knr on x86check.c.
16093
16094	* tests/Makefile.am: Establish new libtests.la convenience library,
16095	add mpz, mpq, mpf, mpbsd subdirectories.
16096	* tests/tests.h: New file.
16097	* mpn/tests/ref.h,try.h: Remove files, now in tests.h.
16098
16099	* tests/mpf/ref.c: Move to tests/refmpf.c, rename functions to refmpf.
16100	* tests/mpf/t-add.c, tests/mpf/t-sub.c: Use libtests.
16101	* tests/mpf/Makefile.am: Update.
16102
16103	* tests/memory.c: New file.
16104	* tests/misc.c: New file, a few subroutines from the test programs.
16105
16106	* mpz/tests, mpq/tests, mpf/tests, mpbsd/tests: Move directories to
16107	tests/mpz etc.
16108	* mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpbsd/Makefile.am
16109	(SUBDIRS): Remove.
16110
16111	* tests/devel: New directory.
16112	* mpn/tests/*.c: Move programs to tests/devel.
16113	* mpn/tests/Makefile.am, mpn/tests/README: Move to tests/devel, update.
16114
16115	* mpn/tests/ref.c: Move to tests/refmpn.c.
16116	* mpn/tests/spinner.c,trace.c,x86call.asm,x86check.c: Move to tests
16117	directory.
16118
16119	* tests/t-constants.c: Add checks of HIGHBIT, MAX and MIN constants,
16120	simplify ANSI vs K&R stringizing, use correct printf format types, do
16121	all tests before aborting.
16122
161232001-01-05  Torbjorn Granlund  <tege@swox.com>
16124
16125	* mpn/cray/ieee/gmp-mparam.h: Retune.
16126
161272001-01-05  Kevin Ryde  <kevin@swox.se>
16128
16129	* configure.in (mp.h): Only create this under --enable-mpbsd.
16130
16131	* demos/calc: New subdirectory, move demos/calc* to it.
16132	* demos/calc/Makefile.am: New file, split from demos/Makefile.am.
16133	* demos/Makefile.am: Update.
16134	* configure.in (AC_OUTPUT): Add demos/calc/Makefile.
16135
16136	* tests/t-constants.c (CALC_BITS_PER_TYPE etc): Use a run-time test
16137	for how many bits work in a give type, don't assume bits==8*sizeof.
16138
161392001-01-04  Kevin Ryde  <kevin@swox.se>
16140
16141	* mpz/fits_s.c, mpz/fits_u.c: New files, split from fits.c, use plain
16142	UINT_MAX etc, not MPZ_FITS_UTYPE_SDT etc.
16143	* mpz/fits.c: Remove file.
16144	* mpz/Makefile.am, macos/Makefile.in: Update.
16145
16146	* gmp-impl.h (UNSIGNED_TYPE_MAX etc): Remove these generic forms.
16147	(MPZ_FITS_[SU]TYPE_SDT): Remove these.
16148	(UINT_MAX etc): Provide a full set of defaults.
16149	* gmp-h.in (__GMP_MP_SIZE_T_INT): New define.
16150
16151	* mpz/tests/t-scan.c: New file.
16152	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
16153
16154	* mpz/scan0.c, mpz/scan1.c: Rewrite, don't read beyond allocated
16155	memory, support negatives, return ULONG_MAX for no bit found.
16156	* gmp.texi (Integer Logic and Bit Fiddling): Update.
16157
161582001-01-03  Torbjorn Granlund  <tege@swox.com>
16159
16160	* mpz/tests/dive.c: Generate test operands using new random functions.
16161	* mpz/tests/io.c: Likewise.
16162	* mpz/tests/logic.c: Likewise.
16163	* mpz/tests/t-2exp.c: Likewise.
16164
16165	* stack-alloc.c (__gmp_tmp_alloc): Round `now' to required alignment.
16166
16167	* stack-alloc.h (__TMP_ALIGN): Append `L'.
16168
16169	* gmp-impl.h: For Cray, #include limits.h.
16170	(LONG_MIN): New #define.
16171	(ULONG_HIGHBIT): #define in terms of ULONG_MAX.
16172	(LONG_HIGHBIT): #define as LONG_MIN.
16173	(USHRT_MAX): New name for USHORT_MAX.
16174	(SHRT_MAX): New name for SHORT_MAX.
16175	(SHRT_MIN): New #define.
16176	(USHORT_HIGHBIT,SHORT_HIGHBIT): Removed.
16177
16178	* mpbsd/tests/t-misc.c (check_itom [data]): *SHORT* => *SHRT*;
16179	remove code disabling a test for Cray.
16180
16181	* tests/t-constants.c (CHECK_CONSTANT): Cast parameters to long.
16182
16183	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove unused variable `t'.
16184	(mpn_kara_mul_n): Likewise.
16185
16186	* mpz/fac_ui.c (MPZ_SET_1_NZ): Actually use `__z'.
16187
16188	* mpz/tests/t-jac.c
16189	(main, check_squares_zi): Generate test operands using new random
16190	functions.
16191
16192	All changes below on this date for enabling `make; make check'
16193	with C++ compilers:
16194
16195	* mpz/tests/t-pow_ui.c (debug_mp, ref_mpz_pow_ui): Provide prototypes.
16196
16197	* mpz/tests/t-mul.c (debug_mp, base_mul, ref_mpz_mul):
16198	Provide prototypes.
16199	(dump_abort): Provide prototype and declare properly for C++.
16200
16201	* mpz/tests/t-jac.c: #include stdlib.h and sys/time.h.
16202
16203	* mpz/tests/t-fdiv.c
16204	(dump_abort): Provide prototype and declare properly for C++.
16205	(debug_mp): Provide prototype.
16206	* mpz/tests/t-fdiv_ui.c: Likewise.
16207	* mpz/tests/t-gcd.c: Likewise.
16208	* mpz/tests/t-powm.c: Likewise.
16209	* mpz/tests/t-powm_ui.c: Likewise.
16210	* mpz/tests/t-sqrtrem.c: Likewise.
16211	* mpz/tests/t-tdiv_ui.c: Likewise.
16212	* mpz/tests/t-tdiv.c: Likewise.
16213
16214	* mpz/tests/t-2exp.c: #include stdlib.h and sys/time.h.
16215	Remove #include of longlong.h.
16216
16217	* mpz/tests/io.c: #include config.h, stdlib.h, sys/time.h, and
16218	conditionally unistd.h.
16219
16220	* mpz/tests/dive.c: #include stdlib.h and sys/time.h.
16221	(dump_abort): Provide prototype and declare properly for C++.
16222	(debug_mp): Provide prototype.
16223	* mpz/tests/logic.c: Likewise.
16224
16225	* mpz/tests/convert.c (debug_mp): Provide prototype.
16226	* mpz/tests/t-root.c (debug_mp): Likewise.
16227
16228	* mpz/tests/bit.c: #include stdlib.h and sys/time.h.
16229
16230	* mpq/tests/t-get_d.c: #include stdlib.h and sys/time.h.
16231	(dump): Provide prototype and declare properly for C++.
16232
16233	* mpq/tests/t-cmp_ui.c: #include stdio.h, stdlib.h and sys/time.h.
16234	(ref_mpq_cmp_ui): Declare properly for C++.
16235
16236	* mpq/tests/t-cmp.c: #include stdlib.h and sys/time.h.
16237	(ref_mpq_cmp): Declare properly for C++.
16238	(dump): Delete unused function.
16239
16240	* mpf/random2.c (myrandom): New function.
16241	(mpf_random2): Use it.
16242
16243	* mpn/generic/random2.c: #include stdlib.h (for random/mrand48).
16244	(myrandom): New function.
16245	(mpn_random2): Use it.
16246
16247	* mpf/tests/t-add.c: #include stdlib.h and sys/time.h.
16248	(oo): Remove unused function.
16249	* mpf/tests/t-conv.c: Likewise.
16250	* mpf/tests/t-sub.c: Likewise.
16251	* mpf/tests/t-dm2exp.c: Likewise.
16252	* mpf/tests/t-muldiv.c: Likewise.
16253	* mpf/tests/t-sqrt.c: Likewise.
16254
16255	* mpf/tests/reuse.c: #include stdlib.h and sys/time.h.
16256	Use PROTO on some typedefs.
16257	(oo): Remove function.
16258	(dump_abort): Call mpf_dump instead of oo.
16259
16260	* mpf/set_str.c: #include stdlib.h (for strtol).
16261
16262	* mpf/random2.c: #include stdlib.h (for random/mrand48).
16263	* mpn/alpha/udiv_arnnd: File deleted.
16264
16265	* Remove K&R function headers.
16266
162672001-01-02  Torbjorn Granlund  <tege@swox.com>
16268
16269	* mpn/generic/mul.c: Clean up spacing and indentation.
16270
16271	* mpn/generic/mul_fft.c (mpn_fft_add_modF): Use mpn_decr_u.
16272	Clean up spacing and indentation.
16273
16274	* extract-dbl.c: Generalize to handle smaller limb sizes.
16275
162762001-01-01  Torbjorn Granlund  <tege@swox.com>
16277
16278	* mpbsd/mout.c: Output newline after "0".
16279
162802000-12-31  Torbjorn Granlund  <tege@swox.com>
16281
16282	* ltmain.sh: Remove space between `#!' and `$SHELL' when generating
16283	`libtool'.
16284
16285	* mpbsd/tests/t-misc.c (check_itom): Exclude test for all Cray
16286	vector systems.  Correct comment.
16287
162882000-12-31  Kevin Ryde  <kevin@swox.se>
16289
16290	* gmp.texi (ABI and ISA): New enough gcc needed for mips n32 etc, gcc
16291	2.95 needed for sparc 64-bit ABI, gcc 2.8 needed for -mv8plus.
16292
16293	* configure.in ([cjt]90,sv1-cray-unicos*): Preserve user specified
16294	MPN_PATH, amend test program indenting.
16295	(none-*-*): Add -DNO_ASM to gcc to disable longlong.h asm macros in
16296	generic C.
16297
16298	* config.sub (j90, t90): Preserve these, don't let configfsf.sub turn
16299	them into c90.
16300
16301	* config.guess (m68k-*-nextstep*,m68k-*-openstep*): Don't transform
16302	m68k to m68020, since m68k is already interpreted as 68020.
16303
163042000-12-30  Kevin Ryde  <kevin@swox.se>
16305
16306	* mpq/neg.c: Rewrite, use mpn, avoid denominator copy if unnecessary.
16307
16308	* mpz/tstbit.c: Rewrite, slightly simplified.
16309	* mpz/tests/bit.c (check_tstbit): New test, and add a couple more
16310	diagnostics elsewhere.
16311
16312	* configure.in (x86 gcc_cflags_cpu): Add -m486 for gcc 2.7.2.
16313	(ccbase): Only use a known compiler in eval statements (avoids
16314	problems with non-symbol characters).
16315	(ccbase): Use GMP_PROG_CC_IS_GNU to identify gcc installed under a
16316	different name.
16317	(cclist): Use same style $abi as other variables.
16318
16319	* acinclude.m4 (GMP_PROG_CC_IS_GNU): New macro.
16320	(GMP_GCC_MARCH_PENTIUMPRO): Use $ccbase to identify gcc.
16321	(GMP_ASM_TYPE): Define TYPE to empty, not "dnl", when no .type needed.
16322	(GMP_ASM_SIZE): Ditto for SIZE, which ensures EPILOGUE on the last
16323	line of a file doesn't leave a tab and no newline.
16324	(GMP_ASM_UNDERSCORE): Add a prototype for C++.
16325
16326	* configure.in (sys/mman.h, mprotect): New tests.
16327	* mpn/tests/try.c: Use them, and HAVE_UNISTD_H too.
16328
16329	* configure.in (getopt.h): Remove test.
16330	* tune/speed.c, mpn/tests/try.c (getopt.h): Remove include, since
16331	plain getopt() is in <unistd.h>.
16332
16333	* configure.in, gmp-h.in (mips*-*-irix6*): Set limb_n32=longlong
16334	rather than using _ABIN32.
16335
163362000-12-29  Torbjorn Granlund  <tege@swox.com>
16337
16338	* mpz/tests/reuse.c: Rename dump_abort => dump.
16339	* mpz/tests/reuse.c: Generate operands using gmp_rand*.
16340	* mpz/tests/convert.c: Likewise.
16341
16342	* configure.in: Detect T90-ieee systems; move Cray path
16343	selection to after AC_PROG_CC.  Invoke AC_PROG_CPP.
16344	* mpn/cray/cfp: New directory.  Move cfp specific files here.
16345	* mpn/cray/cfp/mulwwc90.s: New file.
16346	* mpn/cray/cfp/mulwwj90.s: New file.
16347	* mpn/cray/mulww.s: Delete.
16348
163492000-12-27  Torbjorn Granlund  <tege@swox.com>
16350
16351	* mpn/cray/ieee/mul_1.c: New file.
16352	* mpn/cray/ieee/addmul_1.c: New file.
16353	* mpn/cray/ieee/submul_1.c: New file.
16354	* mpn/cray/ieee/gmp-mparam.h: New file.
16355
16356	* mpn/cray/gmp-mparam.h: Disable UMUL_TIME and UDIV_TIME.
16357
16358	* mpn/cray/hamdist.c: New file.
16359	* mpn/cray/popcount.c: New file.
16360	* mpn/cray/rshift.c: New file.
16361	* mpn/cray/lshift.c: New file.
16362
16363	* longlong.h: Add count_leading_zeros for _CRAY.
16364	Reorganize _CRAY stuff.
16365
163662000-12-24  Kevin Ryde  <kevin@swox.se>
16367
16368	* configure.in (alpha*-cray-unicos*): Disable SPEED_CYCLECOUNTER_OBJ,
16369	as tune/alpha.asm doesn't suit.
16370
16371	* mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
16372	mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
16373
163742000-12-23  Torbjorn Granlund  <tege@swox.com>
16375
16376	* mpn/generic/mul_fft.c: Reformat.
16377	(mpn_fft_neg_modF): Remove.
16378	(mpn_fft_mul_2exp_modF): Inline mpn_fft_neg_modF.
16379
16380	* mpn/cray/gmp-mparam.h: Retune.
16381
16382	* configure.in (*-cray-unicos*): Pass `-O3 -htask0'.
16383	(vax*-*-*): Fix typo.
16384
16385	* mpn/cray/mul_1.c: Use dynamic arrays, get rid of TMP_*.
16386	* mpn/cray/addmul_1.c: Likewise.
16387	* mpn/cray/submul_1.c: Likewise.
16388	* mpn/cray/add_n.c: Likewise.
16389	* mpn/cray/sub_n.c: Likewise.
16390
16391	* configure.in (default cc_cflags,cc_64_cflags): Remove -g/add -O.
16392	(mips*-*-irix[6789]*]): Remove -g from cc_*_cflags.
16393
163942000-12-22  Torbjorn Granlund  <tege@swox.com>
16395
16396	* mpn/generic/mul_n.c: Delete K&R function headers.
16397
16398	* mpn/generic/mul_n.c (mpn_kara_mul_n): Clean up type confusion
16399	between mp_limb_t and mp_size_t.
16400	(mpn_kara_sqr_n): Likewise.
16401
16402	* mpn/generic/mul_n.c (mpn_kara_mul_n): Use mpn_incr_u.
16403	(mpn_kara_sqr_n): Likewise.
16404
16405	* mpn/generic/mul_n.c (mpn_kara_mul_n): Change handling of `sign'
16406	to work around GCC 2.8.1 MIPS bug.
16407
16408	* configure.in (implied alpha*-cray-unicos*): Remove -g from cc_cflags.
16409
164102000-12-21  Torbjorn Granlund  <tege@swox.com>
16411
16412	* mpn/alpha/invert_limb.asm: Simplify a bit.
16413	Add handling of bigend systems.
16414	* mpn/alpha/unicos.m4: Define `bigend'.
16415	* mpn/alpha/default.m4: Define `bigend' (to expand to nothing).
16416
16417	* tests/t-constants.c (CHECK_CONSTANT): Print using %lx.
16418
16419	* mpn/alpha/gmp-mparam.h: Remove sizes for plain C types.
16420	* mpn/alpha/ev5/gmp-mparam.h: Likewise.
16421	* mpn/alpha/ev6/gmp-mparam.h: Likewise.
16422
16423	* mpn/alpha/unicos.m4: Define LEA.
16424	* mpn/alpha/default.m4: Likewise.
16425	* mpn/alpha/invert_limb.asm: Use LEA for loading symbolic addresses.
16426	* mpn/alpha/cntlz.asm: Likewise.
16427
16428	* mpn/alpha/cntlz.asm: Don't use `ldbu', use slightly slower
16429	`ldq_u' + `extbl' instead.
16430
16431	* mpn/alpha/unicos.m4: Define EXTERN.
16432	* mpn/alpha/default.m4: Define EXTERN (to expand to nothing).
16433	* mpn/alpha/cntlz.asm: Declare __clz_tab usign `EXTERN' (for the
16434	benefit of Unicos).
16435
164362000-12-21  Kevin Ryde  <kevin@swox.se>
16437
16438	* mpn/alpha/unicos.m4 (GSYM_PREFIX): Define for the benefit of
16439	__clz_tab.
16440
164412000-12-20  Torbjorn Granlund  <tege@swox.com>
16442
16443	* longlong.h: Add udiv_qrnnd and count_leading_zeros for _CRAYMPP
16444	systems.
16445
164462000-12-19  Torbjorn Granlund  <tege@swox.com>
16447
16448	* configure.in (*sparc*-*-*): Remove -g from cc_cflags and acc_cflags.
16449
16450	* mpn/generic/sqrtrem.c (mpn_sqrtrem): Separate `limb' values from
16451	`size' values.
16452
16453	* configure.in (*-cray-unicos*): Add `-Wa,-B' to cc_cflags.
16454
16455	* demos/pexpr.c (rstate): New variable.
16456	(main): Initialize rstate.
16457	(enum op_t): Add RANDOM.
16458	(fns): Add field for RANDOM.
16459	(mpz_eval_expr): Handle RANDOM.
16460
164612000-12-19  Kevin Ryde  <kevin@swox.se>
16462
16463	* mpn/generic/sqrtrem.c: Rewrite by Paul Zimmermann, based on his
16464	Karatsuba Square Root algorithm.
16465	* gmp.texi (Square Root Algorithm): Update.
16466
16467	* tune/many.pl: New file.
16468
16469	* mpn/tests/try.c,ref.[ch] (mpn_preinv_mod_1, mpn_sb_divrem_mn,
16470	mpn_tdiv_qr, mpn_gcd_finda, mpn_kara_mul_n, mpn_kara_sqr_n,
16471	mpn_toom3_mul_n, mpn_toom3_sqr_n): Add testing.
16472	* mpn/tests/ref.c: Cast some "0"s in function calls.
16473
16474	* mpn/x86/k7/mmx/mod_1.asm: Add preinv_mod_1 entrypoint, remove extra
16475	variable for loop termination.
16476
16477	* mpn/x86/p6/mmx/mod_1.asm: Remove file, in favour of the following.
16478	* mpn/x86/p6/mod_1.asm: New file.
16479
16480	* mpn/x86/pentium/mod_1.asm: New file.
16481
164822000-12-18  Torbjorn Granlund  <tege@swox.com>
16483
16484	* configure.in (mips*-*-irix[6789]*): Pass options to compiler using
16485	`-Wc'.
16486
164872000-12-18  Kevin Ryde  <kevin@swox.se>
16488
16489	* mpn/x86/k6/pre_mod_1.asm: New file.
16490
16491	* tune/tuneup.c (USE_PREINV_MOD_1): Tune this, rearrange mpn_divrem_1
16492	and mpn_mod_1 handling in support of it.
16493	* tune/Makefile.am: Consequent changes to divrem_1.c and mod_1.c.
16494
16495	* gmp-impl.h (USE_PREINV_MOD_1, MPN_MOD_OR_PREINV_MOD_1): New macros.
16496	* mpn/generic/perfsqr.c, mpz/pprime_p.c: Use MPN_MOD_OR_PREINV_MOD_1.
16497
16498	* configure.in: Let an asm mod_1 provide a preinv_mod_1 entrypoint.
16499
16500	* mpn/alpha/default.m4: Remove some newlines, add some asserts.
16501	(r0 etc, f0 etc): Use defreg and deflit.
16502	(PROLOGUE, PROLOGUE_GP, EPILOGUE): Use GSYM_PREFIX.
16503	* mpn/alpha/unicos.m4: Remove some newlines, add some asserts.
16504	* mpn/alpha/invert_limb.asm: Remove unused second DATASTART parameter.
16505	* mpn/alpha/cntlz.asm: Use mpn_count_leading_zeros and __clz_tab.
16506
16507	* mpn/asm-defs.m4 (changecom): Comments on portability.
16508	(__clz_tab, modlimb_invert_table): New macros, matching gmp-impl.h.
16509	(count_leading_zeros, count_trailing_zeros): New define_mpn's.
16510	(PROLOGUE etc): Comments on usage, add some asserts.
16511	(OPERATION_[lr]shift): Use m4_not_for_expansion, for the benefit of
16512	lorrshift multifunc.
16513
16514	* mpn/Makeasm.am (RM_TMP): New variable controlling tmp-*.s
16515	removal, for development purposes.
16516
16517	* mpz/fac_ui.c: Fix for long long limb by using mpn_mul_1 not
16518	mpz_mul_ui, and note some possible enhancements.
16519
16520	* mpz/tests/t-fac_ui.c: New test.
16521	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
16522	* macos/Makefile.in: Ditto, and add t-fib_ui too.
16523
16524	* mpn/generic/[lr]shift.c: Remove some DEBUG code adequately covered
16525	by new parameter ASSERTs.
16526
16527	* longlong.h (count_trailing_zeros): Assert x!=0.
16528
16529	* doc/configuration: Updates for new configure things, add some notes
16530	on test setups.
16531
165322000-12-16  Torbjorn Granlund  <tege@swox.com>
16533
16534	* configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc also for 64-bit
16535	compiles.
16536	* configure.in: Disable shared libs for *-*-ultrix*.
16537
165382000-12-15  Torbjorn Granlund  <tege@swox.com>
16539
16540	* configure.in (powerpc*-*-*): Pass -Wa,-mppc when using gcc.
16541
16542	* gmp-impl.h (_EXTERN_INLINE): #define different for GCC and other
16543	compilers.
16544
16545	* gmp-h.in (__gmp_inline): Remove.
16546	* mp-h.in: Likewise.
16547	* mpn/generic/gcd.c: Use `inline' instead of `__gmp_inline'.
16548
16549	* configure.in (mips*-*-irix[6789]*): Define *_ldflags.
16550
165512000-12-14  Torbjorn Granlund  <tege@swox.com>
16552
16553	* mpn/generic/pre_mod_1.c: Use proper type for udiv_qrnnd
16554	parameter `dummy'.
16555
16556	* mpn/generic/divrem_1.c: Use explicit `!= 0' in if statement.
16557	* mpn/generic/mod_1.c: Likewise.
16558
165592000-12-14  Kevin Ryde  <kevin@swox.se>
16560
16561	* config.guess (mips-*-irix[6789]*): Transform to mips64.
16562	(m68k-*-nextstep* | m68k-*-openstep*): Transform to m68020.
16563
165642000-12-13  Torbjorn Granlund  <tege@swox.com>
16565
16566	* tests/t-constants.c (main): Conditionalize use of PP_INVERTED.
16567
16568	* mpn/mp_bases.c: Handle 4-bit limbs.
16569	(main): Add code for generating tables.
16570
16571	* mpn/generic/popham.c: Handle limb bitsizes of 4, 8, 16.
16572	Suffix all 32-bit constant with `L'.
16573	Use CNST_LIMB for 64-bit constants.
16574
165752000-12-13  Kevin Ryde  <kevin@swox.se>
16576
16577	* gmp-impl.h (FIB_THRESHOLD): Defaults for 4,8,16 bits per limb, and
16578	an arbitrary fallback default.
16579	(modlimb_invert): Add efficient code for 8,16 (or 4) bits per limb.
16580
16581	* configure.in (mips3, mips64): Don't bother with o32 (mips2 32-bit
16582	limb) on IRIX 6.
16583
16584	* Makefile.am (SUBDIRS): Put "tests" first so tests/t-constants.c is
16585	run first, to pick up any limb size mismatch.
16586
16587	* tune/tuneup.c (DIVREM_1, MOD_1): Fix result values, were off by 1.
16588
16589	* mpz/fib_ui.c (table1, table2): Add data for 4,8,16 bits per limb.
16590
165912000-12-12  Torbjorn Granlund  <tege@swox.com>
16592
16593	* gmp-impl.h (LIMBS_PER_DOUBLE): Define for any limb bitsize.
16594
165952000-12-11  Torbjorn Granlund  <tege@swox.com>
16596
16597	* mpn/mp_bases.c: Add tables for 8-bit and 16-bit limbs.
16598	Round existing `double' values properly.
16599
16600	* gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_
16601	to keep out of user name space.
16602	(__gmp_randata_lc): Likewise.
16603	* randclr.c, randlc.c, randlc2x.c, randraw.c, randsd.c, randsdui.c:
16604	Corresponding changes.
16605
16606	* gmp-impl.h (PP): #define for machines with BITS_PER_MP_LIMB
16607	of 2, 4, 8, and 16.
16608	(PP_FIRST_OMITTED): New, define for various BITS_PER_MP_LIMB.
16609	(PP_MASK): Remove.
16610	(PP_MAXPRIME): Remove.
16611
16612	* mpn/generic/perfsqr.c: Generalize PP handling for machines with
16613	limbs of < 32 bits.  Allow PP_INVERTED to be undefined.
16614	* mpz/pprime_p.c: Likewise.
16615
166162000-12-10  Torbjorn Granlund  <tege@swox.com>
16617
16618	* mpn/generic/mul_1.c: Declare parameters in C89 style.
16619
166202000-12-10  Kevin Ryde  <kevin@swox.se>
16621
16622	* tune/Makefile.am (speed_LDFLAGS, speed_ext_LDFLAGS, tune_LDFLAGS):
16623	Don't use -all-static, as gcc 2.95.2 on i386 solaris 8 doesn't like
16624	it.
16625
16626	* configure.in (mips3,mips64): Add ABI=64, name the others ABI=n32 and
16627	ABI=o32.
16628	* mpn/mips3/gmp-mparam.h (BITS_PER_LONGINT): Remove #define and let
16629	configure determine it, since it varies with ABI=64 or ABI=n32.
16630	* gmp.texi (ABI and ISA): Update.
16631	(mpz_mod_ui): Remark that it's identical to mpz_fdiv_r_ui.
16632	(mpn_divexact_by3): Qualify a statement needing mp_bits_per_limb even.
16633
16634	* mul_fft.c (mpn_fft_mul_modF_K etc): Patch by Paul Zimmermann to fix
16635	results in certain cases of recursing into a further FFT.
16636
166372000-12-09  Torbjorn Granlund  <tege@swox.com>
16638
16639	* mpz/cmpabs.c: Remove unused variable.
16640	* mpz/rrandomb.c: Likewise.
16641	* mpz/xor.c: Likewise.
16642
166432000-12-07  Torbjorn Granlund  <tege@swox.com>
16644
16645	* mpn/generic/gcdext.c: Handle double carry when computing s1.
16646	Merge two code blocks for computing s0 and s1.
16647
166482000-12-07  Kevin Ryde  <kevin@swox.se>
16649
16650	* configure.in (hppa*-*-*): Remove -Aa -D_HPUX_SOURCE from
16651	cc_cflags/cppflags, and instead let AM_C_PROTOTYPES add it, or -Ae,
16652	whichever works.
16653
16654	* configure.in (*-*-aix[34]*): Disable shared by default, but let
16655	the user override that, if desired.
16656	* gmp.texi (Notes for Particular Systems): Update.
16657
166582000-12-06  Torbjorn Granlund  <tege@swox.com>
16659
16660	* mpq/cmp_ui.c: Streamline.
16661
166622000-12-06  Kevin Ryde  <kevin@swox.se>
16663
16664	* tune/divrem_1_div.c,divrem_1_inv.c,mod_1_div.c,mod_1_inv.c,
16665	gcdext_double.c: New files for measuring.
16666	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
16667	* tune/speed.c,speed.h,common.c: Add measuring of them.
16668	(mpn_preinv_mod_1, mpz_jacobi, mpz_powm_ui): Add measuring.
16669
16670	* speed.c (getopt_long): Don't use this, just plain getopt.
16671	* configure.in (getopt_long): Remove test.
16672
16673	* gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_MUL_N_MINSIZE,
16674	MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_MUL_N_MINSIZE): New macros, and
16675	assume toom3 square tsize was meant to be the same as the mul (both
16676	are overestimates).
16677	* tune/tuneup.c, mpn/generic/mul.c, mpn/generic/mul_n.c: Use them.
16678	* mpn/generic/mul_n.c (mpn_toom3_sqr_n): Fix an ASSERT to use
16679	TOOM3_SQR_THRESHOLD not TOOM3_MUL_THRESHOLD, add a few that might
16680	be more realistic size checks.
16681	* tune/speed.h (SPEED_ROUTINE_MPN_MUL_N_TSPACE etc): Use minsize.
16682
16683	* mpn/generic/divrem_1.c: Partial rewrite, merge fractional part
16684	calculation, skip a divide step in more cases, introduce
16685	DIVREM_1_NORM_THRESHOLD and DIVREM_1_UNNORM_THRESHOLD.
16686	* mpn/generic/mod_1.c: Partial rewrite, skip a divide step in more
16687	cases, introduce MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD.
16688	* longlong.h (UDIV_PREINV_ALWAYS): New define, set for alpha and ia64.
16689	* tune/tuneup.c (DIVREM_1_NORM_THRESHOLD, DIVREM_1_UNNORM_THRESHOLD,
16690	MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD): Tune these.
16691	* gmp-impl.h [TUNE_PROGRAM_BUILD]: Support for this.
16692	* tune/Makefile.am (TUNE_MPN_SRCS): Add divrem_1.c and mod_1.c.
16693
16694	* gmp-impl.h (UDIV_NORM_PREINV_TIME): Renamed from UDIV_PREINV_TIME.
16695	* mpn/generic/perfsqr.c, mpn/generic/sb_divrem_mn.c,
16696	mpn/x86/*/gmp-mparam.h: Ditto.
16697	* gmp-impl.h (UDIV_UNNORM_PREINV_TIME): New define.
16698
16699	* configure.in (AC_C_INLINE, HAVE_INLINE): New test and define.
16700	* gmp-impl.h (inline): Remove, use config.h.
16701	(_EXTERN_INLINE): Redefine based on HAVE_INLINE.
16702	(mpn_zero_p): Use HAVE_INLINE.
16703
16704	* acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Don't add flags to a user
16705	selected $AR or $NM.
16706
16707	* tune/tuneup.c (all): Print how long the tuning took.
16708
16709	* configure.in (AM_C_PROTOTYPES): Use this, not GMP_ANSI2KNR.
16710	* acinclude.m4 (GMP_ANSI2KNR): Remove.
16711
16712	* Makefile.am (gmp.h, mp.h): In DISTCLEANFILES not CLEANFILES.
16713
16714	* gmp-h.in (mpn_divmod, mpn_divmod_1, mpn_divexact_by3): Cast some
16715	zeros, for the benefit of K&R if long!=int.
16716
16717	* mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add "*" for
16718	the benefit of cray.
16719
16720	* compat.c (mpn_divexact_by3, mpn_divmod_1): Return types should be
16721	mp_limb_t, not int, and need an actual "return".
16722
167232000-12-05  Torbjorn Granlund  <tege@swox.com>
16724
16725	* mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
16726	* mpn/alpha/gmp-mparam.h: Tune for 21064.
16727
16728	* longlong.h: Reformat to avoid newlines within strings.
16729
16730	* gmp-impl.h (inline): Disable if GCC has defined __STRICT_ANSI__.
16731
16732	* configure.in: Do a `mkdir tune' before creating tune/sqr_basecase.c.
16733
16734	* Makefile.am: Treat mp.h analogously to gmp.h.
16735
16736	configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc.
16737
16738	* mp-h.in: Renamed from mp.h.
16739	Add #define for _LONG_LONG_LIMB.
16740	Move some other fixes from gmp-h.in.
16741	* mp.h: Removed.
16742	* configure.in: Generate mp.h from mp-h.in like we handle
16743	gmp-h.in/gmp.h.
16744
167452000-12-04  Torbjorn Granlund  <tege@swox.com>
16746
16747	* acinclude.m4: Fix typo testing for bad HP compiler.
16748
167492000-12-03  Torbjorn Granlund  <tege@swox.com>
16750
16751	* mpbsd/tests/t-misc.c (check_itom): Exclude some tests for Cray
16752	CFP systems.
16753
16754	* longlong.h (CRAYIEEE umul_ppmm): New.
16755
16756	* mpn/cray/gmp-mparam.h (BITS_PER_SHORTINT): 32 => 64.
16757	(*_THRESHOLD): Tune.
16758
16759	* configure.in: Disable shared libs for *-*-unicos*.
16760
167612000-12-03  Kevin Ryde  <kevin@swox.se>
16762
16763	* configure.in, tune/Makefile.am: Create tune/sqr_basecase.c during
16764	configure, and use it unconditionally in $(nodist_tuneup_SOURCES).
16765	Fixes a problem with sqr_basecase.lo under --disable-static.
16766
167672000-12-01  Torbjorn Granlund  <tege@swox.com>
16768
16769	* mpf/tests/t-get_d.c (LOW_BOUND,HIGH_BOUND): #define for non-IEEE
16770	Cray systems.
16771
16772	* gmp-impl.h (union ieee_double_extract): Test for _CRAYIEEE.
16773
167742000-11-30  Torbjorn Granlund  <tege@swox.com>
16775
16776	* mpz/tests/t-mul.c (base_mul): Fix re-evaluation problems in macro
16777	invocations.
16778	(ref_mpz_mul): New name from mpz_refmul.  Make static.
16779	(base_mul): New name for _mpn_mul_classic.
16780
167812000-11-30  Kevin Ryde  <kevin@swox.se>
16782
16783	* configure.in: Rewrite of CC/CFLAGS selection scheme, introduce a
16784	notion of ABI, merge compiler and mpn path selection, add flags
16785	selection for AR and NM, let CC without CFLAGS work.
16786	(AC_PROG_CC): Use this, not GMP_SELECT_CC.
16787	* acinclude.m4 (GMP_PROG_CC_WORKS): Don't use AC_TRY_COMPILE, combine
16788	cc/cflags parameter.
16789	(GMP_PROG_CC_FIND, GMP_CHECK_CC_64BIT, GMP_PROG_CC_SELECT): Remove.
16790	* gmp.texi (Installing GMP): Updates for new scheme.
16791
16792	* configure.in (AC_CANONICAL_HOST): Use this and $host, not $target.
16793	* acinclude.m4, acconfig.h, longlong.h, mpn/x86/x86-defs.m4,
16794	mpn/x86/k7/mmx/popham.asm: Ditto, renaming HAVE_TARGET_CPU to
16795	HAVE_HOST_CPU.
16796	* gmp.texi (Build Options, and elsewhere): Update.
16797
16798	* acinclude.m4 (GMP_COMPARE_GE): New macro.
16799	(GMP_GCC_MARCH_PENTIUMPRO): Use it, add CC parameter, check for GCC.
16800	(GMP_HPC_HPPA_2_0): New macro, adapted from GMP_CHECK_CC_64BIT.
16801
16802	* acinclude.m4 (GMP_PROG_AR): New macro, using AC_CHECK_TOOL, adding
16803	GMP flags.
16804	* configure.in: Use it
16805
16806	* gmp-h.in: Renamed from gmp.h.
16807	(@define_LONG_LONG_LIMB@): Placeholder for instantiation.
16808	(__GNU_MP__): Bump to 3.
16809	* acinclude.m4 (GMP_VERSION): Get version from gmp-h.in.
16810	* configure.in: Create gmp.h from gmp-h.in to set _LONG_LONG_LIMB.
16811	* gmp.texi.h (ABI and ISA): Mention this.
16812	* acconfig.h (_LONG_LONG_LIMB): Remove undef.
16813	* Makefile.am: Distribute gmp-h.in, not gmp.h.
16814
16815	* configure.in (AC_PROG_CPP, AC_PROG_INSTALL, AC_PROG_LN_S): Remove,
16816	dragged in by other macros.
16817	(gmp_asm_syntax_testing): Renamed from gmp_no_asm_syntax_testing.
16818	(AC_EXEEXT, AC_OBJEXT): Remove, done automatically by libtool.
16819	* configure.in, acinclude.m4: Remove "" from "`foo`", being
16820	unnecessary and not portable.
16821
16822	* configure.in (GMP_LDFLAGS): New AC_SUBST flags for libtool link.
16823	(powerpc64*-*-aix*): Use for -Wc,-maix to fix shared library creation,
16824	but can't build shared and static at the same time.
16825	* Makefile.am (libgmp_la_LDFLAGS, libmp_la_LDFLAGS): Use
16826	$(GMP_LDFLAGS).
16827	* gmp.texi (Notes for Particular Systems): Update AIX problem
16828
16829	* configure.in (AC_CONFIG_LINKS): Use where needed, not via gmp_links.
16830	(gmp_srclinks): Build up as needed, not via gmp_links.
16831
16832	* acinclude.m4 (GMP_INIT): Do CONFIG_TOP_SRCDIR and asm-defs.m4 here.
16833	* configure.in (asm-defs.m4): Consequent changes.
16834
16835	* acinclude.m4 (GMP_INCLUDE_MPN): Using include_mpn(), replacing
16836	GMP_INCLUDE and GMP_SINCLUDE.
16837	* configure.in (gmp_m4postinc): Remove this scheme, use
16838	GMP_INCLUDE_MPN instead.
16839
16840	* configure.in (*-*-sco3.2v5*): Force ac_cv_archive_cmds_need_lc=no,
16841	until libtool does this itself.
16842	* gmp.texi (Known Build Problems): Remove SCO -lc problem.
16843
16844	* configure, INSTALL.autoconf, etc: Update to autoconf 2000-11-29.
16845	* acinclude.m4 (GMP_C_SIZES): Use AC_CHECK_SIZEOF.
16846	* gmp.texi (Known Build Problems): Remove version.c sed/config.h
16847	problem, fixed.
16848
16849	* ltmain.sh, aclocal.m4: Update to libtool 2000-11-25.
16850	* ltconfig: No longer required, but leave an empty dummy for automake.
16851	* gmp.texi (Known Build Problems): Remove SunOS native ar ranlib
16852	problem, fixed.
16853
16854	* */Makefile.in, aclocal.m4: Update to automake 2000-11-25.
16855	* mpbsd/tests/Makefile.am, mpfr/tests/Makefile.am (check_PROGRAMS):
16856	Remove dummy, no longer required.
16857	* mpbsd/tests/dummy.c, mpfr/tests/dummy.c: Remove files.
16858	* depcomp: Remove file, no longer required (with no-dependencies).
16859
16860	* texinfo.tex: Update to 2000-11-09.
16861	* gmp.texi (Build Options): Mention PDF from gmp.texi.
16862	* Makefile.am (MOSTLYCLEANFILES): Add gmp.tmp, from new texinfo.tex.
16863
16864	* gmp.texi (Build Options): List alphaev56, alphapca56, alphaev67,
16865	hppa2.0n and power among supported CPUs.
16866
168672000-11-30  Torbjorn Granlund  <tege@swox.com>
16868
16869	* mpz/tests/t-mul.c: Increase max operand size from 2^17 bits
16870	to 2^19 bits.  Misc cleanups.
16871
168722000-11-26  Kevin Ryde  <kevin@swox.se>
16873
16874	* tune/tuneup.c (FIB_THRESHOLD): Cope better with different speeds of
16875	odd and even sizes.
16876
16877	* longlong.h (alpha): Use udiv_qrnnd and count_leading_zeros on all
16878	compilers, not just gcc.
16879
16880	* pre_mod_1.c: Use conditional subtract to always skip a division.
16881	(UMUL_TIME, UDIV_TIME): Remove defaults, now in longlong.h.
16882
168832000-11-22  Torbjorn Granlund  <tege@swox.com>
16884
16885	* mpn/pa64w/gmp-mparam.h: Retune.
16886	* mpn/pa64/gmp-mparam.h: Retune.
16887	* mpn/sparc64/gmp-mparam.h: Retune.
16888
168892000-11-22  Kevin Ryde  <kevin@swox.se>
16890
16891	* gmp-impl.h (ABOVE_THRESHOLD, BELOW_THRESHOLD): New macros.
16892	* mpn/generic/gcdext.c: Use them.
16893
16894	* mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Force only one step.
16895	* tune/gcdextos.c, tune/gcdextod.c: New files, one step gcdext, single
16896	and double.
16897	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
16898	(TUNE_MPN_SRCS): Remove gcdext.c.
16899	* tune/speed.h, tune/common.c, tune/speed.c: Add measuring.
16900	* tune/tuneup.c: Use for GCDEXT_THRESHOLD, plus check if double limb
16901	is ever better.  Should be more accurate, and hopefully faster.
16902
16903	* tune/gcdext_single.c: New file, gcdext forced to single limbs.
16904	* tune/Makefile.am: Add it.
16905	* tune/speed.h, tune/common.c, tune/speed.c: Add measuring, and of
16906	invert_limb.
16907
16908	* tune/speed.h (speed_params r): Use mp_limb_t, not long.
16909	* tune/speed.h, tune/common.c: Don't "switch" on "r".
16910	* tune/speed.c (r_string): Accept limb sized constants.
16911	(choice scale): Add a scale factor (eg. "2.33*mpn_add_n").
16912	* tune/common.c (SPEED_ROUTINE_UDIV_QRNND_A): Default r to
16913	__mp_bases[10].big_base, being a full limb value.
16914
16915	* configure.in (alphapca56*-*-*): Use ev5 mpn path.
16916	(am29000*-*-*): Remove this, leave the canonical a29k.
16917	(z8k*-*-*, z8kx*-*-*): Changed from z8000, since z8k is canonical.
16918	(gmp_mpn_functions_optional): Add invert_limb, use for alpha and ia64.
16919
16920	* configure.in (alloca): Accept yes/no/detect, generate an error if
16921	"yes" but not available.
16922	* gmp.texi (Build Options): Update.
16923
16924	* acinclude.m4 (GMP_TRY_ASSEMBLE): Make conftest.out available.
16925	(GMP_ASM_ALIGN_FILL_0x90): Use it.
16926
16927	* acinclude.m4 (GMP_ASM_X86_MMX) [*-*-solaris*]: Check for solaris
16928	2.6 "as" movq bug.
16929	* gmp.texi (Notes for Particular Systems): Update x86 MMX note.
16930
169312000-11-21  Torbjorn Granlund  <tege@swox.com>
16932
16933	* tune/Makefile.am (EXTRA_DIST): List hppa2w.asm.
16934
16935	* tune/hppa2.asm: Change level directive to "2.0n".
16936	* tune/hppa2w.asm: New file.
16937	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Separate out hppa2.0w.
16938
16939	* mpn/pa64/gmp-mparam.h (BITS_PER_LONGINT): 64 => 32.
16940
169412000-11-21  Kevin Ryde  <kevin@swox.se>
16942
16943	* urandom.h (random): No prototype if glibc stdlib.h has already
16944	provided it (avoids an int32_t/long conflict).
16945
16946	* tune/Makefile.am (LDFLAGS): Use -all-static.
16947	(speed-dynamic): Dynamic linked version of speed.c.
16948	* tune/README: Update.
16949
16950	* mpn/generic/gcd.c (find_a): Use native version if available.
16951	* acconfig.h (HAVE_NATIVE_mpn_gcd_finda): Add #undef.
16952	* gmp-impl.h (mpn_gcd_finda): Add prototype and define.
16953	* mpn/asm-defs.m4 (mpn_gcd_finda): New define_mpn.
16954	* tune/gcd_finda_gen.c: #undef any HAVE_NATIVE_mpn_gcd_finda.
16955	* configure.in (gmp_mpn_functions_optional): Add gcd_finda.
16956	* mpn/x86/k6/gcd_finda.asm: New file.
16957
16958	* tune/tuneup.c (POWM_THRESHOLD): Slightly bigger size steps.
16959
16960	* gmp-impl.h (__GMP_IMPL_H__): Protect against multiple inclusion.
16961	* tune/gcd_bin.c, tune/powm_mod.c, tune/powm_redc.c: Use #undef after
16962	gmp-impl.h to force thresholds.
16963	* tune/tuneup.c (print_define, fft): No need for #ifndefs on
16964	thresholds any more.
16965
169662000-11-20  Torbjorn Granlund  <tege@swox.com>
16967
16968	* mpz/tests/t-powm.c: Analogous changes as made 2000-11-12 to t-mul.c.
16969	* mpz/tests/t-powm_ui.c: Likewise.
16970	* mpz/tests/t-pow_ui.c: Likewise.
16971	* mpz/tests/t-root.c: Likewise.
16972
16973	* configure.in [compiler switch]: Pass "-Aa -D_HPUX_SOURCE" to cc for
16974	all hppa versions.
16975
16976	* mpn/hppa/hppa1_1/udiv_qrnnd.S: Reference data using PC relative
16977	addressing (was r19 relative addressing).
16978
169792000-11-18  Torbjorn Granlund  <tege@swox.com>
16980
16981	* rand.c: (__gmp_rand_lc_scheme): Convert strings to hexadecimal.
16982	(gmp_randinit): Expect strings in hexadecimal.
16983
169842000-11-18  Kevin Ryde  <kevin@swox.se>
16985
16986	* configfsf.guess, configfsf.sub: Update to 2000-11-16.
16987	* config.guess (alpha*-*-openbsd*): Do exact cpu detection.
16988
169892000-11-14  Torbjorn Granlund  <tege@swox.com>
16990
16991	* mpz/tests/t-fdiv.c: Analogous changes as made 2000-11-12 to t-mul.c.
16992	* mpz/tests/t-tdiv_ui.c: Likewise.
16993	* mpz/tests/t-fdiv_ui.c: Likewise.
16994	* mpz/tests/t-sqrtrem.c: Likewise.
16995	* mpz/tests/t-gcd.c: Likewise.
16996
169972000-11-13  Kevin Ryde  <kevin@swox.se>
16998
16999	* mpn/Makeasm.am: New file, splitting out assembler rules.
17000	* mpn/Makefile.am, tune/Makefile.am: Use it.
17001
17002	* mpn/Makefile.am (@CPP@): Remove this, automake already gives it.
17003
17004	* configure.in (AC_CHECK_LIBM): New test, and AC_SUBST it.
17005	* Makefile.am (MPFR_LIBADD_OPTION): Use it.
17006	* demos/Makefile.am (qcn_LDADD): Ditto.
17007	* tune/Makefile.am (libspeed_la_LIBADD): Ditto.
17008	* tests/rand/Makefile.am (libstat_la_LIBADD): Ditto.
17009
17010	* tune/time.c (timeval_diff_secs): Better calculation.
17011	(read_real_time): New measuring method for AIX power/powerpc.
17012	(speed_endtime): Protect against negative times.
17013	* tune/common.c (speed_measure): Protect against big reps.
17014	* tune/freq.c (speed_cpu_frequency_measure_one): Better timeval diff.
17015	* tune/speed.h (TIMEVAL_DIFF_SEC,USEC): Remove macros.
17016	* configure.in: (sys/systemcfg.h, read_real_time): New tests.
17017
170182000-11-13  Torbjorn Granlund  <tege@swox.com>
17019
17020	* mpz/tests/t-mul.c: Remove #include urandom.h.
17021	* mpz/tests/t-tdiv.c: Likewise.
17022
17023	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]:
17024	Declare hppa.asm as just 32 bits (cyclecounter_size=1).
17025
170262000-11-12  Torbjorn Granlund  <tege@swox.com>
17027
17028	* mpz/tests/t-mul.c
17029	(main): Generate random numbers using gmp_rand* functions.
17030	(main): Distribute random numbers non-uniformly.
17031	(main): Seed by current time if GMP_CHECK_RANDOMIZE is set.
17032	(_mpn_mul_classic): Streamline.
17033	* mpz/tests/t-tdiv.c: Analogous changes.
17034
17035	* demos/pexpr.c (HAVE_sigaltstack): Fix typo in testing for _UNICOS.
17036	Also test for __hpux.
17037
170382000-11-11  Torbjorn Granlund  <tege@swox.com>
17039
17040	* mpn/alpha/ev5/gmp-mparam.h: Retune.
17041
17042	* mpn/alpha/ev6/gmp-mparam.h: Retune.
17043
17044	* mpn/alpha/ev6/add_n.asm: Misc cleanups.
17045
17046	* mpn/alpha/ev6/sub_n.asm: New file.
17047
170482000-11-10  Torbjorn Granlund  <tege@swox.com>
17049
17050	* configure.in [path switch] (alphaev6*-*-*): Add alpha/ev5 to path.
17051
17052	* mpn/alpha/ev6/add_n.asm: New file.
17053
170542000-11-10  Kevin Ryde  <kevin@swox.se>
17055
17056	* mpz/powm.c (redc): Make global under WANT_REDC_GLOBAL.
17057	* tune/powm_mod.c, tune/powm_redc.c: New files.
17058	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17059	* tune/*: Add measuring of redc, mpz_mod, mpz_powm_mod, mpz_powm_redc.
17060
17061	* tune/tuneup.c (POWM_THRESHOLD): Determine from redc and mpz_mod.
17062	* tune/Makefile.am (TUNE_MPZ_SRCS): Remove powm.
17063
170642000-11-10  Torbjorn Granlund  <tege@swox.com>
17065
17066	* mpn/mips3/gmp-mparam.h: Retune.
17067
17068	* configure.in (os_64bit): Rename to check_64bit_compiler.
17069
170702000-11-09  Torbjorn Granlund  <tege@swox.com>
17071
17072	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Choose hppa/hppa2 code
17073	depending on $CC64.
17074
170752000-11-09  Kevin Ryde  <kevin@swox.se>
17076
17077	* mpn/x86/pentium/mul_1.asm: Unroll 2x, saving 1 c/l when in L1.
17078	Add 1c entrypoint.
17079	* mpn/x86/pentium/aorsmul_1.asm: Add 1c entrypoints, shave a couple
17080	of cycles at entry and exit.
17081
17082	* configure.in (power1,2,2sc): Support these as synonyms for plain
17083	power.
17084
17085	* acinclude.m4 (GMP_ASM_X86_SHLDL_CL): GMP_DEFINE WANT_SHLDL_CL here.
17086	(GMP_ASM_X86_MMX, GMP_ASM_X86_SHLDL_CL): Add X86 into the names.
17087	* configure.in: Consequent changes.
17088
17089	* gmp.texi (Notes for Particular Systems): Remarks about power/powerpc.
17090	(Reentrancy): Remarks about simultaneous writing.
17091	(Reporting Bugs): Ask for configfsf.guess.
17092
170932000-11-08  Kevin Ryde  <kevin@swox.se>
17094
17095	* acinclude.m4 (GMP_FUNC_ALLOCA): New macro.
17096	* configure.in: Use it.
17097	* gmp-impl.h (alloca): Conditionals and setups as per autoconf
17098	(should make alloca available on more non-gcc compilers).
17099
17100	* acinclude.m4: Misc reformatting, simplify some quoting.
17101	(GMP_ASM_UNDERSCORE, GMP_ASM_X86_MCOUNT): Use $CC $CFLAGS $CPPFLAGS.
17102	(GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_FILL_0x90, GMP_ASM_RODATA): Put
17103	AC_REQUIREs outside AC_CACHE_CHECK.
17104	(GMP_C_SIZES): Use $srcdir/gmp.h, not -I; use $CPPFLAGS.
17105	(GMP_ASM_UNDERSCORE): Use "gmp_compile" variable, and only rm
17106	conftes1* conftes2*.
17107	(GMP_PROG_NM): New macro, require it in appropriate GMP_ASM_*.
17108	(GMP_TRY_ASSEMBLE): New macro, use it in various GMP_ASM_*.
17109	* configure.in: Use GMP_PROG_NM.
17110
17111	* mpn/tests/spinner.c (spinner_signal): Use RETSIGTYPE.
17112	(spinner_init): Force output to unbuffered.
17113
17114	* mpn/x86/README.family: Notes about GOT table and imul, misc updates.
17115	* mpn/x86/k7/diveby3.asm: Change to 3 operands for immediate imul.
17116	* mpn/x86/k6/diveby3.asm: Ditto.
17117
171182000-11-06  Torbjorn Granlund  <tege@swox.com>
17119
17120	* urandom.h: Simplify and make it work properly for 64-bit
17121	machines also in environments without `random'.
17122
171232000-11-04  Torbjorn Granlund  <tege@swox.com>
17124
17125	* configure.in [path switch]: Don't match rs6000-*-*, in
17126	particular don't assume POWER.
17127
17128	* tune/tuneup.c (fft): Remove usleep calls.
17129
17130	* config.guess: Don't pass "$@" when it is known to be empty.
17131
17132	* Makefile.am (EXTRA_DIST): List configfsf.guess and configfsf.sub.
17133
171342000-11-04  Kevin Ryde  <kevin@swox.se>
17135
17136	* configfsf.guess, configfsf.sub: Moved from config.guess and
17137	config.sub.
17138	* config.guess, config.sub: New files, wrappers around around
17139	configfsf versions.
17140	* configfsf.guess: Update to FSF 2000-10-23.
17141	* configfsf.sub: Update to FSF 2000-10-25.
17142
17143	* acinclude.m4 (GMP_ASM_POWERPC_R_REGISTERS): New macro.
17144	* mpn/powerpc32/powerpc-defs.m4: New file, regmap.m4 r0 etc macros
17145	conditionalized by GMP_ASM_POWERPC_R_REGISTERS.
17146	* mpn/powerpc32/regmap.m4: Remove file.
17147	* configure.in (powerpc*-*-*): Use all this.
17148
17149	* mpz/divegcd.c: New file, providing mpz_divexact_gcd.
17150	* Makefile.am, mpz/Makefile.am: Add it.
17151	* gmp-impl.h (mpz_divexact_gcd): Add prototype.
17152	* mpq/aors.c,canonicalize.c,div.c,mul.c: Use it.
17153
17154	* longlong.h [pentium] (count_leading_zeros): New macro.
17155	(__clz_tab): Always provide prototype.
17156	* acconfig.h (HAVE_TARGET_CPU_): Add x86s.
17157
17158	* tune/speed.[ch],common.c (count_leading_zeros,
17159	count_trailing_zeros, __udiv_qrnnd_c): Add measuring.
17160
17161	* configure.in (X86_PATTERN): Move from here ...
17162	* acinclude.m4 (X86_PATTERN): ... to here.
17163	(GMP_ASM_RODATA): Use it.
17164
17165	* configure.in (srandom): New test.
17166	* mpn/tests/try.c: Use it.
17167	* tune/speed.c: Ditto, and conditionalize getrusage and headers.
17168
171692000-11-02  Kevin Ryde  <kevin@swox.se>
17170
17171	* mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add udiv_qrnnd.c
17172	and udiv_w_sdiv.c.
17173
17174	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove a duplicate
17175	subtract at the evaluate stage.
17176
171772000-11-01  Torbjorn Granlund  <tege@swox.com>
17178
17179	* configure.in [compiler switch] (sparc64-*-linux*): Spell
17180	gmp_xoptcflags_gcc properly, and pass same options as for other
17181	sparcv9 configs.
17182
17183	* tune/speed.h (SPEED_ROUTINE_MPN_GET_STR): Fix type of wsize.
17184
171852000-10-31  Torbjorn Granlund  <tege@swox.com>
17186
17187	* configure.in [compiler switch] (sparc64-*-linux*): Remove -mvis
17188	from gmp_xoptflags_gcc, this might not be an ultrasparc.
17189	Remove -m32 from gmp_cflags_gcc; add -Wa,-xarch=v8plus.
17190
171912000-10-29  Torbjorn Granlund  <tege@swox.com>
17192
17193	* mpn/ia64/lorrshift.asm: New file.
17194
17195	* configure.in: New mulfunc `lorrshift' for lshift and rshift.
17196
171972000-10-29  Kevin Ryde  <kevin@swox.se>
17198
17199	* mpn/generic/mul_n.c (mpn_kara_sqr_n): Delete code performing
17200	superfluous mpn_sub_n calls.
17201
17202	* configure.in (found_asm, M4): Account for SPEED_CYCLECOUNTER_OBJ,
17203	for the benefit of targets whose only .asm is a cycle counter.
17204
17205	* tune/tuneup.c (fft): Remove bogus usleep calls.
17206
172072000-10-28  Torbjorn Granlund  <tege@swox.com>
17208
17209	* mpn/ia64/invert_limb.asm: Get return value for 0x800...00 right.
17210
17211	* tune/Makefile.am (EXTRA_DIST): Add ia64.asm.
17212
17213	* tune/ia64.asm: Fix typo.
17214
17215	* add_n.asm addmul_1.asm mul_1.asm popcount.asm sub_n.asm:
17216	Preserve ar.lc as required by ABI.
17217	* longlong.h (ia64 udiv_qrnnd): New.
17218
17219	* configure.in [path switch] (ia64*-*-*): Set extra_functions.
17220	* mpn/ia64/invert_limb.asm: New file.
17221
172222000-10-27  Torbjorn Granlund  <tege@swox.com>
17223
17224	* configure.in [compiler switch]:
17225	Get rid of c89 for all hppa flavours--it is an evil compiler!
17226
17227	* tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix type of xp.
17228	(SPEED_ROUTINE_MPN_GET_STR): Fix type of wp.
17229
172302000-10-27  Kevin Ryde  <kevin@swox.se>
17231
17232	* gmp.texi (Fibonacci Number Algorithm): New section.
17233
17234	* mpz/tests/t-fib_ui.c: New file.
17235	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
17236
17237	* mpz/fib_ui.c: Rewrite, same formulas but using mpn functions and
17238	some lookup tables, much faster at small to moderate sizes.
17239	* gmp-impl.h (MPZ_FIB_SIZE): New macro.
17240	(FIB_THRESHOLD): Establish default here.
17241	* tune/tuneup.c (FIB_THRESHOLD): Start search after the new table
17242	data.
17243
17244	* mpn/x86/x86-defs.m4 (mcount_movl_GOT_ebx): Rename from movl_GOT_ebx,
17245	and don't use GSYM_PREFIX with _GLOBAL_OFFSET_TABLE_.
17246
17247	* tune/freq.c (speed_cpu_frequency_measure): New test comparing
17248	gettimeofday and speed_cyclecounter, should cover many systems.
17249
172502000-10-27  Torbjorn Granlund  <tege@swox.com>
17251
17252	* mpn/ia64/gmp-mparam.h: Retune.
17253
172542000-10-26  Torbjorn Granlund  <tege@swox.com>
17255
17256	* longlong.h (ia64): Set UMUL_TIME and UDIV_TIME.
17257
17258	* mpn/ia64/submul_1.c: Fix typo.
17259
172602000-10-25  Kevin Ryde  <kevin@swox.se>
17261
17262	* tune/freq.c (speed_cpu_frequency_sysctl): New test, supporting
17263	hw.model for BSD flavours.
17264	* configure.in (sysctl, sys/param.h): New tests.
17265
172662000-10-24  Torbjorn Granlund  <tege@swox.com>
17267
17268	* tune/freq.c: Explicitly #include config.h before other include files.
17269
17270	* mpz/tests/reuse.c (FAIL2): New #define.
17271	(main): Use FAIL2.  Now this test properly returns non-zero exit
17272	status when it fails.
17273
17274	* mpn/powerpc32/gmp-mparam.h: Retune.
17275	* mpn/powerpc64/gmp-mparam.h: Retune.
17276
172772000-10-24  Kevin Ryde  <kevin@swox.se>
17278
17279	* mpn/x86/k6/cross.pl: Support 8 and 16 byte code alignment.
17280
17281	* mpq/aors.c, mpq/canonicalize.c: Skip two mpz_divexact calls if
17282	gcd gives 1, which should be 60% of the time.
17283	* gmp-impl.h (MPZ_EQUAL_1_P): New macro.
17284	* mpq/mul.c, mpq/div.c: Use it, and a new DIV_OR_SET.
17285
17286	* tune/tuneup.c (xp_block, yp_block): Initialize these with random
17287	data.  Fixes GCD_ACCEL and GCDEXT thresholds, and latest POWM.
17288
172892000-10-23  Torbjorn Granlund  <tege@swox.com>
17290
17291	* configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Add ia64 case.
17292
17293	* mpn/ia64/gmp-mparam.h: Fill in some parameters.
17294
17295	* mpn/ia64/submul_1.c: New file.
17296
17297	* tune/ia64.asm: New file.
17298
17299	* gmp-impl.h (union ieee_double_extract): Handle ia64.
17300
17301	* mpn/mp_bases.c: Decrease chars_per_bit_exactly for entry 1 to
17302	work around buggy ia64-linux.
17303
17304	* longlong.h (ia64 umul_ppmm): Update register flags to match new GCC.
17305
173062000-10-22  Torbjorn Granlund  <tege@swox.com>
17307
17308	* mpn/alpha/ev6/gmp-mparam.h (DC_THRESHOLD): Update.
17309	* mpn/alpha/ev6/submul_1.asm: New file.
17310
173112000-10-22  Kevin Ryde  <kevin@swox.se>
17312
17313	* tune/gcd_bin.c: New file.
17314	* tune/gcd_finda_gen.c: New file.
17315	* tune/Makefile.am (libspeed_la_SOURCES): Add them.
17316	* tune/speed.[ch],common.c (mpn_gcd_binary, find_a): Add measuring.
17317
17318	* * (__gmp_allocate_func etc): Rename from _mp_allocate_func etc.
17319	(__gmp_default_allocate etc): Rename from _mp_default_allocate etc.
17320	* gmp-impl.h (__GMP_REALLOCATE_FUNC_TYPE,
17321	__GMP_REALLOCATE_FUNC_LIMBS): New macros.
17322
17323	* gmp-impl.h (DC_THRESHOLD): Establish default here, set to 3*KARA
17324	since that's the measured average.
17325	* mpn/generic/dc_divrem_n.c, mpn/generic/tdiv_qr.c (DC_THRESHOLD):
17326	Remove default.
17327
173282000-10-21  Torbjorn Granlund  <tege@swox.com>
17329
17330	* mpn/Makefile.am (TARG_DIST): Add ia64.
17331
173322000-10-21  Kevin Ryde  <kevin@swox.se>
17333
17334	* *: Change BZ -> DC.
17335	* mpn/generic/dc_divrem_n.c: Renamed from bz_divrem_n.c.
17336
17337	* doc/multiplication: Remove file, now in the manual.
17338	* doc/assembly_code: Ditto.
17339	* tune/README: Remove some parts now in the manual.
17340
17341	* gmp.texi (@m etc): Add and use some new macros.
17342	(Integer Division - mpz_[cft]div_*): Merge descriptions, for brevity
17343	and to emphasise similarities.
17344	(Low-Level Functions - mpn_[lr]shift): Specify count as 1 to
17345	mp_bits_per_limb-1.
17346	(Algorithms): New chapter.
17347	(References): Add some papers.
17348
17349	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove some
17350	unused variables.
17351	* mpn/generic/mul_fft.c (mpn_fft_best_k): Ditto.
17352
17353	* tune/freq.c: New file, split from time.c.
17354	* tune/time.c: Rewrite, now more automated.
17355	* configure.in, tune/*: Consequent changes.
17356
173572000-10-20  Torbjorn Granlund  <tege@swox.com>
17358
17359	* mpn/ia64/default.m4: New file.
17360	* configure.in [config.m4 switch] (ia64*-*-*): Use ia64/default.m4.
17361
17362	* mpn/ia64/mul_1.asm: New file.
17363	* mpn/ia64/addmul_1.asm: New file.
17364	* mpn/ia64/add_n.asm: New file.
17365	* mpn/ia64/sub_n.asm: New file.
17366	* mpn/ia64/popcount.asm: New file.
17367	* mpn/ia64/README: New file.
17368
17369	* mpn/alpha/cntlz.asm: Override `.set noat' from ASM_START.
17370
17371	* configure.in (HAVE_TARGET_CPU_*): Support hppa1.0, hppa1.1, hppa2.0
17372	by sed'ing the period into `_'.
17373
17374	* acconfig.h: Add #undefs for hppa targets.
17375
17376	* longlong.h (udiv_qrnnd): Fix typo in last change.
17377
17378	* mpz/tstbit.c: Rewrite (partly to work around GCC 2.95.2 HPPA bug).
17379
17380	* configure.in [path switch]:
17381	(hppa2.0*-*-*): For non-CC64 case, update path.
17382
17383	* configure.in [compiler switch]:
17384	(hppa2.0w-*-*): Match with same regexp in both places.
17385	(hppa*-*-*): New case.
17386	(all hppa alternatives): Don't inherit default gmp_cflags_cc,
17387	gmp_cflags_c89.
17388
173892000-10-18  Torbjorn Granlund  <tege@swox.com>
17390
17391	* configure.in (alpha*-*-*): Define gmp_xoptcflags_gcc like for
17392	alpha*-*-osf*.
17393
17394	* longlong.h (x86 udiv_qrnnd): Change `d' => `dx' to avoid K&R C
17395	stringification.
17396
173972000-10-15  Kevin Ryde  <kevin@swox.se>
17398
17399	* doc/configuration: Updates.
17400
17401	* demos/calc.y: Remove some comments.
17402
174032000-10-14  Kevin Ryde  <kevin@swox.se>
17404
17405	* gmp.texi (Parameter Conventions, Memory Management): New sections
17406	split from "Variable Conventions".
17407	(Efficiency, Debugging, Profiling): New sections in "GMP Basics".
17408	(Reentrancy): Some rewording, add note on standard I/O.
17409	(Build options): Add --enable-assert and --enable-profiling.
17410
17411	* configure.in (--enable-profiling): New option.
17412	* acinclude.m4 (GMP_ASM_X86_MCOUNT): New macro, finding how to profile.
17413	* mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_mcount): Profiling support.
17414
17415	* acinclude.m4, configure.in (GMP_ASM_*): Rename from GMP_CHECK_ASM_*,
17416	to follow autoconf conventions.
17417
17418	* configure.in: Run GMP_CHECK_ASM tests only if needed.
17419	* acinclude.m4 (GMP_CHECK_ASM_MMX): Don't use GMP_CHECK_ASM_TEXT.
17420
17421	* mpn/x86/x86-defs.m4 (ASSERT): Allow no condition, to just emit code.
17422
174232000-10-13  Kevin Ryde  <kevin@swox.se>
17424
17425	* mpq/md_2exp.c: New file.
17426	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
17427	* Makefile.am (MPQ_OBJECTS): Ditto.
17428	* gmp.h (mpq_mul_2exp, mpq_div_2exp): Add prototypes.
17429	* gmp.texi (Rational Arithmetic): Add documentation.
17430
17431	* mpq/tests/t-md_2exp.c: New file.
17432	* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
17433
17434	* mpn/generic/perfsqr.c: Add/amend some comments.
17435
17436	* gmp.texi (Known Build Problems): Note VERSION problem with old
17437	sed, do some minor rewording.
17438	(Build Options): Add cygwin and djgpp URLs, mention INSTALL.autoconf,
17439	mention HTML.
17440	(Getting the Latest Version of GMP): Move this ...
17441	(Introduction to GMP): ... to here.
17442	(Compatibility with older versions): Just refer to 2.x and 3.x, not
17443	every minor version.
17444	(Initializing Integers): Note restrictions on mpz_array_init'ed
17445	variables.
17446	(Integer Logic and Bit Fiddling): Note bits are numbered from 0.
17447
17448	* INSTALL.autoconf: New file.
17449	* Makefile.am (EXTRA_DIST): Add it.
17450
17451	* tune/Makefile.am, tune/tuneup.c, configure.in, gmp-impl.h: New
17452	scheme for recompiled objects used by tune program.  Don't use
17453	libgmptune.a, make better use of libtool, work with ansi2knr.
17454
17455	* tune/speed.h,common.c (SPEED_ROUTINE_MPZ_POWM): Use s->yp and
17456	s->xp_block, make exponent a fixed size.
17457
174582000-10-07  Torbjorn Granlund  <tege@swox.com>
17459
17460	* mpn/mips3/gmp-mparam.h: Retune.
17461
17462	* mpn/generic/mul_n.c (USE_MORE_MPN): Revert last change.
17463
174642000-10-06  Torbjorn Granlund  <tege@swox.com>
17465
17466	* mpn/mips3/add_n.s: Decrease carry recurrence from 4 to 3 cycles.
17467	* mpn/mips3/sub_n.s: Likewise.
17468
174692000-10-04  Torbjorn Granlund  <tege@swox.com>
17470
17471	* configure.in (sparc64-*-linux*): Set path according to CC64.
17472
174732000-10-04  Kevin Ryde  <kevin@swox.se>
17474
17475	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Use LABEL_SUFFIX, not a
17476	hard-coded ":".
17477
17478	* config.sub: Don't demand "86" in CPU name for SCO.
17479
17480	* configure.in (supersparc-*-*): Remove -DSUPERSPARC.
17481	* longlong.h: Use HAVE_TARGET_CPU_supersparc.
17482
17483	* configure.in (HAVE_TARGET_CPU_*): AC_DEFINE from $target_cpu.
17484	* acconfig.h: Add #undefs, but only for targets of interest.
17485
174862000-10-03  Torbjorn Granlund  <tege@swox.com>
17487
17488	* mpn/alpha/cntlz.asm: Rewrite.
17489
17490	* mp_clz_tab.c (__clz_tab): Half table size to 128 entires.
17491	* longlong.h (count_leading_zeros): Demand just 128 entries from
17492	__clz_tab.
17493
17494	* configure.in (mips-sgi-irix6.*): Pass -mips3 in addition to options
17495	for n32 ABI.
17496
17497	* longlong.h: Move NO_ASM test around all assembly code.
17498	From gcc:
17499	* longlong.h (count_leading_zeros): Sparclite scan instruction was
17500	being invoked incorrectly.
17501	Replace __mc68332__ with __mcpu32__.
17502	Add ARC support.
17503
175042000-10-02  Torbjorn Granlund  <tege@swox.com>
17505
17506	* mpn/mips3/gmp-mparam.h: Retune for both gcc and cc.
17507
17508	* mpn/generic/mul_n.c (USE_MORE_MPN): Remove exception for __mips.
17509	(interpolate3): Cast mp_limb_t variables to mp_limb_signed_t
17510	when testing sign bit.
17511
17512	* mpn/alpha/ev6/gmp-mparam.h: Retune.
17513	* mpn/powerpc32/gmp-mparam.h: Retune.
17514	* mpn/powerpc64/gmp-mparam.h: Retune.
17515	* mpn/x86/pentium/gmp-mparam.h: Retune.
17516	* mpn/x86/pentium/mmx/gmp-mparam.h: Retune.
17517	* mpn/sparc32/v9/gmp-mparam.h: Retune.
17518	* mpn/x86/k6/gmp-mparam.h: Retune.
17519	* mpn/x86/p6/gmp-mparam.h: Retune.
17520	* mpn/x86/k7/gmp-mparam.h: Retune.
17521	* mpn/sparc64/gmp-mparam.h: Retune.
17522
17523	* mpn/m68k/gmp-mparam.h: New file.
17524	* mpn/alpha/ev5/gmp-mparam.h: New file.
17525
17526	* gmp-impl.h (default MPN_COPY): Remove final `;'.
17527
17528	* tune/time.c (speed_endtime): Rewrite.
17529
17530	* tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Set base to a large value,
17531	not 2.
17532
17533	* demos/pexpr.c (setup_error_handler): Fix typo.
17534
17535	* mpz/powm.c (redc): New function, based on old mpz_redc.  Don't
17536	multiply here.
17537	(mpz_redc): Remove.
17538	(mpz_powm): Major changes, partially reverting to mpn calls.
17539	Multiply before calling redc.
17540	(mpz_powm): Use TMP_ allocation.
17541	(mpz_powm): Refine calculation of k (width of exponent window).
17542	(mpz_powm): Cast constants to mp_limb_t before left shifting.
17543
17544	* longlong.h: Use ia64 count_leading_zeros just when __GNUC__.
17545
175462000-09-29  Kevin Ryde  <kevin@swox.se>
17547
17548	* acinclude.m4 (GMP_C_SIZES): New macro.
17549	* configure.in: Use it.
17550	* acconfig.in (BYTES_PER_MP_LIMB etc): Add #undefs.
17551	* mpn/generic/gmp-mparam.h (BYTES_PER_MP_LIMB etc): Remove #defines.
17552	* gmp.texi (Known Build Problems): Remove 64-bit generic C
17553	gmp-mparam.h problem, now fixed.
17554
17555	* configure.in: Only run GMP_PROG_M4 if it's actually needed.
17556
175572000-09-27  Torbjorn Granlund  <tege@swox.com>
17558
17559	* demos/pexpr.c: Clean up code for systems not supporting
17560	sigaltstack.  Handle old Linux without sigaltstack.  Properly
17561	disable all stuff related to sigaltstack under Unicos.
17562
17563	* mpn/alpha/ev6/addmul_1.asm: Use explicit offset for all load and
17564	store insns.  Helps old gas.
17565
17566	* longlong.h (count_leading_zeros): Define for ia64.
17567
175682000-09-27  Paul Zimmermann  <Paul.Zimmermann@loria.fr>
17569
17570	* mpn/generic/bz_divrem_n.c: Fix qhl handling, simplify.
17571
175722000-09-27  Kevin Ryde  <kevin@swox.se>
17573
17574	* mpn/Makefile.in (.SUFFIXES): Regenerate with patched automake to
17575	get .s before .c, which is needed to override ansi2knr .c rules.
17576
17577	* gmp.texi (mpn_sqrtrem): Fix r2p==NULL return value description
17578	to match the code (change by Torbjorn).
17579	(mpn_gcd, mpn_gcdext, mpn_sqrtrem, mpn_tdiv_qr): Note most
17580	significant limbs must be non-zero.
17581	(mpn_gcd, mpn_gcdext, mpn_sqrtrem): Clarify destination size
17582	requirements.
17583	(mpn_gcd_1): Clarify value must be non-zero, not just size.
17584
17585	* gmp-impl.h (mpn_zero_p): New inline function.
17586	* mpn/generic/inlines.c: Add gmp-impl.h.
17587	* mpf/integer.c, mpz/get_d.c, mpn/generic/mul_fft.c: Use it.
17588
17589	* mpn/generic/gcd.c: Use MPN_COPY_INCR not MPN_COPY.
17590	* mpf/add_ui.c: Ditto.
17591	* mpf/add.c: Ditto, and fix test to skip copy.
17592
175932000-09-26  Kevin Ryde  <kevin@swox.se>
17594
17595	* gmp-impl.h, longlong.h, mpn/generic/*.c: Add ASSERTs for various
17596	parameter restrictions.
17597
17598	* gmp-impl.h (UDIV_PREINV_TIME): New macro.
17599	* mpn/generic/sb_divrem_mn.c: Use it.
17600	* mpn/generic/perfsqr.c: Ditto.
17601	* mpn/x86/*/gmp-mparam.h (UDIV_PREINV_TIME): Add values.
17602
17603	* macos/Makefile.in: Add mpz/tests/t-get_si.c, mpf/tests/t-set_f.c,
17604	and new multi-function mpz and mpq files.
17605
176062000-09-25  Kevin Ryde  <kevin@swox.se>
17607
17608	* randlc.c, randlc2x.c, randsd.c, mpz/urandomb.c, mpz/urandomm.c:
17609	Use mpz_ptr and mpz_srcptr for parameters.
17610	* gmp.h (gmp_randinit_lc, gmp_randinit_lc_2exp, gmp_randseed,
17611	mpz_urandomb, mpz_urandomm): Corresponding change to prototypes.
17612	* randsdui.c: Remove wrong K&R parameters part.
17613
176142000-09-12  Kevin Ryde  <kevin@swox.se>
17615
17616	* gmp-impl.h (mpn_tdiv_qr): Move prototype from here ...
17617	* gmp.h (mpn_tdiv_qr): ... to here.
17618
17619	* gmp.texi (Miscellaneous Rational Functions): Comment-out and
17620	move version 1 compatibility note to "Compatibility" section.
17621	(Rational Number Functions): Ditto for canonicalization note.
17622
176232000-09-10  Kevin Ryde  <kevin@swox.se>
17624
17625	* mpn/x86/pentium/com_n.asm: New file.
17626
17627	* gmp.texi (Rational Arithmetic): Add mpq_abs.
17628	(Miscellaneous Rational Functions): Merge and simplify descriptions of
17629	mpq_get_num, mpq_get_den, mpq_set_num, mpq_set_den.
17630
17631	* mpq/abs.c: New file.
17632	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
17633	* Makefile.am (MPQ_OBJECTS): Add it.
17634	* gmp.h (mpq_abs): Add prototype.
17635
17636	* mpq/set_den.c: Don't discard sign when copying, this makes the
17637	code match the manual.
17638
176392000-09-07  Torbjorn Granlund  <tege@swox.com>
17640
17641	* tune/alpha.asm: Rewrite to actually work right.
17642
176432000-09-07  Kevin Ryde  <kevin@swox.se>
17644
17645	* tune/common.c,speed.[ch]: Add measuring of mpn_sqrtrem,
17646	mpn_get_str, mpn_set_str.
17647	* tune/README: Various updates.
17648
176492000-09-06  Torbjorn Granlund  <tege@swox.com>
17650
17651	* mpz/fits.c: Correct type of `data'.
17652
176532000-09-06  Kevin Ryde  <kevin@swox.se>
17654
17655	* gmp.texi (Build Options): Clarify where to find CFLAGS.
17656	(Known Build Problems): Note SCO -lc problem.
17657
17658	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Fix for sizes > 512 limbs.
17659
17660	* doc/multiplication: Corrections and additions suggested by Paul.
17661
17662	* tune/modlinv.c: New file with alternate modlimb_inverts.
17663	* tune/Makefile.am, tune/speed.[ch]: Add measuring of them.
17664	* tune/speed.c (FLAG_NODATA): New attribute, use for mpz_bin_uiui,
17665	mpz_fib_ui, mpz_fac_ui.
17666
17667	* mpn/x86/t-zdisp.sh: New file.
17668
17669	* tests/t-modlinv.c: New file.
17670	* tests/Makefile.am (check_PROGRAMS): Add it.
17671
17672	* mpq/tests/t-set_f.c: New file.
17673	* mpq/tests/Makefile.am (check_PROGRAMS): Add it.
17674
17675	* gmp-impl.h (MPQ_CHECK_FORMAT): New macro.
17676	* mpq/tests/t-get_d.c: Use it.
17677
17678	* mpq/set_f.c: New file.
17679	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
17680	* Makefile.am (MPQ_OBJECTS): Ditto.
17681	* gmp.h: Add prototype.
17682	* gmp.texi (Miscellaneous Rational Functions): Document mpq_set_f,
17683	correct return type of mpq_set_d.
17684
176852000-09-03  Kevin Ryde  <kevin@swox.se>
17686
17687	* mpz/aors_ui.c: New file merging add_ui.c and sub_ui.c, no object
17688	code changes.
17689	* mpz/add_ui.c, mpz/sub_ui.c: Remove files.
17690	* mpz/Makefile.am: Update.
17691
17692	* gmp-impl.h (MPZ_FITS_STYPE_SDT, MPZ_FITS_UTYPE_SDT): New macros.
17693	* mpz/fits.c: New file merging six separate fits*.c.
17694	* mpz/fits_sshort_p.c, fits_sint_p.c, fits_slong_p.c, fits_ushort_p.c,
17695	fits_uint_p.c, fits_ulong_p.c: Remove files
17696	* mpz/Makefile.am: Use new fits.c, change object names from
17697	fits_*_p.lo to fits_*.lo to avoid SunOS 4 native "ar" warnings.
17698	* Makefile.am (MPZ_OBJECTS): Change from fits_*_p.lo to fits_*.lo.
17699
17700	* acinclude.m4 (GMP_CHECK_ASM_RODATA): New macro, defining RODATA.
17701	* configure.in: Use it.
17702	* mpn/x86/k[67]/mmx/popham.asm: Use it.
17703
17704	* mpn/x86/*/*.asm: Use "TEXT" not ".text".
17705
177062000-09-02  Kevin Ryde  <kevin@swox.se>
17707
17708	* mpq/aors.c: New file merging add.c and sub.c, no object code changes.
17709	* mpq/add.c, mpq/sub.c: Remove files.
17710	* mpq/Makefile.am: Update.
17711
17712	* mpz/aors.c: New file merging add.c and sub.c, no object code changes.
17713	* mpz/add.c, mpz/sub.c: Remove files.
17714	* mpz/Makefile.am, mpbsd/Makefile.am: Update.
17715
17716	* configure.in: Re-apply "PROLOGUE.*" regexp change for the
17717	benefit of alpha PROLOGUE_GP, lost in path search reorganisation.
17718
17719	* mpn/x86/x86-defs.m4 (jadcl0, cmov_simulate, ASSERT,
17720	movl_text_address): Don't use "1:" style labels.
17721	(Zdisp): Rearrange a bit, switch to all hex.
17722	* mpn/x86/README.family: Note SCO "as" doesn't support "1:" style
17723	local labels, misc rewordings.
17724
177252000-08-29  Torbjorn Granlund  <tege@swox.com>
17726
17727	* demos/primes.c: Include string.h.
17728
17729	* config.guess (x86 variant recog code): Remove dummy*.o files
17730	generated by some compilers.
17731
177322000-08-28  Kevin Ryde  <kevin@swox.se>
17733
17734	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix Solaris 2.8
17735	warning message suppression, add notes about SCO.
17736
17737	* Makefile.am (MPZ_OBJECTS etc): Move some comments.
17738
177392000-08-25  Kevin Ryde  <kevin@swox.se>
17740
17741	* mpz/pprime_p.c (mpz_millerrabin): Fix a TMP_FREE.
17742
17743	* gmp.texi (Copying): Refer to Lesser not Library GPL.
17744	(GMP and Reentrancy): Note stack-alloc.c is not reentrant, and
17745	that SCO <ctype.h> is potentially not reentrant.
17746
17747	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Test by attempting to
17748	link with or without an underscore.
17749	* gmp.texi (Known Build Problems): Remove SunOS 4 native grep
17750	GSYM_PREFIX problem, now fixed.
17751
17752	* gmp-impl.h (MODLIMB_INVERSE_3): New constant.
17753	* mpn/generic/diveby3.c: Use it instead of own INVERSE_3.
17754	* mpn/generic/mul_n.c: Ditto.
17755	* tests/t-constants.c: Check it, and PP_INVERTED too.
17756
17757	* acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): New macro.
17758	* configure.in [p6 and athlon] (gmp_optcflags_gcc): Use it to
17759	possibly add -march=pentiumpro.
17760
17761	* gmp-impl.h (MPZ_SET_STR_OR_ABORT, MPF_SET_STR_OR_ABORT): New macros.
17762	* mpz/tests/t-bin.c, mpz/tests/t-get_si.c, mpz/tests/t-jac.c,
17763	mpz/tests/t-misc.c: Use them.
17764	* mpf/tests/t-conv.c, mpf/tests/t-misc.c: Ditto.
17765	* mpz/tests/convert.c: Ditto and amend diagnostics slightly.
17766	* mpz/tests/t-misc.c (check_mpz_set_si): Remove a superfluous init.
17767	* mpz/tests/io.c: Differentiate between I/O and data conversion errors.
17768
17769	* mpn/generic/aors_n.c: New file merging add_n and sub_n, no
17770	object code changes.
17771	* mpn/generic/add_n.c: Remove file.
17772	* mpn/generic/sub_n.c: Remove file.
17773
17774	* mpn/generic/aorsmul_1.c: New file merging addmul_1 and submul_1,
17775	no object code changes.
17776	* mpn/generic/addmul_1.c: Remove file.
17777	* mpn/generic/submul_1.c: Remove file.
17778
17779	* mpn/generic/popham.c: New file merging popcount and hamdist, no
17780	object code changes.
17781	* mpn/generic/popcount.c: Remove file.
17782	* mpn/generic/hamdist.c: Remove file.
17783
177842000-08-24  Torbjorn Granlund  <tege@swox.com>
17785
17786	* gmp-impl.h (mpn_com_n): Fix typo.
17787
177882000-08-23  Torbjorn Granlund  <tege@swox.com>
17789
17790	* demos/primes.c (main): Don't call mpz_probab_prime_p for numbers
17791	that are known to be prime after sieving.
17792	(main): Declare and initialize max_s_prime_squared.
17793	(MAX_S_PRIME): Increase.
17794	(ST_SIZE): Increase.
17795
177962000-08-23  Kevin Ryde  <kevin@swox.se>
17797
17798	* gmp-impl.h (ASSERT_ALWAYS): Change to statement style.
17799	(JACOBI_TWO_U_BIT1): Remove ASSERT.
17800	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS as a statement.
17801
178022000-08-21  Torbjorn Granlund  <tege@swox.com>
17803
17804	* gmp-impl.h (ASSERT): Use do..while for dummy version.
17805
17806	* mpf/get_str.c: Don't set n_digits from digits_computed_so_far
17807	when the converted operand becomes zero.  Misc cleanups.
17808
178092000-08-21  Kevin Ryde  <kevin@swox.se>
17810
17811	* mpz/fdiv_r_2exp.c, mpz/lcm.c, mpz/urandomm.c: Add missing
17812	TMP_MARK/FREE, avoiding memory leak when using stack-alloc.c.
17813
178142000-08-20  Kevin Ryde  <kevin@swox.se>
17815
17816	* mpz/set.c [BERKELEY_MP] (move): Add conditionals to build as
17817	"move" for libmp.
17818	* mpbsd/Makefile.am: Use mpz/set.c, not move.c.
17819	* Makefile.am (MPBSD_OBJECTS): Corresponding change.
17820	* mpbsd/move.c: Remove file.
17821
17822	* mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am,
17823	mpbsd/Makefile.am (-DOPERATION_foo): Use "foo" even for ansi2knr
17824	"foo_" objects.  Do this with the makefiles to keep the sources
17825	cleaner.
17826	* mpz/mul_siui.c, mpf/integer.c: Revert to plain OPERATION_* forms.
17827
17828	* mpn/lisp/gmpasm-mode.el (gmpasm-remove-from-list): Renamed from
17829	gmpasm-delete-from-list, because it's non-destructive.
17830	(gmpasm-font-lock-keywords): Add some more keywords.
17831
178322000-08-16  Kevin Ryde  <kevin@swox.se>
17833
17834	* tune/mul_n_mpn.c, tune/mul_n_open.c: New files, being forced
17835	open-coded and mpn #includes of mpn/generic/mul_n.c.
17836	* tune/*: Add measuring of them.
17837	* tune/speed.c: Print command line into *.gnuplot file.
17838
17839	* mpn/generic/mul_n.c (USE_MORE_MPN): Change to #if not #ifdef for
17840	using the value, add #ifndef for providing the default.
17841	* mpn/sparc64/gmp-mparam.h (USE_MORE_MPN): Add #ifndef.
17842
17843	* tests/t-constants.c: New file.
17844	* tests/Makefile.am (check_PROGRAMS): Add it.
17845
17846	* mpz/get_si.c: Use LONG_MAX, not BITS_PER_MP_LIMB, so the result
17847	doesn't depend on limb size when outside the range of a long
17848	(though such results are not actually documented).
17849	* mpz/tests/t-get_si.c: New file.
17850	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
17851
17852	* mpn/tests/try.c (call): Cast popcount and hamdist calls,
17853	for the benefit of long long limb.
17854
178552000-08-15  Kevin Ryde  <kevin@swox.se>
17856
17857	* mp.h (mp_set_memory_functions): Add missing #define.
17858	* mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its
17859	existence.
17860
17861	* mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying
17862	reverted behaviour of mpf_get_prec.
17863
17864	* mpn/tests/ref.c (refmpn_strip_twos): Use refmpn_copyi, not
17865	MPN_COPY_INCR.
17866
17867	* mpz/mul_siui.c, mpf/integer.c: Recognise OPERATION_*_ forms
17868	produced under ansi2knr.
17869
17870	* configure.in (mpn_objects, mpn_objs_in_libgmp): Add $U to .c
17871	objects when ansi2knr in use.
17872
17873	* mpn/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
17874	(libdummy.la): Add this, not built, to create ansi2knr style rules
17875	for all potential .c files.
17876	* mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpfr/Makefile.am,
17877	mpbsd/Makefile.am, mpq/tests/Makefile.am, tests/Makefile.am
17878	(AUTOMAKE_OPTIONS): Enable ansi2knr (now everywhere).
17879	* Makefile.am (MPZ_OBJECTS, MPQ_OBJECTS, MPF_OBJECTS, MPFR_OBJECTS,
17880	MPBSD_OBJECTS, libmp_la_DEPENDENCIES): Add $U to all .lo filenames.
17881
178822000-08-03  Torbjorn Granlund  <tege@swox.com>
17883
17884	* mpn/alpha/ev6/addmul_1.asm: Correct number of cycles to 3.5/28.
17885
178862000-08-02  Torbjorn Granlund  <tege@swox.com>
17887
17888	* Version 3.1 released.
17889
17890	* gmp.texi: Rephrase mpf_urandomb documentation.
17891
17892	* mpn/alpha/ev6: New directory with ev6/21264 optimized code.
17893	* mpn/alpha/ev6/addmul_1.asm: New file.
17894	* mpn/alpha/ev6/gmp-mparam.h: New file.
17895
178962000-08-02  Kevin Ryde  <kevin@swox.se>
17897
17898	* demos/factorize.c (random): Don't use "inline".
17899
17900	* mpfr/log.c, mpfr/mul_ui.c, mpfr/round.c, mpfr/set.c, mpfr/set_d.c:
17901	Corrections to K&R parts.
17902
17903	* Makefile.am (EXTRA_HEADERS): Omit $(MPFR_HEADERS_OPTION).
17904	* mpfr/Makefile.am (EXTRA_DIST): Add mpfr.h.
17905
17906	* gmp.texi (Known Build Problems): Note problem stripping libgmp.a.
17907
179082000-08-02  Kent Boortz  <kent@swox.com>
17909
17910	* mpfr: Integrated experimental version of mpfr-0.4.
17911	* configure.in: Changes for option --enable-mpfr.
17912	* Makefile.am: Changes for option --enable-mpfr.
17913
179142000-08-01  Torbjorn Granlund  <tege@swox.com>
17915
17916	* mpn/generic/popcount.c: Disable SPARC v9 popc_limb pattern.
17917	* mpn/generic/hamdist.c: Likewise.
17918
179192000-08-01  Kevin Ryde  <kevin@swox.se>
17920
17921	* mpn/tests/try.c (try_init): Account for ALIGNMENTS when sizing
17922	source and dest regions.
17923
179242000-07-31  Torbjorn Granlund  <tege@swox.com>
17925
17926	* mpf/get_str.c: Develop three extra digits, not just one.
17927
179282000-07-31  Kevin Ryde  <kevin@swox.se>
17929
17930	* gmp.texi (References): Add URL for invariant division.
17931
179322000-07-30  Kevin Ryde  <kevin@swox.se>
17933
17934	* tune/time.c (speed_cpu_frequency_proc_cpuinfo): Add support for
17935	alpha linux "cycle frequency".
17936
17937	* mpn/sparc64/gmp-mparam.h: Re-run tune program for FFT thresholds.
17938
179392000-07-29  Kevin Ryde  <kevin@swox.se>
17940
17941	* gmp.texi (ABI and ISA): Add sparc64-*-linux*.
17942	* configure.in [sparc64-*-linux*] (gmp_cflags64_gcc): Same flags
17943	as under solaris.
17944
17945	* configure.in (--enable-fft): New option, default "no".
17946	* gmp.texi (Build Options): Describe it.
17947	* mpn/generic/mul.c, mpn/generic/mul_n.c [WANT_FFT]: Use it.
17948	* tune/tuneup.c [WANT_FFT]: By default don't probe FFTs if not enabled.
17949	* NEWS: Multiplication optionally using FFT.
17950
17951	* tune/README: Notes on FFT and GCD thresholds, other minor updates.
17952
17953	* Makefile.am: Expunge the macos generated files update stuff.
17954
179552000-07-28  Kevin Ryde  <kevin@swox.se>
17956
17957	* mpn/x86/*/gmp-mparam.h: Add some FFT thresholds.
17958
179592000-07-28  Kent Boortz  <kent@swox.se>
17960
17961	* macos/Asm*, macos/CmnObj, macos/Mp*: Delete directories.
17962	* macos/Makefile: Delete file.
17963	* macos/Makefile.cw: Delete file.
17964	* macos/config.h: Delete file.
17965	* macos/Asm/*.s: Delete files.
17966	* macos/configure: Create target directories. Don't transform
17967	'(C)' to '(;)' in a 'dnl' line comment in .asm file.
17968	* Makefile.am: Delete macos targets.
17969	* macos/README: Reflect that we reverted back to a build
17970	process that require ""macos/configure" to run on MacOS.
17971	This imply that MacPerl is needed for a build in MacOS.
17972
179732000-07-27  Kevin Ryde  <kevin@swox.se>
17974
17975	* mpn/generic/mul_fft.c: New file, by Paul Zimmermann, minor mods
17976	applied.
17977	* configure.in (gmp_mpn_functions): Add it.
17978	* mpn/generic/mul.c, mpn/generic/mul_n.c: Use it.
17979	* doc/multiplication: Describe it (briefly).
17980
17981	* gmp-impl.h (FFT_MUL_THRESHOLD etc): New thresholds.
17982	(mpn_fft_best_k, mpn_fft_next_size, mpn_mul_fft, mpn_mul_fft_full):
17983	New functions.
17984	(numberof, TMP_ALLOC_TYPE etc, _MP_ALLOCATE_FUNC_TYPE etc,
17985	UNSIGNED_TYPE_MAX etc): New macros.
17986
17987	* tune/*: Add FFT threshold tuning and speed measuring.
17988	* tune/common.c: Avoid huge macro expansions for umul and udiv.
17989
17990	* mpz/tests/t-bin.c, mpz/tests/t-jac.c, mpz/tests/t-misc.c,
17991	mpbsd/tests/t-misc.c, mpf/tests/t-misc.c, mpn/tests/try.c,
17992	mpn/tests/spinner.c: Use new gmp-impl.h macros.
17993
17994	* demos/Makefile.am (BUILT_SOURCES): Don't need calc.c etc under this.
17995
179962000-07-27  Torbjorn Granlund  <tege@swox.com>
17997
17998	* mpn/ia64/gmp-mparam.h: New file.
17999
180002000-07-26  Torbjorn Granlund  <tege@swox.com>
18001
18002	* demos/isprime.c: Handle any number of arguments and print
18003	classification for each.  Add `-q' option for old behaviour.
18004
180052000-07-26  Kevin Ryde  <kevin@swox.se>
18006
18007	* gmp.texi (Build Options): Mention djgpp stack size.
18008	(Notes for Package Builds): New section.
18009	(Compatibility with older versions): Update for 3.1, add mpf_get_prec.
18010
18011	* demos/factorize.c [__GLIBC__]: Don't declare random() under glibc.
18012
18013	* gmp.h (gmp_version): Add prototype and define.
18014
18015	* Makefile.am: Keep macos directory generated files up-to-date
18016	during development and on a "make dist".
18017
180182000-07-25  Torbjorn Granlund  <tege@swox.com>
18019
18020	* mpn/hppa/gmp-mparam.h: Update threshold values from new `tune' run.
18021
18022	* mpn/pa64/gmp-mparam.h: Fill in values from `make tune' run.
18023	* mpn/pa64w/gmp-mparam.h: Likewise.
18024	* mpn/mips3/gmp-mparam.h: Likewise.
18025
18026	* tune/hppa2.asm: Fix typo in .level directive.
18027
18028	* configure.in: Add sparc64-*-linux* support (from Jakub Jelinek).
18029	* configure: Regenerate.
18030
18031	* mpn/sparc64/rshift.asm: Use %g5 instead of volatile stack frame area
18032	for return value (from Jakub Jelinek).
18033	* mpn/sparc64/lshift.asm: Likewise.
18034
18035	* mpf/get_prc.c: Revert Aug 8, 1996 change.
18036
18037	* version.c: No longer static.
18038
18039	* mpn/pa64/gmp-mparam.h: Only #define *_THRESHOLD if not already
18040	defined.
18041	* mpn/pa64w/gmp-mparam.h: Likewise.
18042	* mpn/arm/gmp-mparam.h: Likewise.
18043	* mpn/mips3/gmp-mparam.h: Likewise.
18044
180452000-07-25  Kevin Ryde  <kevin@swox.se>
18046
18047	* INSTALL: It's "info -f ./gmp.info" to be sure of hitting the
18048	gmp.info in the current directory.
18049
18050	* Makefile.am (libmp_la_DEPENDENCIES): Add mpz/cmp.lo, for last
18051	mpz/powm.c fix.
18052
18053	* mpn/sparc64/addmul1h.asm, mpn/sparc64/submul1h.asm: Renamed from
18054	addmul_1h.asm, submul_1h.asm to avoid name conflicts on an 8.3
18055	filesystem.
18056	* mpn/sparc64/addmul_1.asm, mpn/sparc64/submul_1.asm,
18057	mpn/sparc64/mul_1.asm: Update include_mpn()s.
18058
180592000-07-24  Torbjorn Granlund  <tege@swox.com>
18060
18061	* Update header of all files previously under the Library GPL
18062	to instead be under the Lesser GPL.
18063
18064	* COPYING.LIB: Now Lesser GPL.
18065	* demos/primes.c: Change license to GPL (was Library GPL).
18066	* demos/isprime.c: Change license to GPL (was Library GPL).
18067
18068	* gmp.h (error code enum): Add GMP_ERROR_BAD_STRING (currently unused).
18069
18070	* mpz/tests/t-mul.c: Default SIZE to a function of TOOM3_MUL_THRESHOLD.
18071	Improve error messages.  Decrease reps.
18072
180732000-07-22  Kevin Ryde  <kevin@swox.se>
18074
18075	* tune/speed.h: Decrease the amount of data used for gcd and powm
18076	measuring, to make the tune go a bit faster.
18077
180782000-07-21  Kent Boortz  <kent@swox.se>
18079
18080	* macos/Asm*, macos/CmnObj, macos/Mp*: Directories no longer created
18081	from configure script, now part of dist.
18082	* macos/Makefile
18083	* macos/Makefile.cw
18084	* macos/config.h
18085	* macos/Asm/*.s
18086	New files and directories that is the output from configure. This way
18087	no Perl installation is required to build on MacOS, just MPW.
18088	* macos/configure: Added prefix '__g' to exported assembler labels.
18089	Changed to handle new m4 syntax instead of the old cpp syntax in asm.
18090	* macos/Makefile.in: Corrected 'clean' target, added 'distclean'
18091	and 'maintainer_clean'. Added "mpn/mp_bases.c" to build.
18092	* macos/README: Reflect the new build process without configure.
18093	Corrected the file structure for Apple MPW installation.
18094
180952000-07-21  Torbjorn Granlund  <tege@swox.com>
18096
18097	* mpf/tests/t-muldiv.c: Relax error limit.  Make precision depend
18098	on SIZE.  Misc changes.
18099
18100	* configure: Regenerate.
18101
181022000-07-20  Kent Boortz  <kent@swox.com>
18103
18104	* macos/Makefile.in: Removed hard coded targets, added special
18105	targets found in Makefile.am files.
18106	* macos/configure: Generate targets from top configure script and
18107	Makefile.am files. Made script runnable from Unix for testing.
18108	* macos/README: Notes about search paths for includes, contributed
18109	by Marco Bambini.
18110	* configure.in: Added comment about lines that the "macos/configure"
18111	script depend on.
18112
181132000-07-20  Torbjorn Granlund  <tege@swox.com>
18114
18115	* mpz/powm.c (mpz_powm): After final mpz_redc call, subtract `mod'
18116	from result if it is greater than `mod'.
18117
181182000-07-19  Torbjorn Granlund  <tege@swox.com>
18119
18120	* mpn/hppa/gmp-mparam.h: Fill in values from `make tune' run.
18121	* mpn/alpha/gmp-mparam.h: Likewise.
18122	* mpn/powerpc32/gmp-mparam.h: Likewise.
18123
18124	* tune/hppa.asm: New file.
18125	* tune/hppa2.asm: New file.
18126	* configure.in (SPEED_CYCLECOUNTER_OBJS): Set for hppa2*-*-* and
18127	hppa*-*-*.
18128	* tune/Makefile.am (EXTRA_DIST): Add hppa.asm and hppa2.asm.
18129
18130	* tune/speed.h (SPEED_ROUTINE_MPN_BZ_DIVREM_CALL): Declare `marker';
18131	invoke TMP_FREE.
18132
18133	* mpn/hppa/hppa1_1/udiv_qrnnd.S: Use "%" instead of "'" for
18134	reloc/symbol delimiter.
18135
181362000-07-16  Torbjorn Granlund  <tege@swox.com>
18137
18138	* mpn/powerpc64/gmp-mparam.h: Update with output from tune utility.
18139	* mpn/powerpc64/copyi.asm: New file.
18140	* mpn/powerpc64/copyd.asm: New file.
18141
181422000-07-16  Kevin Ryde  <kevin@swox.se>
18143
18144	* tune/*: Add measuring for umul_ppmm and udiv_qrnnd.
18145
181462000-07-14  Kevin Ryde  <kevin@swox.se>
18147
18148	* mpn/x86/k6/k62mmx: New directory.
18149	* configure.in (k6[23]*-*-*): Use it.
18150	* mpn/x86/k6/k62mmx/copyi.asm, mpn/x86/k6/k62mmx/copyd.asm: Move from
18151	mmx directory, improve code alignment a bit.
18152	* mpn/x86/k6/k62mmx/lshift.asm, mpn/x86/k6/k62mmx/rshift.asm: Ditto,
18153	and improve addressing modes for pre-CXT cores.
18154	* mpn/x86/x86-defs.m4 (Zdisp): Add an instruction.
18155	* mpn/x86/k6/mmx/lshift.asm, mpn/x86/k6/mmx/rshift.asm: New files,
18156	suiting plain K6.
18157	* mpn/x86/README, mpn/x86/k6/README: Updates.
18158	* mpn/x86/k6/mmx/*.asm: Update some comments.
18159
18160	* mpn/tests/Makefile.am: Use $(MAKE) in .asm rules, not "m".
18161	* tune/Makefile.am: Use $(EXEEXT) and libtool --config objdir, for
18162	the benefit of djgpp.
18163
18164	* */Makefile.in: Regenerate with patched automake that adds
18165	$(EXEEXT) to EXTRA_PROGRAMS.
18166
18167	* mpn/tests/try.c: Add #ifdef to SIGBUS, for the benefit of djgpp.
18168	* config.guess: Recognise pc:*:*:* as an x86, for djgpp.
18169
18170	* configure: Regenerate with patched autoconf to fix temp file
18171	".hdr" which is invalid on a DOS 8.3 filesystem, and to fix two
18172	sed substitutes that clobbered a ":" in $srcdir (eg. a DOS drive
18173	spec).
18174
18175	* mpz/tests/io.c: Use one fp opened "w+", since separately opened
18176	input and output doesn't work on MS-DOS 6.21.
18177
18178	* tests/rand/Makefile.am (allprogs): Pseudo-target to build everything.
18179	(CLEANFILES): Add EXTRA_PROGRAMS and EXTRA_LTLIBRARIES.
18180	(manual-test, manual-bigtest): Add $(EXEEXT) to dependencies.
18181
18182	* tests/rand/*/Makefile.in: Regenerate with patched automake that adds
18183	$(EXEEXT) to EXTRA_PROGRAMS.
18184
181852000-07-13  Torbjorn Granlund  <tege@swox.com>
18186
18187	* mpz/tests/t-root.c: Also test mpz_perfect_power_p.
18188	Generate `nth' so that there will be fewer trivial values.
18189
18190	* mpz/root.c: Reverse return value in tests for detecting root of +1
18191	and -1.
18192
18193	* mpz/perfpow.c: Use TMP_ALLOC interface.
18194
181952000-07-12  Torbjorn Granlund  <tege@swox.com>
18196
18197	* mpz/perfpow.c (primes): Make it const.
18198
181992000-07-06  Kevin Ryde  <kevin@swox.se>
18200
18201	* mpn/x86/k6/cross.pl: New file.
18202
18203	* mpn/x86/*/gmp-mparam.h: Updates to thresholds, conditionalize
18204	all _TIME defines.
18205	* mpn/x86/pentium/mmx/gmp-mparam.h: New file.
18206	* mpn/sparc64/gmp-mparam.h: Update thresholds.
18207	* mpn/sparc32/v9/gmp-mparam.h: Ditto.
18208
182092000-07-04  Kevin Ryde  <kevin@swox.se>
18210
18211	* NEWS: Updates.
18212	* mpn/x86/*/README: Miscellaneous updates.
18213
18214	* tune/speed-ext.c: New file.
18215	* tune/Makefile.am: Add it.
18216	* tune/README: Updates.
18217	* tune/speed.h (SPEED_ROUTINE_MPN_DIVREM_2): Bug fixes.
18218
18219	* demos/calc.y,calclex.l: New files.
18220	* demos/calc.c,calc.h,calclex.c: New files, generated from .y and .l.
18221	* demos/Makefile.am: Add them.
18222
18223	* gmp.h (mpq_swap, mpf_swap): Add prototypes and defines.
18224
182252000-07-01  Kevin Ryde  <kevin@swox.se>
18226
18227	* gmp.texi (ABI and ISA): New section, bringing together ABI notes.
18228	(Build Options): Add MPN_PATH, various updates.
18229	(Build Options): Add note on setting CFLAGS when setting CC.
18230	(Notes for Particular Systems): Add -march=pentiumpro problem.
18231	(Known Build Problems): Note on gmp-mparam.h for 64-bit generic C.
18232	(GMP Variable Conventions): Add some info on user defined functions.
18233	(Reporting Bugs): Minor rewording.
18234
18235	* configure.in (MPN_PATH): Renamed from mpn_path.
18236
18237	* gmp-impl.h (ULONG_MAX,ULONG_HIGHBIT,...,SHORT_MAX): New defines.
18238	* mp[zf]/tests/t-misc.c: Use them.
18239
18240	* mpbsd/tests/t-misc.c: New file.
18241	* mpbsd/tests/Makefile.am: Add it.
18242
18243	* Makefile.am (LIBGMP_LT_*, LIBMP_LT_*): Bump version info.
18244	* gmp.h (__GNU_MP_VERSION_*): Bump to 3.1.
18245
18246	* mpf/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
18247
18248	* Makefile.am (libmp_la_SOURCES): Add mp_set_fns.c, accidentally
18249	omitted in gmp 3.0.x.
18250	* gmp.texi (Custom Allocation): Note this is available in mpbsd,
18251	and some minor rewording.
18252
182532000-06-30  Torbjorn Granlund  <tege@swox.com>
18254
18255	* demos/factorize.c (random): New function, defined conditionally.
18256	(factor_using_pollard_rho): Use it, not mrand48.
18257
18258	* mpn/cray/README: New file.
18259
182602000-06-30  Kevin Ryde  <kevin@swox.se>
18261
18262	* mpn/x86/pentium/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
18263
18264	* mpz/tests/t-jac.c: Test limbs on mpn_jacobi_base, not just ulongs.
18265
18266	* gmp-impl.h, mpn/tests/try.c, mpn/tests/spinner.c, tune/speed.c:
18267	Use config.h unconditionally, not under HAVE_CONFIG_H.
18268
18269	* demos/pexpr.c [__DJGPP__]: Patch by Richard Dawe to not use
18270	setup_error_handler on djgpp.
18271
18272	* tune/*: Locate data to help direct-mapped caches, add measuring
18273	of mpz_init/clear, mpz_add and mpz_bin_uiui, various cleanups.
18274	* configure.in (AC_CHECK_FUNCS): Add popen.
18275
182762000-06-29  Torbjorn Granlund  <tege@swox.com>
18277
18278	* mpf/mul_2exp.c: Streamline criterion for whether to use mpn_lshift or
18279	mpn_rshift.  Increase precision when exp is a multiple of
18280	BITS_PER_MP_LIMB primarily to make exp==0 be a noop.
18281	* mpf/div_2exp.c: Analogous changes.
18282
18283	* mpf/tests/t-dm2exp.c: Set u randomly in loop.  Perform more
18284	mpf_mul_2exp testing.
18285
18286	* configure.in: Recognize cray vector processors with a broad `*';
18287	move after alpha* not to match that.
18288
182892000-06-28  Kevin Ryde  <kevin@swox.se>
18290
18291	* mpz/tests/io.c: Use a disk file, not a pipe, switch to ansi2knr
18292	style, switch from MP_INT to mpz_t, add a couple of error checks.
18293	* mpz/tests/Makefile.am (CLEANFILES): Add io.tmp, in case io.c fails.
18294
182952000-06-27  Torbjorn Granlund  <tege@swox.com>
18296
18297	* mpf/tests/t-get_d.c: Be more lax about relative error, to handle Cray
18298	floating point format.
18299
18300	* mpq/tests/t-get_d.c: Decrease default reps to 1000.
18301
18302	* mpf/tests/t-conv.c: Correct type of `bexp'.
18303
18304	* configure.in (cray vector machines): Don't inherit gmp_cflags_cc.
18305
18306	* tune/Makefile.am (EXTRA_DIST): Delete sparc64.asm.
18307
18308	* configure.in (cray vector machines): Set extra_functions.
18309
18310	* mpn/cray/mulww.f: New file with vectorizing cray code.
18311	* mpn/cray/mulww.s: Generated from mulww.f.
18312	* mpn/cray/mul_1.c: New file.
18313	* mpn/cray/addmul_1.c: New file.
18314	* mpn/cray/submul_1.c: New file.
18315	* mpn/cray/add_n.c: New file.
18316	* mpn/cray/sub_n.c: New file.
18317
183182000-06-26  Kevin Ryde  <kevin@swox.se>
18319
18320	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix so it actually
18321	detects solaris 2.6, and also suppress warning on solaris 2.8.
18322	* configure.in (SPEED_CYCLECOUNTER): Remove spurious "athlon" from
18323	sparc case.
18324
18325	* mpn/lisp/gmpasm-mode.el: Move keymap to the top of the docstring.
18326
183272000-06-21  Kevin Ryde  <kevin@swox.se>
18328
18329	* mpn/generic/mul_n.c (mpn_kara_mul_n, mpn_kara_sqr_n): Use
18330	mp_size_t for n2.
18331	(mpn_toom3_mul_n, mpn_toom3_sqr_n): Use mp_size_t for size
18332	parameters and "l" variables.
18333	* gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Update prototypes.
18334
18335	* mpbsd/itom.c, mpbsd/sdiv.c: Add casts for correct handling of
18336	-0x80...00 on systems with sizeof(short)==sizeof(int).
18337
18338	* mpz/tests/t-misc.c: Move "bin" test from here ...
18339	* mpz/tests/t-bin.c: ... to here, and add a new (2k,k) test too.
18340	* mpz/tests/Makefile.am (check_PROGRAMS): Add t-bin.
18341
18342	* mpz/bin_ui.c [_LONG_LONG_LIMB]: Use mpn_divrem_1, since kacc is
18343	a limb not a ulong.
18344	* mpz/bin_uiui.c [_LONG_LONG_LIMB]: Ditto, and use mpn_mul_1 too,
18345	since nacc is a limb.
18346
18347	* mpf/tests/t-misc.c (check_mpf_set_si, check_mpf_cmp_si):
18348	New file, testing mpf_set_si, mpf_init_set_si, and mpf_cmp_si.
18349	* mpf/tests/Makefile.am (check_PROGRAMS): Add it.
18350
18351	* mpz/tests/t-misc.c (check_mpz_set_si, check_mpz_cmp_si):
18352	New tests, for mpz_set_si, mpz_init_set_si, and mpz_cmp_si.
18353
18354	* mpz/set_si.c, mpz/iset_si.c, mpz/cmp_si.c [_LONG_LONG_LIMB]: Fix
18355	handling of -0x80..00.
18356	* mpf/set_si.c, mpf/iset_si.c, mpf/cmp_si.c [_LONG_LONG_LIMB]: Ditto.
18357
183582000-06-19  Torbjorn Granlund  <tege@swox.com>
18359
18360	* demos/primes.c: Properly handle arguments `m +n'.
18361
183622000-06-17  Torbjorn Granlund  <tege@swox.com>
18363
18364	* config.sub: Recognize k5 and k6 with common pattern.
18365
18366	* mpq/tests/t-get_d.c: Also test mpq_set_d.  Misc improvements.
18367
18368	* mpq/set_d.c: Special case 0.0.  Don't call mpn_rshift with 0 count.
18369	Allocate correct amount of memory for numerator.  Delete spurious
18370	ASSERT_ALWAYS(1).
18371
183722000-06-17  Kevin Ryde  <kevin@swox.se>
18373
18374	* mpz/perfsqr.c: Fix so that zero is considered a perfect square.
18375	(Was wrongly calling mpn_perfect_square_p with size==0.)
18376
183772000-06-16  Kevin Ryde  <kevin@swox.se>
18378
18379	* configure.in: Set k5*-*-* to use basic i386 code until there's
18380	something specific.  Add path=x86 as a default for x86s.
18381
18382	* acinclude.m4 (GMP_CHECK_ASM_ALIGN_LOG): Generate
18383	ALIGN_LOGARITHMIC setting, not a full ALIGN definition.
18384	(GMP_CHECK_ASM_ALIGN_FILL_0x90): New test.
18385	* configure.in [x86-*-*]: Use GMP_CHECK_ASM_ALIGN_FILL_0x90.
18386	* mpn/asm-defs.m4 (ALIGN): New macro.
18387	* mpn/x86/x86-defs.m4 (ALIGN): Remove supplementary definition.
18388
18389	* tune/*: Plain "unsigned" for speed_cyclecounter.
18390	* configure.in: Use tune/sparcv9.asm for 32 and 64 bit modes.
18391	* tune/sparc64.asm: Remove file.
18392
183932000-06-15  Torbjorn Granlund  <tege@swox.com>
18394
18395	* mpn/x86/k7/mmx/copyi.asm: Use `testb' instead of `test'.
18396	* mpn/x86/k7/mmx/copyd.asm: Likewise.
18397
18398	* mpn/x86/k7/mmx/lshift.asm: Avoid using `~' (Solaris as problems).
18399	* mpn/x86/k7/mmx/rshift.asm: Likewise.
18400	* mpn/x86/k6/aors_n.asm: Likewise.
18401	* mpn/x86/k7/aors_n.asm: Likewise.
18402	* mpn/x86/k7/mul_basecase.asm: Likewise.
18403
184042000-06-13  Torbjorn Granlund  <tege@swox.com>
18405
18406	* tune/sparcv9.asm: Tune, deleting two instructions.
18407
18408	* tune/alpha.asm: Update to unified speed_cyclecounter.
18409
184102000-06-11  Kevin Ryde  <kevin@swox.se>
18411
18412	* mpz/tests/reuse.c (FAIL): Add a K&R version.
18413	Use _PROTO on some typedefs.
18414	* mpz/tests/t-misc.c: Add gmp-impl.h for "const".
18415
18416	* configure.in: Rework mpn multi-function and optional files.
18417	Names standardized, no need for explicit declarations, all picked
18418	up in one $path traversal.
18419	* doc/configuration: Updates.
18420
18421	* tests/rand/t-rand.c (main): Change "usage" to work with K&R.
18422
184232000-06-10  Kevin Ryde  <kevin@swox.se>
18424
18425	* mpn/x86/pentium/mmx/popham.asm, mpn/x86/p6/mmx/popham.asm,
18426	mpn/x86/p6/p3mmx/popham.asm, mpn/x86/p6/diveby3.asm: Add
18427	MULFUNC_PROLOGUE for correct HAVE_NATIVE_* matching.
18428
18429	* mpn/x86/x86-defs.m4 (cmov_bytes_tttn): Use eval() on expressions.
18430	(cmov_available_p): Switch to list CPUs which do have cmov.
18431	* mpn/x86/p6/sqr_basecase.asm, mpn/x86/k6/sqr_basecase.asm,
18432	mpn/x86/k7/sqr_basecase.asm: Use eval() for multiplication.
18433	* mpn/x86/README.family: Various updates.
18434
184352000-06-09  Kevin Ryde  <kevin@swox.se>
18436
18437	* mpbsd/tests/allfuns.c (main): Call exit() instead of doing return.
18438
18439	* doc/tasks.html, doc/projects.html: Moved from projects directory.
18440	* doc/multiplication: New file.
18441	* Makefile.am (EXTRA_DIST): Remove projects, add doc.
18442
18443	* Makefile.am (libgmp_la_LIBADD, libmp_la_LIBADD): Remove
18444	unnecessary -lm.
18445	* INSTALL: Remove -lm from instructions.
18446	* demos/Makefile.am (qcn_LDADD): Add -lm.
18447
18448	* tune/*: Add measuring for mpn_divrem_2 and modlimb_invert,
18449	improve addsub_n.  Switch to unified speed_cyclecounter.
18450	* configure.in: Update configs for speed_cyclecounter.
18451
18452	* gmp-impl.h (MP_LIMB_T_MAX, MP_LIMB_T_HIGHBIT): New macros.
18453	* mpn/generic/diveby3.c, mpn/generic/mul_n.c, mpn/generic/gcd.c,
18454	tune/speed.c, mpn/tests/ref.c: Use them.
18455
18456	* mpn/tests/spinner.c: Remove setitimer, just alarm is enough.
18457	* configure.in (AC_CHECK_FUNCS): Remove setitimer.
18458	* mpn/tests/x86call.asm: Start with junk in %eax, %ecx, %edx.
18459	* mpn/tests/ref.[ch] (refmpn_addsub_nc): New function.
18460	* mpn/tests/try.c: Add some support for mpn_addsub_nc.
18461	* mpn/tests/Makefile.am (EXTRA_PROGRAMS): Remove addsub_n and
18462	addsub_n_2 which don't currently build.
18463	* mpn/tests/copy.c: Test MPN_COPY_INCR, not __gmpn_copy.
18464
18465	* tests/rand/Makefile.am (libstat_la_LIBADD): Add -lm, no longer on
18466	libgmp.la.
18467	(findlc_LDADD): Use libstat.la.
18468	(AUTOMAKE_OPTIONS): Use ansi2knr.
18469
184702000-06-08  Torbjorn Granlund  <tege@swox.com>
18471
18472	* configure.in (alpha*-*-osf*): Default `flavour' to ev6 for ev6 and
18473	higher.
18474	(alpha*-*-*): Likewise.
18475	(alpha*-*-osf*: gmp_optcflags_cc): Move -arch/-tune flags from
18476	gmp_xoptcflags_gcc.
18477
18478	* mpn/Makefile.am (TARG_DIST): Add pa64w.
18479
18480	* longlong.h: Wrap 64-bit hppa code in #ifndef LONGLONG_STANDALONE.
18481
184822000-06-07  Torbjorn Granlund  <tege@swox.com>
18483
18484	* mpz/remove.c: Fail for `src' being zero.
18485
18486	* mpz/tests/reuse.c: Test more functions.
18487	(FAIL): New define.
18488
18489	* mpz/tests/t-powm.c: Loop during operand generation while they
18490	are mathematically ill-defined (used to just skip such tests).
18491
18492	* mpz/powm.c (mpz_redc): Clean up argument declarations.
18493
18494	* configure.in (gmp_cflags64_gcc): Don't add bogus -mWHAT option.
18495	(sparcv9-*-solaris2.[7-9]], gmp_cflags64_gcc):
18496	Inherit from previous gmp_cflags64_gcc; pass `-m64 -mptr64'.
18497	(ia64*-*-*): New.
18498
18499	* mpn/generic/dump.c: Make it work when an mp_limb_t is not `long'.
18500
18501	* mpf/set_prc.c: MPN_COPY => MPN_COPY_INCR.
18502
185032000-06-06  Torbjorn Granlund  <tege@swox.com>
18504
18505	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n):
18506	Use mpn_incr_u for final carry propagation.
18507
18508	* mpz/tests/t-gcd.c: Add calls to mpz_gcdext with argument t == NULL.
18509
18510	* mpz/tests/reuse.c: Major rewrite; test many more functions.
18511
18512	* mpz/powm_ui.c: When exp is 0, change res assign order in order
18513	to handle argument overlap.
18514	* mpz/powm.c: When exp is 0, change res assign order in order
18515	to handle argument overlap.  Handle negative exp and mod arguments.
18516
18517	* mpz/gcdext.c: Rework code after mpn_gcdext call to handle
18518	argument overlap.
18519
18520	* mpz/fdiv_qr.c: Read dividend->_mp_size before calling mpz_tdiv_qr
18521	in order to handle argument overlap.
18522	* mpz/cdiv_qr.c: Likewise.
18523
18524	* mpf/tests/reuse.c: Fix typo that effectively disabled `dis_funcs'
18525	tests.  Clean up test for mpf_ui_div.
18526
185272000-06-06  Kevin Ryde  <kevin@swox.se>
18528
18529	* mpn/x86/p6/sqr_basecase.asm: New file.
18530	* mpn/x86/mod_1.asm: Avoid one conditional jump.
18531	* mpn/x86/p6/gmp-mparam.h: Update thresholds, #ifndef UMUL_TIME
18532	and UDIV_TIME, add COUNT_TRAILING_ZEROS_TIME.
18533
18534	* mp_minv_tab.c: New file.
18535	* Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
18536	* gmp-impl.h (modlimb_invert): New macro.
18537	* mpz/powm.c: Remove mpz_dmprepare, use modlimb_invert instead.
18538	* mpn/generic/bdivmod.c: Use modlimb_invert instead of a loop.
18539	* mpn/generic/gcd.c: Inline two small mpn_bdivmod calls, use
18540	MPN_COPY_INCR not MPN_COPY in one place.
18541
185422000-06-05  Torbjorn Granlund  <tege@swox.com>
18543
18544	* mpf/tests/reuse.c (dsi_funcs): Add mpf_mul_2exp and mpf_div_2exp.
18545	(main): Clean up test for mpf_div_ui.
18546
18547	* mpf/mul_2exp.c: Correct criterion for whether to use mpn_lshift or
18548	mpn_rshift.  MPN_COPY => MPN_COPY_INCR.  Coerce the two assignments to
18549	r->_mp_size.
18550
18551	* mpf/div_2exp.c: Use mpn_rshift instead of mpn_lshift when overlap
18552	so requires.  MPN_COPY => MPN_COPY_INCR.
18553
18554	* mpf/tests/t-dm2exp.c: Correct type of res_prec.
18555
185562000-06-04  Kevin Ryde  <kevin@swox.se>
18557
18558	* mpz/bin_uiui.c: Fix result for n==0 and n==k.
18559	* mpz/bin_ui.c: Fix result for k>n, add support for n<0.
18560	* gmp.texi (Number Theoretic Functions): Update mpz_bin_ui to
18561	note n<0 is supported.
18562
18563	* mpz/tests/t-misc.c: New file.
18564	* mpz/tests/Makefile.am (check_PROGRAMS): Add it.
18565
185662000-05-31  Kevin Ryde  <kevin@swox.se>
18567
18568	* tune/speed.* (FLAG_R_OPTIONAL): New option for routines, use on
18569	mpn_gcd_1 and mpn_mul_basecase.
18570	* tune/README: Update.
18571
18572	* tune/alpha.asm: New file, by Torbjorn.
18573	* tune/Makefile.am (EXTRA_DIST): Add it.
18574	* configure.in (alpha*-*-*): Use it.
18575
185762000-05-31  Linus Nordberg  <linus@swox.se>
18577
18578	* doc/configuration: New file.
18579
185802000-05-30  Torbjorn Granlund  <tege@swox.com>
18581
18582	* mpn/generic/mul_basecase.c: Call mpn_mul_2 and mpn_addmul_2
18583	if available.  Don't include longlong.h.
18584
18585	* doc/isa_abi_headache: New file.
18586
185872000-05-30  Linus Nordberg  <linus@swox.se>
18588
18589	* configure.in (NM): Use AC_PROG_NM rather than AC_CHECK_TOOL to
18590	find `nm'.  (AC_PROG_NM comes with Libtool and is needed to get
18591	the `-B' option (BSD compatible output) included in $NM.)
18592	(AR): Use AC_CHECK_PROG rather than AC_CHECK_TOOL to find `ar'.
18593	(Now that NM isn't a cross compilation tool, don't give the
18594	impression that we know how to cross compile.)
18595	(CCAS): Remove spurious comment.
18596
18597	* gmp.texi (Notes for Particular Systems): Remove comment about
18598	using GNU `nm' on AIX since system nm now works.
18599
186002000-05-29  Torbjorn Granlund  <tege@swox.com>
18601
18602	* mpn/power/mul_1.s: Remove [PR] from first word in function
18603	descriptor.
18604	* mpn/power/addmul_1.s: Likewise.
18605	* mpn/power/submul_1.s: Likewise.
18606
186072000-05-28  Kevin Ryde  <kevin@swox.se>
18608
18609	* configure.in, tune/*: Change pentium rdtsc cycle scheme to
18610	HAVE_SPEED_CYCLECOUNTER and SPEED_CYCLECOUNTER_OBJS.
18611	* tune/pentium.asm: Renamed and converted from rdtsc.asm.
18612	* tune/sparcv9.asm: New file, by Torbjorn.
18613	* tune/sparc64.asm: New file.
18614	* tune/tuneup.c: Put a limit on gcdext search.
18615
18616	* gmp.h (mp_set_memory_functions): Add extern "C".
18617	* mp.h (__GNU_MP__): Bump to "3".
18618	* mpz/add.c,mul.c,powm.c,sub.c,sqrtrem.c,tdiv_qr.c [BERKELEY_MP]:
18619	Include mp.h for mpbsd compile.
18620	* mpz/gcd.c: Ditto, and remove _mpz_realloc declaration.
18621
18622	* gmp.texi (Integer Functions): Flatten @subsections into @sections.
18623	(Floating-point Functions): Ditto.
18624	(Integer Random Numbers): Split from miscellaneous as a sep section.
18625	(Installing GMP): Make nodes for the sections.
18626	Add more "@cindex"s.
18627	(Known Build Problems): Remove SunOS get_d problem, believed fixed.
18628	(Notes for Particular Systems): Remove HPPA note since now PIC.
18629	(References): URL for Jebelean.
18630
186312000-05-27  Torbjorn Granlund  <tege@swox.com>
18632
18633	* mpn/pa64w: New directory, contents based on corresponding mpn/pa64
18634	files.
18635	* configure.in (hppa2.0w-*-*): New.
18636	* mpz/tests/io.c (_INCLUDE_POSIX_SOURCE): Define when __hpux before
18637	including stdio.h.
18638	* gmp-impl.h: Always define DItype and UDItype.
18639
186402000-05-27  Kevin Ryde  <kevin@swox.se>
18641
18642	* tune/common.c (speed_measure): Correction to array sorting,
18643	better diagnostic when measuring fails.
18644	* tune/time.c: Add microsecond accurate getrusage method.
18645
18646	* tune/time.c (speed_cpu_frequency_processor_info): New function.
18647	* configure.in (AC_CHECK_FUNCS): Add processor_info.
18648
186492000-05-26  Linus Nordberg  <linus@swox.se>
18650
18651	* gmp.texi (Installing GMP): Shared libraries work for AIX < 4.3
18652	if using GNU nm.
18653
186542000-05-26  Torbjorn Granlund  <tege@swox.com>
18655
18656	* tune/tuneup.c (SIGNED_TYPE_MAX): Shift `-1' instead of `1' to
18657	avoid signed overflow.
18658
18659	* demos/pexpr.c (setup_error_handler): Don't call sigaltstack on
18660	Unicos.
18661
186622000-05-25  Torbjorn Granlund  <tege@swox.com>
18663
18664	* insert-dbl.c: Work around GCC 2.8 bug.
18665	* extract-dbl.c: Likewise.
18666
18667	* config.sub: Allow i586, i686, i786 again.
18668
18669	* config.guess: Use X86CPU for lots more systems.
18670
186712000-05-25  Linus Nordberg  <linus@swox.se>
18672
18673	* mpbsd/tests/dummy.c (main): Call exit() instead of doing return
18674	(some old SysV machines don't get this correct, I've heard.)
18675
186762000-05-25  Kevin Ryde  <kevin@swox.se>
18677
18678	* mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
18679	digits in string, so it's the same as a separate init and set_str.
18680
186812000-05-24  Torbjorn Granlund  <tege@swox.com>
18682
18683	* mpz/tests/reuse.c: Use mpz_random2 instead of mpz_random.
18684
18685	* mpz/divexact.c: Read pointers after reallocation.
18686	Compare `quot' and `den' instead of `qp' and `dp' in overlap check.
18687	Use MPN_COPY_INCR for copying from `np'.
18688
18689	(*-*-aix4.[3-9]*): Disable shared libs just for problematic AIX
18690	versions.
18691	* configure.in (*-cray-unicos*): Disable asm syntax checking; set
18692	compiler explicitly.
18693	* configure.in (hppa*-*-*): Remove code disabling shared libs.
18694
186952000-05-24  Linus Nordberg  <linus@swox.se>
18696
18697	* acinclude.m4 (GMP_PROG_CC_WORKS): Don't report progress to user
18698	when doing the AIX specific test to avoid "nested output".
18699
187002000-05-22  Kevin Ryde  <kevin@swox.se>
18701
18702	* mp.h (_PROTO): Copy from gmp.h, use on prototypes.
18703	Add extern "C" too.
18704	* mpbsd/tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
18705	* mpbsd/tests/allfuns.c: Don't execute mout, just link to it.
18706	(main): ANSI style definition.
18707
18708	* gmp-impl.h (MP_BASE_AS_DOUBLE): Change the expression to
18709	something that works on SunOS native cc.  Seems to fix the
18710	mp*_get_d problems.
18711
18712	* mpn/tests/ref.c (refmpn_strip_twos): Use MPN_COPY_INCR.
18713	* mpn/tests/Makefile.am: Let .asm.o rules work with absolute $srcdir.
18714
187152000-05-21  Kevin Ryde  <kevin@swox.se>
18716
18717	* mpn/x86/k7/sqr_basecase.asm: Replace file with K7 specific code.
18718	* mpn/x86/k7/README: Update.
18719	* mpn/x86/k7/gmp-mparam.h: Tune thresholds.
18720	(COUNT_TRAILING_ZEROS_TIME): New define.
18721	* mpn/x86/k6/gmp-mparam.h: Ditto.
18722
18723	* mpn/x86/pentium/mmx/popham.asm: New file (include_mpn of K6 version).
18724	* mpn/x86/p6/diveby3.asm: New file (include_mpn of P5 version).
18725	* mpn/x86/p6/mmx/popham.asm: New file (include_mpn of K6 version).
18726	* mpn/x86/p6/p3mmx/popham.asm: New file (include_mpn of K7 version).
18727	* configure.in (pentium3-*-*): Add p3mmx to $path.
18728
18729	* gmp.texi (Integer Arithmetic): Clarify mpz_jacobi op2; add
18730	mpz_*_kronecker_*.
18731	(Miscellaneous Integer Functions): Add mpz_odd_p and mpz_even_p.
18732	(Low-level Functions): Put mpn_divmod_1 with mpn_divrem_1 and note
18733	it's now a macro.
18734	(References): Add Henri Cohen.
18735
18736	* gmp.h (mpn_addmul_1c, mpn_divrem_1c, mpn_mod_1c, mpn_mul_1c,
18737	mpn_submul_1c): Add prototypes.
18738	(mpz_odd_p, mpz_even_p): New macros.
18739
18740	* mpn/asm-defs.m4 (m4wrap_prepend): New macro.
18741	(m4_error): Use it.
18742	(m4_not_for_expansion): Corrections to OPERATION symbols.
18743	More comments about variations between m4 versions.
18744	* mpn/x86/x86-defs.m4 (PROLOGUE): Use m4wrap_prepend (fixes error
18745	exit under BSD m4, previously m4_error printed the message but the
18746	exit code was 0).
18747
18748	* gmp.h (mpn_divmod_1): Change to a macro calling mpn_divrem_1.
18749	* mpn/generic/divrem_1.c: Move divmod_1.c code to here, make it
18750	static and call it __gmpn_divmod_1_internal.
18751	* mpn/generic/divmod_1.c: Remove file.
18752	* configure.in (gmp_mpn_functions): Remove divmod_1.
18753	* mpn/asm-defs.m4 (define_mpn): Remove divmod_1 and divmod_1c.
18754	* compat.c (mpn_divmod_1): Add compatibility function.
18755	* tune/*: Remove mpn_divmod_1 measuring (leave just divrem_1).
18756
18757	* acconfig.h (HAVE_NATIVE_mpn_*): Add some missing carry-in
18758	variants, remove divmod_1.
18759
18760	* mpn/x86/diveby3.asm: Use imul, update comments.
18761
18762	* demos/qcn.c: New file.
18763	* demos/Makefile.am (EXTRA_PROGRAMS): Add it.
18764
18765	* mpz/tests/t-jac.c: New file.
18766	* mpz/tests/Makefile.am (check_PROGRAMS): Add it. Enable ansi2knr.
18767
18768	* mpz/kronsz.c: New file.
18769	* mpz/kronuz.c: New file.
18770	* mpz/kronzs.c: New file.
18771	* mpz/kronzu.c: New file.
18772	* mpz/Makefile.am (libmpz_la_SOURCES): Add them.
18773	* Makefile.am (MPZ_OBJECTS): Add them.
18774	* gmp-impl.h (JACOBI_*, MPN_STRIP_LOW_ZEROS_NOT_ZERO): New macros.
18775	* gmp.h (mpz_*_kronecker_*): New defines and prototypes.
18776
18777	* mpn/generic/jacbase.c: New file.
18778	* mpn/generic/mod_1_rs.c: New file.
18779	* configure.in (gmp_mpn_functions): Add them.
18780	* gmp.h (mpn_jacobi_base, mpn_mod_1_rshift): New defines and
18781	prototypes.
18782	* longlong.h (COUNT_TRAILING_ZEROS_TIME): New define.
18783	* mpn/tests/ref.c (refmpn_mod_1_rshift): New function.
18784	* mpn/tests/try.c: Add mpn_mod_1_rshift.
18785	* tune/*: Add measuring for mpn_jacobi_base.
18786
18787	* acinclude.m4 (GMP_FINISH): Add ifdefs to allow multiple
18788	inclusion of config.m4.
18789	(GMP_PROG_M4): Put "good" message through to config.log.
18790
18791	* mpz/powm.c: Use a POWM_THRESHOLD for where redc stops.
18792	* tune/*: Add mpz_powm measuring, and tune POWM_THRESHOLD.
18793	* gmp-impl.h [TUNE_PROGRAM_BUILD] (POWM_THRESHOLD): Conditional
18794	redefinition for use when tuning.
18795
18796	* mpz/powm_ui.c: Use DIVIDE_BY_ZERO.
18797
18798	* mpz/iset_str.c: Initialize _mp_size to 0, in case no digits in
18799	string; this makes it the same as a separate init and set_str.
18800
188012000-05-20  Kevin Ryde  <kevin@swox.se>
18802
18803	* mpn/asm-defs.m4: Note &,|,^ aren't bitwise in BSD m4 eval().
18804	* mpn/x86/k6/sqr_basecase.asm: Use "%" not "&" in m4 eval()s.
18805
18806	* mpn/x86/x86-defs.m4 (Zdisp): Yet more instruction forms.
18807
188082000-05-19  Linus Nordberg  <linus@swox.se>
18809
18810	* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't use shell variable
18811	`ac_compile' for our own compile command string since other
18812	Autoconf macros may depend on it.
18813
188142000-05-19  Kevin Ryde  <kevin@swox.se>
18815
18816	* mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Fix
18817	carry propagation in final coefficient additions.
18818
188192000-05-18  Linus Nordberg  <linus@swox.se>
18820
18821	* configure.in: Set NM before looking for compiler since
18822	GMP_CHECK_CC_64BIT needs it.
18823
18824	* acinclude.m4 (GMP_CHECK_CC_64BIT): Don't execute on target.
18825	(GMP_PROG_CC_FIND): Before checking if the compiler knows how to
18826	produce 64-bit code, verify that it works at all.  The background
18827	is that /usr/ucb/cc on Solaris 7 successfully compiles in 64-bit
18828	mode but fails when doing final link.
18829	(GMP_PROG_CC_WORKS): Report to user what's happening.
18830
188312000-05-17  Linus Nordberg  <linus@swox.se>
18832
18833	* config.guess: Use X86CPU for x86 Cygwin.
18834
188352000-05-16  Kevin Ryde  <kevin@swox.se>
18836
18837	* mpn/x86/p6/mmx/divrem_1.asm: New file.
18838	* mpn/x86/p6/mmx/mod_1.asm: New file.
18839	* mpn/x86/p6/README: Update.
18840	* mpn/x86/divrem_1.asm: Update comments.
18841	* mpn/x86/mod_1.asm: Ditto.
18842
188432000-05-14  Kevin Ryde  <kevin@swox.se>
18844
18845	* tune/speed.h: Run gcd functions on a set of data.
18846
18847	* mpn/tests/try.c: New file.
18848	* mpn/tests/try.h: New file.
18849	* mpn/tests/spinner.c: New file.
18850	* mpn/tests/trace.c: New file.
18851	* mpn/tests/x86call.asm: New file.
18852	* mpn/tests/x86check.c: New file.
18853	* mpn/tests/ref.c (refmpn_hamdist): Allow size==0.
18854	(refmpn_gcd): New function, and other additions supporting it.
18855	* mpn/tests/ref.h: More prototypes.
18856	* mpn/tests/Makefile.am: Add try program, use ansi2knr.
18857
18858	* mpn/x86/k7/mmx/popham.asm: New file.
18859	* mpn/x86/k6/mmx/popham.asm: New file.
18860	* mpn/x86/k6/sqr_basecase.asm: Unroll the addmul, for approx 1.3x
18861	speedup above 15 limbs.
18862	* mpn/x86/k7/README: Update.
18863	* mpn/x86/k6/README: Update, and add notes on plain K6 and pre-CXT
18864	K6-2 problems.
18865	* configure.in (k6*-*-*, athlon-*-*): Add popham.
18866
18867	* mpn/x86/pentium/diveby3.asm: New file.
18868	* mpn/x86/pentium/README: Update.
18869
18870	* gmp.texi (Installing GMP): Add note on bad OpenBSD 2.6 m4.
18871	(Reporting Bugs): Ask for config.m4 if asm file related.
18872	(I/O of Rationals): New section, add mpq_out_str.
18873	(References): Add url for on-line gcc manuals.
18874	A few node and menu updates.
18875
18876	* INSTALL: Better command line argument checking for test progs.
18877	Change MP -> GMP.
18878
18879	* configure.in (WANT_ASSERT, USE_STACK_ALLOC, HAVE_PENTIUM_RDTSC):
18880	Put descriptions here, not in acconfig.h.
18881	(CALLING_CONVENTIONS_OBJS): New AC_SUBST (for mpn/tests/try).
18882	(HAVE_CALLING_CONVENTIONS): New AC_DEFINE.
18883	(AC_CHECK_HEADERS): Add sys/time.h.
18884	(AC_CHECK_FUNCS): Add getpagesize, setitimer.
18885	(KARATSUBA_SQR_THRESHOLD): Strip trailing comments from the
18886	#define when passing through to config.m4.
18887	* acconfig.h (PACKAGE, VERSION, WANT_ASSERT, USE_STACK_ALLOC,
18888	HAVE_PENTIUM_RDTSC): No need for #undefs, autoheader gets them
18889	from configure.in.
18890
18891	* acinclude.m4 (GMP_PROG_M4): Check for broken OpenBSD 2.6 m4
18892	eval(), put messages into config.log.
18893	* mpn/asm-defs.m4: Add notes and test for OpenBSD 2.6 m4.
18894
18895	* mpq/out_str.c: New file.
18896	* mpq/Makefile.am (libmpq_la_SOURCES): Add it.
18897	* Makefile.am (MPQ_OBJECTS): Ditto.
18898	* gmp.h (mpq_out_str): New define and prototype.
18899
189002000-05-12  Kevin Ryde  <kevin@swox.se>
18901
18902	* configure.in (CONFIG_TOP_SRCDIR): Fix to use $srcdir not
18903	$top_srcdir (which doesn't exist).
18904	* acinclude.m4 (GMP_C_ANSI2KNR): Fix setting U=_.
18905	* gmp-impl.h (mpn_com_n, MPN_LOGOPS_N_INLINE): Fix missing "do"
18906	(not currently used, probably no ill effect anyway).
18907
189082000-05-11  Torbjorn Granlund  <tege@swox.com>
18909
18910	* randraw.c (lc): Major overhaul (pending rewrite).
18911	(_gmp_rand): Rewrite.
18912
189132000-05-08  Torbjorn Granlund  <tege@swox.com>
18914
18915	* mpz/tests/convert.c: Call free via _mp_free_func.
18916	* mpf/tests/t-conv.c: Likewise.
18917
18918	* memory.c: Add code enabled for DEBUG that adds special patterns
18919	around allocated blocks.
18920
189212000-05-05  Linus Nordberg  <linus@swox.se>
18922
18923	* gmp.texi (Miscellaneous Float Functions): Correct parameter list
18924	for mpf_urandomb().
18925
18926	* configure.in: Invoke AC_REVISION.
18927
189282000-05-05  Kevin Ryde  <kevin@swox.se>
18929
18930	* gmp.texi: Use @dircategory and @direntry.
18931	(Installing GMP): Clarification for --target, updates on SunOS
18932	problems.
18933	(Integer Arithmetic): Add mpz_mul_si.
18934	(Initializing Rationals): Add mpq_swap.
18935	(Assigning Floats): Add mpf_swap.
18936	(Low-level Functions): Add mpn_divexact_by3c, and details of what
18937	the calculation actually gives.
18938	(Low-level Functions): Note extra space needed by mpn_gcdext,
18939	clarify the details a bit.
18940
18941	* compat.c: New file, entry points for upward binary compatibility.
18942	(mpn_divexact_by3): Compatibility function.
18943	* Makefile.am (libgmp_la_SOURCES): Add compat.c.
18944
18945	* mpn/tests/ref.c: Rearrange macros for ansi2knr.
18946	(div1): Renamed from div to avoid library function.
18947	(refmpn_divexact_by3c, refmpn_gcd_1, refmpn_popcount,
18948	refmpn_hamdist): New functions.
18949	* mpn/tests/ref.h: Add extern "C", add new prototypes.
18950
18951	* gmp.h (gmp_randinit, etc): Add extern "C".
18952	(_mpq_cmp_ui): Fix prototype name from mpq_cmp_ui.
18953	(mpn_divexact_by3): Now a macro calling mpn_divexact_by3c.
18954	(mpn_divexact_by3c): New prototype and define.
18955
18956	* mpn/x86/diveby3.asm: Change to mpn_divexact_by3c.
18957	* mpn/x86/k6/diveby3.asm: Ditto.
18958	* mpn/generic/diveby3.c: Ditto.
18959	* mpn/asm-defs.m4: Ditto on the define_mpn.
18960	* acconfig.h (HAVE_NATIVE_mpn_divexact_by3c): New define.
18961
18962	* mpq/swap.c: New file, derived from mpz/swap.c.
18963	* mpf/swap.c: Ditto.
18964	* mpq/Makefile.am: Add swap.c.
18965	* mpf/Makefile.am: Ditto.
18966	* Makefile.am: Add two new "swap.lo"s.
18967
18968	* mpn/x86/k6/mmx/com_n.asm: Fix an addressing bug (fortunately
18969	this code hasn't been used anywhere yet).
18970
18971	* mpn/x86/k7/mmx/divrem_1.asm: New file.
18972	* mpn/x86/k7/mmx/mod_1.asm: New file.
18973	* mpn/x86/k7/diveby3.asm: New file.
18974	* mpn/x86/k7/README: Update.
18975
18976	* mpn/x86/k7/aorsmul_1.asm: Use new cmovCC, no object code change.
18977	* mpn/x86/k7/mul_basecase.asm: Ditto.
18978	* mpn/x86/p6/aorsmul_1.asm: Ditto.
18979
18980	* mpn/x86/x86-defs.m4 (defframe_empty_if_zero): Eval the argument.
18981	(cmovCC): New macros, replacing individual cmovCC_reg_reg forms.
18982	(Zdisp): Recognise more instructions.
18983	(shldl,etc): Use m4_instruction_wrapper().
18984	(ASSERT, movl_text_address): New macros.
18985
18986	* mpn/asm-defs.m4: Add remarks on SunOS /usr/bin/m4 and new
18987	OpenBSD m4.
18988	(m4_assert_numargs_internal_check): Remove a spurious parameter.
18989	(m4_empty_if_zero): Eval the argument.
18990	(m4_assert, m4_assert_numargs_range, m4_config_gmp_mparam,
18991	m4_instruction_wrapper): New macros.
18992
189932000-05-04  Linus Nordberg  <linus@swox.se>
18994
18995	* gmp.texi (Reporting Bugs): Be explicit about output from running
18996	a command.
18997
189982000-05-02  Torbjorn Granlund  <tege@swox.com>
18999
19000	* mpn/generic/bz_divrem_n.c (mpn_bz_divrem_n): Handle non-zero return
19001	from first mpn_bz_div_3_halves_by_2 call.
19002	(mpn_bz_divrem_aux): Likewise.
19003
190042000-04-30  Kevin Ryde  <kevin@swox.se>
19005
19006	* tune/* (GCD_ACCEL_THRESHOLD, GCDEXT_THRESHOLD): Tune these.
19007
19008	* mpn/generic/gcdext.c (GCDEXT_THRESHOLD): Rename from THRESHOLD,
19009	use with >=, adjust default to 17 accordingly.
19010	Use new *_SWAP macros.
19011
19012	* mpn/generic/gcd.c (GCD_ACCEL_THRESHOLD): Rename from
19013	ACCEL_THRESHOLD, use with >=, adjust default to 5 accordingly.
19014	Use new *_SWAP macros.
19015
19016	* mpf/get_str.c, mpf/set_str.c, mpf/sub.c, mpz/add.c, mpz/ior.c,
19017	mpz/and.c, mpz/sub.c, mpz/xor.c, mpz/ui_pow_ui.c,
19018	mpn/generic/mul.c: Use new *_SWAP macros.
19019
19020	* stack-alloc.h: Add extern "C" around prototypes.
19021
19022	* gmp-impl.h: (MP_PTR_SWAP, etc): New macros.
19023	(_mp_allocate_func, etc): Use _PROTO.
19024	[TUNE_PROGRAM_BUILD]: More changes in tune program build part.
19025
190262000-04-28  Torbjorn Granlund  <tege@swox.com>
19027
19028	* mpn/pa64/add_n.s: Add `,entry' to export directive.
19029	* mpn/pa64/addmul_1.S, mpn/pa64/lshift.s, mpn/pa64/mul_1.S,
19030	mpn/pa64/rshift.s, mpn/pa64/sub_n.s, mpn/pa64/submul_1.S,
19031	mpn/pa64/umul_ppmm.S: Likewise.
19032	* mpn/hppa/hppa1_1/udiv_qrnnd.S: New name for udiv_qrnnd.s.
19033	Add PIC support.
19034
190352000-04-29  Kevin Ryde  <kevin@swox.se>
19036
19037	* gmp-impl.h [TUNE_PROGRAM_BUILD] (TOOM3_MUL_THRESHOLD_LIMIT): New
19038	define.
19039	* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Use
19040	TOOM3_MUL_THRESHOLD_LIMIT, not a hard coded 500.
19041
19042	* memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
19043	* stack-alloc.c: Don't use C++ reserved word "this".
19044	* urandom.h: Put extern "C" around prototypes.
19045	* mpz/powm.c: Switch a couple of parameters to "const", which they
19046	are, to satisfy g++.
19047
19048	* randraw.c, stack-alloc.c, mpbsd/mout.c, mpbsd/mtox.c: Add casts to
19049	help g++.
19050
19051	* stack-alloc.c: Provide dual ANSI/K&R function definitions.
19052	* mpz/addmul_ui.c,get_d.c,inp_str.c,perfpow.c,powm.c,pprime_p.c,
19053	rrandomb.c,set_str.c,ui_pow_ui.c: Ditto.
19054	* mpf/integer.c,set_str.c: Ditto.
19055	* mpbsd/min.c,xtom.c: Ditto.
19056	* mpn/generic/bz_divrem_n.c,dump.c,gcd_1.c,get_str.c,hamdist.c,
19057	popcount.c,random.c,random2.c,set_str.c: Ditto.
19058
19059	* rand.c: Use <stdio.h> for NULL.
19060	* mpz/gcd_ui.c,gcdext.c,mul.c,perfpow.c,powm_ui.c,root.c,sqrt.c,
19061	sqrtrem.c: Ditto
19062	* mpf/sqrt.c,sqrt_ui.c: Ditto.
19063	* mpn/generic/perfsqr.c,sqrtrem.c: Ditto.
19064
19065	* gmp-impl.h (NULL, malloc, realloc, free): Don't define/declare.
19066	(extern "C"): Add around function prototypes.
19067	(mpn_kara_mul_n, mpn_kara_sqr_n, mpn_toom3_mul_n, mpn_toom3_sqr_n):
19068	Add prototypes.
19069	[TUNE_PROGRAM_BUILD] (FIB_THRESHOLD): Add necessary redefinitions for
19070	use by tune program.
19071	* mpn/generic/mul_n.c: Remove mpn_toom3_mul_n prototype.
19072
19073	* acinclude.m4 (GMP_C_ANSI2KNR): New macro.
19074	(GMP_CHECK_ASM_MMX, GMP_CHECK_ASM_SHLDL_CL): Fix to use
19075	$gmp_cv_check_asm_text which is what GMP_CHECK_ASM_TEXT sets.
19076	* configure.in (GMP_C_ANSI2KNR): Use this instead of AM_C_PROTOTYPES,
19077	for reasons described with its definition.
19078
19079	* demos/Makefile.am (ansi2knr): Use $(top_builddir) nor $(top_srcdir).
19080
19081	* mpz/fib_ui.c (FIB_THRESHOLD): Rename from FIB_THRES, for consistency.
19082	(FIB_THRESHOLD): Conditionalize so gmp-mparam.h can define a value.
19083	(mpz_fib_bigcase): Use >= FIB_THRESHOLD, same as main mpz_fib_ui.
19084	* tune/tuneup.c,Makefile.am (FIB_THRESHOLD): Tune this.
19085
19086	* configure.in (*-*-aix* gmp_m4postinc): Fix setting (don't overwrite
19087	a value just stored).
19088
190892000-04-26  Kevin Ryde  <kevin@swox.se>
19090
19091	* mpn/sparc32/udiv_fp.asm: Use mpn_udiv_qrnnd macro.
19092	* mpn/sparc32/udiv_nfp.asm: Ditto.
19093	* mpn/sparc32/v8/supersparc/udiv.asm: Ditto.
19094	* mpn/sparc32/umul.asm: Name the function mpn_umul_ppmm.
19095	* mpn/sparc32/v8/umul.asm: Ditto.
19096	* mpn/powerpc32/umul.asm: Ditto.
19097
19098	* mpn/x86/syntax.h: Remove file, since now unused.
19099
19100	* configure.in (x86): Remove -DBROKEN_ALIGN and -DOLD_GAS
19101	previously used by .S files.
19102	(x86 extra_functions): Add udiv and umul.
19103	(GMP_PROG_M4): Use this instead of AC_CHECK_PROG(M4,m4,...)
19104	(HAVE_NATIVE_*): Loosen up the regexp to "PROLOGUE.*" so as to
19105	accept PROLOGUE_GP on alpha.
19106
19107	* acconfig.h (HAVE_NATIVE_mpn_umul_ppmm, udiv_qrnnd, invert_limb):
19108	New template defines.
19109	* mpn/asm-defs.m4 (mpn_umul_ppmm, mpn_udiv_qrnnd): New define_mpn()s.
19110	* longlong.h (umul_ppmm, udiv_qrnnd): Use a library version if
19111	it's available and an asm macro isn't.
19112	* gmp-impl.h (invert_limb): Ditto.
19113
19114	* gmp-impl.h (ASSERT_NOREALLOC): Not a good idea, remove it.
19115
19116	* acinclude.m4 (GMP_PROG_M4): New macro.
19117
191182000-04-25  Linus Nordberg  <linus@swox.se>
19119
19120	* gmp.texi (Random State Initialization): Correct arguments to
19121	`gmp_randinit'.
19122
19123	* acinclude.m4 (GMP_VERSION): Change `eval' --> `m4_eval'.  Fix
19124	from Kevin.
19125	* aclocal.m4: Regenerate.
19126
191272000-04-25  Kevin Ryde  <kevin@swox.se>
19128
19129	* mpn/x86/aors_n.asm: Remove parentheses around an immediate that
19130	Solaris "as" doesn't like, change by Torbjorn.
19131
191322000-04-24  Kevin Ryde  <kevin@swox.se>
19133
19134	* configure.in (AC_CHECK_FUNCS): Add strtoul.
19135
19136	* mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Bigger
19137	array for karatsuba temporary space for tune program build.
19138	(mpn_toom3_sqr_n) Remove an unused variable.
19139
19140	* demos/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
19141	Add "allprogs:" pseudo-target.
19142	* demos/factorize.c, demos/isprime.c: Switch to ANSI functions,
19143	rely on ansi2knr.
19144
19145	* gmp.texi (Getting the Latest Version of GMP): Add reference to
19146	ftp.gnu.org mirrors list.
19147	* INSTALL: Add arg count check to example programs.
19148
19149	* mpn/x86/*/*.asm: Convert to FORTRAN ... or rather to
19150	FORTRAN-style "C" commenting to support Solaris "as".
19151	* mpn/x86/x86-defs.m4: Ditto, and add another Zdisp insn.
19152	* mpn/asm-defs.m4 (C): Update comments.
19153	* mpn/x86/README.family: Add a note on commenting, remove
19154	description of .S files.
19155
19156	* mpn/sparc64/addmul_1.asm, mul_1.asm, submul_1.asm: Use
19157	include_mpn().
19158
191592000-04-23  Torbjorn Granlund  <tege@swox.com>
19160
19161	* config.sub: Merge with FSF version of April 23.
19162
19163	* mpn/powerpc32: Use dnl/C instead of `#' for comments.
19164
19165	* config.guess: Get "model" limit between pentium 2 and pentium3 right.
19166	Get rid of code determining `_' prefix; use double labels instead.
19167	* config.guess: Partially merge with FSF version of April 22.
19168	(Don't bring over NetBSD changes for now.)
19169
191702000-04-23  Kevin Ryde  <kevin@swox.se>
19171
19172	* tune/Makefile.am, tune/README, tune/common.c, tune/rdtsc.asm,
19173	tune/speed.c, tune/speed.h, tune/time.c, tune/tuneup.c: New files.
19174	* tune/Makefile.in: New file, generated from Makefile.am.
19175
19176	* gmp-impl.h (ASSERT_NOREALLOC,TMP_ALLOC_LIMBS): New macros.
19177	[TUNE_PROGRAM_BUILD] Further mods for tune program builds.
19178
19179	* mpz/Makefile.am: Add -DOPERATION_$* for new mul_siui.c.
19180	Add rules to build mul_si and mul_ui from a common mul_siui.c.
19181	* mpz/mul_siui.c: New file, derived from and replacing mul_ui.c.
19182	* gmp.h (mpz_mul_si): New prototype and define.
19183
19184	* mpn/tests/*.c [__i386__] (CLOCK): Don't use floating point in
19185	CLOCK because cpp can't handle floats in #if's (TIMES is derived
19186	from CLOCK by default).
19187
19188	* mpn/asm-defs.m4 (include_mpn): New macro.
19189	(m4_assert_numargs) Changes to implementation.
19190
19191	* mpf/Makefile.am: Add -DOPERATION_$* for new integer.c.
19192	Remove explicit rules for floor.o etc.
19193	* mpf/integer.c: Use OPERATION_$* for floor/ceil/trunc.
19194
19195	* mpn/Makefile.am: Put "tests" in SUBDIRS.
19196	* mpn/tests/Makefile.am: New file providing rules to build test
19197	programs, nothing done in a "make all" or "make check" though.
19198	* mpn/tests/README: New file.
19199
19200	* acconfig.h (HAVE_PENTIUM_RDTSC): New define.
19201
19202	* configure.in (x86): Rearrange target cases.
19203	Add mulfunc aors_n and aorsmul_1 for x86 and pentium (now all x86s).
19204	Remove asm-syntax.h generation not needed.
19205	Remove now unused family=x86.
19206	(sparc) Remove unused family=sparc.
19207	(HAVE_PENTIUM_RDTSC) New AC_DEFINE and AM_CONDITIONAL.
19208	(AM_C_PROTOTYPES) New test, supporting ansi2knr.
19209	(AC_CHECK_HEADERS) Add getopt.h, unistd.h and sys/sysctl.h for
19210	tune progs.
19211	(AC_CHECK_FUNCS) Add getopt_long, sysconf and sysctlbyname for
19212	tune progs.
19213	(config.m4 CONFIG_TOP_SRCDIR) Renamed from CONFIG_SRCDIR.
19214	(config.m4 asm-defs.m4) Use CONFIG_TOP_SRCDIR and include().
19215	(gmp_m4postinc) Use include_mpn().
19216	(gmp_links) Omit asm-defs.m4/asm.m4 and gmp_m4postinc's.
19217	(MULFUNC_PROLOGUE) Fix regexps so all functions get AC_DEFINE'd.
19218	(PROLOGUE) Ditto (native copyi and copyd were unused in gmp 3).
19219	(KARATSUBA_SQR_THRESHOLD) Copy from gmp-mparam.h into config.m4.
19220	(AC_OUTPUT) Add tune/Makefile, mpn/tests/Makefile.
19221
19222	* Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
19223	(SUBDIRS): Add tune, reorder directories.
19224	(MPZ_OBJECTS): Add mpz/mul_si.lo.
19225	(libmp_la_SOURCES): Use this for top-level objects, not .lo's.
19226	* ansi2knr.c, ansi2knr.1: New files, provided by automake.
19227
19228	* mpn/x86/aors_n.asm: Convert add_n.S and sub_n.S to a
19229	multi-function aors_n.asm, no object code change.
19230	* mpn/x86/pentium/aors_n.asm: Ditto.
19231	* mpn/x86/aorsmul_1.asm: Ditto for addmul/submul.
19232	* mpn/x86/pentium/aorsmul_1.asm: Ditto.
19233
19234	* mpn/x86/lshift.asm, mpn/x86/mul_1.asm, mpn/x86/mul_basecase.asm,
19235	mpn/x86/rshift.asm: Convert from .S, no object code change.
19236	* mpn/x86/pentium/lshift.asm, mpn/x86/pentium/mul_1.asm,
19237	mpn/x86/pentium/mul_basecase.asm, mpn/x86/pentium/rshift.asm: Ditto.
19238
19239	* gmp.texi (Reporting Bugs): Itemize the list of things to include.
19240	(Miscellaneous Float Functions): Correct typo in mpf_ceil etc
19241	argument types.
19242	Change @ifinfo -> @ifnottex for benefit of makeinfo --html.
19243	Remove unnecessary @iftex's around @tex.
19244
192452000-04-22  Torbjorn Granlund  <tege@swox.com>
19246
19247	* config.guess: Generalize x86 cpu determination code.
19248	Now works on Solaris.
19249
19250	* mpz/nextprime.c: Rewrite still disabled code.
19251
19252	* configure.in: Specifically match freebsd[3-9].
19253
192542000-04-21  Torbjorn Granlund  <tege@swox.com>
19255
19256	* rand.c: Call mpz_clear for otherwise leaking mpz_t.
19257
19258	* mpz/pprime_p.c (mpz_probab_prime_p): Merge handling of negative
19259	n into code for handling small positive n.  Merge variables m and n.
19260	After dividing, simply call mpz_millerrabin.
19261	(isprime): Local variables now use attribute `long'.
19262	(mpz_millerrabin): New static function, based on code from
19263	mpz_probab_prime_p.
19264	(millerrabin): Now simple workhorse for mpz_millerrabin.
19265
192662000-04-19  Torbjorn Granlund  <tege@swox.com>
19267
19268	* gmp-impl.h: Fix parenthesis error in test for __APPLE_CC__.
19269
192702000-04-18  Linus Nordberg  <linus@swox.se>
19271
19272	* NEWS: Add info about shared libraries.  Remove reference to
19273	gmp_randinit_lc.
19274
192752000-04-17  Torbjorn Granlund  <tege@swox.com>
19276
19277	* Version 3.0 released.
19278
19279	* mpn/arm/add_n.S: New version from Robert Harley.
19280	* mpn/arm/addmul_1.S: Likewise.
19281	* mpn/arm/mul_1.S: Likewise.
19282	* mpn/arm/sub_n.S: Likewise.
19283
19284	* gmp.h (__GNU_MP_VERSION_PATCHLEVEL): Now 0.
19285
192862000-04-17  Linus Nordberg  <linus@swox.se>
19287
19288	* configure.in (hppa2.0*-*-*): Pass `+O3' to cc/c89 in 64-bit mode
19289	to avoid compiler bug.
19290	(ns32k*-*-*): Fix typo in path.  Change by Kevin.
19291	(alpha*-*-osf*): New case.  Pass assembly flags for architecture
19292	to gcc.
19293	(alpha*-*-*): Don't bother searching for cc.
19294	* configure: Regenerate.
19295
19296	* Makefile.am (EXTRA_DIST): Add `macos', `.gdbinit'.
19297	* Makefile.in: Regenerate.
19298	* mpn/Makefile.am (EXTRA_DIST): Add `m88k', `lisp'.
19299	* mpn/Makefile.in: Regenerate.
19300
193012000-04-16  Kevin Ryde  <kevin@swox.se>
19302
19303	* README: Updates, and don't duplicate the example in INSTALL.
19304	* INSTALL: Minor updates.
19305	* gmp.texi (Installing MP): Minor edits, restore CC/CFLAGS description.
19306
193072000-04-16  Linus Nordberg  <linus@swox.se>
19308
19309	* configure.in (*-*-cygwin*): Select BSD_SYNTAX to avoid
19310	.type/.size in PROLOGUE for ELF_SYNTAX.  Override ALIGN definition
19311	from x86/syntax.h.
19312	(gmp_xoptcflags_${CC}): New set of variables, indicating
19313	``exclusive optional cflags''.
19314	(most sparcs): Use gmp_xoptcflags instead of gmp_optcflags to
19315	ensure that we pass CPU type to older gcc.
19316	(CFLAGS): CFLAGS on the command line was spoiled.
19317	* configure: Regenerate.
19318
193192000-04-16  Linus Nordberg  <linus@swox.se>
19320
19321	* configure.in: Invoke AC_PROG_LIBTOOL directly.
19322
19323	* acinclude.m4 (GMP_PROG_CC_FIND): Quote source variable when
19324	setting CC64 and CFLAGS64.
19325	(GMP_PROG_CC_SELECT): Cache result.
19326	(GMP_PROG_LIBTOOL): Remove.
19327
19328	* aclocal.m4: Regenerate.
19329	* configure: Regenerate.
19330
193312000-04-16  Linus Nordberg  <linus@swox.se>
19332
19333	* tests/rand/t-rand.c (main): Add non-ANSI function declaration.
19334	Don't use `const'.
19335
193362000-04-16  Torbjorn Granlund  <tege@swox.com>
19337
19338	* mpn/generic/dump.c: Suppress output of leadign zeros.
19339
19340	* mpz/inp_str.c: Fix memory leakage.
19341
19342	* mpz/tests/reuse.c (dss_func_division): Add a final 1.
19343
19344	* longlong.h (alpha count_leading_zeros): Wrap in __MPN.
19345	* mpn/alpha/cntlz.asm: Use __gmpn prefix (by means of __MPN).
19346
19347	* longlong.h (__umul_ppmm, __udiv_qrnnd): Wrap in __MPN.
19348	* mpn/alpha/udiv_qrnnd.S: Use __gmpn prefix.
19349	* mpn/hppa/udiv_qrnnd.s: Likewise.
19350	* mpn/hppa/hppa1_1/udiv_qrnnd.s: Likewise.
19351	* mpn/pa64/udiv_qrnnd.c: Likewise (by means of __MPN).
19352	* mpn/pa64/umul_ppmm.S: Likewise.
19353	* mpn/sparc32/udiv_fp.asm: Likewise (by means of MPN).
19354	* mpn/sparc32/udiv_nfp.asm: Likewise (by means of MPN).
19355	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise (by means of MPN).
19356
19357	* mpn/generic/tdiv_qr.c: Work around gcc 2.7.2.3 i386 register handling
19358	bug.
19359
19360	* mpn/generic/tdiv_qr.c: Use udiv_qrnnd instead of mpn_divrem_1
19361	when computing appropriate quotient; mpn_divrem_1 writes too
19362	many quotient limbs.
19363
19364	* mpn/asm-defs.m4: invert_normalized_limb => invert_limb.
19365	* mpn/alpha/invert_limb.asm: mpn_invert_normalized_limb =>
19366	mpn_invert_limb.
19367	* gmp.h: Likewise.
19368	* gmp-impl.h (alpha specific): invert_normalized_limb => invert_limb;
19369	wrap with __MPN.
19370	* longlong.h (alpha udiv_qrnnd): Likewise.
19371
193722000-04-16  Kevin Ryde  <kevin@swox.se>
19373
19374	* gmp.h (mp_set_memory_functions,mp_bits_per_limb,gmp_errno): Add
19375	#defines so the library symbols are __gmp_*.
19376	* errno.c: Include gmp.h.
19377	* gmp-impl.h (_mp_allocate_func,etc): Add #defines to __gmp_*.
19378	(__clz_tab): New #define to __MPN(clz_tab).
19379	* stack-alloc.c (__gmp_allocate_func,etc): Change from _mp_*.
19380
19381	* Makefile.am (libmp_la_DEPENDENCIES): Add some mpz files needed
19382	for new mpz_powm (pow in libmp).
19383	(EXTRA_DIST): Add projects directory.
19384
19385	* mpn/*: Change __mpn to __gmpn.
19386	* gmp.h (__MPN): Ditto.
19387	* stack_alloc.c,stack-alloc.h: Change __tmp to __gmp_tmp.
19388
19389	* mpn/generic/sb_divrem_mn.c (mpn_sb_divrem_mn): Avoid gcc 2.7.2.3
19390	i386 register handling bug (same as previously in mpn_divrem_classic).
19391
19392	* mpn/generic/divrem.c: Now contains mpn_divrem, which is not an
19393	internal function, so remove warning comment.
19394
19395	* gmp.texi (Compatibility with Version 2.0.x): Source level only.
19396
193972000-04-16  Linus Nordberg  <linus@swox.se>
19398
19399	* configure.in (hppa1.0*): Prefer c89 to cc.
19400	* configure: Regenerate.
19401
194022000-04-15  Linus Nordberg  <linus@swox.se>
19403
19404	* configure.in: If `mpn_path' is set by user on configure command
19405	line, use that as path.
19406	* configure: Regenerate.
19407
194082000-04-15  Linus Nordberg  <linus@swox.se>
19409
19410	* configure.in (hppa2.0*): Use path "hppa/hppa1_1 hppa" if no
19411	64-bit compiler was found.
19412	* configure: Regenerate.
19413
194142000-04-15  Linus Nordberg  <linus@swox.se>
19415
19416	* configure.in: Honor `CC' and `CFLAGS' set by user on configure
19417	command line.
19418	* acinclude.m4: (GMP_PROG_CC_SELECT): Set CFLAGS if not set already.
19419	* aclocal.m4: Regenerate.
19420	* configure: Regenerate.
19421
194222000-04-15  Linus Nordberg  <linus@swox.se>
19423
19424	* acinclude.m4 (GMP_PROG_CC_FIND): Remove debug output.  Remove
19425	commented out code.
19426	* aclocal.m4: Regenerate.
19427	* configure: Regenerate.
19428
19429	* configure.in: Make all `-mcpu' options to gcc optional.
19430	* configure: Regenerate.
19431
19432	* tests/rand/Makefile.am: Don't do anything for target 'all'.
19433	* tests/rand/Makefile.in: Regenerate.
19434
194352000-04-15  Kevin Ryde  <kevin@swox.se>
19436
19437	* README: Small updates.
19438	* NEWS: Add some things about 3.0.
19439
19440	* mpz/Makefile.am (EXTRA_DIST): Remove dmincl.c.
19441
19442	* Makefile.am: Use -version-info on libraries, not -release.
19443
19444	* mpz/tdiv_qr.c: Add mdiv function header #ifdef BERKELEY_MP.
19445	* mpbsd/Makefile.am: Use mpz/tdiv_qr.c, not mdiv.c.
19446	* Makefile.am (MPBSD_OBJECTS): Change mdiv.lo to tdiv_qr.lo.
19447	(libmp_la_DEPENDENCIES): Add mp_clz_tab.lo.
19448	* mpbsd/mdiv.c: Remove file.
19449
19450	* config/mt-linux,mt-m68k,mt-m88110,mt-ppc,mt-ppc64-aix,mt-pwr,
19451	mt-sprc8-gcc,mt-sprc9-gcc,mt-supspc-gcc,mt-vax,mt-x86,
19452	mpn/config/mt-pa2hpux,mt-sprc9,t-oldgas,t-ppc-aix,t-pwr-aix:
19453	Remove configure fragments not used since change to autoconf.
19454
19455	* mpn/generic/bz_divrem_n.c,sb_divrem_mn.c: Add comment that
19456	internal functions are changeable and shouldn't be used directly.
19457
194582000-04-15  Linus Nordberg  <linus@swox.se>
19459
19460	* configure.in: Remove debug output.
19461	* configure: Regenerate.
19462
194632000-04-15  Torbjorn Granlund  <tege@swox.com>
19464
19465	* mpn/generic/tdiv_qr.c: Don't use alloca directly.
19466
19467	* mpz/tdiv_qr.c: Fix typo.
19468	* mpz/tdiv_r.c: Fix typo.
19469	* mpz/tdiv_q.c: Fix typo.
19470
19471	* configure.in: Disable -march=pentiumpro due to apparent compiler
19472	problems.
19473
19474	* mpz/powm.c: Replace with new code from Paul Zimmermann.
19475
19476	* mpz/tdiv_q.c: Remove debug code.
19477
19478	* mpn/generic/divrem.c: Remove C++ style `//' commented-out code.
19479	* mpn/generic/sb_divrem_mn.c: Likewise.
19480
194812000-04-14  Torbjorn Granlund  <tege@swox.com>
19482
19483	* mpz/cdiv_q.c: Change temp allocation for new requirements of
19484	mpz_tdiv_qr.
19485	* mpz/fdiv_q.c: Likewise.
19486
19487	* mpn/sparc64/gmp-mparam.h: Set up parameters for TOOM3.
19488
19489	* mpz/dmincl.c: Delete file.
19490	* mpz/tdiv_qr.c: Rewrite using mpn_tdiv_qr.
19491	* mpz/tdiv_r.c: Likewise.
19492	* mpz/tdiv_q.c: Likewise.
19493
19494	* mpn/generic/tdiv_qr.c: New file.
19495	* mpn/generic/bz_divrem_n.c: New file.
19496	* mpn/generic/sb_divrem_mn.c: New file.
19497
19498	* gmp-impl.h (MPZ_REALLOC): New macro.
19499	(mpn_sb_divrem_mn): Declare.
19500	(mpn_bz_divrem_n): Declare.
19501	(mpn_tdiv_qr): Declare.
19502
19503	* configure.in (gmp_mpn_functions): Delete divrem_newt and divrem_1n;
19504	add tdiv_qr, bz_divrem_n, and sb_divrem_mn.
19505	* mpn/generic/divrem_newt.c: Delete file.
19506	* mpn/generic/divrem_1n.c: Delete file.
19507
19508	* gmp.h (mpn_divrem_newton): Remove declaration.
19509	(mpn_divrem_classic): Remove declaration.
19510
19511	* gmp.h (mpn_divrem): Remove function definition.
19512	* mpn/generic/divrem.c: Replace mpn_divrem_classic with a
19513	mpn_divrem wrapper.
19514
195152000-04-14  Kevin Ryde  <kevin@swox.se>
19516
19517	* mpf/dump.c, mpz/dump.c, mpn/generic/dump.c,
19518	mpn/generic/divrem.c, mpn/generic/divrem_1n.c,
19519	mpn/generic/divrem_2.c, mpn/generic/divrem_newt.c,
19520	mpn/generic/mul.c, mpn/generic/mul_basecase.c,
19521	mpn/generic/mul_n.c, mpn/generic/sqr_basecase.c,
19522	mpn/generic/udiv_w_sdiv.c: Add comment that internal functions are
19523	changeable and shouldn't be used directly.
19524
19525	* mpq/div.c: Use DIVIDE_BY_ZERO (previously didn't get an
19526	exception on zero divisor).
19527
19528	* mpf/tests/t-get_d.c, mpz/tests/reuse.c: Add K&R function
19529	definitions.
19530	* mpz/tests/t-2exp.c: Don't use ANSI-ism 2ul.
19531
19532	* gmp.texi (Installing MP): Build problem notes for GSYM_PREFIX
19533	and ranlib on native SunOS.
19534	Particular systems notes about AIX and HPPA shared libraries
19535	disabled.
19536	(MP Basics): Add that undocumented things shouldn't be used.
19537	(Introduction to MP): Add to CPUs listed.
19538
19539	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Don't depend on C
19540	having "void".
19541
195422000-04-13  Linus Nordberg  <linus@swox.se>
19543
19544	* mpn/pa64/udiv_qrnnd.c (__udiv_qrnnd64): Add K&R function
19545	definition.
19546
19547	* configure.in: Disable shared libraries for hppa*.
19548	(mips-sgi-irix6.*): Fix flags for 64-bit gcc.
19549	(hppa2.0*-*-*): Prefer c89 to cc.
19550	* configure: Regenerate.
19551
19552	* gmp.h (gmp_randalg_t): Remove comma after last element.
19553
19554	* tests/rand/t-rand.c: Add copyright notice.
19555
195562000-04-13  Kevin Ryde  <kevin@swox.se>
19557
19558	* mpn/generic/mul_n.c, mpn/generic/gcdext.c, mpz/nextprime.c,
19559	mpz/remove.c, mpz/root.c: Add K&R function definitions.
19560	* mpz/rrandomb.c: Fix typo in K&R part.
19561	* stack-alloc.c: Add K&R style function pointer declarations.
19562
19563	* mpz/root.c: Use SQRT_OF_NEGATIVE on even roots of negatives.
19564	Use DIVIDE_BY_ZERO on a "zero'th" root.
19565
19566	* configure: Regenerate with autoconf backpatched to fix --srcdir
19567	absolute path wildcards that bash doesn't like, change by Linus.
19568
19569	* gmp.texi (Integer Arithmetic): Document mpz_nextprime.
19570	(Miscellaneous Integer Functions): Fix mpz_fits_* formatting.
19571	(Installing MP): Comment-out CC and CFLAGS description.
19572
195732000-04-13  Linus Nordberg  <linus@swox.se>
19574
19575	* rand.c (gmp_randinit): Don't combine va_alist with ordinary
19576	arguments for non STDC.
19577
195782000-04-13  Torbjorn Granlund  <tege@swox.com>
19579
19580	* mpz/nextprime.c: Use proper names of new random types and functions.
19581
19582	* mpz/rrandomb.c: New file.
19583	* mpz/Makefile.am: List it.
19584	* mpz/Makefile.in: Regenerate.
19585	* Makefile.am: Here too.
19586	* Makefile.in: Regenerate.
19587	* gmp.h: Declare mpz_rrandomb.
19588
195892000-04-12  Linus Nordberg  <linus@swox.se>
19590
19591	* Makefile.am, demos/Makefile.am, mpbsd/Makefile.am,
19592	mpbsd/tests/Makefile.am, mpf/Makefile.am, mpf/tests/Makefile.am,
19593	mpn/Makefile.am, mpq/Makefile.am, mpq/tests/Makefile.am,
19594	mpz/Makefile.am, mpz/tests/Makefile.am, tests/Makefile.am,
19595	tests/rand/Makefile.am (AUTOMAKE_OPTIONS): Add 'no-dependencies'.
19596
19597	* Makefile.in, demos/Makefile.in, mpbsd/Makefile.in,
19598	mpbsd/tests/Makefile.in, mpf/Makefile.in, mpf/tests/Makefile.in,
19599	mpn/Makefile.in, mpq/Makefile.in, mpq/tests/Makefile.in,
19600	mpz/Makefile.in, mpz/tests/Makefile.in, tests/Makefile.in,
19601	tests/rand/Makefile.in: Regenerate.
19602
196032000-04-12  Linus Nordberg  <linus@swox.se>
19604
19605	* randlc.c (gmp_randinit_lc): Disable function.
19606	* gmp.texi (Random State Initialization): Remove gmp_randinit_lc.
19607
19608	* acinclude.m4 (GMP_CHECK_CC_64BIT): Compiling an empty main
19609	successfully with `-n32' will have to suffice on irix6.
19610	* aclocal.m4: Regenerate.
19611
19612	* configure.in (sparc): Don't pass -D_LONG_LONG_LIMB to compiler.
19613	(mips-sgi-irix6.*): Use compiler option `-n32' rather than `-64'
19614	for 64-bit `cc'.  Add options for gcc.
19615	* configure: Regenerate.
19616
19617	* mpf/urandomb.c (mpf_urandomb): Add third parameter 'nbits'.  If
19618	'nbits' doesn't make even limbs, shift up result before
19619	normalizing.
19620
19621	* gmp.h (mpf_urandomb): Add parameter to prototype.
19622
19623	* mpf/urandom.c: Rename file to ...
19624	* mpf/urandomb.c: ... this.
19625	* Makefile.am (MPF_OBJECTS): Change urandom.lo --> urandomb.lo.
19626	* Makefile.in: Regenerate.
19627	* mpf/Makefile.am (libmpf_la_SOURCES): Change urandom.c --> urandomb.c.
19628	* mpf/Makefile.in: Regenerate.
19629
19630	* config.in: Regenerate for HAVE_DECL_OPTARG.
19631
19632	* randraw.c (_gmp_rand): Fix bug with _LONG_LONG_LIMB.
19633	(lc): Change return type.
19634	Use one temporary storage instead of two.
19635	Handle seed of size 0.
19636	Avoid modulus operation in some cases.
19637	Abort if M is not a power of 2.
19638	Fix bug with 64-bit limbs.
19639	Fix bug with small seed, small A and large M.
19640
19641	* tests/rand/gen.c (main): Include gmp.h.  Remove macros MIN, MAX.  Add
19642	option '-q'.  Don't demand argument N.  Change parameters in call
19643	to mpf_urandomb.
19644
19645	* tests/rand/t-rand.c: New file for testing random number generation.
19646
19647	* tests/rand/Makefile.am: Run t-rand for 'make check'.
19648	(test, bigtest): Rename to manual-test, manual-bigtest.
19649	* tests/rand/Makefile.in: Regenerate.
19650
196512000-04-12  Kevin Ryde  <kevin@swox.se>
19652
19653	* gmp-impl.h: Include config.h before TMP_ALLOC, so
19654	--disable-alloca works.
19655
19656	* mpbsd/Makefile.am: Don't recompile top-level sources here.
19657	* Makefile.am (libmp_la_DEPENDENCIES): Put objects here instead,
19658	add errno.lo and stack-alloc.lo.
19659
19660	* mpn/asm-defs.m4: Add a test and message for the unsuitable SunOS m4.
19661	* gmp.texi (Installing MP): Update note on SunOS m4 failure.
19662
19663	* acconfig.h: Add copyright notice using @TOP@.
19664
19665	* stack-alloc.c: Use _mp_allocate_func, not malloc.
19666	* gmp.texi (Installing MP): Note this under --disable-alloca.
19667
19668	* gmp.texi (Comparison Functions): mpz_cmp_abs => mpz_cmpabs.
19669	(Integer Arithmetic): mpz_prime_p not yet implemented, comment out.
19670	(Float Arithmetic): mpf_pow_ui now implemented, uncomment-out.
19671	(Miscellaneous Float Functions): Add mpf_ceil, mpf_floor, mpf_trunc.
19672	(Low-level Functions): Add mpn_random2, with mpn_random.
19673
19674	* mpn/m68k/mc68020/udiv.S: Rename from udiv.s.
19675	* mpn/m68k/mc68020/umul.S: Ditto.
19676
19677	* mpn/alpha/umul.asm: Rename from umul.s, remove .file and
19678	compiler identifiers.
19679
19680	* mpn/powerpc32/syntax.h: Removed, no longer used.
19681
19682	* mpn/a29k/udiv.s: Remove .file and compiler identifiers.
19683	* mpn/a29k/umul.s: Ditto.
19684
19685	* mpn/tests/ref.c: Use WANT_ASSERT.
19686	* mpn/tests/ref.h: Use _PROTO.
19687
19688	* mpbsd/configure.in: Removed, no longer required.
19689
19690	* mpf/div.c: Use DIVIDE_BY_ZERO.
19691	* mpf/div_ui.c: Ditto.
19692	* mpf/ui_div.c: Ditto.
19693	* mpq/inv.c: Ditto.
19694	* mpf/sqrt.c: Use SQRT_OF_NEGATIVE.
19695	* mpz/sqrt.c: Ditto.
19696	* mpz/sqrtrem.c: Ditto.
19697
19698	* gmp-impl.h (GMP_ERROR,SQRT_OF_NEGATIVE): New macros.
19699	(DIVIDE_BY_ZERO): Use GMP_ERROR.
19700	(__mp_bases): #define to __MPN(mp_bases).
19701
197022000-04-11  Linus Nordberg  <linus@swox.se>
19703
19704	* tests/rand/stat.c (main): Initialize `l1runs' at declaration.
19705
197062000-04-11  Kevin Ryde  <kevin@swox.se>
19707
19708	* mpz/fib_ui.c: Add K&R function definitions.
19709
19710	* mpbsd/tests/Makefile.am (TESTS): Add a dummy test to avoid a
19711	shell problem with an empty "for tst in $(TESTS) ; ...".
19712	* mpbsd/tests/dummy.c: New file.
19713
197142000-04-10  Torbjorn Granlund  <tege@swox.com>
19715
19716	* mpz/bin_uiui.c: Delete several unused variables.
19717	Add copyright notice.
19718	* mpz/bin_ui.c: Add copyright notice.
19719
19720	* longlong.h: Declare __count_leading_zeros for alpha.
19721
197222000-04-10  Linus Nordberg  <linus@swox.se>
19723
19724	* rand.c (gmp_randinit): Change parameter list to (rstate, alg, ...).
19725	* gmp.h: Change prototype accordingly.
19726	* mpz/pprime_p.c (millerrabin): Change call accordingly.
19727
19728	* configure.in: Check for `optarg'.
19729	* configure: Regenerate.
19730
19731	* mpn/Makefile.am: Remove incorrect comment.
19732	* mpn/Makefile.in: Regenerate.
19733
19734	* gmp.h: Rename most of the random number functions, structs and
19735	  some of the struct members.
19736	* rand.c (gmp_randinit): Likewise.
19737	* randclr.c (gmp_randclear): Likewise.
19738	* randlc.c (gmp_randinit_lc): Likewise.
19739	* randlc2x.c (gmp_randinit_lc_2exp): Likewise.
19740	* randraw.c (lc): Likewise.
19741	(_gmp_rand_getraw): Likewise.
19742	* randsd.c (gmp_randseed): Likewise.
19743	* randsdui.c (gmp_randseed_ui): Likewise.
19744	* gmp.texi: Likewise.
19745
19746	* gmp.texi: Use three hyphens for a dash.
19747	(Low-level Functions): Remove documentation for gmp_rand_getraw.
19748	(Random Number Functions): Add info on where to find documentation
19749	on the random number functions.
19750
19751	* tests/rand/Makefile.am (test, bigtest): Quote argument to grep.
19752	* tests/rand/Makefile.in: Regenerate.
19753
19754	* tests/rand/gen.c: Declare optarg, optind, opterr if not already
19755	declared.
19756	(main): Use new names for the random stuff.
19757	(main): Don't use strtoul() if we don't have it.  Use strtol()
19758	instead, if we have it.  Otherwise, use atoi().
19759	(main): Use srandom/srandomdev for __FreeBSD__ only.
19760	(main): Use new parameter order to gmp_randinit().
19761
19762	* tests/rand/stat.c: Declare optarg, optind, opterr if not already
19763	declared.
19764
197652000-04-10  Torbjorn Granlund  <tege@swox.com>
19766
19767	* mpz/pprime_p.c: Pass 0L for mpz_scan1.  mpz_mmod => mpz_mod.
19768	(millerrabin): Use new random interface.
19769	(millerrabin): ... and don't forget to call gmp_randclear.
19770
19771	* mpz/nextprime.c: New file.
19772	* gmp.h: Declare mpz_nextprime.
19773	* mpz/Makefile.am: List nextprime.c.
19774	* mpz/Makefile.in: Regenerate.
19775	* Makefile.am: List mpz/nextprime.lo.
19776	* Makefile.in: Regenerate.
19777
197782000-04-10  Kevin Ryde  <kevin@swox.se>
19779
19780	* move-if-change, mpz/tests/move-if-change, mpq/tests/move-if-change,
19781	mpf/tests/move-if-change: Remove, no longer used.
19782
19783	* Makefile.am (SUBDIRS): Add tests, demos, mpbsd.
19784	(libmp.la): New target, conditional on WANT_MPBSD.
19785	(libgmp_la_LIBADD): Add -lm.
19786	(AUTOMAKE_OPTIONS): Add check-news.
19787	(include_HEADERS): Setup to install gmp.h and possibly mp.h.
19788	(DISTCLEANFILES): Add generated files.
19789	(check): Remove explicit target (now uses check-recursive).
19790
19791	* configure.in: Use AM_CONFIG_HEADER.
19792	Add --enable-mpbsd setting automake conditional WANT_MPBSD.
19793	Output demos/Makefile, mpbsd/Makefile and mpbsd/tests/Makefile.
19794
19795	* mpz/Makefile.am: Add SUBDIRS=tests, shorten INCLUDES since now
19796	using AM_CONFIG_HEADER.
19797	* mpq/Makefile.am: Ditto.
19798	* mpf/Makefile.am: Ditto, and add DISTCLEANFILES.
19799	* mpn/Makefile.am: Shorten INCLUDES, amend some comments.
19800	* mpz/tests/Makefile.am: Use TESTS and $(top_builddir).
19801	* mpf/tests/Makefile.am: Ditto.
19802	* mpq/tests/Makefile.am: Ditto.
19803	* demos/Makefile.am: New file.
19804
19805	* mpbsd/Makefile.am: New file, derived from old mpbsd/Makefile.in.
19806	* mpbsd/Makefile.in: Now generated from Makefile.am.
19807	* mpbsd/realloc.c: Removed, use mpz/realloc.c instead.
19808	* mpbsd/tests/Makefile.am: New file.
19809	* mpbsd/tests/Makefile.in: New file, generated from Makefile.am.
19810	* mpbsd/tests/allfuns.c: New file.
19811
19812	* gmp.texi (Top): Use @ifnottex, to help makeinfo --html.
19813	(Installing MP): Describe --enable-mpbsd and demo programs.
19814
19815	* tests/rand/statlib.c: mpz_cmp_abs => mpz_cmpabs.
19816
19817	* tests/rand/Makefile.am (LDADD): Don't need -lm (now in libgmp.la).
19818	(EXTRA_PROGRAMS): Not noinst_PROGRAMS.
19819	(INCLUDES): Shorten to -I$(top_srcdir) now using AM_CONFIG_HEADER.
19820
198212000-04-09  Torbjorn Granlund  <tege@swox.com>
19822
19823	* mpz/urandomm.c: Get type of count right.
19824	Simplify computation of nbits.
19825
198262000-04-08  Torbjorn Granlund  <tege@swox.com>
19827
19828	* mpz/urandomb.c: Fix reallocation condition.
19829	Simplify size computation.
19830
198312000-04-08  Linus Nordberg  <linus@swox.se>
19832
19833	* acinclude.m4 (GMP_CHECK_CC_64BIT): Add special handling for
19834	HPUX.
19835	(GMP_CHECK_ASM_W32): Ditto.
19836	* aclocal.m4: Regenerate.
19837
19838	* mpn/Makefile.am: Use $(CCAS) for assembling.
19839	(.asm.obj): Add rule.
19840	* mpn/Makefile.in: Regenerate.
19841
19842	* gmp.texi (Miscellaneous Integer Functions): Fix typos.
19843
19844	* configure.in: Never pass `-h' to grep.
19845	(mips-sgi-irix6.[2-9]*): Try to find 64-bit compiler.
19846	(hppa1.0*-*-*): New flag for cc.
19847	(hppa2.0*-*-*): Try to find 64-bit compiler.  Chose path, set
19848	CCAS.
19849	* configure: Regenerate.
19850
198512000-04-08  Torbjorn Granlund  <tege@swox.com>
19852
19853	* mpz/bin_ui.c: Don't depend on ANSI C features.
19854	* mpz/bin_uiui.c: Likewise.
19855
19856	* Makefile.am (MPZ_OBJECTS): mpz/cmp_abs* => mpz/cmpabs*.
19857	(MPQ_OBJECTS): Add mpq/set_d.lo.
19858	(MPZ_OBJECTS): Add mpz/fits*.lo.
19859	* Makefile.in: Regenerate.
19860
19861	* mpz/cmpabs.c: New name for mpz/cmp_abs.c.
19862	* mpz/cmpabs_ui.c: New name for mpz/cmp_abs_ui.c.
19863	* mpz/Makefile.am: Corresponding changes.
19864	* mpz/Makefile.in: Regenerate.
19865	* gmp.h: mpz_cmp_abs* => mpz_cmpabs*.
19866
19867	* mpz/addmul_ui.c (mpn_neg1): Don't depend on ANSI C features.
19868
19869	* mpz/invert.c: Use TMP_MARK since we invoke MPZ_TMP_INIT.
19870
19871	* gmp.h (mpq_set_d): Declare correctly.
19872	(mpz_root): Use _PROTO.
19873	(mpz_remove): Use _PROTO.
19874	(mpf_pow_iu): Use _PROTO.
19875
19876	* mpn/asm-defs.m4 (MPN_PREFIX): Revert previous change.
19877	* gmp.h (__MPN): Revert previous change.
19878
19879	* mpz/perfpow.c: De-ANSI-fy.  Add copyright notice.
19880
19881	* mpz/set_d.c: Misc cleanups.
19882
19883	* mpq/set_d: New file.
19884	* gmp.h: Declare mpq_set_d.
19885	* mpq/Makefile.am: List set_d.c.
19886	* mpq/Makefile.in: Regenerate.
19887
198882000-04-07  Torbjorn Granlund  <tege@swox.com>
19889
19890	* mpz/fits_sint_p.c: New file.
19891	* mpz/fits_slong_p.c: New file.
19892	* mpz/fits_sshort_p.c: New file.
19893	* mpz/fits_uint_p.c: New file.
19894	* mpz/fits_ulong_p.c: New file.
19895	* mpz/fits_ushort_p.c: New file.
19896	* gmp.h: Declare mpz_fits_*.
19897	* mpz/Makefile.am: List fits_* files.
19898	* mpz/Makefile.in: Regenerate.
19899
199002000-04-06  Kevin Ryde  <kevin@swox.se>
19901
19902	* gmp.texi (Installing MP): Add known build problem SunOS 4.1.4 m4
19903	failure.
19904
19905	* mpn/x86/pentium/gmp-mparam.h: Tune thresholds.
19906	* mpn/x86/p6/gmp-mparam.h: Ditto.
19907	* mpn/x86/k6/gmp-mparam.h: Tune thresholds, add UMUL_TIME, UDIV_TIME.
19908	* mpn/x86/k7/gmp-mparam.h: Tune thresholds, amend UMUL_TIME.
19909
19910	* mpn/generic/mul_n.c (mpn_kara_mul_n): Add an ASSERT.
19911	(mpn_kara_sqr_n): Add an ASSERT, use KARATSUBA_SQR_THRESHOLD.
19912	(mpn_toom3_sqr_n): Eliminate second evaluate3.
19913
19914	* gmp-impl.h (mpn_com_n,MPN_LOGOPS_N_INLINE): Don't allow size==0.
19915	(tune_mul_threshold,tune_sqr_threshold): Conditionalize
19916	declarations on TUNE_PROGRAM_BUILD.
19917
19918	* mpn/generic/sqr_basecase.c: Add an assert.
19919
199202000-04-05  Torbjorn Granlund  <tege@swox.com>
19921
19922	* gmp.h, mpn/asm-defs.m4: List the same functions for __MPN, but
19923	leave some commented out.
19924
19925	* gmp-impl.h (MPN_LOGOPS_N_INLINE): Optimize.
19926	(mpn_com_n): Optimize.
19927
19928	* gmp.h (__MPN): Make it use __gmpn instead of __mpn for consistency.
19929	* mpn/asm-defs.m4 (MPN_PREFIX): Likewise.
19930
19931	* gmp.h (GMP_ERROR_ALLOCATE): New errcode.
19932
19933	* gmp-impl.h (MPN_MUL_N_RECURSE): Delete.
19934	(MPN_SQR_RECURSE): Delete.
19935
19936	* gmp-impl.h (TARGET_REGISTER_STARVED): New define.
19937
19938	* gmp-impl.h (mpn_kara_sqr_n): Remap with __MPN.
19939	(mpn_toom3_sqr_n): Likewise.
19940	(mpn_kara_mul_n): Likewise.
19941	(mpn_toom3_mul_n): Likewise.
19942	(mpn_reciprocal): Likewise.
19943
19944	* gmp-impl.h (__gmpn_mul_n): Remove declaration.
19945	(__gmpn_sqr): Likewise.
19946	* gmp.h (mpn_sqr_n): Declare/remap.
19947	* mpn/generic/mul.c (mpn_sqr_n): New name for mpn_sqr.
19948
19949	* gmp.h (mpn_udiv_w_sdiv): Move __MPN remap from here...
19950	* gmp-impl.h: ...to here.
19951
199522000-04-05  Linus Nordberg  <linus@swox.se>
19953
19954	* gmp.texi (Top): Add `Random Number Functions' to menu.
19955	(Introduction to MP): Fix typo.
19956	(MP Basics): Create menu for all sections.  Move `Random Number
19957	Functions' to its own chapter.  Add nodes for all sections.
19958	(Function Classes): Mention random generation functions under
19959	miscellaneous.
19960	(Miscellaneous Integer Functions): Update mpz_urandomb,
19961	mpz_urandomm.
19962	(Low-level Functions): Remove mpn_rawrandom.
19963	(Random State Initialization): Update.
19964
19965	* mpf/urandom.c (mpf_urandomb): Remove SIZE parameter.  Normalize
19966	result correctly.
19967
19968	* gmp.h (mpf_urandomb): Remove SIZE parameter.
19969
19970	* randraw.c (gmp_rand_getraw): Handle the case where (1) the LC
19971	scheme doesn't generate even limbs and (2) more than one LC
19972	invocation is necessary to produce the requested number of bits.
19973
199742000-04-05  Torbjorn Granlund  <tege@swox.com>
19975
19976	* mpn/generic/mul_n.c (INVERSE_3): New name for THIRD, define for
19977	any BITS_PER_MP_LIMB.
19978	(MP_LIMB_T_MAX): New.
19979	(mpn_divexact3_n): Remove.
19980	(interpolate3): Use mpn_divexact_by3 instead of mpn_divexact3_n.
19981
199822000-04-05  Kevin Ryde  <kevin@swox.se>
19983
19984	* gmp-impl.h (KARATSUBA_MUL_THRESHOLD<2): Remove cpp test.
19985	(tune_mul_threshold,tune_sqr_threshold): Add declarations, used in
19986	development only.
19987
19988	* mpn/x86/k7/sqr_basecase.asm: New file, only a copy of k6 for now.
19989
199902000-04-04  Torbjorn Granlund  <tege@swox.com>
19991
19992	* gmp-impl.h (TOOM3_MUL_THRESHOLD): Provide default.
19993	(TOOM3_SQR_THRESHOLD): Provide default.
19994
19995	* mpn/generic/mul_n.c: Rewrite (mostly by Robert Harley).
19996	* mpn/generic/mul.c: Rewrite (mostly by Robert Harley).
19997
19998	* configure.in (sparcv9 64-bit OS): Set extra_functions.
19999
200002000-04-04  Linus Nordberg  <linus@swox.se>
20001
20002	* mpn/generic/rawrandom.c: Remove file and replace with randraw.c
20003	on top level.
20004	(mpn_rawrandom): Rename to gmp_rand_getraw.
20005
20006	* randraw.c: New file; essentially a copy of
20007	mpn/generic/rawrandom.c.
20008	(gmp_rand_getraw): New function (formerly known as mpn_rawrandom).
20009
20010	* mpz/urandomb.c (mpz_urandomb): Change mpn_rawrandom -->
20011	gmp_rand_getraw.
20012	* mpz/urandomm.c (mpz_urandomb): Ditto.
20013	* mpf/urandom.c (mpf_urandomb): Ditto.
20014
20015	* gmp.h (gmp_rand_getraw): Add function prototype.
20016	(mpn_rawrandom): Remove function prototype.
20017
20018	* Makefile.am (libgmp_la_SOURCES): Add randraw.c.
20019	* Makefile.in: Regenerate.
20020
20021	* configure.in (gmp_mpn_functions): Remove rawrandom.
20022	* configure: Regenerate.
20023
200242000-04-04  Linus Nordberg  <linus@swox.se>
20025
20026	* gmp.h (GMP_ERROR enum): Remove comma after last enumeration
20027	since the AIX compiler (xlc) doesn't like that.
20028
20029	* randlc.c (gmp_rand_init_lc): Allocate enough space for seed to
20030	hold any upcoming seed.
20031	* randlc2x.c (gmp_rand_init_lc_2exp): Likewise.
20032
20033	* mpn/generic/rawrandom.c: Remove debugging code.
20034	(mpn_lc): Don't reallocate seed.
20035
20036	* mpz/urandomm.c (mpz_urandomm): Implement function.
20037
20038	* mpz/urandomb.c (mpz_urandomb): Fix typo in function definition.
20039
200402000-04-04  Kevin Ryde  <kevin@swox.se>
20041
20042	* make.bat: Removed (no longer works, no longer supported).
20043	* mpn/msdos/asm-syntax.h: Removed (was used only by make.bat).
20044
200452000-04-03  Torbjorn Granlund  <tege@swox.com>
20046
20047	* mpn/generic/brandom.c: New file, replacing random2.
20048
200492000-04-02  Torbjorn Granlund  <tege@swox.com>
20050
20051	* mpn/sparc32/v9/submul_1.asm: Change some carry-form instructions
20052	into their plain counterparts.
20053
20054	* mpn/sparc64/copyi.asm: Avoid executing ALIGN.
20055
20056	* mpn/sparc64/mul_1.asm: Handle overlap of rp/sp.
20057	* mpn/sparc64/addmul_1.asm: Likewise.
20058	* mpn/sparc64/submul_1.asm: Likewise.
20059
200602000-04-01  Linus Nordberg  <linus@swox.se>
20061
20062	* gmp.h: Fix function prototypes for randomization functions.
20063	(__gmp_rand_lc_scheme_struct): Replace `m' with `m2exp'. Remove
20064	unused `bits'.
20065	(__gmp_rand_data_lc): Add `m2exp' as another way of representing
20066	the modulus.
20067	(__gmp_rand_state_struct): Remove unused `size'.
20068
20069	* rand.c (__gmp_rand_scheme): Use better multipliers.  Remove test
20070	schemes.  Replace `m' with `m2exp'.
20071	(gmp_rand_init): Change parameters and return type.  Use `m2exp'
20072	instead of `m'.  Set `gmp_errno' on error.  Disable BBS algorithm.
20073
20074	* randlc.c (gmp_rand_init_lc): Don't use malloc().  Change
20075	parameters.
20076
20077	* randclr.c (gmp_rand_clear): Don't use free().  Disable BBS
20078	algorithm.  Set `gmp_errno' on error.
20079
20080	* randlc2x.c (gmp_rand_init_lc_2exp): New function.
20081	* randsd.c (gmp_rand_seed): New function.
20082	* randsdui.c (gmp_rand_seed_ui): New function.
20083	* randlcui.c: Remove unused file.
20084
20085	* mpn/generic/rawrandom.c (mpn_rawrandom): Rewrite.
20086	(mpn_lc): New static function.
20087
20088	* mpz/urandomb.c (mpz_urandomb): Use ABSIZ() instead of SIZ() for
20089	determining size of ROP.
20090
20091	* mpf/urandom.c (mpf_urandomb): Add third parameter, nbits.  (Not
20092	used yet!)
20093	Change parameter order to mpn_rawrandom().
20094
20095	* Makefile.am (libgmp_la_SOURCES): Add errno.c, randlc2x.c,
20096	randsd.c, randsdui.c.  Remove randui.c.
20097	(MPZ_OBJECTS): Rename urandom.lo --> urandomb.lo.  Add urandomm.lo.
20098	* Makefile.in: Regenerate.
20099
20100	* mpz/Makefile.am (libmpz_la_SOURCES): Change urandom.c -->
20101	urandomb.c.  Add urandomm.c.
20102	* mpz/Makefile.in: Regenerate.
20103
20104	* tests/rand/Makefile.am (noinst_PROGRAMS): Change findcl --> findlc.
20105	Add gen.static.
20106	* tests/rand/Makefile.in: Regenerate.
20107
20108	* tests/rand/gen.c (main): Add mpz_urandomm.  Add command line options
20109	`-C', `-m', extend `-a'.  Use *mp*_*rand*() with new parameters.  Call
20110	gmp_rand_seed().
20111
201122000-04-01  Kevin Ryde  <kevin@swox.se>
20113
20114	* acinclude.m4 (GMP_CHECK_ASM_DATA): Plain .data for hpux.
20115	* configure.in (CCAS): No CFLAGS, they're added when it's used.
20116	(CONFIG_SRCDIR): New define for config.m4.
20117	* mpn/sparc64/addmul_1.asm: Use it for an include().
20118	* mpn/sparc64/submul_1.asm: Ditto.
20119	* mpn/sparc64/mul_1.asm: Ditto.
20120
201212000-03-31  Linus Nordberg  <linus@swox.se>
20122
20123	* mpz/urandom.c: Rename to...
20124	* mpz/urandomb.c: ...this.
20125
20126	* mpz/urandomb.c (mpz_urandomb): Change operand order in call to
20127	mpn_rawrandom().  Use ABSIZ() instead of SIZ() when checking size
20128	of ROP.
20129
20130	* mpz/urandomm.c: New file.
20131
201322000-03-31  Kevin Ryde  <kevin@swox.se>
20133
20134	* acinclude.m4 (GMP_CHECK_ASM_MMX): Give a warning when mmx code
20135	will be omitted.
20136
201372000-03-30  Torbjorn Granlund  <tege@swox.com>
20138
20139	* mpn/sparc64/mul_1h.asm: New file.
20140	* mpn/sparc64/addmul_1h.asm: New file.
20141	* mpn/sparc64/submul_1h.asm: New file.
20142	* mpn/sparc64/mul_1.asm: Rewrite.
20143	* mpn/sparc64/addmul_1.asm: Rewrite.
20144	* mpn/sparc64/submul_1.asm: Rewrite.
20145
201462000-03-28  Torbjorn Granlund  <tege@swox.com>
20147
20148	* mpn/sparc32/v9/mul_1.asm: Fix typo in branch prediction.
20149	* mpn/sparc32/v9/addmul_1.asm: Likewise.
20150	* mpn/sparc32/v9/submul_1.asm: Likewise.
20151
201522000-03-25  Kevin Ryde  <kevin@swox.se>
20153
20154	* mpn/lisp/gmpasm-mode.el: Fix some comment detection, use custom,
20155	fontify more keywords, turn into a standalone mode.
20156
20157	* stamp-vti: New file, generated together with version.texi.
20158
20159	* acinclude.m4 (GMP_VERSION,GMP_HEADER_GETVAL): New macros.
20160	* configure.in (AM_INIT_AUTOMAKE): Use GMP_VERSION.
20161
201622000-03-24  Kevin Ryde  <kevin@swox.se>
20163
20164	* INSTALL: Updates for new configure system.
20165
20166	* configure.in: Add gmp_optcflags_gcc for the x86s, setting -mcpu
20167	and -march.
20168
201692000-03-23  Torbjorn Granlund  <tege@swox.com>
20170
20171	* demos/pexpr.c (mpz_eval_expr): Properly initialize rhs/lhs
20172	for ROOT.
20173
201742000-03-23  Kevin Ryde  <kevin@swox.se>
20175
20176	* config.guess (i?86:*:*:*): Use uname -m if detection program fails.
20177
20178	* mpn/x86/README: Remove remarks on the now implemented MMX shifts.
20179	* mpn/x86/k6/README: Add speed of mpn_divexact_by3, update mpn_mul_1.
20180
20181	* gmp.texi (Installing MP): Corrections to target CPUs.
20182
20183	* version.c: Use VERSION from config.h, add copyright comment,
20184	restore "const" somehow lost.
20185
20186	* configure.in (a29k*-*-*): Fix directory name.
20187
201882000-03-22  Torbjorn Granlund  <tege@swox.com>
20189
20190	* demos/pexpr.c (op_t): Add ROOT.
20191	(fns): Add ROOT.
20192	(mpz_eval_expr): Add ROOT.
20193
20194	* mpz/root.c: Handle roots of negative numbers.
20195	Fix other border cases.
20196	Fix rare memory leakage.
20197
20198	* errno.c: New file.
20199
202002000-03-21  Torbjorn Granlund  <tege@swox.com>
20201
20202	* gmp.h (error number enum): New anonymous enum.
20203	(gmp_errno): New.
20204
20205	* gmp.h (__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR): Bump for GMP 3.0.
20206
202072000-03-20  Torbjorn Granlund  <tege@swox.com>
20208
20209	* mpn/alpha/unicos.m4 (FLOAT64): New define.
20210	* mpn/alpha/default.m4 (FLOAT64): New define.
20211	* mpn/alpha/invert_limb.asm (C36): Use FLOAT64.
20212
202132000-03-21  Kevin Ryde  <kevin@swox.se>
20214
20215	* mpn/x86/k6/diveby3.asm: Tiny speedup.
20216
20217	* acinclude.m4 (GMP_CHECK_ASM_SHLDL_CL): New macro.
20218	* configure.in: Use it, set WANT_SHLDL_CL in config.m4.
20219	* mpn/x86/x86-defs.m4 (shldl,shrdl,shldw,shrdw): New macros, using
20220	WANT_SHLDL_CL.
20221	* mpn/x86/k6/mmx/lshift.asm: Use shldl macro.
20222	* mpn/x86/k7/mmx/lshift.asm: Ditto.
20223	* mpn/x86/pentium/mmx/lshift.asm: Ditto.
20224	* mpn/x86/k6/mmx/rshift.asm: Use shrdl macro.
20225	* mpn/x86/k7/mmx/rshift.asm: Ditto.
20226	* mpn/x86/pentium/mmx/rshift.asm: Ditto.
20227	* mpn/x86/README.family: Add a note about this.
20228
202292000-03-20  Linus Nordberg  <linus@swox.se>
20230
20231	* mpn/generic/rawrandom.c (mpn_rawrandom): Handle seed value of 0
20232	correctly.
20233
20234	* configure.in: Fix detection of alpha flavour.
20235	Set compiler options for `sparcv8'.
20236	* configure: Regenerate.
20237
20238	* rand.c (__gmp_rand_scheme): Clean up some.  Use slightly better
20239	multipliers.
20240
20241	* configure.in (AC_OUTPUT): Add tests/Makefile and
20242	tests/rand/Makefile.
20243
20244	* acinclude.m4 (AC_CANONICAL_BUILD): Define to
20245	`_AC_CANONICAL_BUILD' to deal with incompabilities between
20246	Autoconf and Libtool.
20247	(AC_CHECK_TOOL_PREFIX): Likewise.
20248
20249	* Makefile.am (EXTRA_DIST): Add directory `tests'.
20250
20251	* mkinstalldirs: Update (Automake 2000-03-17).
20252	* ltconfig: Update (Libtool 2000-03-17).
20253	* ltmain.sh: Ditto.
20254
20255	* configure: Regenerate with new autoconf/-make/libtool suite.
20256	* aclocal.m4: Ditto.
20257	* config.in: Ditto.
20258	* all Makefile.in's: Ditto.
20259
202602000-03-20  Torbjorn Granlund  <tege@swox.com>
20261
20262	* demos/pexpr.c (main): Don't allow `-N' for base, require `-bN'.
20263
20264	* mpn/alpha/unicos.m4 (cvttqc): New define.
20265	* mpn/alpha/invert_limb.asm: Use new define for cvttqc.
20266
202672000-03-19  Kevin Ryde  <kevin@swox.se>
20268
20269	* mpn/x86/k6/sqr_basecase.asm: Tiny amendments for 3x3 case.
20270
20271	* gmp.texi: Use @include version.texi.
20272	Use @email and @uref.
20273	(Installing MP): Rewrite for new configure.
20274	(Low-level Functions): Add mpn_divexact_by3.
20275
20276	* configure.in (--enable-alloca): New option.
20277	* acconfig.h (USE_STACK_ALLOC): For --disable-alloca.
20278
202792000-03-18  Kent Boortz  <kent@swox.com>
20280
20281	* macos: New directory with macos port files.
20282
202832000-03-17  Torbjorn Granlund  <tege@swox.com>
20284
20285	* gmp-impl.h (union ieee_double_extract): Check _CRAYMPP.
20286
20287	* mpn/asm-defs.m4 (invert_normalized_limb): Define.
20288
20289	* mpn/alpha: Translate `.s' files to `.asm'.
20290
20291	* configure: Regenerate.
20292
20293	* mpn/alpha/invert_limb.asm: Replace dash in file name with underscore.
20294	* configure.in: Corresponding change.
20295
20296	* configure.in: Assign special "path" for alphaev6.
20297
20298	* mpn/alpha/unicos.m4: New file.
20299	* configure.in (alpha*-cray-unicos*): [This part of the change
20300	commited 2000-03-13 by linus]
20301	* mpn/alpha/default.m4: New file.
20302	* configure.in (alpha*-*-*): Use it.
20303
203042000-03-17  Kevin Ryde  <kevin@swox.se>
20305
20306	* mpn/x86/pentium/rshift.S: Use plain rcrl (not rcrl $1) for
20307	shift-by-1 case, significant speedup.
20308	* mpn/x86/pentium/README: Add shift-by-1 speed.
20309
203102000-03-16  Torbjorn Granlund  <tege@swox.com>
20311
20312	* config.guess: Handle Cray T3D/E.
20313
203142000-03-15  Kevin Ryde  <kevin@swox.se>
20315
20316	* mpn/generic/diveby3.c: New file.
20317	* mpn/x86/diveby3.asm: New file.
20318	* mpn/x86/k6/diveby3.asm: New file.
20319	* gmp.h (mpn_divexact_by3): Prototype and define.
20320	* mpn/asm-defs.m4: define_mpn(divexact_by3).
20321	* configure.in (gmp_mpn_functions): Add diveby3.
20322
20323	* mpn/x86/pentium/sqr_basecase.asm: A few better addressing modes.
20324
20325	* configure.in: Add AC_C_STRINGIZE and AC_CHECK_TYPES((void)).
20326	* gmp-impl.h (ASSERT): Use them.
20327
20328	* mpn/x86/k7/mmx/lshift.asm: New file.
20329	* mpn/x86/k7/mmx/rshift.asm: Rewrite simple loop and return value
20330	handling, add some pictures.
20331
203322000-03-14  Torbjorn Granlund  <tege@swox.com>
20333
20334	* mpn/sparc32/v8/mul_1.asm: Make PIC actually work.
20335	* mpn/sparc32/v8/addmul_1.asm: Likewise.
20336
20337	* mpn/sparc32/v8/mul_1.asm: Use m4 ifdef, not cpp #if.
20338	* mpn/sparc32/v8/addmul_1.asm: Likewise.
20339
20340	* mpn/asm-defs.m4 (C): New define for comments.
20341	* mpn/sparc32: Start comments with `C'.
20342
20343	* config.guess: Remove `SunOS 6' handling.
20344	Recognize sun4m and sun4d architectures under old SunOS.
20345
203462000-03-14  Linus Nordberg  <linus@swox.se>
20347
20348	* configure.in (gmp_srclinks): Set to list of links created by
20349	configure.
20350	* configure: Regenerate.
20351
20352	* Makefile.am (libgmp_la_LDFLAGS): Set version info.
20353	(DISTCLEANFILES): Include @gmp_srclinks@.
20354	* Makefile.in: Regenerate.
20355
203562000-03-13  Linus Nordberg  <linus@swox.se>
20357
20358	* configure.in: Remove some changequote's by quoting the strings
20359	containing `[]'.
20360	Add support for `alpha*-cray-unicos*'.
20361	AC_DEFINE `_LONG_LONG_LIMB' instead of passing it in CFLAGS.
20362	Conditionalize the assembler syntax checks.
20363	* configure: Regenerate.
20364	* config.in: Regenerate.
20365
20366	* acinclude.m4 (GMP_PROG_CCAS): Remove macro.
20367	* aclocal.m4: Regenerate.
20368
203692000-03-13  Kevin Ryde  <kevin@swox.se>
20370
20371	* mpn/x86/p6/README: New file.
20372
20373	* mpn/x86/k6/mul_1.asm: Rewrite, smaller and slightly faster.
20374
20375	* mpn/lisp/gmpasm-mode.el: Rewrite assembler comment detection and
20376	handling.
20377
20378	* configure.in: Separate mmx directories for each x86 flavour.
20379	* configure: Regenerate.
20380
203812000-03-12  Kevin Ryde  <kevin@swox.se>
20382
20383	* mpn/x86/x86-defs.m4 (ALIGN): Supplement definition from
20384	config.m4 so as to pad with nops not zeros on old gas.
20385
20386	* mpn/x86/k7/mmx/copyd.asm: Use plain emms (femms is just an alias
20387	for emms now).
20388	* mpn/x86/k7/mmx/copyi.asm: Ditto.
20389	* mpn/x86/k7/mmx/rshift.asm: Ditto.
20390	* mpn/x86/x86-defs.m4: Amend comments.
20391
20392	* mpn/x86/mod_1.asm: Add comments on speeds.
20393
20394	* mpn/x86/pentium/mmx/lshift.asm: New file.
20395	* mpn/x86/pentium/mmx/rshift.asm: New file.
20396	* mpn/x86/pentium/README: Add speeds of various routines.
20397
203982000-03-10  Linus Nordberg  <linus@swox.se>
20399
20400	* configure.in: Reorganize.
20401	Use AC_CHECK_TOOL to find `ar'.
20402	Add post-includes `regmap.m4' and `aix.m4' for AIX targets.
20403	asm-syntax.h is not needed for PPC or sparc anymore.
20404	(powerpc64-*-aix*): Compiler is always 64-bit. Use `-q64
20405	-qtune=pwr3' to xlc and `-maix64 -mpowerpc64' to gcc.  Pass `-X
20406	64' to `ar' and `nm'.
20407	(pentiummmx): Use GMP_CHECK_ASM_MMX and avoid MMX assembly path if
20408	assembler is not MMX capable.
20409	(pentium[23]): Likewise.
20410	(athlon): Likewise.
20411	(k6*): Likewise.
20412	* configure: Regenerate.
20413
20414	* acinclude.m4 (GMP_PROG_CC_WORKS): New macro.
20415	(GMP_PROG_CC_FIND): Use GMP_PROG_CC_WORKS instead of
20416	AC_TRY_COMPILER.  Make sure that the *first* working 32-bit
20417	compiler is used if no 64-bit compiler is found.
20418	(GMP_CHECK_ASM_MMX): New macro.
20419	* aclocal.m4: Regenerate.
20420
20421	* Makefile.in: Regenerate.  (CC_TEST removed.)
20422	* mpf/Makefile.in: Likewise.
20423	* mpn/Makefile.in: Likewise.
20424	* mpq/Makefile.in: Likewise.
20425	* mpz/Makefile.in: Likewise.
20426	* mpf/tests/Makefile.in: Likewise.
20427	* mpq/tests/Makefile.in: Likewise.
20428	* mpz/tests/Makefile.in: Likewise.
20429
20430	* acconfig.h (_LONG_LONG_LIMB): Add.
20431
20432	* gmp-impl.h: Include config.h only if HAVE_CONFIG_H is defined.
20433
204342000-03-09  Kevin Ryde  <kevin@swox.se>
20435
20436	* mpn/x86/pentium/mul_basecase.S: Small speedup by avoiding an AGI.
20437
20438	* mpn/x86/k7/mmx/copyd.asm: Tiny speedup by avoiding popl.
20439	* mpn/x86/k7/mmx/copyi.asm: Ditto.
20440	* mpn/x86/k7/mul_basecase.asm: Ditto.
20441
204422000-03-07  Torbjorn Granlund  <tege@swox.com>
20443
20444	* config.guess: Better recognize POWER/PowerPC processor type.
20445
204462000-03-07  Kevin Ryde  <kevin@swox.se>
20447
20448	* mpn/generic/addsub_n.c: Use HAVE_NATIVE_* now in config.h.
20449
20450	* mpn/asm-defs.m4: Add comments about SysV m4.
20451	(m4_log2): Don't use <<.
20452	(m4_lshift,m4_rshift): New macros.
20453
204542000-03-06  Torbjorn Granlund  <tege@swox.com>
20455
20456	* mpn/powerpc32/regmap.m4: Map cr0 => `0', etc.
20457
204582000-03-06  Kevin Ryde  <kevin@swox.se>
20459
20460	* mpn/tests/ref.c (refmpn_divexact_by3): New function.
20461	* mpn/tests/ref.h: Prototype.
20462
20463	* acconfig.h (WANT_ASSERT): New define.
20464	* configure.in (--enable-assert): Turn on WANT_ASSERT.
20465	* assert.c: New file.
20466	* Makefile.am: Add to build.
20467	* gmp-impl.h (ASSERT): New macro.
20468	(ASSERT_NOCARRY) Renamed from assert_nocarry.
20469	(MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS.
20470	* mpn/tests/ref.c: Use ASSERT.
20471	* mpf/get_str.c: Use ASSERT_ALWAYS.
20472	* mpf/set_str.c: Remove old assert macro.
20473
20474	* mpn/x86/x86-defs.m4 (cmovnz_ebx_ecx): New macro.
20475	* mpn/x86/p6/aorsmul_1.asm: Use cmov.
20476
20477	* mpn/x86/lshift.S: Use %dl with testb, not %edx. No object code
20478	change, testb was still getting generated.
20479	* mpn/x86/rshift.S: Ditto.
20480
204812000-03-03  Torbjorn Granlund  <tege@swox.com>
20482
20483	* longlong.h: Add IA-64 support.
20484
20485	* mpn/powerpc32: Misc cleanups.
20486	* mpn/powerpc32/aix.m4: New file (mainly by Linus).
20487	* mpn/powerpc64/aix.m4: New file (mainly by Linus).
20488	* mpn/powerpc64: Translate `.S' files to `.asm'.
20489
20490	* configure.in: Fix tyops.
20491	* configure: Regenerate.
20492
204932000-03-02  Torbjorn Granlund  <tege@swox.com>
20494
20495	* mpn/powerpc32/regmap.m4: New file.
20496	* mpn/powerpc32: Translate `.S' files to `.asm'.
20497	* configure.in: Use mpn/powerpc32/regmap.m4 for powerpc targets
20498	except some weird ones.
20499
205002000-03-03  Kevin Ryde  <kevin@swox.se>
20501
20502	* mpn/lisp/gmpasm-mode.el: Suppress postscript comment prefixes in
20503	filladapt.
20504
20505	* mpn/x86/pentium/sqr_basecase.asm: New file.
20506	* mpn/x86/pentium/gmp-mparam.h (KARATSUBA_SQR_THRESHOLD): Update.
20507
20508	* configure.in: Add --enable-assert, enable k6 logops functions.
20509
20510	* mpn/x86/k6/mmx/copyi.asm: Use m4 for divide, not as.
20511	* mpn/x86/k6/mmx/copyd.asm: Ditto.
20512	* mpn/x86/README.family: Add a note on this.
20513
205142000-03-02  Kevin Ryde  <kevin@swox.se>
20515
20516	* mpn/x86/k6/aors_n.asm: Don't use stosl.
20517	* mpn/x86/copyi.asm: Use cld to clear direction flag.
20518	* mpn/x86/divrem_1.asm: Ditto.
20519	* mpn/x86/README.family: Add a note on this.
20520
20521	* mpn/x86/k6/mmx/copyi.asm: Rewrite.
20522	* mpn/x86/k6/mmx/copyd.asm: New file.
20523	* mpn/x86/k6/README: Update, and small amendments.
20524
20525	* mpn/x86/x86-defs.m4 (Zdisp): New macro.
20526	* mpn/asm-defs.m4 (m4_stringequal_p): New macro.
20527
20528	* mpn/x86/p6/aorsmul_1.asm: Use Zdisp to force zero displacements.
20529	* mpn/x86/k6/aorsmul_1.asm: Ditto.
20530	* mpn/x86/k6/mul_1.asm: Ditto.
20531	* mpn/x86/k6/mul_basecase.asm: Ditto.
20532	* mpn/x86/k7/aors_n.asm: Ditto.
20533	* mpn/x86/k7/aorsmul_1.asm: Ditto.
20534	* mpn/x86/k7/mul_1.asm: Ditto.
20535	* mpn/x86/k7/mul_basecase.asm: Ditto.
20536	* mpn/x86/README.family: Add a note on this.
20537
205382000-02-27  Kevin Ryde  <kevin@swox.se>
20539
20540	* mpn/generic/divrem.c (mpn_divrem_classic): Patch to avoid gcc
20541	2.7.2.3 i386 register handling bug.
20542
20543	* mpn/x86/k6/aors_n.asm: Rewrite.
20544	* mpn/x86/k6/mmx/lshift.asm: Rewrite.
20545	* mpn/x86/k6/mmx/rshift.asm: Rewrite.
20546	* mpn/x86/k6/README: Update.
20547
20548	* mpn/x86/k7/mmx/copyd.asm: Support size==0.
20549	* mpn/x86/k7/mmx/copyi.asm: Ditto.
20550	* mpn/x86/k6/mmx/copyi.asm: Ditto.
20551	* gmp-impl.h: Comment size==0 allowed in MPN_COPY_INCR and
20552	MPN_COPY_DECR.
20553	* configure.in: Enable x86 copyi, copyd; add k6 com_n.
20554
205552000-02-25  Torbjorn Granlund  <tege@swox.com>
20556
20557	* demos/pexpr.c (power): Move factorial handing code from `factor'
20558	to `power'.
20559
20560	* demos/factorize.c (factor_using_pollard_rho): Move resetting of `c'
20561	to before checking for a non-zero gcd.
20562
205632000-02-25  Kevin Ryde  <kevin@swox.se>
20564
20565	* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro by Linus.
20566	* mpn/x86/k6/aors_n.asm: Use MULFUNC_PROLOGUE.
20567	* mpn/x86/k6/aorsmul_1.asm: Ditto.
20568	* mpn/x86/k7/aors_n.asm: Ditto.
20569	* mpn/x86/k7/aorsmul_1.asm: Ditto.
20570	* mpn/x86/p6/aorsmul_1.asm: Ditto.
20571
20572	* mpn/tests/ref.c (refmpn_copyi,refmpn_copyd): Allow size==0.
20573
20574	* gmp-impl.h: Move mpn_and_n, mpn_andn_n, mpn_com_n, mpn_ior_n,
20575	mpn_iorn_n, mpn_nand_n, mpn_nior_n, mpn_xor_n and mpn_xorn_n here
20576	from gmp.h.  Use HAVE_NATIVE_mpn_* to make these functions or
20577	inlines.
20578
20579	* gmp-impl.h: Move mpn_copyd, mpn_copyi here from gmp.h.
20580	* gmp-impl.h (MPN_COPY_INCR): Use mpn_copyi if available.
20581	* gmp-impl.h (MPN_COPY_DECR): Use mpn_copyd if available.
20582
20583	* mpn/x86/k6/mmx/com_n.asm: Moved into mmx subdirectory.
20584	* mpn/x86/k6/mmx/copyi.asm: Ditto.
20585	* mpn/x86/k6/mmx/lshift.asm: Ditto.
20586	* mpn/x86/k6/mmx/rshift.asm: Ditto.
20587	* mpn/x86/k7/mmx/rshift.asm: Ditto.
20588	* mpn/x86/k6/mmx/logops_n.asm: New file.
20589	* configure.in (k6*-*-*): Add logops_n.asm.
20590	* mpn/x86/k6/README: Update.
20591
20592	* mpn/x86/k7/mmx/copyi.asm: New file.
20593	* mpn/x86/k7/mmx/copyd.asm: New file.
20594	* mpn/x86/k7/README: Update.
20595
205962000-02-24  Kevin Ryde  <kevin@swox.se>
20597
20598	* mpn/x86/x86-defs.m4 (femms): Generate emms if 3dnow not available.
20599	* mpn/x86/x86-defs.m4 (FRAME_popl): New macro.
20600
20601	* Makefile.am: Add info_TEXINFOS = gmp.texi
20602
20603	* mpn/x86/divrem_1.asm: Moved from mpn/x86/k6, allow size==0,
20604	conditionalize loop versus decl/jnz.
20605	* mpn/x86/mod_1.asm: Ditto.
20606	* mpn/x86/divmod_1.asm: Removed.
20607	* gmp.texi (mpn_divrem_1,mpn_mod_1): Add that size==0 is allowed.
20608	* mpn/tests/ref.c (refmpn_divrem_1c,etc): Allow size==0.
20609
20610	* mpn/x86/k6/aors_n.asm: Avoid gas 1.92.3 leal displacement
20611	expression problem.
20612	* mpn/x86/k6/aorsmul_1.asm: Ditto.
20613	* mpn/x86/k6/mul_1.asm: Ditto.
20614	* mpn/x86/k6/mul_basecase.asm: Ditto
20615	* mpn/x86/k7/aors_n.asm: Ditto.
20616	* mpn/x86/k7/aorsmul_1.asm: Ditto.
20617	* mpn/x86/k7/mul_1.asm: Ditto.
20618	* mpn/x86/k7/mul_basecase.asm: Ditto.
20619	* mpn/x86/k7/rshift.asm: Ditto.
20620	* mpn/x86/p6/aorsmul_1.asm: Ditto.
20621	* mpn/x86/README.family: Describe problem.
20622
206232000-02-24  Linus Nordberg  <linus@swox.se>
20624
20625	* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Add dummy symbol to
20626	testcase to avoid nm failure.  Try nm before piping to grep.
20627
20628	* acconfig.h: Undef HAVE_NATIVE_func for every mpn function found
20629	in gmp.h.
20630
20631	* configure.in: Invoke AC_CONFIG_HEADERS.
20632	Don't invoke AM_CONFIG_HEADER; it makes autoconf confused.
20633	Dig out entry points declared in assembly code and AC_DEFINE proper
20634	HAVE_NATIVE_func.
20635
20636	* mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro.
20637
20638	* mpn/x86/p6/aorsmul_1.asm: Use MULFUNC_PROLOGUE.
20639	* mpn/x86/k6/aors_n.asm: Likewise.
20640
20641	* Makefile.am (EXTRA_DIST): Add config.in; needed when we don't
20642	use AM_CONFIG_HEADER in configure.in.
20643
20644	* mpn/Makefile.am (INCLUDES): Add `-I..' for config.h and
20645	gmp-mparam.h.
20646	* mpf/Makefile.am: Likewise.
20647	* mpq/Makefile.am: Likewise.
20648	* mpz/Makefile.am: Likewise.
20649
20650	* mpf/tests/Makefile.am (INCLUDES): Add `-I../..' for config.h and
20651	gmp-mparam.h.
20652	* mpq/tests/Makefile.am: Likewise.
20653	* mpz/tests/Makefile.am: Likewise.
20654
20655	* configure: Regenerate.
20656	* aclocal.m4: Regenerate.
20657	* config.in: Regenerate.
20658	* Makefile.in: Regenerate.
20659	* mpf/Makefile.in: Regenerate.
20660	* mpn/Makefile.in: Regenerate.
20661	* mpq/Makefile.in: Regenerate.
20662	* mpz/Makefile.in: Regenerate.
20663	* mpf/tests/Makefile.in: Regenerate.
20664	* mpq/tests/Makefile.in: Regenerate.
20665	* mpz/tests/Makefile.in: Regenerate.
20666
206672000-02-23  Kevin Ryde  <kevin@swox.se>
20668
20669	* mpn/x86/addmul_1.S: Amend comments, this code no longer used by
20670	PentiumPro.
20671	* mpn/x86/submul_1.S: Ditto.
20672
20673	* mpn/x86/k6/com_n.asm: Rewrite, smaller but same speed.
20674
20675	* mpn/x86/addmul_1.S: Add PROLOGUE and EPILOGUE to get .type and
20676	.size for ELF.  Rename #define size to n to avoid .size.
20677	* mpn/x86/lshift.S: Ditto.
20678	* mpn/x86/mul_1.S: Ditto.
20679	* mpn/x86/mul_basecase.S: Ditto.
20680	* mpn/x86/rshift.S: Ditto.
20681	* mpn/x86/submul_1.S: Ditto.
20682	* mpn/x86/udiv.S: Ditto.
20683	* mpn/x86/umul.S: Ditto.
20684	* mpn/x86/pentium/add_n.S: Ditto.
20685	* mpn/x86/pentium/addmul_1.S: Ditto.
20686	* mpn/x86/pentium/lshift.S: Ditto.
20687	* mpn/x86/pentium/mul_1.S: Ditto.
20688	* mpn/x86/pentium/mul_basecase.S: Ditto.
20689	* mpn/x86/pentium/rshift.S: Ditto.
20690	* mpn/x86/pentium/sub_n.S: Ditto.
20691	* mpn/x86/pentium/submul_1.S: Ditto.
20692
206932000-02-22  Linus Nordberg  <linus@swox.se>
20694
20695	* acinclude.m4 (GMP_INIT): Use temporary file cnfm4p.tmp for
20696	post-defines.
20697	(GMP_FINISH): Ditto.
20698	(GMP_DEFINE): Add third optional argument specifying location in
20699	outfile.
20700	(GMP_DEFINE_RAW): New macro.
20701	* aclocal.m4: Regenerate.
20702
20703	* configure.in: Add `HAVE_TARGET_CPU_$target_cpu' using
20704	GMP_DEFINE_RAW.
20705	* configure: Regenerate.
20706
20707	* mpz/tests/Makefile.am: New test t-root.
20708	* mpz/tests/Makefile.in: Regenerate.
20709
207102000-02-22  Torbjorn Granlund  <tege@swox.com>
20711
20712	* mpz/root.c: Complete rewrite; still primitive, but at least correct.
20713	* mpz/tests/t-root.c: New test.
20714
207152000-02-22  Kevin Ryde  <kevin@swox.se>
20716
20717	* mpn/x86/k7/mul_basecase.asm: New file.
20718	* mpn/x86/k7/README: Add mpn_mul_basecase speed.
20719	* mpn/x86/k7/gmp-mparam.h: New file.
20720
20721	* mpn/x86/x86-defs.m4 (loop_or_decljnz,cmov_bytes): New macros.
20722	* mpn/asm-defs.m4 (m4_ifdef_anyof_p): New macro.
20723
20724	* mpn/x86/k6/aorsmul_1.asm: New file.
20725	* mpn/x86/k6/addmul_1.S: Removed (was a copy of pentium version).
20726	* mpn/x86/k6/submul_1.S: Removed (was a copy of pentium version).
20727
20728	* mpn/x86/p6/aorsmul_1.asm: Use OPERATION_addmul_1 and
20729	OPERATION_submul_1.
20730	* mpn/x86/k6/aors_n.asm: Use OPERATION_add_n and OPERATION_sub_n.
20731	* configure.in: Declare multi-function files for k6 and p6.
20732
20733	* configure.in: Add HAVE_TARGET_CPU_$target_cpu for config.m4.
20734	* mpn/asm-defs.m4 (define_not_for_expansion): New macro.
20735
20736	* mpn/generic/divrem_1n.c (__gmpn_divrem_1n): New file, split from
20737	mpn/generic/divrem_1.c.
20738	* mpn/generic/divrem_1.c: Ditto.
20739	* configure.in (gmp_mpn_functions): Ditto.
20740
207412000-02-21  Torbjorn Granlund  <tege@swox.com>
20742
20743	* gmp.h: Undo 1996-10-06 NeXT change, it was clearly improperly
20744	written.
20745
207462000-02-21  Linus Nordberg  <linus@swox.se>
20747
20748	* configure.in: Link <src>/mpn/asm-defs.m4 to <build>mpn/asm.m4.
20749	* configure: Regenerate.
20750
207512000-02-21  Linus Nordberg  <linus@swox.se>
20752
20753	* mpn/x86/k7/aorsmul_1.asm: Change OPERATION_ADDMUL -->
20754	OPERATION_addmul_1.  Change OPERATION_SUBMUL -->
20755	OPERATION_submul_1.
20756
20757	* mpn/x86/k7/aors_n.asm: Change OPERATION_ADD --> OPERATION_add_n.
20758	Change OPERATION_SUB --> OPERATION_sub_n.
20759
20760	* mpn/Makefile.am: Pass -DOPERATION_$* to preprocessors.
20761	* mpn/Makefile.in: Regenerate.
20762
20763	* configure.in: Symlink mpn/asm-defs.m4 to build-dir/mpn.  Link
20764	multi-function files to mpn/<function>.asm and remove function
20765	name from `gmp_mpn_functions'.
20766	* configure: Regenerate.
20767
20768	* acinclude.m4 (GMP_FINISH): Tell user what we're doing.
20769	* aclocal.m4: Regenerate.
20770
207712000-02-21  Kevin Ryde  <kevin@swox.se>
20772
20773	* gmp-impl.h: Rename __gmpn_mul_basecase to mpn_mul_basecase and
20774	__gmpn_sqr_basecase to mpn_sqr_basecase, remove __gmpn prototypes.
20775	* mpn/x86/mul_basecase.S: Ditto.
20776	* mpn/x86/pentium/mul_basecase.S: Ditto.
20777
20778	* configure.in (gmp_m4postinc): Use x86-defs.m4 on athlon-*-* too.
20779
207802000-02-20  Kevin Ryde  <kevin@swox.se>
20781
20782	* acinclude.m4 (GSYM_PREFIX): Drop $1, change by Linus.
20783	* mpn/asm-defs.m4 (PROLOGUE,EPILOGUE): Use GSYM_PREFIX as a
20784	string, change by Linus.
20785	* mpn/x86/x86-defs.m4: Use GSYM_PREFIX as a string.
20786
20787	* mpn/x86/k6/gmp-mparam.h: New file.
20788	* mpn/asm-defs.m4 (m4_warning): New macro.
20789
20790	* mpn/x86/README: Amendments per new code and directories.
20791	* mpn/x86/README.family: New file.
20792	* mpn/x86/k6/README: New file.
20793	* mpn/x86/k7/README: New file.
20794
20795	* mpn/generic/mul_n.c: Rename __gmpn_mul_basecase to
20796	mpn_mul_basecase and __gmpn_sqr_basecase to mpn_sqr_basecase.
20797	* mpn/generic/mul_basecase.c: Ditto.
20798	* mpn/generic/sqr_basecase.c: Ditto.
20799	* mpn/generic/mul.c: Ditto.
20800
208012000-02-19  Linus Nordberg  <linus@swox.se>
20802
20803	* configure.in: Don't try to symlink more than one multi-func
20804	file.
20805	* configure: Regenerate.
20806
208072000-02-18  Linus Nordberg  <linus@swox.se>
20808
20809	* acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): GMP_DEFINE
20810	`GSYM_PREFIX'.  Run ACTIONs even when value is found in cache.
20811	(GMP_CHECK_ASM_ALIGN_LOG): GMP_DEFINE `ALIGN'.  Run ACTIONs even
20812	when value is found in cache.
20813	* aclocal.m4: Regenerate.
20814
20815	* configure.in: Don't define GSYM_PREFIX or ALIGN.
20816	Add mechanism for multi-function files.
20817	* configure: Regenerate.
20818
208192000-02-18  Kevin Ryde  <kevin@swox.se>
20820
20821	* configure.in (gmp_m4postinc): Enable x86-defs.m4.
20822	* mpn/x86/k7/mul_1.asm: Fix include.
20823	* mpn/x86/k6/mul_basecase.S: Removed (copy of the pentium version).
20824	* mpn/x86/k6/mul_basecase.asm: New file.
20825	* mpn/x86/k6/sqr_basecase.asm: New file.
20826	* mpn/x86/k6/com_n.asm: New file.
20827	* mpn/x86/k6/copyi.asm: New file.
20828	* gmp.texi (Low-level Functions): Clarify mpn overlaps permitted.
20829	* gmp-impl.h (MPN_OVERLAP_P): New macro.
20830	* gmp-impl.h (assert_nocarry): New macro.
20831	* mpn/tests/ref.c: New file, based in part on other mpn/tests/*.c.
20832	* mpn/tests/ref.h: New file.
20833
208342000-02-17  Linus Nordberg  <linus@swox.se>
20835
20836	* Makefile.am (dist-hook): Don't include any emacs backup files
20837	(*.~*) in dist.
20838	* Makefile.in: Regenerate.
20839
208402000-02-17  Torbjorn Granlund  <tege@swox.com>
20841
20842	* mpn/sparc32/v9/mul_1.asm: Use `rd' to get current PC; get rid of
20843	getpc function.
20844	* mpn/sparc32/v9/addmul_1.asm: Likewise.
20845	* mpn/sparc32/v9/submul_1.asm: Likewise.
20846
208472000-02-17  Kevin Ryde  <kevin@swox.se>
20848
20849	* gmp.h: Add prototypes and defines for mpn_and_n, mpn_andn_n,
20850	mpn_com_n, mpn_copyd, mpn_copyi, mpn_ior_n, mpn_iorn_n,
20851	mpn_mul_basecase, mpn_nand_n, mpn_nior_n, mpn_sqr_basecase,
20852	mpn_xor_n, mpn_xorn_n.
20853
20854	* mpn/asm-defs.m4: Many additions making up initial version.
20855	* mpn/asm-defs.m4 (L): Use defn(`LSYM_PREFIX').
20856	* mpn/x86/x86-defs.m4: New file.
20857	* mpn/x86/k6/aors_n.asm: New file.
20858	* mpn/x86/k6/divmod_1.asm: New file.
20859	* mpn/x86/k6/divrem_1.asm: New file.
20860	* mpn/x86/k6/lshift.S: Removed (was a copy of the pentium version).
20861	* mpn/x86/k6/lshift.asm: New file.
20862	* mpn/x86/k6/mod_1.asm: New file.
20863	* mpn/x86/k6/mul_1.S: Removed (was a copy of the pentium version).
20864	* mpn/x86/k6/mul_1.asm: New file.
20865	* mpn/x86/k6/rshift.S: Removed (was a copy of the pentium version).
20866	* mpn/x86/k6/rshift.asm: New file.
20867	* mpn/x86/k7/aors_n.asm: New file.
20868	* mpn/x86/k7/aorsmul_1.asm: New file.
20869	* mpn/x86/k7/mul_1.asm: New file.
20870	* mpn/x86/k7/rshift.asm: New file.
20871	* mpn/x86/p6/aorsmul_1.asm: New file.
20872	* mpn/x86/copyi.asm: New file.
20873	* mpn/x86/copyd.asm: New file.
20874	* mpn/lisp/gmpasm-mode.el: New file.
20875
208762000-02-16  Torbjorn Granlund  <tege@swox.com>
20877
20878	* mpn/sparc32/v9/mul_1.asm: Conditionalize for PIC.
20879	* mpn/sparc32/v9/addmul_1.asm: Likewise.
20880	* mpn/sparc32/v9/submul_1.asm: Likewise.
20881	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
20882	* mpn/sparc32/udiv_fp.asm: Likewise.
20883
208842000-02-16  Linus Nordberg  <linus@swox.se>
20885
20886	* configure.in: Add mechanism for including target specific
20887	m4-files in config.m4.
20888	* configure: Regenerate.
20889
20890	* acinclude.m4 (GMP_PROG_CCAS): Begin assembly lines (except
20891	labels) with a tab character.  HP-UX demands it.
20892	(GMP_CHECK_ASM_SIZE): Ditto.
20893	(GMP_CHECK_ASM_LSYM_PREFIX): Ditto.
20894	(GMP_CHECK_ASM_LABEL_SUFFIX): Set to empty string for HP-UX.
20895	(GMP_CHECK_ASM_GLOBL): Change `.xport' --> `.export'.
20896	* aclocal.m4: Regenerate.
20897
208982000-02-16  Linus Nordberg  <linus@swox.se>
20899
20900	* acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Define LSYM_PREFIX as
20901	the prefix only, no argument.
20902	* aclocal.m4: Regenerate.
20903	* configure: Regenerate.
20904
20905	* mpn/asm-defs.m4 (L): No argument to LSYM_PREFIX.
20906
209072000-02-15  Linus Nordberg  <linus@swox.se>
20908
20909	* acinclude.m4: Prefix all temporary shell variables with
20910	`gmp_tmp_'.
20911	(GMP_PROG_CC_FIND): Use defaults if no arguments are passed.
20912	Quote use of arguments.
20913	(GMP_PROG_CCAS): New macro.
20914	(GMP_INIT): New macro.
20915	(GMP_FINISH): New macro.
20916	(GMP_INCLUDE): New macro.
20917	(GMP_SINCLUDE): New macro.
20918	(GMP_DEFINE): New macro.
20919	(GMP_CHECK_ASM_LABEL_SUFFIX): New macro.
20920	(GMP_CHECK_ASM_TEXT): New macro.
20921	(GMP_CHECK_ASM_DATA): New macro.
20922	(GMP_CHECK_ASM_GLOBL): New macro.
20923	(GMP_CHECK_ASM_TYPE): New macro.
20924	(GMP_CHECK_ASM_SIZE): New macro.
20925	(GMP_CHECK_ASM_LSYM_PREFIX): New macro.
20926	(GMP_CHECK_ASM_W32): New macro.
20927	* aclocal.m4: Regenerate.
20928
20929	* configure.in: Find m4 and nm for target.
20930	Use new macros to create config.m4.
20931	Prefix all temporary shell variables with `tmp_'.
20932	Pass `-X 64' to nm for 64-bit PPC target with 64-bit compiler.
20933	* configure: Regenerate.
20934
20935	* Makefile.am (dist-hook): *Really* remove all CVS dirs in
20936	dist.
20937	* Makefile.in: Regenerate.
20938
20939	* mpn/Makefile.am: Add target for building .lo and .o from
20940	.asm.
20941	Pass -DPIC to preprocessor (CPP/m4) when building .lo.
20942	Build .o a second time for target .lo, without -DPIC to
20943	preprocessor.
20944	(SUFFIX): Add `.asm'.
20945	(EXTRA_DIST): Add asm-defs.m4.
20946	* mpn/Makefile.in: Regenerate.
20947
20948	* mpf/Makefile.in: Regenerate.
20949	* mpf/tests/Makefile.in: Regenerate.
20950	* mpq/Makefile.in: Regenerate.
20951	* mpq/tests/Makefile.in: Regenerate.
20952	* mpz/Makefile.in: Regenerate.
20953	* mpz/tests/Makefile.in: Regenerate.
20954
209552000-02-15  Torbjorn Granlund  <tege@swox.com>
20956
20957	* mpn/sparc32/udiv_fp.asm: Change `RODATA' to `DATA'.
20958	* mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
20959	* mpn/sparc32/v9/addmul_1.asm: Likewise.
20960	* mpn/sparc32/v9/submul_1.asm: Likewise.
20961	* mpn/sparc32/v9/mul_1.asm: Likewise.
20962
20963	* mpn/sparc32/add_n.asm: Rename `size' -> `n'.
20964	* mpn/sparc32/sub_n.asm: Likewise.
20965
20966	* sparc32: Rename `.s' and `.S' files to `.asm'.
20967	* sparc64: Rename `.s' and `.S' files to `.asm'.
20968
209692000-02-11  Torbjorn Granlund  <tege@swox.com>
20970
20971	* config.sub: Adopt to new config.guess sparc naming conventions.
20972
20973	* config.guess (sun4u:SunOS:5.*:*): Change `sparc9' to `sparcv9'.
20974	* config.guess (sun4m:SunOS:5.*:*): Change to sun4[md]:SunOS:5.*:* and
20975	change `sparc8' to `sparcv8'.
20976
20977	* mpn/x86/add_n.S: Use PROLOGUE/EPILOGUE.
20978	* mpn/x86/sub_n.S: Likewise.
20979
20980	* mpn/x86/syntax.h (PROLOGUE): New name for PROLOG.
20981	* mpn/x86/syntax.h (EPILOGUE): New name for EPILOG.
20982
209832000-02-11  Linus Nordberg  <linus@swox.se>
20984
20985	* configure.in: Better path for 64-bit sparc without 64-bit cc.
20986	Change sparc8 --> sparcv8.
20987	Change sparc9 --> sparcv9.
20988	* configure: Regenerate.
20989
209902000-02-10  Linus Nordberg  <linus@swox.se>
20991
20992	* configure.in: Use Autoconf.
20993	* Makefile.am: New file.
20994
20995	* AUTHORS: New file.
20996	* COPYING: New file.
20997	* acinclude.m4: New file.
20998	* acconfig.h: New file.
20999
21000	* configure: Generate.
21001	* Makefile.in: Generate.
21002	* aclocal.m4: Generate.
21003	* config.in: Generate.
21004
21005	* install.sh: Remove.
21006	* install-sh: New file from Automake.
21007	* missing: New file from Automake.
21008	* ltconfig: New file from Libtool.
21009	* ltmain.sh: New file from Libtool.
21010
21011	* mpf/Makefile.am: New file.
21012	* mpf/Makefile.in: Generate.
21013	* mpf/configure.in: Remove.
21014	* mpf/tests/Makefile.am: New file.
21015	* mpf/tests/Makefile.in: Generate.
21016	* mpf/tests/configure.in: Remove.
21017
21018	* mpn/Makefile.am: New file.
21019	* mpn/Makefile.in: Generate.
21020	* mpn/configure.in: Remove.
21021
21022	* mpq/Makefile.am: New file.
21023	* mpq/Makefile.in: Generate.
21024	* mpq/configure.in: Remove.
21025	* mpq/tests/Makefile.am: New file.
21026	* mpq/tests/Makefile.in: Generate.
21027	* mpq/tests/configure.in: Remove.
21028
21029	* mpz/Makefile.am: New file.
21030	* mpz/Makefile.in: Generate.
21031	* mpz/configure.in: Remove.
21032	* mpz/tests/Makefile.am: New file.
21033	* mpz/tests/Makefile.in: Generate.
21034	* mpz/tests/configure.in: Remove.
21035
210362000-02-10  Torbjorn Granlund  <tege@swox.com>
21037
21038	* mpn/x86/add_n.S: Don't use label L0 twice.
21039	* mpn/x86/sub_n.S: Likewise.
21040
210412000-01-20  Linus Nordberg  <linus@swox.se>
21042
21043	* demos/pexpr.c: Don't use setup_error_handler() in windoze.
21044
210452000-01-19  Torbjorn Granlund  <tege@swox.com>
21046
21047	* demos/pexpr.c (sigaltstack): #define to sigstack for AIX.
21048	(setup_error_handler): Don't write to ss_size and ss_flags
21049	on AIX.
21050
210512000-01-11  Torbjorn Granlund  <tege@swox.com>
21052
21053	* mpn/configure.in (hppa2.0*-*-*): Move assignment of
21054	target_makefile_frag to where it belongs.
21055
210561999-12-21  Torbjorn Granlund  <tege@swox.com>
21057
21058	* longlong.h (v9 umul_ppmm): New #define.
21059	(v9 udiv_qrnnd): New #define.
21060
210611999-12-14  Torbjorn Granlund  <tege@swox.com>
21062
21063	* mpn/generic/divmod_1.c: Use invert_limb.
21064	* mpn/generic/mod_1.c: Use invert_limb.
21065
21066	* gmp-impl.h (invert_limb): Put definition here.
21067	* mpn/generic/divrem.c (invert_limb): Delete definition.
21068	* mpn/generic/divrem_2.c (invert_limb): Delete definition.
21069
21070	* gmp.h (mpn_divrem): Inhibit for non-gcc.
21071	But declare (undo 1999-11-22 change).
21072
21073	* gmp-impl.h (DItype,UDItype): Do these also if _LONG_LONG_LIMB.
21074
21075	* longlong.h: Move 64-bit hppa code out of __GNUC__ conditional.
21076
21077	* stack-alloc.c (HSIZ): New #define.
21078	(__tmp_alloc): Use HSIZ instead of sizeof(tmp_stack).
21079
210801999-12-10  Torbjorn Granlund  <tege@swox.com>
21081
21082	* config.sub: Clean up handling of x86 CPUs: Properly recognize
21083	Amd CPUs as unique entities.  Use manufacturer's names of
21084	processors ("pentium", etc); still match ambiguous names like
21085	"i586", "i686", "p6" but be conservative in interpreting them.
21086
21087	* configure.in: Recognize x86 CPU types known by config.guess.
21088	* mpn/configure.in: Likewise.  Add x86/mmx path component as
21089	appropriate.
21090	(athlon-*-*): Fix typo.
21091
21092	* config.guess: Update x86 recog code to intiallly match
21093	more than just i386.
21094	Call K6-2 and K6-III for "k62" and "k63" respectively.
21095
21096	* config.guess: Recognize x86 CPU types.
21097	Update code for FreeBSD, NetBSD, OpenBSD, Linux.
21098
210991999-12-08  Torbjorn Granlund  <tege@swox.com>
21100
21101	* mpf/pow_ui.c: Avoid final squaring in loop.
21102
211031999-12-07  Torbjorn Granlund  <tege@swox.com>
21104
21105	* gmp-impl.h (udiv_qrnnd_preinv2gen): Prefix local variables with `_'.
21106	(udiv_qrnnd_preinv2norm): Likewise.
21107	From Kevin Ryde:
21108	(HAVE_ALLOCA): #define also if defined (alloca).
21109
211101999-12-04  Torbjorn Granlund  <tege@swox.com>
21111
21112	* mpn/tests/add_n.c: Set OPS from CLOCK.
21113	* mpn/tests/sub_n.c: Likewise.
21114	* mpn/tests/mul_1.c: Likewise.
21115	* mpn/tests/addmul_1.c: Likewise.
21116	* mpn/tests/submul_1.c: Likewise.
21117
21118	* mpn/tests/lshift.c: Update from add_n.c.
21119	* mpn/tests/rshift.c: Likewise.
21120
211211999-12-03  Torbjorn Granlund  <tege@swox.com>
21122
21123	* mpn/powerpc64/copy.S: New file.
21124
211251999-12-02  Torbjorn Granlund  <tege@swox.com>
21126
21127	* mpn/sparc64/copy.s: New file.
21128
21129	* mpn/tests/copy.c: New file.
21130
21131	* mpn/configure.in: Recognize more Amd CPUs; Set special paths for
21132	k7 CPU.
21133
21134	* configure.in: Recognize Amd x86 CPUs.
21135
21136	* mpz/fdiv_r_2exp.c: In rounding code, read in->_mp_size before
21137	writing to res->_mp_size.
21138
21139	* mpn/powerpc64/*.S: Clean up assembly syntax, add function headers.
21140	* mpn/powerpc64/gmp-mparam.h: (KARATSUBA_MUL_THRESHOLD): #define.
21141	(KARATSUBA_SQR_THRESHOLD): #define.
21142
21143	* mpn/tests/add_n.c (main): Only print test number if TIMES==1
21144	and not printing.
21145	(main): Don't run reference code if NOCHECK.
21146	* mpn/tests/sub_n.c: Likewise.
21147	* mpn/tests/mul_1.c: Likewise.
21148	* mpn/tests/addmul_1.c: Likewise.
21149	* mpn/tests/submul_1.c: Likewise.
21150
21151	* mpn/tests/lshift.c: (main): Only print test number if TIMES==1
21152	and not printing.
21153	* mpn/tests/rshift.c: Likewise.
21154
211551999-11-22  Torbjorn Granlund  <tege@swox.com>
21156
21157	* gmp.h (mpz_init_set_str): Declare using __gmp_const.
21158	(mpz_set_str): Likewise.
21159	(mpf_init_set_str): Likewise.
21160	(mpf_set_str): Likewise.
21161	(mpn_set_str): Likewise.
21162	(__gmp_0): Likewise.
21163	(mpn_divrem): Remove separate declaration; it's defined later in
21164	this file.
21165
21166	* gmp.h: Replace "defined (__STD__)' by (__STDC__-0) in
21167	expressions involving more than one term, to handle Sun's compiler
21168	that most helpfully sets __STDC__ to 0.
21169	* gmp-impl.h: Likewise.
21170	* longlong.h: Likewise.
21171
211721999-11-21  Torbjorn Granlund  <tege@swox.com>
21173
21174	* mpn/sparc64/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
21175	(KARATSUBA_SQR_THRESHOLD): #define.
21176
21177	* mpn/sparc64/lshift.s: Compensate stack references for odd stack ptr.
21178	* mpn/sparc64/rshift.s: Likewise.
21179
21180	* mpn/sparc64/addmul_1.s: Propagate carry properly.
21181	* mpn/sparc64/submul_1.s: Likewise.
21182
21183	* mpn/sparc64/sub_n.s: Rewrite.
21184
21185	* mpn/sparc64/sub_n.s: Get operand order for main subcc right
21186	(before scrapping this code for new code).
21187
211881999-11-20  Torbjorn Granlund  <tege@swox.com>
21189
21190	* mpn/sparc64/add_n.s: Rewrite.
21191
211921999-11-17  Torbjorn Granlund  <tege@swox.com>
21193
21194	* mpn/x86/syntax.h (PROLOG): New #define.
21195	(EPILOG): New #define.
21196
21197	* gmp.h (mpn_addsub_n): Declare.
21198	* gmp.h (mpn_add_nc): Declare.
21199	* gmp.h (mpn_sub_nc): Declare.
21200	* mpn/powerpc64/addsub_n.S: New file.
21201
212021999-11-17  Torbjorn Granlund  <tege@swox.com>
21203
21204	* mpn/alpha/gmp-mparam.h
21205	(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
21206	(KARATSUBA_SQR_THRESHOLD): Likewise.
21207
212081999-11-14  Torbjorn Granlund  <tege@swox.com>
21209
21210	* mpn/x86/mul_1.S: Unroll and optimize for P6 and K7.
21211
212121999-11-09  Torbjorn Granlund  <tege@swox.com>
21213
21214	* mpn/x86/p6/gmp-mparam.h
21215	(KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
21216	(KARATSUBA_SQR_THRESHOLD): Likewise.
21217
212181999-11-05  Torbjorn Granlund  <tege@swox.com>
21219
21220	* mpn/generic/addsub_n.c: New file.
21221
212221999-11-02  Torbjorn Granlund  <tege@swox.com>
21223
21224	* config.guess: Handle alpha:FreeBSD with alpha:NetBSD.
21225
21226	* configure.in (vax*-*-*): New case.
21227	* config/mt-vax: New file.
21228	* mpn/vax/add_n.s: Rewrite.
21229	* mpn/vax/sub_n.s: Rewrite.
21230
212311999-10-31  Torbjorn Granlund  <tege@swox.com>
21232
21233	* mpn/vax/rshift.s: New file.
21234	* mpn/vax/lshift.s: New file.
21235
212361999-10-29  Torbjorn Granlund  <tege@swox.com>
21237
21238	* config.sub: Handle k5 and k6.
21239	* mpn/configure.in: Recognize k6.
21240
21241	* mpf/tests/t-get_d.c (LOW_BOUND, HIGH_BOUND): New #defines.
21242	(main): Tighten error bounds to 14 digits.
21243
21244	* longlong.h (default umul_ppmm, when smul_ppmm exists):
21245	Rename __m0 => __xm0, __m1 => __xm1.
21246	(default smul_ppmm): Likewise.
21247
212481999-10-11  Torbjorn Granlund  <tege@swox.com>
21249
21250	* config.guess: Reverse the test for POWER vs PowerPC.
21251	* config.guess (sun4m:SunOS:5.*:*): New case.
21252	* config.guess (sun4u:SunOS:5.*:*): New case.
21253
212541999-09-29  Torbjorn Granlund  <tege@swox.com>
21255
21256	* mpn/generic/divrem_2.c: Clean up comments.
21257
212581999-09-23  Torbjorn Granlund  <tege@swox.com>
21259
21260	* mpz/tests/Makefile.in: Use move-if-change when generating binaries.
21261	* mpf/tests/Makefile.in: Likewise.
21262	* mpq/tests/Makefile.in: Likewise.
21263	* mpz/tests/move-if-change: New file.
21264	* mpf/tests/move-if-change: New file.
21265	* mpq/tests/move-if-change: New file.
21266
21267	* gmp.h (mpn_incr_u): New macro (from mpn/generic/mul_n.c).
21268	(mpn_decr_u): New macro.
21269
21270	* mpn/generic/mul_n.c (mpn_incr): Delete.
21271	* mpn/generic/mul_n.c: Update usages mpn_incr => mpn_incr_u.
21272	* mpn/generic/divrem_newt.c: Use mpn_incr_u and mpn_decr_u instead of
21273	mpn_add_1 and mpn_sub_1.
21274	* mpn/generic/sqrtrem.c: Likewise.
21275	* mpz/cdiv_q_ui.c: Likewise.
21276	* mpz/cdiv_qr_ui.c: Likewise.
21277	* mpz/fdiv_q_ui.c: Likewise.
21278	* mpz/fdiv_qr_ui.c: Likewise.
21279
21280	* mpn/generic/sqrtrem.c: Start single-limb Newton iteration from 18
21281	bits.
21282
212831999-07-27  Torbjorn Granlund  <tege@swox.com>
21284
21285	* mpn/generic/divrem_1.c (__gmpn_divrem_1n): New function.
21286
21287	* mpn/generic/divrem_2.c: New file, code from divrem.c, `case 2:'.
21288	* mpn/Makefile.in: Compile divrem_2.c.
21289	* make.bat: Compile divrem_2.c.
21290	* mpn/configure.in (functions): Add divrem_2.
21291	* gmp.h: Declare mpn_divrem_2.
21292
21293	* mpn/generic/divrem.c: Delete special cases, handle just divisors
21294	of more than 2 limbs.
21295	* gmp.h (mpn_divrem): Call mpn_divrem_1, mpn_divrem_2, as appropriate.
21296
21297	* mpn/generic/divrem.c: Rework variable usage for better register
21298	allocation.
21299
213001999-07-26  Torbjorn Granlund  <tege@swox.com>
21301
21302	* mpn/alpha/ev5/add_n.s: Rewrite for better ev6 speed.
21303	* mpn/alpha/ev5/sub_n.s: Likewise.
21304
213051999-07-21  Torbjorn Granlund  <tege@swox.com>
21306
21307	* longlong.h (alpha): Define umul_ppmm for cc.
21308
21309	* gmp-impl.h (DItype, UDItype): Define for non-gcc if _LONGLONG is
21310	defined.
21311
213121999-07-15  Torbjorn Granlund  <tege@swox.com>
21313
21314	* longlong.h (powerpc64 count_leading_zeros): Fix typo.
21315	(powerpc64 add_ssaaaa): Fix typos.
21316	(powerpc64 sub_ddmmss): Fix typos.
21317
213181999-07-14  Torbjorn Granlund  <tege@swox.com>
21319
21320	* mpz/tests/Makefile.in: Pass XCFLAGS when linking.
21321	* mpf/tests/Makefile.in: Likewise.
21322	* mpq/tests/Makefile.in: Likewise.
21323	* mpn/Makefile.in (.S.o): Pass XCFLAGS.
21324
21325	* longlong.h: Add support for 64-bit PowerPC.
21326	* config.sub: Handle "powerpc64".
21327	* configure.in: Likewise.
21328	* mpn/configure.in: Suppress use of config/t-ppc-aix for now,
21329	it seems compiler passes proper options.
21330	* mpn/powerpc64/*.S: New files.
21331
21332	* Makefile.in (FLAGS_TO_PASS): Pass "AR=$(AR)".
21333
213341999-07-07  Torbjorn Granlund  <tege@swox.com>
21335
21336	* demos/pexpr.c (factor): Change alloca call to a malloc/free pair.
21337
21338	* mpn/powerpc32/syntax.h: Add #define's for crN.
21339
21340	* gmp.h (gmp_rand_algorithm): Remove spurious `,'.
21341
213421999-07-05  Torbjorn Granlund  <tege@swox.com>
21343
21344	* mpn/generic/divrem_1.c: Normalize divisor when needed.
21345
213461999-07-02  Torbjorn Granlund  <tege@swox.com>
21347
21348	* mpn/configure.in (powerpc*-apple-mach): New configuration.
21349	* mpn/powerpc32/*: Add support for apple-macho syntax.
21350	* mpn/powerpc32/syntax.h: New file.
21351	* gmp-impl.h: Don't use `__attribute__' syntax for Apple's perversion
21352	of GCC.
21353
213541999-05-26  Linus Nordberg  <linus@swox.se>
21355
21356	* rand.c (gmp_rand_init): Fix typo.
21357
21358	* mpn/generic/rawrandom.c (mpn_rawrandom): Count bits, not limbs,
21359	to keep track of how many rounds to do in loop.  Clean up
21360	temporary allocation.  Update `seedsize' inside loop.  Mask off
21361	the correct number of bits from final result.  Init `mcopyp' even
21362	when not normalizing `m'.
21363
21364	* randlc.c (gmp_rand_init_lc): Fix typo (don't call
21365	mpz_init_set_ui()).
21366
21367	* mpn/generic/rawrandom.c (mpn_rawrandom): Set SIZ(s->seed) when
21368	reallocating.
21369
21370	* tests/rand/Makefile (test, bigtest): Add 33-bit tests.
21371
21372	* tests/rand/gen.c (main): Set precision of variable passed to
21373	mpf_urandomb().  Add option `-p'.
21374
213751999-05-25  Linus Nordberg  <linus@swox.se>
21376
21377	* randcm.c: Remove.
21378	* randcmui.c: Remove.
21379	* Makefile.in: Remove randcm and randcmui.
21380	* make.bat: Ditto.
21381	* gmp-impl.h: Remove prototypes for __gmp_rand_init_common() and
21382	__gmp_rand_init_common_ui().
21383	* randlc.c (gmp_rand_init_lc): Don't call
21384	__gmp_rand_init_common().
21385
21386	* randlcui.c (gmp_rand_init_lc_ui): Don't call
21387	__gmp_rand_init_common_ui().
21388
21389	* gmp.h (__gmp_rand_state_struct): Remove unused member `maxval'.
21390	* randclr.c (gmp_rand_clear): Remove reference to s->maxval.
21391	* randcm.c (__gmp_rand_init_common): Ditto
21392
21393	* mpn/generic/rawrandom.c (mpn_rawrandom): Don't calculate nlimbs
21394	twice.
21395
21396	* gmp.h (__gmp_rand_dist): Remove.
21397
213981999-05-24  Linus Nordberg  <linus@swox.se>
21399
21400	* mpn/generic/rawrandom.c: Clean up comments.
21401
21402	* gmp.texi: Add documentation for random number generation.
21403
214041999-05-21  Linus Nordberg  <linus@swox.se>
21405
21406	* gmp.h: Typedef `gmp_rand_state' as an array with one element.
21407	Change prototypes accordingly.
21408	* gmp-impl.h: Change prototypes using `gmp_rand_state'.
21409	* rand.c (gmp_rand_init): Take `gmp_rand_state' as argument
21410	instead of a pointer to a `gmp_rand_state'.
21411	* mpf/urandom.c (mpf_urandomb): Ditto.
21412	* mpz/urandom.c (mpz_urandomb): Ditto.
21413	* mpn/generic/rawrandom.c (mpn_rawrandom): Ditto.
21414	* randcmui.c (__gmp_rand_init_common_ui): Ditto.
21415	* randlc.c (gmp_rand_init_lc): Ditto.
21416	* randlcui.c (gmp_rand_init_lc_ui): Ditto.
21417	* randui.c (gmp_rand_init_ui): Ditto.
21418	* randcm.c (__gmp_rand_init_common): Ditto.
21419	* randclr.c (gmp_rand_clear): Ditto.
21420
21421	* tests/rand/gen.c (main): Pass `s' to rand-funcs instead of address
21422	of `s'.
21423
214241999-05-20  Linus Nordberg  <linus@swox.se>
21425
21426	* Makefile.in: Rename randi.c --> rand.c, randi_lc.c --> randlc.c,
21427	randicom.c --> randcm.c.  Add randui.c, randcmui.c, randlcui.c.
21428	* make.bat: Ditto.
21429
21430	* gmp.h: Add prototypes for gmp_rand_init_ui() and
21431	gmp_rand_init_lc_ui().
21432	* gmp-impl.h: Add prototypes for __gmp_rand_init_common() and
21433	__gmp_rand_init_common_ui().
21434
21435	* randlc.c, randcm.c, randclr.c, rand.c: Change #include of
21436	<gmp.h> to "gmp.h".
21437	* randclr.c: Include stdlib.h for free().
21438	* rand.c: Include gmp-impl.h.
21439
214401999-05-12  Torbjorn Granlund  <tege@swox.com>
21441
21442	* mpn/configure.in: Put generic m68k alternative last.
21443
214441999-05-04  Torbjorn Granlund  <tege@swox.com>
21445
21446	* demos/pexpr.c (setup_error_handler): Use sigemptyset to create
21447	empty set (for portability).
21448	(fns): Fix typo '#if #if'.
21449	(mpz_eval_expr): Implement FERMAT and MERSENNE.
21450
21451	* demos/pexpr.c: Cast longjmp argument via long to silent warnings on
21452	64-bit hosts.
21453
214541999-05-03  Torbjorn Granlund  <tege@swox.com>
21455
21456	* demos/pexpr.c: Add #defines for GMP 1.x and 2.0 compatibility.
21457
21458	* demos/pexpr.c (setup_error_handler): New function; take signal
21459	handler setup code from main(), with major modifications to use modern
21460	signal interface.
21461	(main): Remove signal handler setup code; call setup_error_handler.
21462
214631999-04-29  Linus Nordberg  <linus@swox.se>
21464
21465	* tests/rand/findcl.c (main): Add option '-i' for interval factor.
21466	Separate v and merit lose figures.  Add '-v' for version.
21467
214681999-04-28  Linus Nordberg  <linus@swox.se>
21469
21470	* tests/rand/statlib.c: Change debugging stuff.
21471
21472	* tests/rand/gmpstat.h: Add debug values definitions.
21473
21474	* tests/rand/findcl.c (main): Print low and high merit on startup.
21475	Print version string on startup.  Catch SEGV and HUP.  Add option -d
21476	for debug.  Fix bug making test for v too hard.
21477	(sh_status): New function.
21478	(sh_status): Flush stdout.  Add RCSID.
21479
214801999-04-27  Linus Nordberg  <linus@swox.se>
21481
21482	* tests/rand/Makefile (clean): Add target.
21483
214841999-04-27  Linus Nordberg  <linus.nordberg@canit.se>
21485
21486	* tests/rand/stat.c: Include gmpstat.h.
21487	Add global int g_debug.
21488
21489	* tests/rand/spect.c: Include <unistd.h>.
21490
21491	* tests/rand/findcl.c (main): Input is `m', not all factors of `m'.
21492	Print only the very first matching multiplier.  Include <unistd.h>.
21493	Flush stdout.  Print "done." when done.
21494
21495	* tests/rand/spect.c: Move everything but main() to statlib.c.
21496
21497	* tests/rand/findcl.c: New file.
21498
21499	* tests/rand/gmpstat.h: New file.
21500
21501	* tests/rand/statlib.c (merit, merit_u, f_floor, vz_dot,
21502	spectral_test): New functions.
21503
215041999-04-27  Torbjorn Granlund  <tege@swox.com>
21505
21506	* mpn/configure.in: Fix typo, "sparc-*)" was "sparc)".
21507
215081999-04-21  Torbjorn Granlund  <tege@swox.com>
21509
21510	* config.sub: Recognize ev6.
21511
215121999-04-12  Linus Nordberg  <linus.nordberg@canit.se>
21513
21514	* urandom.c: Split up into randclr.c, randi.c, randi_lc.c,
21515	randicom.c.
21516	* randclr.c, randi.c, randi_lc.c, randicom.c: New files.
21517	* Makefile.in: Remove urandom.  Add randclr, randi, randi_lc,
21518	randicom.
21519	* make.bat: Ditto
21520
215211999-03-31  Torbjorn Granlund  <tege@matematik.su.se>
21522
21523	* configure.in (sparc9-*-solaris2.[789]*, etc): New alternative.
21524	* mpn/configure.in: Use mt-sprc9 also for ultrasparc*-*-solaris2*.
21525
215261999-03-30  Linus Nordberg  <linus.nordberg@canit.se>
21527
21528	* urandom.c (__gmp_rand_scheme): Change NULL->0.
21529	Include "gmp.h" instead of <gmp.h>.
21530
215311999-03-29  Linus Nordberg  <linus.nordberg@canit.se>
21532
21533	* gmp.h (__gmp_rand_data_lc): Now holds a, c, m instead of scheme
21534	struct.
21535	(__gmp_rand_lc_scheme_struct): Remove mpz_t's `a' and `m'.
21536
21537	* tests/rand/stat.c (f_freq): Don't print 2nd level results if doing
21538	1st level.
21539
21540	* tests/rand/gen.c (main): Set default algorithm to mpz_urandomb.
21541	(main): Add option -c.
21542
215431999-03-24  Linus Nordberg  <linus.nordberg@canit.se>
21544
21545	* tests/rand/Makefile (GMPINC): Rename to GMPH.
21546	(GMPH): Add gmp-mparam.h.
21547	(CFLAGS): Add -I$(GMPLIBDIR)/mpn
21548
215491999-03-23  Linus Nordberg  <linus.nordberg@canit.se>
21550
21551	* Makefile.in: Compile top-dir/urandom.c.
21552	* make.bat: Ditto.
21553
21554	* mpn/Makefile.in: Compile rawrandom.c.
21555	* make.bat: Ditto.
21556
21557	* mpn/configure.in (functions): Add rawrandom.
21558
21559	* gmp.h (__gmp_rand_scheme_struct): Rename to
21560	__gmp_rand_lc_scheme_struct.
21561	(__gmp_rand_data_lc): Remove member 'n'.  Allocate a
21562	__gmp_rand_lc_scheme_struct instead of a pointer to one.
21563	Add prototype for gmp_rand_init_lc(), mpn_rawrandom().
21564	New prototype for mpz_urandomb().
21565
21566	* urandom.c: New file.
21567	(__gmp_rand_init_common): New function.
21568	(gmp_rand_init_lc): New function.
21569	(gmp_rand_init): Don't init data_lc->n.  Call gmp_rand_init_lc()
21570	and __gmp_rand_init_common().
21571	(gmp_rand_clear): Remove reference to data_lc->n.
21572
21573	* mpz/urandom.c (gmp_rand_init, gmp_rand_clear): Move to new file
21574	urandom.c in top-dir.
21575	(mpz_urandomb): Add function parameter nbits.  Call mpn_rawrandom().
21576
21577	* mpf/urandom.c (mpf_urandomb): Call mpn_rawrandom().
21578
21579	* mpn/generic/rawrandom.c: New file.
21580	(mpn_rawrandom): New function.
21581
215821999-03-17  Torbjorn Granlund  <tege@matematik.su.se>
21583
21584	* extract-dbl.c: When packing result, adjust exp when sc == 0.
21585
21586	* mpf/tests/t-get_d.c: New file.
21587	* mpf/tests/Makefile.in: Compile t-get_d.c.
21588
215891999-03-16  Linus Nordberg  <linus.nordberg@canit.se>
21590
21591	* mpz/urandom.c (__gmp_rand_scheme): Add extra braces around the
21592	mpz_t members.
21593
21594	* make.bat: Compile mpz/urandom.c and mpf/urandom.c
21595
21596	* tests/rand/statlib.c (ks_table): Use mpf_pow_ui() and exp().
21597
21598	* tests/rand/gen.c: Include unistd.h for getopt.
21599
216001999-03-15  Linus Nordberg  <linus.nordberg@canit.se>
21601
21602	* mpz/urandom.c (gmp_rand_init): New function.
21603	(gmp_rand_clear): New function.
21604	(mpz_urandomb): New function.
21605
21606	* mpz/Makefile.in: Compile urandom.c
21607
21608	* mpf/urandom.c (mpf_urandomb): New function.
21609
21610	* mpf/Makefile.in: Compile urandom.c.
21611
21612	* gmp.h (__gmp_rand_state_struct, __gmp_rand_scheme_struct): New
21613	structs for randomization functions.
21614	(gmp_rand_dist, gmp_rand_alogrithm): New enums for randomization
21615	functions.
21616	(mpz_urandomb, mpf_urandomb): Add prototype.
21617	(gmp_rand_init, gmp_rand_clear): Add prototype.
21618
21619	* tests/rand/gen.c, stat.c, statlib.c, statlib.h: New files.
21620	* tests/rand/Makefile, tests/rand/ChangeLog: New files.
21621
216221999-03-15  Torbjorn Granlund  <tege@matematik.su.se>
21623
21624	* .gdbinit: New file.
21625
21626	* mpz/dump.c: New file.
21627	* mpz/Makefile.in: Compile dump.c.
21628	* make.bat: Likewise.
21629	* gmp.h (mpz_dump): Declare.
21630
216311999-03-14  Torbjorn Granlund  <tege@matematik.su.se>
21632
21633	* mpz/tests/reuse.c: Also test mpz_invert and mpz_divexact.
21634
21635	* mpz/tests/convert.c: Update to GMP 2 variable syntax.
21636
216371999-03-13  Torbjorn Granlund  <tege@matematik.su.se>
21638
21639	* mpf/README: New file.
21640	* mpz/README: New file.
21641
21642	* mpf/pow_ui.c: New file.
21643	* mpf/Makefile.in: Compile pow_ui.c.
21644	* make.bat: Likewise.
21645	* gmp.h (mpf_pow_ui): Declare.
21646
216471999-03-12  Torbjorn Granlund  <tege@matematik.su.se>
21648
21649	* mpn/configure.in: Stage 1 of rewrite.
21650	* mpn/underscore.h: New name for bsd.h.
21651	* mpn/sysv.h: Deleted.
21652
21653	* mpn/m68k/*: Don't include sysdep.h.
21654
21655	* mpn/pa64/README: New file.
21656
216571999-03-11  Torbjorn Granlund  <tege@matematik.su.se>
21658
21659	* mpn/powerpc32/add_n.S: Add support for both AIX and ELF syntax.
21660	Renamed from `.s'.
21661	* mpn/powerpc32/sub_n.S: Likewise.
21662	* mpn/powerpc32/lshift.S: Likewise.
21663	* mpn/powerpc32/rshift.S: Likewise.
21664	* mpn/powerpc32/mul_1.S: Likewise.
21665	* mpn/powerpc32/addmul_1.S: Likewise.
21666	* mpn/powerpc32/submul_1.S: Likewise.
21667
21668	* mpn/powerpc32/umul.S: New file.
21669	* mpn/sparc32/v8/umul.S: New file.
21670	* mpn/sparc32/umul.S: New file.
21671	* mpn/x86/umul.S: New file.
21672	* mpn/x86/udiv.S: New file.
21673
21674	* mpn/Makefile.in (mul_basecase.o): Delete rule.
21675
216761999-02-22  Torbjorn Granlund  <tege@matematik.su.se>
21677
21678	* configure.in (hppa2.0*-*-*): Force use of GCC.
21679
21680	* extract-dbl.c: Handle IEEE denormalized numbrs.  Clean up.
21681
216821998-12-02  Torbjorn Granlund  <tege@matematik.su.se>
21683
21684	* mpn/Makefile.in (CCAS): New macro.
21685	(.s.o): Use CCAS.
21686	(.S.o): Likewise.
21687
21688	* mpn/Makefile.in (mul_basecase.o): Add dependency.
21689	(sqr_basecase.o): Likewise.
21690	(mod_1.o): Likewise.
21691
21692	* demos/pexpr.c (cputime): Test also __hpux.
21693	(cleanup_and_exit): Check SIGXCPU only #ifdef LIMIT_RESOURCE_USAGE.
21694
21695	* mpz/tests/t-2exp.c: Use urandom, not random.
21696
21697	* mpn/configure.in (arm*-*-*): New alternative.
21698
216991998-11-30  Torbjorn Granlund  <tege@matematik.su.se>
21700
21701	* gmp-impl.h (union ieee_double_extract): Special case for
21702	little-endian arm.
21703	(LIMBS): Alias for PTR.
21704
217051998-11-26  Torbjorn Granlund  <tege@matematik.su.se>
21706
21707	* longlong.h (m68000 umul_ppmm): Use `muluw', not `mulu'.
21708	(m68k stuff): Clean up; add coldfire support.
21709
217101998-11-23  Torbjorn Granlund  <tege@matematik.su.se>
21711
21712	* mpn/mips3/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
21713	(KARATSUBA_SQR_THRESHOLD): #define.
21714
21715	* mpn/sparc32/v9/README: New file.
21716
217171998-11-20  Torbjorn Granlund  <tege@matematik.su.se>
21718
21719	* mpn/x86/README: New file.
21720
21721	* mpn/arm/gmp-mparam.h: New file.
21722	* mpn/pa64/gmp-mparam.h: New file.
21723	* mpn/hppa/gmp-mparam.h: New file.
21724	* mpn/x86/pentium/gmp-mparam.h: New file.
21725	* mpn/sparc32/v9/gmp-mparam.h: New file.
21726	* mpn/powerpc32/gmp-mparam.h: New file.
21727	* mpn/x86/p6/gmp-mparam.h: New file.
21728
21729	* mpn/alpha/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
21730	(KARATSUBA_SQR_THRESHOLD): #define.
21731
21732	* mpn/configure.in: Point to x86/p6 when appropriate.
21733
21734	* mpn/power/umul.s: New file.
21735	* mpn/power/sdiv.s: New file.
21736	* mpn/pa64/addmul_1.S: New file.
21737	* mpn/pa64/submul_1.S: New file.
21738	* mpn/pa64/mul_1.S: New file.
21739	* mpn/pa64/udiv_qrnnd.c: New file.
21740	* mpn/pa64/umul_ppmm.S: New file.
21741	* mpn/mips2/umul.s: New file.
21742	* mpn/m68k/mc68020/umul.s: New file.
21743	* mpn/m68k/mc68020/udiv.s: New file.
21744	* mpn/hppa/hppa1_1/umul.s: New file.
21745	* mpn/alpha/umul.s: New file.
21746	* mpn/a29k/udiv.s: New file.
21747	* mpn/a29k/umul.s: New file.
21748
217491998-11-17  Torbjorn Granlund  <tege@matematik.su.se>
21750
21751	* mpn/x86/mul_basecase.S: New file for non-pentiums.
21752	* mpn/x86/mul_basecase.S: Move to mpn/x86/pentium.
21753
217541998-11-16  Torbjorn Granlund  <tege@matematik.su.se>
21755
21756	* make.bat: Compile mul_basecase.c and sqr_basecase.c.
21757
217581998-11-10  Torbjorn Granlund  <tege@matematik.su.se>
21759
21760	* mpz/invert.c: Defer writing to parameter `invert' until
21761	end.
21762
217631998-11-03  Torbjorn Granlund  <tege@matematik.su.se>
21764
21765	* mpn/pa64/udiv_qrnnd.c: Handle more border cases.
21766
217671998-10-29  Torbjorn Granlund  <tege@matematik.su.se>
21768
21769	* insert-dbl.c: Special case biased exponents < 1; Get boundary for
21770	Inf right.
21771
21772	* longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB): New #define.
21773
217741998-10-28  Torbjorn Granlund  <tege@matematik.su.se>
21775
21776	* mpn/powerpc32/submul_1.s: Rewrite, optimizing for PPC604.
21777	* mpn/powerpc32/addmul_1.s: Likewise.
21778	* mpn/powerpc32/lshift.s: Likewise.
21779
217801998-10-23  Torbjorn Granlund  <tege@matematik.su.se>
21781
21782	* config/mt-sprc9-gcc (XCFLAGS): Add -Wa,-xarch=v8plus.
21783
21784	* mpn/sparc32/v9/submul_1.s: New file.
21785
217861998-10-21  Torbjorn Granlund  <tege@matematik.su.se>
21787
21788	* mpn/config/mt-pa2hpux: New file.
21789	* mpn/configure.in (hppa2.0*-*-*): Use new 64-bit code.
21790
21791	* config.sub: Recognize hppa2.0 as CPU type.
21792
21793	* longlong.h (64-bit hppa): Add umul_ppmm and udiv_qrnnd.
21794	* mpn/pa64/mul_1.S: New file.
21795	* mpn/pa64/addmul_1.S: New file.
21796	* mpn/pa64/submul_1.S: New file.
21797	* mpn/pa64/umul_ppmm.S: New file.
21798	* mpn/pa64/udiv_qrnnd.c: New file.
21799
218001998-10-20  Torbjorn Granlund  <tege@matematik.su.se>
21801
21802	* mpz/pprime_p.c: Pass 1L, not 1, to mpz_cmp_ui.
21803
21804	* mpz/fdiv_q_2exp.c: Cast `long' argument to `mp_limb_t' for mpn calls.
21805	* mpz/gcd_ui.c: Likewise.
21806	* mpz/add_ui.c: Likewise.
21807	* mpz/sub_ui.c: Likewise.
21808
218091998-10-19  Torbjorn Granlund  <tege@matematik.su.se>
21810
21811	* mpn/generic/bdivmod.c: Avoid using switch statement with mp_limb_t
21812	index.
21813
218141998-10-17  Torbjorn Granlund  <tege@matematik.su.se>
21815
21816	* mpn/sparc32/v9/mul_1.s: Misc cleanups.
21817	* mpn/sparc32/v9/addmul_1.s: Misc cleanups.
21818
218191998-10-16  Torbjorn Granlund  <tege@matematik.su.se>
21820
21821	* mpn/tests/{add,sub,}mul_1.c: Print xlimb using mpn_print.
21822
21823	* mpz/tests/t-powm.c (SIZE): Increase to 50.
21824	(EXP_SIZE): New parameter; use it for computing exp_size.
21825
218261998-10-15  Torbjorn Granlund  <tege@matematik.su.se>
21827
21828	* mpn/generic/divrem_newt.c: Use TMP_ALLOC interface.
21829
21830	* mpn/generic/sqrtrem.c: Check BITS_PER_MP_LIMB before defining
21831	assembly variants of SQRT.
21832
218331998-10-14  Torbjorn Granlund  <tege@matematik.su.se>
21834
21835	* mpn/tests: Clean up timing routines.  Don't include longlong.h
21836	where it is not needed.
21837	(mpn_print): Handle printing when _LONG_LONG_LIMB.
21838	* mpn/tests/{add,sub,}mul_1.c: Generate xlimb with mpn_random2
21839	and do it whether TIMES != 1 or not.
21840
21841	* mpn/generic/mul_n.c: Delay assignment of `sign' for lower
21842	register pressure.
21843
21844	* mpn/sparc32/v9/mul_1.s: New file.
21845
21846	* config/mt-sprc9-gcc: New file.
21847	* configure.in: Use it.
21848
21849	* mpn/configure.in: Use sparc64 for Solaris 2.7 and later with a
21850	sparc v9 CPU.
21851	* mpn/configure.in: Use sparc32/v9 for Solaris 2.6 or earlier with
21852	a sparc v9 CPU.
21853
21854	* mpf/sub.c: In initial code for ediff == 0, limit precision
21855	before jumping to `normalize'.
21856
218571998-10-13  Torbjorn Granlund  <tege@matematik.su.se>
21858
21859	* mpn/hppa/hppa2_0/add_n.s: New file.
21860	* mpn/hppa/hppa2_0/sub_n.s: New file.
21861	* mpn/configure.in: Handle hppa2.0 (32-bit code for now).
21862
21863	* config.guess: Update from egcs 1.1.
21864	(9000/[3478]??:HP-UX:*:*): Properly return 2.0 for all known 2.0
21865	machines.
21866
218671998-10-07  Torbjorn Granlund  <tege@matematik.su.se>
21868
21869	* mpz/root.c (mpz_root): New file.
21870	* mpz/Makefile.in: Compile it.
21871	* make.bat: Likewise.
21872	* gmp.h (mpz_root): Declare.
21873
21874	* mpz/perfpow.c: New file.
21875	* mpz/Makefile.in: Compile it.
21876	* make.bat: Likewise.
21877	* gmp.h (mpz_perfect_power_p): Declare.
21878
21879	* mpz/remove.c: New file.
21880	* mpz/Makefile.in: Compile it.
21881	* make.bat: Likewise.
21882	* gmp.h (mpz_remove): Declare.
21883
21884	* mpz/bin_ui.c: New file.
21885	* mpz/Makefile.in: Compile it.
21886	* make.bat: Likewise.
21887	* gmp.h (mpz_bin_ui): Declare.
21888
21889	* mpz/bin_uiui.c: New file.
21890	* mpz/Makefile.in: Compile it.
21891	* make.bat: Likewise.
21892	* gmp.h (mpz_bin_uiui): Declare.
21893
218941998-09-16  Torbjorn Granlund  <tege@matematik.su.se>
21895
21896	* longlong.h: Test for __powerpc__ in addition to _ARCH_PPC.
21897
21898Sat Sep  5 17:22:28 1998  Torbjorn Granlund  <tege@matematik.su.se>
21899
21900	* mpf/cmp_si.c: Compare most significant mantissa limb before
21901	trying to deduce anything from the limb count.
21902	* mpf/cmp_ui.c: Likewise.
21903
21904Tue Aug 18 10:24:39 1998  Torbjorn Granlund  <tege@matematik.su.se>
21905
21906	* mpz/pprime_p.c (mpz_probab_prime_p): Add new code block
21907	for doing more dividing.
21908
21909Sat Aug 15 18:43:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
21910
21911	* mpn/generic/divrem_newt.c: New name for divrem_newton.c.
21912	* mpn/Makefile.in: Corresponding changes.
21913	* mpn/configure.in: Likewise.
21914
21915Wed Aug 12 23:07:09 1998  Torbjorn Granlund  <tege@matematik.su.se>
21916
21917	* config.guess: Handle powerpc for NetBSD.
21918
21919Tue Jul 28 23:10:55 1998  Torbjorn Granlund  <tege@matematik.su.se>
21920
21921	* mpz/fib_ui.c: New file.
21922	* mpz/Makefile.in: Compile it.
21923	* make.bat: Likewise.
21924	* gmp.h (mpz_fib_ui): Declare.
21925
21926Wed Jun 17 22:52:58 1998  Torbjorn Granlund  <tege@matematik.su.se>
21927
21928	* make.bat: Fix typo, `asm-synt.h' => `asm-syntax.h'.
21929
21930Wed Jun  3 11:27:32 1998  Torbjorn Granlund  <tege@matematik.su.se>
21931
21932	* config/mt-pwr: New file.
21933	* config/mt-ppc: New file.
21934	* configure.in: Use the new files.
21935
21936Tue Jun  2 13:04:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
21937
21938	* mpn/sparc32/v9/addmul_1.s: New file.
21939	* mpn/config/mt-sprc9: New file.
21940	* mpn/configure.in: Use mt-sprc9.
21941
21942Tue May 26 11:24:18 1998  Torbjorn Granlund  <tege@matematik.su.se>
21943
21944	* demos/factorize.c (factor_using_pollard_rho): Pass correct
21945	parameters in recursive calls; join the two recursion arms.
21946
21947	* mpf/set_q.c: Set result sign.
21948	When normalizing the numerator, don't allow it to increase in size
21949	beyond prec.
21950
21951Tue May 19 17:28:14 1998  Torbjorn Granlund  <tege@matematik.su.se>
21952
21953	* demos/factorize.c (factor_using_division): Call fflush
21954	also for the factor 2.
21955
21956Mon May 18 15:51:01 1998  Torbjorn Granlund  <tege@matematik.su.se>
21957
21958	* make.bat: Pass -fomit-frame-pointer.  Do not pass -g.
21959
21960Tue May  5 01:42:50 1998  Torbjorn Granlund  <tege@matematik.su.se>
21961
21962	* mpz/Makefile.in (LOCAL_CC): Remove definition.
21963
21964	* gmp.h: Get rid of GMP_SMALL stuff.
21965	* mpz/Makefile.in: Likewise.
21966	* mpq/Makefile.in: Likewise.
21967	* mpf/Makefile.in: Likewise.
21968
21969	* mpz/invert.c: Fix typo in comment.
21970
21971Mon May  4 23:05:32 1998  Torbjorn Granlund  <tege@matematik.su.se>
21972
21973	* mpn/generic/sqrtrem.c: Check that __arch64__ is not defined
21974	before defining sparc SQRT.
21975
21976Mon Apr 20 19:16:17 1998  Torbjorn Granlund  <tege@matematik.su.se>
21977
21978	* mpn/generic/gcdext.c: Allow gp to be NULL.
21979
219801998-04-03  Torbjorn Granlund  <tege@matematik.su.se>
21981
21982	* mpn/configure.in: Recognize `alphaev5*', not `alphaev5'.
21983
21984	* config.guess: Handle CPU variants for NetBSD.
21985
21986Mon Mar 16 13:07:54 1998  Torbjorn Granlund  <tege@matematik.su.se>
21987
21988	* mpz/pprime_p.c: Use mpn_mod_1/mpn_preinv_mod_1 for computing mod PP,
21989	not mpz_tdiv_r_ui (which expects an `unsigned long').
21990	(mpz_probab_prime_p): Change type of `r' to mp_limb_t.
21991
21992Thu Mar 12 17:19:04 1998  Torbjorn Granlund  <tege@matematik.su.se>
21993
21994	* gmp.h (mpf_ceil, mpf_floor, mpf_trunc): Add declarations.
21995
21996	* config.guess: Update from FSF version.
21997	* config.sub: Likewise.
21998
21999	* config.guess: Add special handling of alpha-*-NetBSD.
22000
22001Wed Mar 11 00:55:34 1998  Torbjorn Granlund  <tege@matematik.su.se>
22002
22003	* mpz/inp_str.c: Update from set_str.c.
22004	Properly increment `nread' when skipping minus sign.
22005
22006	* mpz/set_str.c: Check for empty string after having skipped
22007	leading zeros.
22008
22009Mon Mar  9 19:28:00 1998  Torbjorn Granlund  <tege@matematik.su.se>
22010
22011	* mpz/set_str.c: Skip leading zeros.
22012
22013Wed Mar  4 19:29:16 1998  Torbjorn Granlund  <tege@matematik.su.se>
22014
22015	* gmp.h (mpz_cmp_si): Cast argument before calling mpz_cmp_ui.
22016
22017	* demos/factorize.c: Rewrite.
22018
220191998-02-04  Torbjorn Granlund  <tege@matematik.su.se>
22020
22021	* configure.in (i[3456]86* etc): Check if using gcc before
22022	choosing mt-x86.
22023
22024	* configure.in (m68*-*-*): New alternative.
22025	* config/mt-m68k: New file.
22026
22027	* mpn/alpha/invert-limb.s: Put tables in text segment,
22028	since not all systems support "rdata".
22029
22030Wed Feb  4 02:20:57 1998  Torbjorn Granlund  <tege@matematik.su.se>
22031
22032	* gmp.h (__GNU_MP_VERSION_SNAP): New #define.
22033	(__GNU_MP_VERSION_MINOR): Now 1.
22034
22035Wed Jan 28 22:29:36 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22036
22037	* longlong.h (alpha udiv_qrnnd): #define UDIV_NEEDS_NORMALIZATION.
22038
22039Wed Jan 28 20:28:19 1998  Torbjorn Granlund  <tege@sophie.matematik.su.se>
22040
22041	* mpz/pprime_p.c (mpz_probab_prime_p): Delete 59 from tried divisors.
22042
22043Mon Jan 26 01:39:02 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22044
22045	* mpz/pprime_p.c (mpz_probab_prime_p): Major overhaul: Check small
22046	numers specifically; check small factors, then perform a fermat test.
22047
22048Tue Jan 13 14:58:28 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22049
22050	* longlong.h (alpha udiv_qrnnd): Call __mpn_invert_normalized_limb
22051	and udiv_qrnnd_preinv.
22052
22053Wed Jan  7 01:52:54 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22054
22055	* mpn/configure.in (alpha*, extra_functions): Add invert-limb and
22056	remove udiv_qrnnd.
22057
22058	* mpn/tests/divrem.c: Get allocations right.
22059
22060	* mpn/generic/divrem.c: Conditionally pre-invert most significant
22061	divisor limb.
22062
22063Tue Jan  6 23:08:54 1998  Torbjorn Granlund  <tege@tunnis.tmg.se>
22064
22065	* mpn/generic/divrem_1.c: Rename variables to comply to conventions.
22066	Make `i' have type `mp_size_t'.
22067
22068Tue Dec 30 22:21:42 1997  Torbjorn Granlund  <tege@matematik.su.se>
22069
22070	* mpz/tdiv_qr_ui.c: Return the remainder.
22071	* mpz/tdiv_r_ui.c: Likewise.
22072	* mpz/tdiv_q_ui.c: Likewise.
22073	* gmp.h: Change return type of mpz_tdiv_qr_ui, mpz_tdiv_r_ui,
22074	mpz_tdiv_q_ui.
22075
22076	* mpz/tdiv_ui.c: New file.
22077	* mpz/Makefile.in: Compile it.
22078	* make.bat: Likewise.
22079	* gmp.h (mpz_tdiv_ui): Declare.
22080
22081Fri Nov  7 04:21:15 1997  Torbjorn Granlund  <tege@matematik.su.se>
22082
22083	* mpf/integer.c (FUNC_NAME): Fix bogus test for mpf_trunc.
22084
22085	* demos/isprime.c: New file.
22086
22087	Sat Nov  1 19:32:25 1997  Torbjorn Granlund  <tege@matematik.su.se>
22088
22089	* mpz/cmp_abs.c: New file.
22090	* mpz/Makefile.in: Compile it.
22091	* make.bat: Likewise.
22092	* gmp.h (mpz_cmp_abs): Declare.
22093
22094	* mpz/cmp_abs_ui.c: New file.
22095	* mpz/Makefile.in: Compile it.
22096	* make.bat: Likewise.
22097	* gmp.h (mpz_cmp_abs_ui): Declare.
22098
22099Sat Sep 27 04:49:52 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22100
22101	* mpz/fdiv_r_2exp.c: Get allocation for `tmp' right.
22102
22103	* mpz/fdiv_q_2exp.c: In final result adjustment code, handle
22104	that intermediate result is zero.
22105
22106	* mpz/tests/t-2exp.c: New file.
22107	* mpz/tests/Makefile.in: Handle t-2exp.c.
22108
22109Fri Sep 26 16:29:21 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22110
22111	* mpz/divexact.c: Fix typo in test for whether to copy numerator to
22112	quotient and move that statement to after handling quotient and
22113	denominator overlap.  Misc cleanups.
22114
22115	* mpn/generic/gcd.c: Change count argument of mpn_lshift/mpn_rshift
22116	calls to `unsigned int'.
22117	* mpz/divexact.c: Likewise.
22118
22119Mon Sep 22 02:19:52 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22120
22121	* mpz/tests/t-powm.c: Decrease `reps' to 2500.
22122
22123	* mpz/tests/t-pow_ui.c: New file.
22124	* mpz/tests/Makefile.in: Handle t-pow_ui.c.
22125
22126	* mpz/ui_pow_ui.c: Get special cases for exponent and base right.
22127
22128	* mpz/pow_ui.c: Increase temp space allocation by 1 limb.
22129	Split `rsize' into two variables; compute space allocation into
22130	`ralloc'.
22131
22132Sun Sep  7 04:15:12 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22133
22134	* mpn/pa64/lshift.s: New file.
22135	* mpn/pa64/rshift.s: New file.
22136	* mpn/pa64/sub_n.s: New file.
22137
22138Sat Sep  6 19:14:13 1997  Torbjorn Granlund  <tege@gmp.tmg.se>
22139
22140	* mpn/pa64/add_n.s: New file.
22141	* mpn/pa64: New directory.
22142
22143Tue Aug 19 16:17:09 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22144
22145	* mpz/swap.c: New file.
22146	* mpz/Makefile.in: Compile it.
22147	* make.bat: Likewise.
22148	* gmp.h (mpz_swap): Declare.
22149
22150	* mpn/generic/mul_n.c: Push assignment of x and y pointers into the
22151	if/else clauses in several places.  (Decreases register pressure.)
22152
22153Mon Aug 18 03:29:50 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22154
22155	* mpn/thumb/add_n.s: New file.
22156	* mpn/thumb/sub_n.s: New file.
22157	* mpn/arm/add_n.s: New file.
22158	* mpn/arm/sub_n.s: New file.
22159
22160	* mpz/powm.c: After mpn_mul_n and mpn_mul calls, adjust product size
22161	if most significant limb is zero.
22162	* mpz/powm_ui.c: Likewise.
22163
22164Fri Aug 15 02:13:57 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22165
22166	* mpn/arm/m/mul_1.s: New file.
22167	* mpn/arm/m/addmul_1.s: New file.
22168
22169	* mpn/powerpc32/mul_1.s: Rewrite.
22170
22171	* mpn/alpha/mul_1.s: Prefix labels with `.'.
22172
22173Mon Aug 11 02:37:16 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22174
22175	* mpn/powerpc32/add_n.s: Rewrite.
22176	* mpn/powerpc32/sub_n.s: Rewrite.
22177
22178Sun Aug 10 17:07:15 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22179
22180	* mpn/powerpc32/addmul_1.s: Delete obsolete comments.
22181	* mpn/powerpc32/submul_1.s: Likewise.
22182
22183Fri Jul 25 20:07:54 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22184
22185	* mpz/addmul_ui.c: New file.
22186	* mpz/Makefile.in: Compile it.
22187	* make.bat: Likewise.
22188	* gmp.h (mpz_addmul_ui): Declare.
22189
22190	* mpz/setbit.c: Add missing code after final `else'.
22191
22192Tue Jul 22 17:45:01 1997  Torbjorn Granlund  <tege@tunnis.tmg.se>
22193
22194	* mpn/sh/add_n.s: Fix typo.
22195	* mpn/sh/sub_n.s: Likewise.
22196
22197	* longlong.h (ns32k count_trailing_zeros): Fix typo.
22198
22199	* insert-dbl.c: Check for exponent overflow and return Inf.
22200
22201	* mpz/get_d.c: Rewrite to avoid rounding errors.
22202
22203Thu May 29 11:51:07 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22204
22205	* mpq/add.c: Swap some usages of tmp1 and tmp2 to make sure
22206	their allocation suffices.
22207	* mpq/sub.c: Likewise.
22208
22209Wed Apr 16 02:24:25 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22210
22211	* demos/pexpr.c: New file.
22212
22213	* mpn/generic/mul_n.c: Misc optimizations from Robert Harley.
22214
22215	* gmp-impl.h (MPZ_PROVOKE_REALLOC): New #define.
22216
22217Sat Apr 12 17:54:04 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22218
22219	* mpz/tstbit.c: New file.
22220	* mpz/Makefile.in: Compile it.
22221	* make.bat: Likewise.
22222	* gmp.h (mpz_tstbit): Declare.
22223
22224	* mpz/tests/logic.c: Use MPZ_CHECK_FORMAT.
22225	* mpz/tests/bit.c: New test.
22226	* mpz/tests/Makefile.in: Handle bit.c.
22227
22228	* mpz/ior.c: In -OP2,+OP1 case, normalize OP2 after call to mpn_sub_1.
22229
22230	* gmp-impl.h (MPZ_CHECK_FORMAT): New #define.
22231
22232Thu Apr 10 00:30:14 1997  Torbjorn Granlund  <tege@tmg.se>
22233
22234	* longlong.h (POWER/PowerPC): Test _ARCH_PWR instead of _IBMR2.
22235
22236Wed Apr  9 18:23:31 1997  Torbjorn Granlund  <tege@pro.tmg.se>
22237
22238	* gmp-impl.h: Move defaulting of UMUL_TIME and UDIV_TIME from here...
22239	* longlong.h: ...to here.
22240
22241Sun Mar 30 12:16:23 1997  Torbjorn Granlund  <tege@matematik.su.se>
22242
22243	* mpn/generic/next_prime.c: New file.
22244
22245	* mpn/generic/perfsqr.c: Remove definitions of PP and PP_INVERTED.
22246	* gmp-impl.h: Put them here.
22247
22248Fri Mar 28 08:18:05 1997  Torbjorn Granlund  <tege@matematik.su.se>
22249
22250	* gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Define as inline asm for
22251	for x86, but leave disabled for now.
22252
22253Fri Feb 28 02:39:47 1997  Torbjorn Granlund  <tege@matematik.su.se>
22254
22255	* mpn/Makefile.in (.S.o): Pass SFLAGS and CFLAGS also to compiler
22256	for assembly phase.
22257	(.s.o): Pass SFLAGS.
22258
22259Wed Feb 26 06:46:08 1997  Torbjorn Granlund  <tege@matematik.su.se>
22260
22261	* mpn/configure.in: For Pentium Pro, use default code, not Pentium
22262	optimized code.
22263
22264	* mpn/x86/addmul_1.S: Unroll and optimize for Pentium Pro.
22265	* mpn/x86/submul_1.S: Likewise.
22266
22267Thu Feb 13 08:26:09 1997  Torbjorn Granlund  <tege@matematik.su.se>
22268
22269	* mpf/Makefile.in: Compile floor.o, ceil.o and trunc.o (from
22270	integer.c).
22271	* make.bat: Likewise.
22272
22273Wed Feb  5 05:58:44 1997  Torbjorn Granlund  <tege@matematik.su.se>
22274
22275	* mpn/configure.in (alpha*): Add cntlz to extra_functions.
22276
22277Wed Feb  4 03:30:45 1997  Torbjorn Granlund  <tege@matematik.su.se>
22278
22279	* mpf/integer.c: New file (supporting mpf_floor, mpf_ceil, mpf_trunc).
22280
22281Mon Feb  3 14:21:36 1997  Torbjorn Granlund  <tege@matematik.su.se>
22282
22283	* make.bat: Fix typo, set_dfl_prc => set_dfl_prec.
22284
22285Sun Feb  2 02:34:33 1997  Torbjorn Granlund  <tege@matematik.su.se>
22286
22287	* mpf/out_str.c: After outputting `-', decrement n_digits.
22288
22289Wed Jan  8 02:50:20 1997  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22290
22291	* mpn/generic/divrem.c: qextra_limbs => qxn.
22292
22293Wed Dec 18 07:50:46 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22294
22295	* mpz/tests/t-tdiv.c (SIZE): Increase to 200.
22296
22297Tue Dec 17 19:32:48 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22298
22299	* mpn/generic/divrem.c (mpn_divrem_classic): New name for mpn_divrem.
22300	* gmp.h (mpn_divrem): New function.
22301	* mpn/generic/divrem_newton.c: New file.
22302	* mpn/configure.in (functions): Add divrem_newton.
22303	* make.bat: Likewise.
22304
22305Thu Dec 12 17:55:13 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22306
22307	* gmp.h (_GMP_H_HAVE_FILE): Test also __dj_include_stdio_h_.
22308
22309Sat Dec  7 09:40:06 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22310
22311	* mpn/alpha/invert-limb.s: New file.
22312
22313Thu Dec  5 01:25:31 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22314
22315	* mpz/ui_pow_ui.c (mpz_pow2): New (static) function.
22316	(mpz_ui_pow_ui): Rewrite.
22317
22318	* make.bat: `pre_mod_1.c' => `pre_mod_.c'.  Fix typo in path to
22319	gmp-mpar.h.
22320
22321Fri Nov 15 00:49:55 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22322
22323	* mpz/ui_pow_ui.c: Rewrite for better speed.
22324
22325Fri Nov  1 16:36:56 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22326
22327	* Makefile.in (recursive make rules): Use `&&' instead of `;' as
22328	delimiter.
22329
22330Fri Oct 25 17:12:36 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22331
22332	* gmp-impl.h (Cray/uxp MPN_COPY): Really declare as inline.
22333
22334Thu Oct 24 15:08:19 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22335
22336	* mpn/fujitsu/rshift.c: Fix typo in loop boundaries.
22337
22338Fri Oct 18 03:13:54 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22339
22340	* mpn/configure.in: Recognize `nextstep' for m68k variants; likewise
22341	for x86 variants.
22342
22343	* mpn/x86/syntax.h (INSND): New macro.
22344	* mpn/x86/[lr]shift.S: Use INSND.
22345	* mpn/x86/pentium/[lr]shift.S: Likewise.
22346	* mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS.
22347
22348	* gmp-impl.h: In code for determining endianness, test also
22349	__BIG_ENDIAN__ and __hppa__.  Remove test of __NeXT__.
22350
22351Wed Oct 16 03:50:34 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22352
22353	* mpf/set_str.c: Let `prec' determine precision used in
22354	exponentiation code; decrease allocation accordingly.
22355
22356	* mpn/vax: Change `jsob*' to `sob*' in all files.
22357
22358Tue Oct 15 03:54:06 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22359
22360	* longlong.h (m88110 udiv_qrnnd): Change type of intermediate quotient
22361	to DImode (divu.d generates a 64-bit quotient).
22362
22363	* configure.in (m88110*): Fix typo.
22364
22365	* mpf/get_str.c: Compute exp_in_base using `double' to avoid overflow.
22366
22367	* gmp-impl.h (struct bases): Change type of chars_per_bit_exactly from
22368	float to double.
22369	* mpn/mp_bases.c (__mp_bases): Give 17 digits for chars_per_bit_exactly
22370	field.
22371
22372	* mpf/get_str.c: Let `prec' determine precision used in
22373	exponentiation code; decrease allocation accordingly.
22374
22375Sun Oct 13 03:31:53 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22376
22377	* longlong.h: Major cleanup.
22378	(__udiv_qrnnd_c): Compute remainders using multiply and subtract,
22379	not explicit `%' operator.
22380	(C umul_ppmm): Get rid of a redundant __ll_lowpart.
22381
22382	* mpz/invert.c: Properly detect all operands that would yield an
22383	undefined inverse; make sure the inverse is always positive.
22384
22385	* mpz/xor.c: New file.
22386	* mpz/Makefile.in: Compile it.
22387	* make.bat: Likewise.
22388	* gmp.h (mpz_xor): Declare.
22389
22390	* mpz/tests/logic.c: Also test mpz_xor.
22391
22392	* mpz/lcm.c: Special case for when either operand equals 0.
22393
22394Sat Oct 12 01:57:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22395
22396	* mpn/generic/gcd.c (find_a): Don't inline on x86.
22397
22398	* Makefile.in (CFLAGS): Default to just `-g'.
22399
22400	* configure.in: Recognize 386 and 486 wherever other x86 cpus are
22401	recognized.
22402	* configure.in: Use mt-x86 for all x86 cpus.
22403	* config/mt-x86: New file.
22404
22405	* mpn/alpha/cntlz.s: New file.
22406
22407Tue Oct  8 00:16:18 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22408
22409	* longlong.h: Define smul_ppmm for Fujitsu vpp/uxp.
22410	Rewrite umul_ppmm to actually work on the hardware.
22411
22412	* mpn/x86/sub_n.S: Avoid parens around displacement of `leal'.
22413	* mpn/x86/add_n.S: Likewise.
22414
22415	* mpn/x86/syntax.h (R): Define differently depending on __STDC__.
22416
22417Mon Oct  7 16:48:08 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22418
22419	* longlong.h: Don't test for __NeXT__ in outer 68k conditional;
22420	add test for __m68k__.
22421
22422Sun Oct  6 00:59:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22423
22424	* gmp.h: Declare mpn_random.
22425	* make.bat: Compile mpn/generic/random.c.
22426
22427	* longlong.h: Define umul_ppmm for Fujitsu vpp/uxp.
22428
22429	* gmp-impl.h: Protect definitions using `__attribute__ ((mode (...)))'
22430	with test also for __GNUC_MINOR__.
22431
22432	* gmp.h: Don't define macros using __builtin_constant_p when using
22433	NeXT's compiler.
22434
22435Fri Oct  4 16:53:50 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22436
22437	* mpz/lcm.c: New file.
22438	* mpz/Makefile.in: Compile it.
22439	* make.bat: Likewise.
22440	* gmp.h (mpz_lcm): Declare.
22441
22442Wed Sep 25 00:06:21 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22443
22444	* mpq/tests/t-cmp_ui.c: Make sure numerator and denominator of `b' is
22445	within limits of an `unsigned long int'.
22446
22447	* mpz/tests/t-powm_ui.c: Change type of exp2 to `unsigned long int'.
22448
22449Tue Sep 24 18:58:20 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22450
22451	* mpz/powm_ui.c: Make result always positive.
22452
22453	* urandom.h (urandom): Make it return mp_limb_t.
22454
22455	* gmp-impl.h (CNST_LIMB): New macro.
22456	* mpn/mp_bases.c: Use CNST_LIMB.
22457	* mpn/generic/hamdist.c (popc_limb): Likewise.
22458	* mpn/generic/popcount.c (popc_limb): Likewise.
22459	* mpn/generic/perfsqr.c: Likewise.
22460
22461Fri Sep 20 03:08:10 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22462
22463	* mpz/pprime_p.c: When n <= 3, don't clear out n before using it.
22464
22465Wed Sep 18 11:22:45 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22466
22467	* mpn/fujitsu/mul_1.c: New file.
22468	* mpn/fujitsu/addmul_1.c: New file.
22469	* mpn/fujitsu/sub_n.c: New file.
22470	* mpn/fujitsu/add_n.c: Mew file.
22471
22472Sun Sep 15 03:13:02 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22473
22474	* mpn/generic/random.c: New file.
22475	* mpn/configure.in (functions): Add `random'.
22476
22477	* gmp-impl.h (MPN_COPY): Define as annotated inline function for
22478	Crays and Fujitsu VPPs.
22479
22480	* gmp.h (mp_size_t): Define as `int' for non-MPP Cray.
22481	(mp_exp_t): Likewise.
22482
22483	* configure.in: Add support for Fujitsu VPP machines.
22484	* mpn/configure.in: Likewise.
22485	* config.guess: Likewise.
22486	* config.sub: Likewise.
22487
22488	* mpn/fujitsu/rshift.c: New file.
22489	* mpn/fujitsu/lshift.c: New file.
22490	* mpn/fujitsu: New directory, for Fujitsu VPP machines.
22491
22492Wed Sep 11 11:34:38 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22493
22494	* mpn/generic/mul_n.c (__gmpn_mul_n): New name for impn_mul_n.
22495	Call __gmpn_mul_basecase, not impn_mul_n_basecase; update parameter
22496	list to work with __gmpn_mul_basecase.
22497	(__gmpn_sqr): New name for impn_sqr_n.
22498	Call __gmpn_sqr_basecase, not impn_sqr_n_basecase; update parameter
22499	list to work with __gmpn_sqr_basecase.
22500	(mpn_mul_n): Update calls to match new names and parameter conventions.
22501	* gmp-impl.h (MPN_MUL_N_RECURSE): Likewise.
22502	(MPN_SQR_RECURSE): New name for MPN_SQR_N_RECURSE.
22503	Update calls to match new names and parameter conventions.
22504	* mpn/generic/mul.c: Never perform multiply explicitly here, call
22505	__gmpn_mul_basecase instead.
22506	Update calls to match new names and parameter conventions.
22507
22508	* mpn/x86/mul_basecase.S: New file.
22509	* mpn/generic/mul_basecase.c: New file.
22510	* mpn/generic/sqr_basecase.c: New file.
22511
22512Wed Sep  4 02:59:21 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22513
22514	* mpz/set_str.c: Let `0b' and `0B' mean base 2.
22515
22516Fri Aug 30 00:44:00 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22517
22518	* longlong.h (x86 umul_ppmm): Work around GCC bug that was
22519	triggered by Aug 28 change.
22520
22521	* mpbsd/min.c (digit_value_in_base): New function.
22522
22523	* mpz/set_str.c: Refine allocation size computation, use
22524	chars_per_bit_exactly instead of chars_per_limb.
22525
22526	* mpbsd/Makefile.in (.c.o): Add -D_mpz_realloc=_mp_realloc.
22527
22528Wed Aug 28 02:52:14 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22529
22530	* longlong.h (x86 umul_ppmm): Don't cast result operands.
22531	(x86 udiv_qrnnd): Likewise.
22532	(default smul_ppmm): Fix typo, umul_ppmm => smul_ppmm.
22533	(default umul_ppmm): New #define using smul_ppmm.
22534	(vax smul_ppmm): New #define.
22535	(vax umul_ppmm): Delete.
22536	(POWER umul_ppmm): Delete.
22537	(IBM 370 smul_ppmm): New #define.
22538	(IBM 370 umul_ppmm): Delete.
22539	(IBM RT/ROMP smul_ppmm): New #define.
22540	(IBM RT/ROMP umul_ppmm): Delete.
22541
22542Tue Aug 27 01:03:25 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22543
22544	* gmp-impl.h (__gmp_0): Make it `const'.
22545
22546	* mpn/Makefile.in (clean mostlyclean): Comment out recursive clean
22547	of `tests'.
22548
22549	* mpn/generic/mul.c: Identify when we do squaring, and call
22550	impn_sqr_n_basecase/impn_sqr_n as appropriate.  Use
22551	KARATSUBA_MUL_THRESHOLD and KARATSUBA_SQR_THRESHOLD.
22552	Don't #define KARATSUBA_THRESHOLD.
22553
22554	* mpn/generic/mul_n.c: Don't #define KARATSUBA_THRESHOLD.
22555	(impn_mul_n, impn_sqr_n): Rewrite, based on code contributed by
22556	Robert Harley.
22557	(impn_sqr_n_basecase): Rewrite.
22558
22559	* gmp-impl.h (KARATSUBA_MUL_THRESHOLD): New #define.
22560	(KARATSUBA_SQR_THRESHOLD): Likewise.
22561	(MPN_SQR_N_RECURSE): Use KARATSUBA_SQR_THRESHOLD.
22562	(MPN_MUL_N_RECURSE): Use KARATSUBA_MUL_THRESHOLD.
22563
22564	* configure.in: Fix typo in last change.
22565
22566Mon Aug 26 22:25:18 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22567
22568	* mpn/generic/random2.c: Fix typo, `alpha__' => `__alpha'.
22569	* mpf/random2.c: Likewise.
22570
22571Sun Aug 25 00:07:09 1996  Torbjorn Granlund  <tege@quiet.matematik.su.se>
22572
22573	* mpz/tests/t-mul.c: Also test squaring.
22574
22575Fri Aug 16 05:12:08 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22576
22577	* mp_clz_tab.c (__clz_tab): Declare as `const'.
22578	* version.c (gmp_version): Likewise.
22579	* mpn/generic/sqrtrem.c (even_approx_tab, odd_approx_tab): Likewise.
22580
22581Thu Aug 15 02:34:47 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22582
22583	* gmp.h: Fix typo, `mips__' => `__mips'.
22584
22585	* mpf/set_str.c: Allow a number to start with a period, if next
22586	position contains a digit.
22587
22588Tue Aug 13 18:41:25 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22589
22590	* mpz/gcdext.c: Get cofactor sign right for negative input operands.
22591	Clean up code for computing tt.
22592
22593	* mpz/invert.c: Get rid of variable `rv'.
22594
22595	* mpz/divexact.c: Test for zero divisor in special case for zero
22596	dividend.
22597
22598Mon Aug 12 18:04:07 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22599
22600	* mpz/?div_*_ui.c: Special case for division by 0.
22601	* mpz/tdiv_q.c: Likewise.
22602
22603Sat Aug 10 14:45:26 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22604
22605	* mpz/dmincl.c: Special case for division by 0.
22606
22607	* mpz/tdiv_*_ui.c: Delete special case for dividend being 0; handle
22608	it when computing size after mpn_divmod_1 call.
22609
22610	* mp_bpl.c: (__gmp_junk): New variable.
22611	(__gmp_0): New constant.
22612
22613	* gmp-impl.h (DIVIDE_BY_ZERO): New #define.
22614
22615Fri Aug  9 20:03:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22616
22617	* mpz/divexact.c: Test for dividend being zero before testing
22618	for small divisors.
22619
22620Thu Aug  8 13:20:23 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22621
22622	* configure.in: Require operating system specification for cpus
22623	where assembly syntax differs between system.
22624
22625	* Makefile.in (many targets): Change `-' action prefix to `@'.
22626
22627	* mpn/Makefile.in: (distclean): Fix typo.
22628
22629	* mpq/cmp_ui.c: Rename function to _mpq_cmp_ui.
22630	(mpq_cmp_ui): #undef deleted.
22631	* mpz/cmp_si.c: Rename function to _mpz_cmp_si.
22632	(mpz_cmp_si): #undef deleted.
22633	* mpz/cmp_ui.c: Rename function to _mpz_cmp_ui.
22634	(mpz_cmp_ui): #undef deleted.
22635	* Makefile.in: Corresponding changes.
22636
22637	* mpf/get_prc.c: Return the *highest* precision achievable.
22638
22639	* mpf/get_str.c: Complete rewrite.
22640
22641	* mpf/set_str.c (swapptr): New #define.
22642	(assert): New #define.
22643	* mpf/set_str.c: Set prec to one more than the saved _mp_prec.
22644	Misc cleanups.
22645
22646	* mpz/set_str.c: #include string.h.
22647	* mpf/out_str.c: #include string.h.
22648	* mpbsd/xtom.c: #include string.h and ctype.h.
22649	* mpbsd/mout.c: #include string.h.
22650
22651Wed Aug  7 11:46:04 EDT 1996  Ken Weber <kweber@mcs.kent.edu>
22652
22653	* mpn/generic/gcd.c: Reorder mpn_gcd argument list.
22654	* mpz/gcd.c: Change call to mpn_gcd.
22655	* gmp.texi: Update manual entry on mpn_gcd.
22656	* mpn/generic/bdivmod.c: Delete limb cache to make mpn_bdivmod
22657	reentrant.
22658
22659Wed Aug  7 02:15:38 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22660
22661	* mpf/get_str.c: Rewrite code for converting integral part of a
22662	number with both an integral and fractional part.
22663
22664	* mpf/set_str.c: Get rid of variable xxx.  New variables madj and radj.
22665	In exp_in_base==0 case, add madj to msize for EXP field.
22666
22667	* mpz/tests/t-gcd.c: Test deleted.  Rename t-gcd2.c to t-gcd.c.
22668	Increase reps to 2000.
22669	* mpz/tests/t-gcd2.c: Get rid of mpz_refgcd.
22670
22671	* mpf/set_str.c: Ignore excess limbs in MP,MSIZE.
22672
22673Thu Jul 25 04:39:10 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22674
22675	* mpn/configure.in: Fix typo in setting path, "sparc" => "sparc32".
22676
22677Wed Jul 24 02:27:02 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22678
22679	* mpn/generic/gcdext.c: Reorganize and clean up.  Get rid of all
22680	signed limb arithmetic.
22681
22682Mon Jul 22 02:39:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22683
22684	* mpn/generic/gcdext.c (mpn_gcdext): For large enough operands,
22685	work with most significant *two* limbs.
22686	(div2): New function (two variants).
22687	(THRESHOLD): New #define.
22688
22689	* mpz/gcdext.c: Fix typo in MPZ_TMP_INIT call.
22690
22691	* longlong.h (alpha UMUL_TIME): Now 30.
22692	(alpha UDIV_TIME): Now 350.
22693	(x86 UMUL_TIME): Now 10 (let Pentium decide).
22694	(SuperSPARC UDIV_TIME): Override default.
22695
22696	* extract-dbl.c (MP_BASE_AS_DOUBLE): Don't redefine here.
22697
22698	* extract-dbl.c: New name for extract-double.c.
22699	* insert-dbl.c: New name for insert-double.c.
22700	* Makefile.in: Corresponding changes.
22701	* make.bat: Likewise.
22702
22703	* mpz/Makefile.in (.c.o): Don't pass non-portable `-f' to cp.
22704	* mpq/Makefile.in: Likewise.
22705	* mpf/Makefile.in: Likewise.
22706
22707Sat Jul 20 01:35:18 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22708
22709	* mpz/getlimbn.c: Take ABS of integer->_mp_size.
22710
22711	* mpz/divexact.c: Use mpn_divmod_1 if divisor is a single limb.
22712
22713Thu Jul 18 00:31:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22714
22715	* mpn/generic/popcount.c (popc_limb): Use different masking trick
22716	for first step (due to David Seal).
22717	* mpn/generic/hamdist.c (popc_limb): Likewise.
22718
22719Wed Jul 17 23:21:48 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22720
22721	* mpn/generic/divrem.c: In MPN_COPY_DECR call, copy dsize - 1 limbs.
22722
22723Sun Jul 14 17:47:46 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22724
22725	* configure.in: Handle sparc9, sparc64, and ultrasparc like sparc8.
22726
22727Thu Jul 11 14:05:54 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
22728
22729	* longlong.h (mc680x0): Define umul_ppmm, udiv_qrnnd, sdiv_qrnnd
22730	for the '020, '030, '040, and '332.  Define count_leading_zeros
22731	for the '020, '030, '040, and '060.
22732
22733Sun Jul 14 15:24:53 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22734
22735	From Joe Keane:
22736	* mpq/equal.c: Take ABS of num1_size before passing it to mpn_cmp.
22737
22738Fri Jul 12 17:11:17 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22739
22740	* mpn/generic/sqrtrem.c (SQRT): New asm for x86, but leave it
22741	disabled for now.
22742
22743	* mpn/generic/sqrtrem.c: Use MP_BASE_AS_DOUBLE.
22744
22745Wed Jul 10 03:17:45 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22746
22747	* cre-mparam.c: Delete obsolete file.
22748
22749	* gmp.h: #define _LONG_LONG_LIMB if __mips && _ABIN32.
22750	* longlong.h: Test __mips instead of __mips__.
22751
22752Sun Jul  7 23:19:13 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22753
22754	* longlong.h (_PROTO): Define, unless already defined.
22755	(alpha __udiv_qrnnd): Declare using _PROTO.
22756	(hppa __udiv_qrnnd): Likewise.
22757	(sparc __udiv_qrnnd): Likewise.
22758
22759Mon Jul  1 01:44:30 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22760
22761	* config.guess: Update from master version; add Cray x90 handling.
22762
22763Wed Jun 26 05:35:02 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22764
22765	* mpn/power/add_n.s (__mpn_add_n): Work around GAS bug.
22766	* mpn/power/sub_n.s (__mpn_sub_n): Likewise.
22767
22768	* insert-double.c: Rework loop to avoid potential overflow.
22769
22770	* mpq/get_d.c: For vax, if qsize > N_QLIMBS, ignore excess limbs.
22771
22772	* mpq/tests/t-get_d.c (SIZE): Special case for vax.
22773
22774	* gmp.h (mpX_cmp_ui): #define also when ! __GNUC__.
22775
22776Mon Jun 24 17:13:21 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22777
22778	* longlong.h (vax sdiv_qrnnd): Fix typo.
22779
22780Sat Jun 15 01:33:33 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22781
22782	* gmp.h: Support `small' and `large' type and function variants,
22783	controlled by GMP_SMALL.
22784
22785	* mpz/Makefile.in (.c.o): Compile each function twice, for small and
22786	large variant.
22787	(MPZS_OBJS): New variable.
22788	(libmpz.a): Include MPZS_OBJS in archive.
22789	* mpf/Makefile.in: Analogous changes.
22790	* mpq/Makefile.in: Analogous changes.
22791
22792	* gmp.h: Prefix all functions with __gmp, to allow namespace-clean
22793	internal calls.
22794
22795	* mp.h: Rip out __MP_SMALL__ stuff.
22796	(__mpz_struct): mp_size_t => int.
22797
22798	* mpz/invert.c: #include "gmp-impl.h".
22799	Use MPZ_TMP_INIT, not mpz_init.
22800
22801	* mpz/gcdext.c: Rewrite to call mpn_gcdext.
22802
22803Fri Jun 14 18:05:29 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22804
22805	* mpn/generic/gcdext.c (s0size): New parameter.
22806	* gmp.h (mpn_gcdext): Update prototype.
22807
22808	* mpn/generic/gcdext.c: Major rewrite.
22809
22810Mon Jun 10 00:14:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22811
22812	* mpn/generic/dump.c: Add missing `else'.
22813
22814Fri Jun  7 03:35:12 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22815
22816	* Makefile.in (gmp_toc.html): Pass -expandinfo to texi2html.
22817
22818Thu Jun  6 19:00:53 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22819
22820	* Version 2.0.2 released.
22821
22822	* install.sh: New file.
22823	* Makefile.in (INSTALL): Use install.sh.
22824	(install-normal): New name for target `install'.
22825	(install): New dummy target.
22826
22827	* mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
22828	* mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
22829
22830	* config/mt-linux (AR_FLAGS): New file.
22831	* configure.in: Use config/mt-linux for all linux systems.
22832
22833Tue Jun  4 03:42:18 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22834
22835	* Version 2.0.1 released.
22836
22837	* mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
22838
22839	* extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
22840
22841	* insert-double.c: Don't #include stdlib.h.
22842
22843	* gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
22844	Do not test __sparc__.
22845
22846	* mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
22847	* mpq/equal.c: Likewise.
22848
22849	* mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
22850
22851	* mpn/generic/gcdext.c: Add K&R declaration syntax.
22852	* stack-alloc.h: Likewise.
22853	* insert-double.c: Likewise.
22854	* extract-double.c: Likewise.
22855	* mpf/tests/reuse.c: Likewise.
22856	* mpz/tests/reuse.c: Likewise.
22857	* mpf/tests/t-sub.c: Likewise.
22858	* mpf/tests/t-add.c: Likewise.
22859	* mpf/tests/t-muldiv.c: Likewise.
22860	* mpf/tests/t-conv.c: Likewise.
22861	* mpf/tests/ref.c: Likewise.
22862
22863	* mpn/config/t-oldgas: Renamed from t-freebsd.
22864	* mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
22865	configurations.
22866
22867	* mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
22868	* mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
22869
22870	* mpn/config/t-ppc-aix: New file.
22871	* mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
22872
22873Wed May 29 02:07:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22874
22875	* gmp.h (mp_bits_per_limb): Change qualifier from `const' to
22876	__gmp_const.
22877
22878	* gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
22879	* mpf/iset_str.c: Likewise.
22880
22881Mon May 27 00:15:58 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22882
22883	* gmp-impl.h: Declare __gmp_extract_double.
22884
22885	* mpz/set_q.c: Delete unused variables.
22886
22887	* gmp.h (mpq_equal): Declare.
22888
22889	* mpf/eq.c: mpf_cmp2 -> mpf_eq.
22890
22891Fri May 24 03:20:44 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22892
22893	* mpz/iset_d.c: Don't include <math.h>.
22894
22895	* insert-double.c (__gmp_scale2): New name for scal2.
22896	* mpz/get_d.c: Corresponding change.
22897	* mpf/get_d.c: Likewise.
22898	* mpq/get_d.c: Likewise.
22899	* gmp-impl.h: Declare __gmp_scale2.
22900
22901	* mpn/generic/scan0.c: Clarify comment.
22902
22903	* mpz/set_q.c: New file.
22904	* Makefile.in: Compile it.
22905	* make.bat: Likewise.
22906	* gmp.h: Declare mpz_set_q.
22907
22908	* insert-double.c: New file.
22909	* Makefile.in: Compile it.
22910	* make.bat: Likewise.
22911
22912	* mpz/get_d.c: New file.
22913	* mpz/Makefile.in: Compile it.
22914	* make.bat: Likewise.
22915	* gmp.h: Declare mpz_get_d.
22916
22917	* mpf/get_d.c: New file.
22918	* mpf/Makefile.in: Compile it.
22919	* make.bat: Likewise.
22920	* gmp.h: Declare mpf_get_d.
22921
22922	* make.bat: Compile things in alphabetical order.
22923
22924	* gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
22925	(LIMBS_PER_DOUBLE): New #define.
22926
22927	* extract-double.c: New file.
22928	* Makefile.in: Compile it.
22929	* make.bat: Likewise.
22930	* mpz/set_d.c: Rewrite to use __gmp_extract_double.
22931	* mpf/set_d.c: Likewise.
22932
22933	* mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
22934
22935Wed May 22 02:48:35 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22936
22937	* gmp-impl.h: Rework code for defining ieee_double_extract.
22938	(IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
22939	(_GMP_IEEE_FLOATS): New macro.
22940	* mpn/vax/gmp-mparam.h: Delete.
22941
22942	* mpn/config/t-pwr-aix: New file.
22943	* mpn/configure.in: Use t-pwr-aix for aix 4 and later.
22944
22945Mon May 20 16:30:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22946
22947	* gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
22948
22949	* mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
22950	* mpf/tests/t-sub.c (oo): Likewise.
22951	* mpf/tests/t-conv.c (oo): Likewise.
22952	* mpf/tests/t-sqrt.c (oo): Likewise.
22953
22954	* mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
22955
22956	* mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
22957
22958Fri May 17 02:24:43 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22959
22960	* mpz/set_d.c: Call _mpz_realloc.
22961
22962	* mpq/set_z.c: New file.
22963	* mpq/Makefile.in: Compile it.
22964	* make.bat: Likewise.
22965	* gmp.h: Declare mpq_set_z.
22966
22967	* mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
22968	* mpf/Makefile.in (test): Delete spurious target.
22969	* mpq/Makefile.in (test): Likewise.
22970
22971	* mpf/out_str.c: Use `e' to separate exponent when base <= 10.
22972
22973	* mpn/configure.in: Treat ultrasparc just like sparc v8,
22974	until 64-bit compilers are ready.
22975
22976	* mpf/set_d.c: Make it work for 64-bit machines.
22977
22978Thu May 16 20:53:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
22979
22980	* gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
22981	machines.
22982	* mpn/x86/gmp-mparam.h: Delete file.
22983
22984	* configure.in: Treat microsparc like sparc8.
22985
22986	* urandom.h: Test __alpha instead of __alpha__, since the former
22987	is the standard symbol.
22988	* mpn/generic/random2.c: Likewise.
22989	* mpf/random2.c: Likewise.
22990
22991Tue May 14 13:42:39 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
22992
22993	* mpz/set_f.c: New file.
22994	* mpz/Makefile.in: Compile it.
22995	* gmp.h: Declare mpz_set_f.
22996
22997	* mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
22998
22999Tue May 14 13:03:07 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23000
23001	* make.bat: Add all new files.
23002
23003Sun May 12 22:24:36 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23004
23005	* mpf/set_z.c: New file.
23006	* mpf/Makefile.in: Compile it.
23007	* gmp.h: Declare mpf_set_z.
23008
23009Sat May 11 19:26:25 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23010
23011	* gmp.h: Declare mpf_set_q.
23012
23013	* mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
23014
23015Fri May 10 17:37:38 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23016
23017	* mpf/set_q.c: New file.
23018	* mpf/Makefile.in: Compile it.
23019
23020	* config.sub: Recognize sparc8.
23021
23022Wed May  8 09:19:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23023
23024	* mpf/tests/t-dm2exp.c: New file.
23025
23026	* mpf/tests/t-add.c: Correct header comment.
23027	* mpf/tests/t-sub.c: Likewise.
23028	* mpf/tests/t-sqrt.c: Likewise.
23029
23030	* mpf/div.c: Misc variable name cleanups.
23031	* mpf/div_ui.c: Base more closely on mpf/div.c.
23032	* mpf/ui_div.c: Likewise.
23033
23034	* mpz/tests/Makefile.in (check): Depend on Makefile.
23035	* mpq/tests/Makefile.in (check): Likewise.
23036	* mpf/tests/Makefile.in (check): Likewise.
23037
23038	* mpf/tests/t-muldiv.c: New file.
23039	* mpf/tests/Makefile.in: Compile and run `t-muldiv'.
23040	(t-ref.o): Delete spurious rule.
23041
23042	* mpf/sqrt.c: Properly detect negative input operand.
23043
23044	* mpf/sqrt_ui.c: Delete spurious header comment.
23045	* mpf/sqrt.c: Likewise.
23046	* mpz/sqrt.c: Likewise.
23047
23048	* mpz/tests/reuse.c (main): Read `reps' from command line.
23049
23050	* mpf/tests/reuse.c: New file.
23051	* mpf/tests/Makefile.in: Compile and run `reuse'.
23052
23053	* mpf/mul_ui.c: Disable code for removing low zero limbs.
23054
23055	* mpf/div.c: Fix condition for when vp and qp overlaps.
23056
23057	* mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
23058
23059	* mpf/out_str.c: Don't output '\n' after exponent.
23060
23061	* mpf/add_ui.c: New special case for when U is completely cancelled.
23062
23063Wed Apr 24 05:33:28 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23064
23065	* Version 2.0 released.
23066
23067	* All files: Update FSF's address.
23068
23069	* Makefile.in (gmp_toc.html): New name for gmp.html.
23070	(TAGS): Depend on force.
23071
23072	* mpf/tests/t-conv.c: Pass -base to mpf_set_str.
23073
23074Sat Apr 20 03:54:06 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23075
23076	* Makefile.in (ps): New target, depend on gmp.ps.
23077
23078Fri Apr 19 14:03:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23079
23080	* mpf/out_str.c: Print `@' before exponent, not `e'.
23081
23082	* make.bat: Update from Makefiles.
23083
23084Thu Apr 18 01:22:05 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23085
23086	* mpf/set_str.c: If parameter `base' is negative, expect exponent
23087	to be decimal, otherwise in the same base as the mantissa.
23088
23089Wed Apr 17 17:28:36 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23090
23091	* mpf/set_dfl_prec.c: Don't return anything.
23092	* gmp.h: Corresponding changes.
23093
23094	* mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
23095	* mpf/init2.c: Likewise.
23096	* mpf/get_prc.c: Likewise.
23097	* mpf/set_prc.c: Likewise.
23098	* mpf/set_prc_raw.c: Likewise.
23099	* mpz/popcount.c: Likewise.
23100	* mpz/hamdist.c: Likewise.
23101	* mpz/scan1.c: Likewise.
23102	* mpz/scan0.c: Likewise.
23103	* mpn/generic/popcount.c: Likewise.
23104	* mpn/generic/hamdist.c: Likewise.
23105	* mpn/generic/scan1.c: Likewise.
23106	* mpn/generic/scan0.c: Likewise.
23107	* gmp.h: Likewise.
23108
23109	* mpf/eq.c: New file, based on mpf/diff.c.
23110	* mpf/diff.c: Delete.
23111	* mpf/Makefile.in: Corresponding changes.
23112	* gmp.h: Likewise.
23113
23114	* mpf/reldiff.c: New file.
23115	* mpf/Makefile.in: Compile it.
23116	* gmp.h: Declare mpf_reldiff.
23117
23118	* mpz/iset_d.c: New file.
23119	* mpz/Makefile.in: Compile it.
23120	* gmp.h: Declare mpz_init_set_d.
23121
23122Tue Apr 16 16:28:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23123
23124	* Makefile.in (gmp.html): Pass -acc to texi2html.
23125
23126Mon Apr 15 16:20:24 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23127
23128	* mpf/set_str.c: Switch off code for defaulting the base from the
23129	leading characters.
23130
23131	* gmp.h (mp?_sign): Delete.
23132	(mp?_sgn): New macros.
23133
23134Fri Apr 12 17:23:33 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23135
23136	* Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
23137
23138Wed Apr 10 22:52:02 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23139
23140	* mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
23141	* gmp.h: Corresponding change.
23142
23143	* gmp.h (mp_bits_per_limb): Make it const.
23144
23145Sat Mar 30 01:20:23 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23146
23147	* configure.in: Re-enable recognition of with_gcc.
23148
23149	* mpf/Makefile.in (.c.o): Pass XCFLAGS.
23150	* mpn/Makefile.in (.c.o): Likewise.
23151	* mpz/Makefile.in (.c.o): Likewise.
23152	* mpq/Makefile.in (.c.o): Likewise.
23153	* mpbsd/Makefile.in (.c.o): Likewise.
23154	* mpf/tests/Makefile.in (.c.o): Likewise.
23155	* mpz/tests/Makefile.in (.c.o): Likewise.
23156	* mpq/tests/Makefile.in (.c.o): Likewise.
23157
23158	* Makefile.in (XCFLAGS): Default to empty.
23159	(FLAGS_TO_PASS): Pass on XCFLAGS.
23160	(.c.o): Pass XCFLAGS.
23161
23162	* config/mt-m88110 (XCFLAGS): Define instead of CC.
23163	* config/mt-sprc8-gcc (XCFLAGS): Likewise.
23164	* config/mt-supspc-gcc (XCFLAGS): Likewise.
23165
23166	* configure: Don't default CC to "gcc -O2" is -with-gcc=no was
23167	specified.
23168
23169Mon Mar 25 01:07:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23170
23171	* urandom.h: Test for __SVR4 in addition to __svr4__.
23172
23173	* mp_bpl.c (mp_bits_per_limb): Declare as `const'.
23174
23175	* Makefile.in (CFLAGS): `-O2' => `-O'.
23176	* mpn/Makefile.in (CFLAGS): Likewise.
23177
23178	* gmp-impl.h: Get rid of obsolete field access macros.
23179
23180	* mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
23181	cc compiler bug.
23182
23183	* gmp.h (__MPN): Make it work also for non-ANSI compilers.
23184
23185Thu Mar 21 01:07:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23186
23187	* mpf/sub.c: New special case for ediff <= 1 before generic code.
23188	Simplify generic code for ediff == 0.
23189	Rename uexp => exp.
23190
23191Mon Mar 11 18:24:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23192
23193	* mpf/tests/*.c: Use ref_mpf_sub for error calculation.
23194	* mpf/tests/Makefile.in: Link ref.o to all executables.
23195
23196	* mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
23197
23198Sun Mar 10 21:03:17 1996  Torbjorn Granlund  (tege@tiny.matematik.su.se)
23199
23200	* mpf/get_str.c: In digit development loop for fractions, change
23201	loop condition from `<' to `<='.
23202
23203Thu Mar  7 04:58:11 1996  Torbjorn Granlund  <tege@tiny.matematik.su.se>
23204
23205	* mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
23206
23207Wed Mar  6 01:10:42 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23208
23209	* mpf/tests/t-sqrt.c: New file.
23210	* mpf/tests/Makefile.in: Corresponding changes.
23211
23212	* mpf/sqrt.c: Special case for square root of zero.
23213
23214	* mpq/add.c: Clean up variable names.
23215	* mpq/sub.c: Update from mpq/add.c.
23216
23217	* mpz/divexact.c: abs => ABS.
23218	* mpz/gcd.c: Likewise.  Rewrite final fixup code, to decrease
23219	allocation.  Misc cleanups.
23220
23221Tue Mar  5 22:24:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
23222
23223	* mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
23224
23225	* gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
23226
23227	* mpn/configure.in: Use t-freebsd also for netbsd.
23228
23229Mon Mar  4 15:13:28 1996  Torbjorn Granlund  <tege@matematik.su.se>
23230
23231	* mpq/Makefile.in (cmp.o): Depend on longlong.h.
23232
23233	* mpq/equal.c: New file.
23234	* mpq/Makefile.in: Corresponding changes.
23235
23236	* mpf/tests/t-add.c: New file.
23237	* mpf/tests/t-sub.c: Renamed from t-addsub.c.
23238	* mpf/tests/ref.c: New file.
23239	* mpf/tests/Makefile.in: Corresponding changes.
23240
23241	* gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
23242
23243Sun Mar  3 07:45:46 1996  Torbjorn Granlund  <tege@matematik.su.se>
23244
23245	* mpf/set_str.c: In exponentiation code, allocate 3 extra
23246	limbs, not just 2.
23247
23248	* mpf/get_str.c: Allocate sufficient space for tstr.
23249	When calculating exp_in_base, round result down.
23250
23251	* mpf/tests/t-conv.c: New file.
23252	* mpf/tests/Makefile.in: Corresponding changes.
23253
23254	* mp_bpl.c: New file.
23255	* gmp.h: Declare it.
23256	* Makefile.in: Corresponding changes.
23257
23258Sat Mar  2 06:27:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
23259
23260	* mpf/set_prc_raw.c: New file.
23261	* mpf/set_prc.c: Renamed from set_prec.c.
23262	* mpf/get_prc.c: New file.
23263	* mpf/Makefile.in: Corresponding changes.
23264	* gmp.h: Declare new functions.
23265
23266	* mpn/generic/gcdext.c: Add copyright header.
23267
23268Fri Mar  1 01:22:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
23269
23270	* mpn/configure.in: For ppc601, search "power" before "powerpc32".
23271
23272	* mp?/Makefile.in (AR_FLAGS): New variable.
23273	(libmp?.a): Use it.
23274
23275	* make.bat: New file.
23276	* mpn/msdos: New directory.
23277	* mpn/msdos/asm-syntax.h: New file.
23278
23279	* mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
23280
23281	* config.sub: Recognize [ctj]90-cray.
23282
23283	* mpn/configure.in: Recognize [ctj]90-cray-unicos*.
23284
23285	* mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
23286
23287	* mpn/generic/gcd.c: Split increment from use of USIZE to avoid
23288	undefined behaviour.
23289
23290Thu Feb 29 04:11:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
23291
23292	* Makefile.in (install-info-files): Update for new install-info
23293	behaviour.
23294
23295	* mpn/power/add_n.s: Rewrite.
23296	* mpn/power/sub_n.s: Rewrite.
23297
23298Wed Feb 28 01:34:30 1996  Torbjorn Granlund  <tege@matematik.su.se>
23299
23300	* mpz/pow_ui.c: Compute allocation more aggressively for small bases.
23301	* mpz/ui_pow_ui.c: Likewise.
23302
23303	* mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
23304
23305	* mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
23306	* mpn/generic/gcd.c: Likewise.
23307	(SIGN_BIT): Compute differently.
23308
23309Mon Feb 26 00:07:36 1996  Torbjorn Granlund  <tege@matematik.su.se>
23310
23311	* All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
23312
23313	* Makefile.in (install, install-bsdmp, install-info-files): Depend
23314	on installdirs.  chmod all installed files.
23315
23316Sun Feb 25 01:47:41 1996  Torbjorn Granlund  <tege@matematik.su.se>
23317
23318	* mpbsd/configure.in: Delete debugging code.
23319
23320	* All Makefile.in: Update clean targets.
23321
23322	* Makefile.in (AR_FLAGS): New variable.
23323	(libgmp.a): Use it.
23324	(libmp.a): Likewise.
23325
23326	* VERSION: Delete file.
23327
23328	* Makefile.in (installdirs): New target.
23329	* mkinstalldirs: New file (from the texinfo package).
23330
23331	* Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
23332	(MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
23333	(install-info): New target.
23334	(install, install-bsdmp): Depend on install-info.
23335	($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
23336	into source directory.
23337	(distclean, mostlyclean): New targets.
23338	(maintainer-clean): New name for realclean.
23339	(uninstall): New target.
23340	(TAGS): New target.
23341	(info, dvi): New targets.
23342	(.PHONY): Assign.
23343
23344	* Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
23345
23346	* mp{n,z,f,bsd}/move-if-change: Delete.
23347
23348	* mpbsd/Makefile.in (stamp-stddefh): Delete target.
23349
23350	* Makefile.in (.c.o): Pass CFLAGS last.
23351	* mpbsd/Makefile.in (.c.o): Likewise.
23352	* mpf/Makefile.in (.c.o): Likewise.
23353	* mpq/Makefile.in (.c.o): Likewise.
23354	* mpz/Makefile.in (.c.o): Likewise.
23355	* mpn/Makefile.in (.c.o): Likewise.
23356	(.S.o): Likewise.
23357
23358	* memory.c: Change allocation error message.
23359
23360	* Makefile.in (install): Prefix gmp.h with $(srcdir).
23361	(install-bsdmp): Prefix mp.h with $(srcdir).
23362
23363	* mp{n,z,f,bsd}/{configure,config.sub}: Delete.
23364
23365	* Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
23366	(install targets): Install gmp.info-N.
23367
23368Sat Feb 24 03:36:52 1996  Torbjorn Granlund  <tege@matematik.su.se>
23369
23370	* mpf/get_str.c: Fix typo.
23371
23372	* mpz/legendre.c: Clarify expression with extra parens.
23373
23374	* version.c (gmp_version): Not static.
23375
23376	* mpf/iset_str.c: Properly return error code.
23377
23378	* mpf/add.c: Delete unused variables.
23379	* mpf/inp_str.c: Likewise.
23380	* mpq/get_d.c: Likewise.
23381
23382	* mpn/generic/dump.c: #include <stdio.h>.
23383	* mpf/dump.c: Likewise.
23384	* mpf/set_str.c: #include <ctype.h>.
23385	(strtol): Declare.
23386
23387	* gmp.h: mpn_sqrt => mpn_sqrtrem.
23388
23389	* Makefile.in (clean, realclean): Clean in mpbsd.
23390	(check): Test in mpf.
23391
23392	* mpf/Makefile.in (clean): Clean in tests.
23393	* mpq/Makefile.in (clean): Clean in tests.
23394
23395	* mpf/tests/Makefile.in: New file.
23396	* mpf/tests/configure.in: New file.
23397	* mpf/tests/t-addsub.c: New file.
23398
23399	* mpf/sub_ui.c: Simply call mpf_sub for now.
23400
23401	* mpf/sub.c: Increase prec by 1.
23402	* mpf/ui_sub.c: Likewise.
23403
23404Fri Feb 23 00:59:54 1996  Torbjorn Granlund  <tege@matematik.su.se>
23405
23406	* mpf/ui_sub.c: Fix typos.
23407
23408	* mpf/get_str.c: When allocating space for tmp, allow for an extra
23409	limb.  In code for fraction conversion, add special case for bases
23410	that are a power of 2.
23411
23412	* mpf/out_str.c: Output leading "0.".
23413	Default base to 10, before computing string allocation.
23414
23415	* mpf/get_str.c: Make variables for string size have type size_t.
23416	* gmp.h: Corresponding change.
23417
23418	* mpf/random2.c: Allow creation of prec+1 large mantissas.
23419
23420	* mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
23421	Fix typo in MPN_COPY offset.
23422	* mpf/sub_ui.c: Analogous changes.
23423
23424	* mpf/set_prec.c: Rewrite.
23425
23426	* mpf/init2.c: Compute precision as in set_prec.c.
23427
23428	* mpf/div_2exp.c: Special case for u == 0.
23429	* mpf/mul_2exp.c: Likewise.  Write r->_mp_size always.
23430
23431	* mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
23432	* mpf/sqrt.c: Likewise.  When computing new exponent, round quotient
23433	towards -infinity.
23434
23435	* mpf/add.c: Fix typos.
23436	* mpf/sub.c: Fix typos.
23437
23438Thu Feb 22 00:24:48 1996  Torbjorn Granlund  <tege@matematik.su.se>
23439
23440	* mpz/Makefile.in (stamp-stddefh): Delete target.
23441	(test): Delete target.
23442	* Makefile.in (stamp-stddefh): Delete target.
23443	(cre-stddefh.o): Delete target.
23444	(gmp.dvi): Set TEXINPUTS before invoking tex.
23445
23446	* cre-stddefh.c: Delete.
23447
23448	* mpz/sqrt.c: Fix typo.
23449
23450	* mpz/powm.c: Special case for mod == 0.
23451	* mpz/powm_ui.c: Likewise.
23452
23453	* mpz/get_si.c: Handle -0x80000000 correctly.
23454
23455	* mpz/inp_str.c: Now returns size_t.
23456	Make it return number of bytes read or error indication.
23457	* mpf/inp_str.c: Likewise.
23458
23459	* mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
23460	* mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
23461	* mpz/inp_binary.c: Delete.
23462
23463	* mpn/Makefile.in (XCFLAGS): Remove variable.
23464	(.c.o): Don't pass XCFLAGS.
23465	(SFLAGS): Set to nothing.
23466	(.S.o): Pass SFLAGS, not XCFLAGS.
23467
23468	* mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
23469
23470	* mpf/out_str.c: Make return number of bytes written or error
23471	indication.
23472	* mpz/out_str.c: Likewise.
23473	* gmp.h: Corresponding changes.
23474
23475	* gmp.h (__mpz_struct): mp_size_t => int.
23476	(__mpq_struct): Likewise.
23477	(__mpf_struct): Likewise.
23478	(mp_size_t): int => long int.
23479
23480	* mpn/cray: New directory.
23481	* mpn/cray/gmp-mparam.h: New file.
23482	* mpn/configure.in: Recognize cray variants.
23483
23484	* Makefile.in: Set defaults for prefix, libdir, etc.
23485	(install): New target.
23486	(install-bsdmp): New target.
23487	(gmp.html): New target.
23488
23489	* stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
23490
23491Wed Feb 21 04:35:02 1996  Torbjorn Granlund  <tege@matematik.su.se>
23492
23493	* gmp.h: Sort mpn declarations.
23494	(mpn_gcdext): Add declaration.
23495
23496	* mpn/generic/divrem_1.c: New file.
23497	* mpn/Makefile.in (divrem_1.o): New rule.
23498	* configure.in (functions): Add divrem_1.
23499
23500	* mpn/generic/divmod.c: Delete file.
23501	* mpn/configure.in (functions): Delete divmod.
23502	* Makefile.in (divmod.o): Delete rule.
23503	* gmp.h (mpn_divmod): New #define.
23504
23505	* gmp.h (mpn_next_bit_set): Delete spurious declaration.
23506
23507	* mpn/generic/divrem.c (default case): In code assigning
23508	most_significant_q_limb, move reassignment of n0 into if statement.
23509
23510	* gmp.h (mpf_inp_str): Fix typo.
23511	(mpf_out_str): Make prototype match reality.
23512	* mpf/inp_str.c: New file.
23513	* mpf/out_str.c: New file.
23514	* mpf/Makefile.in: Compile new files.
23515
23516	* mpn/Makefile.in (dump.o): Fix dependency path.
23517	(inlines.o): Likewise.
23518
23519	* mpn/configure.in: Make m68060 be the same as m68000.  Clean up
23520	m68k configs.
23521
23522Tue Feb 20 01:35:11 1996  Torbjorn Granlund  <tege@matematik.su.se>
23523
23524	* mpn/generic/sqrtrem.c: Renamed from sqrt.
23525	* mpn/configure.in (functions): Corresponding change.
23526	* mpn/Makefile.in: Likewise.
23527	* mpz/sqrtrem.c: Likewise.
23528	* mpz/sqrt.c: Likewise.
23529	* mpn/generic/perfsqr.c: Likewise.
23530
23531	* Makefile.in (clean): Also remove libmp.a.
23532	Don't compile cre-conv-tab.c or mp_bases.c.
23533	cre-conv-tab.c: Delete file.
23534	(gmp.ps): New rule.
23535
23536	* mpn/mp_bases.c: New file.
23537	* mpn/Makefile.in: Compile mp_bases.c.
23538
23539	* mpz/set_str.c: Skip initial whitespace.
23540	* mpf/set_str.c: Likewise.
23541	* mpbsd/xtom.c: Likewise.
23542
23543	* gmp.h: Add missing mpz declarations.
23544	Delete all formal parameter names from declarations.
23545
23546	* mpn/Makefile.in: Add dependencies for .c files.
23547
23548	* Makefile.in (check): Write recursive make calls separately, not as
23549	a loop.
23550	(FLAGS_TO_PASS): New variable.  Use it for most recursive makes.
23551
23552Mon Feb 19 01:02:20 1996  Torbjorn Granlund  <tege@matematik.su.se>
23553
23554	* mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
23555	lines starting with #.
23556	(CPP): Set to $(CC) -E to avoid gcc dependency.
23557
23558	* mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
23559
23560	* mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
23561	code.
23562	* mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
23563
23564	* gmp.h: Fix typos in #defines of recently added mpn functions.
23565
23566	* mpz/inp_str.c: Skip all whitespace, not just plain space.
23567	* mpbsd/min.c: Likewise.
23568
23569	* mpn/configure.in (functions): Add gcdext.
23570	* mpn/generic/gcdext.c: New file.
23571
23572	* mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
23573
23574	* gmp.h: Surround mpn declarations with extern "C" { ... }.
23575
23576	* Makefile.in (check): New target.
23577
23578	* mpq/get_d.c: Update comments.  Use rsize instead of dsize + N_QLIMBS
23579	when possible.  Add special case for nsize == 0.
23580
23581	* gmp.h (mpq_get_d): Add declaration.
23582	(mpq_canonicalize): Likewise.
23583	(mpq_cmp_ui): Likewise.
23584	(mpf_diff): Likewise.
23585	(mpf_ui_sub): Likewise.
23586	(mpf_set_prec): Likewise.
23587	(mpf_random2): Likewise.
23588
23589	* gmp.h (mpz_cmp_ui): New #define.
23590	(mpz_cmp_si): New #define.
23591	(mpq_cmp_ui): New #define.
23592	(mpz_sign): New #define.
23593	(mpq_sign): New #define.
23594	(mpf_sign): New #define.
23595	(mpq_numref): New #define.
23596	(mpq_denref): New #define.
23597
23598	* mpq/set_z.c: File deleted.
23599	* mpq/Makefile.in: Corresponding changes.
23600
23601Sun Feb 18 01:34:47 1996  Torbjorn Granlund  <tege@matematik.su.se>
23602
23603	* mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
23604
23605	* mpz/inp_binary.c: Default stream to stdin.
23606	* mpz/inp_str.c: Likewise.
23607	* mpz/inp_raw.c: Likewise.
23608	* mpz/out_binary.c: Default stream to stdout.
23609	* mpz/out_raw.c: Likewise.
23610	* mpz/out_str.c: Likewise.
23611
23612	* mpbsd/realloc.c: New file.
23613	* mpbsd/Makefile.in: Corresponding changes.
23614
23615	* mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
23616	* mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
23617
23618	* mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
23619	spaces in each 10th position.
23620	* mpbsd/xtom.c: Rewrite (base on mpz/set_str).
23621
23622	* mpq/tests/Makefile.in (st-cmp): New file.
23623	* mpq/tests/configure.in (srcname): New file.
23624
23625	* mpz/tests/configure.in (srcname): Fix typo.
23626
23627	* mpq/cmp.c: Add check using number of significant bits, to avoid
23628	general multiplication.
23629
23630Sat Feb 17 11:58:30 1996  Torbjorn Granlund  <tege@matematik.su.se>
23631
23632	* mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
23633
23634	* mpq/tests: New directory.
23635	* mpq/tests/t-cmp.c: New file.
23636	* mpq/tests/t-cmp_ui.c: New file.
23637
23638	* mpz/tests/dive.c (main): Generate zero numerator.
23639	(get_random_size) : Delete.
23640
23641	* mpz/divexact.c: Add special case for 0/x.
23642
23643	* gmp.h (mpz_mod): Add declaration.
23644
23645Fri Feb 16 18:18:39 1996  Andreas Schwab  <schwab@informatik.uni-dortmund.de>
23646
23647	* mpn/m68k/*: Rewrite code not to use the INSN macros.
23648	(L): New macro to properly prefix local labels for ELF.
23649
23650Fri Feb 16 00:20:56 1996  Torbjorn Granlund  <tege@matematik.su.se>
23651
23652	* gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
23653	fields.
23654	* mpn/generic/inlines.c (_FORCE_INLINES): New #define.  Delete
23655	conditional __GNUC__.
23656	* gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
23657	Only define these if __GNUC__ || _FORCE_INLINES.
23658	* mpf/random2.c: Add missing parameter in non-ANSI header.
23659	* mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
23660	in AIX compilers.
23661	* mpq/get_d.c: #define N_QLIMBS.
23662	* mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
23663	* stack-alloc.c: Cast void* pointer to char* before doing arithmetic
23664	on it.
23665
23666	* Makefile.in (mpbsd/libmpbsd.a): New rule.
23667	* configure.in (configdirs): Add mpbsd.
23668
23669	* gmp.h: Add declarations for a few missing mpn functions.
23670
23671	* Makefile.in (libmp.a): New rule.
23672
23673	* mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
23674	* gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
23675	* mp.h: Likewise.  Update typedefs from gmp.h.
23676	* mpbsd/configure.in: New file.
23677	* mpbsd/Makefile.in: New file.
23678	* mpbsd/configure: Link to master configure.
23679	* mpbsd/config.sub: Link to master config.sub.
23680
23681	* Makefile.in: Set RANLIB_TEST.
23682	* (libgmp.a): Use it.
23683	* (libgmp.a): Do ranlib before moving the libgmp.a to the build
23684	directory.
23685	* mp?/Makefile.in: Don't use or set RANLIB.
23686
23687Thu Feb 15 16:38:41 1996  Torbjorn Granlund  <tege@matematik.su.se>
23688
23689	* mpz/add_ui.c: MP_INT => mpz_t.
23690	* mpz/cmp_ui.c: Likewise.
23691	* mpz/fac_ui.c: Likewise.
23692	* mpz/inp_binary.c: Likewise.
23693	* mpz/inp_raw.c: Likewise.
23694	* mpz/legendre.c: Likewise.
23695	* mpz/jacobi.c: Likewise.
23696	* mpz/out_binary.c: Likewise.
23697	* mpz/out_raw.c: Likewise.
23698	* mpz/random2.c: Likewise.
23699	* mpz/random.c: Likewise.
23700	* mpz/realloc.c: Likewise.
23701
23702	* mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
23703	__mpz_odd_less1_2factor => mpz_scan1(X,1).
23704	* mpz/ntsup.c: File deleted.
23705	* mpz/Makefile.in: Corresponding changes.
23706
23707	* mpz/pprime_p: Use mpz_scan1 to avoid looping.
23708
23709	* mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
23710	* mpz/pprime_p.c: Pass long to *_ui functions.
23711	* mpz/gcdext.c: Likewise.
23712	* mpz/fdiv_r_2exp.c: Likewise.
23713	* mpz/fac_ui.c: Likewise.
23714
23715	* mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
23716
23717	* mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
23718
23719	* mpz/cmp_ui.c: #undef mpz_cmp_ui.
23720	* mpz/cmp_si.c: #undef mpz_cmp_si.
23721	* gmp.h (mpz_cmp_ui): New #define.
23722	(mpz_cmp_si): New #define.
23723
23724Wed Feb 14 22:11:24 1996  Torbjorn Granlund  <tege@matematik.su.se>
23725
23726	* gmp.h: Test __cplusplus in addition to __STDC__.
23727	* gmp-impl.h: Likewise.
23728
23729	* gmp.h: Surround declarations with extern "C" { ... }.
23730
23731Tue Feb 13 15:20:45 1996  Torbjorn Granlund  <tege@matematik.su.se>
23732
23733	* mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
23734	* mpz/tdiv_r_2exp.c: Likewise.
23735
23736	* mpz/fdiv_r_2exp.c: New file.
23737	* mpz/fdiv_q_2exp.c: New file.
23738	* mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
23739	* mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
23740	* mpz/Makefile.in: Corresponding changes.
23741
23742	* mpz/scan0.c,scan1.c: New files.
23743	* mpz/Makefile.in: Compile them.
23744
23745	* gmp.h (mpn_normal_size): Delete.
23746
23747	* config.guess: Update from Cygnus version.
23748
23749	* mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
23750	* mpn/m68k/lshift.S: Likewise.
23751
23752	* mpn/configure.in: Fix configuration for plain 68000.
23753
23754Mon Feb 12 01:06:06 1996  Torbjorn Granlund  <tege@matematik.su.se>
23755
23756	* mpz/tests/t-powm.c: Generate negative BASE operand.
23757
23758	* mpz/powm.c: Make result always positive.
23759
23760Sun Feb 11 01:44:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23761
23762	* mpz/tests/*.c: Add t- prefix.
23763	* mpz/tests/Makefile.in: Corresponding changes.
23764	* mpz/tests/configure.in: Update srctrigger.
23765
23766	* mpz/tests/gcd.c: Generate negative operands.
23767	* mpz/tests/gcd2.c: Likewise.
23768
23769	* mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
23770
23771Thu Feb  8 17:16:12 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
23772
23773	* mp{z,n}/gcd.c: Change mpn_gcd interface.
23774	* gmp.h: Ditto.
23775	* gmp.texi: update documentation.
23776
23777Mon Feb  7 23:58:43 1996  Andreas Schwab  <schwab@informatik.uni-dortmund.de>
23778
23779	* mpn/m68k/{lshift,rshift}.S: New files.
23780	* mpn/m68k/syntax.h: New ELF_SYNTAX macros.
23781	(MEM_INDX, R, PROLOG, EPILOG): New macros.
23782	* mpn/m68k/*.S: Use R macro with register name.  Use PROLOG and EPILOG
23783	macros.  Rename `size' to `s_size' or s1_size to avoid clash with ELF
23784	.size directive.
23785	* mpn/configure.in: New target m68k-*-linux*.
23786
23787Wed Feb  7 07:41:31 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23788
23789	* Makefile.in (cre-conv-tab): Workaround for SunOS make.
23790
23791	* mpz/tests/reuse.c: New file.
23792	* mpz/tests/Makefile.in: Handle reuse.c.
23793
23794Tue Feb  6 11:56:24 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
23795
23796	* mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
23797
23798Tue Feb  6 01:36:39 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23799
23800	* gmp.h (mpz_divexact): Delete parameter names.
23801	(mpz_lcm): Delete spurious declaration.
23802
23803	* mpz/dmincl.c: Fix typo.
23804
23805Mon Feb  5 01:11:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23806
23807	* mpn/generic/gcd.c (gcd_2): Declare consistently.
23808
23809	* mpz/tdiv_q.c: Optimize division by a single-limb divisor.
23810	* mpz/dmincl.c: Likewise.
23811
23812	* mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
23813	* mpz/sub.c: Likewise.
23814	* mpn/generic/sqrt.c: Likewise.
23815
23816	* mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
23817	destination arrays.
23818
23819Fri Feb  2 02:21:27 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23820
23821	* mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
23822	* mpz/Makefile.in: Compile them.
23823
23824	* mpn/Makefile.in (INCLUDES): Don't search in `generic'.
23825
23826Thu Feb  1 02:15:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23827
23828	Change from Ken Weber:
23829	* mpz/divexact.c: Make it work when quot is identical to either input.
23830
23831	* mpf/ui_sub.c: New file.
23832	* mpf/Makefile.in: Compile it.
23833
23834	* gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
23835	* mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
23836	these use MPZ_TMP_INIT.
23837	* mpz/mod.c: Likewise.
23838	* mpq/{add,sub}.c: Likewise.
23839	* mpq/canonicalize: Likewise.
23840
23841	* mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
23842	* mpq/canonicalize.c: Likewise.
23843
23844Wed Jan 31 01:45:00 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23845
23846	* mpn/generic/gcd.c: Misc changes from Ken.
23847
23848	* mpz/tests/gcd2.c: New file.
23849	* mpz/tests/Makefile.in: Handle gcd2.c.
23850
23851	* mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
23852	not orig_vsize.  Fix parameter declaration.
23853
23854	* mpz/mod_ui.c: Delete file.
23855	* mpz/Makefile.in: Don't try to compile mod_ui.
23856
23857	* mpz/cdiv_*_ui.c): Make them work right.
23858	* gmp.h: Declare cdiv*.
23859
23860Tue Jan 30 02:22:56 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23861
23862	* mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
23863	cdiv_r_ui.c,cdiv_ui.c}: New files.
23864	* mpz/Makefile.in: Compile them.
23865
23866	* All files: Make file permissions right.
23867
23868	Changes from Ken Weber:
23869	* mpn/generic/accelgcd.c: Delete.
23870	* mpn/generic/bingcd.c: Delete.
23871	* mpn/generic/numbits.c: Delete.
23872	* mpn/generic/gcd.c: New file.
23873	* mpn/configure.in (functions): Update accordingly.
23874	* mpz/divexact.c: New file.
23875	* mpz/Makefile.in: Compile divexact.c.
23876	* mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
23877	* gmp.h: declare new functions, delete obsolete declarations.
23878	* mpz/tests/dive.c: New file.
23879	* mpz/tests/Makefile.in: Handle dive.c.
23880
23881Mon Jan 29 03:53:24 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23882
23883	* mpz/random.c: Handle negative SIZE parameter.
23884
23885	* mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
23886	* mpz/tests/tst-mdm(_ui).c: Delete.
23887	* mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
23888	* mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
23889	* mpz/tests/Makefile.in: Corresponding changes.
23890	* mpz/tests/configure.in: Update srctrigger.
23891
23892	* mpn/generic/divmod.c: Update from divrem.
23893	* mpn/generic/divrem.c: Misc cleanups.
23894
23895Sun Jan 28 03:25:08 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23896
23897	* All files: Use new TMP_ALLOC interface.
23898
23899	* mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
23900
23901	* mpz/tests/powm_ui.c: New file.
23902	* mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
23903
23904	* Makefile.in: Update dependency list.
23905	* mpf/Makefile.in: Likewise.
23906	* mpz/Makefile.in: Likewise.
23907	* mpq/Makefile.in: Likewise.
23908	* Makefile.in: Set RANLIB simply to ranlib, and allow configure
23909	to override it.
23910
23911	* mpz/Makefile.in (conf): Delete spurious target.
23912	(mp_bases.c): Delete.
23913	(cre-conv-tab rules): Delete.
23914
23915	* Makefile.in (cre-conv-tab): Greatly simplify.
23916
23917Sat Jan 27 13:38:15 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23918
23919	* stack-alloc.c: New file.
23920	* stack-alloc.h: New file.
23921
23922	* gmp.h (__gmp_inline): Define using __inline__.
23923
23924Thu Jan 25 00:28:37 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23925
23926	* mpn/generic/scan0.c: New file.
23927	* mpn/generic/scan1.c: Renamed from next_bit.c.
23928	* mpn/configure.in (functions): Include scan0 and scan1.
23929
23930	* mpn/m68k/*: #include sysdep.h.  Use C_GLOBAL_NAME.
23931
23932	* configure: Update from Cygnus version.
23933	* config.guess: Likewise.
23934	* config.sub: Likewise.
23935	* configure: Pass --nfp to recursive configures.
23936
23937	* mpz/tests/tst-*.c: Adjust SIZE and reps.
23938
23939	* mpz/powm.c: Move esize==0 test earlier.
23940	In final reduction of rp,rsize, don't call mpn_divmod unless
23941	reduction is really needed.
23942
23943	* mpz/tests/tst-powm.c: Fix thinko in checking code.
23944
23945	* All files: Get rid of `__' prefix from mpn_* calls and declarations.
23946	* gmp.h: #define __MPN.
23947	* gmp.h: Use __MPN in #defines for mpn calls.
23948
23949	* mpn/generic/mul_n.c: Prepend `i' to internal routines.
23950	* gmp-impl.h: Add #defines using __MPN for those internal routines.
23951
23952	* mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
23953
23954Wed Jan 24 13:28:19 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23955
23956	* mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
23957	* mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
23958	* mpn/sparc32/v8/supersparc: New directory.
23959	* mpn/sparc32/v8/supersparc/udiv.S: New file.
23960
23961Tue Jan 23 01:10:11 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23962
23963	This major contribution is from Ken Weber:
23964	* mpn/generic/accelgcd.c: New file.
23965	* mpn/generic/bdivmod.c: New file.
23966	* mpn/generic/bingcd.c: New file.
23967	* mpn/generic/gcd_1.c: Rewrite.
23968	* mpn/generic/numbits.c: New file (to go away soon).
23969	* mpz/gcd.c: Rewrite.
23970	* mpz/tests/tst-gcd.c (SIZE): Now 128.
23971	* gmp.h: Declare new functions.
23972	* mpn/configure.in (functions): List new files.
23973	* gmp-impl.h (MPN_SWAP): Delete.
23974	(MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
23975	(MPN_COMPL_INCR, MPN_COMPL): Delete.
23976
23977Mon Jan 22 02:04:59 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23978
23979	* gmp.h (mpn_name): New #define.
23980
23981	* mpn/m88k/mc88110/addmul_1.s: New file.
23982	* mpn/m88k/mc88110/add_n.S: New file.
23983	* mpn/m88k/mc88110/sub_n.S: New file.
23984
23985	* mpn/m88k/sub_n.s: Correctly initialize carry.
23986
23987	* mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
23988
23989Sun Jan 21 00:04:35 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23990
23991	* mpn/sparc64/addmul_1.s: New file.
23992	* mpn/sparc64/submul_1.s: New file.
23993	* mpn/sparc64/rshift.s: New file.
23994
23995Sat Jan 20 00:32:54 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
23996
23997	* mpz/iset.c: Fix typo introduced Dec 25.
23998
23999Wed Jan 17 13:16:44 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24000
24001	* config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
24002	* config/mt-sparcv8-gcc: Delete.
24003	* configure.in: Corresponding changes.
24004
24005Tue Jan 16 16:31:01 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24006
24007	* gmp-impl.h: #include alloca.h when necessary.
24008
24009	* longlong.h: Test __alpha instead of __alpha__, since the former
24010	is the standard symbol.
24011
24012Mon Jan 15 18:06:57 1996  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24013
24014	* mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
24015	* mpn/sparc64/lshift.s: New file.
24016
24017Fri Dec 29 17:34:03 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24018
24019	* mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
24020	* mpn/x86/pentium/sub_n.S: Likewise.
24021
24022Thu Dec 28 03:16:57 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24023
24024	* mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
24025	of loop induction variable and load insn at beginning of loop.
24026	* mpn/x86/pentium/addmul_1.S: Likewise.
24027	* mpn/x86/pentium/submul_1.S: Likewise.
24028
24029Mon Dec 25 23:22:55 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24030
24031	* All files: Prefix user-visible structure fields with _mp_.
24032
24033Fri Dec 22 20:42:17 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24034
24035	* mpn/configure.in (m68k configs): Terminate path variable with
24036	plain "m68k".
24037
24038Fri Dec 22 03:29:33 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24039
24040	* mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
24041	clean things up.
24042
24043	* mpn/configure.in (m68k configs): Update #include path for new
24044	mpn directory organization.
24045
24046Tue Dec 12 02:53:02 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24047
24048	* gmp.h: Prefix all structure field with _mp_.
24049	* gmp-impl.h: Define access macros for these fields.
24050
24051Sun Dec 10 00:47:17 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24052
24053	* mpn/alpha/addmul_1.s: Prefix labels with `.'.
24054	* mpn/alpha/submul_1.s: Likewise.
24055	* mpn/alpha/[lr]shift.s: Likewise.
24056	* mpn/alpha/udiv_qrnnd.S: Likewise.
24057	* mpn/alpha/ev5/[lr]shift.s: Likewise.
24058
24059	* mpn/alpha/ev5/lshift.s: Fix typos.
24060
24061Fri Dec  1 14:28:20 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24062
24063	* mpn/Makefile.in (.SUFFIXES): Define.
24064
24065Wed Nov 29 23:11:57 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24066
24067	* mpn/sparc64/{add_n.s, sub_n.s}: New files.
24068
24069Tue Nov 28 06:03:13 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24070
24071	* mpn/x86/syntax.h: Handle ELF_SYNTAX.
24072	Rename GAS_SYNTAX => BSD_SYNTAX.
24073
24074	* mpn/configure.in: Handle linuxelf and SysV for x86 variants.
24075
24076Mon Nov 27 01:32:12 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24077
24078	* mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
24079
24080Sun Nov 26 04:30:47 1995  Torbjorn Granlund  <tege@noisy.matematik.su.se>
24081
24082	* mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
24083
24084	* mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
24085	* mpn/sparc32/sub_n.S: Likewise.
24086
24087Fri Nov 17 00:18:46 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24088
24089	* mpn/configure.in: Handle m68k on NextStep.
24090
24091Thu Nov 16 02:30:26 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24092
24093	* mpn: Reorganize machine-specific directories.
24094	* mpn/configure.in: Corresponding changes.
24095	(sh, sh2): Handle these.
24096	(m68k targets): Create asm-syntax.h.
24097
24098Thu Nov  9 02:20:50 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24099
24100	* mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
24101	(____mpn_mul_n): Likewise.
24102
24103Tue Nov  7 03:25:12 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24104
24105	* mpf/get_str.c: In exponentiation code (two places), don't swap
24106	input and output areas when calling mpn_mul_1.
24107	* mpf/set_str.c: Likewise.
24108
24109Fri Nov  3 02:35:58 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24110
24111	* mpf/Makefile.in: Make sure all objects are listed in dependency list;
24112	delete spurious entries.
24113
24114	* mpf/mul.c: Handle U or V being 0.  Allow prec+1 for result precision.
24115
24116	* mpf/set_prec.c: New computation of limb precision.
24117	* mpf/set_dfl_prec.c: Likewise.
24118
24119	* mpf/random2.c: Fix typo computing exp.
24120	* mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
24121	the user-requested number of digits, n_digits.
24122
24123Thu Nov  2 16:25:07 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24124
24125	* mpn/generic/divrem.c (case 2): Don't move np vector back, it is
24126	never read.
24127	(default case): Put most significant limb from np in new variable n2;
24128	decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
24129
24130Wed Nov  1 02:59:53 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24131
24132	* mpn/sparc/[lr]shift.S: New files.
24133
24134Tue Oct 31 00:08:12 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24135
24136	* mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
24137
24138	* gmp-impl.h (assert): Delete definition.
24139
24140	* mpf/sub.c: Delete all assert calls.  Delete variable `cy'.
24141
24142	* mpf/neg.c: Use prec+1 as precision.  Optimize for when arguments
24143	are the same.
24144	* mpf/abs.c: Likewise.
24145	* mpf/{set,neg,abs}.c: Make structure and variable names similar.
24146
24147Mon Oct 30 12:45:26 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24148
24149	* mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
24150	* mpn/generic/random2.c (random): Likewise.
24151
24152Sun Oct 29 01:54:28 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24153
24154	* mpf/div.c: Special handle U or V being 0.
24155
24156	* mpf/random2.c: New file.
24157
24158	* longlong.h (i860 rshift_rhlc): Define.
24159	(i960 udiv_qrnnd): Define.
24160	(i960 count_leading_zeros): Define.
24161	(i960 add_ssaaaa): Define.
24162	(i960 sub_ddmmss): Define.
24163	(i960 rshift_rhlc): Define.
24164
24165Sat Oct 28 19:09:15 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24166
24167	* mpn/pentium/rshift.S: Fix and generalize condition for when to use
24168	special code for shift by 1.
24169	* mpn/pentium/lshift.S: Likewise.
24170
24171Thu Oct 26 00:02:56 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24172
24173	* gmp.h: #undef __need_size_t.
24174	* mp.h: Update from gmp.h.
24175
24176Wed Oct 25 00:17:27 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24177
24178	* mpf/Makefile.in: Compile set_prec.c.
24179	* mpf/realloc.c: Delete this file.
24180	* mpf/Makefile.in: Delete mentions of realloc.c.
24181
24182	* gmp.h (__mpf_struct): Get rid of `alloc' field.
24183	* mpf/clear.c: Likewise.
24184	* mpf/init*.c: Likewise.
24185	* mpf/set_prec.c: Likewise.
24186	* mpf/iset*.c: Likewise.
24187
24188	* mpf/iset_str.c: New file.
24189
24190	* mpn/configure.in: Handle pyramid.
24191
24192	* mpf/set.c: Use prec+1 as precision.
24193
24194	* mpf/set_prec.c: New file.
24195
24196Tue Oct 24 00:56:41 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24197
24198	* mpn/generic/divrem.c: New file.  Will replace mpn/generic/divmod.c
24199	when rest of source is converted.
24200	* mpn/configure.in (functions): Add `divrem'
24201	* mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
24202
24203	* mpf/get_str.c: Completely rewritten.
24204	* mpf/add.c: Fix several problems.
24205	* mpf/sub.c: Compare operands from most significant end until
24206	first difference, exclude skipped limbs from computation.
24207	Accordingly simplify normalization code.
24208	* mpf/set_str.c: Fix several problems.
24209	* mpf/dump.c: New file.
24210	* mpf/Makefile.in: Compile dump.c.
24211	* mpf/init2.c: Set prec field correctly.
24212
24213Sun Oct 22 03:02:09 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24214
24215	* cre-conv-tab.c: #include math.h; don't declare log and floor.
24216
24217Sat Oct 21 23:04:10 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24218
24219	* mpf/mul_ui.c: Handle U being 0.
24220
24221Wed Oct 18 19:39:27 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24222
24223	* mpn/generic/set_str.c: Correctly handle input like "000000000000".
24224	Misc cleanups.
24225
24226Tue Oct 17 15:14:13 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24227
24228	* longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
24229	appropriate.
24230
24231Mon Oct 16 19:14:43 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24232
24233	* mpf/add.c: Rewrite.
24234	* mpf/set_str.c: New file.  Needs more work.
24235
24236Sat Oct 14 00:14:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24237
24238	* mpf/div_2exp.c: Vastly simplify.
24239	* mpf/mul_2exp.c: Likewise.
24240
24241	* mpf/sub.c: Rewrite.
24242
24243	* gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
24244
24245	* mpf/dump.c: Free allocated memory.
24246
24247	* gmp-impl.h (assert): Define.
24248
24249Wed Oct 11 13:31:00 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24250
24251	* mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
24252
24253Tue Oct 10 00:37:21 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24254
24255	* mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
24256
24257	* mpn/powerpc32/{lshift.s,rshift.s}: New files.
24258
24259	* configure.in: Fix typo.
24260
24261Sat Oct  7 08:17:09 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24262
24263	* longlong.h (smul_ppmm): Correct type of __m0 and __m1.
24264
24265Wed Oct  4 16:31:28 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24266
24267	* mpn/configure.in: Handle alphaev5.
24268	* mpn/ev4: New name for alpha subdir.
24269	* mpn/ev5: New subdir.
24270	* mpn/ev5/lshift.s: New file.
24271
24272Tue Oct  3 15:06:45 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24273
24274	* mpn/alpha/mul_1.s: Avoid static increments of pointers; use
24275	corresponding offsets in ldq and stq instructions instead.
24276	(Loop): Swap cmpult and stq to save one cycle on EV5.
24277
24278	* mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
24279	submul_1.s}: Don't check results if NOCHECK is defined.
24280
24281Mon Oct  2 11:40:18 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24282
24283	* longlong.h (mips umul_ppmm [32 and 64 bit versions]):
24284	Make new variants, based on GCC version number, that use `l' and `h'
24285	constraints instead of explicit mflo and mfhi instructions
24286
24287Sun Oct  1 00:17:47 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24288
24289	* mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
24290	* mpn/mc88100/sub_n.s: Likewise.
24291
24292	* config/mt-m88110: New file.
24293	* configure.in: Use it.
24294
24295	* mpn/mc88110/mul_1.s: Fix thinko.
24296
24297Sat Sep 30 21:28:19 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24298
24299	* mpz/set_d.c: Declare `size' at function start.
24300
24301	* experimental: New directory for mpx and mpz2.
24302
24303	* mpz/tdiv_q.c: Clarify comments.
24304	* mpz/{mod.c,mod_ui.c}: New file, for math mod function.
24305
24306	* mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
24307
24308	* mpn/sh/{add_n.s,sub_n.s}: New files.
24309
24310	* mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
24311
24312	* mpn/i960/{add_n.s,sub_n.s}: New files.
24313
24314	* mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
24315	to save cycles on EV5.
24316	* mpn/alpha/submul_1.s: Ditto.
24317	* mpn/alpha/mul_1.s: Ditto.
24318
24319Thu Sep 28 02:48:59 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24320
24321	* gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
24322	_LONG_LONG_LIMB is defined.
24323
24324	* longlong.h (m88110): Test __m88110__, not __mc88110__
24325
24326	* mpn/mc88110/mul_1.s: Rewrite.
24327
24328Tue Sep 26 23:29:05 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24329
24330	* config.sub: Update from current Cygnus version.
24331
24332	* mpn/configure.in: Recognize canonical m88*, not mc88*.
24333
24334Fri Sep 22 14:58:05 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24335
24336	* mpz/set_d.c: New file.
24337	* mpz/Makefile.in: Build new files.
24338
24339	* mpq/get_d.c: Replace usage of scalbn with ldexp.
24340
24341	* mpn/{vax,i386}/gmp-mparam.h: New files.
24342	* gmp-impl.h (ieee_double_extract): Define here.
24343	* mpf/set_d.c (ieee_double_extract): Not here.
24344
24345Thu Sep 21 00:56:36 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24346
24347	* longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
24348	(udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
24349	protect with new symbol LONGLONG_STANDALONE.
24350	(68000 umul_ppmm): Use %# prefix for immediate constants.
24351
24352Wed Sep 20 15:36:23 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24353
24354	* mpn/generic/divmod_1.c: Handle
24355	divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
24356	specifically also when normalization_steps != 0.
24357
24358Mon Sep 18 15:42:30 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24359
24360	* mpq/get_d.c: New file.
24361
24362Sun Sep 17 02:04:36 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24363
24364	* longlong.h (pyr): Botch up for now.
24365
24366Sat Sep 16 00:11:50 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24367
24368	* mpn/clipper/mul_1.s: New file.
24369	* mpn/clipper/add_n.s: New file.
24370	* mpn/clipper/sub_n.s: New file.
24371	* mpn/configure.in: Handle clipper*-*-*.
24372
24373	* mpn/configure.in: Recognize rs6000-*-*.
24374
24375Fri Sep 15 00:41:34 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24376
24377	* mpn/alpha/add_n.s: New file.
24378	* mpn/alpha/sub_n.s: New file.
24379
24380	* mpn/mips3: New name for mpn/r4000.
24381	* mpn/mips2: New name for mpn/r3000.
24382	* mpn/configure.in: Corresponding changes.
24383
24384	* mpn/generic/perfsqr.c (primes): Delete.
24385	(residue_map): Delete.
24386
24387Thu Sep 14 00:07:58 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24388
24389	* mpn/r3000/sub_n.s: Fix typo.
24390
24391	* dm_trunc.c: Delete spurious file.
24392
24393	* mpz/out_binary.c: Fix typo.
24394
24395	* mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
24396
24397	* gmp-impl.h: For sparc and sgi, include alloca.h.
24398
24399	* mpn/z8000/mul_1.s: Replace `test r' with `and r,r'.  Replace
24400	`ldk r,#0' with `xor r,r'.
24401
24402Wed Sep  6 00:58:38 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24403
24404	* mpz/inp_binary.c: New file.
24405	* mpz/out_binary.c: New file.
24406	* mpz/Makefile.in: Build new files.
24407
24408Tue Sep  5 22:53:51 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24409
24410	* gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
24411	and size fields.
24412
24413Sat Sep  2 17:47:59 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24414
24415	* mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
24416	* mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
24417	derived from r4000 code.
24418
24419Fri Sep  1 05:35:52 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24420
24421	* mpn/r3000/mul_1.s: Fix typo.
24422
24423	* mpn/powerpc32: Fix some old vs new mnemonic issues.
24424
24425	* mpn/powerpc32/{add_n.s,sub_n.s}: New files.
24426	* mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
24427
24428Wed Aug 30 10:43:47 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24429
24430	* mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
24431	* mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
24432
24433	* config.guess: Update to latest FSF revision.
24434
24435Mon Aug 28 02:18:13 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24436
24437	* mpz/out_str.c: Cast str to char * in fputs call.
24438
24439	* gmp-impl.h: Define UQItype, SItype, and USItype also
24440	when not __GNUC__.
24441
24442Fri Aug 25 01:45:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24443
24444	* mpn/i386/syntax.h: Renamed from asm-syntax.h.
24445	* mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
24446	* mpn/configure.in: Corresponding changes.
24447
24448Sun Aug 13 19:20:04 1995  Torbjorn Granlund  <tege@bozo.matematik.su.se>
24449
24450	* mpn/generic/random2.c: Test __hpux, not hpux.
24451
24452Sat Apr 15 20:50:33 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24453
24454	* mpn/sparc/add_n.S: Make it work for PIC.
24455	* mpn/sparc/sub_n.s: Likewise.
24456	* mpn/sparc8/addmul_1.S: Likewise.
24457	* mpn/sparc8/mul_1.S: Likewise.
24458	* mpn/i386/add_n.S: Likewise.
24459	* mpn/i386/sub_n.S: Likewise.
24460
24461Thu Apr 13 23:15:03 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24462
24463	* mpn/configure.in: Don't search power subdir for generic ppc configs.
24464	Add some ppc cpu-specific configs.  Misc clean up.
24465
24466Mon Apr 10 00:16:35 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24467
24468	* mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
24469
24470Sun Apr  9 12:38:11 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24471
24472	* longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
24473	not in asm.
24474
24475	* mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
24476
24477Tue Mar 28 00:19:52 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24478
24479	* mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
24480
24481Fri Mar 17 23:29:22 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24482
24483	* longlong.h (SH umul_ppmm): Define.
24484
24485Thu Mar 16 16:40:44 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24486
24487	* mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
24488	to help CSE.
24489
24490Fri Mar 10 20:03:49 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24491
24492	* mpn/powerpc32/mul_1.s: Clear cy before entering loop.
24493	Rearrange loop to save a cycle.
24494	* mpn/powerpc32/addmul_1.s: New file.
24495	* mpn/powerpc32/submul_1.s: New file.
24496
24497Fri Feb 17 22:44:45 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24498
24499	* mpn/configure.in: Set target_makefile_frag for freebsd
24500	in new case stmt.
24501	* mpn/config/t-freebsd: New file.
24502	* mpn/Makefile.in: Add #### for frag insertion.
24503	(XCFLAGS): Clear by default.
24504	(.c.o, .S.o rules): Pass XCFLAGS.
24505
24506Tue Feb  7 16:27:50 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24507
24508	* longlong.h (68000 umul_ppmm): Merge improvements from henderson.
24509
24510Tue Jan 24 04:23:20 1995  Torbjorn Granlund  (tege@tiny.cygnus.com)
24511
24512	* longlong.h (default umul_ppmm): Store input parameters in temporaries
24513	to avoid reading them twice.
24514	(default smul_ppmm): New definition.
24515
24516Thu Dec 29 04:20:07 1994  Jim Meyering  (meyering@comco.com)
24517
24518	* generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
24519	of unused variable.
24520	* generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
24521	* mpz/powm.c (pow): Likewise.
24522
24523	* mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
24524	to placate `gcc -Wall'.
24525	* mpz/ior.c (mpz_ior): Likewise.
24526
24527Wed Dec 28 13:31:40 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24528
24529	* mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
24530
24531Mon Dec 26 17:15:36 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24532
24533	* longlong.h: Test for more symbols, in __mc68000__ case.
24534
24535	* mpn/mpn/config.sub: Recognize m68060.
24536	* mpn/configure.in: Change mc* to m* for 68k targets.
24537	* mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
24538
24539Mon Dec 19 01:56:30 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24540
24541	* config.sub: Recognize pentium as a valid CPU.
24542	* mpn/configure.in: Handle pentium specifically, to use new assembly
24543	code.
24544
24545Mon Dec 19 00:13:01 1994  Jim Meyering  (meyering@comco.com)
24546
24547	* gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
24548	is defined.
24549	* gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
24550
24551Mon Dec 19 00:04:54 1994  Kent Boortz  (boortz@sics.se)
24552
24553	* Makefile.in (recursive makes): Pass CFLAGS.
24554
24555Sun Dec 18 22:34:49 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24556
24557	* mpn/pentium: New directory.
24558
24559	* mpz/pprime.c: Make sure to mpz_clear all temporaries.
24560
24561	* longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
24562	* configure.in: Handle supersparc*-.
24563	* config/mt-supspc-gcc: New file.
24564	* config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
24565
24566Mon Dec 12 22:22:10 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24567
24568	* mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
24569	#include sysdep.h before asm-syntax.h.
24570
24571	* mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
24572	* mpn/i386/asm-syntax.h: Likewise.
24573
24574	* mpn/mc68020/asm-syntax.h: New name for asm.h.
24575	* mpn/i386/asm-syntax.h: New name for asm.h.
24576
24577Tue Dec  6 21:55:25 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24578
24579	* mpz/array_init.c: Fix typo in declaration.
24580
24581Fri Nov 18 19:50:52 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24582
24583	* mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
24584
24585Mon Nov 14 00:34:12 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24586
24587	* mpn/generic/random2.c (random): Test for __svr4__.
24588
24589Wed Oct 12 23:28:16 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24590
24591	* cre-conv-tab.c (main): Avoid upper-case X in printf format string.
24592
24593Tue Aug 23 17:16:35 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24594
24595	* mpz/perfsqr.c: Use mpn_perfect_square_p.
24596	* mpn/generic/perfsqr.c: New file.
24597
24598Wed Jul  6 13:46:51 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24599
24600	* mpz/array_init.c: New file.
24601	* mpz/Makefile.in: Compile array_init.
24602	* gmp.h: Declare mpz_array_init.
24603
24604Mon Jul  4 01:10:03 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24605
24606	* mpz/add.c: Fix bogus comment.
24607	* mpz/sub.c: Likewise.
24608
24609Sat Jul  2 02:14:56 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24610
24611	* mpn/generic/pre_mod_1.c: New file.
24612	* mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
24613
24614Fri Jul 01 22:10:19 1994  Richard Earnshaw (rwe11@cl.cam.ac.uk)
24615
24616	* longlong.h (arm umul_ppmm): Fix typos in last change.  Mark
24617	hard-coded registers with "%|"
24618
24619Thu Jun 30 03:59:33 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24620
24621	* mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
24622	Use __mpn_mod_1.
24623	* mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
24624
24625Wed Jun 29 18:45:41 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24626
24627	* mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
24628
24629	* mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
24630
24631	* gmp.h: Use "defined (__STDC__)" consistently.
24632
24633Tue Jun 28 18:44:58 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24634
24635	* gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
24636
24637	* mpz/tests/Makefile.in: Use CFLAGS for linking.
24638
24639	* Makefile.in (CFLAGS): Use -O2 here.
24640	* mpn/Makefile (CFLAGS): Not here.
24641
24642	* mpq/cmp_ui.c: Fix typo.
24643	* mpq/canonicalize.c: Fix typo.
24644	* mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
24645	* mpn/generic/gcd_1.c: Fix braino in last change.
24646
24647Mon Jun 27 16:10:27 1994  Torbjorn Granlund  (tege@rtl.cygnus.com)
24648
24649	* mpz/gcd_ui.c: Change return type and return result.
24650	Allow destination param to be NULL.
24651	* gmp.h: Corresponding change.
24652	* mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
24653
24654Tue Jun 14 02:17:43 1994  Torbjorn Granlund  (tege@tiny.cygnus.com)
24655
24656	* mpn/i386/asm.h (ALIGN): Make it take a parameter.
24657	* mpn/i386/*.S: Use ALIGN to align all loops.
24658
24659	* mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
24660	(Makes old versions of GAS happy.)
24661
24662Sat May 28 01:43:54 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24663
24664	* Many files: Delete unused variables and labels.
24665	* mpn/generic/dump.c: cast printf width argument to int.
24666
24667Wed May 25 00:42:37 1994  Torbjorn Granlund  (tege@thepub.cygnus.com)
24668
24669	* mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
24670	(xmod): Ignore return value of __mpn_divmod.
24671	(xmod): Improve normalization code.
24672
24673Sat May 21 01:30:09 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24674
24675	* mpz/gcdext.c: Cosmetic changes.
24676
24677	* mpz/fdiv_ui.c: New file.
24678
24679Fri May 20 00:24:53 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24680
24681	* mpz/tests/Makefile.in: Use explicit rules for running tests,
24682	not a shell loop.
24683	(clean): Delete stmp-*.
24684
24685	* mpz/Makefile.in: Update.
24686
24687	* mpz/div_ui.c: Don't include longlong.h.
24688	* mpz/dm_ui.c: Likewise.
24689
24690	* mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
24691	mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files.  Code partly from deleted
24692	mdm.c, mdm_ui.c, etc, partly rewritten.
24693	* mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
24694	* mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
24695	mpz/mmod_ui.c: Delete.
24696
24697	* mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
24698	mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
24699	New names for files implementing truncating division.
24700	* mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
24701
24702	* mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
24703	instead.
24704	(clean): Delete tmp-*.
24705
24706Thu May 19 01:37:44 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24707
24708	* mpz/cmp.c: Call __mpn_cmp.
24709
24710	* mpz/popcount.c: Fix typo.
24711
24712	* mpz/powm_ui.c: Simplify main loop.  Keep principal operand size
24713	smaller than MSIZE when possible.
24714	* mpz/powm.c: Likewise.
24715
24716	* mpn/generic/sqrt.c: Move alloca calls into where the memory is
24717	needed.  Simplify.
24718
24719	* gmp.h: (_PROTO): New macro.
24720	Add many function declarations; use _PROTO macro in all declarations.
24721
24722	* mpf/*.c: Prepend mpn calls with __.
24723
24724Wed May 18 20:57:06 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24725
24726	* mpf/*ui*.c: Make ui argument `long' for consistency with mpz
24727	functions.
24728
24729	* mpf/div_ui.c: Simplify.
24730
24731Tue May 17 01:05:14 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24732
24733	* mpz/*.c: Prepend mpn calls with __.
24734
24735	* mpz/mul_ui.c: Use mpn_mul_1.
24736
24737Mon May 16 17:19:41 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24738
24739	* mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
24740	* mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
24741	Nuke use of LAB.
24742
24743Sat May 14 14:21:02 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24744
24745	* gmp-impl.h: Don't define abort here.
24746
24747	* mpz/pow_ui.c: Increase temporary allocation.
24748	* mpz/ui_pow_ui.c: Likewise.
24749
24750	* gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
24751
24752	* All Makefile.in: Delete spurious -I arguments.
24753	Update dependencies.
24754
24755	* mpz/popcount.c: New file.
24756	* mpz/hamdist.c: New file.
24757
24758	* All configure: Latest version from Cygnus.
24759
24760	* mpq/Makefile.in: New file.
24761	* mpq/configure.in: New file.
24762	* Makefile.in, configure.in: Enable compilation of mpq.
24763
24764	* mpq/set_z.c: Fix typos.
24765	* mpq/canonicalize.c: Fix typos.
24766	* mpq/cmp_ui.c: Fix typos.
24767
24768	* mpf/add_ui.c: Read U->D into UP always.  Delete spurious MPN_COPY.
24769	* mpf/sub_ui.c: Likewise.
24770
24771	* gmp-impl.h: Don't redefine alloca.
24772
24773	* COPYING.LIB: Renamed from COPYING.
24774
24775Wed May 11 01:45:44 1994  Torbjorn Granlund  (tege@adder.cygnus.com)
24776
24777	* mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
24778	shift counts.  Fix typo when testing negative_result.
24779	* mpz/powm.c: Likewise.
24780
24781	* mpz/ui_pow_ui.c: New file.
24782	* mpz/Makefile.in: Update.
24783
24784	* mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
24785
24786	* mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
24787	* mpz/gcd.c: Declare mpn_xmod.
24788
24789	* mpz/powm.c: Major changes to accommodate changed mpn semantics.
24790	* mpz/powm_ui.c: Update from mpz/powm.c.
24791
24792	* mpz/tests/tst-io.c: New file.
24793	* mpz/tests/tst-logic: New file.
24794	* mpz/tests/Makefile.in: Update.
24795
24796	* mpz/inp_str.c: Get base right when checking for first digit.
24797	* mpz/inp_str.c: Allocate more space for DEST when needed.
24798
24799	* mpz/com.c: Use mpn_add_1 and mpn_sub_1.
24800	* mpz/and.c, mpz/ior.c: Likewise.  Simplify somewhat.
24801
24802	* mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
24803	Rename parameters to be consistent with mpz/sub_ui.
24804	General simplifications.
24805	* mpz/sub_ui.x: Likewise.
24806
24807Tue Aug 10 19:41:16 1993  Torbjorn Granlund  (tege@prudens.matematik.su.se)
24808
24809	* mpf: New directory.
24810	* mpf/*.c: Merge basic set of mpf functions.
24811
24812	* Many logs missing...
24813
24814Sun Apr 25 18:40:26 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
24815
24816	* memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
24817	* bsd/xtom.c: Likewise.
24818
24819	* mpz/div.c: Remove free_me and free_me_size and their usage.
24820	Use mpn_divmod for division; corresponding changes in return value
24821	convention.
24822	* mpz/powm.c: `carry_digit' => `carry_limb'.
24823	* bsd/sdiv.c: Clearify comment.
24824
24825Sun Apr 25 00:31:28 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
24826
24827	* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
24828
24829Sat Apr 24 16:23:33 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
24830
24831	* longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
24832
24833	* gmp-impl.h: #define ABS.
24834	* (Many files): Use ABS instead of abs.
24835
24836	* mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
24837	mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
24838
24839	* mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
24840	non-32-bit machines.
24841
24842Tue Apr 20 13:13:58 1993  Torbjorn Granlund  (tege@du.nada.kth.se)
24843
24844	* mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
24845	rounding them down to fit.
24846
24847	* mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
24848
24849	* mpz/inp_str.c (char_ok_for_base): New function.
24850	(mpz_inp_str): Use it.
24851
24852Sun Mar 28 21:54:06 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
24853
24854	* mpz/inp_raw.c: Allocate x_index, not xsize limbs.
24855
24856Mon Mar 15 11:44:06 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
24857
24858	* mpz/pprime.c: Declare param `const'.
24859	* gmp.h: Add declarations for mpz_com.
24860
24861Thu Feb 18 14:10:34 1993  Torbjorn Granlund  (tege@pde.nada.kth.se)
24862
24863	* mpq/add.c, mpq/sub.c: Call mpz_clear for t.
24864
24865Fri Feb 12 20:27:34 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
24866
24867	* mpz/inp_str.c: Recog minus sign as first character.
24868
24869Wed Feb  3 01:36:02 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
24870
24871	* mpz/iset.c: Handle 0 size.
24872
24873Tue Feb  2 13:03:33 1993  Torbjorn Granlund  (tege@cyklop.nada.kth.se)
24874
24875	* mpz/mod_ui.c: Initialize dividend_size before it's used.
24876
24877Mon Jan  4 09:11:15 1993  Torbjorn Granlund  (tege@sics.se)
24878
24879	* bsd/itom.c: Declare param explicitly 'signed'.
24880	* bsd/sdiv.c: Likewise.
24881
24882	* mpq/cmp.c: Remove unused variable tmp_size.
24883	* mpz/powm_ui.c: Fix typo in esize==0 if stmt.
24884	* mpz/powm.c: Likewise.
24885
24886Sun Nov 29 01:16:11 1992  Torbjorn Granlund  (tege@sics.se)
24887
24888	* mpn/generic/divmod_1.c (mpn_divmod_1): Handle
24889	divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
24890	specifically.
24891
24892	* Reorganize sources.  New directories mpn, mpn/MACH, mpn/generic,
24893	mpz, mpq, bsd.  Use full file name for change logs hereafter.
24894
24895Wed Oct 28 17:40:04 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
24896
24897	* longlong.h (__hppa umul_ppmm): Fix typos.
24898	(__hppa sub_ddmmss): Swap input arguments.
24899
24900	* mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
24901	initializator.
24902
24903Sun Oct 25 20:30:06 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
24904
24905	* mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
24906	specifically (used to consider all negative numbers prime).
24907
24908	* mpz_powm_ui: `carry_digit' => `carry_limb'.
24909
24910	* sdiv: Handle zero dividend specifically.  Replace most code in
24911	this function with a call to mpn_divmod_1.
24912
24913Fri Sep 11 22:15:55 1992  Torbjorn Granlund  (tege@tarrega.sics.se)
24914
24915	* mpq_clear: Don't free the MP_RAT!
24916
24917	* mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
24918
24919Thu Sep  3 01:47:07 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
24920
24921	* All files: Remove leading _ from mpn function names.
24922
24923Wed Sep  2 22:21:16 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
24924
24925	Fix from Jan-Hein Buhrman:
24926	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
24927
24928	* mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
24929	life.
24930
24931Sun Aug 30 18:37:15 1992  Torbjorn Granlund  (tege@jupiter.sics.se)
24932
24933	* _mpz_get_str: Use mpz_sizeinbase for computing out_len.
24934	* _mpz_get_str: Don't remove leading zeros.  Abort if there are some.
24935
24936Wed Mar  4 17:56:56 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24937
24938	* gmp.h: Change definition of MP_INT to make the & before params
24939	optional.  Use typedef to define it.
24940	* mp.h: Use typedef to define MINT.
24941
24942Tue Feb 18 14:38:39 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24943
24944	longlong.h (hppa umul_ppmm): Add missing semicolon.  Declare type
24945	of __w1 and __w0.
24946
24947Fri Feb 14 21:33:21 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24948
24949	* longlong.h: Make default count_leading_zeros work for machines >
24950	32 bits.  Prepend `__' before local variables to avoid conflicts
24951	with users' variables.
24952
24953	* mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
24954	* gmp-impl.h: ... and put it here.
24955	* mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
24956
24957Tue Feb 11 17:20:12 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24958
24959	* mpn_mul: Enhance base case by handling small multiplicands.
24960	* mpn_dm_1.c: Revert last change.
24961
24962Mon Feb 10 11:55:15 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24963
24964	* mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
24965
24966Fri Feb  7 16:26:16 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24967
24968	* mpn_mul: Replace code for base case.
24969
24970Thu Feb  6 15:10:42 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24971
24972	* mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
24973	pre-inverting divisor.
24974
24975Sun Feb  2 11:10:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24976
24977	* longlong.h: Make __LLDEBUG__ work differently.
24978	(_IBMR2): Reinsert old code.
24979
24980Sat Feb  1 16:43:00 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24981
24982	* longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
24983	using floating point operations.  Don't define
24984	UDIV_NEEDS_NORMALIZATION any longer.
24985
24986Fri Jan 31 15:09:13 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24987
24988	* longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
24989	* longlong.h (#ifdef __hppa): Define umul_ppmm.
24990
24991Wed Jan 29 16:41:36 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24992
24993	* mpn_cmp: Only one length parameter, assume operand lengths are
24994	the same.  Don't require normalization.
24995	* mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
24996	new mpn_cmp definition.
24997
24998Tue Jan 28 11:18:55 1992  Torbjorn Granlund  (tege@zevs.sics.se)
24999
25000	* _mpz_get_str: Fix typo in comment.
25001
25002Mon Jan 27 09:44:16 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25003
25004	* Makefile.in: Add new files.
25005
25006	* mpn_dm_1.c: New file with function _mpn_divmod_1.
25007	* mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
25008	* mpz_div_ui: Likewise.
25009
25010	* mpn_mod_1.c: New file with function _mpn_mod_1.
25011	* mpz_mod_ui: Use _mpn_mod_1.
25012
25013Thu Jan 23 18:54:09 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25014
25015	Bug found by Paul Zimmermann (zimmermann@inria.inria.fr):
25016	* mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
25017	Handle dividend == 0.
25018
25019Wed Jan 22 12:02:26 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25020
25021	* mpz_pprime.c: Use "" for #include.
25022
25023Sun Jan 19 13:36:55 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25024
25025	* mpn_rshiftci.c (header): Correct comment.
25026
25027Wed Jan 15 18:56:04 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25028
25029	* mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
25030	to make space for ignored quotient at the end.  (The quotient might
25031	always be an extra limb.)
25032
25033Tue Jan 14 21:28:48 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25034
25035	* mpz_powm_ui: Fix comment.
25036	* mpz_powm: Likewise.
25037
25038Mon Jan 13 18:16:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25039
25040	* tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
25041
25042Sun Jan 12 13:54:28 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25043
25044	Fixes from Kazumaro Aoki:
25045	* mpz_out_raw: Take abs of size to handle negative values.
25046	* mpz_inp_raw: Reallocate before reading ptr from X.
25047	* mpz_inp_raw: Store, don't read, size to x->size.
25048
25049Tue Jan  7 17:50:25 1992  Torbjorn Granlund  (tege@zevs.sics.se)
25050
25051	* gmp.h, mp.h: Remove parameter names from prototypes.
25052
25053Sun Dec 15 00:09:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25054
25055	* tests/Makefile.in: Prepend "./" to file names when executing
25056	tests.
25057
25058	* Makefile.in: Fix many problems.
25059
25060Sat Dec 14 01:00:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25061
25062	* mpn_sqrt.c: New file with _mpn_sqrt.
25063	* mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
25064	* msqrt.c: Delete.  Create from mpz_sqrtrem.c in Makefile.in.
25065	* mpz_do_sqrt.c: Delete.
25066	* Makefile.in: Update to reflect these changes.
25067
25068	* Makefile.in, configure, configure.subr: New files
25069	(from bothner@cygnus.com).
25070	* dist-Makefile: Delete.
25071
25072	* mpz_fac_ui: Fix comment.
25073
25074	* mpz_random2: Rewrite a bit to make it possible for the most
25075	significant limb to be == 1.
25076
25077	* mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
25078
25079Fri Dec 13 23:10:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25080
25081	* mpz_do_sqrt: Simplify special case for U == 0.
25082	* m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
25083	  Rename _mpz_impl_sqrt to _mpz_do_sqrt.
25084
25085Fri Dec 13 12:52:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25086
25087	* gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
25088
25089Thu Dec 12 22:17:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25090
25091	* mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
25092	variables to mp_size.
25093
25094Wed Dec 11 22:00:34 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25095
25096	* mpn_rshift.c: Fix header comments.
25097
25098Mon Dec  9 17:46:10 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25099
25100	Released 1.2.
25101
25102	* gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
25103
25104	* dist-Makefile: Add missing dependency for cre-mparam.
25105
25106	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
25107	  mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
25108
25109	* dist-Makefile (clean): clean in tests subdir too.
25110	* tests/Makefile: Define default values for ROOT and SUB.
25111
25112	* longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
25113	2 constraint.
25114
25115Mon Nov 11 00:06:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25116
25117	* mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
25118
25119Sat Nov  9 23:47:38 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25120
25121	Released 1.1.94.
25122
25123	* dist-Makefile, Makefile, tests/Makefile: Merge tests into
25124	distribution.
25125
25126Fri Nov  8 22:57:19 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25127
25128	* gmp.h: Don't use keyword `signed' for non-ANSI compilers.
25129
25130Thu Nov  7 22:06:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25131
25132	* longlong.h: Cosmetic changes to keep it identical to gcc2 version
25133	of longlong.h.
25134	* longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
25135	sub_ddmmss.
25136
25137Mon Nov  4 00:36:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25138
25139	* mpn_mul: Fix indentation.
25140
25141	* mpz_do_sqrt: Don't assume 32 bit limbs (had constant
25142	4294967296.0).
25143	* mpz_do_sqrt: Handle overflow in conversion from double returned
25144	by SQRT to mp_limb.
25145
25146	* gmp.h: Add missing function definitions.
25147
25148Sun Nov  3 18:25:25 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25149
25150	* mpz_pow_ui: Change type of `i' to int.
25151
25152	* ChangeLog: Add change log entry.
25153	* ChangeLog: Add change log entry.
25154	* ChangeLog: Add change log entry.
25155	* ChangeLog: Add change log entry.
25156	* ChangeLog: Add change log entry.
25157	* ChangeLog: Add change log entry.
25158	* ChangeLog: Add change log entry.
25159	* ChangeLog: Add change log entry.
25160Stack overflow.
25161
25162	* mpz_pow_ui.c: Fix typo in comment.
25163
25164	* dist-Makefile: Create rpow.c from mpz_powm_ui.c.
25165	* mpz_powm_ui.c: Add code for rpow.
25166	* rpow.c: Delete this file.  The rpow function is now implemented
25167	in mpz_powm_ui.c.
25168
25169	* mpz_fac_ui.c: New file.
25170	* gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
25171
25172	Bug found by John Amanatides (amana@sasquatch.cs.yorku.ca):
25173	* mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
25174	the first argument not smaller than the second.
25175
25176Tue Oct 29 13:56:55 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25177
25178	* cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
25179	header text.
25180
25181Mon Oct 28 00:35:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25182
25183	* mpz_random2: Handle size == 0.
25184
25185	* gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
25186	chars_per_bit_exactly, and change its definition.
25187	* cre-conv-tab.c (main): Output field according to its new
25188	definition.
25189	* mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
25190	Use chars_per_bit_exactly.
25191
25192	* mpz_random2: Change the loop termination condition in order to
25193	get a large most significant limb with higher probability.
25194
25195	* gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
25196	* mpz_get_si.c: New file.
25197	* dist-Makefile: Add mpz_random2 and mpz_get_si.
25198
25199	* mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
25200	power of 2, giving exact result.
25201
25202	* mpn_mul: Fix MPN_MUL_VERIFY in various ways.
25203	* mpn_mul: New macro KARATSUBA_THRESHOLD.
25204	* mpn_mul (karatsuba's algorithm): Don't write intermediate results
25205	to prodp, use temporary pp instead.  (Intermediate results can be
25206	larger than the final result, possibly writing into hyperspace.)
25207	* mpn_mul: Make smarter choice between Karatsuba's algorithm and the
25208	shortcut algorithm.
25209	* mpn_mul: Fix typo, cy instead of xcy.  Unify carry handling code.
25210
25211Sun Oct 27 19:57:32 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25212
25213	* mpn_mul: In non-classical case, choose Karatsuba's algorithm only
25214	when usize > 1.5 vsize.
25215
25216	* mpn_mul: Break between classical and Karatsuba's algorithm at
25217	KARATSUBA_THRESHOLD, if defined.  Default to 8.
25218
25219	* mpn_div: Kludge to fix stray memory read.
25220
25221Sat Oct 26 20:06:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25222
25223	* mpz_gcdext: Handle a = b = 0.  Remove memory leakage by calling
25224	mpz_clear for all temporary variables.
25225
25226	* mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
25227	function's argument constraints.  Compute wsize correctly.
25228
25229	* mpz_gcd: Fix typo in comment.
25230
25231	* memory.c (_mp_default_allocate, _mp_default_reallocate): Call
25232	abort if allocation fails, don't just exit.
25233
25234Fri Oct 25 22:17:20 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25235
25236	* mpz_random2.c: New file.
25237
25238Thu Oct 17 18:06:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25239
25240	Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
25241	* mpq_cmp: Take sign into account, don't just compare the
25242	magnitudes.
25243	* mpq_cmp: Call _mpn_mul in the right way, with the first argument
25244	not smaller than the second.
25245
25246Wed Oct 16 19:27:32 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25247
25248	* mpz_random: Ensure the result is normalized.
25249
25250Tue Oct 15 14:55:13 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25251
25252	* mpz_clrbit: Support non-ANSI compilers.
25253
25254Wed Oct  9 18:03:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25255
25256	* longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
25257
25258Tue Oct  8 17:42:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25259
25260	* mpz_mdm_ui: Add comments.
25261
25262	* mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
25263	* mpz_init_ui: Change spacing and header comment.
25264
25265Thu Oct  3 18:36:13 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25266
25267	* dist-Makefile: Prepend `./' before some filenames.
25268
25269Sun Sep 29 14:02:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25270
25271	Released 1.1 (public).
25272
25273	* mpz_com: New name of mpz_not.
25274	* dist-Makefile: Change mpz_not to mpz_com.
25275
25276Tue Sep 24 12:44:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25277
25278	* longlong.h: Fix header comment.
25279
25280Mon Sep  9 15:16:24 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25281
25282	Released 1.0.92.
25283
25284	* mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
25285	case.
25286
25287	* longlong.h (m68000 umul_ppmm): Clobber one register less by
25288	slightly rearranging the code.
25289
25290Sun Sep  1 18:53:25 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25291
25292	* dist-Makefile (stamp-stddefh): Fix typo.
25293
25294Sat Aug 31 20:41:31 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25295
25296	Released 1.0.91.
25297
25298	* mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
25299	  mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
25300	* gmp.h, gmp.texi: Define the new functions.
25301
25302Fri Aug 30 08:32:56 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25303
25304	* mpz_gcdext: Compute t argument from the other quantities at the
25305	  end, of the function, not in the loop.  New feature: Allow t to be
25306	  NULL.
25307
25308	* mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
25309	  include "mp.h".  Use type name `MP_INT' always.
25310
25311	* dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
25312
25313Wed Aug 28 00:45:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25314
25315	* dist-Makefile (documentation): Go via tmp.texi to avoid the
25316	  creation of gmp.dvi if any errors occur.  Make tex read input
25317	  from /dev/null.
25318
25319Fri Aug 23 15:58:52 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25320
25321	* longlong.h (68020, i386): Don't define machine-dependent
25322	  __umulsidi3 (so the default definition is used).
25323	* longlong.h (all machines): Cast all operands, sources and
25324	  destinations, to `unsigned long int'.
25325	* longlong.h: Add gmicro support.
25326
25327Thu Aug 22 00:28:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25328
25329	* longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
25330	* longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
25331	* longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
25332	* _mpz_get_str.c: Add code to do division by big_base using only
25333	  umul_qrnnd, if that is faster.  Use UMUL_TIME and UDIV_TIME to
25334	  decide which variant to use.
25335
25336Wed Aug 21 15:45:23 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25337
25338	* longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
25339	  nops.  (Saves two insn.)
25340
25341	* longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
25342	  branch, and to permit input/output register overlap.
25343
25344	* longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
25345	* longlong.h (__29k__ umul_ppmm): Split asm instructions into two
25346	  asm statements (gives better code if either the upper or lower
25347	  part of the product is unused.
25348
25349Tue Aug 20 17:57:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25350
25351	* _mpz_get_str.c (outside of functions): Remove
25352	  num_to_ascii_lower_case and num_to_ascii_upper_case.  Use string
25353	  constants in the function instead.
25354
25355Mon Aug 19 00:37:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25356
25357	* cre-conv-tab.c (main): Output table in hex.  Output 4 fields, not
25358	  3, for components 0 and 1.
25359
25360	* gmp.h: Add declaration of mpq_neg.
25361
25362	Released 1.0beta.13.
25363
25364	* _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
25365	  comparing to enum literals SPC and EOF.  This makes the code work
25366	  for compilers where `char' is unsigned.  (Bug found by Brian
25367	  Beuning).
25368
25369	Released 1.0beta.12.
25370
25371	* mpz_mod_ui: Remove references to quot.  Remove quot_ptr, quot_size
25372	  declarations and assignment code.
25373
25374Sun Aug 18 14:44:26 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25375
25376	* mpz_mod_ui: Handle dividend < 0.
25377
25378	Released 1.0beta.11.
25379
25380	* mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
25381	  general structure, variable names, etc.
25382
25383	* sdiv: Un-normalize the remainder in n1 before it is negated.
25384
25385	* longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
25386	  udiv_qrnnd.
25387
25388	* mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
25389	  the quotient size if the dividend size is incremented.  (Bug found
25390	  by Brian Beuning.)
25391
25392	* mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
25393	  (Bug found by Brian Beuning.)
25394
25395	* mpz_mod_ui: Replace "digit" by "limb".
25396
25397	* mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
25398	  for non-32-bit machines (PP is hardwired for such machines).
25399	* mpz_perfsqr.c (outside of functions): Define PP value with an L.
25400
25401	* mpn_mul.c (_mpn_mul): Add verification code that is activated if
25402	  DEBUG is defined.  Replace "digit" by "limb".
25403	* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
25404	  after the addition.
25405	* mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
25406	  and v0_size, and according to the result, swap arguments in
25407	  recursive call.  (Don't violate mpn_mul's own argument
25408	  constraints.)
25409
25410Fri Aug 16 13:47:12 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25411
25412	Released 1.0beta.10.
25413
25414	* longlong.h (IBMR2): Add udiv_qrnnd.
25415
25416	* mpz_perfsqr: Remove unused variables.
25417
25418	* mpz_and (case for different signs): Initialize loop variable i!
25419
25420	* dist-Makefile: Update automatically generated dependencies.
25421	* dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
25422	  etc to dependency file lists.
25423
25424	* longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
25425	  `unsigned long int'.
25426	* longlong.h: Add `int' after `unsigned' and `long' everywhere.
25427
25428Wed Aug 14 18:06:48 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25429
25430	* longlong.h: Add ARM, i860 support.
25431
25432	* mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
25433
25434Tue Aug 13 21:57:43 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25435
25436	* _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
25437	  mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
25438	* gmp-impl.h: Put it here, and make it `const'.
25439	* cre-conv-tab.c (main): Make struct __mp_bases `const'.
25440
25441Mon Aug 12 17:11:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25442
25443	* cre-conv-tab.c (main): Use %lu in printf for long ints.
25444
25445	* dist-Makefile: Fix cre-* dependencies.
25446
25447	* cre-conv-tab.c (main): Output field big_base_inverted.
25448
25449	* gmp-impl.h (struct bases): New field big_base_inverted.
25450	* gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
25451	  to float (in order to keep the structure smaller).
25452
25453	* mp.h, gmp.h: Change names of macros for avoiding multiple
25454	  includes.
25455
25456Fri Aug  9 18:01:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25457
25458	* _mpz_get_str: Only shift limb array if normalization_steps != 0
25459	  (optimization).
25460
25461	* longlong.h (sparc umul_ppmm): Use __asm__, not asm.
25462	* longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
25463	  and m1 (overlap between output and input operands did not work).
25464	* longlong.h: Add VAX, ROMP and HP-PA support.
25465	* longlong.h: Sort the machine dependent code in alphabetical order
25466	  on the CPU name.
25467	* longlong.h: Hack comments.
25468
25469Thu Aug  8 14:13:36 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25470
25471	Released 1.0beta.9.
25472
25473	* longlong.h: Define BITS_PER_LONG to 32 if it's not already
25474	  defined.
25475	* Define __BITS4 to BITS_PER_LONG / 4.
25476	* Don't assume 32 bit word size in "count_leading_zeros" C macro.
25477	  Use __BITS4 and BITS_PER_LONG instead.
25478
25479	* longlong.h: Don't #undef internal macros (reverse change of Aug 3).
25480
25481	* longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
25482	  even for plain mc68000.
25483
25484	* mpq_div: Flip the sign of the numerator *and* denominator of the
25485	  result if the intermediate denominator is negative.
25486
25487	* mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
25488
25489	* mpz_and.c: Compute the result size more conservatively.
25490	* mpz_ior.c: Likewise.
25491
25492	* mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
25493
25494	* dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
25495	  BSDMP_SRCS.
25496
25497	* dist-Makefile: Create mult.c from mpz_mul.c.
25498	* mult.c: Delete this file.
25499
25500	* _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
25501	  not done properly if the input string had many leading zeros).
25502
25503Sun Aug  4 16:54:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25504
25505	* dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
25506	  work with VPATH and GNU MP.
25507
25508	* mpz_gcd: Don't call mpz_set; inline its functionality.
25509
25510	* mpq_mul, mpq_div: Fix several serious typos.
25511
25512	* mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
25513	  zero.
25514
25515	* mpq_neg.c: New file.
25516
25517	* dist-Makefile: Remove obsolete dependencies.
25518
25519	* mpz_sub: Fix typo.
25520
25521	Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
25522	* mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
25523	  is just 1.
25524	* mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
25525
25526Sat Aug  3 23:45:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25527
25528	* longlong.h: Clean up comments.
25529	* longlong.h: #undef internal macros.
25530
25531Fri Aug  2 18:29:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25532
25533	* mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
25534	* mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
25535
25536	* mpz_dmincl.c: Normalize the remainder before shifting it back.
25537
25538	* mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
25539
25540	* mpn_div.c: Fix comment.
25541
25542	* mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
25543	  type, in order to work for both GNU and Berkeley functions.
25544
25545	* dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
25546	  madd.c from mpz_add.c, msub.c from mpz_sub.c.
25547	  respectively.
25548	* pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
25549	* mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
25550	  Berkeley function name variants.
25551	* dist-Makefile: Add created files to "clean" target.
25552
25553Tue Jul 16 15:19:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25554
25555	* mpq_get_den: No need for absolute value of the size, the
25556	  denominator is always positive.
25557
25558	* mpz_get_ui: If the operand is zero, return zero.  Don't read the
25559	  limb array!
25560
25561	* mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
25562	  is the size of the remainder.
25563
25564Mon Jul 15 11:08:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25565
25566	* Several files: Remove unused variables and functions.
25567
25568	* gmp-impl.h: Declare _mpz_impl_sqrt.
25569
25570	* mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
25571	  UDIV_NEEDS_NORMALIZATION.  (Fix from Brian Beuning.)
25572
25573	* mpz_dm_ui.c, sdiv: Replace *digit with *limb.
25574
25575	* mpz_ior: Add missing else statement in -OP1 | -OP2 case.
25576	* mpz_ior: Add missing else statement in OP1 | -OP2 case.
25577	* mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
25578	* mpz_ior: Duplicate _mpz_realloc code.
25579
25580	* mpz_and: Add missing else statement in -OP1 & -OP2 case.
25581	* mpz_and: Rewrite OP1 & -OP2 case.
25582	* mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
25583
25584	* mpz_gcdext: Loop in d1.size (not b->size).  (Fix from Brian
25585	  Beuning.)
25586
25587	* mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call.  (Fix from
25588	  Brian Beuning.)
25589
25590Fri Jul 12 17:10:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25591
25592	* mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
25593	  mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
25594	  New files.
25595
25596	* mpz_dmincl.c: Remove second re-allocation of rem->d.  It
25597	  was never executed.
25598
25599	* dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
25600	  some unixes' test doesn't have the -r option).
25601
25602	* *.*: Cast allocated pointers to the appropriate type (makes old C
25603	  compilers happier).
25604
25605	* cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
25606	  after conversion to double.  (Kludge for broken C compilers.)
25607
25608	* dist-Makefile (stamp-stddefh): New target.  Test if "stddef.h"
25609	  exists in the system and creates a minimal one if it does not
25610	  exist.
25611	* cre-stddefh.c: New file.
25612	* dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
25613	* dist-Makefile (clean): Add some more.
25614	* gmp.h, mp.h: Unconditionally include "stddef.h".
25615
25616Thu Jul 11 10:08:21 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25617
25618	* min: Do ungetc of last read character.
25619	* min.c: include stdio.h.
25620
25621	* dist-Makefile: Go via tmp- files for cre* redirection.
25622	* dist-Makefile: Add tmp* to "clean" target.
25623
25624	* dist-Makefile: Use LOCAL_CC for cre*, to simplify cross
25625	  compilation.
25626
25627	* gmp.h, mp.h: Don't define NULL here.
25628	* gmp-impl.h: Define it here.
25629
25630Wed Jul 10 14:13:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25631
25632	* mpz_mod_2exp: Don't copy too much, overwriting most significant
25633	  limb.
25634
25635	* mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
25636	  reallocating res, if op[12]_ptr got their value from alloca.
25637
25638	* mpz_and, mpz_ior: Clear up comments.
25639
25640	* cre-mparam.c: Output parameters for `short int' and `int'.
25641
25642	* mpz_and, mpz_ior: Negate negative op[12]_size in several places.
25643
25644Tue Jul  9 18:40:30 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25645
25646	* gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
25647	  (Fix for Sun lossage.)
25648
25649	* gmp.h: Add declaration of mpq_clear.
25650
25651	* dist-Makefile: Chack if "ranlib" exists, before using it.
25652	* dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
25653	* mpz_powm: Fix typo, "pow" instead of "mpz_powm".
25654
25655Fri Jul  5 19:08:09 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25656
25657	* move: Remove incorrect comment.
25658
25659	* mpz_free, mpq_free: Rename to *_clear.
25660	* dist-Makefile: Likewise.
25661	* mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
25662
25663	* mpz_dmincl.c: Don't call "move", inline its functionality.
25664
25665Thu Jul  4 00:06:39 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25666
25667	* Makefile: Include dist-Makefile.  Fix dist target to include
25668	  dist-Makefile (with the name "Makefile" in the archive).
25669
25670	* dist-Makefile: New file made from Makefile.  Add new mpz_...
25671	  functions.
25672
25673	* mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
25674	  functionality.  Avoids code duplication.
25675	* pow.c, mpz_powm.c: Include mpz_powincl.c
25676
25677	* mpz_dmincl.c: New file containing general division code.  Avoids
25678	  code duplication.
25679	* mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
25680	  mpz_dmincl.c.
25681
25682	* _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
25683	  Instead, write the overlapping memory copying inline.
25684
25685	* mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
25686
25687	* longlong.h: Don't use #elif.
25688	* mpz_do_sqrt.c: Likewise.
25689
25690	* longlong.h: Use __asm__ instead of asm.
25691	* longlong.h (sparc udiv_qrnnd): Make it to one string over several
25692	  lines.
25693
25694	* longlong.h: Preend __ll_ to B, highpart, and lowpart.
25695
25696	* longlong.h: Move array t in count_leading_zeros to the new file
25697	  mp_clz_tab.c.  Rename the array __clz_tab.
25698	* All files: #ifdef for traditional C compatibility.
25699
25700Wed Jul  3 11:42:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25701
25702	* mpz_and: Initialize res_ptr always (used to be initialized only
25703	  when reallocating).
25704
25705	* longlong.h (umul_ppmm [C variant]): Make __ul...__vh
25706	  `unsigned int', and cast the multiplications.  This way
25707	  compilers more easily can choose cheaper multiplication
25708	  instructions.
25709
25710	* mpz_mod_2exp: Handle input argument < modulo argument.
25711	* mpz_many: Make sure mp_size is the type for sizes, not int.
25712
25713	* mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
25714	  mpq_div: Change mpz_init* interface.  Structure pointer as first
25715	  arg to initialization function, no longer *return* struct.
25716
25717Sun Jun 30 19:21:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25718
25719	* Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
25720	  character file name length limit.
25721
25722	* Most files: Rename MINT to MP_INT.  Rename MRAT to MP_RAT.
25723	* mpz_sizeinb.c: New file with function mpz_sizeinbase.
25724	* mp_bases.c: New file, with array __mp_bases.
25725	* _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
25726	  __mp_bases instead.
25727	* mout, mpz_out_str: Use array __mp_bases instead of function
25728	  _mpz_get_cvtlen.
25729	* mpz_get_cvtlen.c: Remove.
25730	* Makefile: Update.
25731
25732Sat Jun 29 21:57:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25733
25734	* longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
25735	* longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
25736	* longlong.h (__sparc__): Don't call .umul; expand asm instead.
25737	  Don't define __umulsidi3 (i.e. use default definition).
25738
25739Mon Jun 24 17:37:23 1991  Torbjorn Granlund  (tege@amon.sics.se)
25740
25741	* _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
25742	  Swap 't' and 's'.
25743
25744Sat Jun 22 13:54:01 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25745
25746	* mpz_gcdext.c: New file.
25747
25748	* mpn_mul: Handle carry and unexpected operand sizes in last
25749	  additions/subtractions.  (Bug trigged when v1_size == 1.)
25750
25751	* mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
25752	* mpq_*: Call mpz_init*.
25753
25754	* mpz_pow_ui, rpow: Use _mpn_mul instead of mult.  Restructure.
25755
25756Wed May 29 20:32:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25757
25758	* mpz_get_cvtlen: multiply by size.
25759
25760Sun May 26 15:01:15 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)
25761
25762	Alpha-release 0.95.
25763
25764	Fixes from Doug Lea (dl@g.oswego.edu):
25765	* mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE).  Adjust PROD_SIZE
25766	  correctly.
25767	* mpz_div: Prepend _ to mpz_realloc.
25768	* mpz_set_xs, mpz_set_ds: Fix typos in function name.
25769
25770Sat May 25 22:51:16 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)
25771
25772	* mpz_divmod_ui: New function.
25773
25774	* sdiv: Make the sign of the remainder correct.
25775
25776Thu May 23 15:28:24 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25777
25778	* Alpha-release 0.94.
25779
25780	* mpz_mul_ui: Include longlong.h.
25781
25782	* mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
25783	  of msqrt.
25784
25785	* mpz_impl_sqrt: Don't call "move", inline its functionality.
25786
25787	* mdiv: Use MPN_COPY instead of memcpy.
25788	* rpow, mpz_mul, mpz_mod_2exp: Likewise.
25789	* pow.c: Likewise, and fix bug in the size arg.
25790
25791	* xtom: Don't use mpz_alloc, inline needed code instead.  Call
25792	  _mpz_set_str instead of mpz_set_str.
25793
25794	* Makefile: Make two libraries, libmp.a and libgmp.a.
25795
25796Thu May 22 20:25:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25797
25798	* Add manual to distribution.
25799	* Fold in many missing routines descibed in the manual.
25800	* Update Makefile.
25801
25802Wed May 22 13:48:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25803
25804	* mpz_set_str: Make it handle 0x prefix OK.
25805
25806Sat May 18 18:31:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25807
25808	* memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
25809	  arguments.
25810	* mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
25811	* min: Likewise.
25812
25813Thu May 16 20:43:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25814
25815	* memory.c: Make the default allocations functions global.
25816	* mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
25817	  default memory function.
25818
25819Wed May  8 20:02:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25820
25821	* mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
25822	  even if no normalization is needed.
25823	* mpz_div: Rework reallocation scheme, to avoid excess copying.
25824
25825	* mpz_sub_ui.c, mpz_add_ui.c: New files.
25826
25827	* mpz_cmp.c, mpz_cmp_ui.c: New files.
25828
25829	* mpz_mul_2exp: Handle zero input MINT correctly.
25830
25831	* mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
25832
25833	* mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
25834
25835Tue May  7 15:44:58 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25836
25837	* mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
25838	* mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
25839	* gcd, mpz_gcd: Likewise.
25840
25841	* gcd, mpz_gcd: Handle common 2 factors correctly.
25842
25843Mon May  6 20:22:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25844
25845	* gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
25846
25847	* gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
25848
25849Sun May  5 15:16:23 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25850
25851	* mpz_div: Remove test for QUOT == 0.
25852
25853Sun Apr 28 20:21:04 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25854
25855	* pow: Don't make MOD normalization in place, as it's a bad idea to
25856	  write on an input parameter.
25857	* pow: Reduce BASE if it's > MOD.
25858	* pow, mult, mpz_mul: Simplify realloc code.
25859
25860Sat Apr 27 21:03:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25861
25862	* Install multiplication using Karatsuba's algorithm as default.
25863
25864Fri Apr 26 01:03:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25865
25866	* msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
25867
25868	* mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
25869	  left, respectively.
25870	* gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
25871
25872	* mlshift.c, mrshift.c: Remove.
25873
25874Wed Apr 24 21:39:22 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25875
25876	* mpn_mul: Check only for m2_size == 0 in function header.
25877
25878Mon Apr 22 01:31:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25879
25880	* karatsuba.c: New file for Karatsuba's multiplication algorithm.
25881
25882	* mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
25883
25884	* mpn_cmp: Fix header comment.
25885
25886Sun Apr 21 00:10:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25887
25888	* pow: Switch off initial base reduction.
25889
25890Sat Apr 20 22:06:05 1991  Torbjorn Granlund  (tege@echnaton.sics.se)
25891
25892	* mpz_get_str: Don't generate initial zeros for initial word.
25893	  Used to write outside of allocated storage.
25894
25895Mon Apr 15 15:48:08 1991  Torbjorn Granlund  (tege@zevs.sics.se)
25896
25897	* _mpz_realloc: Make it accept size in number of mp_digits.
25898	* Most functions: Use new _mpz_realloc definition.
25899
25900	* mpz_set_str: Remove calls _mp_free_func.
25901
25902	* Most functions: Rename mpn_* to _mpn_*.  Rename mpz_realloc to
25903	  _mpz_realloc.
25904	* mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
25905	* mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
25906	* msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
25907
25908Sat Apr  6 14:05:16 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
25909
25910	* mpn_mul: Multiply by the first digit in M2 in a special
25911	  loop instead of zeroing the product area.
25912
25913	* mpz_abs.c: New file.
25914
25915	* sdiv: Implement as mpz_div_si for speed.
25916
25917	* mpn_add: Make it work for second source operand == 0.
25918
25919	* msub: Negate the correct operand, i.e. V before swapping, not
25920	  the smaller of U and V!
25921	* madd, msub: Update abs_* when swapping operands, and not after
25922	  (optimization).
25923
25924Fri Apr  5 00:19:36 1991  Torbjorn Granlund  (tege@black.nada.kth.se)
25925
25926	* mpn_sub: Make it work for subtrahend == 0.
25927
25928	* madd, msub: Rewrite to minimize mpn_cmp calls.  Ensure
25929	  mpn_cmp is called with positive sizes (used to be called
25930	  incorrectly with negative sizes sometimes).
25931
25932	* msqrt: Make it divide by zero if fed with a negative number.
25933	* Remove if statement at end of precision calculation that was
25934	  never true.
25935
25936	* itom, mp.h: The argument is of type short, not int.
25937
25938	* mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
25939
25940	* mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
25941
25942	* Add COPYING to distribution.
25943
25944	* mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
25945
25946Fri Mar 15 00:26:29 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
25947
25948	* Add Copyleft headers to all files.
25949
25950	* mpn_mul.c, mpn_div.c: Add header comments.
25951	* mult.c, mdiv.c: Update header comments.
25952
25953	* mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
25954	  mpq_free.c: New files for rational arithmetics.
25955
25956	* mpn_lshift.c: Avoid writing the most significant word if it is 0.
25957
25958	* mdiv.c: Call mpn_lshift for the normalization.
25959	* mdiv.c: Remove #ifdefs.
25960
25961	* Makefile: Add ChangeLog to DISTFILES.
25962
25963	* mpn_div.c: Make the add_back code work (by removing abort()).
25964	* mpn_div.c: Make it return if the quotient is size as compared
25965	  with the difference NSIZE - DSIZE.  If the stored quotient is
25966	  larger than that, return 1, otherwise 0.
25967	* gmp.h: Fix mpn_div declaration.
25968	* mdiv.c: Adopt call to mpn_div.
25969	* mpz_div.c: New file (developed from mdiv.c).
25970
25971	* README: Update routine names.
25972
25973Thu Mar 14 18:45:28 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
25974
25975	* mpq_mul.c: New file for rational multiplication.
25976
25977	* gmp.h: Add definitions for rational arithmetics.
25978
25979	* mpn_div: Kludge the case where the high numerator digit > the
25980	  high denominator digit.  (This code is going to be optimized later.)
25981
25982	* New files: gmp.h for GNU specific functions, gmp-common.h for
25983	  definitions common for mp.h and gmp.h.
25984
25985	* Ensure mp.h just defines what BSD mp.h defines.
25986
25987	* pow.c: Fix typo for bp allocation.
25988
25989	* Rename natural number functions to mpn_*, integer functions to
25990	  mpz_*.
25991
25992Tue Mar  5 18:47:04 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
25993
25994	* mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
25995	  "n0 >= r" to "n0 > r".
25996
25997	* msqrt: Tune the increasing precision scheme, to do fewer steps.
25998
25999Tue Mar  3 18:50:10 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)
26000
26001	* msqrt: Use the low level routines.  Use low precision in the
26002	beginning, and increase the precision as the result converges.
26003	(This optimization gave a 6-fold speedup.)
26004