aarch64/fpu: Add vector variants of erf
[glibc.git] / sysdeps / aarch64 / fpu / Makefile
blob320b6ed43a9a454c02ec93cc98ea708e0122beeb
1 libmvec-supported-funcs = acos \
2 asin \
3 atan \
4 atan2 \
5 cos \
6 erf \
7 exp \
8 exp10 \
9 exp2 \
10 expm1 \
11 log \
12 log10 \
13 log1p \
14 log2 \
15 sin \
16 tan
18 float-advsimd-funcs = $(libmvec-supported-funcs)
19 double-advsimd-funcs = $(libmvec-supported-funcs)
20 float-sve-funcs = $(libmvec-supported-funcs)
21 double-sve-funcs = $(libmvec-supported-funcs)
23 ifeq ($(subdir),mathvec)
24 libmvec-support = $(addsuffix f_advsimd,$(float-advsimd-funcs)) \
25 $(addsuffix _advsimd,$(double-advsimd-funcs)) \
26 $(addsuffix f_sve,$(float-sve-funcs)) \
27 $(addsuffix _sve,$(double-sve-funcs)) \
28 v_log_data \
29 v_exp_data \
30 v_log2_data \
31 v_log10_data \
32 erf_data \
33 erff_data \
34 sv_erf_data \
35 sv_erff_data
36 endif
38 sve-cflags = -march=armv8-a+sve
41 ifeq ($(build-mathvec),yes)
42 bench-libmvec = $(addprefix float-advsimd-,$(float-advsimd-funcs)) \
43 $(addprefix double-advsimd-,$(double-advsimd-funcs)) \
44 $(addprefix float-sve-,$(float-sve-funcs)) \
45 $(addprefix double-sve-,$(double-sve-funcs))
46 endif
48 $(objpfx)bench-float-advsimd-%.c:
49 $(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_advsimd.py $(basename $(@F)) > $@
50 $(objpfx)bench-double-advsimd-%.c:
51 $(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_advsimd.py $(basename $(@F)) > $@
52 $(objpfx)bench-float-sve-%.c:
53 $(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_sve.py $(basename $(@F)) > $@
54 $(objpfx)bench-double-sve-%.c:
55 $(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_sve.py $(basename $(@F)) > $@
57 ifeq (${STATIC-BENCHTESTS},yes)
58 libmvec-benchtests = $(common-objpfx)mathvec/libmvec.a $(common-objpfx)math/libm.a
59 else
60 libmvec-benchtests = $(libmvec) $(libm)
61 endif
63 $(addprefix $(objpfx)bench-,$(bench-libmvec)): $(libmvec-benchtests)
65 ifeq ($(build-mathvec),yes)
66 libmvec-tests += float-advsimd double-advsimd float-sve double-sve
67 endif
69 define sve-float-cflags-template
70 CFLAGS-$(1)f_sve.c += $(sve-cflags)
71 CFLAGS-bench-float-sve-$(1).c += $(sve-cflags)
72 endef
74 define sve-double-cflags-template
75 CFLAGS-$(1)_sve.c += $(sve-cflags)
76 CFLAGS-bench-double-sve-$(1).c += $(sve-cflags)
77 endef
79 $(foreach f,$(float-sve-funcs), $(eval $(call sve-float-cflags-template,$(f))))
80 $(foreach f,$(double-sve-funcs), $(eval $(call sve-double-cflags-template,$(f))))
82 CFLAGS-test-float-sve-wrappers.c = $(sve-cflags)
83 CFLAGS-test-double-sve-wrappers.c = $(sve-cflags)