This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gas: Emit A2 encoding for ARM PUSH/POP with single register
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Meador Inge <meadori at codesourcery dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 02 Apr 2012 17:54:11 +0100
- Subject: Re: [PATCH] gas: Emit A2 encoding for ARM PUSH/POP with single register
- References: <1333054934-31867-1-git-send-email-meadori@codesourcery.com> <4F79BA21.90404@arm.com> <4F79D2D0.5080005@codesourcery.com>
On 02/04/12 17:24, Meador Inge wrote:
> On 04/02/2012 09:39 AM, Richard Earnshaw wrote:
>
>> In ARM state, stmfd sp!, {<single-reg>} is not 'push' and should
>> continue to assemble to an stmfd instruction (otherwise there's no way
>> to generate that bit pattern). Similarly for ldmfd. Only push and pop
>> should be folded in this way.
>
> Hmmm, I see now. In the ARMARM it says that STMFD should only be treated as
> PUSH if the number of registers is greater than or equal to two (8.8.201). Is
> that how you arrived at the above? I got tripped up by the "Equivalent STM
> syntax" statement in 8.8.133.
>
Read 8.8.58 and 8.8.201. The rules on re-encoding single register
ldm/stm operations are clearly restricted to Thumb.
R.