On Friday 09 October 2009 06:11:16 Mark Jackson wrote:
> Chris Moore wrote:
> > I agree wholeheartedly with the idea but shouldn't it be more like this
> > (untested) code :
> >
> > void * memcpy(void *dest, const void *src, size_t count)
> >
> > {
> >     char *d8, *s8;
> >     unsigned long *dl = dest, *sl = src;
> 
> In here, would it be overkill to add byte copying until data is aligned,
>  and then fall into the aligned copy code.

both addresses have to be unaligned the same ...

if ((ulong)dl & (sizeof(*dl) - 1) == (ulong)sl & (sizeof(*sl) - 1))

> In that case, you'd still gain a speed increase if you're starting at an
>  unaligned address ?

now it's a question of how often does this come up and is it worth the code 
size increase ?
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to