This is the mail archive of the
mailing list for the GCC project.
Re: IEEE 128-bit floating point support for PowerPC RTEMS
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: GCC <gcc at gcc dot gnu dot org>, Michael Meissner <meissner at linux dot vnet dot ibm dot com>, "'Segher Boessenkool" <segher at kernel dot crashing dot org>, "' 'David Edelsohn" <dje dot gcc at gmail dot com>, "' 'Bill Schmidt" <wschmidt at linux dot vnet dot ibm dot com>, '@ibm-tiger.the-meissners.org
- Date: Mon, 27 Feb 2017 18:40:04 -0500
- Subject: Re: IEEE 128-bit floating point support for PowerPC RTEMS
- Authentication-results: sourceware.org; auth=none
- References: <58872AA7.firstname.lastname@example.org>
On Tue, Jan 24, 2017 at 11:21:27AM +0100, Sebastian Huber wrote:
> some time ago IEEE 128-bit floating point support for PowerPC was
> added to GCC:
> I noticed some issues for RTEMS in this area. Firstly, RTEMS had no
> __powerpc__ builtin define, so some source files were effectively
> disabled, e.g. ibm-ldouble.c. With __powerpc__ defined, the
> ibm-ldouble.c didn't compile due to:
> In file included from /home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:374:0:
> error: unable to emulate 'TF'
> typedef float TFtype __attribute__ ((mode (TF)));
> I added
> #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
> #undef TARGET_IEEEQUAD
> #define TARGET_IEEEQUAD 1
> This fixed the problem above and changes the long double type from 8
> bytes to 16 bytes.
> The new compiler defines now (powerpc-rtems target):
> #define __LONG_DOUBLE_128__ 1
> #define __LONGDOUBLE128 1
> #define __LONG_DOUBLE_IEEE128__ 1
> However, the libgcc multilib build fails due to several ICEs. See
> attached errors.log.
> Is this supposed to work for 32-bit PowerPC. Did I miss some magic
> configuration switch?
Please check this patch:
It has fixes for building on a 32-bit systems and non-VSX systems.
Now, when I did the initial float128 work, as far as I could tell, long double
was not enabled to be 128-bits on RTEMS.
If it is now enabled, there may be gotchas, since RTEMS would be the only
PowerPC system to use 128-bit floating point and use IEEE 128-bit instead of
IBM double-double that the other PowerPC systems currently use.
So it may be your call whether you want to enable it, and get it to work, or
default back to long double == double.
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: email@example.com, phone: +1 (978) 899-4797