]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/s390/s390-64/memset.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / s390 / s390-64 / memset.S
CommitLineData
ffeac417 1/* Set a block of memory to some byte value. 64 bit S/390 version.
b168057a 2 Copyright (C) 2001-2015 Free Software Foundation, Inc.
847b055c 3 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
ffeac417 4 This file is part of the GNU C Library.
847b055c
AJ
5
6 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
847b055c
AJ
10
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
41bdb6e2 14 Lesser General Public License for more details.
847b055c 15
41bdb6e2 16 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
847b055c 19
08f43f9b 20
56e7d3ad 21#include <sysdep.h>
08f43f9b
AK
22#include "asm-syntax.h"
23
ffeac417
UD
24/* INPUT PARAMETERS
25 %r2 = address of memory area
26 %r3 = byte to fill memory with
27 %r4 = number of bytes to fill. */
847b055c 28
08f43f9b 29 .text
847b055c 30
08f43f9b
AK
31#ifdef USE_MULTIARCH
32ENTRY(memset_z900)
33#else
ffeac417 34ENTRY(memset)
08f43f9b
AK
35#endif
36 .machine "z900"
37 ltgr %r4,%r4
38 je .L_Z900_4
39 stc %r3,0(%r2)
40 cghi %r4,1
41 lgr %r1,%r2
42 je .L_Z900_4
43 aghi %r4,-2
44 srlg %r3,%r4,8
45 ltgr %r3,%r3
46 jne .L_Z900_14
47.L_Z900_3:
48 larl %r3,.L_Z900_18
49 ex %r4,0(%r3)
50.L_Z900_4:
51 br %r14
52.L_Z900_14:
53 mvc 1(256,%r1),0(%r1)
54 la %r1,256(%r1)
55 brctg %r3,.L_Z900_14
56 j .L_Z900_3
57.L_Z900_18:
58 mvc 1(1,%r1),0(%r1)
59#ifdef USE_MULTIARCH
60END(memset_z900)
61#else
ffeac417 62END(memset)
85dd1003 63libc_hidden_builtin_def (memset)
08f43f9b 64#endif