This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 10/28] powerpc: copysign cleanup


Looks good with the minor fixes below.

Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>

On Fri, Mar 29 2019, Adhemerval Zanella wrote:
> GCC always expand copysign{f} for all possible cpus, so calling the libm
> is only done if user explicitly states to disable the builtin (which is
> usually done not for performance reason).  So to provide ifunc variant
> for copysign only adds complexity for powerpc and powerpc64 and it not
> required for powerpc64le.

OK.

> 	* sysdeps/powerpc/fpu/s_copysign.c: New file.
> 	* sysdeps/powerpc/fpu/s_copysignf.c: Likewise.
> 	* sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Remove file.
> 	* sysdeps/powerpc/powerpc32/fpu/s_copysignf.S: Likewise.
> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> 	(sysdep_routines, libm-sysdep_routines): Remove s_copysign-power6 and
> 	s_copysign-ppc32.
> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S:
> 	Likewise.

Remove file?

> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S:
> 	Likewise.
> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c:
> 	Likewise.
> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c:
> 	Likewise.
> 	* sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Likewise.
> 	* sysdeps/powerpc/powerpc32/power6/fpu/s_copysignf.S: Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (sysdeps_calls):
> 	Remove s_copysign-power6 s_copysign-ppc64.
> 	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S:
> 	Likewise.

Remove file?

> 	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S:
> 	Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c: Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/s_copysignf.S: Likewise.
> 	* sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
> 	* sysdeps/powerpc/powerpc64/power6/fpu/s_copysignf.S: Likewise.

OK.

> +double
> +__copysign (double x, double y)
> +{
> +  return __builtin_copysign (x, y);
> +}
> +libm_alias_double (__copysign, copysign)
> +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
> +compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
> +#endif

OK.

> --- /dev/null
> +++ b/sysdeps/powerpc/fpu/s_copysignf.c
> @@ -0,0 +1,28 @@
> +/* Smallest integral value not less than argument.  PowerPC version.

Wrong description?

> +float
> +__copysignf (float x, float y)
> +{
> +  return __builtin_copysignf (x, y);
> +}
> +libm_alias_float (__copysign, copysign)

OK.

> -libm_alias_double (__copysign, copysign)
> -
> -/* It turns out that it's safe to use this code even for single-precision.  */
> -strong_alias(__copysign,__copysignf)
> -libm_alias_float (__copysign, copysign)
> -
> -#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
> -compat_symbol (libc, __copysign, copysignl, GLIBC_2_0)
> -#endif

OK. 

> --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S
> +++ /dev/null
>
> [...]
>
> -#define __copysign __copysign_ppc32
> -#undef hidden_def
> -#define hidden_def(name)
> -  strong_alias (__copysign_ppc32, __GI___copysign)

OK.  Not in use with hidden_proto calls.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]