From: Dirk Behme <dirk.behme@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] ARM: byteorder: add optimized swab16 and swab32
Date: Fri, 10 May 2013 19:42:41 +0200 [thread overview]
Message-ID: <518D3191.7060205@gmail.com> (raw)
In-Reply-To: <yw1xr4hevkmw.fsf@unicorn.mansr.com>
Am 10.05.2013 18:56, schrieb M?ns Rullg?rd:
> Dirk Behme <dirk.behme@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?
An older gcc 4.4.4 version.
> 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.
Thanks,
Dirk
next prev parent reply other threads:[~2013-05-10 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 16:23 [U-Boot] [RFC PATCH] ARM: byteorder: add optimized swab16 and swab32 Dirk Behme
2013-05-10 16:56 ` Måns Rullgård
2013-05-10 17:42 ` Dirk Behme [this message]
2013-05-11 0:05 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518D3191.7060205@gmail.com \
--to=dirk.behme@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox