summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/hppa/spmath/Makefile32
-rw-r--r--sys/arch/hppa/spmath/Makefile.inc40
-rw-r--r--sys/arch/hppa/spmath/mdrr.c59
3 files changed, 131 insertions, 0 deletions
diff --git a/sys/arch/hppa/spmath/Makefile b/sys/arch/hppa/spmath/Makefile
new file mode 100644
index 00000000000..a274875c102
--- /dev/null
+++ b/sys/arch/hppa/spmath/Makefile
@@ -0,0 +1,32 @@
+# $OpenBSD: Makefile,v 1.1 1998/06/23 20:33:49 mickey Exp $
+
+LIB= spmath
+NOPIC=
+
+MACHINE= ${XMACHINE}
+MACHINE_ARCH= ${XMACHINE_ARCH}
+
+M= ${.CURDIR}/arch/${MACHINE_ARCH}
+
+CPPFLAGS= -I$M ${KERNCPPFLAGS}
+
+SRCS+= divu.S impys.S impyu.S dfadd.c dfcmp.c dfdiv.c dfmpy.c dfrem.c \
+ dfsqrt.c dfsub.c divsfm.c divsfr.c divsim.c divsir.c divufr.c \
+ divuir.c fcnvff.c fcnvfx.c fcnvfxt.c fcnvxf.c frnd.c mdrr.c \
+ mpyaccs.c mpyaccu.c mpys.c mpyscv.c mpyu.c mpyucv.c setovfl.c \
+ sfadd.c sfcmp.c sfdiv.c sfmpy.c sfrem.c sfsqrt.c sfsub.c
+
+install:
+
+.include <bsd.lib.mk>
+
+lib${LIB}.o:: ${OBJS}
+ @echo building standard ${LIB} library
+ @rm -f lib${LIB}.o
+ @${LD} -r -o lib${LIB}.o `${LORDER} ${OBJS} | tsort`
+
+POBJS+= ${OBJS:.o=.po}
+lib${LIB}.po:: ${POBJS}
+ @echo building profiled ${LIB} library
+ @rm -f lib${LIB}.po
+ @${LD} -r -o lib${LIB}.po `${LORDER} ${POBJS} | tsort`
diff --git a/sys/arch/hppa/spmath/Makefile.inc b/sys/arch/hppa/spmath/Makefile.inc
new file mode 100644
index 00000000000..871020addda
--- /dev/null
+++ b/sys/arch/hppa/spmath/Makefile.inc
@@ -0,0 +1,40 @@
+# $OpenBSD: Makefile.inc,v 1.1 1998/06/23 20:33:50 mickey Exp $
+#
+# NOTE: $S must correspond to the top of the 'sys' tree
+
+SPMATHDIR= $S/arch/hppa/spmath
+
+SPMATHDST?= ${.OBJDIR}/lib/spmath
+SPMATH_AS?= obj
+
+SPMATHLIB= ${SPMATHDST}/libspmath.o
+SPMATHLIB_PROF= ${SPMATHDST}/libspmath_p.o
+
+SPMATHMAKE= \
+ cd ${SPMATHDIR} && MAKEOBJDIR=${SPMATHDST} ${MAKE} \
+ CC='${CC}' CFLAGS='${CFLAGS}' \
+ AS='${AS}' AFLAGS='${AFLAGS}' \
+ LD='${LD}' STRIP='${STRIP}' \
+ CPP='${CPP}' STRIP='${STRIP}' AR='${AR}' \
+ NM='${NM}' LORDER='${LORDER}' \
+ XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' \
+ SPMATHCPPFLAGS='${CPPFLAGS:S@^-I.@-I../../.@g}'
+
+${SPMATHLIB}: .NOTMAIN __always_make_kernlib
+ @echo making sure the kern library is up to date...
+ @${SPMATHMAKE} libkern.o
+
+${SPMATHLIB_PROF}: .NOTMAIN __always_make_kernlib
+ @echo making sure the profiled kern library is up to date...
+ @${SPMATHMAKE} libkern.po
+
+clean:: .NOTMAIN __always_make_kernlib
+ @echo cleaning the kern library objects
+ @${SPMATHMAKE} clean
+
+depend:: .NOTMAIN __always_make_kernlib
+ @echo depending the kern library objects
+ @${SPMATHMAKE} depend
+
+__always_make_kernlib: .NOTMAIN
+ -mkdir -p ${SPMATHDST}
diff --git a/sys/arch/hppa/spmath/mdrr.c b/sys/arch/hppa/spmath/mdrr.c
new file mode 100644
index 00000000000..94bbda15551
--- /dev/null
+++ b/sys/arch/hppa/spmath/mdrr.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright 1996 1995 by Open Software Foundation, Inc.
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appears in all copies and
+ * that both the copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
+ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * pmk1.1
+ */
+/*
+ * (c) Copyright 1986 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.
+ */
+/* $Source: /cvs/OpenBSD/src/sys/arch/hppa/spmath/Attic/mdrr.c,v $
+ * $Revision: 1.1 $ $Author: mickey $
+ * $State: Exp $ $Locker: $
+ * $Date: 1998/06/23 20:34:03 $
+ */
+
+#ifdef HPE
+#include "hmd.asmassis.official"
+#else /* HPE */
+#include "../spmath/md.h"
+#endif /* HPE */
+
+void
+mdrr(reg1,reg2,result)
+ int reg1, reg2;
+ struct mdsfu_register *result;
+ {
+ /* Simply copy the arguments to the emulated copies of the registers */
+ result_hi = reg1;
+ result_lo = reg2;
+ }