This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gas: Emit A2 encoding for ARM PUSH/POP with single register


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]