aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/vax/memset.s
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1992-05-13 02:52:32 +0000
committerRoland McGrath <roland@gnu.org>1992-05-13 02:52:32 +0000
commita238abcb880dce8d3f149eedaafedde8894d03a9 (patch)
treed3a1f672037811fbdc67b3f310280e9a81b4ae6c /sysdeps/vax/memset.s
parentfc6606f14bc2832b003b6187059d200eb46629e3 (diff)
downloadglibc-a238abcb880dce8d3f149eedaafedde8894d03a9.tar
glibc-a238abcb880dce8d3f149eedaafedde8894d03a9.tar.gz
glibc-a238abcb880dce8d3f149eedaafedde8894d03a9.tar.bz2
glibc-a238abcb880dce8d3f149eedaafedde8894d03a9.zip
entered into RCS
Diffstat (limited to 'sysdeps/vax/memset.s')
-rw-r--r--sysdeps/vax/memset.s55
1 files changed, 55 insertions, 0 deletions
diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s
new file mode 100644
index 0000000000..12b1f74fe3
--- /dev/null
+++ b/sysdeps/vax/memset.s
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)memset.s 5.2 (Berkeley) 5/12/91"
+#endif /* LIBC_SCCS and not lint */
+
+/* void *memset(base, c, length) */
+
+#include "DEFS.h"
+
+ENTRY(memset, 0)
+ movl 4(ap),r3
+1:
+ movzwl $65535,r0
+ movq 8(ap),r1
+ cmpl r2,r0
+ jgtru 2f
+ movc5 $0,(r3),r1,r2,(r3)
+ movl r1,r0
+ ret
+2:
+ subl2 r0,12(ap)
+ movc5 $0,(r3),r1,r0,(r3)
+ jbr 1b