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