[PATCH] define WIDEST_HARDWARE_FP_SIZE on mips
Geert Bosch
bosch@adacore.com
Wed Mar 4 21:13:00 GMT 2009
On Mar 4, 2009, at 15:24, Richard Sandiford wrote:
> Geert said:
>
> The Ada standard requires support for the widest hardware floating
> point
> format provided by the hardware. This type can be accessed by
> declaring
> your type as "type My_Float is digits System.Max_Digits". Various
> routines for printing and type conversions use this type as well.
>
> Ada does not allow a "type My_Float is digits X" where X >
> System.Max_Digits, [...]
>
> so how does that apply to systems that don't have hardware floating
> point?
This falls outside the language standard. The only requirement is that
if Long_Float
is predefined, it is at least 11 digits (corresponds to double
precision).
The interesting case is indeed when single precision floating-point is
implemented
in hardware, while double precision is emulated.
As I indicated earlier, I think WIDEST_HARDWARE_FP_SIZE should indeed
reflect the truth
(so, should be 0 for software float, or 32 if only single precision is
supported in HW).
For Ada, we'll then replace uses of WIDEST_HARDWARE_FP_SIZE with an
expression that takes
the maximum of long_float_type_size and WIDEST_HARDWARE_FP_SIZE for
the size of Long_Long_Float.
-Geert
More information about the Gcc-patches
mailing list