gmp-mpfr-sys 1.5.2

Rust FFI bindings for GMP, MPFR and MPC
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
2020-12-12  Marc Glisse  <marc.glisse@inria.fr>

	* gmp-h.in (_GMP_H_HAVE_FILE): Test also _STDIO (for HPE NonStop).

2020-11-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* Version 6.2.1 released.

	* gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump version info.
	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump revision info.

2020-11-10 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configure.ac (fat_path): Add bd1, goldmont,silvermont for CPUVEC.
	* mpn/x86_64/fat/fat.c: Add more CPUs.
	* mpn/x86/fat/fat.c: Add more CPUs.

2020-11-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configure.ac: X86_{,64_}PATTERN: GMP_ASM_COFF_TYPE for all ABIs;
	* mpn/x86_64/x86_64-defs.m4 (COFF_TYPE): Copy from mpn/x86/x86-defs.m4
	as suggested by Jeremy Drake.

	* tests/misc/t-locale.c (nl_langinfo): No redefine on __TERMUX__,
	spotted by Sanselme and Glisse.
	* configure.ac: Consider *-*-msys as *-*-mingw* (except on arm* |
	aarch64*), as suggested by Ralph Peterson.
	* Makefile.am (EXTRA_DIST): Add mini-gmp/ChangeLog.

2020-10-30 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/mpf/t-get_d_2exp.c: Test also the case zero.
	* tests/mpz/t-get_d.c: Likewise.
	* tests/mpf/t-trunc.c: Use mpf_size.

	* tests/mpf/t-conv.c: Some more tests on zero.

2020-10-25 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configfsf.guess: Updated to version 2020-10-22, from gnulib.

2020-10-17 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/devel/Makefile.am: Remove redundancies.

	* tests/mpz/io.c: Test out-of-range bases for mpz_out_str.

2020-10-15  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Recognise zen3.
	* config.guess: Recognise zen3.

2020-10-14 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* doc/gmp.texi (Number sequences): Remove redundancy. (spotted: TonyMcC)

	* configfsf.sub: Updated to version 2020-10-13, from gnulib.
	* configfsf.guess: Updated to version 2020-09-19, from gnulib.

2020-10-06  Niels Möller  <nisse@lysator.liu.se>

	* Makefile.am: Better support for make check-mini-gmp on wine or cygwin.

2020-09-22  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpz/t-mul.c: Print GMP_CHECK_FFT.

	* longlong.h (x86 umul_ppmm): Fix typo.

2020-09-21  Torbjörn Granlund  <tg@gmplib.org>

	* mpz/n_pow_ui.c: Detect and report overflow.

2020-07-04  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/bdiv_q_1.asm: Use LEA_HI/LEA_LO
	* mpn/arm64/invert_limb.asm: Likewise.

	* mpn/arm64/arm64-defs.m4: New file.
	* mpn/arm64/darwin.m4: New file.
	* configure.ac: Use arm64/arm64-defs.m4 and arm64/darwin.m4.

2020-06-20  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (add_sssaaaa arm32/arm64): Generalise allowed operands
	when using adds for sub and subs for add, while disallowing 0.
	(sub_ddmmss ppc64): Disallow 0 when using addic.  Also disallow
	constants for register-only middle addic operand.
	(C add_sssaaaa and sub_ddmmss): Use more temps to make operation more
	well-defined.

2020-06-18  Torbjörn Granlund  <tg@gmplib.org>

	* tests/devel/gen-test-longlong_h.c: New file.
	* tests/devel/Makefile.am: Compile and use gen-test-longlong_h.c.

2020-06-10  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Recognise armcortexa55.

2020-05-25  Torbjörn Granlund  <tg@gmplib.org>

	* tests/cxx/t-assign.cc: Use reference parameter for 'catch'.
	* tests/cxx/t-constr.cc: Likewise.
	* tests/cxx/t-ops2z.cc: Likewise.
	* tests/cxx/t-rand.cc: Likewise.
	* tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc: Likewise.

	* tune/speed.c: Undo 2020-05-24 _POSIX_C_SOURCE change, it breaks on
	many broken systems.
	* tune/freq.c: Likewise.
	* tune/time.c: Likewise.
	* tune/tuneup.c: Likewise.

	* tests/devel/try.c: Revert 2020-05-24 changes.

2020-05-21  Torbjörn Granlund  <tg@gmplib.org>

	* tune/freq.c (_POSIX_C_SOURCE): Define.

	* tune/tuneup.c (print_define_with_speedup): Fall back from snprintf to
	sprintf for C90.
	(_POSIX_C_SOURCE): Define.
	(max_opsize): Set by #define instead of const size_t to please C90.
	(n_measurements): Likewise.
	(speed_mpn_pre_set_str): Adhere to C90 declaration rules.

	* tune/tune-gcd-p.c: Back out 2020-01-10 change to comply to C90.

	* tune/time.c (speed_endtime): Cast printf args to right type.
	(_POSIX_C_SOURCE): Define.

	* tune/speed.h (CACHE_LINE_SIZE): Do #undef before defining.
	(SPEED_ROUTINE_MPN_GCD_1): Provide dummy first argument for standard
	compliance.
	(SPEED_ROUTINE_MPN_HGCD2): Adhere to C90 declaration rules.

	* tune/speed.c (main): Cast printf args to right type.
	(_POSIX_C_SOURCE): Define.

	* tests/mpz/reuse.c: Avoid using non-standard function fileno().
	* tests/spinner.c: Likewise.

	* tests/mpz/convert.c (str_casecmp): New function.
	(main): Use it instead of non-standard strcasecmp.

	* tests/misc.c (tests_start): Fall back from snprintf to sprintf for
	C90.

	* tests/devel/try.c: Avoid getpagesize and use POSIX sysconf instead.
	(_POSIX_C_SOURCE): Define.

	* mpn/generic/mod_1_1.c: Don't use C++ comments.

	* mpn/generic/get_d.c: Add clarifying parens.

2020-05-18  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/toom_interpolate_12pts.c (DO_mpn_addlsh_n): Define only
	when needed.
	* mpn/generic/toom_interpolate_16pts.c: Likewise.

2020-05-17 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/cmp.c: Avoid overflow on int even for huge sizes.
	* mpq/cmp.c: Likewise.

	* mpn/generic/mul_fft.c (mpn_fft_mul_modF_K):
	Fully handle carry propagation in basecase multiplication.

2020-05-16  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c (tabp): Combine several undefined tabp
	variable definitions with a macro.

	* mpn/generic/gcd_22.c: Avoid C99 constructs.

2020-05-12  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/compute_powtab.c: Avoid C99 constructs.
	* mpn/generic/get_str.c: Likewise.
	* mpn/generic/set_str.c: Likewise.

	* gmp-impl.h (memset): Move ASSERT to before decls.
	* tests/refmpn.c: Likewise.

	* mpn/generic/hgcd2.c (tabp): Combine several undefined tabp variable
	definitions with a macro.

	* mpn/generic/strongfibo.c: Avoid defining helper function when unused.

	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n_itch): Disable unused
	static function.

	* mpz/mul.c: Add some {} to suppress warning.

	* tests/mpn/t-gcd_11.c: Exit main() properly.
	* tests/mpn/t-gcd_22.c: Likewise.
	* tests/mpn/t-gcdext_1.c: Likewise.

2020-04-28  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpz/reuse.c (realloc_if_reducing): New function.
	(INVOKE_RRS, etc): Use realloc_if_reducing.

2020-01-17  Torbjörn Granlund  <tg@gmplib.org>

	* Version 6.2.0 released.

	* gmp-h.in (__GNU_MP__): Bump.
	(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL):
	Bump version info.
	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
	Bump version info.

2020-01-15  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bt1/gcd_11.asm: Add missing FUNC_EXIT.

2020-01-10  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (powerpc): Add clobbers, make formatting cleanups.

	* configure.ac (HAVE_NATIVE): Add mpn_sbpi1_bdiv_r.

	* tune/tune-gcd-p.c (main): Use %zu for size_t printing.

	* configfsf.guess: Update from upstream.

	* mpn/x86/pentium4/sse2/popcount.asm: For simplicity and correctness
	use LEAL directly.

2020-01-03  Niels Möller  <nisse@lysator.liu.se>

	* configure.ac: Delete suggestion to use TESTS_ENVIRONMENT to run
	wine. It worked only with older versions of automake.

2019-12-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpf/mul.c: Rewrite to invoke mpn_sqr when appropriate.

2019-12-08 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/powm.c: Full normalisation when e=1 & b<0.
	* tests/mpz/t-powm.c: More tests for the e=1 case.

2019-12-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/gcd_11.c: Remove check for NATIVE_ implementation.

2019-11-24  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/gcdext_1.c [USE_ZEROTAB]: Delete code variant for
	USE_ZEROTAB != 0. Was used in the currently disabled binary
	gcdext.

2019-11-20  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/powm.c (MPN_REDC_1): Prefer mpn_sbpi1_bdiv_r when it is
	provided.
	* mpn/generic/sec_powm.c (MPN_REDC_1_SEC): Likewise.

2019-11-17  Torbjörn Granlund  <tg@gmplib.org>

	* config.guess: Recognise zen2.
	* configure.ac: Likewise.

	* mpn/x86_64/bt1/aorsmul_1.asm: Rewrite.
	* mpn/x86_64/bt1/mul_1.asm: Rewrite.

	* mpn/arm/v6t2/gcd_11.asm: Increase alignment; update x/l table.

2019-11-16 Seth Troisi <sethtroisi@google.com>

	* tune/common.c (speed_mpn_perfect_power_p): New function.
	(speed_mpn_perfect_power_p): New function.
	* tune/speed.h: Declare both.
	* tune/speed.c (routine): Add mpn_perfect_{power,square}_p.

	* tune/common.c (speed_mpz_nextprime): New function.
	* tune/speed.h: Declare it.
	* tune/speed.c (routine): Add mpz_nextprime.

2019-11-09 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tune/speed.c (routine_t): Add R flag to mpz_powm
	* tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Use R flag as the base.

2019-10-02  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Make more path distinctions for the benefit of
	gmp-mparam.h.

2019-10-01  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm64): Let cortex-a7x look in a57 folder.

2019-10-01  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Fix
	canonicalization condition.

2019-09-30  Niels Möller  <nisse@lysator.liu.se>

	* tests/mpn/t-gcdext_1.c: New test.

2019-09-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c: Mark added div1 variants as static.

	* tune/tuneup.c, tune/speed.c, tune/speed.h, tune/common.c,
	tune/Makefile.am: Add measuring of mpn_hgcd2 method 4 and 5.
	* tune/hgcd2-4.c, tune/hgcd2-5.c: New files.

2019-09-23  Niels Möller  <nisse@lysator.liu.se>

	* gmp-impl.h (hgcd2_func_t) [TUNE_PROGRAM_BUILD]: New typedef.
	(hgcd2_func) [TUNE_PROGRAM_BUILD]: New function pointer.

	* tune/hgcd2.c (mpn_hgcd2): New file, with a redefined function to
	invoke an implementation via the hgcd2_func function pointer.
	Initially points to the default implementation in
	mpn/generic/hgcd2.c.
	* tune/Makefile.am (tuneup_SOURCES): Add hgcd2.c.

	* tune/tuneup.c (one_method): Return index of selected function.
	(tune_hgcd2): Set hgcd2_func to point to selected function. So
	that the later tuning of mpn_hgcd and mpn_gcd uses the right
	implementation of hgcd2.

2019-09-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c: Improve method 4 and 5 by using the division
	free methods optimistically, detecting errors.  Tweak table values.

2019-09-22  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c: Add a 4th and 5th div1 method.

2019-09-18  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c (div1, div2): Rearrange things to allow for asm.
	(div2): Avoid out-of-specs shift.
	(div2): Use same variable naming in all variants.

2019-09-16  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/hgcd2.c (HGCD2_DIV2_METHOD): New define.
	(div2): Replaced, since the old implementation had lots of poorly
	predicted and expensive branches. Two new implementaions, selected
	by HGCD2_DIV2_METHOD.
	(div2) [HGCD2_DIV2_METHOD == 1]: Calls div1 on the high limbs,
	with unlikely case handling large quotients.
	(div2) [HGCD2_DIV2_METHOD == 2]: The previously #if:ed out
	version. A bitwise division, relying on fast count_leading_zeros,
	and with fewer branches than the previous code.

2019-09-15  Torbjörn Granlund  <tg@gmplib.org>

	* acinclude.m4 (GMP_ASM_X86_ADX): Remove unused.

	* configure.ac (x86): Amend last change.

2019-09-14  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/hgcd2.c (HGCD2_DIV1_METHOD): Rename, and change
	default to 3. Updated all usage.
	(HGCD2_METHOD): ... the old name, deleted.

2019-09-14  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Remove obsolete path-triggered invocation of
	GMP_ASM_X86_ADX and GMP_ASM_X86_MULX.

	* acinclude.m4 (GMP_ASM_X86_MULX): Set X86_ASM_MULX to config.h.
	* configure.ac (x86): Set x86_have_mulx for relevant CPUs.
	Use if to conditionally invoke GMP_ASM_X86_MULX.
	* longlong.h (x86 umul_ppmm): Test also X86_ASM_MULX for when to use
	mulx variant.

2019-09-13  Niels Möller  <nisse@lysator.liu.se>

	* tune/tuneup.c (one_method): New helper function, to measure
	several functions for a fix size.
	(tune_hgcd2, tune_div_qr_1, tune_mod_1, tune_jacobi_base): Use it.

2019-09-13  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (HAVE_HOST_CPU_1): Add many x86_64 CPU types.
	* longlong.h (x86 umul_ppmm): Fix criterion for when to use mulx.
	(count_leading_zeros): Use lzcnt for appropriate CPUs.
	(count_trailing_zeros): Use tzcnt for appropriate CPUs.

	* mpn/generic/hgcd2.c (HGCD2_METHOD=2 div1): Rewrite.

2019-09-09  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/mul.c: Call mpn_mul_basecase early when in range.  Never
	call mpn_sqr.

	* mpn/generic/gcd.c: Rewrite tail of function, for n <= 2.

2019-09-08  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm): Select arch armv7ve for a7, a12, a15, and a17,
	this enables the use of the udiv instruction.

	* mpn/generic/hgcd2.c (disabled div2): Micro-optimise.

2019-09-07  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/hgcd2.c (HGCD2_METHOD=3 div1): Micro-optimise.

2019-09-07  Vincent Lefevre <vincent@vinc17.net>

	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Append EXEEXT for executable.

