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