]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/Makeconfig
x86-64: Add vector tanh/tanhf 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 \
b263a015 77 tanh \
a43c0b54
SP
78
79bench-libmvec-double = \
80 $(addprefix double-vlen1-, $(libmvec-bench-funcs)) \
81 $(addprefix double-vlen2-, $(libmvec-bench-funcs)) \
82 $(addprefix double-vlen4-, $(libmvec-bench-funcs)) \
83 $(addprefix double-vlen4-avx2-, $(libmvec-bench-funcs)) \
84 $(addprefix double-vlen8-, $(libmvec-bench-funcs)) \
85
86bench-libmvec-float = \
87 $(addsuffix f, $(addprefix float-vlen1-, $(libmvec-bench-funcs))) \
88 $(addsuffix f, $(addprefix float-vlen4-, $(libmvec-bench-funcs))) \
89 $(addsuffix f, $(addprefix float-vlen8-, $(libmvec-bench-funcs))) \
90 $(addsuffix f, $(addprefix float-vlen8-avx2-, $(libmvec-bench-funcs))) \
91 $(addsuffix f, $(addprefix float-vlen16-, $(libmvec-bench-funcs))) \
92
d962cce1
L
93# The base libmvec ABI tests.
94libmvec-abi-func-tests = \
4f690aad
SP
95 $(addprefix test-double-libmvec-,$(libmvec-funcs)) \
96 $(addsuffix f,$(addprefix test-float-libmvec-,$(libmvec-funcs)))
d962cce1
L
97
98# The AVX libmvec ABI tests.
99libmvec-abi-func-avx-tests = \
100 $(addsuffix -avx,$(libmvec-abi-func-tests))
101#
102# The AVX2 libmvec ABI tests.
103libmvec-abi-func-avx2-tests = \
104 $(addsuffix -avx2,$(libmvec-abi-func-tests))
105#
106# The AVX512F libmvec ABI tests.
107libmvec-abi-func-avx512f-tests = \
108 $(addsuffix -avx512f,$(libmvec-abi-func-tests))
109
110$(common-objpfx)libmvec.mk: $(common-objpfx)config.make
111 (echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
112 echo; \
113 for i in "" "-avx" "-avx2" "-avx512f"; do \
114 for t in $(libmvec-abi-func-tests); do \
115 echo "\$$(objpfx)$$t$$i: \\"; \
116 echo " \$$(objpfx)$$t$$i.o \\"; \
117 echo " \$$(objpfx)test-libmvec$$i.o \$$(libmvec)"; \
118 echo; \
119 done; \
120 done; \
4f690aad 121 for t in $(libmvec-funcs); do \
d962cce1
L
122 echo "CFLAGS-test-double-libmvec-$$t.c = \\"; \
123 echo " \$$(libmvec-abi-test-cflags)"; \
124 echo "CFLAGS-test-double-libmvec-$$t-avx.c = \\"; \
125 echo " \$$(libmvec-abi-test-cflags) \\"; \
126 echo " \$$(double-vlen4-arch-ext-cflags)"; \
127 echo "CFLAGS-test-double-libmvec-$$t-avx2.c = \\"; \
128 echo " \$$(libmvec-abi-test-cflags) \\"; \
129 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
130 echo "CFLAGS-test-double-libmvec-$$t-avx512f.c = \\"; \
131 echo " \$$(libmvec-abi-test-cflags) \\"; \
132 echo " \$$(double-vlen8-arch-ext-cflags)"; \
133 echo; \
134 echo "CFLAGS-test-float-libmvec-$${t}f.c = \\"; \
135 echo " \$$(libmvec-abi-test-cflags)"; \
136 echo "CFLAGS-test-float-libmvec-$${t}f-avx.c = \\"; \
137 echo " \$$(libmvec-abi-test-cflags) \\"; \
138 echo " \$$(float-vlen8-arch-ext-cflags)"; \
139 echo "CFLAGS-test-float-libmvec-$${t}f-avx2.c = \\"; \
140 echo " \$$(libmvec-abi-test-cflags) \\"; \
141 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
142 echo "CFLAGS-test-float-libmvec-$${t}f-avx512f.c = \\"; \
143 echo " \$$(libmvec-abi-test-cflags) \\"; \
144 echo " \$$(float-vlen16-arch-ext-cflags)"; \
145 echo; \
146 done; \
a43c0b54
SP
147 echo "endif"; \
148 echo "ifeq (\$$(subdir),benchtests)"; \
149 for t in $(libmvec-bench-funcs); do \
150 echo "CFLAGS-bench-double-vlen4-$$t.c = \\"; \
151 echo " \$$(double-vlen4-arch-ext-cflags)"; \
152 echo "CFLAGS-bench-double-vlen4-avx2-$$t.c = \\"; \
153 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
154 echo "CFLAGS-bench-double-vlen8-$$t.c = \\"; \
155 echo " \$$(double-vlen8-arch-ext-cflags)"; \
156 echo; \
157 echo "CFLAGS-bench-float-vlen8-$${t}f.c = \\"; \
158 echo " \$$(float-vlen8-arch-ext-cflags)"; \
159 echo "CFLAGS-bench-float-vlen8-avx2-$${t}f.c = \\"; \
160 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
161 echo "CFLAGS-bench-float-vlen16-$${t}f.c = \\"; \
162 echo " \$$(float-vlen16-arch-ext-cflags)"; \
163 echo; \
164 done; \
d962cce1
L
165 echo "endif") > $@T
166 mv -f $@T $@