2019-09-05  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/gcd_22.asm: Rewrite to make better use of Arm conditional
	execution.
	* mpn/arm32/gcd_22.asm: Likewise.

2019-09-05  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/hgcd2.c (div1): Return both r and q as a
	mp_double_limb_t, replacing the DIV1 macro.
	(div1) [HGCD2_METHOD == 3]: New implementation handling q <= 7
	specially and without branches. Based on Torbjörn's mail to the
	gmp-devel list.
	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
	corresponding speed support.
	* tune/hgcd2-3.c: New file.
	* tune/tuneup.c (print_define_with_speedup): New function, to
	output a comment with speedup compared to next-best method.
	(tune_hgcd2): Update tuning.

2019-09-04  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/hgcd2.c (HGCD2_METHOD): New parameter.
	(DIV1): New macro, using either the div1 function or plain
	division, depending on the value of HGCD2_METHOD.
	(mpn_hgcd2): Use DIV1.
	* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
	measuring of mpn_hgcd2 methods.
	* tune/hgcd2-1.c, tune/hgcd2-2.c: New files.
	* tune/tuneup.c: Tune HGCD2_METHOD.

	* tune/speed.h (SPEED_ROUTINE_MPN_HGCD2): New macro.
	* tune/common.c (speed_mpn_hgcd2): New function.
	* tune/speed.c (routine): Add mpn_hgcd2.

2019-09-04  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm/v6t2/gcd_22.asm: New file.
	* mpn/arm64/gcd_22.asm: New file.
	* mpn/ia64/gcd_11.asm: New file.

2019-09-01  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bt1/gcd_11.asm: Replace grabber with bt1 optimised code.

2019-08-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd4/gcd_22.asm: New grabber file.

	* mpn/x86_64/zen/gcd_22.asm: Use coreihwl instead of bd2 gcd_22.

	* mpn/x86_64/bd2/gcd_22.asm: Fix typo in FUNC_ENTRY (currently unused).
	Avoid a register copy before return.
	* mpn/x86_64/core2/gcd_22.asm: Likewise.
	* mpn/x86_64/k10/gcd_22.asm: Likewise.
	* mpn/x86_64/gcd_22.asm: Likewise.

	* mpn/x86_64/coreihwl/gcd_22.asm: Optimise, now runs well on more CPUs.

	* mpn/x86_64/gcd_11.asm: Remove PROTECT from symbols as they are
	actually local.
	* mpn/x86_64/gcd_22.asm: Likewise.

2019-08-25  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd2/gcd_22.asm: Repeat tzcnt for exceptional lowz case.
	Remove dead code.

	* mpn/powerpc64/mode64/p7/gcd_22.asm: Make logic for determining ABI
	wrt struct return more robust.
	* mpn/powerpc64/mode64/p9/gcd_22.asm: Likewise.

2019-08-24  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bt1/gcd_11.asm: New grabber.
	* mpn/x86_64/bt1/gcd_22.asm: New grabber.
	* mpn/x86_64/bt2/gcd_22.asm: New grabber.

	* mpn/x86_64/atom/gcd_22.asm: Remove stale grabber file.
	* mpn/x86_64/zen/gcd_22.asm: Grab bd2 instead of hwl code.
	* mpn/x86_64/bd2/gcd_22.asm: New file.
	* mpn/x86_64/k8/gcd_22.asm: Remove, rely on top-level code instead.
	* mpn/x86_64/bt1/gcd_22.asm: Remove.
	* x86_64/gcd_22.asm: New file, improved version of removed bt1 code.

2019-08-22  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreihwl/gcd_11.asm: Remove as it was never beneficial.

	* mpn/x86_64/bd2/gcd_11.asm: Make sure rdx is zero on return to benefit
	gcd_22's private calls. Make gcd_11 files more similar in register use.
	* mpn/x86_64/bd4/gcd_11.asm: Likewise.
	* mpn/x86_64/core2/gcd_11.asm: Likewise.
	* mpn/x86_64/gcd_11.asm:: Likewise.

2019-08-22  Niels Möller  <nisse@lysator.liu.se>

	From Hugh McMaster:
	* gmp.pc.in, gmpxx.pc.in: New files.
	* configure.ac: New output files gmp.pc and gmpxx.pc.
	* Makefile.am (pkgconfigdir, pkgconfig_DATA): New automake
	settings, to install gmp.pc and optionally gmpxx.pc for use with
	pkg-config.

2019-08-21  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/core2/gcd_22.asm: New file.
	* mpn/x86_64/k8/gcd_22.asm: New file.
	* mpn/x86_64/k10/gcd_22.asm: New file.
	* mpn/x86_64/coreihwl/gcd_22.asm: New file.
	* mpn/x86_64/bt1/gcd_22.asm: New file.
	* mpn/x86_64/bd4/gcd_22.asm: New grabber.
	* mpn/x86_64/zen/gcd_22.asm: New grabber.
	* mpn/x86_64/atom/gcd_22.asm: New grabber.

2019-08-19  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Check for ELFv1 ABI on PowerPC.

2019-08-18  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (arm32 sub_ddmmss): Define separately for thumb and
	non-thumb as rsc instruction is missing for thumb.

	* mpn/powerpc64/mode64/p7/gcd_22.asm: New file.
	* mpn/powerpc64/mode64/p9/gcd_22.asm: New file.

2019-08-17  Torbjörn Granlund  <tg@gmplib.org>

	* demos/expr/t-expr.c: #include gmp-impl.h as it includes tests.h.

	* mpn/asm-defs.m4: Add gcd_22.

	* tests/refmpn.c (refmpn_gcd_22): New function.
	* tests/tests.h: Declare it.

	* tests/t-constants.c: #include gmp-impl.h.
	* tests/mpf/t-get_d.c: Likewise.

2019-08-17  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/gcd_22.c (mpn_gcd_22): New implementation with less
	branches.

2019-08-16 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/brootinv.c: Shorten computations, using even exponent.
	* mpn/generic/powlo.c: Avoid copies with a flipflop.

2019-08-16  Niels Möller  <nisse@lysator.liu.se>

	Speed support for gcd_22. Calls mpn_gcd_22(al, al, bl, bl), so
	that B+1 is a common factor.
	* tune/speed.h (SPEED_ROUTINE_MPN_GCD_22): New macro.
	* tune/speed.c (routine): Add mpn_gcd_22.
	* tune/common.c (speed_mpn_gcd_22): New function.

	* mpn/generic/gcd.c (gcd_2): Moved to gcd_22.c below.
	(mpn_gcd): Adapt for calling gcd_22.
	* mpn/generic/gcd_22.c (mpn_gcd_22): New file and function.
	* gmp-impl.h (mp_double_limb_t): New (typedef) struct.
	* configure.ac (gmp_mpn_functions): Added gcd_22.

	* tests/mpn/t-gcd_22.c: New test.
	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-gcd_22.
	* tests/refmpz.c (refmpz_gcd): New function (plain binary gcd).

2019-08-15  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/gcd_11.asm: Use bd2 instead of bd4 code.

2019-08-13  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64: Add more gcd_11 variants of of x86_64 gcd_11.asm and
	tweak existing ones.

2019-08-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	From Seth Troisi:
	* doc/gmp.texi: Update mpz_millerrabin documentation.

	* mpn/x86_64/bd2/gcd_11.asm: Micro-optimisation.
	* doc/gmp.texi: Further update in mpz_millerrabin.
	* tests/misc.c: Silence a warning.
	* tests/mpz/t-pprime_p.c (const primes): One more prime in the list.
	* mpz/millerrabin.c: Return 2 for surely prime numbers (BPSW checked).

2019-08-08  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86/gcd_11.asm: New file.

	* config.sub: Make arm cpu types match what config.guess returns.

2019-08-08  Niels Möller  <nisse@lysator.liu.se>

	* tests/refmpn.c (refmpn_gcd_11): New function, based on refmpn_gcd_1.
	(refmpn_gcd_1): Use it.
	* tests/mpn/t-gcd_11.c: New file, test mpn_gcd_11.
	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-gcd_11.

2019-08-07  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/alpha/ev67/gcd_11.asm: New file, mostly extracted from gcd_1.asm.
	* mpn/arm/v5/gcd_11.asm: Likewise.
	* mpn/arm/v6t2/gcd_11.asm: Likewise.
	* mpn/arm64/gcd_11.asm: Likewise.
	* mpn/powerpc64/mode64/gcd_11.asm: Likewise.
	* mpn/powerpc64/mode64/p7/gcd_11.asm: Likewise.
	* mpn/powerpc64/mode64/p9/gcd_11.asm: Likewise.
	* mpn/sparc64/gcd_11.asm: Likewise.
	* mpn/x86/k7/gcd_11.asm: Likewise.
	* mpn/x86/p6/gcd_11.asm: Likewise.
	* mpn/x86_64/bd2/gcd_11.asm: Likewise.
	* mpn/x86_64/core2/gcd_11.asm: Likewise.
	* mpn/x86_64/gcd_11.asm: Likewise.
	* mpn/asm-defs.m4: Add gcd_11.

2019-08-06  Niels Möller  <nisse@lysator.liu.se>

	* tune/common.c (speed_mpn_gcd_11): New function.
	* tune/speed.h (speed_mpn_gcd_11): Declare it.
	(SPEED_ROUTINE_MPN_GCD_11): New macro.
	* tune/speed.c (routine): Add mpn_gcd_11.

	* configure.ac (gmp_mpn_functions): Added gcd_11. Also add
	HAVE_NATIVE_mpn_gcd_11.
	* mpn/generic/gcd_11.c (mpn_gcd_11): New file and function,
	extracted from mpn_gcd_1.
	* gmp-h.in (mpn_gcd_11): Declare it.
	* mpn/generic/gcd_1.c (mpn_gcd_1): Adapted to call mpn_gcd_11.

2019-08-04  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bt2/gcd_1.asm: New grabber file.
	* mpn/x86_64/zen/gcd_1.asm: Grab from "bd2" directory, was "core2".

2019-08-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd2/gcd_1.asm: New file.

2019-08-01  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpf/t-conv.c: Add several more fixed test cases.

	* mpf/set_str.c: Ignore leading zeros including ones after radix point
	to avoid invalid output formats.

2019-07-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/gcd_1.asm: New file.

2019-07-30  Niels Möller  <nisse@lysator.liu.se>

	From Seth Troisi:
	* doc/gmp.texi (Jacobi Symbol): Update algorithm documentation.
	* tests/mpz/t-jac.c: Comment update.

2019-07-13  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm): Generalise arm a72 pattern to match a73...a79.

2019-07-08  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm/arm-defs.m4 (ASM_START): Rewrite (fix broken error handling).

2019-07-02  Torbjörn Granlund  <tg@gmplib.org>

	* acinclude.m4 (GMP_C_DOUBLE_FORMAT): Compile conftest.c to executable
	in order to trigger final compile in case of LTO.

2019-06-17  Torbjörn Granlund  <tg@gmplib.org>

	* config.guess: Work around upstream configfsf.guess's regression wrt
	mips vs mips64.

2019-06-14  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (mips64): Provide r6 asm code as default expression yields
	libcall.

	* configure.ac (mips64): Use separate paths for r6 and non-r6 as these
	architectures are mutually incompatible.

	* mpn/mips64/{addmul_1,mul_1,sqr_diagonal,submul_1,umul}.asm:
	Move into hilo subdir.

2019-05-28  Torbjörn Granlund  <tg@gmplib.org>

	* config.sub: Fixes to which cpu types end with a "*".

2019-04-20  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (References): Link to paper on subquadratic GCD.

2019-04-19  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/hamdist.asm: Really make 2017-06-01 change: Use
	3-operand DEF_OBJECT.

	* mpn/x86_64/invert_limb.asm: Simplify mpn_invert_limb_table ref.

	* mpn/x86_64/x86_64-defs.m4 (LEA): Use rip addressing for non-PIC.

2019-04-17  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/jacobi.c (mpn_jacobi_n): Use JACOBI_DC_THRESHOLD,
	not GCD_DC_THRESHOLD. Inconsistency spotted by Seth Troisi.

2019-04-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init):
	Split out silvermont handling, add handling of goldmont.

	* configure.ac: Setup distinct paths for silvermont and goldmont.
	(fat_path): Add missing x86_64/goldmont.

	* config.guess: Recognise "Goldmont Plus".

2018-12-09  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/mul_fft.c (mpn_fft_add_sub_modF): New function.
	(mpn_fft_fft, mpn_fft_fftinv): Use it.

2018-11-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/gmp-mparam.h: New file.

	* mpn/powerpc64/mode64/p9/add_n_sub_n.asm: New file.

2018-11-28  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/sqr_basecase.asm: New file.
	* mpn/powerpc64/mode64/p9/mul_1.asm: New file.

2018-11-18  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/mul_basecase.asm: New file.

	* mpn/powerpc64/mode64/p9/addmul_1.asm: Optimise.

2018-11-12  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/aorsmul_1.asm: New file, providing fast
	submul_1 (and redundant addmul_1).

2018-11-11  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/addmul_1.asm: Tweak for slightly better
	speed.

	* mpn/powerpc32/powerpc-defs.m4: Define addex.
	* mpn/powerpc64/mode64/p9/mul_2.asm: Use it.
	* mpn/powerpc64/mode64/p9/addmul_2.asm: Likewise.

2018-11-08  Torbjörn Granlund  <tg@gmplib.org>

	* tests/devel/cnd_aors_n.c: New file.

	* mpn/arm/neon/lorrshift.asm: Declare use of neon insns.
	* mpn/arm/neon/lshiftc.asm: Likewise + cleanup.

	* tests/devel/Makefile.am (EXTRA_PROGRAMS): Add missing files.

	* mpn/powerpc64/mode64/p9/mul_2.asm: New file.
	* mpn/powerpc64/mode64/p9/addmul_2.asm: New file.

