2 Copyright (C) 2014-2015 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 <http://www.gnu.org/licenses/>. */
23 #include "asm-syntax.h"
25 # define MEMSET __memset_avx2
26 # define MEMSET_CHK __memset_chk_avx2
29 .section .text.avx2,"ax",@progbits
33 jb HIDDEN_JUMPTARGET (__chk_fail)
38 vpxor %xmm0, %xmm0, %xmm0
40 lea (%rdi, %rdx), %rsi
42 vpshufb %xmm0, %xmm1, %xmm0
50 vmovdqu %xmm0, 0x10(%rdi)
51 vmovdqu %xmm0, 0x20(%rdi)
52 vmovdqu %xmm0, 0x30(%rdi)
53 vmovdqu %xmm0, 0x40(%rdi)
54 vmovdqu %xmm0, 0x50(%rdi)
55 vmovdqu %xmm0, 0x60(%rdi)
56 vmovdqu %xmm0, 0x70(%rdi)
57 vmovdqu %xmm0, -0x80(%rsi)
58 vmovdqu %xmm0, -0x70(%rsi)
59 vmovdqu %xmm0, -0x60(%rsi)
60 vmovdqu %xmm0, -0x50(%rsi)
61 vmovdqu %xmm0, -0x40(%rsi)
62 vmovdqu %xmm0, -0x30(%rsi)
63 vmovdqu %xmm0, -0x20(%rsi)
64 vmovdqu %xmm0, -0x10(%rsi)
72 vmovdqu %xmm0, 0x10(%rdi)
73 vmovdqu %xmm0, 0x20(%rdi)
74 vmovdqu %xmm0, 0x30(%rdi)
75 vmovdqu %xmm0, -0x40(%rsi)
76 vmovdqu %xmm0, -0x30(%rsi)
77 vmovdqu %xmm0, -0x20(%rsi)
78 vmovdqu %xmm0, -0x10(%rsi)
86 vmovdqu %xmm0, 0x10(%rdi)
87 vmovdqu %xmm0, -0x20(%rsi)
88 vmovdqu %xmm0, -0x10(%rsi)
94 vmovdqu %xmm0, -0x10(%rsi)
102 vmovq %xmm0, -0x08(%rsi)
111 mov %ecx, -0x04(%rsi)
132 vinserti128 $1, %xmm0, %ymm0, %ymm0
135 vmovdqu %ymm0, (%rax)
137 lea -0x80(%rax, %rdx), %rcx
141 vmovdqa %ymm0, (%rdi)
142 vmovdqa %ymm0, 0x20(%rdi)
143 vmovdqa %ymm0, 0x40(%rdi)
144 vmovdqa %ymm0, 0x60(%rdi)
147 jb L(gobble_128_loop)
149 vmovdqu %ymm0, -0x80(%rsi)
150 vmovdqu %ymm0, -0x60(%rsi)
151 vmovdqu %ymm0, -0x40(%rsi)
152 vmovdqu %ymm0, -0x20(%rsi)