xref: /original-bsd/lib/libc/vax/string/memset.s (revision a6b493b4)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8#if defined(LIBC_SCCS) && !defined(lint)
9	.asciz "@(#)memset.s	5.1 (Berkeley) 05/15/90"
10#endif /* LIBC_SCCS and not lint */
11
12/* void *memset(base, c, length) */
13
14#include "DEFS.h"
15
16ENTRY(memset, 0)
17	movl	4(ap),r3
181:
19	movzwl	$65535,r0
20	movq	8(ap),r1
21	cmpl	r2,r0
22	jgtru	2f
23	movc5	$0,(r3),r1,r2,(r3)
24	ret
252:
26	subl2	r0,12(ap)
27	movc5	$0,(r3),r1,r0,(r3)
28	jbr	1b
29