https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113993

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Jakub Jelinek from comment #3)
> > Created attachment 57467 [details]
> > gcc14-pr113993-wip.patch
> > 
> > WIP patch.
> 
> I know this might be a stupid question but I notice this handles 96 and
> 128bit but not double double support. Or the fall back to the double enough
> for that?

As documented, it can be conservatively smaller.  I've left out e.g. the
motorola extended (which has exponent range -16382 to 16384 rather than -16381
to 16384 like
intel extended or IEEE quad has) and the *BSD Intel as well, though I bet
unnecessarily.  Seems all the get_no_error_domain stuff actually only cares
about is the maximum exponent (which is why all the Intel extended long double
domains are the same as IEEE quad).  So, maybe I should simplify it by doing
(for whatever being long_double or float64x):
if (REAL_MODE_FORMAT (TYPE_MODE (whatever_type_node))->emax == 16384)
  return get_no_error_domain (BUILT_IN_WHATEVERF128);
return get_no_error_domain (BUILT_IN_WHATEVERF64);
Anyway, given that ibm extended has emax 1024 like double (obviously it can't
have higher exponent than double), the double versions are actually exact, not
conservatively correct.

Reply via email to