_buserr point to the 68020/030 buserr code _only_. This has broken access
error handling in the 060 support code.
This is repaired by jumping to _buserr60 from the 060SP, and by providing
a _buserr60 label identical to the _buserr in the unchanged m68k ports
using the 68060.
kernels, at the same time getting rid of up to 3 conditional branches and a
bit over one cacheline fetch (for the 68060; the saving is a bit smaller for
040 and yet smaller for the 020/30).
While we're here, also get rid of an redundant lea (using SP-relative
addressing) and of two redundant pushes.
While we're here, also fix a panic which would tear us down on 68060 machines
if a branch prediction error ever occured.
<horimoto@cs-aoi.cs.sist.ac.jp> in PR #3641. I changed the code slightly.
Instead of clearing 13 registers (d1-d7,a1-a6) and zeroing 512 bytes per
loop iteration, I clear 8 registers (d1-d7,a1) and zero 256 bytes. This
reduces the size and complexity of the function.
On the '020, the simpler code is less than 1% slower. Surprisingly, it
is ~3% faster on the '040.
- ENTRY_NOPROFILE() and ASENTRY_NOPROFILE(), similar to ENTRY() and
ASENTRY(), but without the profiling prologue.
- GLOBAL()/ASGLOBAL() and LOCAL()/ASLOCAL(), for defining global and
local variables with C and ASM labels.
- BSS()/ASBSS(), for defining items in the BSS segment, with C or
ASM labels.
- PANIC("panic message") - shorthand for calling panic() from assembly code.
- VECTOR(), ASVECTOR(), VECTOR_UNUSED - shorthand for defining entries
in the vector table.
Also, change RCSID() to pad out the string to even boundary.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
area. These functions are designed to improve performance of large
copyin/copyout operations by mapping the user page in to the kernel
address space and using bcopy(), rather then copying across protection
boundaries.
XXX This doesn't work yet -- the way it's called doesn't obey C calling
XXX conventions. That will be fixed soon.
- copypage() -- a single page-aligned NBPG-byte copy.
- zeropage() -- a single page-aligned NBPG-byte zero.
These functions don't play around with alignment, etc. Their use
causes a measureable performance improvement in pmap_copy_page()
and pmap_copy_page().
A few m68k ports already had copypage() in their locore.s. It has
been moved here so it can be shared.
naming for fmovem, while breaking it for fmove. We probably never will
see normal fmove in the kernel, nevertheless it should be corrected while
somebody remembers.
Besides, the correct patch is smaller and thus easier to verify than the
origininal one.
- add a missing return; at the end of a case, leading to wrong disassembly
of the next few instructions after fmovem.
- while we're here, correct the same bug in PBcc.
XXX there are a few other dubious fallthroughs in this file (which are
not explicitly marked with /* FALLTHROUGH */), which I didn't yet analyze.
* Fix other FMOVEM interpretation bugs:
- correct printing of FP data register lists if all are used (only FP0
would be mentioned)
- correct printing of FP data register lists in the case the list is reversed
(would have printed nothing)
- correct mapping of fp0-fp7 to register list bits (was reversed)
- correct printing of FP control register lists (this list is never reversed)
- correct printing of FMOVEM with FP control registers (the data direction
was interpreted the wrong way)
* While we're here, enhance the comments in MOVC's list of cpu control
registers
exceptions, which puts the address of the instruction we faulted
on in a different location. Copy it and handle as we normally would,
restoring the saved PC before returning.
The FPE should probably be reworked to take advantage of the 68LC040's
precalculated effective address, at some point.
to call mcount(). This is needed because the ``link a6,#0'' insn used
trips up gcc's ANSI preprocessor (A # in a function-type macro must be
followed by a macro argument). _PROF_PROLOG is also used in the i386
asm.h.
Solaris' asm_linkage.h has a MCOUNT macro similar to _PROF_PROLOG
except it expands to different code sequences based on whether a
function is being compiled with "prof" or "gprof" instrumentation.
I also discovered that the m68k ALTENTRY is very different than the
implementation used by other NetBSD ports. Usually ALTENTRY simply
provides an alternate function entry point. The m68k version 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.
Providing ENTRY2 and changing all the code that uses ALTENTRY to use
it would be a desirable change.