[PATCH] gas: Emit A2 encoding for ARM PUSH/POP with single register
Richard Earnshaw
rearnsha@arm.com
Mon Apr 2 16:54:00 GMT 2012
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.
More information about the Binutils
mailing list