From patchwork Tue Apr 28 14:42:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1278537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49BPWj0rxpz9sRY for ; Wed, 29 Apr 2020 00:42:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2B0D13949F32; Tue, 28 Apr 2020 14:42:55 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id C21BB3948A93 for ; Tue, 28 Apr 2020 14:42:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C21BB3948A93 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: /d/aRomjxdUJXoGIWbBOK8dTi9mngmkSviK092jjTJsXGJKUpEkQyj8StmgIxNeVkdegdPLAE/ 3wWL8obFc7tsjTU3i+S3gJh4AEsurYqCYoSa69dEIzGnPN3S7RabRVHECLQcnfseR395xyRZrA 9UkmB1ymsNszlupoA+Hq3U7n3uBtf+QPNB6ey1lODmTcxPrUpN+H9Jl8aEDfaegYL7kzzSCOCO ZcUPjCx2SCiXe7YMIy4P1DRpuVFpvQeeYJXI52hiXUl/eKgnDw8Nq4cK1XQpLAjH8exWaNOIdu Xjc= X-IronPort-AV: E=Sophos;i="5.73,328,1583222400"; d="scan'208";a="48310956" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 28 Apr 2020 06:42:46 -0800 IronPort-SDR: vkby0DD2Xk70JiqCnzRlM6WON63nEYP0qpMKkwLMpUSyc3VEpyRzM7wz+rx9TFboQPBhPREdta PRbl7u+QSBqMNTW5SA7e3dLxc9Pw4hOiujwBFiwIi1/nhzfFVICkGVPC/LWp/nWeijl2DO5cRQ p/MgwZNITXEs+DDFpfzt6gPC+h/hY6zYPmTykYQcbzWPGHZKZD62uQEKDUGdnsMAEWhpOj68yo 5Q1ICoawAmAm3I17WDZ9O7qAJsThDFalZzp2V2YpcAGlSqHkH3LiNSMsEnixpSEgoOvX3UTKLQ Cc8= Date: Tue, 28 Apr 2020 14:42:41 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: Remove unused floating-point configuration from gmp-impl.h Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, 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: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch removes the IEEE_DOUBLE_BIG_ENDIAN and IEEE_DOUBLE_MIXED_ENDIAN macros from gmp-impl.h and gmp-mparam.h, and the ieee_double_extract union from gmp-impl.h. The macros were used only in defining the union, which was used nowhere in glibc. As GMP's gmp-impl.h is over 5000 lines, the file in glibc is so far from the GMP version that it doesn't seem to make sense to keep things there that are not relevant in glibc. (I expect there is plenty more in the header after this patch that is also not relevant in glibc and can be cleaned up later.) Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. diff --git a/stdlib/gmp-impl.h b/stdlib/gmp-impl.h index 25193e6726..0c6aa30a30 100644 --- a/stdlib/gmp-impl.h +++ b/stdlib/gmp-impl.h @@ -319,53 +319,3 @@ extern void impn_sqr_n_basecase _PROTO ((mp_ptr prodp, mp_srcptr up, extern void impn_sqr_n _PROTO ((mp_ptr prodp, mp_srcptr up, mp_size_t size, mp_ptr tspace)) attribute_hidden; - - - -#ifndef IEEE_DOUBLE_BIG_ENDIAN -#define IEEE_DOUBLE_BIG_ENDIAN 1 -#endif - -#ifndef IEEE_DOUBLE_MIXED_ENDIAN -#define IEEE_DOUBLE_MIXED_ENDIAN 0 -#endif - -#if IEEE_DOUBLE_MIXED_ENDIAN -union ieee_double_extract -{ - struct - { - unsigned int manh:20; - unsigned int exp:11; - unsigned int sig:1; - unsigned int manl:32; - } s; - double d; -}; -#else -#if IEEE_DOUBLE_BIG_ENDIAN -union ieee_double_extract -{ - struct - { - unsigned int sig:1; - unsigned int exp:11; - unsigned int manh:20; - unsigned int manl:32; - } s; - double d; -}; -#else -union ieee_double_extract -{ - struct - { - unsigned int manl:32; - unsigned int manh:20; - unsigned int exp:11; - unsigned int sig:1; - } s; - double d; -}; -#endif -#endif diff --git a/sysdeps/x86_64/x32/gmp-mparam.h b/sysdeps/x86_64/x32/gmp-mparam.h index f2d9782eb1..b0804d4f86 100644 --- a/sysdeps/x86_64/x32/gmp-mparam.h +++ b/sysdeps/x86_64/x32/gmp-mparam.h @@ -29,5 +29,3 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see #define BITS_PER_INT 32 #define BITS_PER_SHORTINT 16 #define BITS_PER_CHAR 8 - -#define IEEE_DOUBLE_BIG_ENDIAN 0