summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/etc.mvme88k/MAKEDEV251
-rw-r--r--etc/etc.mvme88k/Makefile.inc16
-rw-r--r--etc/etc.mvme88k/disktab63
-rw-r--r--etc/etc.mvme88k/fstab.nfs2
-rw-r--r--etc/etc.mvme88k/ttys49
-rw-r--r--lib/Makefile3
-rw-r--r--lib/csu/mvme88k/Makefile46
-rw-r--r--lib/csu/mvme88k/crt0.c112
-rw-r--r--lib/libc/arch/mvme88k/DEFS.h3
-rw-r--r--lib/libc/arch/mvme88k/Makefile.inc6
-rw-r--r--lib/libc/arch/mvme88k/SYS.h79
-rw-r--r--lib/libc/arch/mvme88k/gen/Makefile.inc12
-rw-r--r--lib/libc/arch/mvme88k/gen/_setjmp.S32
-rw-r--r--lib/libc/arch/mvme88k/gen/fabs.S14
-rw-r--r--lib/libc/arch/mvme88k/gen/flt_rounds.c23
-rw-r--r--lib/libc/arch/mvme88k/gen/fpgetmask.c16
-rw-r--r--lib/libc/arch/mvme88k/gen/fpgetround.c16
-rw-r--r--lib/libc/arch/mvme88k/gen/fpgetsticky.c16
-rw-r--r--lib/libc/arch/mvme88k/gen/fpsetmask.c25
-rw-r--r--lib/libc/arch/mvme88k/gen/fpsetround.c25
-rw-r--r--lib/libc/arch/mvme88k/gen/fpsetsticky.c25
-rw-r--r--lib/libc/arch/mvme88k/gen/frexp.c79
-rw-r--r--lib/libc/arch/mvme88k/gen/infinity.c10
-rw-r--r--lib/libc/arch/mvme88k/gen/isinf.c65
-rw-r--r--lib/libc/arch/mvme88k/gen/isnan.c55
-rw-r--r--lib/libc/arch/mvme88k/gen/ldexp.c148
-rw-r--r--lib/libc/arch/mvme88k/gen/modf.c309
-rw-r--r--lib/libc/arch/mvme88k/gen/setjmp.S39
-rw-r--r--lib/libc/arch/mvme88k/gen/sigsetjmp.S43
-rw-r--r--lib/libc/arch/mvme88k/net/Makefile.inc3
-rw-r--r--lib/libc/arch/mvme88k/net/htonl.S49
-rw-r--r--lib/libc/arch/mvme88k/net/htons.S50
-rw-r--r--lib/libc/arch/mvme88k/net/ntohl.S49
-rw-r--r--lib/libc/arch/mvme88k/net/ntohs.S50
-rw-r--r--lib/libc/arch/mvme88k/string/Makefile.inc12
-rw-r--r--lib/libc/arch/mvme88k/string/strchr.c13
-rw-r--r--lib/libc/arch/mvme88k/string/strrchr.c13
-rw-r--r--lib/libc/arch/mvme88k/sys/Ovfork.S54
-rw-r--r--lib/libc/arch/mvme88k/sys/brk.S70
-rw-r--r--lib/libc/arch/mvme88k/sys/cerror.S54
-rw-r--r--lib/libc/arch/mvme88k/sys/exect.S50
-rw-r--r--lib/libc/arch/mvme88k/sys/fork.S54
-rw-r--r--lib/libc/arch/mvme88k/sys/pipe.S55
-rw-r--r--lib/libc/arch/mvme88k/sys/ptrace.S55
-rw-r--r--lib/libc/arch/mvme88k/sys/reboot.S49
-rw-r--r--lib/libc/arch/mvme88k/sys/sbrk.S70
-rw-r--r--lib/libc/arch/mvme88k/sys/setlogin.S48
-rw-r--r--lib/libc/arch/mvme88k/sys/sigpending.S54
-rw-r--r--lib/libc/arch/mvme88k/sys/sigprocmask.S61
-rw-r--r--lib/libc/arch/mvme88k/sys/sigreturn.S52
-rw-r--r--lib/libc/arch/mvme88k/sys/sigsuspend.S60
-rw-r--r--lib/libc/arch/mvme88k/sys/syscall.S54
-rw-r--r--lib/libc/rpc/xdr_float.c4
-rw-r--r--lib/libc/stdlib/strtod.c4
-rw-r--r--lib/libkvm/kvm_mvme88k.c79
-rw-r--r--lib/libm/Makefile6
-rw-r--r--sys/arch/mvme88k/compile/.cvsignore1
-rw-r--r--sys/arch/mvme88k/include/asm.h2
-rw-r--r--sys/arch/mvme88k/include/profile.h6
-rw-r--r--sys/ddb/db_run.c5
-rw-r--r--usr.bin/xlint/lint1/param.h5
61 files changed, 2762 insertions, 11 deletions
diff --git a/etc/etc.mvme88k/MAKEDEV b/etc/etc.mvme88k/MAKEDEV
new file mode 100644
index 00000000000..c16029d7f46
--- /dev/null
+++ b/etc/etc.mvme88k/MAKEDEV
@@ -0,0 +1,251 @@
+#!/bin/sh -
+#
+# $NetBSD: MAKEDEV,v 1.5 1997/01/01 23:46:23 pk Exp $
+#
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
+#
+# Written and contributed by W. Jolitz 12/90
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
+#
+# Device "make" file. Valid arguments:
+# all makes all known devices, including local devices.
+# Tries to make the 'standard' number of each type.
+# std standard devices
+# local configuration specific devices
+#
+# Tapes:
+# st* SCSI tapes
+#
+# Disks:
+# sd* SCSI disks
+# cd* SCSI CD-ROM
+# vnd* "file" pseudo-disks
+# md* "memory" pseudo-disks
+# ccd* contatenated disk devices
+#
+# Pseudo terminals:
+# pty* set of 16 master and slave pseudo terminals
+#
+# Printers:
+# lpt* stock lp
+# lpa* interruptless lp
+#
+# Call units:
+#
+# Special purpose devices:
+# fd file descriptors
+# bpf* packet filter
+# lkm loadable kernel modules interface
+# tun* network tunnel driver
+# ss* SCSI scanner
+# uk* SCSI unknown
+# ch* SCSI changer
+#
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/etc
+umask 77
+for i
+do
+case $i in
+
+all)
+ sh $0 std fd sd0 sd1 sd2 pty0
+ sh $0 st0 st1 ch0 cd0 cd1 lpa0 lpt0 vnd0 vnd1
+ sh $0 bpf0 bpf1 bpf2 bpf3 tun0 tun1
+ sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1 lkm
+ sh $0 local
+ ;;
+
+std)
+ rm -f console drum mem kmem null zero tty klog stdin stdout stderr
+ mknod console c 0 0
+ mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum
+ mknod kmem c 2 1 ; chmod 640 kmem ; chgrp kmem kmem
+ mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem
+ mknod null c 2 2 ; chmod 666 null
+ mknod zero c 2 12 ; chmod 666 zero
+ mknod tty c 1 0 ; chmod 666 tty
+ mknod klog c 6 0 ; chmod 600 klog
+ mknod stdin c 21 0 ; chmod 666 stdin
+ mknod stdout c 21 1 ; chmod 666 stdout
+ mknod stderr c 21 2 ; chmod 666 stderr
+ ;;
+
+fd)
+ rm -f fd/*
+ mkdir fd > /dev/null 2>&1
+ (cd fd && eval `echo "" | awk ' BEGIN { \
+ for (i = 0; i < 64; i++) \
+ printf("mknod %d c 21 %d;", i, i)}'`)
+ chown -R bin.bin fd
+ chmod 555 fd
+ chmod 666 fd/*
+ ;;
+
+md*)
+ case $i in
+ md*) name=md; unit=${i#md}; chr=32; blk=9;;
+ esac
+ rm -f $name$unit r$name$unit
+ mknod $name$unit b $blk $(($unit + 0))
+ mknod r$name$unit c $chr $(($unit + 16))
+ chgrp operator $name$unit r$name$unit
+ chmod 640 $name$unit r$name$unit
+ ;;
+
+ss*)
+ case $i in
+ ss*) name=ss; unit=${i#ss}; chr=33;;
+ esac
+ rm -f $name$unit n$name$unit
+ mknod $name$unit c $chr $(($unit * 16 + 0))
+ mknod n$name$unit c $chr $(($unit * 16 + 1))
+ chgrp operator $name$unit n$name$unit
+ chmod 640 $name$unit n$name$unit
+ ;;
+
+ccd*|sd*|vnd*)
+ case $i in
+ ccd*) name=ccd; unit=${i#ccd}; blk=5; chr=17;;
+ sd*) name=sd; unit=${i#sd}; blk=4; chr=8;;
+ vnd*) name=vnd; unit=${i#vnd}; blk=6; chr=19;;
+ esac
+ rm -f $name$unit? r$name$unit?
+ mknod ${name}${unit}a b $blk $(($unit * 8 + 0))
+ mknod ${name}${unit}b b $blk $(($unit * 8 + 1))
+ mknod ${name}${unit}c b $blk $(($unit * 8 + 2))
+ mknod ${name}${unit}d b $blk $(($unit * 8 + 3))
+ mknod ${name}${unit}e b $blk $(($unit * 8 + 4))
+ mknod ${name}${unit}f b $blk $(($unit * 8 + 5))
+ mknod ${name}${unit}g b $blk $(($unit * 8 + 6))
+ mknod ${name}${unit}h b $blk $(($unit * 8 + 7))
+ mknod r${name}${unit}a c $chr $(($unit * 8 + 0))
+ mknod r${name}${unit}b c $chr $(($unit * 8 + 1))
+ mknod r${name}${unit}c c $chr $(($unit * 8 + 2))
+ mknod r${name}${unit}d c $chr $(($unit * 8 + 3))
+ mknod r${name}${unit}e c $chr $(($unit * 8 + 4))
+ mknod r${name}${unit}f c $chr $(($unit * 8 + 5))
+ mknod r${name}${unit}g c $chr $(($unit * 8 + 6))
+ mknod r${name}${unit}h c $chr $(($unit * 8 + 7))
+ chgrp operator $name$unit? r$name$unit?
+ chmod 640 $name$unit? r$name$unit?
+ ;;
+
+pty*)
+ class=${i#pty}
+ case $class in
+ 0) offset=0 name=p;;
+ 1) offset=16 name=q;;
+ 2) offset=32 name=r;;
+ 3) offset=48 name=s;;
+# Note that telnetd, rlogind, and xterm (at least) only look at p-s.
+ 4) offset=64 name=t;;
+ *) echo bad unit for pty in: $i;;
+ esac
+ case $class in
+ 0|1|2|3|4)
+ umask 0
+ eval `echo $offset $name | awk ' { b=$1; n=$2 } END {
+ for (i = 0; i < 16; i++)
+ printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \
+ rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \
+ n, i, n, i, b+i, n, i, n, i, b+i); }'`
+ umask 77
+ ;;
+ esac
+ ;;
+
+st*)
+ case $i in
+ st*) name=st; unit=${i#st}; chr=20; blk=7;;
+ esac
+ rm -f $name$unit n$name$unit e$name$unit en$name$unit \
+ r$name$unit nr$name$unit er$name$unit enr$name$unit
+ mknod $name$unit b $blk $(($unit * 16 + 0))
+ mknod n$name$unit b $blk $(($unit * 16 + 1))
+ mknod e$name$unit b $blk $(($unit * 16 + 2))
+ mknod en$name$unit b $blk $(($unit * 16 + 3))
+ mknod r$name$unit c $chr $(($unit * 16 + 0))
+ mknod nr$name$unit c $chr $(($unit * 16 + 1))
+ mknod er$name$unit c $chr $(($unit * 16 + 2))
+ mknod enr$name$unit c $chr $(($unit * 16 + 3))
+ chgrp operator $name$unit n$name$unit e$name$unit en$name$unit \
+ r$name$unit nr$name$unit er$name$unit enr$name$unit
+ chmod 640 $name$unit n$name$unit e$name$unit en$name$unit \
+ r$name$unit nr$name$unit er$name$unit enr$name$unit
+ ;;
+
+ch*|uk*)
+ case $i in
+ ch*) name=ch; unit=${i#ch}; chr=31;;
+ uk*) name=uk; unit=${i#uk}; chr=34;;
+ esac
+ rm -f $name$unit
+ mknod $name$unit c $chr $unit
+ chgrp operator $name$unit
+ chmod 640 $name$unit
+ ;;
+
+cd*)
+ case $i in
+ cd*) name=cd; unit=${i#cd}; chr=18; blk=8;;
+ esac
+ rm -f $name$unit? r$name$unit?
+ mknod ${name}${unit}a b $blk $(($unit * 8 + 0))
+ mknod ${name}${unit}d b $blk $(($unit * 8 + 3))
+ mknod r${name}${unit}a c $chr $(($unit * 8 + 0))
+ mknod r${name}${unit}d c $chr $(($unit * 8 + 3))
+ chgrp operator $name$unit? r$name$unit?
+ chmod 640 $name$unit? r$name$unit?
+ ;;
+
+lpt*|lpa*)
+ case $i in
+ lpt*) name=lpt; unit=${i#lpt}; chr=11; flags=0;;
+ lpa*) name=lpa; unit=${i#lpa}; chr=11; flags=128;;
+ esac
+ rm -f $name$unit
+ mknod $name$unit c $chr $(($unit + $flags))
+ chown root.wheel $name$unit
+ ;;
+
+bpf*|tun*)
+ case $i in
+ bpf*) name=bpf; unit=${i#bpf}; chr=22;;
+ tun*) name=tun; unit=${i#tun}; chr=23;;
+ esac
+ rm -f $name$unit
+ mknod $name$unit c $chr $unit
+ chown root.wheel $name$unit
+ ;;
+
+lkm)
+ rm -f lkm
+ mknod lkm c 24 0
+ chown root.kmem lkm
+ chmod 640 lkm
+ ;;
+
+local)
+ umask 0
+ sh $0.local
+ ;;
+
+esac
+done
diff --git a/etc/etc.mvme88k/Makefile.inc b/etc/etc.mvme88k/Makefile.inc
new file mode 100644
index 00000000000..41bbf7d4088
--- /dev/null
+++ b/etc/etc.mvme88k/Makefile.inc
@@ -0,0 +1,16 @@
+#
+# etc.mvme88k/Makefile.inc -- mvme88k-specific etc Makefile targets
+#
+# $Id: Makefile.inc,v 1.1 1997/03/25 17:06:36 rahnds Exp $
+
+.ifdef DESTDIR
+snap_md: bsd-generic bootblocks
+ cp ${.CURDIR}/../sys/arch/mvme88k/compile/GENERIC/bsd.gz \
+ ${DESTDIR}/snapshot/bsd-generic.gz
+bsd-generic:
+ cd ${.CURDIR}/../sys/arch/mvme88k/conf && config GENERIC
+ cd ${.CURDIR}/../sys/arch/mvme88k/compile/GENERIC && \
+ make clean && make depend && make && gzip -9 bsd
+bootblocks:
+ cp ${DESTDIR}/usr/mdec/* ${DESTDIR}/snapshot/
+.endif # DESTDIR check
diff --git a/etc/etc.mvme88k/disktab b/etc/etc.mvme88k/disktab
new file mode 100644
index 00000000000..edc2b638035
--- /dev/null
+++ b/etc/etc.mvme88k/disktab
@@ -0,0 +1,63 @@
+# Disk geometry and partition layout tables.
+# Key:
+# dt controller type
+# ty type of disk (fixed, removeable, simulated)
+# d[0-4] drive-type-dependent parameters
+# ns #sectors/track
+# nt #tracks/cylinder
+# nc #cylinders/disk
+# sc #sectors/cylinder, ns*nt default
+# su #sectors/unit, sc*nc default
+# se sector size, DEV_BSIZE default
+# rm rpm, 3600 default
+# sf supports bad144-style bad sector forwarding
+# sk sector skew per track, default 0
+# cs sector skew per cylinder, default 0
+# hs headswitch time, default 0
+# ts one-cylinder seek time, default 0
+# il sector interleave (n:1), 1 default
+# bs boot block size, default BBSIZE
+# sb superblock size, default SBSIZE
+# o[a-h] partition offsets in sectors
+# p[a-h] partition sizes in sectors
+# b[a-h] partition block sizes in bytes
+# f[a-h] partition fragment sizes in bytes
+# t[a-h] partition types (filesystem, swap, etc)
+#
+# All partition sizes reserve space for bad sector tables.
+# (5 cylinders needed for maintenance + replacement sectors)
+#
+fuji2614S|fuji171|FUJITSU M2614S:\
+ :ty=SCSI:se#512:nt#8:ns#32:nc#1336:\
+ :pa#29952:oa#256:ba#8192:fa#1024:ta=4.2BSD:\
+ :pb#60416:ob#30208:tb=swap:\
+ :pc#342016:oc#0:\
+ :ph#251392:oh#90624:bh#8192:fh#1024:th=4.2BSD:\
+
+CDC94351|CDC 164 MB SCSI disk:\
+ :ty=SCSI:se#512:nt#9:rm#3600:ns#34:nc#1068:\
+ :pa#30294:oa#306:ba#8192:fa#1024:ta=4.2BSD:\
+ :pb#61200:ob#30600:tb=swap:\
+ :pc#326808:oc#0:\
+ :ph#235008:oh#91800:bh#8192:fh#1024:th=4.2BSD:
+
+fuji2624S|FUJITSU 2624S:\
+ :ty=winchester:dt=SCSI:se#512:nt#11:ns#64:nc#1429:\
+ :pa#29568:oa#704:ba#8192:fa#1024:ta=4.2BSD:\
+ :pb#39424:ob#30272:tb=swap:\
+ :pc#1006016:oc#0:\
+ :pg#299904:og#69696:bg#8192:fg#1024:tg=4.2BSD:\
+ :ph#636416:oh#369600:bh#8192:fh#1024:th=4.2BSD:
+
+cdc94181|CDC 94181-15:\
+ :ty=winchester:dt=SCSI:se#512:nt#15:ns#51:nc#1546:\
+ :pa#29835:oa#765:ba#8192:fa#1024:ta=4.2BSD:\
+ :pb#79560:ob#30600:tb=swap:\
+ :pc#1182690:oc#0:\
+ :pg#306000:og#110160:bg#8192:fg#1024:tg=4.2BSD:\
+ :ph#766530:oh#416160:bh#8192:fh#1024:th=4.2BSD:
+
+miniroot|2Meg Miniroot:\
+ :ty=winchester:se#512:nt#1:ns#10:nc#400:\
+ :pa#4000:oa#0:ba#8192:fa#1024:ta=4.2BSD:\
+ :pc#4000:oc#0:
diff --git a/etc/etc.mvme88k/fstab.nfs b/etc/etc.mvme88k/fstab.nfs
new file mode 100644
index 00000000000..4498f04ed5a
--- /dev/null
+++ b/etc/etc.mvme88k/fstab.nfs
@@ -0,0 +1,2 @@
+nfs-server:/export/root/vme187 / nfs rw,-P 0 0
+nfs-server:/export/exec/mvme88k /usr nfs rw,-P 0 0
diff --git a/etc/etc.mvme88k/ttys b/etc/etc.mvme88k/ttys
new file mode 100644
index 00000000000..d20eea05ae8
--- /dev/null
+++ b/etc/etc.mvme88k/ttys
@@ -0,0 +1,49 @@
+#
+# from: @(#)ttys 5.1 (Berkeley) 4/17/89
+# $Id: ttys,v 1.1 1997/03/25 17:06:40 rahnds Exp $
+#
+# name getty type status comments
+#
+# If the console is marked insecure, single-user requires
+# the root password.
+console "/usr/libexec/getty Pc" unknown off secure
+ttye0 "/usr/libexec/getty Pc" unknown on secure clocal
+ttye1 "/usr/libexec/getty Pc" unknown on
+ttye2 "/usr/libexec/getty Pc" unknown off
+ttye3 "/usr/libexec/getty Pc" unknown off
+#tty00 "/usr/libexec/getty std.9600" unknown off secure clocal # int. serial.
+#tty01 "/usr/libexec/getty std.9600" unknown off clocal # int. serial.
+#tty02 "/usr/libexec/getty std.9600" unknown off clocal # int. serial.
+#tty03 "/usr/libexec/getty std.9600" unknown off clocal # int. serial.
+ttyp0 none network
+ttyp1 none network
+ttyp2 none network
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
+ttypa none network
+ttypb none network
+ttypc none network
+ttypd none network
+ttype none network
+ttypf none network
+ttyq0 none network
+ttyq1 none network
+ttyq2 none network
+ttyq3 none network
+ttyq4 none network
+ttyq5 none network
+ttyq6 none network
+ttyq7 none network
+ttyq8 none network
+ttyq9 none network
+ttyqa none network
+ttyqb none network
+ttyqc none network
+ttyqd none network
+ttyqe none network
+ttyqf none network
diff --git a/lib/Makefile b/lib/Makefile
index c889a8bd5be..600439850df 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.19 1997/02/26 16:46:25 niklas Exp $
+# $OpenBSD: Makefile,v 1.20 1997/03/25 17:06:42 rahnds Exp $
# $NetBSD: Makefile,v 1.20.4.1 1996/06/14 17:22:38 cgd Exp $
SUBDIR= csu libarch libc libcom_err libcompat libcurses libedit \
@@ -11,6 +11,7 @@ SUBDIR= csu libarch libc libcom_err libcompat libcurses libedit \
(${MACHINE} == "amiga") || \
(${MACHINE} == "atari") || \
(${MACHINE} == "powerpc") || \
+ (${MACHINE} == "mvme88k") || \
(${MACHINE} == "sun3")
SUBDIR+= libkvm
.else
diff --git a/lib/csu/mvme88k/Makefile b/lib/csu/mvme88k/Makefile
new file mode 100644
index 00000000000..50b19edaacb
--- /dev/null
+++ b/lib/csu/mvme88k/Makefile
@@ -0,0 +1,46 @@
+# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
+# $Id: Makefile,v 1.1 1997/03/25 17:06:44 rahnds Exp $
+
+CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
+OBJS= crt0.o gcrt0.o scrt0.o
+SRCS= crt0.c
+
+.if !defined(NOPIC)
+DYNAMIC = -DDYNAMIC
+.endif
+
+all: ${OBJS}
+
+crt0.o: ${SRCS}
+ @echo "${COMPILE.c} -DCRT0 ${DYNAMIC} ${.CURDIR}/${SRCS} -o ${.TARGET}"
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
+ @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
+gcrt0.o: ${SRCS}
+ @echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
+ @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
+scrt0.o: ${SRCS}
+ @echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
+ @${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
+ @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
+install:
+ install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
+ ${DESTDIR}/usr/lib
+
+.if make(depend)
+CPPFLAGS+= -DDYNAMIC
+.endif
+
+afterdepend: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o s\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
+
+.include <bsd.prog.mk>
diff --git a/lib/csu/mvme88k/crt0.c b/lib/csu/mvme88k/crt0.c
new file mode 100644
index 00000000000..4bc4f00573c
--- /dev/null
+++ b/lib/csu/mvme88k/crt0.c
@@ -0,0 +1,112 @@
+/*
+ * Mach Operating System
+ * Copyright (c) 1991, 1992 Carnegie Mellon University
+ * Copyright (c) 1991, 1992 Omron Corporation
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+
+/*
+ * Author : Jeffrey Friedl
+ * Created: July 1992
+ * Standalone crt0.
+ */
+
+/*
+ * GCCisms used:
+ * A "volatile void fcn()" is one that never returns.
+ * register var asm("r1"): variable VAR is raw access to named register.
+ */
+
+/*
+ * When a program begins, r31 points to info passed from the kernel.
+ *
+ * The following shows the memory to which r31 points (think "int *r31;"),
+ * and how we derive argc, argv, and envp from that:
+ *
+ * +-------------------+ <-------------------------------------- r31
+ * | ARGC | <- argc = r31[0];
+ * +-------------------+ <- argv = &r31[1];
+ * | &(argument #1) |
+ * +-------------------+
+ * | &(argument #2) |
+ * - - - - - - - - -
+ * | &(argument #ARGC) |
+ * +-------------------+
+ * | 0x00000000 | <- end-of-ARGV-list marker (redundant information).
+ * +-------------------+ <- environ = envp = &argv[argc+1];
+ * | &(env. var. #1) |
+ * +-------------------+
+ * | &(env. var. #2) |
+ * - - - - - - - - -
+ * | &(env. var. #N) |
+ * +-------------------+
+ * | 0x00000000 | <- end-of-ENVP-list marker (not redundant!).
+ * +-------------------+
+ *
+ * We use 'start:' to grab r31 and and call real_start(argc, argv, envp).
+ * We must do this since the function prologue makes finding the initial
+ * r31 difficult in C.
+ */
+
+#include <stdlib.h>
+
+#include "common.h"
+
+asm(" text ");
+asm(" align 4 ");
+asm("start: global start ");
+asm(" ld r2, r31, 0 "); /* First arg to real_start: argc */
+asm(" addu r3, r31, 4 "); /* Second arg to real_start: argv */
+asm(" lda r4, r3 [r2]"); /* Third arg to real_start: envp, but.... */
+asm(" addu r4, r4, 4 "); /* ... don't forget to skip past marker */
+asm(" br.n ___crt0_real_start");
+asm(" subu r31, r31, 32 ");
+
+#ifdef DYNAMIC
+extern struct _dynamic _DYNAMIC;
+struct _dynamic *___pdynamic = &_DYNAMIC;
+#endif
+
+/* static */ void volatile
+__crt0_real_start(int argc, char *argv[], char *envp[])
+{
+ register char *ap;
+ volatile int a = 0;
+ extern int minbrk asm ("minbrk");
+ extern int end;
+
+ minbrk = (int)&end;
+ environ = envp; /* environ is for the user that can't get at 'envp' */
+
+ if (ap = argv[0])
+ if ((__progname = _strrchr(ap, '/')) == NULL)
+ __progname = ap;
+ else
+ ++__progname;
+asm ("__callmain:"); /* Defined for the benefit of debuggers */
+ exit(main(argc, argv, environ));
+
+ /*NOTREACHED*/
+}
+
+#include "common.c"
diff --git a/lib/libc/arch/mvme88k/DEFS.h b/lib/libc/arch/mvme88k/DEFS.h
new file mode 100644
index 00000000000..c12a532745c
--- /dev/null
+++ b/lib/libc/arch/mvme88k/DEFS.h
@@ -0,0 +1,3 @@
+/* $Id: DEFS.h,v 1.1 1997/03/25 17:06:47 rahnds Exp $ */
+
+#include <machine/asm.h>
diff --git a/lib/libc/arch/mvme88k/Makefile.inc b/lib/libc/arch/mvme88k/Makefile.inc
new file mode 100644
index 00000000000..5775c172960
--- /dev/null
+++ b/lib/libc/arch/mvme88k/Makefile.inc
@@ -0,0 +1,6 @@
+# $Id: Makefile.inc,v 1.1 1997/03/25 17:06:49 rahnds Exp $
+
+KMINCLUDES= arch/m88k/DEFS.h arch/m88k/SYS.h
+#KMSRCS= bcmp.S bzero.S ffs.S strcat.c strcmp.S strcpy.S strlen.S strncmp.S \
+# strncpy.S htonl.S htons.S ntohl.S ntohs.S
+KMSRCS= htonl.S htons.S ntohl.S ntohs.S
diff --git a/lib/libc/arch/mvme88k/SYS.h b/lib/libc/arch/mvme88k/SYS.h
new file mode 100644
index 00000000000..d3307a4627a
--- /dev/null
+++ b/lib/libc/arch/mvme88k/SYS.h
@@ -0,0 +1,79 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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.
+ *
+ * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91
+ * $Id: SYS.h,v 1.1 1997/03/25 17:06:50 rahnds Exp $
+ */
+
+#include <sys/syscall.h>
+#include <machine/asm.h>
+
+#ifdef __STDC__
+
+#define SYSCALL(x) align 8; \
+ ENTRY(x); \
+ ld r10,r31,32; \
+ ld r11,r31,36; \
+ ld r12,r31,40; \
+ or r13,r0, SYS_ ## x; \
+ tb0 0, r0, 128; \
+ br cerror
+#define RSYSCALL(x) SYSCALL(x) ;\
+ jmp r1
+#define PSEUDO(x,y) ENTRY(x); ;\
+ or r13,r0, SYS_ ## y; \
+ tb0 0,r0,128; or r0,r0,r0;jmp r1
+
+#else /* !__STDC__ */
+
+#define SYSCALL(x) align 8; \
+ ENTRY(x); \
+ ld r10,r31,32; \
+ ld r11,r31,36; \
+ ld r12,r31,40; \
+ or r13,r0, SYS_/**/x; \
+ tb0 0, r0, 128; \
+ br cerror
+#define RSYSCALL(x) SYSCALL(x); \
+ jmp r1
+#define PSEUDO(x,y) ENTRY(x); \
+ or r13,r0, SYS_/**/y; \
+ tb0 0,r0,128; or r0,r0,r0; jmp r1
+#endif /* !__STDC__ */
+
+#define ASMSTR .asciz
+
+ .globl cerror
diff --git a/lib/libc/arch/mvme88k/gen/Makefile.inc b/lib/libc/arch/mvme88k/gen/Makefile.inc
new file mode 100644
index 00000000000..3c4ea22c543
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/Makefile.inc
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile.inc,v 1.3 1995/04/10 21:09:06 jtc Exp $
+
+#SRCS+= _setjmp.S fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.c modf.S
+#SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
+# fpsetround.c fpsetsticky.c
+#SRCS+= fixunsdfsi.S mul.S umul.S saveregs.S setjmp.S sigsetjmp.S
+
+SRCS+= _setjmp.S fabs.S frexp.c infinity.c isinf.c ldexp.c
+SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
+ fpsetround.c fpsetsticky.c
+SRCS+= setjmp.S sigsetjmp.S
+SRCS+= modf.c
diff --git a/lib/libc/arch/mvme88k/gen/_setjmp.S b/lib/libc/arch/mvme88k/gen/_setjmp.S
new file mode 100644
index 00000000000..c31bcc67289
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/_setjmp.S
@@ -0,0 +1,32 @@
+#include "SYS.h"
+
+ENTRY(_setjmp)
+ st r1, r2,0
+ st.d r14,r2,8
+ st.d r16,r2,16
+ st.d r18,r2,24
+ st.d r20,r2,32
+ st.d r22,r2,40
+ st.d r24,r2,48
+ st.d r26,r2,56
+ st.d r28,r2,64
+ st.d r30,r2,72
+ jmp.n r1
+ or r2,r0,0
+
+ENTRY(_longjmp)
+ ld.d r14,r2,8
+ ld.d r16,r2,16
+ ld.d r18,r2,24
+ ld.d r20,r2,32
+ ld.d r22,r2,40
+ ld.d r24,r2,48
+ ld.d r26,r2,56
+ ld.d r28,r2,64
+ ld.d r30,r2,72
+ ld r1,r2,0
+ bcnd.n ne0,r3,dsrlbl
+ or r2,r3,0
+ or r2,r0,1
+ dsrlbl:
+ jmp r1
diff --git a/lib/libc/arch/mvme88k/gen/fabs.S b/lib/libc/arch/mvme88k/gen/fabs.S
new file mode 100644
index 00000000000..810ccf30ef3
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fabs.S
@@ -0,0 +1,14 @@
+#include <machine/asm.h>
+/*
+ * Will work only if the argument passed is in IEEE format!
+ */
+
+ENTRY(fabs)
+ subu r31,r31,40
+ st.d r2,r31,32
+ ld.bu r4,r31,32
+ mask r4,r4,0x7f /* set sign bit to 0 */
+ st.b r4,r31,32
+ ld.d r2,r31,32
+ jmp.n r1
+ addu r31,r31,40
diff --git a/lib/libc/arch/mvme88k/gen/flt_rounds.c b/lib/libc/arch/mvme88k/gen/flt_rounds.c
new file mode 100644
index 00000000000..ba33e2bca5b
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/flt_rounds.c
@@ -0,0 +1,23 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ */
+/*
+ * Ported to 88k (Nivas Madhur)
+ */
+
+static const int map[] = {
+ 0, /* round to nearest */
+ 1, /* round to zero */
+ 2, /* round to negative infinity */
+ 3 /* round to positive infinity */
+};
+
+int
+__flt_rounds()
+{
+ int x;
+
+ __asm__("fldcr %0,fcr63" : "=r" (x));
+ return map[(x >> 14) & 0x03];
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpgetmask.c b/lib/libc/arch/mvme88k/gen/fpgetmask.c
new file mode 100644
index 00000000000..832fe0de567
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpgetmask.c
@@ -0,0 +1,16 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Ported to 88k by Nivas Madhur.
+ */
+
+#include <ieeefp.h>
+
+fp_except
+fpgetmask()
+{
+ int x;
+
+ __asm__ volatile ("fldcr %0,fcr63" : "=r" (x));
+ return (x & 0x1f);
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpgetround.c b/lib/libc/arch/mvme88k/gen/fpgetround.c
new file mode 100644
index 00000000000..4edac881ff9
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpgetround.c
@@ -0,0 +1,16 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Ported to 88k by Nivas Madhur.
+ */
+
+#include <ieeefp.h>
+
+fp_rnd
+fpgetround()
+{
+ int x;
+
+ __asm__ volatile ("fldcr %0, fcr63" : "=r" (x));
+ return (x >> 14) & 0x03;
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpgetsticky.c b/lib/libc/arch/mvme88k/gen/fpgetsticky.c
new file mode 100644
index 00000000000..6d5bdc7bbde
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpgetsticky.c
@@ -0,0 +1,16 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Ported to 88k by Nivas Madhur
+ */
+
+#include <ieeefp.h>
+
+fp_except
+fpgetsticky()
+{
+ int x;
+
+ __asm__ volatile("fldcr %0,fcr62" : "=r" (x));
+ return x & 0x1f;
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpsetmask.c b/lib/libc/arch/mvme88k/gen/fpsetmask.c
new file mode 100644
index 00000000000..42d88a7f641
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpsetmask.c
@@ -0,0 +1,25 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Porting to m88k by Nivas Madhur.
+ */
+
+#include <ieeefp.h>
+
+fp_except
+fpsetmask(mask)
+ fp_except mask;
+{
+ fp_except old;
+ fp_except new;
+
+ __asm__ volatile("fldcr %0,fcr63" : "=r" (old));
+
+ new = old;
+ new &= ~0x1f; /* clear bottom 5 bits and */
+ new |= (mask & 0x1f); /* set them to mask */
+
+ __asm__ volatile("fstcr %0,fcr63" : : "r" (new));
+
+ return (old & 0x1f);
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpsetround.c b/lib/libc/arch/mvme88k/gen/fpsetround.c
new file mode 100644
index 00000000000..417eefefa87
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpsetround.c
@@ -0,0 +1,25 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Ported to 88k by Nivas Madhur
+ */
+
+#include <ieeefp.h>
+
+fp_rnd
+fpsetround(rnd_dir)
+ fp_rnd rnd_dir;
+{
+ fp_rnd old;
+ fp_rnd new;
+
+ __asm__ volatile("fldcr %0,fcr63" : "=r" (old));
+
+ new = old;
+ new &= ~(0x03 << 14); /* clear old value */
+ new |= ((rnd_dir & 0x03) << 14);/* and set new one */
+
+ __asm__ volatile("fstcr %0,fcr63" : : "r" (new));
+
+ return (old >> 14) & 0x03;
+}
diff --git a/lib/libc/arch/mvme88k/gen/fpsetsticky.c b/lib/libc/arch/mvme88k/gen/fpsetsticky.c
new file mode 100644
index 00000000000..2c3f4c8c6d8
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/fpsetsticky.c
@@ -0,0 +1,25 @@
+/*
+ * Written by J.T. Conklin, Apr 10, 1995
+ * Public domain.
+ * Ported to m88k by Nivas Madhur.
+ */
+
+#include <ieeefp.h>
+
+fp_except
+fpsetsticky(sticky)
+ fp_except sticky;
+{
+ fp_except old;
+ fp_except new;
+
+ __asm__ volatile("fldcr %0,fcr62" : "=r" (old));
+
+ new = old;
+ new &= ~(0x1f);
+ new |= (sticky & 0x1f);
+
+ __asm__ volatile("fstcr %0,fcr62" : : "r" (new));
+
+ return (old & 0x1f);
+}
diff --git a/lib/libc/arch/mvme88k/gen/frexp.c b/lib/libc/arch/mvme88k/gen/frexp.c
new file mode 100644
index 00000000000..721515ec8f7
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/frexp.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ *
+ * from: Header: frexp.c,v 1.1 91/07/07 04:45:01 torek Exp
+ * $Id: frexp.c,v 1.1 1997/03/25 17:07:01 rahnds Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)frexp.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+
+/*
+ * Split the given value into a fraction in the range [0.5, 1.0) and
+ * an exponent, such that frac * (2^exp) == value. If value is 0,
+ * return 0.
+ */
+double
+frexp(value, eptr)
+ double value;
+ int *eptr;
+{
+ union {
+ double v;
+ struct ieee_double s;
+ } u;
+
+ if (value) {
+ /*
+ * Fractions in [0.5..1.0) have an exponent of 2^-1.
+ * Leave Inf and NaN alone, however.
+ * WHAT ABOUT DENORMS?
+ */
+ u.v = value;
+ if (u.s.dbl_exp != DBL_EXP_INFNAN) {
+ *eptr = u.s.dbl_exp - (DBL_EXP_BIAS - 1);
+ u.s.dbl_exp = DBL_EXP_BIAS - 1;
+ }
+ return (u.v);
+ } else {
+ *eptr = 0;
+ return ((double)0);
+ }
+}
diff --git a/lib/libc/arch/mvme88k/gen/infinity.c b/lib/libc/arch/mvme88k/gen/infinity.c
new file mode 100644
index 00000000000..a60b1ceb783
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/infinity.c
@@ -0,0 +1,10 @@
+#ifndef lint
+static char rcsid[] = "$Id: infinity.c,v 1.1 1997/03/25 17:07:01 rahnds Exp $";
+#endif /* not lint */
+
+/* infinity.c */
+
+#include <math.h>
+
+/* bytes for +Infinity on 88100 */
+char __infinity[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 };
diff --git a/lib/libc/arch/mvme88k/gen/isinf.c b/lib/libc/arch/mvme88k/gen/isinf.c
new file mode 100644
index 00000000000..3f66ac921b1
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/isinf.c
@@ -0,0 +1,65 @@
+/*-
+ * Copyright (c) 1991 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)
+/*static char sccsid[] = "from: @(#)isinf.c 5.1 (Berkeley) 3/18/91";*/
+static char rcsid[] = "$Id: isinf.c,v 1.1 1997/03/25 17:07:02 rahnds Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+
+isnan(d)
+ double d;
+{
+ register struct IEEEdp {
+ u_int sign : 1;
+ u_int exp : 11;
+ u_int manh : 20;
+ u_int manl : 32;
+ } *p = (struct IEEEdp *)&d;
+
+ return(p->exp == 2047 && (p->manh || p->manl));
+}
+
+isinf(d)
+ double d;
+{
+ register struct IEEEdp {
+ u_int sign : 1;
+ u_int exp : 11;
+ u_int manh : 20;
+ u_int manl : 32;
+ } *p = (struct IEEEdp *)&d;
+
+ return(p->exp == 2047 && !p->manh && !p->manl);
+}
diff --git a/lib/libc/arch/mvme88k/gen/isnan.c b/lib/libc/arch/mvme88k/gen/isnan.c
new file mode 100644
index 00000000000..1605fb2329a
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/isnan.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ *
+ * from: Header: isnan.c,v 1.1 91/07/08 19:03:34 torek Exp
+ * $Id: isnan.c,v 1.1 1997/03/25 17:07:03 rahnds Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)isnan.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+
+isnan(d)
+ double d;
+{
+ register struct ieee_double *p = (struct ieee_double *)&d;
+
+ return (p->dbl_exp == DBL_EXP_INFNAN &&
+ (p->dbl_frach != 0 || p->dbl_fracl != 0));
+}
diff --git a/lib/libc/arch/mvme88k/gen/ldexp.c b/lib/libc/arch/mvme88k/gen/ldexp.c
new file mode 100644
index 00000000000..69032238bb7
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/ldexp.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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.
+ *
+ * from: Header: ldexp.c,v 1.1 91/07/07 04:28:19 torek Exp
+ * $Id: ldexp.c,v 1.1 1997/03/25 17:07:04 rahnds Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static const char sccsid[] = "@(#)ldexp.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <machine/ieee.h>
+#include <errno.h>
+
+/*
+ * double ldexp(double val, int exp)
+ * returns: val * (2**exp)
+ */
+double
+ldexp(val, exp)
+ double val;
+ int exp;
+{
+ register int oldexp, newexp, mulexp;
+ union doub {
+ double v;
+ struct ieee_double s;
+ } u, mul;
+
+ /*
+ * If input is zero, or no change, just return input.
+ * Likewise, if input is Inf or NaN, just return it.
+ */
+ u.v = val;
+ oldexp = u.s.dbl_exp;
+ if (val == 0 || exp == 0 || oldexp == DBL_EXP_INFNAN)
+ return (val);
+
+ /*
+ * Compute new exponent and check for over/under flow.
+ * Underflow, unfortunately, could mean switching to denormal.
+ * If result out of range, set ERANGE and return 0 if too small
+ * or Inf if too big, with the same sign as the input value.
+ */
+ newexp = oldexp + exp;
+ if (newexp >= DBL_EXP_INFNAN) {
+ /* u.s.dbl_sign = val < 0; -- already set */
+ u.s.dbl_exp = DBL_EXP_INFNAN;
+ u.s.dbl_frach = u.s.dbl_fracl = 0;
+ errno = ERANGE;
+ return (u.v); /* Inf */
+ }
+ if (newexp <= 0) {
+ /*
+ * The output number is either a denormal or underflows
+ * (see comments in machine/ieee.h).
+ */
+ if (newexp <= -DBL_FRACBITS) {
+ /* u.s.dbl_sign = val < 0; -- already set */
+ u.s.dbl_exp = 0;
+ u.s.dbl_frach = u.s.dbl_fracl = 0;
+ errno = ERANGE;
+ return (u.v); /* zero */
+ }
+ /*
+ * We are going to produce a denorm. Our `exp' argument
+ * might be as small as -2097, and we cannot compute
+ * 2^-2097, so we may have to do this as many as three
+ * steps (not just two, as for positive `exp's below).
+ */
+ mul.v = 0;
+ while (exp <= -DBL_EXP_BIAS) {
+ mul.s.dbl_exp = 1;
+ val *= mul.v;
+ exp += DBL_EXP_BIAS - 1;
+ }
+ mul.s.dbl_exp = exp + DBL_EXP_BIAS;
+ val *= mul.v;
+ return (val);
+ }
+
+ /*
+ * Newexp is positive.
+ *
+ * If oldexp is zero, we are starting with a denorm, and simply
+ * adjusting the exponent will produce bogus answers. We need
+ * to fix that first.
+ */
+ if (oldexp == 0) {
+ /*
+ * Multiply by 2^mulexp to make the number normalizable.
+ * We cannot multiply by more than 2^1023, but `exp'
+ * argument might be as large as 2046. A single
+ * adjustment, however, will normalize the number even
+ * for huge `exp's, and then we can use exponent
+ * arithmetic just as for normal `double's.
+ */
+ mulexp = exp <= DBL_EXP_BIAS ? exp : DBL_EXP_BIAS;
+ mul.v = 0;
+ mul.s.dbl_exp = mulexp + DBL_EXP_BIAS;
+ val *= mul.v;
+ if (mulexp == exp)
+ return (val);
+ u.v = val;
+ newexp -= mulexp;
+ }
+
+ /*
+ * Both oldexp and newexp are positive; just replace the
+ * old exponent with the new one.
+ */
+ u.s.dbl_exp = newexp;
+ return (u.v);
+}
diff --git a/lib/libc/arch/mvme88k/gen/modf.c b/lib/libc/arch/mvme88k/gen/modf.c
new file mode 100644
index 00000000000..ea2be134ba9
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/modf.c
@@ -0,0 +1,309 @@
+/* @(#)s_modf.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_modf.c,v 1.8 1995/05/10 20:47:55 jtc Exp $";
+#endif
+
+/*
+ * modf(double x, double *iptr)
+ * return fraction part of x, and return x's integral part in *iptr.
+ * Method:
+ * Bit twiddling.
+ *
+ * Exception:
+ * No exception.
+ */
+
+#include "math.h"
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $Id: modf.c,v 1.1 1997/03/25 17:07:05 rahnds Exp $
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define _MATH_PRIVATE_H_
+
+#include <sys/types.h>
+#include <machine/endian.h>
+
+/* The original fdlibm code used statements like:
+ n0 = ((*(int*)&one)>>29)^1; * index of high word *
+ ix0 = *(n0+(int*)&x); * high word of x *
+ ix1 = *((1-n0)+(int*)&x); * low word of x *
+ to dig two 32 bit words out of the 64 bit IEEE floating point
+ value. That is non-ANSI, and, moreover, the gcc instruction
+ scheduler gets it wrong. We instead use the following macros.
+ Unlike the original code, we determine the endianness at compile
+ time, not at run time; I don't see much benefit to selecting
+ endianness at run time. */
+
+/* A union which permits us to convert between a double and two 32 bit
+ ints. */
+
+/*
+ * The arm32 port is little endian except for the FP word order which is
+ * big endian.
+ */
+
+#if (BYTE_ORDER == BIG_ENDIAN) || defined(arm32)
+
+typedef union
+{
+ double value;
+ struct
+ {
+ u_int32_t msw;
+ u_int32_t lsw;
+ } parts;
+} ieee_double_shape_type;
+
+#endif
+
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(arm32)
+
+typedef union
+{
+ double value;
+ struct
+ {
+ u_int32_t lsw;
+ u_int32_t msw;
+ } parts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double. */
+
+#define EXTRACT_WORDS(ix0,ix1,d) \
+do { \
+ ieee_double_shape_type ew_u; \
+ ew_u.value = (d); \
+ (ix0) = ew_u.parts.msw; \
+ (ix1) = ew_u.parts.lsw; \
+} while (0)
+
+/* Get the more significant 32 bit int from a double. */
+
+#define GET_HIGH_WORD(i,d) \
+do { \
+ ieee_double_shape_type gh_u; \
+ gh_u.value = (d); \
+ (i) = gh_u.parts.msw; \
+} while (0)
+
+/* Get the less significant 32 bit int from a double. */
+
+#define GET_LOW_WORD(i,d) \
+do { \
+ ieee_double_shape_type gl_u; \
+ gl_u.value = (d); \
+ (i) = gl_u.parts.lsw; \
+} while (0)
+
+/* Set a double from two 32 bit ints. */
+
+#define INSERT_WORDS(d,ix0,ix1) \
+do { \
+ ieee_double_shape_type iw_u; \
+ iw_u.parts.msw = (ix0); \
+ iw_u.parts.lsw = (ix1); \
+ (d) = iw_u.value; \
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int. */
+
+#define SET_HIGH_WORD(d,v) \
+do { \
+ ieee_double_shape_type sh_u; \
+ sh_u.value = (d); \
+ sh_u.parts.msw = (v); \
+ (d) = sh_u.value; \
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int. */
+
+#define SET_LOW_WORD(d,v) \
+do { \
+ ieee_double_shape_type sl_u; \
+ sl_u.value = (d); \
+ sl_u.parts.lsw = (v); \
+ (d) = sl_u.value; \
+} while (0)
+
+/* A union which permits us to convert between a float and a 32 bit
+ int. */
+
+typedef union
+{
+ float value;
+ u_int32_t word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float. */
+
+#define GET_FLOAT_WORD(i,d) \
+do { \
+ ieee_float_shape_type gf_u; \
+ gf_u.value = (d); \
+ (i) = gf_u.word; \
+} while (0)
+
+/* Set a float from a 32 bit int. */
+
+#define SET_FLOAT_WORD(d,i) \
+do { \
+ ieee_float_shape_type sf_u; \
+ sf_u.word = (i); \
+ (d) = sf_u.value; \
+} while (0)
+
+/* ieee style elementary functions */
+extern double __ieee754_sqrt __P((double));
+extern double __ieee754_acos __P((double));
+extern double __ieee754_acosh __P((double));
+extern double __ieee754_log __P((double));
+extern double __ieee754_atanh __P((double));
+extern double __ieee754_asin __P((double));
+extern double __ieee754_atan2 __P((double,double));
+extern double __ieee754_exp __P((double));
+extern double __ieee754_cosh __P((double));
+extern double __ieee754_fmod __P((double,double));
+extern double __ieee754_pow __P((double,double));
+extern double __ieee754_lgamma_r __P((double,int *));
+extern double __ieee754_gamma_r __P((double,int *));
+extern double __ieee754_lgamma __P((double));
+extern double __ieee754_gamma __P((double));
+extern double __ieee754_log10 __P((double));
+extern double __ieee754_sinh __P((double));
+extern double __ieee754_hypot __P((double,double));
+extern double __ieee754_j0 __P((double));
+extern double __ieee754_j1 __P((double));
+extern double __ieee754_y0 __P((double));
+extern double __ieee754_y1 __P((double));
+extern double __ieee754_jn __P((int,double));
+extern double __ieee754_yn __P((int,double));
+extern double __ieee754_remainder __P((double,double));
+extern int __ieee754_rem_pio2 __P((double,double*));
+extern double __ieee754_scalb __P((double,double));
+
+/* fdlibm kernel function */
+extern double __kernel_standard __P((double,double,int));
+extern double __kernel_sin __P((double,double,int));
+extern double __kernel_cos __P((double,double));
+extern double __kernel_tan __P((double,double,int));
+extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));
+
+
+/* ieee style elementary float functions */
+extern float __ieee754_sqrtf __P((float));
+extern float __ieee754_acosf __P((float));
+extern float __ieee754_acoshf __P((float));
+extern float __ieee754_logf __P((float));
+extern float __ieee754_atanhf __P((float));
+extern float __ieee754_asinf __P((float));
+extern float __ieee754_atan2f __P((float,float));
+extern float __ieee754_expf __P((float));
+extern float __ieee754_coshf __P((float));
+extern float __ieee754_fmodf __P((float,float));
+extern float __ieee754_powf __P((float,float));
+extern float __ieee754_lgammaf_r __P((float,int *));
+extern float __ieee754_gammaf_r __P((float,int *));
+extern float __ieee754_lgammaf __P((float));
+extern float __ieee754_gammaf __P((float));
+extern float __ieee754_log10f __P((float));
+extern float __ieee754_sinhf __P((float));
+extern float __ieee754_hypotf __P((float,float));
+extern float __ieee754_j0f __P((float));
+extern float __ieee754_j1f __P((float));
+extern float __ieee754_y0f __P((float));
+extern float __ieee754_y1f __P((float));
+extern float __ieee754_jnf __P((int,float));
+extern float __ieee754_ynf __P((int,float));
+extern float __ieee754_remainderf __P((float,float));
+extern int __ieee754_rem_pio2f __P((float,float*));
+extern float __ieee754_scalbf __P((float,float));
+
+/* float versions of fdlibm kernel functions */
+extern float __kernel_sinf __P((float,float,int));
+extern float __kernel_cosf __P((float,float));
+extern float __kernel_tanf __P((float,float,int));
+extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const int*));
+
+#endif /* _MATH_PRIVATE_H_ */
+#ifdef __STDC__
+static const double one = 1.0;
+#else
+static double one = 1.0;
+#endif
+
+#ifdef __STDC__
+ double modf(double x, double *iptr)
+#else
+ double modf(x, iptr)
+ double x,*iptr;
+#endif
+{
+ int32_t i0,i1,j0;
+ u_int32_t i;
+ EXTRACT_WORDS(i0,i1,x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
+ if(j0<20) { /* integer part in high x */
+ if(j0<0) { /* |x|<1 */
+ INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */
+ return x;
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) { /* x is integral */
+ u_int32_t high;
+ *iptr = x;
+ GET_HIGH_WORD(high,x);
+ INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
+ return x;
+ } else {
+ INSERT_WORDS(*iptr,i0&(~i),0);
+ return x - *iptr;
+ }
+ }
+ } else if (j0>51) { /* no fraction part */
+ u_int32_t high;
+ *iptr = x*one;
+ GET_HIGH_WORD(high,x);
+ INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
+ return x;
+ } else { /* fraction part in low x */
+ i = ((u_int32_t)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) { /* x is integral */
+ u_int32_t high;
+ *iptr = x;
+ GET_HIGH_WORD(high,x);
+ INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
+ return x;
+ } else {
+ INSERT_WORDS(*iptr,i0,i1&(~i));
+ return x - *iptr;
+ }
+ }
+}
diff --git a/lib/libc/arch/mvme88k/gen/setjmp.S b/lib/libc/arch/mvme88k/gen/setjmp.S
new file mode 100644
index 00000000000..6b7d6c0162f
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/setjmp.S
@@ -0,0 +1,39 @@
+#include "SYS.h"
+
+ENTRY(setjmp)
+ st r1, r2,0
+ st.d r14,r2,8
+ st.d r16,r2,16
+ st.d r18,r2,24
+ st.d r20,r2,32
+ st.d r22,r2,40
+ st.d r24,r2,48
+ st.d r26,r2,56
+ st.d r28,r2,64
+ st.d r30,r2,72
+ or r15,r1,0 /* can use r15 */
+ or r14,r2,0 /* can use r14 as it is already saved */
+ bsr.n _sigblock
+ or r2,r0,0
+ st r2,r14,4
+ jmp.n r15
+ or r2,r0,0
+
+ENTRY(longjmp)
+ subu r31,r31,32 /* get some temporary stack */
+ ld.d r14,r2,8
+ ld.d r16,r2,16
+ ld.d r18,r2,24
+ ld.d r20,r2,32
+ ld.d r22,r2,40
+ ld.d r24,r2,48
+ ld.d r26,r2,56
+ ld.d r28,r2,64
+ st.d r2,r31,24 /* save r2 and r3 on stack */
+ bsr.n _sigsetmask
+ ld r2,r2,4
+ ld.d r2,r31,24 /* restore r2 and r3 from stack */
+ ld.d r30,r2,72 /* restore r30 and r31 */
+ ld r1,r2,0 /* restore r1 */
+ jmp.n r1 /* and jump to it */
+ or r2,r0,r3 /* but first return r3 value */
diff --git a/lib/libc/arch/mvme88k/gen/sigsetjmp.S b/lib/libc/arch/mvme88k/gen/sigsetjmp.S
new file mode 100644
index 00000000000..2f6f7bffa83
--- /dev/null
+++ b/lib/libc/arch/mvme88k/gen/sigsetjmp.S
@@ -0,0 +1,43 @@
+#include "SYS.h"
+
+/*
+ * Need to write sigsetjmp version. But for now,
+ * I am copying setjmp XXX nivas
+ */
+ENTRY(sigsetjmp)
+ st r1, r2,0
+ st.d r14,r2,8
+ st.d r16,r2,16
+ st.d r18,r2,24
+ st.d r20,r2,32
+ st.d r22,r2,40
+ st.d r24,r2,48
+ st.d r26,r2,56
+ st.d r28,r2,64
+ st.d r30,r2,72
+ or r15,r1,0 /* can use r15 */
+ or r14,r2,0 /* can use r14 as it is already saved */
+ bsr.n _sigblock
+ or r2,r0,0
+ st r2,r14,4
+ jmp.n r15
+ or r2,r0,0
+
+ENTRY(siglongjmp)
+ subu r31,r31,32 /* get some temporary stack */
+ ld.d r14,r2,8
+ ld.d r16,r2,16
+ ld.d r18,r2,24
+ ld.d r20,r2,32
+ ld.d r22,r2,40
+ ld.d r24,r2,48
+ ld.d r26,r2,56
+ ld.d r28,r2,64
+ st.d r2,r31,24 /* save r2 and r3 on stack */
+ bsr.n _sigsetmask
+ ld r2,r2,4
+ ld.d r2,r31,24 /* restore r2 and r3 from stack */
+ ld.d r30,r2,72 /* restore r30 and r31 */
+ ld r1,r2,0 /* restore r1 */
+ jmp.n r1 /* and jump to it */
+ or r2,r0,r3 /* but first return r3 value */
diff --git a/lib/libc/arch/mvme88k/net/Makefile.inc b/lib/libc/arch/mvme88k/net/Makefile.inc
new file mode 100644
index 00000000000..dc2ddf344cc
--- /dev/null
+++ b/lib/libc/arch/mvme88k/net/Makefile.inc
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 1995/02/25 14:58:55 cgd Exp $
+
+SRCS+= htonl.S htons.S ntohl.S ntohs.S
diff --git a/lib/libc/arch/mvme88k/net/htonl.S b/lib/libc/arch/mvme88k/net/htonl.S
new file mode 100644
index 00000000000..41ca46ae92d
--- /dev/null
+++ b/lib/libc/arch/mvme88k/net/htonl.S
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .text
+ /*.asciz "from: @(#)htonl.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: htonl.S,v 1.1 1997/03/25 17:07:09 rahnds Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* netorder = htonl(hostorder) */
+
+#include "DEFS.h"
+
+ENTRY(htonl)
+ jmp r1
diff --git a/lib/libc/arch/mvme88k/net/htons.S b/lib/libc/arch/mvme88k/net/htons.S
new file mode 100644
index 00000000000..e97e36c492e
--- /dev/null
+++ b/lib/libc/arch/mvme88k/net/htons.S
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .text
+ /*.asciz "from: @(#)htons.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: htons.S,v 1.1 1997/03/25 17:07:10 rahnds Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = htons(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(htons)
+ jmp.n r1
+ clr r2,r2,16<16> /* clear the top 16 bits */
diff --git a/lib/libc/arch/mvme88k/net/ntohl.S b/lib/libc/arch/mvme88k/net/ntohl.S
new file mode 100644
index 00000000000..c611088c36d
--- /dev/null
+++ b/lib/libc/arch/mvme88k/net/ntohl.S
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .text
+ /*.asciz "from: @(#)ntohl.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: ntohl.S,v 1.1 1997/03/25 17:07:10 rahnds Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = ntohl(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(ntohl)
+ jmp r1
diff --git a/lib/libc/arch/mvme88k/net/ntohs.S b/lib/libc/arch/mvme88k/net/ntohs.S
new file mode 100644
index 00000000000..d0d2636952b
--- /dev/null
+++ b/lib/libc/arch/mvme88k/net/ntohs.S
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .text
+ /*.asciz "from: @(#)ntohs.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: ntohs.S,v 1.1 1997/03/25 17:07:11 rahnds Exp $"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = ntohs(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(ntohs)
+ jmp.n r1
+ clr r2,r2,16<16> /* clear the top 16 bits */
diff --git a/lib/libc/arch/mvme88k/string/Makefile.inc b/lib/libc/arch/mvme88k/string/Makefile.inc
new file mode 100644
index 00000000000..86cf0d0710f
--- /dev/null
+++ b/lib/libc/arch/mvme88k/string/Makefile.inc
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile.inc,v 1.1 1995/03/20 14:45:45 mycroft Exp $
+
+#SRCS+= bcmp.S bcopy.S bzero.S ffs.S index.S memchr.c memcmp.S memset.S \
+# rindex.S strcat.c strcmp.S strcpy.S strcspn.c strlen.S \
+# strncat.c strncmp.S strncpy.S strpbrk.c strsep.c \
+# strspn.c strstr.c swab.S
+#SRCS+= memcpy.S memmove.S strchr.S strrchr.S
+SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memchr.c memcmp.c memset.c \
+ rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c \
+ strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
+ strspn.c strstr.c swab.c
+#SRCS+= index.c rindex.c
diff --git a/lib/libc/arch/mvme88k/string/strchr.c b/lib/libc/arch/mvme88k/string/strchr.c
new file mode 100644
index 00000000000..31daf6cfcf5
--- /dev/null
+++ b/lib/libc/arch/mvme88k/string/strchr.c
@@ -0,0 +1,13 @@
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)strlen.c 5.5 (Berkeley) 1/26/91";*/
+static char *rcsid = "$Id: strchr.c,v 1.1 1997/03/25 17:07:13 rahnds Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <string.h>
+
+char *
+strchr(str, c)
+ const char *str;
+{
+ index(str, c);
+}
diff --git a/lib/libc/arch/mvme88k/string/strrchr.c b/lib/libc/arch/mvme88k/string/strrchr.c
new file mode 100644
index 00000000000..a9c8ddb7041
--- /dev/null
+++ b/lib/libc/arch/mvme88k/string/strrchr.c
@@ -0,0 +1,13 @@
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)strlen.c 5.5 (Berkeley) 1/26/91";*/
+static char *rcsid = "$Id: strrchr.c,v 1.1 1997/03/25 17:07:14 rahnds Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <string.h>
+
+char *
+strrchr(str, c)
+ const char *str;
+{
+ rindex(str, c);
+}
diff --git a/lib/libc/arch/mvme88k/sys/Ovfork.S b/lib/libc/arch/mvme88k/sys/Ovfork.S
new file mode 100644
index 00000000000..077c111689f
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/Ovfork.S
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)fork.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: Ovfork.S,v 1.1 1997/03/25 17:07:16 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+/* r2 = pid. r3 = 0 in parent, 1 in child */
+
+SYSCALL(vfork)
+ bcnd eq0,r3,parent
+ or r2,r0,0
+ or r3,r0,0
+parent:
+ jmp r1 /* pid = vfork() */
diff --git a/lib/libc/arch/mvme88k/sys/brk.S b/lib/libc/arch/mvme88k/sys/brk.S
new file mode 100644
index 00000000000..b56693a755d
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/brk.S
@@ -0,0 +1,70 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)brk.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: brk.S,v 1.1 1997/03/25 17:07:16 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl _end
+ .globl minbrk
+ .globl curbrk
+
+ .data
+minbrk: .long 0
+ .text
+
+ENTRY(brk)
+ or.u r5,r0,hi16(minbrk)
+ ld r5,r5,lo16(minbrk)
+ cmp r3,r5,r2
+ bb1 le,r3,1f /* r2 should be > minbrk; can't go below end */
+ or r2,r5,0 /* otherwise, set r2 to minbrk */
+1:
+ or r4,r2,0
+ or r13,r0,SYS_break
+ tb0 0,r0,128
+ br cerror
+ or.u r5,r0,hi16(curbrk)
+ st r4,r5,lo16(curbrk)
+ or r2,r0,0 /* clear r2/r3 to indicate success */
+ jmp.n r1
+ or r3,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/cerror.S b/lib/libc/arch/mvme88k/sys/cerror.S
new file mode 100644
index 00000000000..a268f693d88
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/cerror.S
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)cerror.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: cerror.S,v 1.1 1997/03/25 17:07:17 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .align 8
+ .globl _errno
+cerror:
+ or.u r4,r0,hi16(_errno)
+ st r2,r4,lo16(_errno)
+ sub r2,r0,0x1
+ jmp.n r1
+ sub r3,r0,0x1
diff --git a/lib/libc/arch/mvme88k/sys/exect.S b/lib/libc/arch/mvme88k/sys/exect.S
new file mode 100644
index 00000000000..a334a719d6c
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/exect.S
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)exect.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: exect.S,v 1.1 1997/03/25 17:07:18 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(exect)
+ or r13,r0,SYS_execve
+ tb0 0,r0,128 /* exect(file, argv, env) */
+ br cerror
diff --git a/lib/libc/arch/mvme88k/sys/fork.S b/lib/libc/arch/mvme88k/sys/fork.S
new file mode 100644
index 00000000000..34fa85ff344
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/fork.S
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)fork.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: fork.S,v 1.1 1997/03/25 17:07:19 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+/* r2 = pid. r3 = 0 in parent, 1 in child */
+
+SYSCALL(fork)
+ bcnd eq0,r3,parent
+ or r2,r0,0
+ or r3,r0,0
+parent:
+ jmp r1 /* pid = fork() */
diff --git a/lib/libc/arch/mvme88k/sys/pipe.S b/lib/libc/arch/mvme88k/sys/pipe.S
new file mode 100644
index 00000000000..9c379ec1e03
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/pipe.S
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)pipe.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: pipe.S,v 1.1 1997/03/25 17:07:20 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(pipe)
+ or r4,r2,0
+ or r13,r0,SYS_pipe
+ tb0 0,r0,128
+ br cerror
+ st r2,r4,0
+ st r3,r4,4
+ jmp.n r1
+ or r2,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/ptrace.S b/lib/libc/arch/mvme88k/sys/ptrace.S
new file mode 100644
index 00000000000..ab75908eb24
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/ptrace.S
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: ptrace.S,v 1.1 1997/03/25 17:07:22 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl _errno
+
+ENTRY(ptrace)
+ or.u r9,r0,hi16(_errno)
+ st r0,r9,lo16(_errno)
+ or r13,r0,SYS_ptrace
+ tb0 0,r0,128
+ br cerror
+ jmp r1
diff --git a/lib/libc/arch/mvme88k/sys/reboot.S b/lib/libc/arch/mvme88k/sys/reboot.S
new file mode 100644
index 00000000000..c8e3985b998
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/reboot.S
@@ -0,0 +1,49 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)reboot.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: reboot.S,v 1.1 1997/03/25 17:07:22 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+SYSCALL(reboot)
+ or r9,r0,0x63
+ tb0 0,r0,496 /* call bug trap */
diff --git a/lib/libc/arch/mvme88k/sys/sbrk.S b/lib/libc/arch/mvme88k/sys/sbrk.S
new file mode 100644
index 00000000000..5a0ff4f8f1c
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/sbrk.S
@@ -0,0 +1,70 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)sbrk.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: sbrk.S,v 1.1 1997/03/25 17:07:23 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl _end
+ .globl curbrk
+
+ .data
+curbrk: .long _end
+ .text
+
+ENTRY(sbrk)
+ or.u r5,r0,hi16(curbrk)
+ ld r5,r5,lo16(curbrk)
+ add r2,r2,r5
+ or r4,r2,0
+ or r13,r0,SYS_break
+ tb0 0,r0,128
+ br cerror
+ /* Save old curbrk */
+ or.u r5,r0,hi16(curbrk)
+ ld r3,r5,lo16(curbrk)
+ /* Update curbrk */
+ st r4,r5,lo16(curbrk)
+ /* and return old curbrk */
+ or r2,r3,0
+ jmp.n r1
+ or r3,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/setlogin.S b/lib/libc/arch/mvme88k/sys/setlogin.S
new file mode 100644
index 00000000000..fe8ef156a33
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/setlogin.S
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 1991 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)
+ .data
+ /*.asciz "from: @(#)setlogin.s 5.1 (Berkeley) 5/6/91"*/
+ .asciz "$Id: setlogin.S,v 1.1 1997/03/25 17:07:24 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl ___logname_valid /* in getlogin() */
+
+SYSCALL(setlogin)
+ or.u r2,r0,hi16(___logname_valid)
+ st r0,r2,lo16(___logname_valid)
+ jmp r1 /* setlogin(name) */
diff --git a/lib/libc/arch/mvme88k/sys/sigpending.S b/lib/libc/arch/mvme88k/sys/sigpending.S
new file mode 100644
index 00000000000..07edb56fc2f
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/sigpending.S
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)sigpending.s 5.2 (Berkeley) 8/6/90"*/
+ .asciz "$Id: sigpending.S,v 1.1 1997/03/25 17:07:24 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(sigpending)
+ or r4,r2,0 /* save r2 */
+ or r13,r0,SYS_sigpending
+ tb0 0,r0,128
+ br cerror
+ st r2,r4,0
+ jmp.n r1
+ or r2,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/sigprocmask.S b/lib/libc/arch/mvme88k/sys/sigprocmask.S
new file mode 100644
index 00000000000..22ce43ad567
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/sigprocmask.S
@@ -0,0 +1,61 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)sigprocmask.s 5.2 (Berkeley) 6/6/90"*/
+ .asciz "$Id: sigprocmask.S,v 1.1 1997/03/25 17:07:25 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(sigprocmask)
+ bcnd ne0,r3,L1 /* if new sigset pointer is null */
+ or r2,r0,1 /* how = SIG_BLOCK and do it */
+ br L2
+L1:
+ ld r3,r3,0 /* else load set from *set and do it */
+L2:
+ or r13,r0,SYS_sigprocmask
+ tb0 0,r0,128
+ br cerror
+ bcnd eq0,r4,out /* if old mask not requested, done */
+ st r2,r4,0 /* otherwise, set it */
+out:
+ jmp.n r1
+ or r2,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/sigreturn.S b/lib/libc/arch/mvme88k/sys/sigreturn.S
new file mode 100644
index 00000000000..07e8b69c65f
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/sigreturn.S
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)sigreturn.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: sigreturn.S,v 1.1 1997/03/25 17:07:26 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+/*
+ * We must preserve the state of the registers as the user has set them up.
+ * Not sure what should be done XXX nivas
+ */
+
+RSYSCALL(sigreturn)
diff --git a/lib/libc/arch/mvme88k/sys/sigsuspend.S b/lib/libc/arch/mvme88k/sys/sigsuspend.S
new file mode 100644
index 00000000000..7982a970e32
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/sigsuspend.S
@@ -0,0 +1,60 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)sigsuspend.s 5.2 (Berkeley) 6/6/90"*/
+ .asciz "$Id: sigsuspend.S,v 1.1 1997/03/25 17:07:26 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+/*
+ * Sigsuspend actually expects a pointer to the the mask. To save
+ * a copyin in the kernel, we do the dereference here and pass it.
+ * This will be fail if we ever have more than 32 signals ie. sizeof
+ * sigset_t != sizeof int.
+ */
+
+ENTRY(sigsuspend)
+ ld r2,r2,0 /* dereference the pointer mask */
+ or r13,r0,SYS_sigsuspend
+ tb0 0,r0,128
+ br cerror
+ jmp.n r1
+ or r2,r0,0
diff --git a/lib/libc/arch/mvme88k/sys/syscall.S b/lib/libc/arch/mvme88k/sys/syscall.S
new file mode 100644
index 00000000000..eada19a7f78
--- /dev/null
+++ b/lib/libc/arch/mvme88k/sys/syscall.S
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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)
+ .data
+ /*.asciz "from: @(#)syscall.s 5.1 (Berkeley) 5/12/90"*/
+ .asciz "$Id: syscall.S,v 1.1 1997/03/25 17:07:28 rahnds Exp $"
+ .text
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(syscall)
+ ld r10,r31,32
+ ld r11,r31,36
+ ld r12,r31,40
+ or r9,r0,0
+ tb0 0,r0,128
+ br cerror
+ jmp r1
diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c
index 6449645bc1e..5141130da4f 100644
--- a/lib/libc/rpc/xdr_float.c
+++ b/lib/libc/rpc/xdr_float.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_float.c,v 1.6 1997/02/21 19:35:33 gvf Exp $";
+static char *rcsid = "$OpenBSD: xdr_float.c,v 1.7 1997/03/25 17:07:29 rahnds Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -54,7 +54,7 @@ static char *rcsid = "$OpenBSD: xdr_float.c,v 1.6 1997/02/21 19:35:33 gvf Exp $"
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
- defined(__arm32__) || defined(__powerpc__)
+ defined(__arm32__) || defined(__powerpc__) || defined(__m88k__)
#include <machine/endian.h>
#define IEEEFP
#endif
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index 5ee50867a9d..a4ba993095d 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -90,12 +90,12 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strtod.c,v 1.8 1997/01/09 03:19:01 rahnds Exp $";
+static char *rcsid = "$OpenBSD: strtod.c,v 1.9 1997/03/25 17:07:30 rahnds Exp $";
#endif /* LIBC_SCCS and not lint */
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
- defined(__powerpc__)
+ defined(__powerpc__) || defined(__m88k__)
#include <sys/types.h>
#if BYTE_ORDER == BIG_ENDIAN
#define IEEE_BIG_ENDIAN
diff --git a/lib/libkvm/kvm_mvme88k.c b/lib/libkvm/kvm_mvme88k.c
new file mode 100644
index 00000000000..4ab360a4a1a
--- /dev/null
+++ b/lib/libkvm/kvm_mvme88k.c
@@ -0,0 +1,79 @@
+/* $NetBSD: kvm_alpha.c,v 1.2 1995/09/29 03:57:48 cgd Exp $ */
+
+/*
+ * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include <sys/param.h>
+#include <sys/user.h>
+#include <sys/proc.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <nlist.h>
+#include <kvm.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+
+#include <limits.h>
+#include <db.h>
+
+#include "kvm_private.h"
+
+void
+_kvm_freevtop(kd)
+ kvm_t *kd;
+{
+
+}
+
+int
+_kvm_initvtop(kd)
+ kvm_t *kd;
+{
+
+ return (0);
+}
+
+int
+_kvm_kvatop(kd, va, pa)
+ kvm_t *kd;
+ u_long va;
+ u_long *pa;
+{
+
+ /* don't forget k0seg translations! */
+
+ return (0);
+}
+off_t
+_kvm_pa2off(kd, pa)
+ kvm_t *kd;
+ u_long pa;
+{
+ _kvm_err(kd, 0, "pa2off not yet implemented!");
+ return 0;
+}
diff --git a/lib/libm/Makefile b/lib/libm/Makefile
index 8ded3127860..c4662314aa8 100644
--- a/lib/libm/Makefile
+++ b/lib/libm/Makefile
@@ -1,5 +1,5 @@
# $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $
-# $OpenBSD: Makefile,v 1.9 1996/11/14 15:04:49 mickey Exp $
+# $OpenBSD: Makefile,v 1.10 1997/03/25 17:07:33 rahnds Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -64,6 +64,10 @@ NOIEEE_ARCH=n_infnan.S n_argred.S n_sqrt.S
ARCH_SRCS = n_atan2.S n_cabs.S n_cbrt.S n_sincos.S n_tan.S n_support.S
.endif
+.if (${MACHINE_ARCH} == "mvme88k")
+CFLAGS+=-Dfloat=double
+.endif
+
.PATH: ${.CURDIR}/man
.PATH: ${.CURDIR}/src
.PATH: ${.CURDIR}/noieee_src
diff --git a/sys/arch/mvme88k/compile/.cvsignore b/sys/arch/mvme88k/compile/.cvsignore
index c83f3847f7e..7315f38ae92 100644
--- a/sys/arch/mvme88k/compile/.cvsignore
+++ b/sys/arch/mvme88k/compile/.cvsignore
@@ -1,2 +1,3 @@
GENERIC
MYBOX
+NFS
diff --git a/sys/arch/mvme88k/include/asm.h b/sys/arch/mvme88k/include/asm.h
index 2c89b9e2191..5caa321d774 100644
--- a/sys/arch/mvme88k/include/asm.h
+++ b/sys/arch/mvme88k/include/asm.h
@@ -39,8 +39,10 @@
#define EH_DEBUG 0
#endif EH_DEBUG
+#if 0
/* this gives the offsets into various structures of various elements, etc */
#include "assym.s"
+#endif
#define ENTRY(NAME) \
.align 8; .globl FUNC(NAME); FUNC(NAME):
diff --git a/sys/arch/mvme88k/include/profile.h b/sys/arch/mvme88k/include/profile.h
index 84dd1e1d80e..6e366a01a96 100644
--- a/sys/arch/mvme88k/include/profile.h
+++ b/sys/arch/mvme88k/include/profile.h
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)profile.h 8.1 (Berkeley) 6/11/93
- * $Id: profile.h,v 1.5 1997/03/03 20:21:11 rahnds Exp $
+ * $Id: profile.h,v 1.6 1997/03/25 17:07:37 rahnds Exp $
*/
#define _MCOUNT_DECL static inline void _mcount
@@ -42,7 +42,7 @@ extern void mcount() asm("mcount"); \
void \
mcount() \
{ \
- int selfret; \
+ register int selfret; \
register int callerret; \
/* \
* find the return address for mcount, \
@@ -50,7 +50,7 @@ mcount() \
* \
* selfret = ret pushed by mcount call \
*/ \
- asm volatile("st r1,%0" : "=m" (selfret)); \
+ asm volatile("or %0,r1,0" : "=r" (selfret)); \
/* \
* callerret = ret pushed by call into self. \
*/ \
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c
index dadb804dbbf..5a402369427 100644
--- a/sys/ddb/db_run.c
+++ b/sys/ddb/db_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_run.c,v 1.5 1997/03/21 00:48:41 niklas Exp $ */
+/* $OpenBSD: db_run.c,v 1.6 1997/03/25 17:07:39 rahnds Exp $ */
/* $NetBSD: db_run.c,v 1.8 1996/02/05 01:57:12 christos Exp $ */
/*
@@ -95,7 +95,9 @@ db_stop_at_pc(regs, is_breakpoint)
return (TRUE); /* stop here */
}
} else if (*is_breakpoint) {
+#ifndef m88k
PC_REGS(regs) += BKPT_SIZE;
+#endif
}
*is_breakpoint = FALSE;
@@ -260,6 +262,7 @@ db_set_single_step(regs)
*/
inst = db_get_value(pc, sizeof(int), FALSE);
if (inst_branch(inst) || inst_call(inst)) {
+ extern unsigned getreg_val();
brpc = branch_taken(inst, pc, getreg_val, regs);
if (brpc != pc) { /* self-branches are hopeless */
diff --git a/usr.bin/xlint/lint1/param.h b/usr.bin/xlint/lint1/param.h
index 8d909e3e5db..8de3345d7e5 100644
--- a/usr.bin/xlint/lint1/param.h
+++ b/usr.bin/xlint/lint1/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.6 1997/01/09 03:18:58 rahnds Exp $ */
+/* $OpenBSD: param.h,v 1.7 1997/03/25 17:07:40 rahnds Exp $ */
/* $NetBSD: param.h,v 1.6 1996/04/01 21:47:57 mark Exp $ */
/*
@@ -88,6 +88,9 @@
#elif __powerpc__
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+#elif __mvme88k__
+#define PTRDIFF_IS_LONG 0
+#define SIZEOF_IS_ULONG 0
#else
#error unknown machine type
#endif