This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, PR59833]: Fix sNaN handling in ARM float to double conversion
On 2016-07-20 10:10, Ramana Radhakrishnan wrote:
> On Wed, Jul 20, 2016 at 8:48 AM, Aurelien Jarno <email@example.com> wrote:
> > On ARM soft-float, the float to double conversion doesn't convert a sNaN
> > to qNaN as the IEEE Std 754 standard mandates:
> > "Under default exception handling, any operation signaling an invalid
> > operation exception and for which a floating-point result is to be
> > delivered shall deliver a quiet NaN."
> > Given the soft float ARM code ignores exceptions and always provides a
> > result, a float to double conversion of a signaling NaN should return a
> > quiet NaN. Fix this in extendsfdf2.
> > gcc/ChangeLog:
> > PR target/59833
> > * config/arm/ieee754-df.S (extendsfdf2): Convert sNaN to qNaN.
> > gcc/testsuite/ChangeLog:
> > * gcc.dg/pr59833.c: New testcase.
> Ok - assuming this was tested appropriately with no regressions.
Given it only touches arm code, I only tested it on arm and I have seen
no regression. That said I wouldn't be surprised if the new testcase
fails on some other architectures.
Also I have done the copyright assignment for GCC, but I do not have SVN
write access. Could someone please commit this for me?
Aurelien Jarno GPG: 4096R/1DDD8C9B