]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/i386/i686/multiarch/bzero.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / i386 / i686 / multiarch / bzero.S
1 /* Multiple versions of bzero
2 All versions must be listed in ifunc-impl-list.c.
3 Copyright (C) 2010-2017 Free Software Foundation, Inc.
4 Contributed by Intel Corporation.
5 This file is part of the GNU C Library.
6
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
20
21 #include <sysdep.h>
22 #include <init-arch.h>
23
24 /* Define multiple versions only for the definition in lib. */
25 #if IS_IN (libc)
26 .text
27 ENTRY(__bzero)
28 .type __bzero, @gnu_indirect_function
29 LOAD_GOT_AND_RTLD_GLOBAL_RO
30 LOAD_FUNC_GOT_EAX (__bzero_ia32)
31 HAS_CPU_FEATURE (SSE2)
32 jz 2f
33 LOAD_FUNC_GOT_EAX ( __bzero_sse2)
34 HAS_ARCH_FEATURE (Fast_Rep_String)
35 jz 2f
36 LOAD_FUNC_GOT_EAX (__bzero_sse2_rep)
37 2: ret
38 END(__bzero)
39
40 # undef ENTRY
41 # define ENTRY(name) \
42 .type __bzero_ia32, @function; \
43 .p2align 4; \
44 .globl __bzero_ia32; \
45 .hidden __bzero_ia32; \
46 __bzero_ia32: cfi_startproc; \
47 CALL_MCOUNT
48 # undef END
49 # define END(name) \
50 cfi_endproc; .size __bzero_ia32, .-__bzero_ia32
51
52 # ifdef SHARED
53 # undef libc_hidden_builtin_def
54 /* IFUNC doesn't work with the hidden functions in shared library since
55 they will be called without setting up EBX needed for PLT which is
56 used by IFUNC. */
57 # define libc_hidden_builtin_def(name) \
58 .globl __GI___bzero; __GI___bzero = __bzero_ia32
59 # endif
60 #endif
61
62 #include "../bzero.S"