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] Fix PR target/6540


On Thu, May 02, 2002 at 11:00:05AM -0700, David S. Miller wrote:
>    From: Jakub Jelinek <jakub@redhat.com>
>    Date: Thu, 2 May 2002 19:59:48 +0200
> 
>    I couldn't find the start of "solaris2 float.h/limits.h conflict"
>    threads from early 1999 which would explain why exactly float_format=none
>    was used, but definitely using float_format=sparc instead of it on Solaris
>    is very wrong, since it has 128-bit long double even in 32-bit ABI.
>    And if float_format=sparc works on Solaris -m64, then float_format=i128
>    surely will (since the files are the same for 64-bit; and should work in
>    -m32 too).
>    While at it, I noticed float-sparc.h is wrong if -mlong-double-128 is used
>    on sparc-linux.
> 
> Heh, I was working on an independant solution.
> 
> I believe that the problem is even more deeply rooted in
> the Sparc backend.  Look at how many platforms get the
> long double size thing work.  Some specify the -mlong-double-*
> options in SUBTARGET_SWITCHES, but don't define the
> __LONG_DOUBLE_128__ CPP define properly.  FreeBSD is one
> such platform.

IMHO FreeBSD should just use long double 128-bit for both
32-bit and 64-bit, being a new port (to avoid all the hassle e.g.
sparc-linux will have in glibc 2.3).

> Once I started noticing this, I decided that the real solution
> is to put all of this -mlong-double-* + -D__LONG_DOUBLE_128__
> + -D__LONG_DOUBLE_64__ machinery into sparc.h and be done with
> it.
> 
> Then float-sparc.h just tests __LONG_DOUBLE_*__ macros and we
> make every Sparc use float-sparc.h from your changes.
> 
> What do you guys think?  I almost have the patch done.

But if e.g. Solaris (and hopefully FreeBSD) defines __LONG_DOUBLE_128__
unconditionally, why shouldn't it use float-i128.h then?

	Jakub


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