This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH], PowerPC long double transition patches, v2, Patch #3 (use correct way to get the IEEE 128-bit complex type)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]