Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: syssrc/sys/lib/libkern



On Fri, 4 Oct 2002, Chris Gilbert wrote:

> On Fri, 4 Oct 2002 12:28:03 -0700 (PDT)
> Bill Studenmund <wrstuden%netbsd.org@localhost> 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




Home | Main Index | Thread Index | Old Index