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