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  <[EMAIL PROTECTED]>
> > 
> >         * 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

Reply via email to