2018-11-07 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/lucnum2_ui.c: Use mpn_rsblsh1_n if available.
	* tests/mpz/t-nextprime.c: Add one more interval.
	* tests/mpz/t-pprime_p.c (check_fermat_mersenne): New tests.
	* mpn/generic/mod_1_3.c: typo in a comment.
	* mpz/nextprime.c: Use tdiv instead of fdiv.

	* mpn/generic/fib2m.c: New file, Fibonacci numbers modulo.
	* configure.ac (gmp_mpn_functions): Add it.
	* gmp-impl.h: Declare mpn_fib2m.
	* tests/mpn/t-fib2m.c: New file, tests for mpn_fib2m.
	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-fib2m.

	* mpn/generic/mod_34lsub1.c: Initialise c[012] once.
	* tests/mpz/t-pprime_p.c (check_primes): Two more primes.
	* tests/mp?: Use TESTS_REPS in many files.

	* mpn/generic/strongfibo.c: New file, Fibonacci primality test.
	* configure.ac (gmp_mpn_functions): Add it.
	* gmp-impl.h: Declare mpn_strongfibo.

	* mpz/stronglucas.c: New file, strong Lucas primality test.
	* Makefile.am (MPZ_OBJECTS): Add it.
	* mpz/Makefile.am (libmpz_la_SOURCES): Add it.
	* gmp-impl.h: Declare mpz_stronglucas.

	* mpz/millerrabin.c: Implement BPSW test for primality.

2018-11-07  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm): Support a12 and a17.
	* config.sub: Generalise arm matching.
	* config.guess: Recognise additional arm CPUs.

	* mpn/arm/arm-defs.m4 (ASM_START): Provide local definition.

2018-10-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm/v7a/cora17/mod_34lsub1.asm: New file.
	* mpn/arm/v7a/cora17/gmp-mparam.h: New file.
	* mpn/arm/v7a/cora17/mul_1.asm: New grabber file.
	* mpn/arm/v7a/cora17/addmul_1.asm: Likewise.
	* mpn/arm/v7a/cora17/submul_1.asm: Likewise.

2018-10-18 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/fib2_ui.c: Simplify the possible -2 case.

2018-07-19 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/millerrabin.c (mod_eq_m1): New function, equality with -1.
	* mpz/powm_ui.c: Small optimisations.

2018-07-03  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/lshift.asm: Remove cnt = 1 special code.

	* mpn/x86_64/silvermont/popcount.asm: Add missing ABI_SUPPORT decls.
	* mpn/x86_64/silvermont/hamdist.asm: Likewise.
	* mpn/x86_64/zen/mul_1.asm: Likewise.

	* mpn/x86_64/fastsse/lshift.asm: Support DOS64.
	* mpn/x86_64/fastsse/lshiftc.asm: Likewise.

	* mpn/x86_64/pentium4/gmp-mparam.h: Retune.

2018-07-01  Torbjörn Granlund  <tg@gmplib.org>

	* lshift.asm: Replace with grabber file.
	* lshiftc.asm: Replace with grabber file.
	* x86_64/pentium4/addmul_2.asm: New grabber file.
	* x86_64/pentium4/aorsmul_1.asm: New grabber file.
	* x86_64/pentium4/mul_1.asm: New grabber file.
	* x86_64/pentium4/mul_2.asm: New grabber file.
	* x86_64/pentium4/mul_basecase.asm: New grabber file.
	* x86_64/pentium4/mullo_basecase.asm: New grabber file.
	* x86_64/pentium4/redc_1.asm: New grabber file.
	* x86_64/pentium4/sqr_basecase.asm: New grabber file.

2018-06-13  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/gcd_1.c (mpn_gcd_1): Delete unused code variant for
	GCD_1_METHOD == 1, and delete GCD_1_METHOD macro. Simplify the
	structure of the remaining code variant, without gotos to the
	mid-loop strip_u_maybe label.

2018-05-30  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (x86): Provide goldmont specific path.

	* mpn/x86_64/goldmont/gmp-mparam.h: New file.

2018-05-29  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (x86): Pass more exact arch/tune options for nehalem.

2018-05-28  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/gcd_1.c (mpn_gcd_1) [USE_ZEROTAB]: Delete unused code
	variant for USE_ZEROTAB != 0.

2018-05-20 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* bootstrap.c: Define DONT_USE_FLOAT_H before including mini-gmp.

2018-05-14 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n): Decl. static.
	(mpn_dcpi1_bdiv_q_n_itch): Declare static.
	* mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q_n): static.
	* mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): static.
	* mpn/generic/mu_div_qr.c (mpn_mu_div_qr_choose_in): static.
	* mpn/generic/mu_divappr_q.c (mpn_preinv_mu_divappr_q): static.
	(mpn_mu_divappr_q_choose_in): static.
	* gmp-impl.h: Remove declaration of previous functions.

	* mpn/generic/get_d.c: Enhance generic code using DBL_MANT_DIG.

	* printf/repl-vsnprintf.c: Better handling floating-point
	specifiers "EeGgFf" (Thanks Vincent Lefevre).

2018-05-04 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* doc/gmp.texi (mpq_*_str): Document the full base allowed range.
	* mpq/get_str.c: Make all bases either work or return an error.

	* doc/gmp.texi (Integer Internals): Lazy allocation and read-only.

2018-04-27  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/div_q.c (mpn_div_q): Replace dead code with ASSERT.
	Spotted by Paul Zimmermann and Raphaël Rieu-Hleft.

	* tests/mpn/t-div.c (main): Fill quotient area with junk before
	calling mpn_div_q.

2018-04-26 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* Makefile.am (EXTRA_DIST): Add mini-gmp/mini-mpq.[ch].

2018-04-23 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/toom2_sqr.c: Handle the cy=-1 branch slightly faster.
	* mpn/generic/toom22_mul.c: Likewise. (Thanks Paul and Raphaël!)

2018-04-22  Niels Möller  <nisse@lysator.liu.se>

	From Martin Storsjö:
	* configure.ac (aarch64): Just as on windows/x86_64, "long" still
	is 32 bit on aarch64. To distinguish between 32-bit and 64-bit
	ABI, test sizeof(void*) instead of sizeof(long). Use long long for
	mp_limb_t for mingw targets.
	* acinclude.m4 (GMP_C_TEST_SIZEOF): Allow '*' in the type name,
	e.g., void*.

2018-04-18  Marc Glisse  <marc.glisse@inria.fr>

	* mpq/clear.c: Handle lazy numerator.
	* mpq/clears.c: Likewise.
	* mpq/init.c: Likewise.
	* mpq/set_si.c: Likewise.
	* mpq/set_ui.c: Likewise.

	* tests/cxx/t-ops2z.cc: Add parentheses to quiet a warning.

2018-03-28  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (mips): Recognise "mipsisa64*".

2018-03-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/sec_powm.c: Remove unused macros.
	Simplify code for choosing between redc_1 and redc_2.
	Compute power table with squaring for even powers.

2018-02-28 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gmpxx.h (__gmp_binary_plus): Special case for mpq + 1.
	(__gmp_binary_minus): Special case for mpq - 1.
	(__gmp_binary_equal): Optimised comparison mpq == integer.
	* tests/cxx/t-ops2qf.cc (checkqf): Some check for +/- 1, +/- 0.

2018-02-18 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tune/Makefile.am: Disallow parallel make (thanks Vincent Lefevre).
	* mpq/swap.c: Use *_SWAP_* macros.
	* mpq/cmp_ui.c: One more little shortcut, comparing fractions to 1.
	* mpq/get_d.c: Compare (zeros > 0) once, replace tdiv_qr with div_q.
	* mpq/equal.c: Check size early.

	* printf/obprintf.c: Adda dummy typedef to avoid empty unit.
	* printf/obvprintf.c: Likewise.
	* printf/obprntffuns.c: Likewise.
	* printf/repl-vsnprintf.c: Move #ifdef after #include gmp-impl.h .

2018-02-09  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm: Really revert 2018-01-04 changes.

2018-02-08 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* printf/snprntffuns.c: Report -1 as an error.
	* acinclude.m4 (GMP_FUNC_VSNPRINTF): Refuse -1 as return value.

	* mpz/bin_uiui.c (mpz_smallk_bin_uiui): One more shortcut for small k.
	* gmp-impl.h (popc_limb): Use fewer constants (GMP_LIMB_BITS == 16).
	* mpz/divegcd.c (mpz_divexact_limb): Use MPN_DIVREM_OR_DIVEXACT_1.
	* primesieve.c (fill_bitpattern): Use MPN_FILL.

2018-02-01  Marc Glisse  <marc.glisse@inria.fr>

	* longlong.h (i586): Remove assert.

2018-01-30 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/and.c: Rearrange the 3 cases, both <0, both >=0, one and one.
	* mpz/ior.c: Likewise.
	* mpz/xor.c: Likewise.

	* mpz/bin_uiui.c (mul[4-8]): Reduce the number of multiplications.

	* printf/doprnt.c: Use __GMP_FREE_FUNC_TYPE.
	* printf/doprntf.c: Likewise.
	* printf/snprntffuns.c: Likewise, and use size_t instead of int.

2018-01-15 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/mpz/t-bin.c: Extended tests for bin_ui and uint border cases.

2018-01-10  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Fix old pentium recog.
	* config.guess: Likewise.

	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Add many 64-bit CPUs.

2018-01-07  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm: Revert last change, it hides a symbol needed for testing.

2018-01-04  Torbjörn Granlund  <tg@gmplib.org>

	* bdiv_q_1.asm (binvert_limb_table): Declare as ".hidden".
	* v7a/cora8/bdiv_q_1.asm: Likewise.
	* dive_1.asm: Likewise.
	* v6/dive_1.asm: Likewise.

	* mode1o.asm (binvert_limb_table): Remove ".protected", add ".hidden".
	* v6/mode1o.asm: Likewise.

2018-01-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/divrem_2.asm: Use different rlwinm variant (to
	appease clang).

2018-01-01  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc32/powerpc-defs.m4: Define maddld, maddhdu, popcntd, and
	divdeu.
	* mpn/powerpc64/mode64/p8/invert_limb.asm: Use new insn defs.
	* mpn/powerpc64/mode64/p9/addmul_1.asm: Use new insn defs.
	* mpn/powerpc64/p7/hamdist.asm: Use new insn defs.
	* mpn/powerpc64/p7/popcount.asm: Use new insn defs.

2017-12-31  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/p9/addmul_1.asm: Moved from
	mpn/powerpc64/p9/addmul_1.asm.

2017-12-30 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/bin_ui.c: Rewrite, using Fredrik Johansson's suggestions.

2017-12-27  Niels Möller  <nisse@lysator.liu.se>

	* longlong.h (arm32/arm64): Leave COUNT_LEADING_ZEROS_0 undefined,
	since we use gcc's __builtin_clzl, which doesn't allow zero inputs.

2017-12-27  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/mode64/bdiv_q_1.asm: Use 64-bit cmp for sizes.

	* mpn/powerpc64/p9/addmul_1.asm: New file.

	* configure.ac: Separate handling of POWER8 and POWER9.

	* config.guess: Recognise POWER9 and more variants of POWER8.
	Reorder recog code to favour PVR over proc/cpuinfo.

2017-12-14  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/fastsse/com.asm: Adhere to DOS64 xmm callee-saves rules.
	* mpn/x86_64/fastsse/com-palignr.asm: Likewise.
	* mpn/x86_64/fastsse/copyd.asm: Likewise.
	* mpn/x86_64/fastsse/copyi.asm: Likewise.
	* mpn/x86_64/fastsse/lshiftc.asm: Likewise.
	* mpn/x86_64/fastsse/sec_tabselect.asm: Likewise.

2017-12-11  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/aorrlsh_n.asm: New grabber file.

2017-12-10  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/aors_n.asm: New grabber file.

	* mpn/x86_64/bd4/aorrlsh_n.asm: New grabber file.

2017-08-31  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/sparc32/sparc-defs.m4 (LEA64): Rewrite for both PIC and non-PIC.

	* mpn/sparc64/ultrasparct3/cnd_aors_n.asm: Allow arbitrary cnd arg.

2017-08-29  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/silvermont/gmp-mparam.h: Disable mul_2 and addmul_2.

2017-08-28  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/sparc64: Revert 2017-07-23 PIC changes.

	* mpn/powerpc32/divrem_2.asm: Avoid bc+ insn form to accommodate clang.

	* mpn/generic/sbpi1_bdiv_qr.c: Correct ASSERT.
	* mpn/generic/sbpi1_bdiv_q.c: Likewise.
	* mpn/generic/sbpi1_bdiv_r.c: Likewise.

2017-08-18  Torbjörn Granlund  <tg@gmplib.org>

	* acinclude.m4 (X86_64_PATTERN): Match zen*.

	* configure.ac (x86): Support AVX challenged systems for Zen.

2017-07-24  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/sbpi1_bdiv_q.c: Add ASSERT for inverse correctness.
	* mpn/generic/sbpi1_bdiv_qr.c: Likewise.

	* tests/mpn/t-bdiv.c (main): Amend last change.

	* tests/devel/try.c (choice_array): Amend 2013-05-03 change to include
	more functions.

2017-07-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/sparc64/gcd_1.asm: Enforce PIC as GNU/Linux toolchain workaround.
	* mpn/sparc64/ultrasparct3/bdiv_q_1.asm: Likewise.
	* mpn/sparc64/ultrasparct3/dive_1.asm: Likewise.
	* mpn/sparc64/ultrasparct3/invert_limb.asm: Likewise.
	* mpn/sparc64/ultrasparct3/mode1o.asm: Likewise.

	* gmp-impl.h: Reorganise foolshC_ip1 -> foolshC -> foolsh chain to make
	it transitive.

2017-07-23  Niels Möller  <nisse@lysator.liu.se>

	* longlong.h: Purge definitions of obsolete UMUL_TIME and
	UDIV_TIME constants. Also mentioned (but unused) in
	mpn/cray/gmp-mparam.h and tune/common.c.

2017-07-21  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpn/t-bdiv.c (main): Test mpn_sbpi1_bdiv_r.

	* tune/common.c (speed_mpn_sbpi1_bdiv_r): New function.
	* tune/speed.h: Declare it.
	(SPEED_ROUTINE_MPN_PI1_BDIV_R): New macro.
	* tune/speed.c (routine): Add mpn_sbpi1_bdiv_r.

2017-07-20  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (gmp_mpn_functions): Add sbpi1_bdiv_r.

	* gmp-impl.h (mpn_sbpi1_bdiv_r): Declare.

	* mpn/asm-defs.m4 (define_mpn): Add sbpi1_bdiv_q, sbpi1_bdiv_qr,
	sbpi1_bdiv_r.

	* mpn/generic/sbpi1_bdiv_r.c: New file.
	* mpn/x86_64/zen/sbpi1_bdiv_r.asm: New file.

2017-07-19  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86/p6/sse2/submul_1.asm: Get pentium4 code instead of k6 code
	for better speed on modern Intel P6 cores.

