Fix i386 FP_TRAPPING_EXCEPTIONS

Uros Bizjak ubizjak@gmail.com
Thu Sep 18 10:09:00 GMT 2014


On Wed, Sep 17, 2014 at 9:47 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> The i386 sfp-machine.h defines FP_TRAPPING_EXCEPTIONS in a way that is
> always wrong: it treats a set bit as indicating the exception is
> trapping, when actually a set bit (both for 387 and SSE floating
> point) indicates it is masked, and a clear bit indicates it is
> trapping.  This patch fixes this bug.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
> commit?
>
> Note to ia64 maintainers: it would be a good idea to add a definition
> of FP_TRAPPING_EXCEPTIONS for ia64, and I expect the new test to fail
> on ia64 until you do so.
>
> libgcc:
> 2014-09-17  Joseph Myers  <joseph@codesourcery.com>
>
>         * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
>         bits not set bits as indicating trapping exceptions.
>
> gcc/testsuite:
> 2014-09-17  Joseph Myers  <joseph@codesourcery.com>
>
>         * gcc.dg/torture/float128-exact-underflow.c: New test.

My brown paperbag bug :(

OK for mainline and release branches.

Thanks,
Uros.



More information about the Gcc-patches mailing list