[06/13] i386: Use builtin sqrtl

Message ID 20200609213301.3591135-6-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • [01/13] math: Decompose math-use-builtins.h
Related show

Commit Message

Checked on i686-linux-gnu.
---
 sysdeps/i386/fpu/e_sqrtl.c            | 21 ---------------------
 sysdeps/{x86_64 => x86}/fpu/e_sqrtl.c |  0
 2 files changed, 21 deletions(-)
 delete mode 100644 sysdeps/i386/fpu/e_sqrtl.c
 rename sysdeps/{x86_64 => x86}/fpu/e_sqrtl.c (100%)

-- 
2.25.1

Comments

If no one opposes I will commit this.

On 09/06/2020 18:32, Adhemerval Zanella wrote:
> Checked on i686-linux-gnu.

> ---

>  sysdeps/i386/fpu/e_sqrtl.c            | 21 ---------------------

>  sysdeps/{x86_64 => x86}/fpu/e_sqrtl.c |  0

>  2 files changed, 21 deletions(-)

>  delete mode 100644 sysdeps/i386/fpu/e_sqrtl.c

>  rename sysdeps/{x86_64 => x86}/fpu/e_sqrtl.c (100%)

> 

> diff --git a/sysdeps/i386/fpu/e_sqrtl.c b/sysdeps/i386/fpu/e_sqrtl.c

> deleted file mode 100644

> index 8f284dd75c..0000000000

> --- a/sysdeps/i386/fpu/e_sqrtl.c

> +++ /dev/null

> @@ -1,21 +0,0 @@

> -/*

> - * Written by J.T. Conklin <jtc@netbsd.org>.

> - * Public domain.

> - *

> - * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.

> - */

> -

> -#include <math_private.h>

> -#include <libm-alias-finite.h>

> -

> -#undef __ieee754_sqrtl

> -long double

> -__ieee754_sqrtl (long double x)

> -{

> -  long double res;

> -

> -  asm ("fsqrt" : "=t" (res) : "0" (x));

> -

> -  return res;

> -}

> -libm_alias_finite (__ieee754_sqrtl, __sqrtl)

> diff --git a/sysdeps/x86_64/fpu/e_sqrtl.c b/sysdeps/x86/fpu/e_sqrtl.c

> similarity index 100%

> rename from sysdeps/x86_64/fpu/e_sqrtl.c

> rename to sysdeps/x86/fpu/e_sqrtl.c

>

Patch

diff --git a/sysdeps/i386/fpu/e_sqrtl.c b/sysdeps/i386/fpu/e_sqrtl.c
deleted file mode 100644
index 8f284dd75c..0000000000
--- a/sysdeps/i386/fpu/e_sqrtl.c
+++ /dev/null
@@ -1,21 +0,0 @@ 
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <math_private.h>
-#include <libm-alias-finite.h>
-
-#undef __ieee754_sqrtl
-long double
-__ieee754_sqrtl (long double x)
-{
-  long double res;
-
-  asm ("fsqrt" : "=t" (res) : "0" (x));
-
-  return res;
-}
-libm_alias_finite (__ieee754_sqrtl, __sqrtl)
diff --git a/sysdeps/x86_64/fpu/e_sqrtl.c b/sysdeps/x86/fpu/e_sqrtl.c
similarity index 100%
rename from sysdeps/x86_64/fpu/e_sqrtl.c
rename to sysdeps/x86/fpu/e_sqrtl.c