From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23702 invoked by alias); 7 Dec 2017 12:20:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 23691 invoked by uid 89); 7 Dec 2017 12:20:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f194.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uwC7K1/i2MpC++7wNvT9f6+vUETT+usQ7Qkt2OgNsZo=; b=pip6eBpAvNgA1pueN+F6QYvsz0SPPC44w6VH/Q+6BhuZBOVPyffQur3L7e2hKMyrHe Fmhnli160qJRnQqCm/Imi8KdiiBxgk7njknfn6AZD21GlbeDaBOxLZXZCZVOQyBGJGcF 4Mjalf4lqky9VZ+wz+eJY/4ic9gjk3MDcsTD+mtID66XhQsXOFSc9pKMoSOK5tksHRX8 fGLTSt1U8NV7t5gDUluiDsoTtBw+ZHXssIRQ7rT65W4MTx1h4Z0wDrmnepTBVa/pdsHa WPQtO6WTXhKdkh4PWSx3nX2IYNNW9xHeuqMcSoEo2cFtdXK3vu0uZjd3sdgwxu43daST pA+Q== X-Gm-Message-State: AKGB3mJiFdCqrSd2hMVwU4LEj98R9PesKrbDoy6m+JaD0irv3h22Rihj urQxXMmiIE7SUEACWn5n6N/sUzpLciI= X-Google-Smtp-Source: AGs4zMaH5v2THjEARS4DyJkH7ZDM0OAKqVIm/lhtavNnsikAcaMHNMJpLK+M2POfvkhEZOrJjFZvog== X-Received: by 10.200.52.232 with SMTP id x37mr9513315qtb.287.1512649252650; Thu, 07 Dec 2017 04:20:52 -0800 (PST) Subject: Re: [PATCH] x86-64: Add sinf with FMA To: "H.J. Lu" Cc: Joseph Myers , GNU C Library References: <20171204180905.GA31592@gmail.com> <3c53189f-818f-0473-9ccd-1c0ecf40ab1c@linaro.org> From: Adhemerval Zanella Message-ID: <8c15ff6b-1660-7250-ced2-488441fc4f60@linaro.org> Date: Thu, 07 Dec 2017 12:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-12/txt/msg00202.txt.bz2 On 05/12/2017 17:03, H.J. Lu wrote: > diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf.c b/sysdeps/x86_64/fpu/multiarch/s_sinf.c > new file mode 100644 > index 0000000000..f91f866cdc > --- /dev/null > +++ b/sysdeps/x86_64/fpu/multiarch/s_sinf.c > @@ -0,0 +1,31 @@ > +/* Multiple versions of sinf. > + 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 > + . */ > + > +#include > + > +extern float __redirect_sinf (float); > + > +#define SYMBOL_NAME sinf > +#include "ifunc-fma.h" > + > +libc_ifunc_redirected (__redirect_sinf, __sinf, IFUNC_SELECTOR ()); > + > +libm_alias_float (__sin, sin) > + > +#define SINF __sinf_sse2 > +#include > -- 2.14.3 I would prefer if we move the default version to specific files instead of incorporate them on ifunc resolver itself. In this case add a sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c file with: #define SINF __sinf_sse2 #include LGTM with this change.