From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)
Date: Sat, 05 Jul 2014 03:06:39 +0200 [thread overview]
Message-ID: <53B74F9F.8030604@gmail.com> (raw)
In-Reply-To: <E1X20mL-00083I-Sv@rmk-PC.arm.linux.org.uk>
Hi Russell,
On 01.07.2014 18:19, Russell King wrote:
> ARMv6 and greater introduced a new instruction ("bx") which can be used
> to return from function calls. Recent CPUs perform better when the
> "bx lr" instruction is used rather than the "mov pc, lr" instruction,
> and this sequence is strongly recommended to be used by the ARM
> architecture manual (section A.4.1.1).
>
> We provide a new macro "ret" with all its variants for the condition
> code which will resolve to the appropriate instruction.
>
> Rather than doing this piecemeal, and miss some instances, change all
> the "mov pc" instances to use the new macro, with the exception of
> the "movs" instruction and the kprobes code. This allows us to detect
> the "mov pc, lr" case and fix it up - and also gives us the possibility
> of deploying this for other registers depending on the CPU selection.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Build- and boot-tested on mach-s3c64xx.
Tested-by: Tomasz Figa <tomasz.figa@gmail.com>
Best regards,
Tomasz
prev parent reply other threads:[~2014-07-05 1:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 16:19 [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1) Russell King
2014-07-01 16:42 ` Måns Rullgård
2014-07-01 17:13 ` Russell King - ARM Linux
2014-07-01 17:24 ` Måns Rullgård
2014-07-01 17:35 ` Will Deacon
2014-07-01 20:04 ` Måns Rullgård
2014-07-02 3:17 ` Nicolas Pitre
2014-07-01 19:26 ` Stephen Warren
2014-07-01 22:42 ` Robert Jarzmik
2014-07-05 1:06 ` Tomasz Figa [this message]
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=53B74F9F.8030604@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).