Blame sysdeps/s390/s390-32/memset.S
|
Packit Service |
1c5418 |
/* Set a block of memory to some byte value. For IBM S390
|
|
Packit Service |
1c5418 |
Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
|
Packit Service |
1c5418 |
This file is part of the GNU C Library.
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
1c5418 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1c5418 |
License as published by the Free Software Foundation; either
|
|
Packit Service |
1c5418 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
1c5418 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1c5418 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1c5418 |
Lesser General Public License for more details.
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1c5418 |
License along with the GNU C Library; if not, see
|
|
Packit Service |
1c5418 |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
#include "sysdep.h"
|
|
Packit Service |
1c5418 |
#include "asm-syntax.h"
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
/* INPUT PARAMETERS
|
|
Packit Service |
1c5418 |
%r2 = address to memory area
|
|
Packit Service |
1c5418 |
%r3 = byte to fill memory with
|
|
Packit Service |
1c5418 |
%r4 = number of bytes to fill. */
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
.text
|
|
Packit Service |
1c5418 |
|
|
Packit Service |
1c5418 |
#ifdef USE_MULTIARCH
|
|
Packit Service |
1c5418 |
ENTRY(__memset_default)
|
|
Packit Service |
1c5418 |
#else
|
|
Packit Service |
1c5418 |
ENTRY(memset)
|
|
Packit Service |
1c5418 |
#endif
|
|
Packit Service |
1c5418 |
.machine "g5"
|
|
Packit Service |
1c5418 |
basr %r5,0
|
|
Packit Service |
1c5418 |
.L_G5_19:
|
|
Packit Service |
1c5418 |
ltr %r4,%r4
|
|
Packit Service |
1c5418 |
je .L_G5_4
|
|
Packit Service |
1c5418 |
stc %r3,0(%r2)
|
|
Packit Service |
1c5418 |
chi %r4,1
|
|
Packit Service |
1c5418 |
lr %r1,%r2
|
|
Packit Service |
1c5418 |
je .L_G5_4
|
|
Packit Service |
1c5418 |
ahi %r4,-2
|
|
Packit Service |
1c5418 |
lr %r3,%r4
|
|
Packit Service |
1c5418 |
srl %r3,8
|
|
Packit Service |
1c5418 |
ltr %r3,%r3
|
|
Packit Service |
1c5418 |
jne .L_G5_14
|
|
Packit Service |
1c5418 |
ex %r4,.L_G5_20-.L_G5_19(%r5)
|
|
Packit Service |
1c5418 |
.L_G5_4:
|
|
Packit Service |
1c5418 |
br %r14
|
|
Packit Service |
1c5418 |
.L_G5_14:
|
|
Packit Service |
1c5418 |
mvc 1(256,%r1),0(%r1)
|
|
Packit Service |
1c5418 |
la %r1,256(%r1)
|
|
Packit Service |
1c5418 |
brct %r3,.L_G5_14
|
|
Packit Service |
1c5418 |
ex %r4,.L_G5_20-.L_G5_19(%r5)
|
|
Packit Service |
1c5418 |
j .L_G5_4
|
|
Packit Service |
1c5418 |
.L_G5_20:
|
|
Packit Service |
1c5418 |
mvc 1(1,%r1),0(%r1)
|
|
Packit Service |
1c5418 |
#ifdef USE_MULTIARCH
|
|
Packit Service |
1c5418 |
END(__memset_default)
|
|
Packit Service |
1c5418 |
#else
|
|
Packit Service |
1c5418 |
END(memset)
|
|
Packit Service |
1c5418 |
libc_hidden_builtin_def (memset)
|
|
Packit Service |
1c5418 |
#endif
|