[fpc-devel] Broken frac functionin FPC3.1.1 / Windows x86_64
J. Gareth Moreton
gareth at moreton-family.com
Thu May 3 03:35:35 CEST 2018
I've been having difficulties disabling floating-point and SSE exceptions.
Either the exceptions are still raised, or an exception is raised
elsewhere... sometimes within the function, and in one instance, in the
WriteLn routine! Does anyone have any advice as to how to get around this
and properly disable the exceptions? I haven't had much luck with
SetExceptionMask or Set8087CW so far.
Outside of that, manual data flow analysis shows that XMM0 is invariant up
until the point that SUBSD is called, which is the operation that raises an
exception if XMM0 contains plus or minus infinity. Logically, being the
last operation in the function, if SUBSD doesn't do anything if exceptions
are suppressed, then XMM0 will still contain plus or minus infinity and
this will be the return value; unusual for a function that returns x where
-1 < x < 1, but considering infinity is an abnormal value to pass, this is
sort of permissible, I think.
On Wed 02/05/18 10:16 , "J. Gareth Moreton" gareth at moreton-family.com
On Wed 02/05/18 06:55 , Sven Barth pascaldragon at googlemail.com sent:
Thank you for the work so far. Does it also work correctly when
exceptions are disabled?
I confess I haven't tested that - I know it involves setting the FPU
control word, but what should I expect?
Gareth aka. Kit _______________________________________________
fpc-devel maillist - fpc-devel at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel