summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-13 11:51:15 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-13 11:51:15 +0000
commitcf47d736b4f8be7688815d6199b5b2a3e6c6cd91 (patch)
tree26e021bc053c854842144423f41e92e518c5868e /sys
parent7b5de006e88e348bad70d505befe41782c58e3a5 (diff)
Sync to 970110 NetBSD
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/m68k/060sp/Makefile4
-rw-r--r--sys/arch/m68k/Makefile3
-rw-r--r--sys/arch/m68k/fpe/fpu_calcea.c6
-rw-r--r--sys/arch/m68k/fpe/fpu_emulate.c7
-rw-r--r--sys/arch/m68k/fpe/fpu_fmovecr.c4
-rw-r--r--sys/arch/m68k/fpe/fpu_fscale.c4
-rw-r--r--sys/arch/m68k/fpe/fpu_fstore.c4
-rw-r--r--sys/arch/m68k/fpe/fpu_log.c4
-rw-r--r--sys/arch/m68k/fpsp/Makefile4
-rw-r--r--sys/arch/m68k/fpsp/Makefile.inc6
-rw-r--r--sys/arch/m68k/include/ansi.h6
-rw-r--r--sys/arch/m68k/include/asm.h32
-rw-r--r--sys/arch/m68k/include/asm_single.h59
-rw-r--r--sys/arch/m68k/include/endian.h4
-rw-r--r--sys/arch/m68k/include/reg.h9
-rw-r--r--sys/arch/m68k/include/sysctl.h6
-rw-r--r--sys/arch/m68k/m68k/copy.s5
-rw-r--r--sys/arch/m68k/m68k/db_disasm.c38
-rw-r--r--sys/arch/m68k/m68k/db_interface.c4
-rw-r--r--sys/arch/m68k/m68k/db_trace.c6
-rw-r--r--sys/arch/m68k/m68k/sunos_machdep.c4
21 files changed, 163 insertions, 56 deletions
diff --git a/sys/arch/m68k/060sp/Makefile b/sys/arch/m68k/060sp/Makefile
index 9633ad0200e..f2676fdc79c 100644
--- a/sys/arch/m68k/060sp/Makefile
+++ b/sys/arch/m68k/060sp/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.3 1996/10/04 14:58:34 niklas Exp $
-# $NetBSD: Makefile,v 1.2 1996/05/20 13:31:40 is Exp $
+# $OpenBSD: Makefile,v 1.4 1997/01/13 11:51:03 niklas Exp $
+# $NetBSD: Makefile,v 1.3 1996/12/31 22:44:13 veego Exp $
#
AS = as -m68060
LD = ld
diff --git a/sys/arch/m68k/Makefile b/sys/arch/m68k/Makefile
index 3c16464b398..a603a0f63e7 100644
--- a/sys/arch/m68k/Makefile
+++ b/sys/arch/m68k/Makefile
@@ -1,5 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 1996/08/23 18:59:52 niklas Exp $
-# $NetBSD: Makefile,v 1.5 1995/09/15 21:05:21 pk Exp $
+# $OpenBSD: Makefile,v 1.6 1997/01/13 11:51:02 niklas Exp $
SUBDIR+= 060sp fpsp
diff --git a/sys/arch/m68k/fpe/fpu_calcea.c b/sys/arch/m68k/fpe/fpu_calcea.c
index b8a29000959..00c9ce209f3 100644
--- a/sys/arch/m68k/fpe/fpu_calcea.c
+++ b/sys/arch/m68k/fpe/fpu_calcea.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_calcea.c,v 1.3 1996/05/09 22:20:43 niklas Exp $ */
-/* $NetBSD: fpu_calcea.c,v 1.4 1996/04/30 11:52:11 briggs Exp $ */
+/* $OpenBSD: fpu_calcea.c,v 1.4 1997/01/13 11:51:03 niklas Exp $ */
+/* $NetBSD: fpu_calcea.c,v 1.7 1996/10/16 06:27:05 scottr Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -50,8 +50,6 @@ static int fetch_disp __P((struct frame *frame, struct instruction *insn,
int size, int *res));
static int calc_ea __P((struct insn_ea *ea, char *ptr, char **eaddr));
-int fusword __P((void *));
-
/*
* Helper routines for dealing with "effective address" values.
*/
diff --git a/sys/arch/m68k/fpe/fpu_emulate.c b/sys/arch/m68k/fpe/fpu_emulate.c
index 5504d7e2d71..5092e3e7b55 100644
--- a/sys/arch/m68k/fpe/fpu_emulate.c
+++ b/sys/arch/m68k/fpe/fpu_emulate.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_emulate.c,v 1.6 1996/10/13 16:10:04 briggs Exp $ */
-/* $NetBSD: fpu_emulate.c,v 1.10 1996/10/13 03:19:12 christos Exp $ */
+/* $OpenBSD: fpu_emulate.c,v 1.7 1997/01/13 11:51:04 niklas Exp $ */
+/* $NetBSD: fpu_emulate.c,v 1.14 1996/12/18 05:44:31 scottr Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -52,8 +52,6 @@ static int fpu_emul_brcc __P((struct fpemu *fe, struct instruction *insn));
static int test_cc __P((struct fpemu *fe, int pred));
static struct fpn *fpu_cmp __P((struct fpemu *fe));
-int fusword __P((void *));
-
#if !defined(DL_DEFAULT)
# if defined(DEBUG_WITH_FPU)
# define DL_DEFAULT DL_ALL
@@ -871,6 +869,7 @@ fpu_emul_arith(fe, insn)
break;
case 0x30:
+ case 0x31:
case 0x32:
case 0x33:
case 0x34:
diff --git a/sys/arch/m68k/fpe/fpu_fmovecr.c b/sys/arch/m68k/fpe/fpu_fmovecr.c
index c3ebe5cdd06..42de32f45ec 100644
--- a/sys/arch/m68k/fpe/fpu_fmovecr.c
+++ b/sys/arch/m68k/fpe/fpu_fmovecr.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_fmovecr.c,v 1.3 1996/05/09 22:20:45 niklas Exp $ */
-/* $NetBSD: fpu_fmovecr.c,v 1.4 1996/04/30 11:52:22 briggs Exp $ */
+/* $OpenBSD: fpu_fmovecr.c,v 1.4 1997/01/13 11:51:05 niklas Exp $ */
+/* $NetBSD: fpu_fmovecr.c,v 1.6 1996/10/13 03:19:13 christos Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
diff --git a/sys/arch/m68k/fpe/fpu_fscale.c b/sys/arch/m68k/fpe/fpu_fscale.c
index 0deaef9da8e..8a87f181061 100644
--- a/sys/arch/m68k/fpe/fpu_fscale.c
+++ b/sys/arch/m68k/fpe/fpu_fscale.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_fscale.c,v 1.3 1996/05/29 11:29:32 niklas Exp $ */
-/* $NetBSD: fpu_fscale.c,v 1.4 1996/05/15 07:31:57 leo Exp $ */
+/* $OpenBSD: fpu_fscale.c,v 1.4 1997/01/13 11:51:05 niklas Exp $ */
+/* $NetBSD: fpu_fscale.c,v 1.6 1996/10/13 03:19:14 christos Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
diff --git a/sys/arch/m68k/fpe/fpu_fstore.c b/sys/arch/m68k/fpe/fpu_fstore.c
index bf39a7973ca..b0a8ad29ad0 100644
--- a/sys/arch/m68k/fpe/fpu_fstore.c
+++ b/sys/arch/m68k/fpe/fpu_fstore.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_fstore.c,v 1.2 1996/05/09 22:20:46 niklas Exp $ */
-/* $NetBSD: fpu_fstore.c,v 1.3 1996/04/30 11:52:27 briggs Exp $ */
+/* $OpenBSD: fpu_fstore.c,v 1.3 1997/01/13 11:51:06 niklas Exp $ */
+/* $NetBSD: fpu_fstore.c,v 1.5 1996/10/13 03:19:17 christos Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
diff --git a/sys/arch/m68k/fpe/fpu_log.c b/sys/arch/m68k/fpe/fpu_log.c
index d6a64e67433..ebdfee98438 100644
--- a/sys/arch/m68k/fpe/fpu_log.c
+++ b/sys/arch/m68k/fpe/fpu_log.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fpu_log.c,v 1.2 1996/05/09 22:20:47 niklas Exp $ */
-/* $NetBSD: fpu_log.c,v 1.3 1996/04/30 11:52:33 briggs Exp $ */
+/* $OpenBSD: fpu_log.c,v 1.3 1997/01/13 11:51:06 niklas Exp $ */
+/* $NetBSD: fpu_log.c,v 1.5 1996/10/13 03:19:18 christos Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
diff --git a/sys/arch/m68k/fpsp/Makefile b/sys/arch/m68k/fpsp/Makefile
index a58d0a6c6a8..eb4c4cbb33b 100644
--- a/sys/arch/m68k/fpsp/Makefile
+++ b/sys/arch/m68k/fpsp/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 1996/08/04 18:44:58 deraadt Exp $
+# $OpenBSD: Makefile,v 1.11 1997/01/13 11:51:07 niklas Exp $
# $NetBSD: Makefile,v 1.4 1994/10/26 07:48:46 cgd Exp $
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
@@ -335,6 +335,8 @@ clean cleandir:
rm -f $(LIB_O_FILES)
rm -f $(LIB_TARGET)
+clobber: clean
+
_SUBDIRUSE:
all:
diff --git a/sys/arch/m68k/fpsp/Makefile.inc b/sys/arch/m68k/fpsp/Makefile.inc
index aa558632bd5..7ecc5ee709a 100644
--- a/sys/arch/m68k/fpsp/Makefile.inc
+++ b/sys/arch/m68k/fpsp/Makefile.inc
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile.inc,v 1.2 1996/02/27 11:04:34 niklas Exp $
-# $NetBSD: Makefile.inc,v 1.3 1996/02/03 01:23:54 mycroft Exp $
+# $OpenBSD: Makefile.inc,v 1.3 1997/01/13 11:51:08 niklas Exp $
+# $NetBSD: Makefile.inc,v 1.4 1996/10/29 00:11:27 scottr Exp $
#
# NOTE: $S must correspond to the top of the `sys' tree
@@ -14,6 +14,6 @@ $(FPSPOBJ): .NOTMAIN __always_make_fpsp
@echo making sure the fpsp is up to date...
@(cd $(FPSPSRCDIR); $(MAKE))
-FPSP!= printf "\#ifdef FPSP\n${FPSPOBJ}\n\#endif\n" | cpp -P -undef ${CPPFLAGS:M-DFPSP}
+FPSP!= printf "\#ifdef FPSP\n${FPSPOBJ}\n\#endif\n" | ${CPP} -P -undef ${CPPFLAGS:M-DFPSP}
__always_make_fpsp: .NOTMAIN
diff --git a/sys/arch/m68k/include/ansi.h b/sys/arch/m68k/include/ansi.h
index 0da4f53d0ed..f3162b9c895 100644
--- a/sys/arch/m68k/include/ansi.h
+++ b/sys/arch/m68k/include/ansi.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: ansi.h,v 1.2 1996/04/19 06:18:13 niklas Exp $ */
-/* $NetBSD: ansi.h,v 1.6 1996/03/16 01:31:52 jtc Exp $ */
+/* $OpenBSD: ansi.h,v 1.3 1997/01/13 11:51:08 niklas Exp $ */
+/* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:52 jtc Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -54,6 +54,8 @@
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ long /* time() */
#define _BSD_VA_LIST_ char * /* va_list */
+#define _BSD_CLOCKID_T_ int
+#define _BSD_TIMER_T_ int
/*
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
diff --git a/sys/arch/m68k/include/asm.h b/sys/arch/m68k/include/asm.h
index 8ff526531db..c5d656fadd9 100644
--- a/sys/arch/m68k/include/asm.h
+++ b/sys/arch/m68k/include/asm.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: asm.h,v 1.2 1996/05/29 18:38:28 niklas Exp $ */
-/* $NetBSD: asm.h,v 1.10 1995/03/26 17:08:36 briggs Exp $ */
+/* $OpenBSD: asm.h,v 1.3 1997/01/13 11:51:09 niklas Exp $ */
+/* $NetBSD: asm.h,v 1.12 1996/11/30 02:49:00 jtc Exp $ */
/*
* Copyright (c) 1994 Allen Briggs
@@ -60,17 +60,33 @@
.text; .even; .globl name; name:
#endif
+#ifdef GPROF
+#define _PROF_PROLOG link a6,#0; jbsr mcount; unlk a6
+#else
+#define _PROF_PROLOG
+#endif
+#define ENTRY(name) _ENTRY(_C_LABEL(name)) _PROF_PROLOG
+#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)) _PROF_PROLOG
+
+/*
+ * The m68k ALTENTRY macro is very different than the traditional
+ * implementation used by other OpenBSD ports. Usually ALTENTRY
+ * simply provides an alternate function entry point. The m68k
+ * definition takes a second argument and jumps inside the second
+ * function when profiling is enabled.
+ *
+ * The m68k behavior is similar to the ENTRY2 macro found in
+ * solaris' asm_linkage.h.
+ *
+ * Providing ENTRY2 and changing all the code that uses ALTENTRY
+ * to use it would be a desirable change.
+ */
#ifdef PROF
-#define ENTRY(name) \
- _ENTRY(_C_LABEL(name)); link a6,#0; jbsr mcount; unlk a6
-#define ALTENTRY(name, rname) \
- ENTRY(name); jra rname+12
+#define ALTENTRY(name, rname) ENTRY(name); jra rname+12
#else
-#define ENTRY(name) _ENTRY(_C_LABEL(name))
#define ALTENTRY(name, rname) _ENTRY(_C_LABEL(name))
#endif
-#define ASENTRY(name) _ENTRY(_ASM_LABEL(name))
#define RCSID(x) .text; .asciz x
diff --git a/sys/arch/m68k/include/asm_single.h b/sys/arch/m68k/include/asm_single.h
new file mode 100644
index 00000000000..96ef42e985b
--- /dev/null
+++ b/sys/arch/m68k/include/asm_single.h
@@ -0,0 +1,59 @@
+/* $OpenBSD: asm_single.h,v 1.1 1997/01/13 11:51:09 niklas Exp $ */
+/* $NetBSD: asm_single.h,v 1.1 1996/09/16 06:03:58 leo Exp $ */
+
+/*
+ * Copyright (c) 1996 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#ifndef _M68K_ASM_SINGLE_H
+#define _M68K_ASM_SINGLE_H
+/*
+ * Provide bit manipulation macro's that resolve to a single instruction.
+ * These can be considered atomic on single processor architectures when
+ * no page faults can occur when acessing <var>.
+ * There primary use is to avoid race conditions when manipulating device
+ * registers.
+ */
+
+#define single_inst_bset_b(var, bit) \
+ asm volatile ("orb %0,%1" : : "di" ((u_char)bit), "g" (var))
+#define single_inst_bclr_b(var, bit) \
+ asm volatile ("andb %0,%1" : : "di" ((u_char)~(bit)), "g" (var));
+
+#define single_inst_bset_w(var, bit) \
+ asm volatile ("orw %0,%1" : : "di" ((u_short)bit), "g" (var))
+#define single_inst_bclr_w(var, bit) \
+ asm volatile ("andw %0,%1" : : "di" ((u_short)~(bit)), "g" (var));
+
+#define single_inst_bset_l(var, bit) \
+ asm volatile ("orl %0,%1" : : "di" ((u_long)bit), "g" (var))
+#define single_inst_bclr_l(var, bit) \
+ asm volatile ("andl %0,%1" : : "di" ((u_long)~(bit)), "g" (var));
+
+#endif /* _M68K_ASM_SINGLE_H */
diff --git a/sys/arch/m68k/include/endian.h b/sys/arch/m68k/include/endian.h
index 979c8d844ff..3a8186130d8 100644
--- a/sys/arch/m68k/include/endian.h
+++ b/sys/arch/m68k/include/endian.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: endian.h,v 1.3 1996/11/25 13:11:26 niklas Exp $ */
-/* $NetBSD: endian.h,v 1.7 1996/03/29 01:40:31 briggs Exp $ */
+/* $OpenBSD: endian.h,v 1.4 1997/01/13 11:51:10 niklas Exp $ */
+/* $NetBSD: endian.h,v 1.10 1996/10/13 02:59:55 christos Exp $ */
/*
* Copyright (c) 1987, 1991 Regents of the University of California.
diff --git a/sys/arch/m68k/include/reg.h b/sys/arch/m68k/include/reg.h
index 63b950c4e57..0cb61fd0a50 100644
--- a/sys/arch/m68k/include/reg.h
+++ b/sys/arch/m68k/include/reg.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: reg.h,v 1.2 1996/05/29 18:38:36 niklas Exp $ */
-/* $NetBSD: reg.h,v 1.11 1995/03/26 17:08:38 briggs Exp $ */
+/* $OpenBSD: reg.h,v 1.3 1997/01/13 11:51:10 niklas Exp $ */
+/* $NetBSD: reg.h,v 1.12 1996/12/17 19:24:31 gwr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -98,6 +98,11 @@ struct fpreg {
*/
#define R0 D1
#define R1 A0
+
+struct proc;
+int process_read_regs __P((struct proc *, struct reg *));
+int process_read_fpregs __P((struct proc *, struct fpreg *));
+
#endif
#endif /* !_M68K_REG_H_ */
diff --git a/sys/arch/m68k/include/sysctl.h b/sys/arch/m68k/include/sysctl.h
index 5cb04d5e093..8e527f19992 100644
--- a/sys/arch/m68k/include/sysctl.h
+++ b/sys/arch/m68k/include/sysctl.h
@@ -8,11 +8,15 @@
#ifndef CTL_MACHDEP_NAMES
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
-#define CPU_MAXID 2 /* number of valid machdep ids */
+#define CPU_ROOT_DEVICE 2 /* string: root device name */
+#define CPU_BOOTED_KERNEL 3 /* string: booted kernel name */
+#define CPU_MAXID 4 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
{ "console_device", CTLTYPE_STRUCT }, \
+ { "root_device", CTLTYPE_STRING }, \
+ { "booted_kernel", CTLTYPE_STRING }, \
}
#endif /* CTL_MACHDEP_NAMES */
diff --git a/sys/arch/m68k/m68k/copy.s b/sys/arch/m68k/m68k/copy.s
index 10dac78867a..da3f6b2feca 100644
--- a/sys/arch/m68k/m68k/copy.s
+++ b/sys/arch/m68k/m68k/copy.s
@@ -1,5 +1,5 @@
-/* $OpenBSD: copy.s,v 1.3 1996/02/27 11:06:51 niklas Exp $ */
-/* $NetBSD: copy.s,v 1.22 1995/12/11 02:37:55 thorpej Exp $ */
+/* $OpenBSD: copy.s,v 1.4 1997/01/13 11:51:11 niklas Exp $ */
+/* $NetBSD: copy.s,v 1.24 1996/07/20 01:53:42 jtc Exp $ */
/*-
* Copyright (c) 1994, 1995 Charles Hannum.
@@ -462,6 +462,7 @@ Lsdone:
*
* Works for counts up to 128K.
*/
+ALTENTRY(memmove, _memcpy)
ENTRY(memcpy)
movl sp@(12),d0 | get count
jeq Lbccpyexit | if zero, return
diff --git a/sys/arch/m68k/m68k/db_disasm.c b/sys/arch/m68k/m68k/db_disasm.c
index b56d81be049..a48b1d18c55 100644
--- a/sys/arch/m68k/m68k/db_disasm.c
+++ b/sys/arch/m68k/m68k/db_disasm.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: db_disasm.c,v 1.4 1996/08/04 01:22:46 niklas Exp $ */
-/* $NetBSD: db_disasm.c,v 1.14 1996/04/29 20:50:26 leo Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.5 1997/01/13 11:51:12 niklas Exp $ */
+/* $NetBSD: db_disasm.c,v 1.19 1996/10/30 08:22:39 is Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -1384,6 +1384,7 @@ opcode_fpu(dbuf, opc)
}
if (ISBITSET(ext,15) || ISBITSET(ext,13)) {
opcode_fmove_ext(dbuf, opc, ext);
+ return;
}
switch(opmode) {
@@ -1638,12 +1639,12 @@ opcode_fmove_ext(dbuf, opc, ext)
addchar('l');
addchar('\t');
- if (!ISBITSET(ext,13)) {
+ if (ISBITSET(ext,13)) {
print_freglist(dbuf, AR_DEC, BITFIELD(ext,12,10), 1);
addchar(',');
}
get_modregstr(dbuf, 5, GETMOD_BEFORE, SIZE_LONG, 1);
- if (ISBITSET(ext,13)) {
+ if (!ISBITSET(ext,13)) {
addchar(',');
print_freglist(dbuf, AR_DEC, BITFIELD(ext,12,10), 1);
}
@@ -1737,6 +1738,7 @@ opcode_mmu(dbuf, opc)
-1);
dbuf->used += 2;
}
+ return;
case 1:
ext = *(dbuf->val + 1);
dbuf->used++;
@@ -2106,19 +2108,22 @@ print_freglist(dbuf, mod, rl, cntl)
regs = cntl ? fpcregs : fpregs;
upper = cntl ? 3 : 8;
- if (mod == AR_DEC) {
+ if (!cntl && mod != AR_DEC) {
list = rl;
rl = 0;
/* I am sure there is some trick... */
for (bit = 0; bit < upper; bit++)
if (list & (1 << bit))
- rl |= (0x8000 >> bit);
+ rl |= (0x80 >> bit);
}
for (bit = 0, list = 0; bit < upper; bit++) {
if (ISBITSET(rl,bit)) {
if (list == 0) {
- list = 1;
addstr(dbuf, regs[bit]);
+ if (cntl)
+ addchar('/');
+ else
+ list = 1;
} else if (list == 1) {
list++;
addchar('-');
@@ -2132,6 +2137,9 @@ print_freglist(dbuf, mod, rl, cntl)
}
}
}
+ if (list > 1)
+ addstr(dbuf, regs[upper-1]);
+
if (dbuf->casm[-1] == '/' || dbuf->casm[-1] == '-')
dbuf->casm--;
*dbuf->casm = 0;
@@ -2190,7 +2198,7 @@ opcode_movec(dbuf, opc)
addchar(',');
}
switch (BITFIELD(ext,11,0)) {
- /* 010/020/030/040/CPU32 */
+ /* 010/020/030/040/CPU32/060 */
case 0x000:
tmp = "sfc";
break;
@@ -2207,17 +2215,18 @@ opcode_movec(dbuf, opc)
case 0x802:
tmp = "caar";
break;
- /* 020/030/040 */
+ /* 020/030/040/060 */
case 0x002:
tmp = "cacr";
break;
+ /* 020/030/040 */
case 0x803:
tmp = "msp";
break;
case 0x804:
tmp = "isp";
break;
- /* 040 */
+ /* 040/060 */
case 0x003:
tmp = "tc";
break;
@@ -2233,15 +2242,24 @@ opcode_movec(dbuf, opc)
case 0x007:
tmp = "dtt1";
break;
+ /* 040 */
case 0x805:
tmp = "mmusr";
break;
+ /* 040/060 */
case 0x806:
tmp = "urp";
break;
case 0x807:
tmp = "srp";
break;
+ /* 060 */
+ case 0x008:
+ tmp = "buscr";
+ break;
+ case 0x808:
+ tmp = "pcr";
+ break;
default:
tmp = "INVALID";
break;
diff --git a/sys/arch/m68k/m68k/db_interface.c b/sys/arch/m68k/m68k/db_interface.c
index 4996320887c..d67de6831b5 100644
--- a/sys/arch/m68k/m68k/db_interface.c
+++ b/sys/arch/m68k/m68k/db_interface.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: db_interface.c,v 1.5 1996/05/09 22:30:10 niklas Exp $ */
-/* $NetBSD: db_interface.c,v 1.20 1996/04/29 20:50:28 leo Exp $ */
+/* $OpenBSD: db_interface.c,v 1.6 1997/01/13 11:51:13 niklas Exp $ */
+/* $NetBSD: db_interface.c,v 1.22 1996/10/13 03:19:20 christos Exp $ */
/*
* Mach Operating System
diff --git a/sys/arch/m68k/m68k/db_trace.c b/sys/arch/m68k/m68k/db_trace.c
index 317d6b008b0..e9bf6b3b922 100644
--- a/sys/arch/m68k/m68k/db_trace.c
+++ b/sys/arch/m68k/m68k/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.5 1996/09/21 04:26:38 briggs Exp $ */
+/* $OpenBSD: db_trace.c,v 1.6 1997/01/13 11:51:13 niklas Exp $ */
/* $NetBSD: db_trace.c,v 1.16 1996/04/29 20:50:29 leo Exp $ */
/*
@@ -174,7 +174,9 @@ stacktop(regs, sp)
#define JSRPC 0x4eba0000 /* jsr PC@( ) */
#define LONGBIT 0x00010000
#define BSR 0x61000000 /* bsr x */
+#ifdef mc68020
#define BSRL 0x61ff0000 /* bsrl x */
+#endif mc68020
#define BYTE3 0x0000ff00
#define LOBYTE 0x000000ff
#define ADQMSK 0xf1ff0000
@@ -305,10 +307,12 @@ findentry(sp)
/* longword offset here */
sp->k_caller = addr - 6;
sp->k_entry = nextword;
+#ifdef mc68020
} else if ((instruc & HIWORD) == BSRL) {
/* longword self-relative offset */
sp->k_caller = addr - 6;
sp->k_entry = nextword + (addr - 4);
+#endif mc68020
} else {
instruc = nextword;
if ((instruc & HIWORD) == JSR) {
diff --git a/sys/arch/m68k/m68k/sunos_machdep.c b/sys/arch/m68k/m68k/sunos_machdep.c
index 8a38c70127d..5f52538807b 100644
--- a/sys/arch/m68k/m68k/sunos_machdep.c
+++ b/sys/arch/m68k/m68k/sunos_machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: sunos_machdep.c,v 1.7 1996/08/04 01:15:16 niklas Exp $ */
-/* $NetBSD: sunos_machdep.c,v 1.10 1996/05/05 16:11:31 veego Exp $ */
+/* $OpenBSD: sunos_machdep.c,v 1.8 1997/01/13 11:51:14 niklas Exp $ */
+/* $NetBSD: sunos_machdep.c,v 1.12 1996/10/13 03:19:22 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.