[U-Boot] [PATCH V3 1/3] lib_generic memcpy: copy one word at a time if possible

Mike Frysinger
2009-10-09T10:21:08Z

On Friday 09 October 2009 05:12:20 Alessandro Rubini wrote:
> + /* while all data is aligned (common case), copy a word at a time */
> + if ( (((ulong)dest | (ulong)src | count) & (sizeof(*dl) - 1)) == 0) {

i think you want to drop the count from the list, otherwise we dont consume
the leading groups of 4 bytes if count isnt a multiple of 4.

otherwise, it's pretty crazy how generic yet optimized the resulting C should
be :). acked-by-me.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091009/cef8f0d0/attachment.pgp