On Apr 4, 2007, at 2:40 PM, Andrew Doran wrote:
> Some numbers from a pmax GENERIC kernel below. If we
were to stop
> passing
> "struct lwp *" about then it looks like there
are some savings to
> be had.
>
> => with s7 as a general purpose register
>
> -rwxr-xr-x 1 ad staff 3781432 Apr 4 14:28 netbsd
>
> objdump -d netbsd | grep s7 | wc -l
> 99
>
> => with s7 as curlwp
>
> -rwxr-xr-x 1 ad staff 3778945 Apr 4 14:19 netbsd
>
> objdump -d netbsd | grep s7 | wc -l
> 573
Cool. BTW, if we do this, it might be good to #ifdef
_KERNEL out the
s7 definition and call it curlwp_reg, or something like
that, to make
it harder to use it by mistake in asm code.
-- thorpej
|