public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/cygwin-3_4-branch] Cygwin: fix return value of ilogbl(NaN)
Date: Tue, 18 Apr 2023 11:54:29 +0000 (GMT)	[thread overview]
Message-ID: <20230418115429.6C2BD3858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f87469dd5bcae461bd9fe4da4ee4958ecf353749

commit f87469dd5bcae461bd9fe4da4ee4958ecf353749
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Tue Apr 18 13:43:06 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Tue Apr 18 13:43:31 2023 +0200

    Cygwin: fix return value of ilogbl(NaN)
    
    Fixes: 792e51b72149 ("Add missing long double functions to Cygwin")
    Reported-by: Bruno Haible <bruno@clisp.org>
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/math/ilogbl.S | 4 ++++
 winsup/cygwin/release/3.4.7 | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/winsup/cygwin/math/ilogbl.S b/winsup/cygwin/math/ilogbl.S
index a4fe503adcaf..c75a7d0fde9d 100644
--- a/winsup/cygwin/math/ilogbl.S
+++ b/winsup/cygwin/math/ilogbl.S
@@ -23,6 +23,8 @@ __MINGW_USYMBOL(ilogbl):
 	andb    %ah, %dh
 	cmpb    $0x05, %dh
 	je      1f		/* Is +-Inf, jump.  */
+	cmpb	$0x01, %dh
+	je      1f		/* Is +-Inf, jump.  */
 	cmpb	$0x40, %dh
 	je	2f		/* Is +-Inf, jump.  */
 
@@ -53,6 +55,8 @@ __MINGW_USYMBOL(ilogbl):
 	andb    %ah, %dh
 	cmpb    $0x05, %dh
 	je      1f		/* Is +-Inf, jump.  */
+	cmpb	$0x01, %dh
+	je      1f		/* Is +-Inf, jump.  */
 	cmpb	$0x40, %dh
 	je	2f		/* Is +-Inf, jump.  */
 
diff --git a/winsup/cygwin/release/3.4.7 b/winsup/cygwin/release/3.4.7
index 1186e57f5977..8ecfbc30a24b 100644
--- a/winsup/cygwin/release/3.4.7
+++ b/winsup/cygwin/release/3.4.7
@@ -15,3 +15,6 @@ Bug Fixes
 
 - Fix bug in cygheap allocation size computation after fork.  Addresses:
   https://cygwin.com/pipermail/cygwin-developers/2023-April/012620.html
+
+- Fix return value of ilogbl(NaN).
+  Addresses: https://cygwin.com/pipermail/cygwin/2023-April/253511.html

                 reply	other threads:[~2023-04-18 11:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230418115429.6C2BD3858D1E@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).