Skip to content

Commit e140dfc

Browse files
committed
project: Update for 6.2.0 merge.
1 parent 3fffbb4 commit e140dfc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+5433
-3657
lines changed

SMP/config.h

+28-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,26 @@
139139
/* #undef HAVE_HOST_CPU_pentiumpro */
140140
/* #undef HAVE_HOST_CPU_pentium2 */
141141
/* #undef HAVE_HOST_CPU_pentium3 */
142+
/* #undef HAVE_HOST_CPU_pentium4 */
143+
/* #undef HAVE_HOST_CPU_core2 */
144+
/* #undef HAVE_HOST_CPU_nehalem */
145+
/* #undef HAVE_HOST_CPU_westmere */
146+
/* #undef HAVE_HOST_CPU_sandybridge */
147+
/* #undef HAVE_HOST_CPU_ivybridge */
148+
/* #undef HAVE_HOST_CPU_haswell */
149+
/* #undef HAVE_HOST_CPU_broadwell */
150+
/* #undef HAVE_HOST_CPU_skylake */
151+
/* #undef HAVE_HOST_CPU_silvermont */
152+
/* #undef HAVE_HOST_CPU_goldmont */
153+
/* #undef HAVE_HOST_CPU_k8 */
154+
/* #undef HAVE_HOST_CPU_k10 */
155+
/* #undef HAVE_HOST_CPU_bulldozer */
156+
/* #undef HAVE_HOST_CPU_piledriver */
157+
/* #undef HAVE_HOST_CPU_steamroller */
158+
/* #undef HAVE_HOST_CPU_excavator */
159+
/* #undef HAVE_HOST_CPU_zen */
160+
/* #undef HAVE_HOST_CPU_bobcat */
161+
/* #undef HAVE_HOST_CPU_jaguar */
142162
/* #undef HAVE_HOST_CPU_s390_z900 */
143163
/* #undef HAVE_HOST_CPU_s390_z990 */
144164
/* #undef HAVE_HOST_CPU_s390_z9 */
@@ -201,8 +221,8 @@
201221
#define HAVE_NATIVE_mpn_add_n 1
202222
/* #undef HAVE_NATIVE_mpn_add_n_sub_n */
203223
#define HAVE_NATIVE_mpn_add_nc 1
204-
/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */
205224
#if defined(__x86_64) || defined(_M_X64)
225+
#define HAVE_NATIVE_mpn_addaddmul_1msb0 1
206226
#define HAVE_NATIVE_mpn_addlsh1_n 1
207227
#define HAVE_NATIVE_mpn_addlsh2_n 1
208228
#define HAVE_NATIVE_mpn_addlsh_n 1
@@ -260,6 +280,10 @@
260280
#if defined(__x86_64) || defined(_M_X64)
261281
#define HAVE_NATIVE_mpn_divrem_2 1
262282
#define HAVE_NATIVE_mpn_gcd_1 1
283+
#endif
284+
#define HAVE_NATIVE_mpn_gcd_11 1
285+
#if defined(__x86_64) || defined(_M_X64)
286+
#define HAVE_NATIVE_mpn_gcd_22 1
263287
#define HAVE_NATIVE_mpn_hamdist 1
264288
#define HAVE_NATIVE_mpn_invert_limb 1
265289
#define HAVE_NATIVE_mpn_ior_n 1
@@ -313,6 +337,7 @@
313337
#define HAVE_NATIVE_mpn_rsh1sub_nc 1
314338
#endif
315339
#define HAVE_NATIVE_mpn_rshift 1
340+
/* #undef HAVE_NATIVE_mpn_sbpi1_bdiv_r */
316341
#define HAVE_NATIVE_mpn_sqr_basecase 1
317342
/* #undef HAVE_NATIVE_mpn_sqr_diagonal */
318343
#if defined(__x86_64) || defined(_M_X64)
@@ -509,6 +534,8 @@
509534
/* Define to 1 for Windos/64 */
510535
#define HOST_DOS64 1
511536

537+
#define GMP_ASM_X86_MULX
538+
512539
/* Assembler local label prefix */
513540
#define LSYM_PREFIX "L"
514541

