1 /* Set a block of memory to some byte value.
3 Copyright (C) 1996-2023 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
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, see
18 <https://www.gnu.org/licenses/>. */
22 /* Store 64 bytes at (BASE + OFFSET) using value SOURCE. */
23 #define ZERO_BIG_BLOCK(base, offset, source) \
24 std source, [base + offset + 0x00]; \
25 std source, [base + offset + 0x08]; \
26 std source, [base + offset + 0x10]; \
27 std source, [base + offset + 0x18]; \
28 std source, [base + offset + 0x20]; \
29 std source, [base + offset + 0x28]; \
30 std source, [base + offset + 0x30]; \
31 std source, [base + offset + 0x38];
33 #define ZERO_LAST_BLOCKS(base, offset, source) \
34 std source, [base - offset - 0x38]; \
35 std source, [base - offset - 0x30]; \
36 std source, [base - offset - 0x28]; \
37 std source, [base - offset - 0x20]; \
38 std source, [base - offset - 0x18]; \
39 std source, [base - offset - 0x10]; \
40 std source, [base - offset - 0x08]; \
41 std source, [base - offset - 0x00];
66 2: andcc %o1, 0xffffff80, %o3
69 4: ZERO_BIG_BLOCK (%o0, 0x00, %g2)
71 ZERO_BIG_BLOCK (%o0, 0x40, %g2)
83 jmpl %o4 + (20f + 64 - 101b), %g0
89 20: ZERO_LAST_BLOCKS(%o0, 0x48, %g2)
90 ZERO_LAST_BLOCKS(%o0, 0x08, %g2)
137 stb %g3, [%o0 + 0x01]
139 stb %g3, [%o0 + 0x02]
145 libc_hidden_builtin_def (memset)