2017-07-02  Torbjörn Granlund  <tg@gmplib.org>

	* tune/tuneup.c (tune_mullo): For MULLO_BASECASE_THRESHOLD start at 2.
	(tune_sqrlo): Likewise.

2017-06-28  Torbjörn Granlund  <tg@gmplib.org>

	* tests/Makefile.am tests/*/Makefile.am tune/Makefile.am (AM_LDFLAGS):
	Define.  (Thanks to Emmanuel Thomé and Vincent Lefevre.)

2017-06-27  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/sqr_basecase.asm: Expand to use 4 addmul_1 loops.

	* mpn/x86_64/x86_64-defs.m4 (sarx): New macro.

2017-06-26  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreibwl/sqr_basecase.asm: Rewrite to do 2x and limb
	squaring in main loop.

2017-06-20  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/atom/cnd_add_n.asm: New grabber file.
	* mpn/x86_64/atom/cnd_sub_n.asm: Likewise.

	* mpn/x86_64/coreihwl/aorrlsh_n.asm: New grabber file.

2017-06-16  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/mul_basecase.asm: Do overlapped software pipelining.

	* mpn/x86_64/silvermont/mul_basecase.asm: New grabber file.
	* mpn/x86_64/silvermont/sqr_basecase.asm: Likewise.
	* mpn/x86_64/silvermont/mullo_basecase.asm: Likewise.

2017-06-14  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/mullo_basecase.asm: New file.
	* mpn/x86_64/coreibwl/mullo_basecase.asm: New file.

2017-06-11  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/popham.asm: Crossjump for code size and mix lead-in insns
	for lower overhead.

2017-06-09  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Set GMP_NONSTD_ABI protecting against dots in the abi.
	(hppa): Remove old GNU/Linux restriction to 32-bit ABI.

2017-06-07  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/addmul_2.asm: New file.

2017-06-06  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreihwl/aors_n.asm: New file.

	* mpn/x86_64/x86_64-defs.m4 (c4_helper): New macro.
	(mulx, shlx, shrx): Use c4_helper.

	* mpn/x86_64/zen/mul_basecase.asm: Use 8-bit imm operands for "test".

	* mpn/x86_64/zen/aorrlsh1_n.asm: New grabber file.
	* mpn/x86_64/zen/sublsh1_n.asm: Likewise.
	* mpn/x86_64/zen/aorrlsh_n.asm: New file

2017-06-04  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Use bt1/bt2 for bobcat and jaguar dirs.
	(fat_path): Add x86_64/bt2.

	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.
	Make zen path correspond to non-fat path.
	* mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Adapt to bt1/bt2 changes.

	* mpn/x86_64/bt2/copyi.asm: New grabber file.
	* mpn/x86_64/bt2/copyd.asm: New grabber file.
	* mpn/x86_64/bt2/com.asm: New grabber file.

2017-06-03  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/popcount.asm: Expand some instructions as .byte
	sequences.
	* mpn/x86_64/bd1/hamdist.asm: Likewise.

2017-06-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Fix quoting (amends recent
	change).
	(JUMPTABSECT): Get rid of spurious "w".

2017-06-02  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (mpf_class::operator bool): Use mpf_sgn to access _mp_size.

2017-06-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/bd1/popcount.asm: Use both SSE and XOP trickery, and
	plain popcnt insn.
	* mpn/x86_64/bd1/hamdist.asm: Likewise.

2017-06-01  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/x86_64-defs.m4 (DEF_OBJECT): Allow 3rd argument defining
	section, while making alignment argument non-optional.

	* mpn/x86_64/core2/popcount.asm: Use 3-operand DEF_OBJECT.
	* mpn/x86_64/core2/hamdist.asm: Likewise.
	* mpn/x86_64/bd1/popcount.asm: Likewise.
	* mpn/x86_64/bd1/hamdist.asm: Likewise.

	* configure.ac (GMP_AVX_NOT_REALLY_AVAILABLE): New m4 define.
	* mpn/x86_64/bd1/popcount.asm: Use GMP_AVX_NOT_REALLY_AVAILABLE.
	* mpn/x86_64/bd1/hamdist.asm: Likewise.

	* mpn/x86_64/silvermont/popcount.asm: Reinstate, grabbing nehalem code.
	* mpn/x86_64/silvermont/hamdist.asm: Replace with grabber.

2017-05-31  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/silvermont/popcount.asm: Remove.

	* mpn/x86_64/core2/logops_n.asm: New file.

2017-05-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreisbr/popcount.asm: Remove.

2017-05-29  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreinhm/popcount.asm: Replace grabber code with
	implementation proper.
	* mpn/x86_64/coreinhm/hamdist.asm: Likewise.
	* mpn/x86_64/bd1/popcount.asm: Likewise.
	* mpn/x86_64/bd1/hamdist.asm: Likewise.
	* mpn/x86_64/core2/popcount.asm: Likewise.
	* mpn/x86_64/core2/hamdist.asm: New file.

2017-05-22  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/core2/com.asm: New grabber file.

	* mpn/x86_64/core2/lshift.asm: Rewrite.
	* mpn/x86_64/core2/rshift.asm: Rewrite.
	* mpn/x86_64/core2/lshiftc.asm: Rewrite.

2017-05-16  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/mul_1.asm: Port to DOS64.
	* mpn/x86_64/zen/aorsmul_1.asm: Likewise.
	* mpn/x86_64/coreibwl/addmul_1.asm: Likewise.

2017-05-16  Niels Möller  <nisse@lysator.liu.se>

	* mpn/generic/divis.c (mpn_divisible_p): Updated the divisibility
	test; bdiv now returns R = D rather than R = 0 when D divides a
	non-zero U.

	* mpn/generic/binvert.c (mpn_binvert): Negate bdiv quotient.
	* mpn/generic/divexact.c (mpn_divexact): Likewise.
	* mpn/generic/remove.c (mpn_remove): Likewise.
	* mpz/bin_uiui.c (mpz_bdiv_bin_uiui): Likewise.

	* tests/mpn/t-bdiv.c (check_one): Updated to new convention,
	B^{qn} R = U + QD.

	* mpn/generic/sbpi1_bdiv_qr.c (mpn_sbpi1_bdiv_qr): Reimplemented,
	for new bdiv convention.
	* mpn/generic/sbpi1_bdiv_q.c (mpn_sbpi1_bdiv_q): Likewise.
	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q_n)
	(mpn_dcpi1_bdiv_q): Adapted to new bdiv convention.
	* mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n)
	(mpn_dcpi1_bdiv_qr): Likewise.
	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr): Adapted to new bdiv
	convention, using a wrapper calling the old function.
	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q): Likewise.

2017-05-03  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreisbr/cnd_aors_n.asm: New file.
	* mpn/x86_64/coreisbr/cnd_add_n.asm: New file.

	* mpn/x86_64/core2/aorsmul_1.asm: Tune.

	* mpn/x86_64/silvermont/mul_1.asm: New file, grabbing another asm file.
	* mpn/x86_64/silvermont/aorsmul_1.asm: Likewise.
	* mpn/x86_64/silvermont/aorrlsh1_n.asm: Likewise.
	* mpn/x86_64/silvermont/aorrlsh2_n.asm: Likewise.
	* mpn/x86_64/silvermont/lshift.asm: Likewise.
	* mpn/x86_64/silvermont/rshift.asm: Likewise.
	* mpn/x86_64/silvermont/lshiftc.asm: Likewise.

	* mpn/x86_64/zen/mul_basecase.asm: Split outer loop into 4 loops.

2017-05-02  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/sqr_basecase.asm: Use .byte for encoding all mulx.
	Misc tuning.

2017-04-27  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/sqr_basecase.asm: Rewrite to do 2x and limb squaring
	in main loop.

2017-04-25  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/fat/fat_entry.asm: Allocate correct DOS64 frame.
	* mpn/x86_64/divrem_2.asm: Likewise.
	* mpn/x86_64/mod_1_2.asm: Likewise.
	* mpn/x86_64/mod_1_4.asm: Likewise.
	* mpn/x86_64/mod_1_1.asm: Likewise.

2017-04-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/coreisbr/mul_1.asm: Rewrite feed-in code and add mul_1c
	entry point.

2017-04-17  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Amend last change.

	* mpn/x86_64/zen/mul_basecase.asm: New file.
	* mpn/x86_64/zen/sqr_basecase.asm: New file.

2017-04-16  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/sqr_basecase.c (addmul_1 variant): Rewrite to compute
	in-place and to avoid a re-computation.

	* configure.ac: Remove k8, k10 from zen path.

2017-04-15  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/zen/gmp-mparam.h: New file.

	* mpn/x86_64/zen/com.asm: New file, grabbing another asm file.
	* mpn/x86_64/zen/copyd.asm: Likewise.
	* mpn/x86_64/zen/copyi.asm: Likewise.
	* mpn/x86_64/zen/gcd_1.asm: Likewise.
	* mpn/x86_64/zen/hamdist.asm: Likewise.
	* mpn/x86_64/zen/lshift.asm: Likewise.
	* mpn/x86_64/zen/lshiftc.asm: Likewise.
	* mpn/x86_64/zen/popcount.asm: Likewise.
	* mpn/x86_64/zen/rshift.asm: Likewise.

	* config.guess: Recognise AMD zen.
	* acinclude.m4 (X86_64_PATTERN): Add zen.
	* config.sub: Corresponding changes.
	* configure.ac: Corresponding changes.
	* mpn/x86_64/fat/fat.c: Corresponding changes.

2017-03-27 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/oddfac_1.c (limb_apprsqrt): Better approximation.
	* mpz/bin_uiui.c (limb_apprsqrt): Likewise.

2017-03-12  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpf/t-get_d_2exp.c (check_data): Rewrite of check_onebit.

2017-03-08 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/sqrtrem.c: Direct use of sqrtrem2 when n==2.
	* mpn/generic/div_qr_2.c (udiv_qr_4by2): Replace add_csaac with add_sssaaaa.

2017-03-07  Torbjörn Granlund  <tg@gmplib.org>

	* mpf/get_d_2exp.c: Return negative value for negative input.

2017-03-06  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (aarch64): Provide asm-free umul_ppmm.
	* longlong.h (powerpc64): Enable asm-free umul_ppmm.

2017-03-04  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/sqr_diag_addlsh1.asm: Complete rewrite.

2017-02-27  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (arm32/arm64): Remove useless comparison to 0 introduced
	in last change (spotted by Marco).

2017-02-26 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/pow_1.c: Use umul_ppmm for a single limb.

2017-02-25  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Allow MP_SIZE_T_MAX for thresholds exported to
	config.m4.

	* mpn/x86_64/gcd_1.asm: Handle BMOD_1_TO_MOD_1_THRESHOLD=MP_SIZE_T_MAX.
	Streamline non-reduction path.
	* mpn/x86_64/core2/gcd_1.asm: Streamline small operands cases similarly
	to top-level code.

2017-02-24  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (arm32/arm64 add_ssaaaa): Use "subs" for some immediates.
	* longlong.h (arm32/arm64 sub_ddmmss): Use "adds" for some immediates.

	* mpn/arm64/copyi.asm: Avoid branching on flags.
	* mpn/arm64/copyd.asm: Likewise.

	* mpn/generic/div_qr_2.c (aarch64 add_sssaaaa): New.
	* mpn/generic/div_qr_1n_pi2.c: Same.
	* mpn/generic/div_qr_1u_pi2.c: Same.

	* mpn/generic/div_qr_2.c (powerpc add_sssaaaa): Fix typo.
	* mpn/generic/div_qr_1n_pi2.c: Same.
	* mpn/generic/div_qr_1u_pi2.c: Same.

2017-02-23 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/devel/sqrtrem_1_2.c: New exhaustive test for sqrtrem_[12].
	* tests/devel/Makefile.am (EXTRA_PROGRAMS): add it.

2017-02-23  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/silvermont/gmp-mparam.h: New file.

2017-02-22  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/aorsmul_1.asm: Rewrite.

	* mpn/arm64/lshiftc.asm: New file.

2017-02-21  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/lshift.asm: Rewrite.
	* mpn/arm64/rshift.asm: Rewrite.

	* mpn/arm64/rsh1aors_n.asm: New file.

2017-02-19  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/mul_1.asm: Rewrite.
	* mpn/arm64/xgene1/mul_1.asm: Remove.

2017-02-17  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/cora53/cnd_aors_n.asm: Moved from "..".

	* mpn/arm64/xgene1/cnd_aors_n.asm: Remove file since default code
	performs better.

	* mpn/arm64/cnd_aors_n.asm: Rewrite.

	* mpn/arm64/logops_n.asm: Rewrite based on new aors_n.asm.

2017-02-16  Pedro Gimeno  <pggimeno@wanadoo.es>

	* rand/randmt.c (__gmp_randiset_mt): Set generator functions from
	source.

2017-02-16  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm64/aorsorrlshC_n.asm: New file.
	* mpn/arm64/aorsorrlsh2_n.asm: New file.
	* mpn/arm64/aorsorrlsh1_n.asm: New file.

	* mpn/arm64/xgene1/aors_n.asm: Remove file since default code now
	performs similarly.

	* mpn/arm64/aors_n.asm: Rewrite to use 4x unrolling.

2017-02-15  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/silvermont/hamdist.asm: New file, based on k10 code.

	* mpn/x86_64/silvermont/popcount.asm: Grab coreisbr/popcount.asm.

2017-02-14  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/x86_64/silvermont/aors_n.asm: New file, grabbing coreisbr code.

	* mpn/x86_64/atom/aors_n.asm: Replace coreisbr grabbing code with
	code based on Marco's x64/atom/aors_n.asm.

2017-02-12  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/powerpc64/aix.m4 (AIX): New define.

	* mpn/powerpc64/mode64/bdiv_q_1.asm: For AIX, don't jump from
	mpn_bdiv_q_1 to middle of mpn_pi1_bdiv_q_1.  Streamline.

	* mpn/powerpc64/darwin.m4 (LEA): Put code in lea_list instead of in
	EPILOGUE_cpu.
	(EPILOGUE_cpu): Output lea_list, the zap it.

	* mpn/sparc64/ultrasparct3/bdiv_q_1.asm: New file, based on dive_1.asm.

2017-02-11  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm/v7a/cora8/bdiv_q_1.asm: New file, based on v6/dive_1.asm.
	* mpn/arm/v7a/cora9/bdiv_q_1.asm: New file, grabbing cora8 code.
	* mpn/arm/v7a/cora15/bdiv_q_1.asm: Likewise.

	* mpn/arm64/aors_n.asm: (SETCY, RETVAL): Shorten insn sequences.
	* mpn/arm64/cnd_aors_n.asm: Likewise.
	* mpn/arm64/xgene1/aors_n.asm: Likewise.
	* mpn/arm64/xgene1/cnd_aors_n.asm: Likewise.

	* mpn/arm/bdiv_q_1.asm: New file, based on dive_1.asm.

	* mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Remove odd d special case.

	* mpn/powerpc64/mode64/bdiv_q_1.asm: New file.

	* mpn/arm64/bdiv_q_1.asm: New file.

2017-02-10  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/arm/arm-defs.m4 (EPILOGUE_cpu): Zap lea_list to avoid repetition.

	* mpn/x86_64/bdiv_q_1.asm: Rewrite, base on atom/dive_1.asm.

2017-02-08  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/compute_powtab.c: Choose mpn_pi1_bdiv_q_1 vs
	mpn_divexact_1 more wisely (spotted by Marco).

2017-02-07  Torbjörn Granlund  <tg@gmplib.org>

	* tune/tuneup.c (relspeed_div_1_vs_mul_1): Prefer mpn_pi1_bdiv_q_1.

	* mpn/generic/compute_powtab.c: Use mpn_pi1_bdiv_q_1/mpn_bdiv_q_1
	instead of mpn_divexact_1.

	* gen-bases.c (binvert): New function, computing modular inverse and
	low zero count.
	(header): Print MP_BASES_BIG_BASE_CTZ_10 and
	MP_BASES_BIG_BASE_BINVERTED_10.

2017-02-06  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/bdiv_q_1.c: Make return value consistent.

	* mpn/x86/p6/mmx/gmp-mparam.h (SQR_TOOM2_THRESHOLD): Revert to bogus
	value to accommodate p6/sqr_basecase.asm fragility.

2017-01-29 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/and.c: Simplify branches.
	* mpz/ior.c: Likewise.
	* mpz/xor.c: Likewise.

	* gen-bases.c: In generated file, include just gmp-impl.h, not gmp.h

2017-01-29  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac: Don't check if we got a C99 compiler for now (partially
	revert 2017-01-24 change as C++ compilers become rejected).

2017-01-24  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/compute_powtab.c: New file, providing mpn_compute_powtab
	for both get_str and set_str.

	* gmp-impl.h (mpn_str_powtab_alloc): New macro.
	(mpn_dc_set_str_powtab_alloc, mpn_dc_get_str_powtab_alloc): Remove.
	(mpn_compute_powtab): Declare.

	* mpn/generic/set_str.c: Use mpn_compute_powtab.
	(mpn_set_str_compute_powtab): Remove.

	* mpn/generic/get_str.c: Use mpn_compute_powtab.
	(mpn_get_str_compute_powtab): Remove.
	(mpn_bc_get_str): New name for mpn_sb_get_str.

	* configure.ac (gmp_mpn_functions): Add compute_powtab.

	* tune/tuneup.c (speed_mpn_pre_set_str): Call mpn_compute_powtab.
	* tune/set_strb.c: Remove mpn_set_str_compute_powtab name mangling.
	* tune/set_strs.c: Likewise.

	* configure.ac: Invoke AC_PROG_CC_C99 instead of AC_PROG_CC_STDC.

2017-01-03  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm*-*-*): Properly point to cortex-a5 subdir.

2016-12-31  Torbjörn Granlund  <tg@gmplib.org>

	* tune/tuneup.c (relspeed_div_1_vs_mul_1): New function.

2016-12-28 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tune/common.c (speed_mpz_mfac_uiui, speed_mpz_invert): New
	functions.
	* tune/speed.h: Declare them.
	* tune/speed.c (routine): Add mpz_mfac_uiui, mpz_invert.

	* tests/mpz/t-primorial_ui.c: Add randomization to the test.
	* mpz/tdiv_r.c: Reduce allocation in some corner-case conditions.
	* mpz/tdiv_r_2exp.c: Rearrange counting non-zero limbs.
	* mpz/tdiv_q.c: Move common code out of some branches.
	* mpz/and.c: Alloc only when needed.
	* mpz/xor.c: Reorder branches.
	* mpz/gcd.c: Reorder branches.
	* mpz/pprime_p.c: Save the initial branch of a loop.
	* mpn/generic/divrem.c: Save an allocation.

2016-12-26  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (x86_64 umul_ppmm): Add mulx variant (not automatically
	used).

2016-12-17 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/gcdext.c: Save an allocation if both cofactors are needed.
	* mpz/oddfac_1.c: Revision of all ASSERTs.
	* tests/mpz/t-invert.c: All elements are invertible in the zero ring.

2016-12-13  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h: Test LONGLONG_STANDALONE in two more places.

2016-12-07  Torbjörn Granlund  <tg@gmplib.org>

	* gmp-h.in: Check yet another symbol for FILE.

2016-12-04  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpz/reuse.c: Use mpz_clobber.  Split mpz_gcdext macros to avoid
	spurious res3 dependency.

	* tests/misc.c (mpz_clobber): New function.

2016-12-03  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (Number Theoretic Functions): Tweak mpz_gcdext
	documentation. The first and third argument may be NULL, but not
	the second.

2016-12-02  Niels Möller  <nisse@lysator.liu.se>

	* tests/mpz/reuse.c (main): Test additional cases of reuse for
	mpz_gcd and mpz_gcdext.

2016-12-01  Torbjörn Granlund  <tg@gmplib.org>

	* tests/misc.c (seed_from_tod): Make shift well-defined.

2016-11-29  Torbjörn Granlund  <tg@gmplib.org>

	* gmp-h.in (__GNU_MP__): Bump.

	* mpz/inp_raw.c: Rewrite size computation to avoid overflow.

	* mpz/kronsz.c: Use ABS_CAST to avoid undefined code.

2016-11-27 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/gcd.c, mpz/gcdext.c: Use NEWALLOC.
	* mpz/oddfac_1.c: Disable an ASSERT that needs a revision.

2016-11-27  Torbjörn Granlund  <tg@gmplib.org>

	* tests/mpz/reuse.c: Rewrite operand randomisation to use fixed ranges.

	* tune/time.c (cgt_works_p): Add a missing verbosity check.

	* configure.ac: Make udiv_w_sdiv use conditional on enable_assembly.

2016-11-25  Marc Glisse  <marc.glisse@inria.fr>

	* mpz/gcdext.c (mpz_gcdext): Allow a first argument of NULL.
	* doc/gmp.texi (Number Theoretic Functions): Document it.
	* tests/mpz/t-gcd.c (main): Test it.

2016-11-25  Marc Glisse  <marc.glisse@inria.fr>

	* tests/cxx/t-ops2z.cc (checkz): Avoid left shift of negative number.

2016-11-22  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (x86): Define LINUX for GNU/Linux systems.
	* mpn/x86_64/fat/fat_entry.asm: Set PRETEND_PIC for GNU/Linux.

2016-11-21  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (powerpc): Never use -O3.

	* acinclude.m4 (mpn_lshift_com optimization 2): Make it well-defined
	also for 32-bit systems.
	(mpn_lshift_com optimization 2): Free allocated memory.

2016-11-19  Niels Möller  <nisse@lysator.liu.se>

	* Makefile.am (check-mini-gmp): Override CFLAGS and CPPFLAGS
	instead of the deleted EXTRA_CFLAGS. Set TEST_LIBRARY_PATH,
	instead of LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, to avoid getting
	gcc linked with an unexpected version of gmp.

2016-11-18  Niels Möller  <nisse@lysator.liu.se>

	* Makefile.am (check-mini-gmp): Get CC and EXTRA_CFLAGS right.

2016-11-17  Torbjörn Granlund  <tg@gmplib.org>

	* asl.h: Initial support for artificially small limbs.

2016-11-09 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* pz/iset_str.c: Lazy allocation.

2016-11-01  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/generic/dive_1.c: Remove a forgotten dummy while-loop.  (Spotted
	by Peter Barfuss.)

2016-10-31   Oleg Oshmyan  <chortos@inbox.lv>

	* gmp-impl.h (x86_64 MPN_IORD_U): Use proper asm constraint.

2016-10-30  Torbjörn Granlund  <tg@gmplib.org>

	* mpn/Makefile.am (TARG_DIST): Add riscv.

2016-10-28  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_binary_divides): Let 1/q call mpq_inv.
	* tests/cxx/t-ops.cc (check_mpq): Test it.

2016-10-24  Torbjörn Granlund  <tg@gmplib.org>

	* config.guess: Recognise Itanium Poulson.

2016-10-15  Torbjörn Granlund  <tg@gmplib.org>

	* configure.ac (arm*-*-*): Amend last change.

2016-10-14  Torbjörn Granlund  <tg@gmplib.org>

	* longlong.h (riscv umul_ppmm): New.

	* mpn/riscv/64/aors_n.asm: New file.
	* mpn/riscv/64/mul_1.asm: New file.
	* mpn/riscv/64/aorsmul_1.asm: New file.

	* mpn/generic/addmul_1.c: Rewrite for shallower recurrency.
	* mpn/generic/submul_1.c: Likewise.

	* configure.ac (riscv-*-*): New.
	(arm*-*-*): Rewrite arm support to handle armv8 CPUs in 32-bit mode.

2016-08-29  Torbjörn Granlund  <tg@gmplib.org>

	* All C files: Include just gmp-impl.h, make gmp-impl.h grab gmp.h.

	* mpf/get_str.c: Use __GMP_ALLOCATE_FUNC_TYPE and friends.
	* mpf/inp_str.c: Likewise.
	* mpq/get_str.c: Likewise.
	* mpz/get_str.c: Likewise.
	* mpz/inp_str.c: Likewise.
	* scanf/vsscanf.c: Likewise.
	* tal-reent.c: Likewise.

2016-08-24  Vlad Zakharov <vzakhar@synopsys.com>

	* longlong.h (arc add_ssaaaa, sub_ddmmss): Replace obsolete 'J'
	constraint with 'Cal'.

2016-08-22  Marc Glisse  <marc.glisse@inria.fr>

	* longlong.h (umul_ppmm from __umulsidi3): Protect with do ...
	while (0).

2016-06-02  Torbjörn Granlund  <tg@gmplib.org>
	    Vincent Lefevre <vincent@vinc17.net>

	* doc/gmp.texi: Various clarifications about variable conventions.

2016-04-07  Marc Glisse  <marc.glisse@inria.fr>

	* gmp-h.in (__GMP_NOTHROW): Prefer noexcept to throw().
	(mpz_init, mpz_inits): Mark as __GMP_NOTHROW.
	* mpz/init.c, mpz/inits.c: Likewise.
	* gmpxx.h (mpz_class): Mark default and move constructors noexcept.
	* tests/cxx/t-cxx11.cc: Check noexcept.

2016-04-02  Torbjörn Granlund  <torbjorng@google.com>

	* mpf/set_q.c: Rewrite, mainly to use mpn_div_q.

2016-03-29  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/fat/addmul_2.c: New file.

2016-03-28  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/addmul_2.asm: Move from here...
	* mpn/x86_64/k8/addmul_2.asm: ...to here.

2016-03-26  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm64/sqr_diag_addlsh1.asm: New file.

2016-03-25  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm64/xgene1/aors_n.asm: New file.
	* mpn/arm64/xgene1/aorsmul_1.asm: New file.
	* mpn/arm64/xgene1/cnd_aors_n.asm: New file.
	* mpn/arm64/xgene1/gmp-mparam.h: New file.
	* mpn/arm64/xgene1/mul_1.asm: New file.

	* config.guess: Prefix all arm CPUs with "arm" to accommodate our
	matchers.
	* configure.ac (arm): Match arm CPUs consistently.

2016-03-21  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac: Support many arm64 processors.

2016-03-20  Marc Glisse  <marc.glisse@inria.fr>

	* configure.ac (WANT_ASSEMBLY): Remove.
	(NO_ASM): Remove from CFLAGS, add to AC_DEFINE.
	* tests/misc.c: Test NO_ASM instead of WANT_ASSEMBLY.

2016-03-20  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess (arm*): Handle big.LITTLE CPUs by extracting the
	lexically largest id.
	* config.guess (arm*): Add many aarch64 CPUs.
	* config.guess (main): Corresponding changes.

	* mpn/arm/v7a/cora5/gmp-mparam.h: New file.

	* configure.ac (arm*): Support cortex-a5 better.

2016-02-25  Pavel Kopyl  <p.kopyl@samsung.com>

	* acinclude.m4 (GMP_ASM_UNDERSCORE): Tighten gurkmacka detection.

2016-01-27  Niels Möller  <nisse@lysator.liu.se>

	* errno.c (__gmp_exception): Use raise(SIGFPE) when available.

2016-01-15  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess (s390): Don't assume /proc/cpuinfo exists.

2016-01-13  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Reorder and generalise ppc code.

2016-01-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/cxx/clocale.c: Do not re-define localeconv for mingw.
	* tests/misc/t-locale.c: Likewise (Thanks Alexander).

	* primesieve.c: Heal a speed regression on small values.
	* mpz/bin_uiui.c (mpz_bdiv_bin_uiui): 2 factors all at once.
	  (mpz_goetgheluck_bin_uiui): Use STOP/CONT for loops on primesieve.
	* mpz/oddfac_1.c: Likewise.
	* mpz/primorial_ui.c (LOOP_ON_SIEVE_CONTINUE): Define prime locally.

	* gen-fac.c: Use unsigned types for sizes.

	* mpn/generic/invert.c: Use MPN_FILL macro.
	* mpn/generic/invertappr.c: Likewise.
	* mpn/generic/toom53_mul.c: Use _ip1 when available.

2015-12-28 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/set_str.c: Use __GMP_FREE_FUNC_TYPE.
	* tests/mpz/t-nextprime.c: Speedup using swap, and correct type.

2015-12-26  Torbjörn Granlund  <torbjorng@google.com>

	* tests/misc.c (tests_start): Assert library version.

2015-12-19  Marc Glisse  <marc.glisse@inria.fr>

	* gmp-impl.h (fft_table_nk): Use gmp_uint_least32_t.
	* mpn/generic/trialdiv.c (gmp_primes_ptab): Likewise.

2015-12-14  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/fat/fat.c (gmp_workaround_skylake_cpuid_bug):
	New function.
	(__gmpn_cpuvec_init): Handle more BMI2 crippled CPUs.

2015-12-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
	* mpz/clears.c, mpz/inits.c: Stop supporting empty list.
	* tests/arm32call.asm: bx->ret to support thumb-less chips
	  (thanks Martin Husemann).

2015-12-13  Torbjörn Granlund  <torbjorng@google.com>

	* config.sub: Fix spelling of kabylake.
	* acinclude.m4: Likewise.
	* mpn/x86_64/fat/fat.c: Likewise.

2015-12-10 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/misc/t-printf.c: Test a sequence of '%'.
	* printf/doprnt.c: Avoid buffer overread with long long limbs.

	* mpn/generic/toom_interpolate_7.c: Use the rsh1 functions,
	  when available, also for negatives (clearing the carry).
	* mpn/generic/toom_interpolate_12.c: Likewise.
	* mpn/generic/toom_interpolate_16.c: Likewise.

2015-12-06  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (arm*): Conditionally define NOTHUMB.
	Simplify and generalise.
	* mpn/arm/arm-defs.m4 (ret): New macro, conditional on NOTHUMB.
	* mpn/arm/*.asm: Use ret.

2015-12-03  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Work around skylake cpuid bug.
	Fix spelling of kabylake.

2015-12-01  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/coreibwl/mul_basecase.asm: Add FUNC_EXITs.

2015-11-21 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gmp-impl.h (MPN_TOOM22_MUL_MINSIZE): Consider ToomX2 limits
	  (thanks Paul).
	* tests/mpn/t-toom22.c: Keep on testing small sizes.
	* tests/mpz/t-primorial_ui.c: Test a single "large" number.

	* tune/common.c (speed_mpz_primorial_ui): New function.
	* tune/speed.h: Declare it.
	* tune/speed.c (routine): Add mpz_primorial_ui.

	* primesieve.c: Use two presieved patterns on 64-bits CPUs.

2015-11-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/init.c: Remove conditional code for __CHECKER__.
	* mpq/set.c: Shorten scope of local variables.
	* mpq/set_den.c: Likewise.
	* mpq/set_num.c: Likewise.
	* mpq/set_z.c: Likewise.

	* primesieve.c: Fill sieve with a presieved 70bits pattern.

2015-11-12  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_fibonacci_function): New class.
	(fibonacci, mpz_class::fibonacci): New functions.
	(__gmp_fac_function, __gmp_primorial_function): Add braces.
	* tests/cxx/t-ops2z.cc: Test fibonacci.
	* doc/gmp.texi (C++ Interface Integers): Document fibonacci.
	Warn about factorial and primorial of negative numbers.

2015-11-10  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_primorial_function): Throw on negative operands.
	* tests/cxx/t-ops2z.cc: Test it.

2015-11-09 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz: Experimental, lazy allocation.

2015-11-09  Marc Glisse  <marc.glisse@inria.fr>

	* tests/cxx/Makefile.am: Move EXTRA_DIST out of WANT_CXX.

2015-11-08 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/urandomm.c: Use mpn_zero_p to shorten code.

2015-11-08  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_fac_function, __gmp_primorial_function): New classes.
	(__GMPP_DECLARE_UNARY_STATIC_MEMFUN,
	__GMPNN_DECLARE_UNARY_STATIC_MEMFUN,
	__GMPNS_DECLARE_UNARY_STATIC_MEMFUN,
	__GMPNU_DECLARE_UNARY_STATIC_MEMFUN,
	__GMPND_DECLARE_UNARY_STATIC_MEMFUN,
	__GMPN_DECLARE_UNARY_STATIC_MEMFUN,
	__GMP_DECLARE_UNARY_STATIC_MEMFUN, __GMPP_DEFINE_UNARY_STATIC_MEMFUN,
	__GMPNN_DEFINE_UNARY_STATIC_MEMFUN,
	__GMPNS_DEFINE_UNARY_STATIC_MEMFUN,
	__GMPNU_DEFINE_UNARY_STATIC_MEMFUN,
	__GMPND_DEFINE_UNARY_STATIC_MEMFUN, __GMPN_DEFINE_UNARY_STATIC_MEMFUN,
	__GMP_DEFINE_UNARY_STATIC_MEMFUN): New macros.
	(factorial, mpz_class::factorial, primorial, mpz_class::primorial):
	New functions.
	* tests/cxx/t-ops2.cc: Test factorial and primorial.
	* tests/cxx/Makefile.am: Move t-ops2 after
	t-do-exceptions-work-at-all-with-this-compiler.
	* doc/gmp.texi: Document factorial and primorial.
	* NEWS: Likewise.

	* tests/cxx/t-ops2.cc: Remove and split into ...
	* tests/cxx/t-ops2z.cc, tests/cxx/t-ops2qf.cc, tests/cxx/t-ops2f.cc,
	tests/cxx/t-ops2.h: New files.
	* tests/cxx/Makefile.am: Update for the split.

2015-11-07  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__GMP_DEFINE_UNARY_FUNCTION_1,
	__GMPP_DEFINE_BINARY_FUNCTION_1, __GMPNN_DEFINE_BINARY_FUNCTION_1,
	__GMPNS_DEFINE_BINARY_FUNCTION_1, __GMPNU_DEFINE_BINARY_FUNCTION_1,
	__GMPND_DEFINE_BINARY_FUNCTION_1, __GMPNLD_DEFINE_BINARY_FUNCTION_1,
	__GMPN_DEFINE_BINARY_FUNCTION_1, __GMP_DEFINE_BINARY_FUNCTION_1):
	New macros.
	(operator~, trunc, floor, ceil, sqrt, operator%, operator&, operator|,
	operator^, hypot, gcd, lcm): Use them.

2015-11-06 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/and.c: Use MPZ_NEWALLOC.
	* mpz/ior.c: Remove duplicated branches, add branch hints.
	* mpz/xor.c: Likewise, and use NORMALIZE_NOT_ZERO.

	* mpz/init.c: Remove conditional code for __CHECKER__.
	* mpz/init2.c: Likewise.
	* mpz/inits.c: Likewise.
	* mpz/iset.c: Likewise.
	* mpz/iset_str.c: Likewise.

2015-11-04  Torbjörn Granlund  <torbjorng@google.com>

	* mpz/xor.c: Use MPZ_REALLOC.
	* mpz/ior.c: Likewise

2015-11-03 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/xor.c: Use the return value of _mpz_realloc.
	* mpz/ior.c: Likewise.
	* mpn/generic/sec_div.c: Remove unused var.

2015-11-01  Torbjörn Granlund  <torbjorng@google.com>

	* tests/misc.c (seed_from_tod, seed_from_urandom): New functions.
	(tests_rand_start): Use them.

2015-11-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* Version 6.1.0 released.

	* mpz/inits.c [__CHECKER__]: Init limb, not pointer.
	* mpz/init.c [__CHECKER__]: Likewise (spotted by Vicente Benjumea).
	* tests/mpf/t-pow_ui.c: Use another mpf for the size limit.

2015-10-30  Torbjörn Granlund  <torbjorng@google.com>

	* mpf/pow_ui.c: Add log(e) precision bits.

	* doc/gmp.texi (Floating-point): Rewrite mpf introduction.

2015-10-29 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* demos/factorize.c: mpz_div_2exp => mpz_tdiv_q_2exp.
	* demos/perl/GMP.xs: Likewise.
	* tests/mpf/t-pow_ui.c: Use reference value to check the size.

	* doc/gmp.texi (Floating-point): Remove "infinite precision" claim.

	* gmp-h.in: Update version.

2015-10-28  Torbjörn Granlund  <torbjorng@google.com>

	* tests/mpf/t-pow_ui.c: New file.
	* tests/mpf/Makefile.am (check_PROGRAMS): Compile it.

	* mpf/pow_ui.c: Rewrite for accuracy and performance.

2015-10-26 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configfsf.guess: Updated to version 2015-10-21, for a typo.

	* tests/cxx/t-ops.cc (check_mpq): Compare also with mpz.
	(check_mpf): Compare also with mpz and mpq.

2015-10-25  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac: Avoid passing ambiguous -march=skylake.

2015-10-21 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* Version 6.1.0-rc1 published.

	* gmp-h.in: Revert version for RC.

2015-10-20  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86/pentium4/sse2/popcount.asm: Use LEAL.
	* mpn/x86/k7/invert_limb.asm: Likewise.

2015-10-18  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm64/gmp-mparam.h: New file.

2015-10-18 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
	* gmp-h.in: Bump version.

2015-10-17 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/mpf/t-cmp_si.c: Initialise a variable (only when error arise)
	* mpn/generic/toom43_mul.c: Insert parentheses around & expressions.
	* mpn/generic/toom52_mul.c: Likewise.
	* tests/mpn/t-minvert.c: Remove an unused var.
	* tests/mpz/t-cong_2exp.c: Likewise.

2015-10-16  Hans Wennborg <hwennborg at google.com>

	* mpn/generic/div_qr_2.c: Insert parentheses around & expressions.
	* mpn/generic/toom44_mul.c: Likewise.
	* mpn/generic/toom53_mul.c: Likewise.
	* mpn/generic/toom62_mul.c: Likewise.
	* tests/mpn/t-bdiv.c: Simplify conditional printing of whitespace.
	* tests/mpn/t-div.c: Likewise.

2015-10-15 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configfsf.sub: Updated to version 2015-08-20, from gnulib.
	* configfsf.guess: Updated to version 2015-09-14, from gnulib.

2015-10-14  Torbjörn Granlund  <torbjorng@google.com>

	* demos/pexpr.c (main): Clear out a variable.

	* mpn/generic/sqrlo_basecase.c: Move things before addmul_1 to reduce
	register pressure.

	* .hgignore: Add 'compile' and 'test-driver'.

	* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify, add ASSERT.
	* mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise.

	* tune/tuneup.c (tune_mu_bdiv): Start at measured BDIV_DC_ thresholds.

2015-10-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
	* mpz/clears.c, mpz/inits.c: Keep on supporting empty list.

2015-10-13  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__GMPP_DEFINE_BINARY_TYPE_FUNCTION): Allow mixed operations.
	(__gmp_cmp_function, __gmp_binary_equal, __gmp_binary_less):
	Handle mixed operations.
	(__gmp_cmp_function): Move before __gmp_binary_equal.

2015-10-13 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/pow_ui.c: Increased precision of partial results.

2015-10-12  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac: Reject AVX for NetBSD.

2015-10-11  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (fat_path): Add skylake.

2015-10-10 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gen-fib.c: Correct the name of the program in error message.
	* gen-fac.c: Likewise.

	* mpf/get_str.c: Increase precision of base^e computation.

2015-10-09  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Recognise cabylake and goldmont and more versions of
	skylake and silvermont.
	* acinclude.m4 (X86_64_PATTERN): Add cabylake and goldmont.
	* config.sub: Corresponding changes.
	* configure.ac: Corresponding changes.
	* mpn/x86_64/fat/fat.c: Corresponding changes.

2015-09-12  Torbjörn Granlund  <torbjorng@google.com>

	* mpf/clear.c, mpf/clears.c, mpf/inits.c, mpq/clear.c, mpq/clears.c
	* mpq/inits.c, mpz/clear.c, mpz/clears.c, mpz/inits.c:
	Streamline, use macros.

2015-09-27 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpz/cfdiv_r_2exp.c: Use mpn_neg and MPZ_NEWALLOC.
	* mpz/cfdiv_q_2exp.c: Use MPZ_REALLOC return value.

2015-09-12  Torbjörn Granlund  <torbjorng@google.com>

	* tests/mpf/t-cmp_si.c (check_data): Set precision reflecting data.

2015-09-11 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/cmp_z.c: New file implementing mpf_cmp_z.
	* mpf/Makefile.am (libmpf_la_SOURCES): Add it.
	* Makefile.am (MPF_OBJECTS): Add generate object to libs.
	* gmp-h.in: Declare new function.
	* tests/mpf/t-cmp_si.c: Test also the new function.
	* doc/gmp.texi: Document it.

2015-09-06  Torbjörn Granlund  <torbjorng@google.com>

	* Wrap remaining limb allocations in __GMP_ALLOCATE_FUNC_LIMBS.

	* mpn/x86/fat/fat.c (fake_cpuid_table): Add missing commas.
	* mpn/x86_64/fat/fat.c: Likewise.

	* mpn/x86/fat/fat.c (fake_cpuid_table): Improve struct type.
	* mpn/x86/fat/fat.c: Likewise.

2015-09-03 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/mpq/t-cmp_z.c (sizes_test): New function, tests sizes.

2015-09-03  Torbjörn Granlund  <torbjorng@google.com>

	* acinclude.m4 (GMP_C_HIDDEN_ALIAS): New.
	* configure.ac (GMP_C_HIDDEN_ALIAS): Invoke.

2015-09-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/cmp.c (mpq_cmp_numden): Cast to avoid over/underflow.
	* tests/mpn/t-toom22.c (MIN_AN): Use defined value.
	* tests/mpz/t-fac_ui.c: Check big factorial modulo a larger prime.
	* mpn/generic/bsqrtinv.c: Use sqrlo+mullo_n instead of powlo(,,3,,).
	* mpq/div.c: Move a branch out of the normal flow.

2015-08-31  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86/fat/fat.c (fake_cpuid_table): Update similarly to
	corresponding x86_64 code.

2015-08-31 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/cmp.c (mpq_cmp_z): New function to compare mpq with mpz,
	asked by Vincent Delecroix for the SageMath project.
	* gmp-h.in: Declare it.
	* doc/gmp.texi: Document it.
	* tests/mpq/t-cmp_z.c: New file to test mpq_cmp_z (from t-cmp.c).
	* tests/mpq/Makefile.am (check_PROGRAMS): Add t-cmp_z.

	* mpn/generic/powlo.c: Use mpn_sqrlo.

2015-08-29  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/fat/fat.c (fake_cpuid_table): Add CPU aliases.

2015-08-25 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* configure.ac (AH_VERBATIM): Add HAVE_NATIVE_mpn_mullo_basecase.
	* mpn/generic/sqrlo.c (mpn_sqrlo): Use mullo_basecase when faster.
	* mpn/generic/sqrlo_basecase.c: More readable #defines.

	* tune/tuneup.c (tune_sqrlo): New function to tune sqrlo thresholds.
	(all): Call it, after multiplication and FFT.
	* tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrlo{,_basecase}.c .
	* gmp-impl.h: Add all SQRLO_*_THRESHOLD* defs, for tuning and default.
	* mpn/generic/sqrlo.c: Remove default threshold definitions.
	* mpn/generic/sqrlo_basecase.c: Use SQRLO_DC_THRESHOLD_LIMIT.
	* mpn/minithres/gmp-mparam.h: New SQRLO_*_THRESHOLDs.

	* tune/tuneup.c (tune_mullo): Set MULLO_MUL_N_THRESHOLD to never
	whenever the FFT threshold does not exist.

	* mpf/cmp.c: Remove some branches.

2015-08-25  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/x86_64-defs.m4: Output computed numbers in base-10 instead
	of base-16 to avoid bugs on Solaris, FreeBSD, and old NetBSD.

2015-08-23  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/fat/fat.c (fake_cpuid_table): Add more entries, handle
	Broadwell separately.

	* configure.ac (fat_path): Add coreibwl.

2015-08-18 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/rootrem.c (logbased_root): New function.
	(mpn_rootrem_internal): Use it to estimate highest 9 bits of the root.

	* gmp-impl.h (MPQ_PTR_SWAP, MPQ_SRCPTR_SWAP): New macros.

2015-08-17  Torbjörn Granlund  <torbjorng@google.com>

	* acinclude.m4 (X86_64_PATTERN): Add skylake.
	* config.guess: Corresponding changes.
	* config.sub: Corresponding changes.
	* configure.ac: Corresponding changes.
	* mpn/x86_64/skylake/gmp-mparam.h: New file.

2015-08-15  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/generic/mullo_basecase.c: Provide alternative code, make default.

2015-08-04 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/refmpn.c (refmpn_sqrlo): New function.
	* tests/tests.h: Define it.

	* mpn/generic/sqrlo.c: New file, new function.
	* mpn/generic/sqrlo_basecase.c: New file, new function.
	* gmp-impl.h (mpn_sqrlo, mpn_sqrlo_basecase): Declare them.
	* configure.ac (gmp_mpn_functions): Add new files.

	* tests/mpn/t-sqrlo.c: New file, new test.
	* tests/mpn/Makefile.am (check_PROGRAMS): Add new test.
	* tests/devel/try.c: Support mpn_sqrlo and mpn_sqrlo_basecase.

	* tune/common.c (speed_mpn_sqrlo{,_basecase}): New functions.
	* tune/speed.c: Support new functions.
	* tune/speed.h (SPEED_ROUTINE_MPN_MULLO_BASECASE): Update.
	(SPEED_ROUTINE_MPN_SQRLO): New macro.

	* mpn/generic/rootrem.c: Avoid divisions if not needed.

	* tests/mpn/t-broot.c: Test also k=1.
	* mpz/aorsmul_i.c: Move branches out of main line.

2015-07-28 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/sqrtrem.c (mpn_dc_sqrt): Support odd sizes.

2015-07-16  Torbjörn Granlund  <torbjorng@google.com>

	* tune/speed.c: Remove now redundant MPN_FILL.

	* configure.ac (hppa-hpux): Never use O3 optimisation.

2015-07-09  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/ia64/add_n_sub_n.asm: Make it work for HP-UX.
	* mpn/ia64/addmul_2.asm: Likewise.
	* mpn/ia64/aors_n.asm: Likewise.
	* mpn/ia64/aorsorrlshC_n.asm: Likewise.
	* mpn/ia64/cnd_aors_n.asm: Likewise.
	* mpn/ia64/gcd_1.asm: Likewise.
	* mpn/ia64/lshiftc.asm: Likewise.
	* mpn/ia64/mod_34lsub1.asm: Likewise.
	* mpn/ia64/mul_2.asm: Likewise.
	* mpn/ia64/sec_tabselect.asm: Likewise.
	* mpn/ia64/sqr_diag_addlsh1.asm: Likewise.

2015-07-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gmp-impl.h (MPN_FILL): New macro, generalise MPN_ZERO.

	* mpn/generic/sqrtrem.c (mpn_dc_sqrt): New function not computing remainder.
	(mpn_dc_sqrtrem): Use tdiv_q instead of divrem, use given scratch space.
	(mpn_sqrtrem): Use mpn_dc_sqrt for both even and odd sizes.

2015-06-24  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/fastsse/com.asm: Disallow zero size operands.

	* mpn/x86_64/fastsse/copyi.asm: Suppress looping in basecase code.

2015-06-23 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/sqrtrem.c (mpn_sqrtrem2): Simplify branches.
	(mpn_dc_sqrtrem): Don't compute remainder if not needed.

2015-06-23  Torbjörn Granlund  <torbjorng@google.com>

	* gmp-impl.h: Remove K&R stringize support.
	* tests/devel/try.c: Likewise.
	* tests/t-constants.c: Likewise.
	* tests/mpf/t-fits.c: Likewise.
	* tests/mpz/t-fits.c: Likewise.

	* configure.ac (AC_C_STRINGIZE): Remove.

2015-06-15 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/devel/try.c: Support mpn_sqrt (sqrtrem with remainder = NULL).
	* mpn/generic/sqrtrem.c: Reorder branches for single limb operands.

2015-06-15  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Rewrite code for AVX handling to deal with broken cpuid
	states.

2015-06-11  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86/k7/gcd_1.asm: Align stack for calls.
	* mpn/x86/p6/gcd_1.asm: Amend last change: align for PIC and non-PIC.

2015-06-10 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/sqrtrem.c: Use sqrtrem1 for single limb operands.

	* tests/mpz/t-root.c: Check also mpz_root return value.
	* mpn/generic/rootrem.c: Shorten first and last loop.

	* mpn/generic/toom2_sqr.c: Add some ASSERTs.
	* mpn/generic/toom22_mul.c: Likewise.
	* tests/mpn/t-toom22.c: stop testing some unsafe (unused) corner cases.

2015-06-08  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86/p6/gcd_1.asm: Align stack for calls.

2015-06-06  Torbjörn Granlund  <torbjorng@google.com>

	* config.sub: Recognise any arm*neon CPU.
	* configure.ac (powerpc): Add p8 directory for power8 and later.
	* mpn/powerpc64/mode64/p8/invert_limb.asm: New file.

2015-06-01  Torbjörn Granlund  <torbjorng@google.com>

	* tune/speed.c (routine): Measure "mpn_sqrt" and "mpn_root", which are
	really the corresponding "rem" functions with NULL remainder argument.

	* tune/speed.h (SPEED_ROUTINE_MPN_SQRTROOT_CALL): New.
	(SPEED_ROUTINE_MPN_SQRTREM, SPEED_ROUTINE_MPN_ROOTREM):	Remove.

	* tune/common.c (speed_mpn_sqrt, speed_mpn_root): New functions.
	(speed_mpn_sqrtrem): Use SPEED_ROUTINE_MPN_SQRTROOT_CALL
	(speed_mpn_rootrem): Likewise.

2015-05-30 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/cmp_ui.c: Use macros, remove branches, correct nails.
	* mpf/cmp_si.c: Likewise.
	* mpf/int_p.c: Use a simpler loop to ignore zero limbs.

	* mpf/sqrt_ui.c: Special case for sqrt(1).
	* tests/mpf/t-sqrt_ui.c: Test special cases.

	* gmp-h.in: Declare (and inline) mpn_zero_p.
	* gmp-impl.h: Remove mpn_zero_p.
	* mpn/generic/zero_p: New file to include the function in the library.
	* configure.ac (gmp_mpn_functions): Add it.
	* doc/gmp.texi: Document it.

	* mpz/combit.c: Call mpn_zero_p only if size is not zero.
	* mpz/scan1.c: Likewise.
	* tests/mpn/t-brootinv.c: Likewise.
	* tests/mpn/t-div.c: Likewise.
	* tests/mpn/t-minvert.c: Likewise.

2015-05-28  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (Low-level Functions): Document mpn_divexact_1 and
	mpn_cnd_swap (the latter was forgotten for the 2015-02-08 change).

2015-05-28  Linus Nordberg  <linus@nordberg.se>

	* configure.ac: Remove double quotes in help strings, make some
	clarifications.

2015-05-24 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/div.c: Reduce memory use.
	* tests/mpq/reuse.c: Test also mpq_FUNCTION (x,x,x).
	* mpz/swap.c: Use _SWAP macros.

2015-05-18  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (arm): Let compiler decide about arm vs thumb encoding.

2015-05-18 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gmp-h.in (mpn_neg): Niels' code using mpn_neg.
	* gmp-h.in (mpn_com): Unconditionally declare prototype.

2015-05-17  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm/v6/sqr_basecase.asm: Rewrite for speed.

2015-05-16  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm/v6/addmul_2.asm: Rewrite for speed and size.

2015-05-15  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/arm/v7a/cora7/gmp-mparam.h: New file.
	* mpn/arm/v7a/cora8/gmp-mparam.h: New file.
	* configure.ac (arm): Point to new directories.

2015-05-15 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/invertappr.c: Reduce memory usage.
	* gmp-impl.h (mpn_invertappr_itch): Update accordingly.
	* tune/tuneup.c (tune_invertappr, tune_invert): Update min_size.

	* mpn/generic/mu_div_qr.c: Pass scratch memory to mpn_invertappr.
	* mpn/generic/mu_divappr_q.c: Likewise.

2015-05-12  Felix Janda  <felix.janda@posteo.de>

	* mpn/powerpc32/elf.m4 (LEA): Adopt to new ABI.

2015-05-09 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/invertappr.c: Reduce memory usage.
	* gmp-impl.h (mpn_invertappr_itch): Update accordingly.

2015-05-01  Torbjörn Granlund  <torbjorng@google.com>

	* tune/tuneup.c (all): Make GCD tuning last since it is not robust.

2015-04-27  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/coreibwl/gmp-mparam.h: New file.

2015-04-26  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/coreibwl/mul_basecase.asm: New file.
	* mpn/x86_64/coreibwl/sqr_basecase.asm: New file.

2015-04-26 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tune/common.c (speed_mpn_neg, speed_mpz_2fac_ui): New functions.
	(speed_mpn_add_1, speed_mpn_add_1_inplace): New functions.
	(speed_mpn_sub_1, speed_mpn_sub_1_inplace): New functions.
	* tune/speed.h: Declare them all.
	* tune/speed.c (routine): Added mpn_neg, mpn_add_1, mpn_sub_1,
	mpn_add_1_inplace, mpn_sub_1_inplace, and mpz_2fac_ui.

2015-04-25 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/invert.c: Split add in the correction test.
	* mpn/generic/invertappr.c: Cleanup of loops and branches.

	* mpn/generic/hgcd_reduce.c: Use TMP_ALLOC_LIMBS_3.
	* mpn/generic/powm.c: Use TMP_ALLOC_LIMBS_2.
	* mpn/generic/rootrem.c: Likewise.
	* mpn/generic/remove.c: Remove redundant #ifdef.
	* mpn/generic/perfpow.c: Likewise.

2015-04-21  Torbjörn Granlund  <torbjorng@google.com>

	* printf/sprintffuns.c (gmp_sprintf_final): Remove extra parameters.

	* mpn/arm/v6/popham.asm: Add MULFUNC_PROLOGUE.
	* mpn/powerpc64/mode64/rsh1aors_n.asm: Likewise.
	* mpn/powerpc64/mode64/p6/aorsmul_1.asm: Likewise.

2015-04-19  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86_64/x86_64-defs.m4 (oplist): Fix typo.
	(mulx): Simplify.
	(adcx, adox): New defines, using helper function adx.
	* mpn/x86_64/coreibwl/mul_1.asm: New file.
	* mpn/x86_64/coreibwl/addmul_1.asm: New file.
	* configure.ac (x86_64): Put coreibwl in appropriate code path.

	* configure.ac (x86_64): Pass more exact Intel CPU options.

2015-04-13  Torbjörn Granlund  <torbjorng@google.com>

	* longlong.h (arm): Rewrite.  Support thumb2; use gcc builtins for
	count_leading_zeros, use accurate code selection critera.

2015-04-13  Marc Glisse  <marc.glisse@inria.fr>

	* configure.ac (x86_64): Extend noavx to ABI=64.

2015-04-10  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/alpha/ev6/mod_1_4.asm: Use LDGP.

2015-04-01  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (sparc): Don't use use -xO4, it miscompiles by design.

2015-03-24  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/generic/mul_fft.c (mpn_fft_best_k): Don't make pointers `static'
	just because they point to static (i.e., file-local) data.

2015-03-15  Torbjörn Granlund  <torbjorng@google.com>

	* acinclude.m4 (X86_64_PATTERN): Add CPU code names.

	* config.guess: Add more CPUs, use CPU code names.
	* config.sub: Corresponding changes.
	* configure.ac: Corresponding changes.

2015-02-21  Niels Möller  <nisse@lysator.liu.se>

	* gmp-h.in (mpn_divexact_1): New public declaration.
	* gmp-impl.h: Moved from here.

2015-02-08  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (Low-level Functions): Document mpn_cnd_swap.

	* mpn/generic/cnd_swap.c (mpn_cnd_swap): New file, moved function
	here. Also changed cnd argument type from int to mp_limb_t.
	* mpn/generic/sec_invert.c (mpn_cnd_swap): Old location.
	* configure.ac: Added cnd_swap.
	* gmp-h.in (mpn_cnd_swap): Added prototype.

2015-01-19  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (arm): Provide architecture specific configs in addition
	to implementation specific configs.

	* config.guess (arm): Use configfsf.guess's guess as default before
	conditionally appending "neon".

2015-01-08  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Match POWER8 for AIX.

	* longlong.h: Add many casts inside assembly input operands, this
	insures proper zero extension.

2014-12-27  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_unary_expr): Use __gmp_resolve_ref.
	(__gmp_expr): New specialization for unary expressions with
	a builtin argument.

2014-12-26  Marc Glisse  <marc.glisse@inria.fr>

	* gmp-impl.h (tmp_debug_entry_t): Change block to type void*.

2014-12-22  Torbjörn Granlund  <torbjorng@google.com>

	* longlong.h (mips64, mips32): Work around one clang bug.

2014-12-18  Torbjörn Granlund  <torbjorng@google.com>

	* longlong.h (umul_ppmm): Use input temps in more places.

2014-12-10  Marc Glisse  <marc.glisse@inria.fr>

	* tests/cxx/clocale.c (localeconv, nl_langinfo): Match glibc's
	prototype in C++.

2014-12-09  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (powerpc): Remove hardwired -mpowerpc, causes clang
	problems.  Optionally pass -m32.

2014-12-08  Marc Glisse  <marc.glisse@inria.fr>

	* config.guess (ultrasparc*-*-*): Update for T4 and T5.
	* config.sub (ultrasparc*-*-*): Update for T5.
	* configure.ac (ultrasparc*-*-*): Update for T5.

	* longlong.h (sparc64): Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
	with VIS3.

	* tests/misc/t-locale.c (localeconv, nl_langinfo): Match glibc's
	prototype in C++.
	* tests/mpf/t-get_si.c (check_limbdata): Avoid narrowing conversion
	from -1 to unsigned inside {}.

2014-12-02  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess (arm*-*-*): Redirect stderr.

2014-11-26  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (arm*-*-*): Optionally pass redundant fpu mode options
	in order to placate clang.

	* mpn/arm/neon/lshiftc.asm: Avoid insn form missing from clang.

2014-11-24  Torbjörn Granlund  <torbjorng@google.com>

	* configure.ac (mips*-*-*): Provide ABI synonyms (for clang pretending
	to be gcc).

2014-11-18  Torbjörn Granlund  <torbjorng@google.com>

	From Hannes Mehnert:
	* config.guess (arm*-*-*): Base guesses on first matching /proc/cpuinfo
	line.

2014-11-17  Torbjörn Granlund  <torbjorng@google.com>

	* longlong.h (__longlong_h_C): New macro.
	(mpn_umul_ppmm, etc): Use it for C++ support.

2014-11-15  Torbjörn Granlund  <torbjorng@google.com>

	* tests/mpz/reuse.c: Make function vectors 'static'.

	* tests/mpn/logic.c (check_one): Make string variable 'const'.

	* tests/mpz/t-perfpow.c (tests): Make 'static'.

	* tune/tuneup.c (fftmes): Remove an unused variable.

2014-11-15  Marc Glisse  <marc.glisse@inria.fr>

	* tests/amd64check.c (calling_conventions_fenv): Mark as extern "C".
	* tests/x86check.c (calling_conventions_fenv): Likewise.

2014-11-13  Hans Wennborg  <hwennborg@google.com>

	* mpn/generic/toom_interpolate_8pts.c: Fix operator precedence in
	ASSERT.

2014-11-13  Torbjörn Granlund  <torbjorng@google.com>

	* tune/speed.h: Add casts for C++ compatibility.
	(speed_cyclecounter): Mark as extern "C".
	(mpn_mod_1_1p_1, mpn_mod_1_1p_2): Correct prototype.

	* tune/tune-gcd-p.c: Add casts for C++ compatibility.

	* tune/tuneup.c: Add casts for C++ compatibility.
	(mpn_divrem_1_tune, mpn_mod_1_tune): Mark as extern "C".
	(INSERT_FFTTAB): Produce sentinels differently to silence compiler.

2014-11-12  Torbjörn Granlund  <torbjorng@google.com>

	* gen-psqr.c: Add casts for C++ compatibility.

	* tests/misc/t-scanf.c: Include config.h early for HAVE_xxx.

2014-11-08  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/x86/x86-defs.m4 (LEA, LEAL): Make sure to put eip stub code in
	text segment.
	* mpn/x86/darwin.m4: Likewise.

	* tune/speed.h (i386 speed_cyclecounter): Remove inline asm code, rely
	on external version.

2014-11-06  Torbjörn Granlund  <torbjorng@google.com>

	* config.guess: Ignore appended letters such E in POWER8E.
	* configure.ac: Supply cflags for power8, power9.

2014-11-03  Torbjörn Granlund  <torbjorng@google.com>

	* mpn/powerpc32/addmul_1.asm: Avoid negative stack pointer references.
	* mpn/powerpc32/lshift.asm: Likewise.
	* mpn/powerpc32/lshiftc.asm: Likewise.
	* mpn/powerpc32/p3-p7/aors_n.asm: Likewise.
	* mpn/powerpc32/rshift.asm: Likewise.
	* mpn/powerpc32/sec_tabselect.asm: Likewise.
	* mpn/powerpc32/submul_1.asm: Likewise.
	* mpn/powerpc32/vmx/mod_34lsub1.asm: Likewise.

2014-10-13  Torbjörn Granlund  <torbjorng@google.com>

	* acinclude.m4 (freebsd hacked gcc): Test for crash-prone FreeBSD gcc.

2014-10-03  Peter Breitenlohner <peb@mppmu.mpg.de>

	* mpn/generic/sec_tabselect.c: Adjust type to silence compiler.

2014-10-01  Torbjörn Granlund  <torbjorng@google.com>

	* All Makefile.am: INCLUDES => AM_CPPFLAGS.

	* configure.ac (arm64): Set gcc_cflags_maybe to enable Neon (for clang
	pretending to be gcc).

2014-09-24  Marc Glisse  <marc.glisse@inria.fr>

	* longlong.h (arm64 count_trailing_zeros, count_leading_zeros): Use
	gcc's builtins.
	(arm64 umul_ppmm): Use macro arguments only once.

2014-09-22  Marc Glisse  <marc.glisse@inria.fr>

	* mpn/arm64/lshift.asm: Avoid negative immediates.
	* mpn/arm64/rshift.asm: Likewise.

2014-09-13  Marc Glisse  <marc.glisse@inria.fr>

	* mpn/generic/div_qr_1n_pi1.c: Honor NO_ASM.
	* mpn/generic/div_qr_1n_pi2.c: Likewise.
	* mpn/generic/div_qr_1u_pi2.c: Likewise.
	* mpn/generic/div_qr_2.c: Likewise.
	* mpn/generic/mod_1_1.c: Likewise.
	* mpn/generic/redc_2.c: Likewise.

2014-08-31  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/arm64/lshift.asm: New file.
	* mpn/arm64/rshift.asm: New file.

2014-09-01 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gmp-impl.h (TMP_ALLOC_LIMBS_3): New macro to allocate 3 blocks.
	(mpn_remove): Update declaration with mp_srcptr arguments.
	* mpn/generic/remove.c: Use TMP_ALLOC_LIMBS_3. mp_srcptr for args.

	* mpn/generic/perfpow.c (pow_equals): TMP_DECL only where needed.
	(perfpow): Use TMP_ALLOC_LIMBS_3.
	(mpn_perfect_power_p): Skip useless allocations. Use mpn_remove.
	* tests/mpz/t-perfpow.c (check_random): Check more perfect powers.

	* mpn/generic/divis.c: Use TMP_ALLOC_LIMBS_2. Share a count.

2014-08-30  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/arm64/mod_34lsub1.asm: New file.

2014-08-23  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/arm64/bdiv_dbm1c.asm: New file.

	* mpn/arm64/com.asm: New file.

	* mpn/arm64/sec_tabselect.asm: New file.

	* mpn/arm64/popcount.asm: New file.
	* mpn/arm64/hamdist.asm: New file.

	* configure.ac: Put generic arm/neon earlier in path.

2014-08-14 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpq/canonicalize.c: Earlier check for negative denominator.
	* mpq/set_d.c: Stricter allocation.

2014-08-03  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/x86_64/bobcat/mul_1.asm: Fix typo in offset affecting DOS64.

2014-07-28 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/fib2_ui.c: remove #if HAVE_NATIVE_mpn_rsblsh_n.
	* mpz/fib2_ui.c: Use tabulated values, when available.
	* mpz/fib_ui.c: #if HAVE_NATIVE_mpn_addlsh1_n, use it.

	* mpq/cmp_ui.c: Remove a branch.
	* mpq/cmp_si.c: Likewise.

	* mpn/generic/toom_interpolate_7pts.c: Replace an in-place add
	with add_n + INCR_U.

	* tests/mpf/t-fits.c: use ui_sub instead of sub_ui+neg.

2014-07-27  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/x86/k7/gcd_1.asm: Use LEAL.

	* mpn/x86/x86-defs.m4 (LEAL): New.
	(LEA): Append to `load_eip' instead of ASM_END, like darwin.m4.
	* mpn/x86/darwin.m4 (LEAL): New.

2014-07-26  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/x86/pentium/mode1o.asm: Add Darwin PIC code.
	* mpn/x86/pentium/bdiv_q_1.asm: Likewise.
	* mpn/x86/pentium/dive_1.asm: Likewise.
	* mpn/x86/pentium/popcount.asm: Likewise.
	* mpn/x86/pentium/hamdist.asm: Likewise.
	* mpn/x86/k6/gcd_1.asm: Likewise.

	* mpn/x86: Append ASM_END to many files.
	* tests/x86call.asm: Append ASM_END.

	* mpn/x86/fat/fat_entry.asm (FAT_ENTRY, FAT_INIT):
	Support Darwin.

	* mpn/x86/darwin.m4 (ASM_END): New, body from EPILOGUE_cpu.
	(EPILOGUE_cpu): Remove.

	* mpn/x86/x86-defs.m4 (LEA): Put `mov_eip_' thunks in ASM_END instead
	of EPILOGUE_cpu.

2014-07-05  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (Low-level Functions): Document that scratch need
	for mpn_sec_add_1 and mpn_sec_sub_1 are at most n limbs.
	(Low-level Functions): Document allowed overlap for mpn_addmul_1
	and mpn_submul_1.

2014-07-02  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/x86_64/x86_64-defs.m4: Fix quoting.

	* mpn/x86_64/atom/redc_1.asm: Enforce proper stack allocation.
	* mpn/x86_64/bobcat/redc_1.asm: Likewise.
	* mpn/x86_64/core2/divrem_1.asm: Likewise.
	* mpn/x86_64/core2/gcd_1.asm: Likewise.
	* mpn/x86_64/core2/redc_1.asm: Likewise.
	* mpn/x86_64/coreihwl/redc_1.asm: Likewise.
	* mpn/x86_64/coreinhm/redc_1.asm: Likewise.
	* mpn/x86_64/coreisbr/redc_1.asm: Likewise.
	* mpn/x86_64/divrem_1.asm: Likewise.
	* mpn/x86_64/divrem_2.asm: Likewise.
	* mpn/x86_64/gcd_1.asm: Likewise.
	* mpn/x86_64/mod_1_1.asm: Likewise.
	* mpn/x86_64/mod_1_2.asm: Likewise.
	* mpn/x86_64/mod_1_4.asm: Likewise.

2014-06-30  Torbjörn Granlund  <tege@gmplib.org>

	* config.sub: Generalise x86 patterns.

2014-06-17  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (__gmp_gcd_function, __gmp_lcm_function): New classes.
	(gcd, lcm): New functions.
	* doc/gmp.texi (C++ Interface Integers): Document them.
	* tests/cxx/t-ops2.cc (checkz): Test them.

2014-06-16  Torbjörn Granlund  <tege@gmplib.org>

	* mpf/mul.c: Postpone TMP_MARK.

	* mpn/generic/perfpow.c (perfpow): Combine TMP_ALLOCs.

2014-06-15  Torbjörn Granlund  <tege@gmplib.org>

	* tests/refmpn.c (refmpn_mul): Rewrite to avoid O(n) recursion depth.

2014-06-09  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/generic/mullo_n.c: Remove default THRESHOLDs.
	* gmp-impl.h: Put MULLO THRESHOLDs here.  Improve various THRESHOLD
	defaults.

2014-06-08  Torbjörn Granlund  <tege@gmplib.org>

	* gmp-impl.h (TMP_ALLOC): Decrease limit to about half.

	* mpn/generic/toom53_mul.c: Replace many TMP_SALLOC invocations
	by a single TMP_ALLOC.
	* mpn/generic/toom42_mul.c: Likewise.

	* mpn/generic/sec_sqr.c: Don't unconditionally call mpn_sqr_basecase
	since it fails for non-cryptographic sizes for some obsolete CPUs.

	* mpn/generic/sec_powm.c: Remove own squaring code, instead use
	mpn_mul_basecase.

	* tests/mpn/logic.c (main): Don't use TMP_SALLOC_LIMBS.

	* mpn/generic/dcpi1_div_q.c: Avoid TMP_SALLOC_LIMBS.
	* mpn/generic/dcpi1_div_qr.c: Likewise.

2014-06-08 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpn/generic/mul.c: Tighter allocation in Toom{2,3}X branches.

2014-06-06  Torbjörn Granlund  <tege@gmplib.org>

	* mpn/generic/mul.c: Swap some TMP_SALLOC_LIMBS for TMP_ALLOC_LIMBS
	and some TMP_ALLOC_LIMBS for TMP_SALLOC_LIMBS.

2014-05-31 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* mpf/ui_sub.c: Remove buggy code, use a wrapper to mpf_sub.
	* tests/mpf/t-sub.c: More corner cases and strict checking.
	* mpf/sub.c: Use more mpn_ primitives and macros.

	* tests/mpf/t-int_p.c: Test numbers with both integer and
	fractionary parts.

	* mpf/int_p.c: Delay zero branch and use mpn_zero_p.
	* mpf/fits_s.h: No special case for SIZ == 0.
	* mpf/fits_u.h: Likewise.

2014-05-29  Marc Glisse  <marc.glisse@inria.fr>

	* gmp-h.in: Include <limits.h>.
	(__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): Remove.
	* gmp-impl.h (ULONG_MAX, UINT_MAX, USHRT_MAX, LONG_MAX, INT_MAX,
	SHRT_MAX): Remove unnecessary redefinition.
	* tests/t-gmpmax.c: Remove file.
	* tests/Makefile.am: Remove t-gmpmax.

2014-05-22 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* tests/mpf/t-sub.c (check_data): Test also ui_sub and sub_ui.

2014-05-20 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gen-fac.c: +1 in the init2 argument before setbit.
	* gen-fib.c: Likewise. (Thanks Niels)
	* rand/randmts.c: Likewise.

	* mpn/generic/invert.c: Remove unused TMP_MARK.
	* mpn/generic/invertappr.c: Avoid a branch.
	* mpz/millerrabin.c (millerrabin): Consider the rare case n is a power.

2014-05-15 Marco Bodrato <bodrato@mail.dm.unipi.it>

	* gen-fib.c: Use mpz_setbit.
	* gen-psqr.c: Skip even numbers when looking for primes.

	* mpn/generic/invert.c: Avoid a branch.
	* mpn/generic/toom2_sqr.c: Avoid a few branches in the odd case.
	* mpn/generic/toom22_mul.c: Likewise.

2014-05-08  Marc Glisse  <marc.glisse@inria.fr>

	* gmpxx.h (std::common_type): Remove partial specialization for two
	identical expressions. New partial specialization for a single type.
	* tests/cxx/t-cxx11.cc: Test it.

2014-04-14  Niels Möller  <nisse@lysator.liu.se>

	* doc/gmp.texi (mpz_invert): Clarify behavior in the zero ring.

2014-04-04  Marc Glisse  <marc.glisse@inria.fr>
... (truncated)