Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-04 Thread Tomasz Figa
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 strong

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Nicolas Pitre
On Tue, 1 Jul 2014, Will Deacon wrote: > Hi Mans, > > On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: > > Russell King - ARM Linux writes: > > > As you point out, "bx lr" /may/ be treated specially (I've actually been > > > > Most, if not all, Cortex-A cores do this according the

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Robert Jarzmik
Russell King writes: > 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 th

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Will Deacon writes: > Hi Mans, > > On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: >> Russell King - ARM Linux writes: >> > As you point out, "bx lr" /may/ be treated specially (I've actually been >> >> Most, if not all, Cortex-A cores do this according the public TRMs. >> They a

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Stephen Warren
On 07/01/2014 10:19 AM, 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 recomme

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Will Deacon
Hi Mans, On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: > Russell King - ARM Linux writes: > > As you point out, "bx lr" /may/ be treated specially (I've actually been > > Most, if not all, Cortex-A cores do this according the public TRMs. > They also do the same thing for "mov p

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Russell King - ARM Linux writes: > On Tue, Jul 01, 2014 at 05:42:42PM +0100, Måns Rullgård wrote: >> Russell King writes: >> >> > 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" instruc

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Russell King - ARM Linux
On Tue, Jul 01, 2014 at 05:42:42PM +0100, Måns Rullgård wrote: > Russell King writes: > > > 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"

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Russell King writes: > 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 th