From patchwork Thu Feb 13 15:27:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 1237570 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=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109672-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=int+YiaQ; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48JL470lvvz9sT3 for ; Fri, 14 Feb 2020 02:27:50 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=WfsFIE/GEzeSSjYQiosSbr4SBKUafs2IU26zyRNS4cAKyvgvdzCHX 7QTziuXZHBvVEykPqQFk/EnYJQwW1E3NFjMS+JXbigXhkKzNH1BczEcrcecZ1eC0 qQIOk+00dmQDsih+Oe0uWZx1om16vl4lsB5zRWhpLZ8f/aI72CnTUw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=kaTqtN3z0n+DoocKg9q4vEHnZZ8=; b=int+YiaQ216MnakwAao7FxGOqhr4 8/N8MmxbE08+gkupI6LH1XWtVQ8jbMDnz53MyLYL0w5eXE9Ad96I1PyCsAkF8TZr IWISOvf2eCS6YMPZPQidbxoRIaJY4F7CnbKKaZG9kwmpvpQeihcRS5k7vDs4YodC qrlhhIdpWNNc69U= Received: (qmail 58902 invoked by alias); 13 Feb 2020 15:27:44 -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 58651 invoked by uid 89); 13 Feb 2020 15:27:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCHv2 2/2] ldbl-128ibm-compat: Provide a scalb implementation Date: Thu, 13 Feb 2020 09:27:38 -0600 Message-Id: <20200213152738.29014-2-murphyp@linux.vnet.ibm.com> In-Reply-To: <20200213152738.29014-1-murphyp@linux.vnet.ibm.com> References: <20200213152738.29014-1-murphyp@linux.vnet.ibm.com> MIME-Version: 1.0 From: Tulio Magno Quites Machado Filho Reuse the template in order to provide the redirect for scalbl to __scalbieee128, but avoid any extra aliasing as this is intended to support long double redirects only. --- sysdeps/ieee754/ldbl-128ibm-compat/Versions | 1 + .../ieee754/ldbl-128ibm-compat/e_scalbf128.c | 26 ++++++++++++++++++ .../ieee754/ldbl-128ibm-compat/w_scalbf128.c | 27 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions index b4609c99f7..db255cb282 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/Versions +++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions @@ -90,6 +90,7 @@ libm { __rintieee128; __roundevenieee128; __roundieee128; + __scalbieee128; __scalblnieee128; __scalbnieee128; __setpayloadieee128; diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c new file mode 100644 index 0000000000..f7a45065c3 --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c @@ -0,0 +1,26 @@ +/* Multiply _Float128 by integral power of 2 + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +/* *_finite symbols are deprecated since this layer was introduced. + No symbols are needed. */ +#undef declare_mgen_finite_alias +#define declare_mgen_finite_alias(from, to) + +#include diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c new file mode 100644 index 0000000000..38e7627da9 --- /dev/null +++ b/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c @@ -0,0 +1,27 @@ +/* Multiply _Float128 by integral power of 2 + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#undef declare_mgen_alias +#define declare_mgen_alias(a,b) +#define __ieee754_scalbl __ieee754_scalbf128 +#include + +libm_alias_float128_other_r_ldbl (__scalb, scalb,)