Dirk Behme <dirk.be...@gmail.com> writes:

> Use the specialized ARM instructions for swapping 16 and 32 bit values
> instead of using the generic ones from include/linux/byteorder/swab.h.
>
> The x86 version in arch/x86/include/asm/byteorder.h was taken as an
> example for this.
>
> E.g. for the mx6qsabrelite target this results in ~4k less code.

Which compiler are you using?  GCC 4.5 and later recognises the byteswap
pattern and emits these instructions automatically.  This gives better
code than the inline asm since it allows the compiler to do proper
instruction scheduling, and in the 16-bit case it avoids extraneous
masking.

-- 
Måns Rullgård
m...@mansr.com
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to