Subject: Re: CVS commit: syssrc/sys/lib/libkern
To: Chris Gilbert <chris@dokein.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 10/04/2002 15:41:52
On Fri, 4 Oct 2002, Chris Gilbert wrote:
> On Fri, 4 Oct 2002 12:28:03 -0700 (PDT)
> Bill Studenmund <wrstuden@netbsd.org> wrote:
>
> > I'd say don't conditionalize it. Just add it to libkern. It's not like it
> > will go into kernels that don't use it, and there's not obvious reason for
> > it to be arch-dependent (it's not like it uses x86-only asm instructions).
>
> If it is for just i386, then why not just add it to the
> arch/i386/Makefile like most libkern files are?
Because it's not just for i386 the same way the files in
/sys/lib/libkern/arch/i386/Makefile.inc are. Those files map in components
that either are optimized for i386 (byte_swap_4.S for instance) or
components where other architectures have optimized code (random.c vs
random.S).
This file is not the same. It's not one where we have architecture-tuned
versions. For one, it's not under libkern/arch, it's at the top level.
Second, the only reason (AFAICT) that it was made conditional was that it
was only NEEDED under that condition.
Bang Jun-Young was (I believe) trying to minimize the impact of his
change, a good principle in general. However for this case, it strikes me
as being much cleaner to just include the file rather than to include it
only for I686.
Take care,
Bill