This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS: IEEE 754-2008 NaN encoding features
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: <binutils at sourceware dot org>
- Date: Sat, 08 Dec 2012 10:00:10 +0000
- Subject: Re: [PATCH] MIPS: IEEE 754-2008 NaN encoding features
- References: <alpine.DEB.1.10.1212032223130.21659@tp.orcam.me.uk>
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> Hi,
>
> As many of you have been aware it has been a long practice for software
> using IEEE 754 floating-point arithmetic run on MIPS processors to use an
> encoding of Not-a-Number (NaN) data different to one used by software run
> on other processors. And as of IEEE 754-2008 revision this encoding does
> not follow one recommended in the standard, as specified in section 6.2.1,
> where it is stated that quiet NaNs should have the first bit (d1) of their
> significand set to 1 while signalling NaNs should have that bit set to 0,
> but MIPS software interprets the two bits in the opposite manner.
>
> An upcoming MIPS Architecture revision will provide for processors that
> support the IEEE 754-2008 preferred NaN encoding format. As the two
> formats (further referred to as "legacy NaN" and "2008 NaN") are
> incompatible to each other, tools will have to provide support for the two
> formats to help people avoid using incompatible binary modules. Here is
> the binutils part.
>
> Two new entities have been added to support static and dynamic linking.
> For the former a set of new ELF file attribute values have been defined.
> For the latter a new ELF file header flag has been defined. These changes
> are described in detail below.
But an ELF flag supports static and dynamic linking on its own.
Encoding the same information in the attribute seems redundant,
and makes the implementation a fair bit more complicated.
Richard