SMP/gmp.h

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Definitions for GNU multiple precision functions. -*- mode: c -*-
22
3-
Copyright 1991, 1993-1997, 1999-2016 Free Software Foundation, Inc.
3+
Copyright 1991, 1993-1997, 1999-2016, 2020 Free Software Foundation, Inc.
44
55
This file is part of the GNU MP Library.
66
@@ -351,7 +351,11 @@ typedef __mpq_struct *mpq_ptr;
351351
__GMP_ATTRIBUTE_PURE. */
352352

353353
#if defined (__cplusplus)
354+
#if __cplusplus >= 201103L
355+
#define __GMP_NOTHROW noexcept
356+
#else
354357
#define __GMP_NOTHROW throw ()
358+
#endif
355359
#else
356360
#define __GMP_NOTHROW
357361
#endif
@@ -855,13 +859,13 @@ __GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __
855859
__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
856860

857861
#define mpz_init __gmpz_init
858-
__GMP_DECLSPEC void mpz_init (mpz_ptr);
862+
__GMP_DECLSPEC void mpz_init (mpz_ptr) __GMP_NOTHROW;
859863

860864
#define mpz_init2 __gmpz_init2
861865
__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t);
862866

863867
#define mpz_inits __gmpz_inits
864-
__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...);
868+
__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...) __GMP_NOTHROW;
865869

866870
#define mpz_init_set __gmpz_init_set
867871
__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr);
@@ -1522,6 +1526,9 @@ __GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_
15221526
#define mpn_gcd __MPN(gcd)
15231527
__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
15241528

1529+
#define mpn_gcd_11 __MPN(gcd_11)
1530+
__GMP_DECLSPEC mp_limb_t mpn_gcd_11 (mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE;
1531+
15251532
#define mpn_gcd_1 __MPN(gcd_1)
15261533
__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE;
15271534

@@ -1850,7 +1857,7 @@ mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW
18501857
mp_bitcnt_t __gmp_result;
18511858

18521859
__gmp_usize = __gmp_u->_mp_size;
1853-
__gmp_result = (__gmp_usize < 0 ? ULONG_MAX : 0);
1860+
__gmp_result = (__gmp_usize < 0 ? ~ __GMP_CAST (mp_bitcnt_t, 0) : __GMP_CAST (mp_bitcnt_t, 0));
18541861
if (__GMP_LIKELY (__gmp_usize > 0))
18551862
__gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize);
18561863
return __gmp_result;
@@ -2331,8 +2338,8 @@ enum
23312338

23322339
/* Major version number is the value of __GNU_MP__ too, above. */
23332340
#define __GNU_MP_VERSION 6
2334-
#define __GNU_MP_VERSION_MINOR 1
2335-
#define __GNU_MP_VERSION_PATCHLEVEL 2
2341+
#define __GNU_MP_VERSION_MINOR 2
2342+
#define __GNU_MP_VERSION_PATCHLEVEL 0
23362343
#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL)
23372344

23382345
#define __GMP_H__

SMP/libgmp.def

+1
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ __gmpn_divrem_2
298298
__gmpn_div_qr_1
299299
__gmpn_div_qr_2
300300
__gmpn_gcd
301+
__gmpn_gcd_11
301302
__gmpn_gcd_1
302303
__gmpn_gcdext_1
303304
__gmpn_gcdext

SMP/libgmp.vcxproj

