summaryrefslogtreecommitdiff
path: root/sys/arch/pmax
diff options
context:
space:
mode:
authorThomas Graichen <graichen@cvs.openbsd.org>1996-10-29 17:02:40 +0000
committerThomas Graichen <graichen@cvs.openbsd.org>1996-10-29 17:02:40 +0000
commit52f65e9e9c03300eb356424ee744bc31010d232c (patch)
tree8e89399ddc0afb1c7f35092cb83f1037270cda3e /sys/arch/pmax
parentc1018c7b6f3b91afed0c549cffeecaaecfe2d7bb (diff)
bring the source tree a bit up to date with my local tree
Diffstat (limited to 'sys/arch/pmax')
-rw-r--r--sys/arch/pmax/conf/Makefile.pmax10
-rw-r--r--sys/arch/pmax/conf/PLUTO36
-rw-r--r--sys/arch/pmax/include/asm.h150
-rw-r--r--sys/arch/pmax/include/machAsmDefs.h199
4 files changed, 303 insertions, 92 deletions
diff --git a/sys/arch/pmax/conf/Makefile.pmax b/sys/arch/pmax/conf/Makefile.pmax
index d3122845a7b..de4b7e34f78 100644
--- a/sys/arch/pmax/conf/Makefile.pmax
+++ b/sys/arch/pmax/conf/Makefile.pmax
@@ -24,7 +24,7 @@
AS?= as
CC?= cc
CPP?= cpp
-LD?= ld
+LD= /usr/local/bin/ld
STRIP?= strip -d
TOUCH?= touch -f -c
@@ -33,8 +33,8 @@ S= ../../../..
PMAX= ../..
INCLUDES= -I. -I$S/arch -I$S
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpmax ${GP}
-CFLAGS= ${DEBUG} -O2 -Werror
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpmax
+CFLAGS= ${DEBUG} -O2 -Werror -mno-abicalls -mcpu=r3000
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -N -Ttext 80030000 -e start
@@ -99,7 +99,7 @@ LINKFLAGS+= -x
SYSTEM_LD_TAIL+=;\
mv $@ $@.elf; \
- elf2aout $@.elf $@; \
+ /usr/local/bin/elf2aout $@.elf $@; \
chmod 755 $@
%LOAD
@@ -111,7 +111,7 @@ genassym: genassym.o
${CC} -o $@ genassym.o
genassym.o: ${S}/arch/pmax/pmax/genassym.c
- ${NORMAL_C_C}
+ ${CC} ${INCLUDES} ${IDENT} -D_KERNEL -Dpmax -c $<
param.c: $S/conf/param.c
rm -f param.c
diff --git a/sys/arch/pmax/conf/PLUTO b/sys/arch/pmax/conf/PLUTO
index cbb5c2fc308..1931c01156d 100644
--- a/sys/arch/pmax/conf/PLUTO
+++ b/sys/arch/pmax/conf/PLUTO
@@ -4,29 +4,29 @@
machine pmax
-options CPU_R3000
-options DS3100
-options HZ=256
-options NKMEMCLUSTERS=1024
-options TIMEZONE=0
-options DST=0
+option CPU_R3000
+option DS3100
+option HZ=256
+option NKMEMCLUSTERS=1024
+option TIMEZONE=0
+option DST=0
maxusers 8
-options SWAPPAGER
-options VNODEPAGER
-options DEVPAGER
+option SWAPPAGER
+option VNODEPAGER
+option DEVPAGER
-options COMPAT_43
-options NATIVE_ELF
-options FFS
-options FIFO
-options INET
-options NFSCLIENT
-options NFSSERVER
-options KTRACE
+option COMPAT_43
+option NATIVE_ELF
+option FFS
+option FIFO
+option INET
+option NFSCLIENT
+option NFSSERVER
+option KTRACE
-config netbsd root on rz0a swap on rz0b dumps on rz0b
+config bsd root on rz3a swap on rz3b dumps on rz3b
mainbus0 at root
diff --git a/sys/arch/pmax/include/asm.h b/sys/arch/pmax/include/asm.h
index b31981eb962..0a152c2f6be 100644
--- a/sys/arch/pmax/include/asm.h
+++ b/sys/arch/pmax/include/asm.h
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.8 1996/03/25 02:50:50 jonathan Exp $ */
+/* $OpenBSD: asm.h,v 1.2 1996/10/29 17:02:38 graichen Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -35,14 +35,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)machAsmDefs.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * machAsmDefs.h --
- *
- * Macros used when writing assembler programs.
- *
* Copyright (C) 1989 Digital Equipment Corporation.
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
@@ -50,39 +42,65 @@
* Digital Equipment Corporation makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
- *
- * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsmDefs.h,
- * v 1.2 89/08/15 18:28:24 rab Exp SPRITE (DECWRL)
*/
-#ifndef _MIPS_ASM_H
-#define _MIPS_ASM_H
+#ifndef _MACHASMDEFS
+#define _MACHASMDEFS
#include <machine/regdef.h>
+#define ABICALLS .abicalls
+
+#if defined(ABICALLS) && !defined(_KERNEL)
+ ABICALLS
+#endif
+
+#define RCSID(x)
+
+#define _C_LABEL(x) x
+
/*
- * Define -pg profile entry code.
+ * Define how to access unaligned data word
*/
-#if defined(GPROF) || defined(PROF)
-#define MCOUNT .set noreorder; \
- .set noat; \
- move $1,$31; \
- jal _mcount; \
- subu sp,sp,8; \
- .set reorder; \
- .set at;
+#ifdef MIPSEL
+#define LWLO lwl
+#define LWHI lwr
+#define SWLO swl
+#define SWHI swr
+#endif
+#ifdef MIPSEB
+#define LWLO lwr
+#define LWHI lwl
+#define SWLO swr
+#define SWHI swl
+#endif
+
+/*
+ * Code for setting gp reg if abicalls are used.
+ */
+#if defined(ABICALLS) && !defined(_KERNEL)
+#define ABISETUP \
+ .set noreorder; \
+ .cpload t9; \
+ .set reorder;
#else
-#define MCOUNT
+#define ABISETUP
#endif
-#ifdef __NO_LEADING_UNDERSCORES__
-# define _C_LABEL(x) x
+/*
+ * Define -pg profile entry code.
+ */
+#if defined(GPROF) || defined(PROF)
+#define MCOUNT \
+ .set noreorder; \
+ .set noat; \
+ move $1,$31; \
+ jal _mcount; \
+ subu sp,sp,8; \
+ .set reorder; \
+ .set at;
#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
+#define MCOUNT
#endif
/*
@@ -90,37 +108,31 @@
*
* Declare a leaf routine.
*/
-#define LEAF(x) \
- .globl _C_LABEL(x); \
- .ent _C_LABEL(x), 0; \
-_C_LABEL(x): ; \
- .frame sp, 0, ra; \
+#define LEAF(x) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP \
MCOUNT
+#define ALEAF(x) \
+ .globl x; \
+x:
+
/*
* NLEAF(x)
*
* Declare a non-profiled leaf routine.
*/
-#define NLEAF(x) \
- .globl _C_LABEL(x); \
- .ent _C_LABEL(x), 0; \
-_C_LABEL(x): ; \
- .frame sp, 0, ra
-
-/*
- * ALEAF -- declare alternate entry to a leaf routine.
- */
-#ifdef USE_AENT
-#define AENT(x) \
- .aent x, 0
-#else
-#define AENT(x)
-#endif
-#define ALEAF(x) \
- .globl _C_LABEL(x); \
- AENT (_C_LABEL(x)) \
-_C_LABEL(x):
+#define NLEAF(x) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP
/*
* NON_LEAF(x)
@@ -128,10 +140,12 @@ _C_LABEL(x):
* Declare a non-leaf routine (a routine that makes other C calls).
*/
#define NON_LEAF(x, fsize, retpc) \
- .globl _C_LABEL(x); \
- .ent _C_LABEL(x), 0; \
-_C_LABEL(x): ; \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
.frame sp, fsize, retpc; \
+ ABISETUP \
MCOUNT
/*
@@ -141,10 +155,12 @@ _C_LABEL(x): ; \
* (a routine that makes other C calls).
*/
#define NNON_LEAF(x, fsize, retpc) \
- .globl _C_LABEL(x); \
- .ent _C_LABEL(x), 0; \
-_C_LABEL(x): ; \
- .frame sp, fsize, retpc
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, fsize, retpc \
+ ABISETUP
/*
* END(x)
@@ -152,7 +168,7 @@ _C_LABEL(x): ; \
* Mark end of a procedure.
*/
#define END(x) \
- .end _C_LABEL(x)
+ .end x
#define STAND_FRAME_SIZE 24
#define STAND_RA_OFFSET 20
@@ -162,12 +178,12 @@ _C_LABEL(x): ; \
*/
#define PANIC(msg) \
la a0, 9f; \
- jal _C_LABEL(panic); \
+ jal panic; \
MSG(msg)
#define PRINTF(msg) \
la a0, 9f; \
- jal _C_LABEL(printf); \
+ jal printf; \
MSG(msg)
#define MSG(msg) \
@@ -177,6 +193,6 @@ _C_LABEL(x): ; \
#define ASMSTR(str) \
.asciiz str; \
- .align 2
+ .align 3
-#endif /* _MIPS_ASM_H */
+#endif /* _MACHASMDEFS */
diff --git a/sys/arch/pmax/include/machAsmDefs.h b/sys/arch/pmax/include/machAsmDefs.h
index a6c6e932020..cbe242708d2 100644
--- a/sys/arch/pmax/include/machAsmDefs.h
+++ b/sys/arch/pmax/include/machAsmDefs.h
@@ -1,3 +1,198 @@
-/* $NetBSD: machAsmDefs.h,v 1.8 1996/03/25 02:55:18 jonathan Exp $ */
+/* $OpenBSD: machAsmDefs.h,v 1.4 1996/10/29 17:02:39 graichen Exp $ */
-#include <pmax/asm.h>
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Ralph Campbell.
+ *
+ * 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.
+ *
+ * Copyright (C) 1989 Digital Equipment Corporation.
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appears in all copies.
+ * Digital Equipment Corporation makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ */
+
+#ifndef _MACHASMDEFS
+#define _MACHASMDEFS
+
+#include <machine/regdef.h>
+
+#define ABICALLS .abicalls
+
+#if defined(ABICALLS) && !defined(_KERNEL)
+ ABICALLS
+#endif
+
+#define RCSID(x)
+
+#define _C_LABEL(x) x
+
+/*
+ * Define how to access unaligned data word
+ */
+#ifdef MIPSEL
+#define LWLO lwl
+#define LWHI lwr
+#define SWLO swl
+#define SWHI swr
+#endif
+#ifdef MIPSEB
+#define LWLO lwr
+#define LWHI lwl
+#define SWLO swr
+#define SWHI swl
+#endif
+
+/*
+ * Code for setting gp reg if abicalls are used.
+ */
+#if defined(ABICALLS) && !defined(_KERNEL)
+#define ABISETUP \
+ .set noreorder; \
+ .cpload t9; \
+ .set reorder;
+#else
+#define ABISETUP
+#endif
+
+/*
+ * Define -pg profile entry code.
+ */
+#if defined(GPROF) || defined(PROF)
+#define MCOUNT \
+ .set noreorder; \
+ .set noat; \
+ move $1,$31; \
+ jal _mcount; \
+ subu sp,sp,8; \
+ .set reorder; \
+ .set at;
+#else
+#define MCOUNT
+#endif
+
+/*
+ * LEAF(x)
+ *
+ * Declare a leaf routine.
+ */
+#define LEAF(x) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP \
+ MCOUNT
+
+#define ALEAF(x) \
+ .globl x; \
+x:
+
+/*
+ * NLEAF(x)
+ *
+ * Declare a non-profiled leaf routine.
+ */
+#define NLEAF(x) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP
+
+/*
+ * NON_LEAF(x)
+ *
+ * Declare a non-leaf routine (a routine that makes other C calls).
+ */
+#define NON_LEAF(x, fsize, retpc) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, fsize, retpc; \
+ ABISETUP \
+ MCOUNT
+
+/*
+ * NNON_LEAF(x)
+ *
+ * Declare a non-profiled non-leaf routine
+ * (a routine that makes other C calls).
+ */
+#define NNON_LEAF(x, fsize, retpc) \
+ .align 3; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, fsize, retpc \
+ ABISETUP
+
+/*
+ * END(x)
+ *
+ * Mark end of a procedure.
+ */
+#define END(x) \
+ .end x
+
+#define STAND_FRAME_SIZE 24
+#define STAND_RA_OFFSET 20
+
+/*
+ * Macros to panic and printf from assembly language.
+ */
+#define PANIC(msg) \
+ la a0, 9f; \
+ jal panic; \
+ MSG(msg)
+
+#define PRINTF(msg) \
+ la a0, 9f; \
+ jal printf; \
+ MSG(msg)
+
+#define MSG(msg) \
+ .rdata; \
+9: .asciiz msg; \
+ .text
+
+#define ASMSTR(str) \
+ .asciiz str; \
+ .align 3
+
+#endif /* _MACHASMDEFS */