2021-10-12 01:07:09 +00:00
|
|
|
# Generate libmvec.mk for libmvec ABI tests.
|
|
|
|
|
2022-01-01 18:54:23 +00:00
|
|
|
# Copyright (C) 2021-2022 Free Software Foundation, Inc.
|
2021-10-12 01:07:09 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with the GNU C Library; if not, see
|
|
|
|
# <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
-include $(common-objpfx)libmvec.mk
|
|
|
|
postclean-generated += libmvec.mk
|
|
|
|
|
|
|
|
# Define for both math and mathvec directories.
|
|
|
|
libmvec-funcs = \
|
2021-12-22 14:20:41 +00:00
|
|
|
acos \
|
2021-12-29 17:48:17 +00:00
|
|
|
acosh \
|
2021-12-29 16:29:26 +00:00
|
|
|
asin \
|
2021-12-29 18:07:02 +00:00
|
|
|
asinh \
|
2021-12-29 16:23:33 +00:00
|
|
|
atan \
|
2021-12-29 17:17:28 +00:00
|
|
|
atan2 \
|
2021-12-29 17:42:04 +00:00
|
|
|
atanh \
|
2021-12-29 17:11:23 +00:00
|
|
|
cbrt \
|
2021-10-12 01:07:09 +00:00
|
|
|
cos \
|
2021-12-29 16:53:16 +00:00
|
|
|
cosh \
|
2021-12-29 17:54:31 +00:00
|
|
|
erf \
|
2021-12-29 18:13:20 +00:00
|
|
|
erfc \
|
2021-10-12 01:07:09 +00:00
|
|
|
exp \
|
2021-12-29 16:47:16 +00:00
|
|
|
exp10 \
|
2021-12-29 16:41:18 +00:00
|
|
|
exp2 \
|
2021-12-29 16:59:16 +00:00
|
|
|
expm1 \
|
2021-12-29 16:35:22 +00:00
|
|
|
hypot \
|
2021-10-12 01:07:09 +00:00
|
|
|
log \
|
2021-12-29 17:23:37 +00:00
|
|
|
log10 \
|
2021-12-29 17:35:53 +00:00
|
|
|
log1p \
|
2021-12-29 17:29:44 +00:00
|
|
|
log2 \
|
2021-10-12 01:07:09 +00:00
|
|
|
pow \
|
|
|
|
sin \
|
|
|
|
sincos \
|
2021-12-29 17:05:18 +00:00
|
|
|
sinh \
|
2021-12-29 18:19:39 +00:00
|
|
|
tan \
|
2021-12-29 18:00:47 +00:00
|
|
|
tanh \
|
2021-10-12 01:07:09 +00:00
|
|
|
|
2021-11-05 07:56:47 +00:00
|
|
|
# Define libmvec function for benchtests directory.
|
|
|
|
libmvec-bench-funcs = \
|
2021-12-30 18:11:23 +00:00
|
|
|
acos \
|
2021-12-30 18:18:48 +00:00
|
|
|
asin \
|
2021-12-30 18:15:03 +00:00
|
|
|
atan \
|
2021-12-30 18:46:23 +00:00
|
|
|
cbrt \
|
2021-11-05 20:44:49 +00:00
|
|
|
cos \
|
2021-12-30 18:34:12 +00:00
|
|
|
cosh \
|
2021-11-06 06:11:00 +00:00
|
|
|
exp \
|
2021-12-30 18:30:16 +00:00
|
|
|
exp10 \
|
2021-12-30 18:26:23 +00:00
|
|
|
exp2 \
|
2021-12-30 18:38:12 +00:00
|
|
|
expm1 \
|
2021-12-30 18:22:34 +00:00
|
|
|
hypot \
|
2021-11-06 06:15:20 +00:00
|
|
|
log \
|
2021-11-06 06:19:53 +00:00
|
|
|
pow \
|
2021-11-06 06:29:02 +00:00
|
|
|
sin \
|
2021-12-30 18:42:16 +00:00
|
|
|
sinh \
|
2021-11-05 07:56:47 +00:00
|
|
|
|
|
|
|
bench-libmvec-double = \
|
|
|
|
$(addprefix double-vlen1-, $(libmvec-bench-funcs)) \
|
|
|
|
$(addprefix double-vlen2-, $(libmvec-bench-funcs)) \
|
|
|
|
$(addprefix double-vlen4-, $(libmvec-bench-funcs)) \
|
|
|
|
$(addprefix double-vlen4-avx2-, $(libmvec-bench-funcs)) \
|
|
|
|
$(addprefix double-vlen8-, $(libmvec-bench-funcs)) \
|
|
|
|
|
|
|
|
bench-libmvec-float = \
|
|
|
|
$(addsuffix f, $(addprefix float-vlen1-, $(libmvec-bench-funcs))) \
|
|
|
|
$(addsuffix f, $(addprefix float-vlen4-, $(libmvec-bench-funcs))) \
|
|
|
|
$(addsuffix f, $(addprefix float-vlen8-, $(libmvec-bench-funcs))) \
|
|
|
|
$(addsuffix f, $(addprefix float-vlen8-avx2-, $(libmvec-bench-funcs))) \
|
|
|
|
$(addsuffix f, $(addprefix float-vlen16-, $(libmvec-bench-funcs))) \
|
|
|
|
|
2021-10-12 01:07:09 +00:00
|
|
|
# The base libmvec ABI tests.
|
|
|
|
libmvec-abi-func-tests = \
|
2021-10-13 20:37:24 +00:00
|
|
|
$(addprefix test-double-libmvec-,$(libmvec-funcs)) \
|
|
|
|
$(addsuffix f,$(addprefix test-float-libmvec-,$(libmvec-funcs)))
|
2021-10-12 01:07:09 +00:00
|
|
|
|
|
|
|
# The AVX libmvec ABI tests.
|
|
|
|
libmvec-abi-func-avx-tests = \
|
|
|
|
$(addsuffix -avx,$(libmvec-abi-func-tests))
|
|
|
|
#
|
|
|
|
# The AVX2 libmvec ABI tests.
|
|
|
|
libmvec-abi-func-avx2-tests = \
|
|
|
|
$(addsuffix -avx2,$(libmvec-abi-func-tests))
|
|
|
|
#
|
|
|
|
# The AVX512F libmvec ABI tests.
|
|
|
|
libmvec-abi-func-avx512f-tests = \
|
|
|
|
$(addsuffix -avx512f,$(libmvec-abi-func-tests))
|
|
|
|
|
|
|
|
$(common-objpfx)libmvec.mk: $(common-objpfx)config.make
|
|
|
|
(echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
|
|
|
|
echo; \
|
|
|
|
for i in "" "-avx" "-avx2" "-avx512f"; do \
|
|
|
|
for t in $(libmvec-abi-func-tests); do \
|
|
|
|
echo "\$$(objpfx)$$t$$i: \\"; \
|
|
|
|
echo " \$$(objpfx)$$t$$i.o \\"; \
|
|
|
|
echo " \$$(objpfx)test-libmvec$$i.o \$$(libmvec)"; \
|
|
|
|
echo; \
|
|
|
|
done; \
|
|
|
|
done; \
|
2021-10-13 20:37:24 +00:00
|
|
|
for t in $(libmvec-funcs); do \
|
2021-10-12 01:07:09 +00:00
|
|
|
echo "CFLAGS-test-double-libmvec-$$t.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags)"; \
|
|
|
|
echo "CFLAGS-test-double-libmvec-$$t-avx.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(double-vlen4-arch-ext-cflags)"; \
|
|
|
|
echo "CFLAGS-test-double-libmvec-$$t-avx2.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(double-vlen4-arch-ext2-cflags)"; \
|
|
|
|
echo "CFLAGS-test-double-libmvec-$$t-avx512f.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(double-vlen8-arch-ext-cflags)"; \
|
|
|
|
echo; \
|
|
|
|
echo "CFLAGS-test-float-libmvec-$${t}f.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags)"; \
|
|
|
|
echo "CFLAGS-test-float-libmvec-$${t}f-avx.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(float-vlen8-arch-ext-cflags)"; \
|
|
|
|
echo "CFLAGS-test-float-libmvec-$${t}f-avx2.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(float-vlen8-arch-ext2-cflags)"; \
|
|
|
|
echo "CFLAGS-test-float-libmvec-$${t}f-avx512f.c = \\"; \
|
|
|
|
echo " \$$(libmvec-abi-test-cflags) \\"; \
|
|
|
|
echo " \$$(float-vlen16-arch-ext-cflags)"; \
|
|
|
|
echo; \
|
|
|
|
done; \
|
2021-11-05 07:56:47 +00:00
|
|
|
echo "endif"; \
|
|
|
|
echo "ifeq (\$$(subdir),benchtests)"; \
|
|
|
|
for t in $(libmvec-bench-funcs); do \
|
|
|
|
echo "CFLAGS-bench-double-vlen4-$$t.c = \\"; \
|
|
|
|
echo " \$$(double-vlen4-arch-ext-cflags)"; \
|
|
|
|
echo "CFLAGS-bench-double-vlen4-avx2-$$t.c = \\"; \
|
|
|
|
echo " \$$(double-vlen4-arch-ext2-cflags)"; \
|
|
|
|
echo "CFLAGS-bench-double-vlen8-$$t.c = \\"; \
|
|
|
|
echo " \$$(double-vlen8-arch-ext-cflags)"; \
|
|
|
|
echo; \
|
|
|
|
echo "CFLAGS-bench-float-vlen8-$${t}f.c = \\"; \
|
|
|
|
echo " \$$(float-vlen8-arch-ext-cflags)"; \
|
|
|
|
echo "CFLAGS-bench-float-vlen8-avx2-$${t}f.c = \\"; \
|
|
|
|
echo " \$$(float-vlen8-arch-ext2-cflags)"; \
|
|
|
|
echo "CFLAGS-bench-float-vlen16-$${t}f.c = \\"; \
|
|
|
|
echo " \$$(float-vlen16-arch-ext-cflags)"; \
|
|
|
|
echo; \
|
|
|
|
done; \
|
2021-10-12 01:07:09 +00:00
|
|
|
echo "endif") > $@T
|
|
|
|
mv -f $@T $@
|