[PATCH] Make ARM GAS accept valid STR instruction
Jie Zhang
jie@codesourcery.com
Wed Aug 25 06:39:00 GMT 2010
On 08/25/2010 01:26 PM, Jie Zhang wrote:
> On 08/25/2010 10:58 AM, Daniel Jacobowitz wrote:
>> 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.
>>
> Thanks. The patch attached is what I have committed.
>
I forgot to update the comment. This patch does it. Committed.
--
Jie Zhang
CodeSourcery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-arm-allow-pc-in-str-addr-3-more.diff
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100825/80db191e/attachment.bin>
More information about the Binutils
mailing list