x86_64: floating-point environment (i.e. fenv.h). BUG.

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Aug 1 11:00:00 GMT 2018


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.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20180801/852ddd30/attachment.sig>


More information about the Cygwin mailing list