1 /* Set a block of memory to some byte value. For SUN4V Niagara.
2 Copyright (C) 2006, 2008 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by David S. Miller (davem@davemloft.net)
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 #define ASI_BLK_INIT_QUAD_LDD_P 0xe2
32 .register %g2,#scratch
38 /* %o0=buf, %o1=pat, %o2=len */
68 1: stba %o2, [%o0 + 0x00] %asi
74 andcc %o0, (64 - 1), %g1
79 1: stxa %o2, [%o0 + 0x00] %asi
85 wr %g0, ASI_BLK_INIT_QUAD_LDD_P, %asi
86 andn %o1, (64 - 1), %g1
89 stxa %o2, [%o0 + 0x00] %asi
90 stxa %o2, [%o0 + 0x08] %asi
91 stxa %o2, [%o0 + 0x10] %asi
92 stxa %o2, [%o0 + 0x18] %asi
93 stxa %o2, [%o0 + 0x20] %asi
94 stxa %o2, [%o0 + 0x28] %asi
95 stxa %o2, [%o0 + 0x30] %asi
96 stxa %o2, [%o0 + 0x38] %asi
107 1: stxa %o2, [%o0 + 0x00] %asi
115 1: stba %o2, [%o0 + 0x00] %asi
123 wr %g0, ASI_PNF, %asi
130 libc_hidden_builtin_def (memset)
131 weak_alias (__bzero, bzero)