This is the mail archive of the
mailing list for the binutils project.
Re: ARM GNU Assembler and conditional suffix/infix
- From: Phil Blundell <pb at reciva dot com>
- To: "Kirill A. Shutemov" <kirill at shutemov dot name>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 06 Nov 2009 17:17:15 +0000
- Subject: Re: ARM GNU Assembler and conditional suffix/infix
- References: <email@example.com>
On Fri, 2009-11-06 at 17:08 +0200, Kirill A. Shutemov wrote:
> According to ARM Assembler Reference Manual conditional flags
> should be placed after name of instruction, but GNU Assembler
> doesn't accept instructions like 'ldrbge'. It wants 'ldrgeb'.
> What's the point? 'b' is a part of instruction name, not a suffix.
This is a fairly recent policy change. "ldrgeb" was originally the
canonical form but nowadays, as you say, ARM's position seems to be to
prefer condition codes as suffixes not infixes.
GAS has never been 100% compatible with armasm's input syntax, and in
one sense this is just another such difference in assembly dialects, but
I guess patches to make GAS understand the new arrangement of suffixed
condition-codes would be welcome. There'd need to be some mechanism for
retaining the old infix behaviour, of course, for compatibility with
existing source files and the output from GCC.
> Moreover 'objdump -d' generates 'ldrbge', which cannot be
> processed by GNU Assembler.
Again, I don't think this is a massive deal since the output from
"objdump -d" has never been suitable for feeding straight back into GAS.
But I agree it would be nice for them to be consistent.