[Dwarf-Discuss] [EXTERNAL] - RE: Multiple floating point types with the same size but different encodings

Jakub Jelinek jakub@redhat.com
Tue Jan 25 12:09:36 GMT 2022


On Mon, Jan 24, 2022 at 09:43:07PM -0500, John Reagan wrote:
> Yes, on OpenVMS we have 2 32-bit floats (VAX f_float, IEEE s_float), 3
> 64-bit floats (VAX d_float, VAX g_float, IEEE t_float), and 1 128-bit
> float (IEEE x_float).  We had a 2nd 128-bit float back on the VAX but we
> don't support that anymore.
> 
> Our current encoding on OpenVMS Itanium:
> 
> DW_ATE_Float: s_float (size 4), t_float (byte size 8), x_float (byte
> size 16)
> 
> DW_ATE_complex_float: s_float complex, t_float complex, x_float complex
> 
> DW_ATE_HP_VAX_float [0x88]: f_float (byte size 4), g_float (byte size 8)
> 
> DW_ATE_HP_VAX_float_d [0x89]: d_float (byte size 8)
> 
> DW_ATE_VAX_complex_float [0x8f]: f_float complex, g_float complex
> 
> DW_ATE_VAX_complex_float [0x90]: d_float complex
> 
> For choice, I'd guess that Ron might have more history as the comments
> on the code also say that HP-UX and NSK used the same codes too.  So I
> don't know if OpenVMS was the first user or if OpenVMS inherited it.

If s_float and f_float or t_float and g_float coexist on the same platform
in the same ABI, I'm afraid DW_AT_precision to distinguish between them,
IEEE single has 24-bit significand precision (1 bit implied) and
it seems s_float does too, and similarly IEEE double has 53-bit precision
(1 bit implied) and it seems g_gloat does too (d_float has 56-bit
precision).
So we'd need also exponent bias (or minimum or maximum exponent)
to differentiate between them.

	Jakub




More information about the Dwarf-discuss mailing list