From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 47D693858419 for ; Mon, 29 Aug 2022 07:11:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47D693858419 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661757097; bh=YCngmahmhlS+9xuUm+IXW5AUYSmBL7Bhxzjkz2F26Qk=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=SHfefICz+ZuRSu6HPtt/XqY2cfTWyEroA/tXtSEfcWEHib6FkW/rLGibu8hGC9y9h x1qCz+RPLktthihcJwh1zyvbPrkno7wubiMSSjIEhGe64tj4UjKJqnm8K7rnahwEPi gu2OSLiZNeP3GPMYWgUvrnQ7lpOarddvdOmE17mI= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id BDF5B66888; Mon, 29 Aug 2022 03:11:35 -0400 (EDT) Message-ID: Subject: Ping: [PATCH] LoongArch: Use __builtin_{fmax,fmaxf,fmin,fminf} with GCC >= 13 From: Xi Ruoyao To: libc-alpha@sourceware.org Cc: caiyinyu , Adhemerval Zanella Netto , Joseph Myers , Wang Xuerui Date: Mon, 29 Aug 2022 15:11:34 +0800 In-Reply-To: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> References: <9146983bcb2dc77fea7ab361f96005b1ce6dc698.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,LIKELY_SPAM_FROM,PDS_OTHER_BAD_TLD,SPF_HELO_PASS,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: Gentle ping :) On Sat, 2022-08-20 at 16:43 +0800, Xi Ruoyao wrote: > GCC 13 compiles these built-ins to {fmax,fmin}.{s/d} instruction, use > them instead of the generic implementation. >=20 > Link: https://gcc.gnu.org/r13-2085 > Signed-off-by: Xi Ruoyao > --- > =C2=A0sysdeps/loongarch/fpu/math-use-builtins-fmax.h | 10 ++++++++++ > =C2=A0sysdeps/loongarch/fpu/math-use-builtins-fmin.h | 10 ++++++++++ > =C2=A02 files changed, 20 insertions(+) > =C2=A0create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmax.h > =C2=A0create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-fmin.h >=20 > 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 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University