Re: [PATCH] aes-i586-asm.S optimization

From: James Morris
Date: Wed Aug 11 2004 - 19:24:33 EST


On Thu, 12 Aug 2004, Denis Vlasenko wrote:

> formatting.patch:
> renames macro parameters to more understandable ones
> fixes wrong comment (code does not use MMX)

This looks good, thanks.

>
> opt.patch:
> convert fwd_rnd into pair of fwd_rnd1,fwd_rnd2 which use
> r0,r2 in mirror-image fashion, thus eliminating the need
> to do "mov r0,r2". After testing, same can be done
> to inv_rnd.

This bumped performance on a P4 Xeon by about 5%, which is pretty good.
How much more would you expect again with inv_rnd?

> Both patches are only compile tested. First one produces bit-identical
> object file. Second one, understandably, not.
>
> PS: why aes-i586-asm.S? it is valid _386_ code (no Pentium ops used AFAICS).

My understanding is that the code is generally optimized for Pentium,
although that could be wrong. I'll check with the original author.

> PPS: your code is very easy to understand. It was a joy hacking on it :)

It's Brian Gladman's code (converted to gas format by Linus).


- James
--
James Morris
<jmorris@xxxxxxxxxx>


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