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

Mike Frysinger vapier at gentoo.org
Fri Oct 9 12:21:08 CEST 2009


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 


More information about the U-Boot mailing list