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:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=eLod13zHz3BcFArS+nErS/D6Ut1B5MhIX+T0HL9HtcI oVgkP3vyUeW3lvDTHBtN/OoheMFTj/z4OGDNAS9XJ+QW0xhyCu3mP8cKGKjIPW68 X+okeVAbAGwtbVMjUNPmiI+cyUT2M7Y1ibEyztwi4cnvIwBh4Rr9VBixPaqShmF0 = 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:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=vL0z+vOJfFBqHakK9KiP9gJDPDI=; b=KGTgbCZaYgLkwQ/B9 x//GlbM32XkoYfdfCjGiX9X3mnG5J4Jw9JiXdpEzxwv5XVOdzvvTm7whcSozfLPF FCuIjN7j32uDbcThbdBeRDbSQCYxpiJEwU7RkNNoOO1oPP+mf0rjetqziBCjkHZv QteqI2iVyKD/Icf82pMA3EcdgU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-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 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== From: Bruno Haible To: cygwin AT cygwin DOT com, Corinna Vinschen Cc: Corinna Vinschen Subject: Re: ilogbl(0.0L) value is wrong Date: Tue, 17 Dec 2019 12:04:39 +0100 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 DOT 24iSPLvMXZ AT omega> <20191216100122 DOT GM10310 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart12332903.bQUd7PJCA0" Content-Transfer-Encoding: 7Bit --nextPart12332903.bQUd7PJCA0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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 AT redhat DOT 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 -- 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--