diff options
Diffstat (limited to 'libquadmath')
-rw-r--r-- | libquadmath/ChangeLog | 39 | ||||
-rwxr-xr-x | libquadmath/configure | 8 | ||||
-rw-r--r-- | libquadmath/configure.ac | 4 | ||||
-rw-r--r-- | libquadmath/libquadmath.texi | 14 | ||||
-rw-r--r-- | libquadmath/math/expq.c | 2 | ||||
-rw-r--r-- | libquadmath/math/sqrtq.c | 3 | ||||
-rw-r--r-- | libquadmath/printf/addmul_1.c | 7 | ||||
-rw-r--r-- | libquadmath/printf/mul_1.c | 7 | ||||
-rw-r--r-- | libquadmath/printf/submul_1.c | 7 | ||||
-rw-r--r-- | libquadmath/strtod/strtod_l.c | 5 |
10 files changed, 68 insertions, 28 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 11e15a0..00af008 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,40 @@ +2025-04-09 Jakub Jelinek <jakub@redhat.com> + + * math/expq.c (C): Fix up THREEp96 constant. + +2025-04-07 Lulu Cheng <chenglulu@loongson.cn> + + PR target/119408 + * configure.ac: When checking for __float128 support, determine + whether the current architecture is LoongArch. If so, return false. + * configure: Regenerate. + Sigend-off-by: Xi Ruoyao <xry111@xry111.site> + Sigend-off-by: Jakub Jelinek <jakub@redhat.com> + +2025-04-01 Jakub Jelinek <jakub@redhat.com> + + * strtod/strtod_l.c (____STRTOF_INTERNAL): Avoid old-style function + definitions. + * printf/addmul_1.c (mpn_addmul_1): Likewise. + * printf/mul_1.c (mpn_mul_1): Likewise. + * printf/submul_1.c (mpn_submul_1): Likewise. + +2025-01-02 Jakub Jelinek <jakub@redhat.com> + + * libquadmath.texi: Bump @copying's copyright year. + +2024-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + * libquadmath.texi (M_LOG2Eq, M_LOG10Eq, M_1_PIq, + M_2_PIq, M_2_SQRTPIq, M_SQRT1_2q): Adjust descriptioni + of these constants. + +2024-08-03 Jakub Jelinek <jakub@redhat.com> + + PR target/116007 + * math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__ + define to __float128 before including soft-fp.h and quad.h. + 2024-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * Makefile.am [LIBQUAD_USE_SYMVER_SUN] (quadmath.map-sun): Pass @@ -1323,7 +1360,7 @@ PR fortran/32049 Initial implementation and checkin. -Copyright (C) 2010-2024 Free Software Foundation, Inc. +Copyright (C) 2010-2025 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/libquadmath/configure b/libquadmath/configure index 49d7080..f82dd3d 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -12843,6 +12843,10 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #ifdef __loongarch__ + #error On LoongArch we should use long double instead; __float128 is only for porting existing code easier. + #endif + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) typedef _Complex float __attribute__((mode(TC))) __complex128; #else @@ -12894,6 +12898,10 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #ifdef __loongarch__ + #error On LoongArch we should use long double instead; __float128 is only for porting existing code easier. + #endif + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) typedef _Complex float __attribute__((mode(TC))) __complex128; #else diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac index 349be26..c64a848 100644 --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -233,6 +233,10 @@ AM_CONDITIONAL(LIBQUAD_USE_SYMVER_SUN, [test "x$quadmath_use_symver" = xsun]) AC_CACHE_CHECK([whether __float128 is supported], [libquad_cv_have_float128], [GCC_TRY_COMPILE_OR_LINK([ + #ifdef __loongarch__ + #error On LoongArch we should use long double instead; __float128 is only for porting existing code easier. + #endif + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) typedef _Complex float __attribute__((mode(TC))) __complex128; #else diff --git a/libquadmath/libquadmath.texi b/libquadmath/libquadmath.texi index dc2a9ff..af0a774 100644 --- a/libquadmath/libquadmath.texi +++ b/libquadmath/libquadmath.texi @@ -6,7 +6,7 @@ @c %**end of header @copying -Copyright @copyright{} 2010-2024 Free Software Foundation, Inc. +Copyright @copyright{} 2010-2025 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -118,18 +118,18 @@ The following mathematical constants of type @code{__float128} are defined. @table @asis @item @code{M_Eq}: the constant e (Euler's number) -@item @code{M_LOG2Eq}: binary logarithm of 2 -@item @code{M_LOG10Eq}: common, decimal logarithm of 2 +@item @code{M_LOG2Eq}: base 2 logarithm of e +@item @code{M_LOG10Eq}: decimal (base 10) logarithm of e @item @code{M_LN2q}: natural logarithm of 2 @item @code{M_LN10q}: natural logarithm of 10 @item @code{M_PIq}: pi @item @code{M_PI_2q}: pi divided by two @item @code{M_PI_4q}: pi divided by four -@item @code{M_1_PIq}: one over pi -@item @code{M_2_PIq}: one over two pi -@item @code{M_2_SQRTPIq}: two over square root of pi +@item @code{M_1_PIq}: one divided by pi +@item @code{M_2_PIq}: two divided by pi +@item @code{M_2_SQRTPIq}: two divided by square root of pi @item @code{M_SQRT2q}: square root of 2 -@item @code{M_SQRT1_2q}: one over square root of 2 +@item @code{M_SQRT1_2q}: one divided by square root of 2 @end table diff --git a/libquadmath/math/expq.c b/libquadmath/math/expq.c index 1aaad91..1715988 100644 --- a/libquadmath/math/expq.c +++ b/libquadmath/math/expq.c @@ -74,7 +74,7 @@ static const __float128 C[] = { /* 3x2^96 */ #define THREEp96 C[2] - 59421121885698253195157962752.0Q, + 237684487542793012780631851008.0Q, /* 3x2^103 */ #define THREEp103 C[3] diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c index 8ca2828..a58998a 100644 --- a/libquadmath/math/sqrtq.c +++ b/libquadmath/math/sqrtq.c @@ -9,6 +9,9 @@ && defined(FE_TOWARDZERO) \ && defined(FE_INEXACT) #define USE_SOFT_FP 1 +#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__) +#define TFtype __float128 +#endif #include "../../libgcc/soft-fp/soft-fp.h" #include "../../libgcc/soft-fp/quad.h" #endif diff --git a/libquadmath/printf/addmul_1.c b/libquadmath/printf/addmul_1.c index f527f98..f9284a2 100644 --- a/libquadmath/printf/addmul_1.c +++ b/libquadmath/printf/addmul_1.c @@ -26,11 +26,8 @@ MA 02111-1307, USA. */ #include "gmp-impl.h" mp_limb_t -mpn_addmul_1 (res_ptr, s1_ptr, s1_size, s2_limb) - register mp_ptr res_ptr; - register mp_srcptr s1_ptr; - mp_size_t s1_size; - register mp_limb_t s2_limb; +mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, + mp_limb_t s2_limb) { register mp_limb_t cy_limb; register mp_size_t j; diff --git a/libquadmath/printf/mul_1.c b/libquadmath/printf/mul_1.c index 48a273f..17087bf 100644 --- a/libquadmath/printf/mul_1.c +++ b/libquadmath/printf/mul_1.c @@ -24,11 +24,8 @@ MA 02111-1307, USA. */ #include "gmp-impl.h" mp_limb_t -mpn_mul_1 (res_ptr, s1_ptr, s1_size, s2_limb) - register mp_ptr res_ptr; - register mp_srcptr s1_ptr; - mp_size_t s1_size; - register mp_limb_t s2_limb; +mpn_mul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, + mp_limb_t s2_limb) { register mp_limb_t cy_limb; register mp_size_t j; diff --git a/libquadmath/printf/submul_1.c b/libquadmath/printf/submul_1.c index 31903c6..a2a4fc8 100644 --- a/libquadmath/printf/submul_1.c +++ b/libquadmath/printf/submul_1.c @@ -26,11 +26,8 @@ MA 02111-1307, USA. */ #include "gmp-impl.h" mp_limb_t -mpn_submul_1 (res_ptr, s1_ptr, s1_size, s2_limb) - register mp_ptr res_ptr; - register mp_srcptr s1_ptr; - mp_size_t s1_size; - register mp_limb_t s2_limb; +mpn_submul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, + mp_limb_t s2_limb) { register mp_limb_t cy_limb; register mp_size_t j; diff --git a/libquadmath/strtod/strtod_l.c b/libquadmath/strtod/strtod_l.c index 3860284..4e85023 100644 --- a/libquadmath/strtod/strtod_l.c +++ b/libquadmath/strtod/strtod_l.c @@ -468,10 +468,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, return 0.0. If the number is too big to be represented, set `errno' to ERANGE and return HUGE_VAL with the appropriate sign. */ FLOAT -____STRTOF_INTERNAL (nptr, endptr, group) - const STRING_TYPE *nptr; - STRING_TYPE **endptr; - int group; +____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group) { int negative; /* The sign of the number. */ MPN_VAR (num); /* MP representation of the number. */ |