1 /* Function sincos vectorized with AVX2, wrapper version.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
20 #include "svml_d_wrapper_impl.h"
22 .section .text.avx2, "ax", @progbits
23 ENTRY (_ZGVdN4vl8l8_sincos)
24 WRAPPER_IMPL_AVX_fFF _ZGVbN2vl8l8_sincos
25 END (_ZGVdN4vl8l8_sincos)
26 libmvec_hidden_def (_ZGVdN4vl8l8_sincos)
28 /* AVX2 ISA version as wrapper to SSE ISA version (for vector
29 function declared with #pragma omp declare simd notinbranch). */
30 .macro WRAPPER_IMPL_AVX2_fFF_vvv callee
33 cfi_adjust_cfa_offset (8)
34 cfi_rel_offset (%rbp, 0)
36 cfi_def_cfa_register (%rbp)
39 vmovupd %ymm0, 128(%rsp)
41 vmovdqu %ymm1, 64(%rdi)
42 vmovdqu %ymm2, 96(%rdi)
45 call HIDDEN_JUMPTARGET(\callee)
46 vmovupd 144(%rsp), %xmm0
49 call HIDDEN_JUMPTARGET(\callee)
75 cfi_def_cfa_register (%rsp)
77 cfi_adjust_cfa_offset (-8)
86 .cfi_escape 0x10,0x6,0x2,0x76,0
91 .cfi_escape 0xf,0x3,0x76,0x70,0x6
92 .cfi_escape 0x10,0xc,0x2,0x76,0x78
96 .cfi_escape 0x10,0x3,0x2,0x76,0x68
99 vmovaps %xmm1, -128(%ebp)
100 vmovaps %xmm2, -144(%ebp)
101 vmovapd %ymm0, -176(%ebp)
103 call HIDDEN_JUMPTARGET(\callee)
105 vmovapd -160(%ebp), %xmm0
107 call HIDDEN_JUMPTARGET(\callee)
108 movq -128(%ebp), %rax
109 vmovsd -112(%ebp), %xmm0
110 vmovdqa -128(%ebp), %xmm5
111 vmovdqa -144(%ebp), %xmm1
113 vmovsd -104(%ebp), %xmm0
114 vpextrd $1, %xmm5, %eax
116 movq -120(%ebp), %rax
117 vmovsd -96(%ebp), %xmm0
119 vmovsd -88(%ebp), %xmm0
120 vpextrd $3, %xmm5, %eax
122 movq -144(%ebp), %rax
123 vmovsd -80(%ebp), %xmm0
125 vmovsd -72(%ebp), %xmm0
126 vpextrd $1, %xmm1, %eax
128 movq -136(%ebp), %rax
129 vmovsd -64(%ebp), %xmm0
131 vmovsd -56(%ebp), %xmm0
132 vpextrd $3, %xmm1, %eax
146 ENTRY (_ZGVdN4vvv_sincos)
147 WRAPPER_IMPL_AVX2_fFF_vvv _ZGVbN2vl8l8_sincos
148 END (_ZGVdN4vvv_sincos)
150 #ifndef USE_MULTIARCH
151 libmvec_hidden_def (_ZGVdN4vvv_sincos)