From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 5F1A83858D37 for ; Mon, 29 Aug 2022 12:44:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F1A83858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x22c.google.com with SMTP id r10so10200971oie.1 for ; Mon, 29 Aug 2022 05:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc; bh=DBA2xptG582pN6zYose5lqq5qkoll8QdFxS1tTlZ4Eo=; b=Dlfpt3o34/UlR0eb8UWbRyLHn4tc5NI0YDEH+I+WavufWjymyDQtR6gK2xcpD1ohk2 HmxkG/S+y6gJQvszLpPmvui1kANoccRL1bw+NBkXXDdpSl+Z6oK4SxkCSuAnaWsCcpO/ naC4FcDX6H28902XiGIfJM5UEVCH5ct7c9CMOyG698/L/OUi0VwppDg2G5sWiMsmWeDV SQqxyo99ZhOfmQ4qoVtPYm8a8bfdnvGOCHLQEN4yEyzScEpj+6PN7qGda397cLo0UwYp JL7jFUmqEiO/MtbkYuEj/TSq+/kjfBzLV2JySwjCjzOtzYAjcgDdAqyIxJwEJzjP3trw Nhog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc; bh=DBA2xptG582pN6zYose5lqq5qkoll8QdFxS1tTlZ4Eo=; b=DafC4QxoYheiWpJDF721cl0dQaw4dOLaJd1Ba2/9HyNGjzLwN6WhF4/i2WTfWgWL8Y TWtwpWvWTVNH3Kj7u6w9eD4PljOyt+mV1bOBzEnBhm8JaZXaCwoaGZ6OWRY+0QVOcziO 1I/ywCtUvB4YhnkKxfl7Y/cw/iMuogO2PNavyPOwsTC/HCH1n9AlGoLAn4rBuSKlz2eH C8X+kaQTtCzBf/P6SY594A3EJQifewP76SyYBkTfw1TNP77WBr1+ClhCSrHPslK1abKV m6Z3lYDQFVTrdEAIrWJNCdI4388HShYkoBUJ8Hl+1kCOMNM69ykcQyqmY6yF36h/p+/r Hdwg== X-Gm-Message-State: ACgBeo2C6UHDiJTDD4b7dTDHaBdgxiIlqwVusSJv7a7hXXKJLWny4whj bkZErysurl4r/OK1Ka6zEOYwhm582b3wwA== X-Google-Smtp-Source: AA6agR4WsHjnPor1ralRYDifNh6YSrWvcYXUR8XLos3po+8+vT4KtFWDorE4JKiKeyS23DmsMnsjeQ== X-Received: by 2002:a05:6808:1207:b0:345:6b7d:22a8 with SMTP id a7-20020a056808120700b003456b7d22a8mr7268576oil.16.1661777051570; Mon, 29 Aug 2022 05:44:11 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:745e:189c:ed50:a343:6adf? ([2804:1b3:a7c0:745e:189c:ed50:a343:6adf]) by smtp.gmail.com with ESMTPSA id r18-20020a9d30d2000000b006370abdc976sm5478096otg.58.2022.08.29.05.44.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 05:44:11 -0700 (PDT) Message-ID: <532ed62c-8510-c351-9cf2-342771a09a94@linaro.org> Date: Mon, 29 Aug 2022 09:44:08 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH] LoongArch: Use __builtin_{fmax,fmaxf,fmin,fminf} with GCC >= 13 Content-Language: en-US To: Xi Ruoyao , libc-alpha@sourceware.org Cc: caiyinyu , Joseph Myers , Wang Xuerui References: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 20/08/22 05:43, Xi Ruoyao wrote: > GCC 13 compiles these built-ins to {fmax,fmin}.{s/d} instruction, use > them instead of the generic implementation. > > Link: https://gcc.gnu.org/r13-2085 > Signed-off-by: Xi Ruoyao LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > sysdeps/loongarch/fpu/math-use-builtins-fmax.h | 10 ++++++++++ > sysdeps/loongarch/fpu/math-use-builtins-fmin.h | 10 ++++++++++ > 2 files changed, 20 insertions(+) > create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmax.h > create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmin.h > > diff --git a/sysdeps/loongarch/fpu/math-use-builtins-fmax.h b/sysdeps/loongarch/fpu/math-use-builtins-fmax.h > new file mode 100644 > index 0000000000..5d22567bd3 > --- /dev/null > +++ b/sysdeps/loongarch/fpu/math-use-builtins-fmax.h > @@ -0,0 +1,10 @@ > +#if __GNUC_PREREQ (13, 0) > +# define USE_FMAX_BUILTIN 1 > +# define USE_FMAXF_BUILTIN 1 > +#else > +# define USE_FMAX_BUILTIN 0 > +# define USE_FMAXF_BUILTIN 0 > +#endif > + > +#define USE_FMAXL_BUILTIN 0 > +#define USE_FMAXF128_BUILTIN 0 > diff --git a/sysdeps/loongarch/fpu/math-use-builtins-fmin.h b/sysdeps/loongarch/fpu/math-use-builtins-fmin.h > new file mode 100644 > index 0000000000..4d28b41c0d > --- /dev/null > +++ b/sysdeps/loongarch/fpu/math-use-builtins-fmin.h > @@ -0,0 +1,10 @@ > +#if __GNUC_PREREQ (13, 0) > +# define USE_FMIN_BUILTIN 1 > +# define USE_FMINF_BUILTIN 1 > +#else > +# define USE_FMIN_BUILTIN 0 > +# define USE_FMINF_BUILTIN 0 > +#endif > + > +#define USE_FMINL_BUILTIN 0 > +#define USE_FMINF128_BUILTIN 0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 5F1A83858D37 for ; Mon, 29 Aug 2022 12:44:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F1A83858D37 Received: by mail-oi1-x22c.google.com with SMTP id r10so10200971oie.1 for ; Mon, 29 Aug 2022 05:44:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc; bh=DBA2xptG582pN6zYose5lqq5qkoll8QdFxS1tTlZ4Eo=; b=DafC4QxoYheiWpJDF721cl0dQaw4dOLaJd1Ba2/9HyNGjzLwN6WhF4/i2WTfWgWL8Y TWtwpWvWTVNH3Kj7u6w9eD4PljOyt+mV1bOBzEnBhm8JaZXaCwoaGZ6OWRY+0QVOcziO 1I/ywCtUvB4YhnkKxfl7Y/cw/iMuogO2PNavyPOwsTC/HCH1n9AlGoLAn4rBuSKlz2eH C8X+kaQTtCzBf/P6SY594A3EJQifewP76SyYBkTfw1TNP77WBr1+ClhCSrHPslK1abKV m6Z3lYDQFVTrdEAIrWJNCdI4388HShYkoBUJ8Hl+1kCOMNM69ykcQyqmY6yF36h/p+/r Hdwg== X-Gm-Message-State: ACgBeo2C6UHDiJTDD4b7dTDHaBdgxiIlqwVusSJv7a7hXXKJLWny4whj bkZErysurl4r/OK1Ka6zEOYwhm582b3wwA== X-Google-Smtp-Source: AA6agR4WsHjnPor1ralRYDifNh6YSrWvcYXUR8XLos3po+8+vT4KtFWDorE4JKiKeyS23DmsMnsjeQ== X-Received: by 2002:a05:6808:1207:b0:345:6b7d:22a8 with SMTP id a7-20020a056808120700b003456b7d22a8mr7268576oil.16.1661777051570; Mon, 29 Aug 2022 05:44:11 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:745e:189c:ed50:a343:6adf? ([2804:1b3:a7c0:745e:189c:ed50:a343:6adf]) by smtp.gmail.com with ESMTPSA id r18-20020a9d30d2000000b006370abdc976sm5478096otg.58.2022.08.29.05.44.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 05:44:11 -0700 (PDT) Message-ID: <532ed62c-8510-c351-9cf2-342771a09a94@linaro.org> Date: Mon, 29 Aug 2022 09:44:08 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH] LoongArch: Use __builtin_{fmax, fmaxf, fmin, fminf} with GCC >= 13 Content-Language: en-US To: Xi Ruoyao , libc-alpha@sourceware.org Cc: caiyinyu , Joseph Myers , Wang Xuerui References: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-List-Received-Date: Mon, 29 Aug 2022 12:44:22 -0000 Message-ID: <20220829124408.BihWS4pFsLWGvH7AAeBwCJcsfgp7eYkjYoLoSyZwTRs@z> On 20/08/22 05:43, Xi Ruoyao wrote: > GCC 13 compiles these built-ins to {fmax,fmin}.{s/d} instruction, use > them instead of the generic implementation. > > Link: https://gcc.gnu.org/r13-2085 > Signed-off-by: Xi Ruoyao LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > sysdeps/loongarch/fpu/math-use-builtins-fmax.h | 10 ++++++++++ > sysdeps/loongarch/fpu/math-use-builtins-fmin.h | 10 ++++++++++ > 2 files changed, 20 insertions(+) > create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmax.h > create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmin.h > > diff --git a/sysdeps/loongarch/fpu/math-use-builtins-fmax.h b/sysdeps/loongarch/fpu/math-use-builtins-fmax.h > new file mode 100644 > index 0000000000..5d22567bd3 > --- /dev/null > +++ b/sysdeps/loongarch/fpu/math-use-builtins-fmax.h > @@ -0,0 +1,10 @@ > +#if __GNUC_PREREQ (13, 0) > +# define USE_FMAX_BUILTIN 1 > +# define USE_FMAXF_BUILTIN 1 > +#else > +# define USE_FMAX_BUILTIN 0 > +# define USE_FMAXF_BUILTIN 0 > +#endif > + > +#define USE_FMAXL_BUILTIN 0 > +#define USE_FMAXF128_BUILTIN 0 > diff --git a/sysdeps/loongarch/fpu/math-use-builtins-fmin.h b/sysdeps/loongarch/fpu/math-use-builtins-fmin.h > new file mode 100644 > index 0000000000..4d28b41c0d > --- /dev/null > +++ b/sysdeps/loongarch/fpu/math-use-builtins-fmin.h > @@ -0,0 +1,10 @@ > +#if __GNUC_PREREQ (13, 0) > +# define USE_FMIN_BUILTIN 1 > +# define USE_FMINF_BUILTIN 1 > +#else > +# define USE_FMIN_BUILTIN 0 > +# define USE_FMINF_BUILTIN 0 > +#endif > + > +#define USE_FMINL_BUILTIN 0 > +#define USE_FMINF128_BUILTIN 0