From patchwork Fri Dec 18 04:03:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 41472 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E4A1E3899078; Fri, 18 Dec 2020 04:03:43 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by sourceware.org (Postfix) with ESMTPS id 718003858021; Fri, 18 Dec 2020 04:03:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 718003858021 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CA16A101457; Fri, 18 Dec 2020 04:03:35 +0000 (UTC) Received: from pdx1-sub0-mail-a52.g.dreamhost.com (100-96-27-97.trex.outbound.svc.cluster.local [100.96.27.97]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 392E5101778; Fri, 18 Dec 2020 04:03:35 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a52.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.11); Fri, 18 Dec 2020 04:03:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Average-Fearful: 57eb9e166ad5064b_1608264215516_712047578 X-MC-Loop-Signature: 1608264215516:3555634263 X-MC-Ingress-Time: 1608264215516 Received: from pdx1-sub0-mail-a52.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a52.g.dreamhost.com (Postfix) with ESMTP id D7D8481A46; Thu, 17 Dec 2020 20:03:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :cc:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=J5AQjY +1bXcfbhgEkeFWFsZCrNo=; b=QDLjpFZAqrx+3rbiVijwyePuG6g7rcTjZ5wfFf L3JIjS7+W9WxxjeHgJLjbfgEd5b+c9rzkX/xBnKor8Hm4Pd13T31Id4DTCJ3YGgW UzbEX2tRHK+VQAuCLBgoScU46Gy2D2Gj/h/tKMk18z1pdad8k+E7nGjdSnbpaOF9 CzDmQ= Received: from [192.168.1.111] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a52.g.dreamhost.com (Postfix) with ESMTPSA id DCF7E81A1C; Thu, 17 Dec 2020 20:03:30 -0800 (PST) Subject: [PING][PATCH 0/5] x86 pseudo-normal numbers To: Siddhesh Poyarekar , libc-alpha@sourceware.org References: <20201215141339.2684384-1-siddhesh@sourceware.org> X-DH-BACKEND: pdx1-sub0-mail-a52 From: Siddhesh Poyarekar Message-ID: Date: Fri, 18 Dec 2020 09:33:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201215141339.2684384-1-siddhesh@sourceware.org> Content-Language: en-US X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fweimer@redhat.com, joseph@codesourcery.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Ping! I have made the changes to 3/5 and am waiting for reviews for the rest of the patches before posting a v2, in case more changes are needed. It would be really nice to get this in before the freeze deadline. Siddhesh On 12/15/20 7:43 PM, Siddhesh Poyarekar via Libc-alpha wrote: > Hi, > > Following is the patchset that harmonizes classification of > pseudo-normal numbers with gcc. Pseudo-NaNs, Pseudo-Infinities and > unnormal numbers are considered as signaling NaN as per classification > since that is how they behave when used as operands in x86. > > Pseudo-denormal numbers are not catered for in this patch. The x86 CPU > supposedly treats these numbers as denormals, but both gcc and glibc > currently treat them as normals. > > In summary, the patchset does the following: > > - Update fpclassify to cater for pseudo-normal numbers > - Consolidate isnanl so that it can be used by isnanl as well as > issignalingl. > - Update isnanl logic to return true for all pseudo-normal numbers > - Add an x86-specific issignalingl that returns true for all > pseudo-normals. > > Siddhesh Poyarekar (5): > x86 long double: Support pseudo numbers in fpclassifyl > x86 long double: Support pseudo numbers in isnanl > Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 > x86 long double: Consider pseudo numbers as signaling > x86 long double: Add tests for pseudo normal numbers > > sysdeps/i386/fpu/s_fpclassifyl.c | 4 + > sysdeps/i386/fpu/s_isnanl.c | 10 +- > sysdeps/ieee754/ldbl-96/s_issignalingl.c | 2 - > sysdeps/x86/fpu/Makefile | 3 +- > sysdeps/x86/fpu/isnanl_common.h | 32 ++++ > sysdeps/x86/fpu/s_issignalingl.c | 39 +++++ > sysdeps/x86/fpu/test-unnormal.c | 196 +++++++++++++++++++++++ > sysdeps/x86/ldbl2mpn.c | 8 - > 8 files changed, 275 insertions(+), 19 deletions(-) > create mode 100644 sysdeps/x86/fpu/isnanl_common.h > create mode 100644 sysdeps/x86/fpu/s_issignalingl.c > create mode 100644 sysdeps/x86/fpu/test-unnormal.c >