[PATCH] aarch64 sim bug fix for fcmp and infinity

Jim Wilson jim.wilson@linaro.org
Mon Dec 19 03:12:00 GMT 2016

Debugging another gcc testsuite failure, I see that fcmp can fail when
both operands are infinities.  The code tries to compute the compare
result by subtracting operands, but this can yield NaN when both
operands are inifinities.  This is fixed by explicitly checking for
and handling this case.

While writing the tescase, I noticed that qNan and sNan are not
handled correctly, but this appears to be broken in more than just the
compare instructions, so I just added comments to document the problem
and will leave it to a later patch to fix.

The new testcase fails without the patch, and works with the patch.
Also, the gcc C testsuite unexpected failures drop  from 2627 to 2568.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-sim-fcmp.patch
Type: text/x-patch
Size: 4240 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20161219/9c7a8c8f/attachment.bin>

More information about the Gdb-patches mailing list