summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-04-25 15:28:24 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-04-25 15:28:24 +0000
commit78b211936dd81bb8b0a9f33cef1da3adbdba19f4 (patch)
tree55be035bf8ff2b6343ca912be7dc4c80f83e1e2c
parent0dfce453fddaf3aa0bd6f6fafa69e004b79147d6 (diff)
screw .S version memset does same job...
-rw-r--r--sys/lib/libkern/arch/hppa/Makefile.inc13
-rw-r--r--sys/lib/libkern/arch/hppa/bzero.S120
2 files changed, 10 insertions, 123 deletions
diff --git a/sys/lib/libkern/arch/hppa/Makefile.inc b/sys/lib/libkern/arch/hppa/Makefile.inc
index f60d6522f98..337a2fd52a7 100644
--- a/sys/lib/libkern/arch/hppa/Makefile.inc
+++ b/sys/lib/libkern/arch/hppa/Makefile.inc
@@ -1,13 +1,20 @@
-# $OpenBSD: Makefile.inc,v 1.7 1999/05/19 17:10:51 mickey Exp $
+# $OpenBSD: Makefile.inc,v 1.8 2000/04/25 15:28:23 mickey Exp $
SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
random.c ashrdi3.c divdi3.c strncpy.c strncmp.c strcmp.c memchr.c \
memset.c strlen.c strcpy.c strcat.c skpc.c strncasecmp.c scanc.c
-SRCS+= milli.S bzero.S bcmp.S ffs.S
+SRCS+= milli.S bcmp.S ffs.S
+OBJS+= bzero.o
SRCS+= bcopy.S spcopy.S
-CLEANFILES+= bcopy.S spcopy.S
+CLEANFILES+= bcopy.S spcopy.S bzero.o
+
+bzero.o: ${.CURDIR}/memset.c
+ @echo "${COMPILE.c} -DBZERO ${.CURDIR}/memset.c -o ${.TARGET}"
+ @${COMPILE.c} -DBZERO ${.CURDIR}/memset.c -o ${.TARGET}.o
+ @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
bcopy.S: ${M}/bcopy.m4
@echo 'building ${.TARGET} from ${.ALLSRC}'
diff --git a/sys/lib/libkern/arch/hppa/bzero.S b/sys/lib/libkern/arch/hppa/bzero.S
deleted file mode 100644
index 8fc32c70ac8..00000000000
--- a/sys/lib/libkern/arch/hppa/bzero.S
+++ /dev/null
@@ -1,120 +0,0 @@
-/* $OpenBSD: bzero.S,v 1.3 1999/09/14 00:50:31 mickey Exp $ */
-
-/*
- * (c) Copyright 1988 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
-/*
- * Copyright (c) 1990,1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * THE UNIVERSITY OF UTAH AND CSL PROVIDE THIS SOFTWARE IN ITS "AS IS"
- * CONDITION, AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM ITS USE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Utah $Hdr: bzero.s 1.9 94/12/14$
- * Author: Bob Wheeler, University of Utah CSL
- */
-
-#include <machine/asm.h>
-
-/*
- * void
- * blkclr(dst, count)
- * void *dst;
- * u_int count;
- */
-ENTRY(blkclr)
-
-/*
- * void
- * bzero(dst, count)
- * vm_offset_t dst;
- * int count;
- */
-ALTENTRY(bzero)
- comb,>=,n r0,arg1,$bzero_exit
-
- /*
- * If we need to clear less than a word do it a byte at a time
- */
-
- comib,>,n 4,arg1,$bzero_bytes
-
- /*
- * Since we are only clearing memory the alignment restrictions
- * are simplified. Figure out how many "extra" bytes we need to
- * store with stbys.
- */
-
- extru arg0,31,2,t2
- add arg1,t2,arg1
-
- /*
- * We will zero the destination in blocks of 16 bytes as long as we
- * can and then we'll go to the 4 byte moves.
- */
-
- addib,<,n -16,arg1,$bzero_word
-
-$bzero_loop_16
- stbys,b,m r0,4(arg0)
- stwm r0,4(arg0)
- stwm r0,4(arg0)
- addib,>= -16,arg1,$bzero_loop_16
- stwm r0,4(arg0)
-
- /*
- * see if there is anything left that needs to be zeroed in a word
- * move. Since the count was decremented by 16, add 12 to test if
- * there are any full word moves left to do.
- */
-
-$bzero_word
- addib,<,n 12,arg1,$bzero_cleanup
-
-$bzero_loop_4
- addib,>= -4,arg1,$bzero_loop_4
- stbys,b,m r0,4(arg0)
-
- /*
- * zero the last bytes that may be unaligned on a word boundary
- */
-
-$bzero_cleanup
- addib,=,n 4,arg1,$bzero_exit
- add arg0,arg1,arg0
- b $bzero_exit
- stbys,e r0,0(arg0)
- b,n $bzero_exit
-
-
- /*
- * zero by bytes
- */
-
-$bzero_bytes
- addib,> -1,arg1,$bzero_bytes
- stbs,ma r0,1(arg0)
-
-$bzero_exit
- bv 0(rp)
- nop
-
-EXIT(bzero)
-
- .end