1/*
2 * arch/alpha/lib/strncpy.S
3 * Contributed by Richard Henderson (rth@tamu.edu)
4 *
5 * Copy no more than COUNT bytes of the null-terminated string from
6 * SRC to DST.  If SRC does not cover all of COUNT, the balance is
7 * zeroed.
8 *
9 * Or, rather, if the kernel cared about that weird ANSI quirk.  This
10 * version has cropped that bit o' nastiness as well as assuming that
11 * __stxncpy is in range of a branch.
12 */
13
14	.set noat
15	.set noreorder
16
17	.text
18
19	.align 3
20	.globl strncpy
21	.ent strncpy
22strncpy:
23	.frame $30, 0, $26
24	.prologue 0
25
26	mov	$16, $0		# set return value now
27	beq	$18, 0f
28	mov	$26, $23	# set return address
29	br	__stxncpy	# do the work of the copy
30
310:	ret
32	nop
33	nop
34	nop
35
36	.end strncpy
37