public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: GCC <gcc@gcc.gnu.org>,
	Michael Meissner <meissner@linux.vnet.ibm.com>,
	       "'Segher Boessenkool" <segher@kernel.crashing.org>,
	       "' 'David Edelsohn" <dje.gcc@gmail.com>,
	       "' 'Bill Schmidt" <wschmidt@linux.vnet.ibm.com>,
	       '@ibm-tiger.the-meissners.org
Subject: Re: IEEE 128-bit floating point support for PowerPC RTEMS
Date: Mon, 27 Feb 2017 23:40:00 -0000	[thread overview]
Message-ID: <20170227234004.GA24698@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <58872AA7.2080006@embedded-brains.de>

On Tue, Jan 24, 2017 at 11:21:27AM +0100, Sebastian Huber wrote:
> Hello,
> 
> some time ago IEEE 128-bit floating point support for PowerPC was
> added to GCC:
> 
> https://gcc.gnu.org/wiki/Ieee128PowerPC
> 
> 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:
> /home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:72:1:
> 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:
https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00861.html

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: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

       reply	other threads:[~2017-02-27 23:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <58872AA7.2080006@embedded-brains.de>
2017-02-27 23:40 ` Michael Meissner [this message]
2017-01-24 10:34 Sebastian Huber
2017-01-24 16:57 ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170227234004.GA24698@ibm-tiger.the-meissners.org \
    --to=meissner@linux.vnet.ibm.com \
    --cc='@ibm-tiger.the-meissners.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=sebastian.huber@embedded-brains.de \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).