On 2018-08-01 13:00, Corinna Vinschen wrote:
On Aug 1 12:22, Houder wrote:
Hi Corinna,
Short version of my report (as there is more to say about the
implementation
of
"fenv") in Cygwin; this time I restrict myself to a bug in fegetenv()
).
(Note to myself: attach STC)
I am reporting a bug in fegetenv() in winsup/cygwin/fenv.cc. There is
no
hurry
in repairing this bug, as "fenv" is hardly ever (never?) used by
anyone.
fegetenv() should be modified as follows:
from:
__asm__ volatile ("fnstenv %0" : "=m" (envp->_fpu) : );
if (use_sse)
__asm__ volatile ("stmxcsr %0" : "=m" (envp->_sse_mxcsr) : );
return 0
to:
// Henri: copying glibc ...
__asm__ volatile ("fnstenv %0\n"
"fldenv %0" : "=m" (envp->_fpu) : );
if (use_sse)
__asm__ volatile ("stmxcsr %0" : "=m" (envp->_sse_mxcsr) : );
return 0;
Since you know how to fix things, please just send patches to
the cygwin-patches ML.
Ah ... Agreed. However, as I am not set up for building (anymore), this
will take some time ... (not even git is installed).
(yes, I did verify the above modification (and more), however I did
that
"locally" (basically, I included winsup/cygwin/fenv.cc in my STC) ).