From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 08/13] mips: Use sqrt{f} builtin
Date: Tue, 9 Jun 2020 18:32:56 -0300 [thread overview]
Message-ID: <20200609213301.3591135-8-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20200609213301.3591135-1-adhemerval.zanella@linaro.org>
Checked with a build against mips-linux-gnu and mips64-linux-gnu
and comparing the resulting binaries.
---
sysdeps/mips/fpu/e_sqrt.c | 38 -----------------------
sysdeps/mips/fpu/e_sqrtf.c | 38 -----------------------
sysdeps/mips/fpu/math-use-builtins-sqrt.h | 6 ++++
sysdeps/mips/mips32/fpu/e_sqrt.c | 1 -
sysdeps/mips/mips32/fpu/e_sqrtf.c | 1 -
sysdeps/mips/mips64/n32/fpu/e_sqrt.c | 1 -
sysdeps/mips/mips64/n32/fpu/e_sqrtf.c | 1 -
sysdeps/mips/mips64/n64/fpu/e_sqrt.c | 1 -
sysdeps/mips/mips64/n64/fpu/e_sqrtf.c | 1 -
9 files changed, 6 insertions(+), 82 deletions(-)
delete mode 100644 sysdeps/mips/fpu/e_sqrt.c
delete mode 100644 sysdeps/mips/fpu/e_sqrtf.c
create mode 100644 sysdeps/mips/fpu/math-use-builtins-sqrt.h
delete mode 100644 sysdeps/mips/mips32/fpu/e_sqrt.c
delete mode 100644 sysdeps/mips/mips32/fpu/e_sqrtf.c
delete mode 100644 sysdeps/mips/mips64/n32/fpu/e_sqrt.c
delete mode 100644 sysdeps/mips/mips64/n32/fpu/e_sqrtf.c
delete mode 100644 sysdeps/mips/mips64/n64/fpu/e_sqrt.c
delete mode 100644 sysdeps/mips/mips64/n64/fpu/e_sqrtf.c
diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c
deleted file mode 100644
index 47488e993c..0000000000
--- a/sysdeps/mips/fpu/e_sqrt.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
-
- 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
- <https://www.gnu.org/licenses/>. */
-
-
-#include <sgidefs.h>
-#include <libm-alias-finite.h>
-
-#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
-
-double __attribute__ ((nomips16))
-__ieee754_sqrt (double x)
-{
- double z;
- __asm__ ("sqrt.d %0,%1" : "=f" (z) : "f" (x));
- return z;
-}
-libm_alias_finite (__ieee754_sqrt, __sqrt)
-
-#else
-
-#include <sysdeps/ieee754/dbl-64/e_sqrt.c>
-
-#endif
diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c
deleted file mode 100644
index dc33788bf3..0000000000
--- a/sysdeps/mips/fpu/e_sqrtf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
-
- 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
- <https://www.gnu.org/licenses/>. */
-
-
-#include <sgidefs.h>
-#include <libm-alias-finite.h>
-
-#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
-
-float __attribute__ ((nomips16))
-__ieee754_sqrtf (float x)
-{
- float z;
- __asm__ ("sqrt.s %0,%1" : "=f" (z) : "f" (x));
- return z;
-}
-libm_alias_finite (__ieee754_sqrtf, __sqrtf)
-
-#else
-
-#include <sysdeps/ieee754/flt-32/e_sqrtf.c>
-
-#endif
diff --git a/sysdeps/mips/fpu/math-use-builtins-sqrt.h b/sysdeps/mips/fpu/math-use-builtins-sqrt.h
new file mode 100644
index 0000000000..37f49ebc9f
--- /dev/null
+++ b/sysdeps/mips/fpu/math-use-builtins-sqrt.h
@@ -0,0 +1,6 @@
+#include <sgidefs.h>
+
+#define USE_SQRT_BUILTIN (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+#define USE_SQRTF_BUILTIN (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+#define USE_SQRTL_BUILTIN 0
+#define USE_SQRTF128_BUILTIN 0
diff --git a/sysdeps/mips/mips32/fpu/e_sqrt.c b/sysdeps/mips/mips32/fpu/e_sqrt.c
deleted file mode 100644
index 81f4e77697..0000000000
--- a/sysdeps/mips/mips32/fpu/e_sqrt.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrt.c>
diff --git a/sysdeps/mips/mips32/fpu/e_sqrtf.c b/sysdeps/mips/mips32/fpu/e_sqrtf.c
deleted file mode 100644
index fb0700d45c..0000000000
--- a/sysdeps/mips/mips32/fpu/e_sqrtf.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrtf.c>
diff --git a/sysdeps/mips/mips64/n32/fpu/e_sqrt.c b/sysdeps/mips/mips64/n32/fpu/e_sqrt.c
deleted file mode 100644
index 81f4e77697..0000000000
--- a/sysdeps/mips/mips64/n32/fpu/e_sqrt.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrt.c>
diff --git a/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c b/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c
deleted file mode 100644
index fb0700d45c..0000000000
--- a/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrtf.c>
diff --git a/sysdeps/mips/mips64/n64/fpu/e_sqrt.c b/sysdeps/mips/mips64/n64/fpu/e_sqrt.c
deleted file mode 100644
index 81f4e77697..0000000000
--- a/sysdeps/mips/mips64/n64/fpu/e_sqrt.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrt.c>
diff --git a/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c b/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c
deleted file mode 100644
index fb0700d45c..0000000000
--- a/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/mips/fpu/e_sqrtf.c>
--
2.25.1
next prev parent reply other threads:[~2020-06-09 21:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 21:32 [PATCH 01/13] math: Decompose math-use-builtins.h Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 02/13] aarch64: Use math-use-builtins for ceil{f} Adhemerval Zanella
2020-06-10 10:15 ` Szabolcs Nagy
2020-06-09 21:32 ` [PATCH 03/13] s390x: Use fma{f} builtin Adhemerval Zanella
2020-06-16 10:13 ` Stefan Liebler
2020-06-09 21:32 ` [PATCH 04/13] powerpc: Use sqrt{f} builtin Adhemerval Zanella
2020-06-10 14:22 ` Paul A. Clarke
2020-06-09 21:32 ` [PATCH 05/13] x86_64: Use builtin sqrt{f,l} Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 06/13] i386: Use builtin sqrtl Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 07/13] alpha: Use builtin sqrt{f} Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:32 ` Adhemerval Zanella [this message]
2020-06-19 19:17 ` [PATCH 08/13] mips: Use sqrt{f} builtin Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 09/13] sparc: " Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 10/13] s390: " Adhemerval Zanella
2020-06-10 15:39 ` Stefan Liebler
2020-06-10 15:45 ` Szabolcs Nagy
2020-06-10 15:59 ` Adhemerval Zanella
2020-06-16 10:13 ` Stefan Liebler
2020-06-09 21:32 ` [PATCH 11/13] riscv: " Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 12/13] arm: " Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 13/13] m68k: Use sqrt{f} builtin for coldfire Adhemerval Zanella
2020-06-19 19:17 ` Adhemerval Zanella
2020-06-16 10:13 ` [PATCH 01/13] math: Decompose math-use-builtins.h Stefan Liebler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200609213301.3591135-8-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).