Subject: Re: bcopy, bzero, copypage, and zeropage
To: None <port-m68k@NetBSD.ORG, tech-kern@NetBSD.ORG>
From: Guenther Grau <email@example.com>
Date: 12/13/1996 04:12:02
> * create a corresponding zeropage function --- in my
> profiles, zeroing was done more than copying.
> * change all ports that currently call bcopy and bzero
> to call copypage and zeropage.
> * possibly move copypage and zeropage from each port's
> locore.s to m68k/m68k/copy.s.
I'd really go that way! I don't see any reason these can't be shared.
> * once the versions are consolidated, clean up and optimize
> the versions. For example, use dbf instead of subq/jne;
> don't use back-to-back move16 insns (on '040s); only provide
> a implementation for a specific cpu varient when configured
> as such.
Hmm, if you really want to microoptimize, I guess you'll have to write
a version for each cpu we support and use the usual tricks to test for
the cpu just once, preferably during boot and after that just use the
functions without having to test for the cpu over and over again.