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

paul.robinson@sony.com paul.robinson
Tue Jan 25 00:21:04 GMT 2022

+ John Reagan who can (I hope) speak to the choice of using different
ATE codes for distinguishing VAX/IEEE floats in OpenVMS.

> -----Original Message-----
> From: Dwarf-Discuss <dwarf-discuss-bounces at lists.dwarfstd.org> On Behalf
> Of Jakub Jelinek via Dwarf-Discuss
> Sent: Monday, January 24, 2022 5:17 PM
> To: Jason Merrill <jason at redhat.com>
> Cc: DWARF Discuss <dwarf-discuss at lists.dwarfstd.org>
> Subject: Re: [Dwarf-Discuss] Multiple floating point types with the same
> size but different encodings
> On Mon, Jan 24, 2022 at 04:52:38PM -0500, Jason Merrill wrote:
> > DW_ATE seems natural, since that's how we express the encoding of a base
> > type.  OTOH, using DW_AT_precision would parallel DW_AT_digit_count for
> > fixed-point encodings.  My concern is that it would be possible to have
> > multiple alternative encodings with the same precision, but perhaps
> that's
> > not sufficiently likely?
> Guess advantage of a special DW_ATE_* for it is that it is smaller,
> DW_AT_encoding has to be specified either way, while we have
> DW_FORM_implicit_const, that will take something at least in
> .debug_abbrev.
> The types we see used together right now (i.e. this double double vs.
> quad IEEE or float16 vs. bfloat16) do differ in precisions.
> There are some differences in some cases even with the same precision,
> e.g. in NaNs (mips vs. rest), but those don't appear together, or the
> VAX floats (but I think on a VAX one will see only those 3 floats there
> and they have different precisions too (24, 53 and 56)).
> The special DW_ATE_* values would need to be in the user range though,
> while DW_AT_precision could be something explained in DWARF6.
> 	Jakub

More information about the Dwarf-discuss mailing list