diff options
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r-- | sysdeps/x86_64/fpu/Makefile | 13 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/libm-test-ulps | 8 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c | 25 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen16.c | 25 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c | 25 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen4.c | 23 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c | 28 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen8-avx2.c | 28 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c | 25 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/test-float-vlen8.c | 23 |
10 files changed, 221 insertions, 2 deletions
diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile index af0d2af261..454cfbad0b 100644 --- a/sysdeps/x86_64/fpu/Makefile +++ b/sysdeps/x86_64/fpu/Makefile @@ -9,10 +9,11 @@ endif # Variables for libmvec tests. ifeq ($(subdir),math) ifeq ($(build-mathvec),yes) -libmvec-tests += double-vlen2 double-vlen4 double-vlen4-avx2 +libmvec-tests += double-vlen2 double-vlen4 double-vlen4-avx2 \ + float-vlen4 float-vlen8 float-vlen8-avx2 ifeq (yes,$(config-cflags-avx512)) -libmvec-tests += double-vlen8 +libmvec-tests += double-vlen8 float-vlen16 endif double-vlen2-arch-ext-cflags = -msse4 @@ -20,8 +21,16 @@ double-vlen4-arch-ext-cflags = -mavx double-vlen4-arch-ext2-cflags = -mavx2 double-vlen8-arch-ext-cflags = -mavx512f +float-vlen4-arch-ext-cflags = -msse4 +float-vlen8-arch-ext-cflags = -mavx +float-vlen8-arch-ext2-cflags = -mavx2 +float-vlen16-arch-ext-cflags = -mavx512f + CFLAGS-test-double-vlen4-avx2.c = $(libm-test-vec-cflags) CFLAGS-test-double-vlen4-avx2-wrappers.c = $(double-vlen4-arch-ext2-cflags) +CFLAGS-test-float-vlen8-avx2.c = $(libm-test-vec-cflags) +CFLAGS-test-float-vlen8-avx2-wrappers.c = $(float-vlen8-arch-ext2-cflags) + endif endif diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 0d1f6e830c..ed152d85f6 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -965,17 +965,25 @@ idouble: 1 ildouble: 2 ldouble: 2 +Function: "cos_vlen16": +float: 1 + Function: "cos_vlen2": double: 1 Function: "cos_vlen4": double: 1 +float: 1 Function: "cos_vlen4_avx2": double: 1 Function: "cos_vlen8": double: 1 +float: 1 + +Function: "cos_vlen8_avx2": +float: 1 Function: "cosh": double: 1 diff --git a/sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c b/sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c new file mode 100644 index 0000000000..2bb155f4de --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c @@ -0,0 +1,25 @@ +/* Wrapper part of tests for AVX-512 ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen16.h" +#include "test-vec-loop.h" +#include <immintrin.h> + +#define VEC_TYPE __m512 + +VECTOR_WRAPPER (WRAPPER_NAME (cosf), _ZGVeN16v_cosf) diff --git a/sysdeps/x86_64/fpu/test-float-vlen16.c b/sysdeps/x86_64/fpu/test-float-vlen16.c new file mode 100644 index 0000000000..a664ad9383 --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen16.c @@ -0,0 +1,25 @@ +/* Tests for AVX-512 ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen16.h" + +#define TEST_VECTOR_cosf 1 + +#define REQUIRE_AVX512F + +#include "libm-test.c" diff --git a/sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c b/sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c new file mode 100644 index 0000000000..05d6a40241 --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c @@ -0,0 +1,25 @@ +/* Wrapper part of tests for SSE ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen4.h" +#include "test-vec-loop.h" +#include <immintrin.h> + +#define VEC_TYPE __m128 + +VECTOR_WRAPPER (WRAPPER_NAME (cosf), _ZGVbN4v_cosf) diff --git a/sysdeps/x86_64/fpu/test-float-vlen4.c b/sysdeps/x86_64/fpu/test-float-vlen4.c new file mode 100644 index 0000000000..894652096f --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen4.c @@ -0,0 +1,23 @@ +/* Tests for SSE ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen4.h" + +#define TEST_VECTOR_cosf 1 + +#include "libm-test.c" diff --git a/sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c b/sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c new file mode 100644 index 0000000000..cff9941e66 --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c @@ -0,0 +1,28 @@ +/* Wrapper part of tests for AVX2 ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen8.h" +#include "test-vec-loop.h" +#include <immintrin.h> + +#undef VEC_SUFF +#define VEC_SUFF _vlen8_avx2 + +#define VEC_TYPE __m256 + +VECTOR_WRAPPER (WRAPPER_NAME (cosf), _ZGVdN8v_cosf) diff --git a/sysdeps/x86_64/fpu/test-float-vlen8-avx2.c b/sysdeps/x86_64/fpu/test-float-vlen8-avx2.c new file mode 100644 index 0000000000..f0ee6f2a96 --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen8-avx2.c @@ -0,0 +1,28 @@ +/* Tests for AVX2 ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen8.h" + +#undef VEC_SUFF +#define VEC_SUFF _vlen8_avx2 + +#define TEST_VECTOR_cosf 1 + +#define REQUIRE_AVX2 + +#include "libm-test.c" diff --git a/sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c b/sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c new file mode 100644 index 0000000000..c2305a39a8 --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c @@ -0,0 +1,25 @@ +/* Wrapper part of tests for AVX ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen8.h" +#include "test-vec-loop.h" +#include <immintrin.h> + +#define VEC_TYPE __m256 + +VECTOR_WRAPPER (WRAPPER_NAME (cosf), _ZGVcN8v_cosf) diff --git a/sysdeps/x86_64/fpu/test-float-vlen8.c b/sysdeps/x86_64/fpu/test-float-vlen8.c new file mode 100644 index 0000000000..b96dec697c --- /dev/null +++ b/sysdeps/x86_64/fpu/test-float-vlen8.c @@ -0,0 +1,23 @@ +/* Tests for AVX ISA versions of vector math functions. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + 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 + <http://www.gnu.org/licenses/>. */ + +#include "test-float-vlen8.h" + +#define TEST_VECTOR_cosf 1 + +#include "libm-test.c" |