]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/Makeconfig
x86-64: Add vector sinh/sinhf 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 \
e96f2542 56 asin \
7e05d94e 57 atan \
44436955 58 cos \
54cf4f31 59 cosh \
37df38bd 60 exp \
abebb261 61 exp10 \
b0e43607 62 exp2 \
049555aa 63 expm1 \
b0a11070 64 hypot \
8ab8afb3 65 log \
6a556bac 66 pow \
c58d3b7d 67 sin \
6acc09c5 68 sinh \
a43c0b54
SP
69
70bench-libmvec-double = \
71 $(addprefix double-vlen1-, $(libmvec-bench-funcs)) \
72 $(addprefix double-vlen2-, $(libmvec-bench-funcs)) \
73 $(addprefix double-vlen4-, $(libmvec-bench-funcs)) \
74 $(addprefix double-vlen4-avx2-, $(libmvec-bench-funcs)) \
75 $(addprefix double-vlen8-, $(libmvec-bench-funcs)) \
76
77bench-libmvec-float = \
78 $(addsuffix f, $(addprefix float-vlen1-, $(libmvec-bench-funcs))) \
79 $(addsuffix f, $(addprefix float-vlen4-, $(libmvec-bench-funcs))) \
80 $(addsuffix f, $(addprefix float-vlen8-, $(libmvec-bench-funcs))) \
81 $(addsuffix f, $(addprefix float-vlen8-avx2-, $(libmvec-bench-funcs))) \
82 $(addsuffix f, $(addprefix float-vlen16-, $(libmvec-bench-funcs))) \
83
d962cce1
L
84# The base libmvec ABI tests.
85libmvec-abi-func-tests = \
4f690aad
SP
86 $(addprefix test-double-libmvec-,$(libmvec-funcs)) \
87 $(addsuffix f,$(addprefix test-float-libmvec-,$(libmvec-funcs)))
d962cce1
L
88
89# The AVX libmvec ABI tests.
90libmvec-abi-func-avx-tests = \
91 $(addsuffix -avx,$(libmvec-abi-func-tests))
92#
93# The AVX2 libmvec ABI tests.
94libmvec-abi-func-avx2-tests = \
95 $(addsuffix -avx2,$(libmvec-abi-func-tests))
96#
97# The AVX512F libmvec ABI tests.
98libmvec-abi-func-avx512f-tests = \
99 $(addsuffix -avx512f,$(libmvec-abi-func-tests))
100
101$(common-objpfx)libmvec.mk: $(common-objpfx)config.make
102 (echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
103 echo; \
104 for i in "" "-avx" "-avx2" "-avx512f"; do \
105 for t in $(libmvec-abi-func-tests); do \
106 echo "\$$(objpfx)$$t$$i: \\"; \
107 echo " \$$(objpfx)$$t$$i.o \\"; \
108 echo " \$$(objpfx)test-libmvec$$i.o \$$(libmvec)"; \
109 echo; \
110 done; \
111 done; \
4f690aad 112 for t in $(libmvec-funcs); do \
d962cce1
L
113 echo "CFLAGS-test-double-libmvec-$$t.c = \\"; \
114 echo " \$$(libmvec-abi-test-cflags)"; \
115 echo "CFLAGS-test-double-libmvec-$$t-avx.c = \\"; \
116 echo " \$$(libmvec-abi-test-cflags) \\"; \
117 echo " \$$(double-vlen4-arch-ext-cflags)"; \
118 echo "CFLAGS-test-double-libmvec-$$t-avx2.c = \\"; \
119 echo " \$$(libmvec-abi-test-cflags) \\"; \
120 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
121 echo "CFLAGS-test-double-libmvec-$$t-avx512f.c = \\"; \
122 echo " \$$(libmvec-abi-test-cflags) \\"; \
123 echo " \$$(double-vlen8-arch-ext-cflags)"; \
124 echo; \
125 echo "CFLAGS-test-float-libmvec-$${t}f.c = \\"; \
126 echo " \$$(libmvec-abi-test-cflags)"; \
127 echo "CFLAGS-test-float-libmvec-$${t}f-avx.c = \\"; \
128 echo " \$$(libmvec-abi-test-cflags) \\"; \
129 echo " \$$(float-vlen8-arch-ext-cflags)"; \
130 echo "CFLAGS-test-float-libmvec-$${t}f-avx2.c = \\"; \
131 echo " \$$(libmvec-abi-test-cflags) \\"; \
132 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
133 echo "CFLAGS-test-float-libmvec-$${t}f-avx512f.c = \\"; \
134 echo " \$$(libmvec-abi-test-cflags) \\"; \
135 echo " \$$(float-vlen16-arch-ext-cflags)"; \
136 echo; \
137 done; \
a43c0b54
SP
138 echo "endif"; \
139 echo "ifeq (\$$(subdir),benchtests)"; \
140 for t in $(libmvec-bench-funcs); do \
141 echo "CFLAGS-bench-double-vlen4-$$t.c = \\"; \
142 echo " \$$(double-vlen4-arch-ext-cflags)"; \
143 echo "CFLAGS-bench-double-vlen4-avx2-$$t.c = \\"; \
144 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
145 echo "CFLAGS-bench-double-vlen8-$$t.c = \\"; \
146 echo " \$$(double-vlen8-arch-ext-cflags)"; \
147 echo; \
148 echo "CFLAGS-bench-float-vlen8-$${t}f.c = \\"; \
149 echo " \$$(float-vlen8-arch-ext-cflags)"; \
150 echo "CFLAGS-bench-float-vlen8-avx2-$${t}f.c = \\"; \
151 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
152 echo "CFLAGS-bench-float-vlen16-$${t}f.c = \\"; \
153 echo " \$$(float-vlen16-arch-ext-cflags)"; \
154 echo; \
155 done; \
d962cce1
L
156 echo "endif") > $@T
157 mv -f $@T $@