1999-11-16 21:16:53 +03:00
|
|
|
/* $NetBSD: strncat.S,v 1.5 1999/11/16 18:17:39 matthias Exp $ */
|
1997-05-08 17:38:29 +04:00
|
|
|
|
1996-09-24 13:29:52 +04:00
|
|
|
/*
|
|
|
|
* Written by Matthias Pfaller, 1996
|
|
|
|
* Public domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
|
|
|
#if defined(LIBC_SCCS)
|
1999-11-16 21:16:53 +03:00
|
|
|
RCSID("$NetBSD: strncat.S,v 1.5 1999/11/16 18:17:39 matthias Exp $")
|
1996-09-24 13:29:52 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* char *
|
|
|
|
* strncat(char *d, const char *s, size_t count)
|
|
|
|
* append string s to d. append not more then count bytes.
|
|
|
|
*/
|
1998-04-04 02:58:08 +04:00
|
|
|
KENTRY(strncat, 12)
|
1996-09-24 13:29:52 +04:00
|
|
|
enter [r4],0
|
|
|
|
movd B_ARG0,tos
|
1998-10-02 02:46:35 +04:00
|
|
|
bsr _C_LABEL(strlen)
|
1999-11-16 21:16:53 +03:00
|
|
|
#if !defined(MRTD)
|
1996-09-24 13:29:52 +04:00
|
|
|
adjspd -4
|
1999-11-16 21:16:53 +03:00
|
|
|
#endif
|
1996-09-24 13:29:52 +04:00
|
|
|
addd B_ARG0,r0
|
|
|
|
movd B_ARG1,r1
|
|
|
|
movd r0,r2
|
|
|
|
movd B_ARG2,r0
|
|
|
|
movqd 0,r4
|
|
|
|
movsb u
|
|
|
|
movb r4,0(r2)
|
|
|
|
movd B_ARG0,r0
|
|
|
|
exit [r4]
|
1998-04-04 02:58:08 +04:00
|
|
|
ret ARGS
|