]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/x86_64/fpu/Makeconfig
x86-64: Add vector log10/log10f implementation to libmvec
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / Makeconfig
1 # Generate libmvec.mk for libmvec ABI tests.
2
3 # Copyright (C) 2021 Free Software Foundation, Inc.
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
21 postclean-generated += libmvec.mk
22
23 # Define for both math and mathvec directories.
24 libmvec-funcs = \
25 acos \
26 asin \
27 atan \
28 atan2 \
29 cbrt \
30 cos \
31 cosh \
32 exp \
33 exp10 \
34 exp2 \
35 expm1 \
36 hypot \
37 log \
38 log10 \
39 pow \
40 sin \
41 sincos \
42 sinh \
43
44 # Define libmvec function for benchtests directory.
45 libmvec-bench-funcs = \
46 cos \
47 exp \
48 log \
49 pow \
50 sin \
51
52 bench-libmvec-double = \
53 $(addprefix double-vlen1-, $(libmvec-bench-funcs)) \
54 $(addprefix double-vlen2-, $(libmvec-bench-funcs)) \
55 $(addprefix double-vlen4-, $(libmvec-bench-funcs)) \
56 $(addprefix double-vlen4-avx2-, $(libmvec-bench-funcs)) \
57 $(addprefix double-vlen8-, $(libmvec-bench-funcs)) \
58
59 bench-libmvec-float = \
60 $(addsuffix f, $(addprefix float-vlen1-, $(libmvec-bench-funcs))) \
61 $(addsuffix f, $(addprefix float-vlen4-, $(libmvec-bench-funcs))) \
62 $(addsuffix f, $(addprefix float-vlen8-, $(libmvec-bench-funcs))) \
63 $(addsuffix f, $(addprefix float-vlen8-avx2-, $(libmvec-bench-funcs))) \
64 $(addsuffix f, $(addprefix float-vlen16-, $(libmvec-bench-funcs))) \
65
66 # The base libmvec ABI tests.
67 libmvec-abi-func-tests = \
68 $(addprefix test-double-libmvec-,$(libmvec-funcs)) \
69 $(addsuffix f,$(addprefix test-float-libmvec-,$(libmvec-funcs)))
70
71 # The AVX libmvec ABI tests.
72 libmvec-abi-func-avx-tests = \
73 $(addsuffix -avx,$(libmvec-abi-func-tests))
74 #
75 # The AVX2 libmvec ABI tests.
76 libmvec-abi-func-avx2-tests = \
77 $(addsuffix -avx2,$(libmvec-abi-func-tests))
78 #
79 # The AVX512F libmvec ABI tests.
80 libmvec-abi-func-avx512f-tests = \
81 $(addsuffix -avx512f,$(libmvec-abi-func-tests))
82
83 $(common-objpfx)libmvec.mk: $(common-objpfx)config.make
84 (echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
85 echo; \
86 for i in "" "-avx" "-avx2" "-avx512f"; do \
87 for t in $(libmvec-abi-func-tests); do \
88 echo "\$$(objpfx)$$t$$i: \\"; \
89 echo " \$$(objpfx)$$t$$i.o \\"; \
90 echo " \$$(objpfx)test-libmvec$$i.o \$$(libmvec)"; \
91 echo; \
92 done; \
93 done; \
94 for t in $(libmvec-funcs); do \
95 echo "CFLAGS-test-double-libmvec-$$t.c = \\"; \
96 echo " \$$(libmvec-abi-test-cflags)"; \
97 echo "CFLAGS-test-double-libmvec-$$t-avx.c = \\"; \
98 echo " \$$(libmvec-abi-test-cflags) \\"; \
99 echo " \$$(double-vlen4-arch-ext-cflags)"; \
100 echo "CFLAGS-test-double-libmvec-$$t-avx2.c = \\"; \
101 echo " \$$(libmvec-abi-test-cflags) \\"; \
102 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
103 echo "CFLAGS-test-double-libmvec-$$t-avx512f.c = \\"; \
104 echo " \$$(libmvec-abi-test-cflags) \\"; \
105 echo " \$$(double-vlen8-arch-ext-cflags)"; \
106 echo; \
107 echo "CFLAGS-test-float-libmvec-$${t}f.c = \\"; \
108 echo " \$$(libmvec-abi-test-cflags)"; \
109 echo "CFLAGS-test-float-libmvec-$${t}f-avx.c = \\"; \
110 echo " \$$(libmvec-abi-test-cflags) \\"; \
111 echo " \$$(float-vlen8-arch-ext-cflags)"; \
112 echo "CFLAGS-test-float-libmvec-$${t}f-avx2.c = \\"; \
113 echo " \$$(libmvec-abi-test-cflags) \\"; \
114 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
115 echo "CFLAGS-test-float-libmvec-$${t}f-avx512f.c = \\"; \
116 echo " \$$(libmvec-abi-test-cflags) \\"; \
117 echo " \$$(float-vlen16-arch-ext-cflags)"; \
118 echo; \
119 done; \
120 echo "endif"; \
121 echo "ifeq (\$$(subdir),benchtests)"; \
122 for t in $(libmvec-bench-funcs); do \
123 echo "CFLAGS-bench-double-vlen4-$$t.c = \\"; \
124 echo " \$$(double-vlen4-arch-ext-cflags)"; \
125 echo "CFLAGS-bench-double-vlen4-avx2-$$t.c = \\"; \
126 echo " \$$(double-vlen4-arch-ext2-cflags)"; \
127 echo "CFLAGS-bench-double-vlen8-$$t.c = \\"; \
128 echo " \$$(double-vlen8-arch-ext-cflags)"; \
129 echo; \
130 echo "CFLAGS-bench-float-vlen8-$${t}f.c = \\"; \
131 echo " \$$(float-vlen8-arch-ext-cflags)"; \
132 echo "CFLAGS-bench-float-vlen8-avx2-$${t}f.c = \\"; \
133 echo " \$$(float-vlen8-arch-ext2-cflags)"; \
134 echo "CFLAGS-bench-float-vlen16-$${t}f.c = \\"; \
135 echo " \$$(float-vlen16-arch-ext-cflags)"; \
136 echo; \
137 done; \
138 echo "endif") > $@T
139 mv -f $@T $@