1/* strcpy - copy a string from source to destination.  64/31 bit S/390 version.
2   Copyright (C) 2001-2022 Free Software Foundation, Inc.
3   This file is part of the GNU C Library.
4
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.
9
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.
14
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/>.  */
18
19/* INPUT PARAMETERS
20     %r2 = address of destination
21     %r3 = address of source.  */
22
23#include <ifunc-strcpy.h>
24#include "sysdep.h"
25#include "asm-syntax.h"
26
27#if HAVE_STRCPY_Z900_G5
28# if defined __s390x__
29#  define SLGR	slgr
30#  define LGR	lgr
31# else
32#  define SLGR	slr
33#  define LGR	lr
34# endif /* ! defined __s390x__  */
35
36        .text
37ENTRY(STRCPY_Z900_G5)
38	SLGR  %r0,%r0
39	LGR   %r1,%r2
400:	mvst  %r1,%r3
41	jo    0b
42	br    %r14
43END(STRCPY_Z900_G5)
44
45# undef SLGR
46# undef LGR
47
48# if ! HAVE_STRCPY_IFUNC
49strong_alias (STRCPY_Z900_G5, strcpy)
50# endif
51
52# if defined SHARED && IS_IN (libc)
53strong_alias (STRCPY_Z900_G5, __GI_strcpy)
54# endif
55#endif
56