delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/08/01/07:50:12

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; q=dns; s=default; b=PBoDweinpXcgpGoibAJA
ceQQUv1wOwozr+8N51437vpREQTLSMwKcRuGba09EPYHGyp9WhhiGn2J6yb46xrH
+T8Wd1+BVk1Fdz7wDugcoavkoyR3+Ii6FrN9uBJqAikq/22qIsgVFGK0YqK0RY7P
wUt1b4kn38Vjbq2Y+JhPAMM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; s=default; bh=16iNk9qYcvaCDpU8etgX82WYh8
s=; b=EcXVYA+xH09I24nUxyOoAmiInGfY7ggN7XCml9nC4QAjzSelIIHjQSKeDm
CZnn+sCKrUu54sCyYGavs6HyesyjPAH8s1AYC3gwtvnL1WSk2WpZMYnhMaWzZ/QS
LzKJGrdPPAbnOEHwt3Fh5b0qciSBFC/Oo1EWX8kps5P61XnJA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=cygwin-patches, cygwinpatches, houder, Houder
X-HELO: lb1-smtp-cloud9.xs4all.net
MIME-Version: 1.0
Date: Wed, 01 Aug 2018 13:49:14 +0200
From: Houder <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
Subject: Re: x86_64: floating-point environment (i.e. fenv.h). BUG.
In-Reply-To: <20180801110009.GA30124@calimero.vinschen.de>
References: <3a882a7d38c52dc5a14d176f30f8340e AT xs4all DOT nl> <20180801110009 DOT GA30124 AT calimero DOT vinschen DOT de>
Message-ID: <4438ec88ad4e6965281be138d93ba45d@xs4all.nl>
X-Sender: houder AT xs4all DOT nl
User-Agent: XS4ALL Webmail
X-IsSubscribed: yes

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) ).

Regards,

Henri

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019