| @@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; | | | @@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; |
351 | #endif | | 351 | #endif |
352 | | | 352 | |
353 | | | 353 | |
354 | /* PORTME: What other compilers have a useful "extern inline"? "static | | 354 | /* PORTME: What other compilers have a useful "extern inline"? "static |
355 | inline" would be an acceptable substitute if the compiler (or linker) | | 355 | inline" would be an acceptable substitute if the compiler (or linker) |
356 | discards unused statics. */ | | 356 | discards unused statics. */ |
357 | | | 357 | |
358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | | 358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype |
359 | for an inline too, so as to correctly specify "dllimport" on windows, in | | 359 | for an inline too, so as to correctly specify "dllimport" on windows, in |
360 | case the function is called rather than inlined. | | 360 | case the function is called rather than inlined. |
361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 | | 361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 |
362 | inline semantics, unless -fgnu89-inline is used. */ | | 362 | inline semantics, unless -fgnu89-inline is used. */ |
363 | #ifdef __GNUC__ | | 363 | #ifdef __GNUC__ |
364 | #if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ | | 364 | #if (defined __GNUC_STDC_INLINE__) || \ |
365 | || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) | | 365 | (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) |
366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | | 366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) |
367 | #else | | | |
368 | #define __GMP_EXTERN_INLINE extern __inline__ | | | |
369 | #endif | | 367 | #endif |
370 | #define __GMP_INLINE_PROTOTYPES 1 | | 368 | #define __GMP_INLINE_PROTOTYPES 1 |
371 | #endif | | 369 | #endif |
372 | | | 370 | |
373 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 | | 371 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 |
374 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 | | 372 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 |
375 | mode, which is the default), but an unnecessary local copy of foo is | | 373 | mode, which is the default), but an unnecessary local copy of foo is |
376 | emitted unless -O is used. "extern __inline" is accepted, but the | | 374 | emitted unless -O is used. "extern __inline" is accepted, but the |
377 | "extern" appears to be ignored, ie. it becomes a plain global function | | 375 | "extern" appears to be ignored, ie. it becomes a plain global function |
378 | but which is inlined within its file. Don't know if all old versions of | | 376 | but which is inlined within its file. Don't know if all old versions of |
379 | DEC C supported __inline, but as a start let's do the right thing for | | 377 | DEC C supported __inline, but as a start let's do the right thing for |
380 | current versions. */ | | 378 | current versions. */ |
381 | #ifdef __DECC | | 379 | #ifdef __DECC |
| @@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v | | | @@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v |
1683 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | | 1681 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); |
1684 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) | | 1682 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) |
1685 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | | 1683 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; |
1686 | #define mpn_sec_div_r __MPN(sec_div_r) | | 1684 | #define mpn_sec_div_r __MPN(sec_div_r) |
1687 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | | 1685 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); |
1688 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) | | 1686 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) |
1689 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | | 1687 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; |
1690 | | | 1688 | |
1691 | #define mpn_sec_invert __MPN(sec_invert) | | 1689 | #define mpn_sec_invert __MPN(sec_invert) |
1692 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); | | 1690 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); |
1693 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) | | 1691 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) |
1694 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; | | 1692 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; |
1695 | | | 1693 | |
| | | 1694 | #define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) |
| | | 1695 | __GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); |
| | | 1696 | |
1696 | | | 1697 | |
1697 | /**************** mpz inlines ****************/ | | 1698 | /**************** mpz inlines ****************/ |
1698 | | | 1699 | |
1699 | /* The following are provided as inlines where possible, but always exist as | | 1700 | /* The following are provided as inlines where possible, but always exist as |
1700 | library functions too, for binary compatibility. | | 1701 | library functions too, for binary compatibility. |
1701 | | | 1702 | |
1702 | Within gmp itself this inlining generally isn't relied on, since it | | 1703 | Within gmp itself this inlining generally isn't relied on, since it |
1703 | doesn't get done for all compilers, whereas if something is worth | | 1704 | doesn't get done for all compilers, whereas if something is worth |
1704 | inlining then it's worth arranging always. | | 1705 | inlining then it's worth arranging always. |
1705 | | | 1706 | |
1706 | There are two styles of inlining here. When the same bit of code is | | 1707 | There are two styles of inlining here. When the same bit of code is |
1707 | wanted for the inline as for the library version, then __GMP_FORCE_foo | | 1708 | wanted for the inline as for the library version, then __GMP_FORCE_foo |
1708 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE | | 1709 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE |
| @@ -2319,18 +2320,18 @@ enum | | | @@ -2319,18 +2320,18 @@ enum |
2319 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, | | 2320 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, |
2320 | GMP_ERROR_DIVISION_BY_ZERO = 2, | | 2321 | GMP_ERROR_DIVISION_BY_ZERO = 2, |
2321 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, | | 2322 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, |
2322 | GMP_ERROR_INVALID_ARGUMENT = 8 | | 2323 | GMP_ERROR_INVALID_ARGUMENT = 8 |
2323 | }; | | 2324 | }; |
2324 | | | 2325 | |
2325 | /* Define CC and CFLAGS which were used to build this version of GMP */ | | 2326 | /* Define CC and CFLAGS which were used to build this version of GMP */ |
2326 | #define __GMP_CC "gcc" | | 2327 | #define __GMP_CC "gcc" |
2327 | #define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 -mno-avx" | | 2328 | #define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 -mno-avx" |
2328 | | | 2329 | |
2329 | /* Major version number is the value of __GNU_MP__ too, above. */ | | 2330 | /* Major version number is the value of __GNU_MP__ too, above. */ |
2330 | #define __GNU_MP_VERSION 6 | | 2331 | #define __GNU_MP_VERSION 6 |
2331 | #define __GNU_MP_VERSION_MINOR 2 | | 2332 | #define __GNU_MP_VERSION_MINOR 2 |
2332 | #define __GNU_MP_VERSION_PATCHLEVEL 0 | | 2333 | #define __GNU_MP_VERSION_PATCHLEVEL 1 |
2333 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) | | 2334 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) |
2334 | | | 2335 | |
2335 | #define __GMP_H__ | | 2336 | #define __GMP_H__ |
2336 | #endif /* __GMP_H__ */ | | 2337 | #endif /* __GMP_H__ */ |