This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], PowerPC long double transition patches, v2, Patch #3 (use correct way to get the IEEE 128-bit complex type)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Thu, 21 Jun 2018 16:54:48 -0500
- Subject: Re: [PATCH], PowerPC long double transition patches, v2, Patch #3 (use correct way to get the IEEE 128-bit complex type)
- References: <20180620141505.GA30942@ibm-toto.the-meissners.org> <20180620143810.GC945@ibm-toto.the-meissners.org>
On Wed, Jun 20, 2018 at 10:38:10AM -0400, Michael Meissner wrote:
> This patch fixes the tests that use IEEE 128-bit float complex to use long
> double _Complex on systems where the default is IEEE 128-bit. Due to needing
> to use the same internal type for long double and __float128 (to get the
> mangling correct and make templates work), you can't really use KF or KC
> attributes to get the float128 type when the long double type is IEEE 128-bit.
Which is a problem that needs fixing. Make a separate testcase for that
then, please.
> +#ifndef __LONG_DOUBLE_IEEE128__
> +/* If long double is IBM, we have to use __attribute__ to get to the long
> + double complex type. If long double is IEEE, we can use the standard
> + _Complex type. */
> +typedef _Complex float __attribute__((mode(__KC__))) __cfloat128;
> +#else
> +typedef _Complex long double __cfloat128;
> +#endif
The comment doesn't make much sense. If long double is IBM, the long
double complex mode is ICmode, not KCmode. "To get the IEEE128 complex
type", perhaps? And can't you do _Complex __ieee128 or such?
Segher