Re: [PATCH] Re-implemented i586 asm AES (updated)

From: Kasper Sandberg
Date: Sat Aug 07 2004 - 02:51:14 EST


i dont know anything at all about this, but wouldnt it be possible to
optimize it even more, if there were a version for each cpu, like one
for athlon-xp and one for p4?

On Fri, 2004-08-06 at 09:43 -0700, Linus Torvalds wrote:
>
> On Fri, 6 Aug 2004, Andi Kleen wrote:
> >
> > You could use .altinstructions to patch a jump in at runtime
> > based on CPU capabilities. Assuming MMX is really faster of course.
>
> I seriously doubt that the MMX code could be faster.
>
> The only MMX code in the original was saving some integer contents to a
> scratch MMX register rather than saving to memory. There's _no_ way that
> is faster, especially since in the kernel it would require us much extra
> work to first check that the FP context is safed. Even _without_ the extra
> work I simply cannot imagine that a "movd reg,mmx" is faster than a plain
> "movl reg,stackslot".
>
> Linus
> -
> 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/
>

-
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/