Re: AES assembler optimizations

Bill Davidsen
2004-08-12T20:14:46Z

David S. Miller wrote:

> On sparc64, we:
>
> 1) Always save the full FPU state at context switch time if it
> is active.
>
> 2) On entry to a FPU-using kernel routine, we save the FPU if
> it is active.
>
> 3) On exit from a FPU-using kernel routine, we do nothing
> except mark the FPU as inactive.
>
> 4) FPU-disabled traps by the user restore the state saved
> by #1 or #2

Depending on the cost saving of not saving the registers if they haven't
changed, vs. the time to take the trap and set the FPU active again, it
might be a win overall, even if you never used FPU in the kernel. Wasn't
there a change between saving everything and saving FPU only when used
"back when?" I seem to remember something about that, and the cost of
the test vs. the cost of just doing the save.

--
-bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me