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: Meador Inge <meadori at codesourcery dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 2 Apr 2012 11:24:48 -0500
- 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>
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.
> Secondly, your use of r0 in the tests is insufficient. r0 is all-bits
> zero in the register specifier, so you fail to test that the register
> bits are inserted correctly into bit pattern. I suggest you _add_ tests
> using r9 in the register list.
Good point. I will add more tests.
Thanks for the review. v3 patch coming soon.
--
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software