-# $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
-# $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
-/* $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
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.
*/
-/* $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
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
break;
case 0x30:
+ case 0x31:
case 0x32:
case 0x33:
case 0x34:
-/* $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
-/* $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
-/* $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
-/* $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
-# $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
rm -f $(LIB_O_FILES)
rm -f $(LIB_TARGET)
+clobber: clean
+
_SUBDIRUSE:
all:
-# $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
@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
-/* $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
#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
-/* $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
.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
--- /dev/null
+/* $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 */
-/* $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.
-/* $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.
*/
#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_ */
#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 */
-/* $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.
*
* Works for counts up to 128K.
*/
+ALTENTRY(memmove, _memcpy)
ENTRY(memcpy)
movl sp@(12),d0 | get count
jeq Lbccpyexit | if zero, return
-/* $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
}
if (ISBITSET(ext,15) || ISBITSET(ext,13)) {
opcode_fmove_ext(dbuf, opc, ext);
+ return;
}
switch(opmode) {
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);
}
-1);
dbuf->used += 2;
}
+ return;
case 1:
ext = *(dbuf->val + 1);
dbuf->used++;
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('-');
}
}
}
+ if (list > 1)
+ addstr(dbuf, regs[upper-1]);
+
if (dbuf->casm[-1] == '/' || dbuf->casm[-1] == '-')
dbuf->casm--;
*dbuf->casm = 0;
addchar(',');
}
switch (BITFIELD(ext,11,0)) {
- /* 010/020/030/040/CPU32 */
+ /* 010/020/030/040/CPU32/060 */
case 0x000:
tmp = "sfc";
break;
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;
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;
-/* $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
-/* $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 $ */
/*
#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
/* 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) {
-/* $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.