1 /* Set a block of memory to some byte value.
3 Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5 Contributed by David S. Miller <davem@caip.rutgers.edu> and
6 Jakub Jelinek <jj@ultra.linux.cz>.
8 The GNU C Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
13 The GNU C Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with the GNU C Library; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 /* Store 64 bytes at (BASE + OFFSET) using value SOURCE. */
26 #define ZERO_BIG_BLOCK(base, offset, source) \
27 std source, [base + offset + 0x00]; \
28 std source, [base + offset + 0x08]; \
29 std source, [base + offset + 0x10]; \
30 std source, [base + offset + 0x18]; \
31 std source, [base + offset + 0x20]; \
32 std source, [base + offset + 0x28]; \
33 std source, [base + offset + 0x30]; \
34 std source, [base + offset + 0x38];
36 #define ZERO_LAST_BLOCKS(base, offset, source) \
37 std source, [base - offset - 0x38]; \
38 std source, [base - offset - 0x30]; \
39 std source, [base - offset - 0x28]; \
40 std source, [base - offset - 0x20]; \
41 std source, [base - offset - 0x18]; \
42 std source, [base - offset - 0x10]; \
43 std source, [base - offset - 0x08]; \
44 std source, [base - offset - 0x00];
88 2: andcc %o1, 0xffffff80, %o3
91 4: ZERO_BIG_BLOCK (%o0, 0x00, %g2)
93 ZERO_BIG_BLOCK (%o0, 0x40, %g2)
105 jmpl %o4 + (20f + 64 - 101b), %g0
111 20: ZERO_LAST_BLOCKS(%o0, 0x48, %g2)
112 ZERO_LAST_BLOCKS(%o0, 0x08, %g2)
153 libc_hidden_builtin_def (memset)
155 weak_alias (__bzero, bzero)