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

From: Linus Torvalds
Date: Fri Aug 06 2004 - 12:02:50 EST




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/