From: Mike Frysinger Date: Fri, 9 Oct 2009 06:21:08 -0400 Subject: [U-Boot] =?iso-8859-1?q?=5BPATCH_V3_1/3=5D_lib=5Fgeneric_memcpy?= =?iso-8859-1?q?=3A_copy_one_word_at_a_time_if=09possible?= In-Reply-To: <20091009091220.GA3801@mail.gnudd.com> References: <20091009091220.GA3801@mail.gnudd.com> Message-ID: <200910090621.10386.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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