From patchwork Mon Sep 25 23:33:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 23139 Received: (qmail 87099 invoked by alias); 25 Sep 2017 23:34:03 -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 87074 invoked by uid 89); 25 Sep 2017 23:34:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f66.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ZBL+VnrnAhy6XRD1QVbaE7w5ci5Y2ggCpK0nUJkbtvo=; b=JqKJ4z+2n7s+6k3o5vTZTf1lJxYWvxD8D3I+8LZ6o2Rwv5mhTQ20dU4mL156+DXz+r dPiuAyrfIhoQCKeaY8YVijOHuktF3FQ7mG3EqmcTjbr8U+hhDNi2XFEMvH8CU9Don2oF bxF8rWw1E6ZvGiNQtYqOZbn+9MiZdy757wS+7zAFFP7cULhun7rZu1y4/Z3ZZMkoFkDp 12mWwBJ98Lz7C/Cs9PuaaUwHtTFCP4gFFshnLWyKg7GeDPKAb2WFgmgBUYCYMVTPAa+o jaFTbPHJzTKTySX1fYWIslyHUBQ1ZgZ7Pd2tFlPb7947M1GMNCblI8swsM1z2TB37XB5 iUkg== X-Gm-Message-State: AHPjjUgf8VbRA6Y/stzD6jieBS7dvjqTLxof5F1o7tGBApx1sr/Uc780 2pN/GCdEcIQWBtF2Eq8iltyfQD3x X-Google-Smtp-Source: AOwi7QDf5pWHNBvreP9GePHbHVBPD13AEdEnACV2RRcSihsa4NjKF8q0P1cTq3JtqWyc/i7+juOpUw== X-Received: by 10.202.93.70 with SMTP id r67mr7207004oib.121.1506382439067; Mon, 25 Sep 2017 16:33:59 -0700 (PDT) Date: Mon, 25 Sep 2017 16:33:51 -0700 From: "H.J. Lu" To: GNU C Library Cc: Arjan van de Ven , Andrew Senkevich Subject: [PATCH 3/4] x86-64: Add IEEE 754 exp2f with FMA Message-ID: <20170925233351.GC31745@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines): Add e_exp2f-fma. (CFLAGS-e_exp2f-fma.c): New. * sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c: New file. * sysdeps/x86_64/fpu/multiarch/e_exp2f.c: Likewise. --- sysdeps/x86_64/fpu/multiarch/Makefile | 3 ++- sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c | 6 ++++++ sysdeps/x86_64/fpu/multiarch/e_exp2f.c | 33 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c create mode 100644 sysdeps/x86_64/fpu/multiarch/e_exp2f.c diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile index 92e91d79af..71a3b337ed 100644 --- a/sysdeps/x86_64/fpu/multiarch/Makefile +++ b/sysdeps/x86_64/fpu/multiarch/Makefile @@ -37,8 +37,9 @@ CFLAGS-slowpow-fma.c = -mfma -mavx2 CFLAGS-s_sin-fma.c = -mfma -mavx2 CFLAGS-s_tan-fma.c = -mfma -mavx2 -libm-sysdep_routines += e_expf-fma +libm-sysdep_routines += e_exp2f-fma e_expf-fma +CFLAGS-e_exp2f-fma.c = -mfma -mavx2 CFLAGS-e_expf-fma.c = -mfma -mavx2 libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \ diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c b/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c new file mode 100644 index 0000000000..34500e2884 --- /dev/null +++ b/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c @@ -0,0 +1,6 @@ +#undef strong_alias +#define strong_alias(ignored1, ignored2) + +#define __ieee754_exp2f __ieee754_exp2f_fma + +#include diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp2f.c b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c new file mode 100644 index 0000000000..b6463eb0b8 --- /dev/null +++ b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c @@ -0,0 +1,33 @@ +/* Multiple versions of IEEE 754 exp2f. + Copyright (C) 2017 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 + . */ + +extern float __redirect_ieee754_exp2f (float); + +#define SYMBOL_NAME ieee754_exp2f +#include "ifunc-fma.h" + +libc_ifunc_redirected (__redirect_ieee754_exp2f, __ieee754_exp2f, + IFUNC_SELECTOR ()); +strong_alias (__ieee754_exp2f, __exp2f_finite) + +#undef strong_alias +#define strong_alias(ignored1, ignored2) + +#define __ieee754_exp2f __ieee754_exp2f_sse2 + +#include