[PATCH] Aarch64: Add simd exp/expf functions
Steve Ellcey
sellcey@marvell.com
Wed Mar 6 17:19:00 GMT 2019
Here are float and double vector exp functions for Aarch64. The vector
functions are based on the ieee ones in sysdeps/ieee754/flt-32/e_expf.c
and sysdeps/ieee754/dbl-64/e_exp.c. If any of the values are 'large'
or NaN they actually call the scalar routines, otherwise they use the
Aarch64 SIMD instructions with the same algorithm as the ieee functions.
My testing has not found any differences in exp output for scalar vs.
vector and the newly added tests for the vector routines pass using the
updated libm-test-ulps file.
This patch also sets build_mathvec to yes by default on Aarch64, applies
the simd attribute to exp and expf in the C header and includes a
Fortran header. The Fortran header is in finclude so this patch needs
Martin Liska's patch that moves math-vector-fortran.h from bits to
finclude in order to work correctly.
Comments?
Steve Ellcey
sellcey@marvell.com
2019-03-06 Steve Ellcey <sellcey@marvell.com>
* sysdeps/aarch64/configure.ac (build_mathvec): Set to yes by default.
* sysdeps/aarch64/configure: Regenerate.
* sysdeps/aarch64/fpu/Makefile (CFLAGS-libmvec_double_vlen2_exp.c):
Set flag.
(CFLAGS-libmvec_float_vlen4_expf.c): Likewise.
(CFLAGS-libmvec_exp_data.c): Likewise.
(CFLAGS-libmvec_exp2f_data.c): Likewise.
(libmvec-support): Add libmvec_double_vlen2_exp,
libmvec_float_vlen4_expf, libmvec_exp_data, libmvec_exp2f_data to list.
(libmvec-static-only-routines): Add dummy name to list.
(libmvec-tests): Add double-vlen2, float-vlen4 to list.
(double-vlen2-funcs): Add new vector function name.
(float-vlen4-funcs): Add new vector function name.
* sysdeps/aarch64/fpu/Versions: New file.
* sysdeps/aarch64/fpu/bits/math-vector.h: New file.
* sysdeps/aarch64/fpu/finclude/math-vector-fortran.h: New file.
* sysdeps/aarch64/fpu/libmvec_double_vlen2_exp.c: New file.
* sysdeps/aarch64/fpu/libmvec_exp2f_data.c: New file.
* sysdeps/aarch64/fpu/libmvec_exp_data.c: New file.
* sysdeps/aarch64/fpu/libmvec_float_vlen4_expf.c: New file.
* sysdeps/aarch64/fpu/libmvec_util.h: New file.
* sysdeps/aarch64/fpu/test-double-vlen2-wrappers.c: New file.
* sysdeps/aarch64/fpu/test-float-vlen4-wrappers.c: New file.
* sysdeps/aarch64/libm-test-ulps (exp_vlen2): New entry.
(exp_vlen4): Likewise.
* sysdeps/unix/sysv/linux/aarch64/libmvec.abilist: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-exp.patch
Type: text/x-patch
Size: 18856 bytes
Desc: glibc-exp.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20190306/00f3ce1c/attachment.bin>
More information about the Libc-alpha
mailing list