This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] define WIDEST_HARDWARE_FP_SIZE on mips



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]