This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]