This is the mail archive of the
mailing list for the GCC project.
Re: rs6000 LDBL_MAX converts to infinity
> Date: Thu, 4 Mar 2004 16:30:24 +1030
> From: Alan Modra <firstname.lastname@example.org>
> On Wed, Mar 03, 2004 at 01:53:09PM -0800, Geoff Keating wrote:
> > I believe that the answer to this particular one is to change
> > LDBL_MAX; it should always be the case that the high part is the sum
> > of the high and low parts in round-to-nearest mode.
> The value I'm using here is 0x1.fffffffffffff7ffffffffffff8p1023
> converted to decimal exactly as builtin_define_float_constants does.
> It's slightly different to the value reported by Richard for SGI's
> float.h. I did check that it converts back to sensible asm. :)
> * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Set __LDBL_MAX__.
> * real.c (encode_ibm_extended): Don't bother rounding low double.
Shouldn't the first part also be a patch to real.c?
The second part looks right to me but should really leave a comment in
the code saying why the value is already rounded.
- Geoffrey Keating <email@example.com>