From patchwork Thu Nov 30 19:15:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 24642 Received: (qmail 13503 invoked by alias); 30 Nov 2017 19:16:06 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 13485 invoked by uid 89); 30 Nov 2017 19:16:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=meet X-HELO: relay1.mentorg.com Date: Thu, 30 Nov 2017 19:15:57 +0000 From: Joseph Myers To: Subject: Use libm_alias macros in m68k llrint functions [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) Most m68k libm functions share code via sources for one function including those for another function or type, in a way that will require significant changes to create function aliases in a way friendly to adding _FloatN / _FloatNx aliases. The llrint function implementations, however, use a conventional separate implementation for each floating-point type. Thus preparing them for _FloatN / _FloatNx aliases is just a matter of changing them to include the appropriate headers and use the appropriate macros, which this patch does. The llrintl changes aren't strictly required, since m68k long double does not meet the criteria for a _FloatN / _FloatNx type, but are included anyway to keep consistency between the implementations for the three types. Tested with build-many-glibcs.py that installed stripped shared libraries for m68k-linux-gnu are unchanged by the patch. Committed. 2017-11-30 Joseph Myers * sysdeps/m68k/m680x0/fpu/s_llrint.c: Include . (llrint): Define using libm_alias_double. * sysdeps/m68k/m680x0/fpu/s_llrintf.c: Include . (llrintf): Define using libm_alias_float. * sysdeps/m68k/m680x0/fpu/s_llrintl.c: Include . (llrintl): Define using libm_alias_ldouble. diff --git a/sysdeps/m68k/m680x0/fpu/s_llrint.c b/sysdeps/m68k/m680x0/fpu/s_llrint.c index bf80884..218b745 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrint.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrint.c @@ -20,6 +20,7 @@ #include #include +#include #include "mathimpl.h" long long int @@ -72,4 +73,4 @@ __llrint (double x) return result; } -weak_alias (__llrint, llrint) +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintf.c b/sysdeps/m68k/m680x0/fpu/s_llrintf.c index 3f4eeb4..dfcd47d 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintf.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintf.c @@ -20,6 +20,7 @@ #include #include +#include #include "mathimpl.h" long long int @@ -62,4 +63,4 @@ __llrintf (float x) return result; } -weak_alias (__llrintf, llrintf) +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/m68k/m680x0/fpu/s_llrintl.c b/sysdeps/m68k/m680x0/fpu/s_llrintl.c index 69e27b1..83b1d1f 100644 --- a/sysdeps/m68k/m680x0/fpu/s_llrintl.c +++ b/sysdeps/m68k/m680x0/fpu/s_llrintl.c @@ -20,6 +20,7 @@ #include #include +#include #include "mathimpl.h" long long int @@ -61,4 +62,4 @@ __llrintl (long double x) return result; } -weak_alias (__llrintl, llrintl) +libm_alias_ldouble (__llrint, llrint)