On Thu, Oct 25, 2007 at 12:46:35PM +0100, Denys Vlasenko wrote:
> On Thursday 25 October 2007 12:43, Denys Vlasenko wrote:
> > Hi Hervert,
> >
> > Please review and maybe propagate upstream following patches.
> >
> > camellia3.diff
> > Optimize GETU32 to use 4-byte memcpy (modern gcc will convert
> > such memcpy to single move instruction on i386).
> > Original GETU32 did four byte fetches, and shifted/XORed those.
>
> Signed-off-by: Denys Vlasenko <[EMAIL PROTECTED]>
Patch applied.
> +# define GETU32(v, pt) \
> + do { \
> + /* latest breed of gcc is clever enough to use move */ \
> + memcpy(&(v), (pt), 4); \
> + (v) = be32_to_cpu(v); \
> + } while(0)
You can get rid of this memcpy too since camellia declares an
alignmask of 3 which means that the key is 32-bit aligned.
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html