1 /* Multiple versions of memset and bzero
2 All versions must be listed in ifunc-impl-list.c.
3 Copyright (C) 2010-2014 Free Software Foundation, Inc.
4 Contributed by David S. Miller (davem@davemloft.net)
5 This file is part of the GNU C Library.
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.
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.
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/>. */
23 #if !defined NOT_IN_libc
26 .type memset, @gnu_indirect_function
28 SETUP_PIC_REG_LEAF(o3, o5)
30 set HWCAP_SPARC_CRYPTO, %o1
33 andcc %o0, HWCAP_SPARC_BLKINIT, %g0
35 sethi %gdop_hix22(__memset_niagara4), %o1
36 xor %o1, %gdop_lox10(__memset_niagara4), %o1
38 set __memset_niagara4, %o1
45 sethi %gdop_hix22(__memset_niagara1), %o1
46 xor %o1, %gdop_lox10(__memset_niagara1), %o1
48 set __memset_niagara1, %o1
54 sethi %gdop_hix22(__memset_ultra1), %o1
55 xor %o1, %gdop_lox10(__memset_ultra1), %o1
57 set __memset_ultra1, %o1
68 .type bzero, @gnu_indirect_function
70 SETUP_PIC_REG_LEAF(o3, o5)
72 set HWCAP_SPARC_CRYPTO, %o1
75 andcc %o0, HWCAP_SPARC_BLKINIT, %g0
77 sethi %gdop_hix22(__bzero_niagara4), %o1
78 xor %o1, %gdop_lox10(__bzero_niagara4), %o1
80 set __bzero_niagara4, %o1
87 sethi %gdop_hix22(__bzero_niagara1), %o1
88 xor %o1, %gdop_lox10(__bzero_niagara1), %o1
90 set __bzero_niagara1, %o1
96 sethi %gdop_hix22(__bzero_ultra1), %o1
97 xor %o1, %gdop_lox10(__bzero_ultra1), %o1
99 set __bzero_ultra1, %o1
109 weak_alias (__bzero, bzero)
112 # define weak_alias(a, b)
114 libc_hidden_builtin_def (memset)
116 #undef libc_hidden_builtin_def
117 #define libc_hidden_builtin_def(name)
119 #define memset __memset_ultra1
120 #define __bzero __bzero_ultra1
124 #include "../memset.S"