Subject: Re: bzero
To: Martin J. Laubach <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 11/13/2001 14:40:59
On Sun, 4 Nov 2001, Martin J. Laubach wrote:
> | PowerPC cache line size is not always 32 bytes.
> I see. On macppc I can get the value by the machdep.cachelinesize
> sysctl. Is that available for the other ppc ports too?
> Is the cache line size constant for one given port? Ie. would
> it make sense to add a constant in a machdep header?
This is for code in libc, correct? Making cache line size a constant would
be bad as we want to be able to use the same libc on all powerpc ports.
We'd like to be able to use the same userland in general on all ports of
the same arch. :-)
One option would be to use something like the libm stuff on i386, which
uses a different libm if you have a real math chip. You could have two or
three tiny libs (one each for 16, 32, and 128 byte caches) that contain
the code optimized for each case, and have the correct one of them get
Of course I'm not sure what will happen for staticly linked programs.
Is it broken or just slow to use the wrong size?