From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7891) id 3D90238425B3; Tue, 30 Aug 2022 06:12:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D90238425B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661839933; bh=SZjcuenfDUH23he6g56RgDYkjygsKGVSQfgLVoZskrM=; h=From:To:Subject:Date:From; b=LowqjCaeVQ+5t/CYXfzFh/FLJyrNe3NKYTQt8RX+ILxQqR5WbCH44DMdwkQZbAkif 2rHR0VAilOzGIdDcwqMKhcOL5bxuAJooq49D0nZAfEx0o0Ra5XlWR7s9/bzo/301Yj UQRFK7lAJPi8AgKXbLwGeppKGkmFcQz59F/17Xug= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yinyu Cai To: glibc-cvs@sourceware.org Subject: [glibc] LoongArch: Use __builtin_{fmax, fmaxf, fmin, fminf} with GCC >= 13 X-Act-Checkin: glibc X-Git-Author: Xi Ruoyao X-Git-Refname: refs/heads/master X-Git-Oldrev: fa9e095bbe9b624022ff77551e5998100bdc4b29 X-Git-Newrev: 241603123c2a1beb7e599bd012c542479e216473 Message-Id: <20220830061213.3D90238425B3@sourceware.org> Date: Tue, 30 Aug 2022 06:12:13 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=241603123c2a1beb7e599bd012c542479e216473 commit 241603123c2a1beb7e599bd012c542479e216473 Author: Xi Ruoyao Date: Sat Aug 20 16:43:44 2022 +0800 LoongArch: Use __builtin_{fmax,fmaxf,fmin,fminf} with GCC >= 13 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 Diff: --- sysdeps/loongarch/fpu/math-use-builtins-fmax.h | 10 ++++++++++ sysdeps/loongarch/fpu/math-use-builtins-fmin.h | 10 ++++++++++ 2 files changed, 20 insertions(+) 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