This is the mail archive of the
mailing list for the GCC project.
Re: "Fix" recent povray failure with -mfpmath=sse -ffast-math
- From: Uros Bizjak <uros at kss-loka dot si>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 10:06:15 +0100
- Subject: Re: "Fix" recent povray failure with -mfpmath=sse -ffast-math
- References: <41EBF627.firstname.lastname@example.org> <20050118055353.GC7374@redhat.com>
Richard Henderson wrote:
comis? instructions generate an INVALID OPERATION exception if they
encounter a NaN. I have added a _MM_SET_EXCEPTION_MASK (0x1f00) after
povray_init() to catch unordered compares, but there were no exceptions
(and the rendered picture was still wrong).
But the fact remains that either the current mechanism or the
test above really ought to be valid when there are no NaNs in
the program. I can only assume from this that PovRay actually
does generate or consume NaNs, and that using -ffast-math is
in fact invalid.
But we can't know for sure without a reduced test case.
PS: It would probably behoove PovRay to unmask floating point exceptions
such that if a NaN is generated we get a SIGFPE instead of silently doing
the wrong thing.
Is it possible that the problem is in PR 19496?