NetBSD/lib/libc/arch/ns32k/string/strncpy.S
matthias d2a91d2279 SYS.h
Fix CALL to use _C_LABEL.
gen/Makefile.inc
	setjmp.S and sigsetjmp.S don't have lint stubs. Append them to
	SRCS, not ASSRCS.
gen/__setjmp14.S, gen/__sigsetjmp14.S
	some small optimizations
string/strcat.S string/strncat.S string/strncpy.S
	use _C_LABEL when calling functions
1998-10-01 22:46:35 +00:00

35 lines
588 B
ArmAsm

/* $NetBSD: strncpy.S,v 1.4 1998/10/01 22:46:37 matthias Exp $ */
/*
* Written by Matthias Pfaller, 1996
* Public domain.
*/
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: strncpy.S,v 1.4 1998/10/01 22:46:37 matthias Exp $")
#endif
/*
* char *
* strncpy (char *d, const char *s, size_t len)
* copy at most len characters from the string s to d.
*/
KENTRY(strncpy, 12)
enter [r4],0
movd B_ARG2,r0
movd B_ARG1,r1
movd B_ARG0,r2
movqd 0,r4
movsb u
bfc 0f
movd r0,tos
movd r2,tos
bsr _C_LABEL(bzero)
adjspd -8
0: movd B_ARG0,r0
exit [r4]
ret ARGS