summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-13 20:46:49 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-13 20:46:49 +0000
commit2c71523a7983d94c04ce636f1554c4c3877649b1 (patch)
tree9b187f90dabd91ea5872b76a8cd2d8cc9a8ec28e /lib
parentd2337d4cdb6046de8074cb9c2f0b9dcf686fa487 (diff)
Sync with kernel, from NetBSD
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arch/alpha/DEFS.h30
-rw-r--r--lib/libc/arch/alpha/Makefile.inc9
-rw-r--r--lib/libc/arch/alpha/SYS.h58
3 files changed, 42 insertions, 55 deletions
diff --git a/lib/libc/arch/alpha/DEFS.h b/lib/libc/arch/alpha/DEFS.h
deleted file mode 100644
index 2b4847dfa40..00000000000
--- a/lib/libc/arch/alpha/DEFS.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* $OpenBSD: DEFS.h,v 1.2 1996/08/19 08:10:13 tholo 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 <machine/asm.h>
diff --git a/lib/libc/arch/alpha/Makefile.inc b/lib/libc/arch/alpha/Makefile.inc
index 965582a0c15..c1d56e1ec94 100644
--- a/lib/libc/arch/alpha/Makefile.inc
+++ b/lib/libc/arch/alpha/Makefile.inc
@@ -1,9 +1,10 @@
-# $OpenBSD: Makefile.inc,v 1.3 1996/08/19 08:10:15 tholo Exp $
+# $OpenBSD: Makefile.inc,v 1.4 1996/11/13 20:46:46 niklas Exp $
+# $NetBSD: Makefile.inc,v 1.4 1996/10/17 02:58:18 cgd Exp $
-KMINCLUDES= arch/alpha/SYS.h arch/alpha/DEFS.h
+KMINCLUDES=
KMSRCS= divrem.m4 bzero.S htonl.S htons.S ntohl.S ntohs.S \
- byte_swap_2.S byte_swap_4.S
-#KMSRCS= bcmp.S ffs.S strcat.S strcmp.S strcpy.S strlen.S
+ byte_swap_2.S byte_swap_4.S ffs.S
+#KMSRCS= bcmp.S strcat.S strcmp.S strcpy.S strlen.S
# `source' files built from m4 source
SRCS+= __divqu.S __divq.S __divlu.S __divl.S
diff --git a/lib/libc/arch/alpha/SYS.h b/lib/libc/arch/alpha/SYS.h
index 1888758f337..d3c79a55ec9 100644
--- a/lib/libc/arch/alpha/SYS.h
+++ b/lib/libc/arch/alpha/SYS.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: SYS.h,v 1.2 1996/08/19 08:10:16 tholo Exp $ */
+/* $OpenBSD: SYS.h,v 1.3 1996/11/13 20:46:47 niklas Exp $ */
+/* $NetBSD: SYS.h,v 1.4 1996/10/17 03:03:53 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -30,24 +31,39 @@
#include <machine/asm.h>
#include <sys/syscall.h>
-#define CALLSYS(num) \
- CONST(num, v0); \
- call_pal 0x83; /* op_callsys */
-
-#define SYSCALL_NOLABEL(x) \
- CALLSYS(SYS_/**/x); \
- beq a3, 9f; \
- br gp, 8f; \
-8: SETGP(gp); \
- lda at_reg, cerror; \
- jmp zero, (at_reg); \
-9:
-
-#define SYSCALL(x) LEAF(x, 0 /* XXX */); SYSCALL_NOLABEL(x);
-#define RSYSCALL(x) SYSCALL(x); RET; END(x);
-
-#define PSEUDO(x,y) \
-LEAF(x,0); /* unknown # of args */ \
- CALLSYS(SYS_/**/y); \
+
+#define CALLSYS_ERROR(name) \
+ CALLSYS_NOERROR(name); \
+ br gp, LLABEL(name,0); \
+LLABEL(name,0): \
+ LDGP(gp); \
+ beq a3, LLABEL(name,1); \
+ jmp zero, cerror; \
+LLABEL(name,1):
+
+
+#define SYSCALL(name) \
+LEAF(name,0); /* XXX # of args? */ \
+ CALLSYS_ERROR(name)
+
+#define SYSCALL_NOERROR(name) \
+LEAF(name,0); /* XXX # of args? */ \
+ CALLSYS_NOERROR(name)
+
+
+#define RSYSCALL(name) \
+ SYSCALL(name); \
+ RET; \
+END(name)
+
+#define RSYSCALL_NOERROR(name) \
+ SYSCALL_NOERROR(name); \
+ RET; \
+END(name)
+
+
+#define PSEUDO(label,name) \
+LEAF(label,0); /* XXX # of args? */ \
+ CALLSYS_NOERROR(name); \
RET; \
-END(x);
+END(label);