From patchwork Tue Dec 15 14:13:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 41395 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 3EC58386EC3A; Tue, 15 Dec 2020 14:14:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EC58386EC3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608041657; bh=PZukCgxQci5nN1lLLCQpHh84TjrU4YuwtaikI0VDwiw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=dPBD8/y6kwj/UB3j+mr2lw/T3HVfvxvHEUjnJ8lTHeIfZQNysusrJvhtHi+1kwZrt Z7aX4Wxy8krtkFoTDquo/Gl6+jFTQv66fbrJJ4s68prjewK192Ah12WKAUwMXL9oaD OZfY2Y4RTkgQeop1eABwcYwuMS08S180e/2ajywk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bird.elm.relay.mailchannels.net (bird.elm.relay.mailchannels.net [23.83.212.17]) by sourceware.org (Postfix) with ESMTPS id BCCD1386EC3A for ; Tue, 15 Dec 2020 14:14:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BCCD1386EC3A 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 18253341C30; Tue, 15 Dec 2020 14:14:13 +0000 (UTC) Received: from pdx1-sub0-mail-a35.g.dreamhost.com (100-96-12-130.trex.outbound.svc.cluster.local [100.96.12.130]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5CBCD341AB4; Tue, 15 Dec 2020 14:14:12 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a35.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); Tue, 15 Dec 2020 14:14:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Abiding-Tank: 508f09b831911985_1608041652622_1660292938 X-MC-Loop-Signature: 1608041652622:1385650132 X-MC-Ingress-Time: 1608041652622 Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id D0A477E63B; Tue, 15 Dec 2020 06:14:11 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTPSA id BE0547F4E0; Tue, 15 Dec 2020 06:14:09 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a35 To: libc-alpha@sourceware.org Subject: [PATCH 3/5] Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 Date: Tue, 15 Dec 2020 19:43:37 +0530 Message-Id: <20201215141339.2684384-4-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201215141339.2684384-1-siddhesh@sourceware.org> References: <20201215141339.2684384-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham 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: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com, joseph@codesourcery.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Do not attempt to fix the significand top bit in long double input received in printf. The code should never reach here because isnan should now detect unnormals as NaN. This is already a NOP for glibc since it uses the gcc __builtin_isnan, which detects unnormals as NaN. --- sysdeps/x86/ldbl2mpn.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sysdeps/x86/ldbl2mpn.c b/sysdeps/x86/ldbl2mpn.c index 23afedfb67..ec8464eef7 100644 --- a/sysdeps/x86/ldbl2mpn.c +++ b/sysdeps/x86/ldbl2mpn.c @@ -115,14 +115,6 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size, && res_ptr[N - 1] == 0) /* Pseudo zero. */ *expt = 0; - else - /* Unlike other floating point formats, the most significant bit - is explicit and expected to be set for normal numbers. Set it - in case it is cleared in the input. Otherwise, callers will - not be able to produce the expected multi-precision integer - layout by shifting. */ - res_ptr[N - 1] |= (mp_limb_t) 1 << (LDBL_MANT_DIG - 1 - - ((N - 1) * BITS_PER_MP_LIMB)); return N; }