+19-2
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@
325325
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
326326
</ClCompile>
327327
<ClCompile Include="..\mpn\generic\comb_tables.c" />
328+
<ClCompile Include="..\mpn\generic\compute_powtab.c" />
328329
<ClCompile Include="..\mpn\generic\dcpi1_bdiv_q.c" />
329330
<ClCompile Include="..\mpn\generic\dcpi1_bdiv_qr.c" />
330331
<ClCompile Include="..\mpn\generic\dcpi1_divappr_q.c" />
@@ -349,12 +350,14 @@
349350
<ClCompile Include="..\mpn\generic\dump.c">
350351
<ObjectFileName>$(IntDir)\mpn_%(Filename).obj</ObjectFileName>
351352
</ClCompile>
353+
<ClCompile Include="..\mpn\generic\fib2m.c" />
352354
<ClCompile Include="..\mpn\generic\fib2_ui.c" />
353355
<ClCompile Include="..\mpn\generic\gcd.c" />
354356
<ClCompile Include="..\mpn\generic\gcdext.c" />
355357
<ClCompile Include="..\mpn\generic\gcdext_1.c" />
356358
<ClCompile Include="..\mpn\generic\gcdext_lehmer.c" />
357-
<ClCompile Include="..\mpn\generic\gcd_1.c">
359+
<ClCompile Include="..\mpn\generic\gcd_1.c" />
360+
<ClCompile Include="..\mpn\generic\gcd_22.c">
358361
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
359362
</ClCompile>
360363
<ClCompile Include="..\mpn\generic\gcd_subdiv_step.c" />
@@ -441,6 +444,7 @@
441444
<ClCompile Include="..\mpn\generic\rootrem.c" />
442445
<ClCompile Include="..\mpn\generic\sbpi1_bdiv_q.c" />
443446
<ClCompile Include="..\mpn\generic\sbpi1_bdiv_qr.c" />
447+
<ClCompile Include="..\mpn\generic\sbpi1_bdiv_r.c" />
444448
<ClCompile Include="..\mpn\generic\sbpi1_divappr_q.c" />
445449
<ClCompile Include="..\mpn\generic\sbpi1_div_q.c" />
446450
<ClCompile Include="..\mpn\generic\sbpi1_div_qr.c" />
@@ -459,6 +463,7 @@
459463
<ClCompile Include="..\mpn\generic\sqrlo_basecase.c" />
460464
<ClCompile Include="..\mpn\generic\sqrmod_bnm1.c" />
461465
<ClCompile Include="..\mpn\generic\sqrtrem.c" />
466+
<ClCompile Include="..\mpn\generic\strongfibo.c" />
462467
<ClCompile Include="..\mpn\generic\sub.c">
463468
<ObjectFileName>$(IntDir)\mpn_%(Filename).obj</ObjectFileName>
464469
</ClCompile>
@@ -748,6 +753,7 @@
748753
<ClCompile Include="..\mpz\limbs_modify.c" />
749754
<ClCompile Include="..\mpz\limbs_read.c" />
750755
<ClCompile Include="..\mpz\limbs_write.c" />
756+
<ClCompile Include="..\mpz\lucmod.c" />
751757
<ClCompile Include="..\mpz\lucnum2_ui.c" />
752758
<ClCompile Include="..\mpz\lucnum_ui.c" />
753759
<ClCompile Include="..\mpz\mfac_uiui.c" />
@@ -852,6 +858,7 @@
852858
<ClCompile Include="..\mpz\sqrtrem.c">
853859
<ObjectFileName>$(IntDir)\mpz_%(Filename).obj</ObjectFileName>
854860
</ClCompile>
861+
<ClCompile Include="..\mpz\stronglucas.c" />
855862
<ClCompile Include="..\mpz\sub.c">
856863
<ObjectFileName>$(IntDir)\mpz_%(Filename).obj</ObjectFileName>
857864
</ClCompile>
@@ -983,6 +990,7 @@
983990
</ClCompile>
984991
</ItemGroup>
985992
<ItemGroup>
993+
<ClInclude Include="..\asl.h" />
986994
<ClInclude Include="..\gmp-impl.h" />
987995
<ClInclude Include="..\gmpxx.h" />
988996
<ClInclude Include="..\longlong.h" />
@@ -1010,6 +1018,9 @@
10101018
<ClInclude Include="x86_64\trialdivtab.h" />
10111019
</ItemGroup>
10121020
<ItemGroup>
1021+
<YASM Include="mpn\x86_64\addaddmul_1msb0.s">
1022+
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
1023+
</YASM>
10131024
<YASM Include="mpn\x86_64\addlsh1_n.s">
10141025
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
10151026
</YASM>
@@ -1046,7 +1057,10 @@
10461057
<YASM Include="mpn\x86_64\divexact_1.s">
10471058
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
10481059
</YASM>
1049-
<YASM Include="mpn\x86_64\gcd_1.s">
1060+
<YASM Include="mpn\x86_64\gcd_11.s">
1061+
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
1062+
</YASM>
1063+
<YASM Include="mpn\x86_64\gcd_22.s">
10501064
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
10511065
</YASM>
10521066
<YASM Include="mpn\x86_64\hamdist.s">
@@ -1215,6 +1229,9 @@
12151229
<YASM Include="mpn\x86\divrem_2.s">
12161230
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
12171231
</YASM>
1232+
<YASM Include="mpn\x86\gcd_11.s">
1233+
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
1234+
</YASM>
12181235
<YASM Include="mpn\x86\lshift.s">
12191236
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
12201237
</YASM>

