This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point]
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 1 Jun 2005 15:29:37 +0930
- Subject: Re: What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point]
- References: <20050531134304.GV3541@ay.vinc17.org> <F0245EEA-D1F4-11D9-BF7B-003065BDF310@apple.com> <20050531172543.GB3541@ay.vinc17.org> <E998A339-4F17-4ECB-B3D8-489FF362E9DD@apple.com> <20050531195305.GD3541@ay.vinc17.org>
On Tue, May 31, 2005 at 09:53:05PM +0200, Vincent Lefevre wrote:
> On 2005-05-31 11:39:39 -0700, Mike Stump wrote:
> > On May 31, 2005, at 10:25 AM, Vincent Lefevre wrote:
> > >Well, there is no extended precision with GCC under Linux/PPC.
> >
> > Hum, I do wonder about even that; why do:
> >
> > 2004-02-07 Alan Modra <amodra@bigpond.net.au>
> >
> > * config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Add darwin-
> > ldouble.c.
> >
> > powerpc64-*-linux*)
>
> Hmm... this is powerpc64.
Yes. powerpc64-linux uses IBM extended precision long doubles.
> Under the 32-bit version, there's no extended precision.
No. powerpc-linux has 128-bit IEEE soft-float long double.
$ cat > fadd.c <<\EOF
long double fadd (long double a, long double b) { return a + b; }
EOF
$ gcc -m32 -mlong-double-128 -c fadd.c
$ nm fadd.o
00000000 T fadd
U _q_add
Now all you need is a library that supplies _q_add and similar. Let's
see, glibc is a likely place..
./sysdeps/powerpc/soft-fp/Makefile:powerpc-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge \
./sysdeps/powerpc/soft-fp/Versions: _q_add; _q_cmp; _q_cmpe; _q_div; _q_dtoq; _q_feq; _q_fge; _q_fgt;
./sysdeps/powerpc/soft-fp/q_add.c:long double _q_add(const long double a, const long double b)
Then of course, you need to convince glibc to build them for you.
--
Alan Modra
IBM OzLabs - Linux Technology Centre