1;;; strncpy.S
2
3#include <asm/linkage.h>
4
5	.text
6.global strncpy_from_user
7
8;;; long strncpy_from_user(void *to, void *from, size_t n)
9strncpy_from_user:
10	mov.l	er2,er2
11	bne	1f
12	sub.l	er0,er0
13	rts
141:
15	mov.l	er4,@-sp
16	sub.l	er3,er3
172:
18	mov.b	@er1+,r4l
19	mov.b	r4l,@er0
20	adds	#1,er0
21	beq	3f
22	inc.l	#1,er3
23	dec.l	#1,er2
24	bne	2b
253:
26	dec.l	#1,er2
274:
28	mov.b	r4l,@er0
29	adds	#1,er0
30	dec.l	#1,er2
31	bne	4b
32	mov.l	er3,er0
33	mov.l	@sp+,er4
34	rts
35