This is the mail archive of the
mailing list for the GCC project.
Re: rs6000 LDBL_MAX converts to infinity
On Wed, Mar 03, 2004 at 10:42:44PM -0800, Geoff Keating wrote:
> > Date: Thu, 4 Mar 2004 16:30:24 +1030
> > From: Alan Modra <firstname.lastname@example.org>
> > * 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?
You mean c-cppbuiltins.c:builtin_define_float_constants, presumably,
possibly with some supporting changes to struct real_format. Hmm, I
could detect ibm (and mips) format long doubles by looking at fmt->p
and fmt->pnan. IBM format is the only one where they differ, and
fmt->pnan conveniently specifies the bit we need to zero. Is that
> 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>
IBM OzLabs - Linux Technology Centre