Re: [PATCH v2 3/4] aarch/fpu: use generic builtins based math functions

2020-06-02 Thread Vineet Gupta
On 6/2/20 10:31 AM, Adhemerval Zanella via Libc-alpha wrote:
> 
> 
> On 01/06/2020 21:35, Vineet Gupta wrote:
>> introduce sysdep header math-use-builtins.h to replace aarch64
>> impementations with corresponding generic ones
> 
> s/impementations/implementations and missing ':'.

Fixed.

>>  - newly inroduced generic sqrt{,f}, fma{,f}
>>  - existing floor{,f}, nearbyint{,f}, rint{,f}, round{,f}, trunc{,f}
>>  - Note that generic copysign was already enabled (via generic
>>math-use-builtins.h) now thru sysdep header
>>
>> This is supposed to be a non functional change
>> Passes build-many for aarch64-linux-gnu
> 
> LGTM (just double check if the objects generated by the removed 
> implementations did not changed).

I will add the diff output to v3.

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH v2 3/4] aarch/fpu: use generic builtins based math functions

2020-06-02 Thread Adhemerval Zanella



On 01/06/2020 21:35, Vineet Gupta wrote:
> introduce sysdep header math-use-builtins.h to replace aarch64
> impementations with corresponding generic ones

s/impementations/implementations and missing ':'.

> 
>  - newly inroduced generic sqrt{,f}, fma{,f}
>  - existing floor{,f}, nearbyint{,f}, rint{,f}, round{,f}, trunc{,f}
>  - Note that generic copysign was already enabled (via generic
>math-use-builtins.h) now thru sysdep header
> 
> This is supposed to be a non functional change
> Passes build-many for aarch64-linux-gnu

LGTM (just double check if the objects generated by the removed 
implementations did not changed).

Reviewed-by: Adhemerval Zanella 

> ---
>  sysdeps/aarch64/fpu/e_sqrt.c| 27 --
>  sysdeps/aarch64/fpu/e_sqrtf.c   | 27 --
>  sysdeps/aarch64/fpu/math-use-builtins.h | 71 +
>  sysdeps/aarch64/fpu/s_floor.c   | 29 --
>  sysdeps/aarch64/fpu/s_floorf.c  | 29 --
>  sysdeps/aarch64/fpu/s_fma.c | 28 --
>  sysdeps/aarch64/fpu/s_fmaf.c| 28 --
>  sysdeps/aarch64/fpu/s_nearbyint.c   | 28 --
>  sysdeps/aarch64/fpu/s_nearbyintf.c  | 28 --
>  sysdeps/aarch64/fpu/s_rint.c| 29 --
>  sysdeps/aarch64/fpu/s_rintf.c   | 29 --
>  sysdeps/aarch64/fpu/s_round.c   | 29 --
>  sysdeps/aarch64/fpu/s_roundf.c  | 29 --
>  sysdeps/aarch64/fpu/s_trunc.c   | 29 --
>  sysdeps/aarch64/fpu/s_truncf.c  | 29 --
>  15 files changed, 71 insertions(+), 398 deletions(-)
>  delete mode 100644 sysdeps/aarch64/fpu/e_sqrt.c
>  delete mode 100644 sysdeps/aarch64/fpu/e_sqrtf.c
>  create mode 100644 sysdeps/aarch64/fpu/math-use-builtins.h
>  delete mode 100644 sysdeps/aarch64/fpu/s_floor.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_floorf.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_fma.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_fmaf.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_nearbyint.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_nearbyintf.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_rint.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_rintf.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_round.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_roundf.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_trunc.c
>  delete mode 100644 sysdeps/aarch64/fpu/s_truncf.c
> 
> diff --git a/sysdeps/aarch64/fpu/e_sqrt.c b/sysdeps/aarch64/fpu/e_sqrt.c
> deleted file mode 100644
> index abb67ef7b061..
> --- a/sysdeps/aarch64/fpu/e_sqrt.c
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/* Square root of floating point number.
> -   Copyright (C) 2015-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   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
> -   .  */
> -
> -#include 
> -#include 
> -
> -double
> -__ieee754_sqrt (double d)
> -{
> -  return __builtin_sqrt (d);
> -}
> -libm_alias_finite (__ieee754_sqrt, __sqrt)

Ok.

> diff --git a/sysdeps/aarch64/fpu/e_sqrtf.c b/sysdeps/aarch64/fpu/e_sqrtf.c
> deleted file mode 100644
> index 13008a4f45d6..
> --- a/sysdeps/aarch64/fpu/e_sqrtf.c
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/* Single-precision floating point square root.
> -   Copyright (C) 2015-2020 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -
> -   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
> -   .  */
> -
> -#include 
> -#include 
> -
> -float
> -__ieee754_sqrtf (float s)
> -{
> -  return __builtin_sqrtf (s);
> -}
> -libm_alias_finite (__ieee754_sqrtf, __sqrtf)

Ok.

> diff --git