SMP/libgmp.vcxproj.filters

+36-3
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,27 @@
15751575
<ClCompile Include="mpn\x86\xor_n.c">
15761576
<Filter>Source Files\mpn\x86</Filter>
15771577
</ClCompile>
1578+
<ClCompile Include="..\mpz\lucmod.c">
1579+
<Filter>Source Files\mpz</Filter>
1580+
</ClCompile>
1581+
<ClCompile Include="..\mpz\stronglucas.c">
1582+
<Filter>Source Files\mpz</Filter>
1583+
</ClCompile>
1584+
<ClCompile Include="..\mpn\generic\compute_powtab.c">
1585+
<Filter>Source Files\mpn\generic</Filter>
1586+
</ClCompile>
1587+
<ClCompile Include="..\mpn\generic\fib2m.c">
1588+
<Filter>Source Files\mpn\generic</Filter>
1589+
</ClCompile>
1590+
<ClCompile Include="..\mpn\generic\gcd_22.c">
1591+
<Filter>Source Files\mpn\generic</Filter>
1592+
</ClCompile>
1593+
<ClCompile Include="..\mpn\generic\sbpi1_bdiv_r.c">
1594+
<Filter>Source Files\mpn\generic</Filter>
1595+
</ClCompile>
1596+
<ClCompile Include="..\mpn\generic\strongfibo.c">
1597+
<Filter>Source Files\mpn\generic</Filter>
1598+
</ClCompile>
15781599
</ItemGroup>
15791600
<ItemGroup>
15801601
<ClInclude Include="..\mpf\fits_s.h">
@@ -1652,6 +1673,9 @@
16521673
<ClInclude Include="..\longlong.h">
16531674
<Filter>Header Files</Filter>
16541675
</ClInclude>
1676+
<ClInclude Include="..\asl.h">
1677+
<Filter>Header Files</Filter>
1678+
</ClInclude>
16551679
</ItemGroup>
16561680
<ItemGroup>
16571681
<YASM Include="mpn\x86_64\add_n.s">
@@ -1690,9 +1714,6 @@
16901714
<YASM Include="mpn\x86_64\divexact_1.s">
16911715
<Filter>Source Files\mpn\x86_64</Filter>
16921716
</YASM>
1693-
<YASM Include="mpn\x86_64\gcd_1.s">
1694-
<Filter>Source Files\mpn\x86_64</Filter>
1695-
</YASM>
16961717
<YASM Include="mpn\x86_64\hamdist.s">
16971718
<Filter>Source Files\mpn\x86_64</Filter>
16981719
</YASM>
@@ -1888,6 +1909,18 @@
18881909
<YASM Include="mpn\x86\umul_ppmm.s">
18891910
<Filter>Source Files\mpn\x86</Filter>
18901911
</YASM>
1912+
<YASM Include="mpn\x86\gcd_11.s">
1913+
<Filter>Source Files\mpn\x86</Filter>
1914+
</YASM>
1915+
<YASM Include="mpn\x86_64\addaddmul_1msb0.s">
1916+
<Filter>Source Files\mpn\x86_64</Filter>
1917+
</YASM>
1918+
<YASM Include="mpn\x86_64\gcd_11.s">
1919+
<Filter>Source Files\mpn\x86_64</Filter>
1920+
</YASM>
1921+
<YASM Include="mpn\x86_64\gcd_22.s">
1922+
<Filter>Source Files\mpn\x86_64</Filter>
1923+
</YASM>
18911924
</ItemGroup>
18921925
<ItemGroup>
18931926
<None Include="libgmp.def">

0 commit comments

Comments
 (0)