From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8915 invoked by alias); 17 Dec 2019 11:04:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8900 invoked by uid 89); 17 Dec 2019 11:04:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (85.215.255.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2019 11:04:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1576580681; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=9HME9BETRmTs0hKBgSVf84O40AFV/j6ZYUldTGQXXy4=; b=m42zNNf05AJEhCDY1UBNm8sj5JUXlwBetnZhYZBoYvbfRzE0RmnI4GQ+FzsvC3A3Wf MGPuEXW8j9BdyY7pb9Y7RI0EKNSvfOgYRZ5xje3t+FYRdmyzBBS4uSiALnAl4K88274M fiyq6gD1rBBqumyEjS4PTf3PN46xxiaKVGwnY09R/UnhBC2V9aQ1pC0iJbpsvQ0fX7Cu Ie34AVb/wH9WRzP9N2NYIi2mlT9pLfnXBXEIbGJYPU4xNru1f3Il3zhXifAsQthfj7Bz t+/86qeYZRhkTG2YV12vwLCYQTNOOI2iy0INeYZWx9M4JFVw9q6vG0IaBQPsw+aIYHru Ux3Q== Received: from bruno.haible.de by smtp.strato.de (RZmta 46.0.7 DYNA|AUTH) with ESMTPSA id z0a7bbvBHB4e00Z (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 17 Dec 2019 12:04:40 +0100 (CET) From: Bruno Haible To: cygwin@cygwin.com, Corinna Vinschen Cc: Corinna Vinschen Subject: Re: ilogbl(0.0L) value is wrong Date: Tue, 17 Dec 2019 14:04:00 -0000 Message-ID: <1754103.YWv04siWQO@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20191216100122.GM10310@calimero.vinschen.de> References: <2040599.24iSPLvMXZ@omega> <20191216100122.GM10310@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart12332903.bQUd7PJCA0" Content-Transfer-Encoding: 7Bit X-SW-Source: 2019-12/txt/msg00136.txt.bz2 --nextPart12332903.bQUd7PJCA0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 312 Hi Corinna, > I pushed this patch: > > https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=29ba52da9553 > > Please test the latest developer snapshot from https://cygwin.com/snapshots/ I can't test it easily. But the code looks good; only the comments could be improved; patch attached. Bruno --nextPart12332903.bQUd7PJCA0 Content-Disposition: attachment; filename="ilogbl-comment.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="ilogbl-comment.diff" Content-length: 1011 diff --git a/winsup/cygwin/math/ilogbl.S b/winsup/cygwin/math/ilogbl.S index a4fe503..e4a2660 100644 --- a/winsup/cygwin/math/ilogbl.S +++ b/winsup/cygwin/math/ilogbl.S @@ -17,14 +17,14 @@ __MINGW_USYMBOL(ilogbl): #ifdef __x86_64__ fldt (%rcx) - fxam /* Is NaN or +-Inf? */ + fxam /* Is NaN or +-Inf or +-0? */ fstsw %ax movb $0x45, %dh andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ cmpb $0x40, %dh - je 2f /* Is +-Inf, jump. */ + je 2f /* Is +-0, jump. */ fxtract pushq %rax @@ -47,14 +47,14 @@ __MINGW_USYMBOL(ilogbl): /* I added the following ugly construct because ilogb(+-Inf) is required to return INT_MAX in ISO C99. -- jakub@redhat.com. */ - fxam /* Is NaN or +-Inf? */ + fxam /* Is NaN or +-Inf or +-0? */ fstsw %ax movb $0x45, %dh andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ cmpb $0x40, %dh - je 2f /* Is +-Inf, jump. */ + je 2f /* Is +-0, jump. */ fxtract pushl %eax --nextPart12332903.bQUd7PJCA0 Content-Type: text/plain; charset=us-ascii Content-length: 219 -- 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 --nextPart12332903.bQUd7PJCA0--