From 578b76873383784841f5478573f4ac5d251aa0ba Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 22 Sep 2021 07:42:21 +0100 Subject: libgcc, X86: Adjust guard for Mach-O code. Existing code in the sfp-machine header has been using __MACH__ as a guard for Mach-O, where currently symbols aliases are not supported. __MACH__ is not a sufficient guard for this, since the define is also emitted for HURD, at least. Fixed by amending the guard to use __APPLE__ instead. Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386/sfp-machine.h: Guard Mach-O-specific code using __APPLE__. --- libgcc/config/i386/sfp-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h index 172ebc7..c451ae7 100644 --- a/libgcc/config/i386/sfp-machine.h +++ b/libgcc/config/i386/sfp-machine.h @@ -74,7 +74,7 @@ void __sfp_handle_exceptions (int); #define __BYTE_ORDER __LITTLE_ENDIAN /* Define ALIASNAME as a strong alias for NAME. */ -#if defined __MACH__ +#if defined __APPLE__ /* Mach-O doesn't support aliasing, so we build a secondary function for the alias - we need to do a bit of a dance to find out what the type of the arguments is and then apply that to the secondary function. -- cgit v1.1 From e4777439fc77465b4cf89b6bfeb47cd00329cb20 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 23 Sep 2021 00:16:29 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 4a1b261..2bef573 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2021-09-22 Iain Sandoe + + * config/i386/sfp-machine.h: Guard Mach-O-specific code + using __APPLE__. + 2021-09-19 Iain Sandoe * config/t-slibgcc-darwin: Delete unused code. -- cgit v1.1 From 45f775f5f813224daed1f2234deacc1c9365009e Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Sep 2021 20:36:49 +0100 Subject: libgcc, X86, Darwin: Export cpu_model and indicator. These two symbols have been emitted since 4.8, but were not added to the Darwin exports, so we have been using the ones from libgcc.a. Added to libgcc_s now. Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386/libgcc-darwin.ver: Add Symbols for __cpu_model, __cpu_indicator_init. --- libgcc/config/i386/libgcc-darwin.ver | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/i386/libgcc-darwin.ver b/libgcc/config/i386/libgcc-darwin.ver index 5224cdc..c97dae7 100644 --- a/libgcc/config/i386/libgcc-darwin.ver +++ b/libgcc/config/i386/libgcc-darwin.ver @@ -1,4 +1,7 @@ - +GCC_4.8.0 { + __cpu_model + __cpu_indicator_init +} %inherit GCC_12.0.0 GCC_7.0.0 GCC_12.0.0 { -- cgit v1.1 From fd1334791e85ef813ada97b6931fb0d912920f28 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 29 Sep 2021 00:16:26 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 2bef573..188445e 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2021-09-28 Iain Sandoe + + * config/i386/libgcc-darwin.ver: Add Symbols for + __cpu_model, __cpu_indicator_init. + 2021-09-22 Iain Sandoe * config/i386/sfp-machine.h: Guard Mach-O-specific code -- cgit v1.1 From d91056851c5c60f226e3192fb955d018b53eb66f Mon Sep 17 00:00:00 2001 From: Patrick McGehearty Date: Sun, 3 Oct 2021 18:07:06 -0400 Subject: Fix for powerpc64 long double complex divide failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - - - - New in version 6: Due to an oversight (i.e. coding error), version 5 changed the use of __LIBGCC_TF_EPSILON__ to __LIBGCC_DF_EPSILON__ but not the other LIBGCC_TF values. For correct execution of the long double test case it is necessary to also switch to using __LIBGCC_DF_MIN__. For consistency we also switch to using __LIBGCC_DF_MAX__. LDBL_MIN is 2**53 times as larger than DBL_MIN. The larger value causes the code to switch the order of computation when it is not optimal, resulting in failure for one of the values in the cdivchk_ld.c test. Using DBL_MIN does not cause that failure.. There may be opportunity for further refinement of IBM128 format Long Double complex divide, but that's beyond the scope of this patch. - - - - This revision adds a test in libgcc/libgcc2.c for when "__LIBGCC_TF_MANT_DIG__ == 106" to use __LIBGCC_DF_EPSILON__ instead of __LIBGCC_TF_EPSILON__. That is specific to IBM 128-bit format long doubles where EPSILON is very, very small and 1/EPSILON oveflows to infinity. This change avoids the overflow without affecting any other platform. Discussion in the patch is adjusted to reflect this limitation. It does not make any changes to .../rs6000/_divkc3.c, leaving it to use __LIBGCC_KF__*. That means the upstream gcc will not build in older IBM environments that do not recognize the KF floating point mode properly. Environments that do not need IBM longdouble support do build cleanly. - - - - This patch addresses the failure of powerpc64 long double complex divide in native ibm long double format after the patch "Practical improvement to libgcc complex divide". The new code uses the following macros which are intended to be mapped to appropriate values according to the underlying hardware representation. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101104 RBIG a value near the maximum representation RMIN a value near the minimum representation (but not in the subnormal range) RMIN2 a value moderately less than 1 RMINSCAL the inverse of RMIN2 RMAX2 RBIG * RMIN2 - a value to limit scaling to not overflow When "long double" values were not using the IEEE 128-bit format but the traditional IBM 128-bit, the previous code used the LDBL values which caused overflow for RMINSCAL. The new code uses the DBL values. RBIG LDBL_MAX = 0x1.fffffffffffff800p+1022 DBL_MAX = 0x1.fffffffffffff000p+1022 RMIN LDBL_MIN = 0x1.0000000000000000p-969 RMIN DBL_MIN = 0x1.0000000000000000p-1022 RMIN2 LDBL_EPSILON = 0x0.0000000000001000p-1022 = 0x1.0p-1074 RMIN2 DBL_EPSILON = 0x1.0000000000000000p-52 RMINSCAL 1/LDBL_EPSILON = inf (1.0p+1074 does not fit in IBM 128-bit). 1/DBL_EPSILON = 0x1.0000000000000000p+52 RMAX2 = RBIG * RMIN2 = 0x1.fffffffffffff800p-52 RBIG * RMIN2 = 0x1.fffffffffffff000p+970 The MAX and MIN values have only modest changes since the maximum and minimum values are about the same as for double precision. The EPSILON field is considerably different. Due to how very small values can be represented in the lower 64 bits of the IBM 128-bit floating point, EPSILON is extremely small, so far beyond the desired value that inversion of the value overflows and even without the overflow, the RMAX2 is so small as to eliminate most usage of the test. The change has been tested on gcc135.fsffrance.org and gains the expected improvements in accuracy for long double complex divide. libgcc/ PR target/101104 * libgcc2.c (RMIN2, RMINSCAL, RMAX2): Use more correct values for native IBM 128-bit. --- libgcc/libgcc2.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libgcc') diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index 38f935e..e66e6f0 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -1904,10 +1904,17 @@ NAME (TYPE x, int m) # define MODE tc # define CEXT __LIBGCC_TF_FUNC_EXT__ # define NOTRUNC (!__LIBGCC_TF_EXCESS_PRECISION__) -# define RBIG (__LIBGCC_TF_MAX__ / 2) -# define RMIN (__LIBGCC_TF_MIN__) -# define RMIN2 (__LIBGCC_TF_EPSILON__) -# define RMINSCAL (1 / __LIBGCC_TF_EPSILON__) +# if __LIBGCC_TF_MANT_DIG__ == 106 +# define RBIG (__LIBGCC_DF_MAX__ / 2) +# define RMIN (__LIBGCC_DF_MIN__) +# define RMIN2 (__LIBGCC_DF_EPSILON__) +# define RMINSCAL (1 / __LIBGCC_DF_EPSILON__) +# else +# define RBIG (__LIBGCC_TF_MAX__ / 2) +# define RMIN (__LIBGCC_TF_MIN__) +# define RMIN2 (__LIBGCC_TF_EPSILON__) +# define RMINSCAL (1 / __LIBGCC_TF_EPSILON__) +# endif # define RMAX2 (RBIG * RMIN2) #else # error -- cgit v1.1 From 154fd0896ef22fcf5235e35e2b795394dddd7a33 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 4 Oct 2021 00:16:22 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 188445e..5ecd436 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2021-10-03 Patrick McGehearty + + PR target/101104 + * libgcc2.c (RMIN2, RMINSCAL, RMAX2): + Use more correct values for native IBM 128-bit. + 2021-09-28 Iain Sandoe * config/i386/libgcc-darwin.ver: Add Symbols for -- cgit v1.1