2 * arch/s390/kernel/strncpy.S
6 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
11 * R2 = address of destination
12 * R3 = address of source string
13 * R4 = max number of bytes to copy
17 LGR 1,2 # don't touch address in R2
19 JZ strncpy_exit # 0 bytes -> nothing to do
22 ICM 0,1,0(3) # ICM sets the cc, IC does not
26 JZ strncpy_pad # ICM inserted a 0x00
27 BRCTG 4,strncpy_loop # R4 -= 1, jump to strncpy_loop if > 0