mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
2193311288
Here is implementation of cos containing SSE, AVX, AVX2 and AVX512 versions according to Vector ABI which had been discussed in <https://groups.google.com/forum/#!topic/x86-64-abi/LmppCfN1rZ4>. Vector math library build and ABI testing enabled by default for x86_64. * sysdeps/x86_64/fpu/Makefile: New file. * sysdeps/x86_64/fpu/Versions: New file. * sysdeps/x86_64/fpu/svml_d_cos_data.S: New file. * sysdeps/x86_64/fpu/svml_d_cos_data.h: New file. * sysdeps/x86_64/fpu/svml_d_cos2_core.S: New file. * sysdeps/x86_64/fpu/svml_d_cos4_core.S: New file. * sysdeps/x86_64/fpu/svml_d_cos4_core_avx.S: New file. * sysdeps/x86_64/fpu/svml_d_cos8_core.S: New file. * sysdeps/x86_64/fpu/svml_d_wrapper_impl.h: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core_sse4.S: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core_avx2.S: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S: New file. * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S: New file. * sysdeps/x86_64/fpu/multiarch/Makefile (libmvec-sysdep_routines): Added build of SSE, AVX2 and AVX512 IFUNC versions. * sysdeps/x86/fpu/bits/math-vector.h: Added SIMD declaration for cos. * math/bits/mathcalls.h: Added cos declaration with __MATHCALL_VEC. * sysdeps/x86_64/configure.ac: Options for libmvec build. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/sysdep.h (cfi_offset_rel_rsp): New macro. * sysdeps/unix/sysv/linux/x86_64/libmvec.abilist: New file. * manual/install.texi (Configuring and compiling): Document --disable-mathvec. * INSTALL: Regenerated. * NEWS: Mention addition of libmvec and x86_64 vector cos.
115 lines
3.1 KiB
ArmAsm
115 lines
3.1 KiB
ArmAsm
/* Data for vectorized cos.
|
|
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 "svml_d_cos_data.h"
|
|
|
|
.macro double_vector offset value
|
|
.if .-__svml_dcos_data != \offset
|
|
.err
|
|
.endif
|
|
.rept 8
|
|
.quad \value
|
|
.endr
|
|
.endm
|
|
|
|
.section .rodata, "a"
|
|
.align 64
|
|
|
|
/* Data table for vector implementations of function cos.
|
|
The table may contain polynomial, reduction, lookup
|
|
coefficients and other constants obtained through different
|
|
methods of research and experimental work.
|
|
*/
|
|
.globl __svml_dcos_data
|
|
__svml_dcos_data:
|
|
|
|
/* General purpose constants:
|
|
absolute value mask
|
|
*/
|
|
double_vector __dAbsMask 0x7fffffffffffffff
|
|
|
|
/* working range threshold */
|
|
double_vector __dRangeVal 0x4160000000000000
|
|
|
|
/* PI/2 */
|
|
double_vector __dHalfPI 0x3ff921fb54442d18
|
|
|
|
/* 1/PI */
|
|
double_vector __dInvPI 0x3fd45f306dc9c883
|
|
|
|
/* right-shifter constant */
|
|
double_vector __dRShifter 0x4338000000000000
|
|
|
|
/* 0.5 */
|
|
double_vector __dOneHalf 0x3fe0000000000000
|
|
|
|
/* Range reduction PI-based constants:
|
|
PI high part
|
|
*/
|
|
double_vector __dPI1 0x400921fb40000000
|
|
|
|
/* PI mid part 1 */
|
|
double_vector __dPI2 0x3e84442d00000000
|
|
|
|
/* PI mid part 2 */
|
|
double_vector __dPI3 0x3d08469880000000
|
|
|
|
/* PI low part */
|
|
double_vector __dPI4 0x3b88cc51701b839a
|
|
|
|
/* Range reduction PI-based constants if FMA available:
|
|
PI high part (FMA available)
|
|
*/
|
|
double_vector __dPI1_FMA 0x400921fb54442d18
|
|
|
|
/* PI mid part (FMA available) */
|
|
double_vector __dPI2_FMA 0x3ca1a62633145c06
|
|
|
|
/* PI low part (FMA available) */
|
|
double_vector __dPI3_FMA 0x395c1cd129024e09
|
|
|
|
/* Polynomial coefficients (relative error 2^(-52.115)): */
|
|
double_vector __dC1 0xbfc55555555554a7
|
|
double_vector __dC2 0x3f8111111110a4a8
|
|
double_vector __dC3 0xbf2a01a019a5b86d
|
|
double_vector __dC4 0x3ec71de38030fea0
|
|
double_vector __dC5 0xbe5ae63546002231
|
|
double_vector __dC6 0x3de60e6857a2f220
|
|
double_vector __dC7 0xbd69f0d60811aac8
|
|
|
|
/*
|
|
Additional constants:
|
|
absolute value mask
|
|
*/
|
|
double_vector __dAbsMask_la 0x7fffffffffffffff
|
|
|
|
/* 1/PI */
|
|
double_vector __dInvPI_la 0x3fd45f306dc9c883
|
|
|
|
/* right-shifer for low accuracy version */
|
|
double_vector __dRShifter_la 0x4330000000000000
|
|
|
|
/* right-shifer-1.0 for low accuracy version */
|
|
double_vector __dRShifterm5_la 0x432fffffffffffff
|
|
|
|
/* right-shifer with low mask for low accuracy version */
|
|
double_vector __dRXmax_la 0x43300000007ffffe
|
|
|
|
.type __svml_dcos_data,@object
|
|
.size __svml_dcos_data,.-__svml_dcos_data
|