[PATCH] Aarch64: Add simd exp/expf functions
Szabolcs Nagy
Szabolcs.Nagy@arm.com
Wed Mar 6 19:04:00 GMT 2019
On 06/03/2019 17:18, Steve Ellcey wrote:
> 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?
thanks
this will need to detect support for
__attribute__((aarch64_vector_pcs))
(which will require gcc-9)
and i plan to fix the lazy binding issue
with vector pcs which will require a new
binutils too (currently that's not super
important since the dynamic linker is
unlikely to use fpregs outside of v0-v7,
but depending on the exact nature of the
solution we may require a new gcc and
new binutils too for libmvec)
the scalar algorithms are not optimal for
simd, but should work and i'm fine with
such initial code to enable libmvec and
then optimize it later.
More information about the Libc-alpha
mailing list