Re: AES assembler optimizations

From: David S. Miller
Date: Tue Aug 10 2004 - 20:27:12 EST


On Wed, 11 Aug 2004 11:02:48 +1000
Paul Mackerras <paulus@xxxxxxxxx> wrote:

> David S. Miller writes:
>
> > 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.
>
> How is that implemented? Do you have some magic to make gcc emit a
> call to an fpu-save routine in the prolog if the function uses the
> FPU? Or are you only talking about functions written in assembler?

All FPU usage is explicit, and VISEntry (if using the full FPU register
set) or VISEntryHalf (if using only the lower 32 registers) calls
are made to enter an FPU usage area, and VISExit/VISExitHalf is invoked
afterwards.

We could do it with traps, but there is no reason when we know
exactly where these places are and the save code is only a
handful of instructions.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/