]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/Makeconfig
x86-64: Add vector erf/erff to libmvec microbenchmark
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / Makeconfig
CommitLineData
d962cce1
L
1# Generate libmvec.mk for libmvec ABI tests.
2
581c785b 3# Copyright (C) 2021-2022 Free Software Foundation, Inc.
d962cce1
L
4# This file is part of the GNU C Library.
5
6# The GNU C Library is free software; you can redistribute it and/or
7# modify it under the terms of the GNU Lesser General Public
8# License as published by the Free Software Foundation; either
9# version 2.1 of the License, or (at your option) any later version.
10
11# The GNU C Library is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14# Lesser General Public License for more details.
15
16# You should have received a copy of the GNU Lesser General Public
17# License along with the GNU C Library; if not, see
18# <https://www.gnu.org/licenses/>.
19
20-include $(common-objpfx)libmvec.mk
21postclean-generated += libmvec.mk
22
23# Define for both math and mathvec directories.
24libmvec-funcs = \
f20f980c 25 acos \
0625489c 26 acosh \
11c01de1 27 asin \
e682d015 28 asinh \
14631017 29 atan \
2941a24f 30 atan2 \
6dea4dd3 31 atanh \
2bf02c58 32 cbrt \
d962cce1 33 cos \
ef7ea9c1 34 cosh \
f9ce13fd 35 erf \
8881cca8 36 erfc \
d962cce1 37 exp \
8b726453 38 exp10 \
3fc9ccc2 39 exp2 \
76ddc74e 40 expm1 \
37475ba8 41 hypot \
d962cce1 42 log \
8f856602 43 log10 \
74265c16 44 log1p \
7e1722fe 45 log2 \
d962cce1
L
46 pow \
47 sin \
48 sincos \
aa1809a1 49 sinh \
c21c7bc2 50 tan \
c0f36fc3 51 tanh \
d962cce1 52
a43c0b54
SP
53# Define libmvec function for benchtests directory.
54libmvec-bench-funcs = \
811124ce 55 acos \
157bdb5f 56 acosh \
e96f2542 57 asin \
7e05d94e 58 atan \
16aec301 59 atan2 \
0050c9a4 60 atanh \
fec48238 61 cbrt \
44436955 62 cos \
54cf4f31 63 cosh \
475ed201 64 erf \
37df38bd 65 exp \
abebb261 66 exp10 \
b0e43607 67 exp2 \
049555aa 68 expm1 \
b0a11070 69 hypot \
8ab8afb3 70 log \
e43b757e 71 log10 \
171817d8 72 log1p \
b6b2be5c 73 log2 \
6a556bac 74 pow \
c58d3b7d 75 sin \
6acc09c5 76 sinh \
a43c0b54
SP
77
78bench-libmvec-double = \
79 $(addprefix double-vlen1-, $(libmvec-bench-funcs)) \
80 $(addprefix double-vlen2-, $(libmvec-bench-funcs)) \
81 $(addprefix double-vlen4-, $(libmvec-bench-funcs)) \
82 $(addprefix double-vlen4-avx2-, $(libmvec-bench-funcs)) \
83 $(addprefix double-vlen8-, $(libmvec-bench-funcs)) \
84
85bench-libmvec-float = \
86 $(addsuffix f, $(addprefix float-vlen1-, $(libmvec-bench-funcs))) \
87 $(addsuffix f, $(addprefix float-vlen4-, $(libmvec-bench-funcs))) \
88 $(addsuffix f, $(addprefix float-vlen8-, $(libmvec-bench-funcs))) \
89 $(addsuffix f, $(addprefix float-vlen8-avx2-, $(libmvec-bench-funcs))) \
90 $(addsuffix f, $(addprefix float-vlen16-, $(libmvec-bench-funcs))) \
91
d962cce1
L
92# The base libmvec ABI tests.
93libmvec-abi-func-tests = \
4f690aad
SP
94 $(addprefix test-double-libmvec-,$(libmvec-funcs)) \
95 $(addsuffix f,$(addprefix test-float-libmvec-,$(libmvec-funcs)))
d962cce1
L
96
97# The AVX libmvec ABI tests.
98libmvec-abi-func-avx-tests = \
99 $(addsuffix -avx,$(libmvec-abi-func-tests))
100#
101# The AVX2 libmvec ABI tests.
102libmvec-abi-func-avx2-tests = \
103 $(addsuffix -avx2,$(libmvec-abi-func-tests))
104#
105# The AVX512F libmvec ABI tests.
106libmvec-abi-func-avx512f-tests = \
107 $(addsuffix -avx512f,$(libmvec-abi-func-tests))
108
109$(common-objpfx)libmvec.mk: $(common-objpfx)config.make
110 (echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
111 echo; \
112 for i in "" "-avx" "-avx2" "-avx512f"; do \
113 for t in $(libmvec-abi-func-tests); do \
114 echo "\$$(objpfx)$$t$$i: \\"; \
115 echo " \$$(objpfx)$$t$$i.o \\"; \
116 echo " \$$(objpfx)test-libmvec$$i.o \$$(libmvec)"; \
117 echo; \
118 done; \
119 done; \
4f690aad 120 for t in $(libmvec-funcs); do \
d962cce1
L
121 echo "CFLAGS-test-double-libmvec-$$t.c = \\"; \
122 echo " \$$(libmvec-abi-test-cflags)"; \
123 echo "CFLAGS-test-double-libmvec-$$t-avx.c = \\"; \
124 echo " \$$(libmvec-abi-test-cflags) \\"; \
125 echo " \$$(double-vlen4-arch-ext-cflags)"; \
126 echo "CFLAGS-test-double-libmvec-$$t-avx2.c = \\"; \
127 echo " \$$(libmvec-abi-test-cflags) \\"; \
128 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
129 echo "CFLAGS-test-double-libmvec-$$t-avx512f.c = \\"; \
130 echo " \$$(libmvec-abi-test-cflags) \\"; \
131 echo " \$$(double-vlen8-arch-ext-cflags)"; \
132 echo; \
133 echo "CFLAGS-test-float-libmvec-$${t}f.c = \\"; \
134 echo " \$$(libmvec-abi-test-cflags)"; \
135 echo "CFLAGS-test-float-libmvec-$${t}f-avx.c = \\"; \
136 echo " \$$(libmvec-abi-test-cflags) \\"; \
137 echo " \$$(float-vlen8-arch-ext-cflags)"; \
138 echo "CFLAGS-test-float-libmvec-$${t}f-avx2.c = \\"; \
139 echo " \$$(libmvec-abi-test-cflags) \\"; \
140 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
141 echo "CFLAGS-test-float-libmvec-$${t}f-avx512f.c = \\"; \
142 echo " \$$(libmvec-abi-test-cflags) \\"; \
143 echo " \$$(float-vlen16-arch-ext-cflags)"; \
144 echo; \
145 done; \
a43c0b54
SP
146 echo "endif"; \
147 echo "ifeq (\$$(subdir),benchtests)"; \
148 for t in $(libmvec-bench-funcs); do \
149 echo "CFLAGS-bench-double-vlen4-$$t.c = \\"; \
150 echo " \$$(double-vlen4-arch-ext-cflags)"; \
151 echo "CFLAGS-bench-double-vlen4-avx2-$$t.c = \\"; \
152 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
153 echo "CFLAGS-bench-double-vlen8-$$t.c = \\"; \
154 echo " \$$(double-vlen8-arch-ext-cflags)"; \
155 echo; \
156 echo "CFLAGS-bench-float-vlen8-$${t}f.c = \\"; \
157 echo " \$$(float-vlen8-arch-ext-cflags)"; \
158 echo "CFLAGS-bench-float-vlen8-avx2-$${t}f.c = \\"; \
159 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
160 echo "CFLAGS-bench-float-vlen16-$${t}f.c = \\"; \
161 echo " \$$(float-vlen16-arch-ext-cflags)"; \
162 echo; \
163 done; \
d962cce1
L
164 echo "endif") > $@T
165 mv -f $@T $@