1 /* Set a block of memory to some byte value. For SUN4V Niagara.
2 Copyright (C) 2006-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/>. */
21 #define ASI_BLK_INIT_QUAD_LDD_P 0xe2
32 .register %g2,#scratch
37 ENTRY(__memset_niagara1)
38 /* %o0=buf, %o1=pat, %o2=len */
65 1: stba %o2, [%o0 + 0x00] %asi
71 andcc %o0, (64 - 1), %g1
76 1: stxa %o2, [%o0 + 0x00] %asi
82 wr %g0, ASI_BLK_INIT_QUAD_LDD_P, %asi
83 andn %o1, (64 - 1), %g1
86 andn %g1, (256 - 1), %g2
88 and %g1, (256 - 1), %g1
91 stxa %o2, [%o0 + 0x00] %asi
92 stxa %o2, [%o0 + 0x08] %asi
93 stxa %o2, [%o0 + 0x10] %asi
94 stxa %o2, [%o0 + 0x18] %asi
95 stxa %o2, [%o0 + 0x20] %asi
96 stxa %o2, [%o0 + 0x28] %asi
97 stxa %o2, [%o0 + 0x30] %asi
98 stxa %o2, [%o0 + 0x38] %asi
99 stxa %o2, [%o0 + 0x40] %asi
100 stxa %o2, [%o0 + 0x48] %asi
101 stxa %o2, [%o0 + 0x50] %asi
102 stxa %o2, [%o0 + 0x58] %asi
103 stxa %o2, [%o0 + 0x60] %asi
104 stxa %o2, [%o0 + 0x68] %asi
105 stxa %o2, [%o0 + 0x70] %asi
106 stxa %o2, [%o0 + 0x78] %asi
107 stxa %o2, [%o0 + 0x80] %asi
108 stxa %o2, [%o0 + 0x88] %asi
109 stxa %o2, [%o0 + 0x90] %asi
110 stxa %o2, [%o0 + 0x98] %asi
111 stxa %o2, [%o0 + 0xa0] %asi
112 stxa %o2, [%o0 + 0xa8] %asi
113 stxa %o2, [%o0 + 0xb0] %asi
114 stxa %o2, [%o0 + 0xb8] %asi
115 stxa %o2, [%o0 + 0xc0] %asi
116 stxa %o2, [%o0 + 0xc8] %asi
117 stxa %o2, [%o0 + 0xd0] %asi
118 stxa %o2, [%o0 + 0xd8] %asi
119 stxa %o2, [%o0 + 0xe0] %asi
120 stxa %o2, [%o0 + 0xe8] %asi
121 stxa %o2, [%o0 + 0xf0] %asi
122 stxa %o2, [%o0 + 0xf8] %asi
131 stxa %o2, [%o0 + 0x00] %asi
132 stxa %o2, [%o0 + 0x08] %asi
133 stxa %o2, [%o0 + 0x10] %asi
134 stxa %o2, [%o0 + 0x18] %asi
135 stxa %o2, [%o0 + 0x20] %asi
136 stxa %o2, [%o0 + 0x28] %asi
137 stxa %o2, [%o0 + 0x30] %asi
138 stxa %o2, [%o0 + 0x38] %asi
150 1: stxa %o2, [%o0 + 0x00] %asi
158 1: stba %o2, [%o0 + 0x00] %asi
166 wr %g0, ASI_PNF, %asi
171 END(__memset_niagara1)