This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [v2 1/2] PPC64: Add libmvec SIMD single-precision natural exponent function.
- From: Tulio Magno Quites Machado Filho <tuliom at ascii dot art dot br>
- To: Shawn Landden <shawn at git dot icu>, libc-alpha at sourceware dot org
- Cc:
- Date: Tue, 28 May 2019 15:20:25 -0300
- Subject: Re: [v2 1/2] PPC64: Add libmvec SIMD single-precision natural exponent function.
- References: <20190512032812.22021-1-shawn@git.icu> <20190527174717.21619-1-shawn@git.icu>
Shawn Landden <shawn@git.icu> writes:
> 2019-05-11 Shawn Landden <shawn@git.icu>
>
> [BZ #24209]
> * NEWS: Noted the addition of PPC64 vector expf function.
> * sysdeps/powerpc/bits/math-vector.h: Added entry for vector expf.
> * sysdeps/powerpc/powerpc64/fpu/Versions: Added vector expf entry.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile:
> (libmvec-sysdep_routines, CFLAGS-vec_s_expf4_vsx.c):
> (CFLAGS-vec_s_exp2f_data.c): Added build of VSX SIMD expf
> function and tests. Added vec_math_errf.c to build.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/math_config_flt.h: Modified for expf.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/test-float-vlen4-wrappers.c:
> Added entry for vector expf.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_expf4_vsx.c: New file.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_exp2f_data.c: Likewise.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_errf.c: Likewise.
> * sysdeps/unix/sysv/linux/powerpc/powerpc64/libmvec.abilist: SIMD expf
> added.
These entries are still indented with spaces. Fixed.
> diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> index a4f0d1694e..ad3c29b1ab 100644
> --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> @@ -46,10 +46,12 @@ endif
> ifeq ($(subdir),mathvec)
> libmvec-sysdep_routines += vec_d_cos2_vsx vec_s_cosf4_vsx \
> vec_d_sin2_vsx vec_s_sinf4_vsx \
> vec_d_log2_vsx vec_d_log_data \
> vec_s_logf4_vsx vec_s_logf_data \
> + vec_s_expf4_vsx vec_s_exp2f_data \
> + vec_math_errf \
> vec_d_sincos2_vsx vec_s_sincosf4_vsx
> CFLAGS-vec_d_cos2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
> CFLAGS-vec_d_log2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
> CFLAGS-vec_d_log_data.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
> CFLAGS-vec_s_cosf4_vsx.c += -mabi=altivec -maltivec -mvsx
> @@ -57,19 +59,21 @@ CFLAGS-vec_s_logf4_vsx.c += -mabi=altivec -maltivec -mvsx
> CFLAGS-vec_s_logf_data.c += -mabi=altivec -maltivec -mvsx
> CFLAGS-vec_d_sin2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
> CFLAGS-vec_s_sinf4_vsx.c += -mabi=altivec -maltivec -mvsx
> CFLAGS-vec_d_sincos2_vsx.c += -mabi=altivec -maltivec -mvsx -mpower8-vector
> CFLAGS-vec_s_sincosf4_vsx.c += -mabi=altivec -maltivec -mvsx
> +CFLAGS-vec_s_expf4_vsx.c += -mabi=altivec -maltivec -mvsx
> +CFLAGS-vec_s_exp2f_data.c += -mabi=altivec -maltivec -mvsx
vec_math_errf.c indirectly depends on altivec.h, which requires to use the same
flags.
Fixed locally.
> diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_errf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_errf.c
> new file mode 100644
> index 0000000000..22b3a62fcf
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_errf.c
> @@ -0,0 +1,39 @@
> ...
> +attribute_hidden float
> +__math_oflowf (uint32_t sign)
> +{
> + return xflowf (sign, 0x1p97f);
> +}
> +
Extra line at EOF here. Fixed.
I'm merging this patch with the fixes I mentioned to branch tuliom/libmvec.
Thanks!
--
Tulio Magno