This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Make ARM GAS accept valid STR instruction
On Mon, Aug 23, 2010 at 11:38:59PM +0800, Jie Zhang wrote:
> On 08/21/2010 05:03 AM, Daniel Jacobowitz wrote:
> >On Wed, Aug 18, 2010 at 04:28:07PM +0800, Jie Zhang wrote:
> >>`str r0,[pc,#4]' is a valid instruction although the use of PC is
> >>deprecated. But currently GAS rejects this instruction. This patch
> >>should fix it. Tested using GAS testsuite for arm-none-eabi target.
> >>Is it OK?
> >
> >Where (on what architectures) is the use of PC deprecated? It's
> >documented as fine in the ARM v5 reference; I do not think we should
> >warn unconditionally, but then, some other code in gas does. At least
> >check warn_on_deprecated.
> >
> >swp{b} warns only of armv6 or later, that might be the right model here.
> >
> Thanks! That's a good idea. I checked the manuals. It's deprecated
> since ARMv7-A. So I changed my patch accordingly. The new patch is
> attached. In the new patch, I just removed the valid instruction from
> the test and inserted a blank line to keep the line numbers of the
> following lines unchanged to avoid massive line number changes in
> test dump file. Compared to the last version of the patch, I added
> the valid str instruction to the new test added by the this patch.
>
> Tested GAS for arm-none-eabi, no regressions found.
>
> Is it OK now?
Yes. Please tweak the architecture test though: it's deprecated for
all ARM v7. It doesn't matter for M-profile because the ARM
instruction set is missing there, but v7-R is the same as v7-A here.
--
Daniel Jacobowitz
CodeSourcery