Message ID | YfgvH/jyNfv75UQX@toto.the-meissners.org |
---|---|
State | New |
Headers | show |
Series | Ping: [PATCH] Use system default for long double if not specified on PowerPC. | expand |
Hi! On Mon, Jan 31, 2022 at 01:49:03PM -0500, Michael Meissner wrote: > * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the > compiler used to build the current compiler defaults to IEEE > 128-bit long double, make that the default for this build. NAK. The compiler configured the same should behave the same, whatever the host compiler does. I've told you this before. Segher
On Mon, Jan 31, 2022 at 12:52:28PM -0600, Segher Boessenkool wrote: > Hi! > > On Mon, Jan 31, 2022 at 01:49:03PM -0500, Michael Meissner wrote: > > * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the > > compiler used to build the current compiler defaults to IEEE > > 128-bit long double, make that the default for this build. > > NAK. The compiler configured the same should behave the same, whatever > the host compiler does. I've told you this before. That is what this patch does. I am open to suggestions on how to set the defualt.
On Mon, Jan 31, 2022 at 02:38:27PM -0500, Michael Meissner wrote: > On Mon, Jan 31, 2022 at 12:52:28PM -0600, Segher Boessenkool wrote: > > Hi! > > > > On Mon, Jan 31, 2022 at 01:49:03PM -0500, Michael Meissner wrote: > > > * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the > > > compiler used to build the current compiler defaults to IEEE > > > 128-bit long double, make that the default for this build. > > > > NAK. The compiler configured the same should behave the same, whatever > > the host compiler does. I've told you this before. > > That is what this patch does. I am open to suggestions on how to set the > defualt. That is the opposite of what your changelog says. I did not even read the code. Segher
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index e5471da4504..f5c089a2a26 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -91,14 +91,22 @@ explicitly redefine TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so those systems will not pick up this default. This needs to be after all of the include files, so that POWERPC_LINUX and POWERPC_FREEBSD are - properly defined. */ + properly defined. + + If we are being built by a compiler that uses IEEE 128-bit as the default + long double and no explicit long double format was selected, then also + default long double to IEEE 128-bit. */ #ifndef TARGET_IEEEQUAD_DEFAULT #if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD) #define TARGET_IEEEQUAD_DEFAULT 1 #else +#ifdef __LONG_DOUBLE_IEEE128__ +#define TARGET_IEEEQUAD_DEFAULT 1 +#else #define TARGET_IEEEQUAD_DEFAULT 0 #endif #endif +#endif /* Don't enable PC-relative addressing if the target does not support it. */ #ifndef PCREL_SUPPORTED_BY_OS