This is the mail archive of the
mailing list for the binutils project.
Re: [Patch, ARM] Relax the restrictions on REG_SP under Thumb mode on ARMv8-A
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: Binutils <binutils at sourceware dot org>, gingold at adacore dot com
- Date: Tue, 11 Jul 2017 10:14:13 +0100
- Subject: Re: [Patch, ARM] Relax the restrictions on REG_SP under Thumb mode on ARMv8-A
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On Fri, May 26, 2017 at 2:34 PM, Jiong Wang <email@example.com> wrote:
> For Thumb mode, since ARMv8-A, REG_SP is allowed in most of the places in
> Rd/Rt/Rt2 etc while it was disallowed before ARMv8-A, and was rejected
> the "reject_bad_reg" macro and several scattered checks.
> This patch only rejects REG_SP in "reject_bad_reg" and several related
> for legacy architectures before ARMv8-A. I have checked those affected
> , all of them qualify such relaxations.
> Testcases adjusted accordingly.
> * ld-sp-warn.d was written without .arch and without -march options
> By default it assumes all architectures, so I deleted the REG_SP
> on ldrsb as it's supported on ARMv8-A. There are actually quite a few
> seperate tests on other architectures, for example ld-sp-warn-v7.l
> so there the test for ldrsb on legacy architectures are still covered.
> * sp-pc-validations-bad-t has been extended to armv8-a.
> * strex-bad-t.d restricted on armv7-a.
> * Some new tests for REG_SP used as Rd/Rt etc added in
> OK for master?
Since this affects release branches and I've got an internal user
complaining about this - can we backport this to the binutils 2.28 and
binutils 2.29 branches ?
> 2017-05-25 Jiong Wang <firstname.lastname@example.org>
> * config/tc-arm.c (reject_bad_reg): Allow REG_SP on ARMv8-A.
> (parse_operands): Allow REG_SP for OP_oRRnpcsp and OP_RRnpcsp on
> (do_co_reg): Allow REG_SP for Rd on ARMv8-A.
> (do_t_add_sub): Likewise.
> (do_t_mov_cmp): Likewise.
> (do_t_tb): Likewise.
> * testsuite/gas/arm/ld-sp-warn.l: Delete the warning on REG_SP as Rt
> * testsuite/gas/arm/sp-pc-validations-bad-t-v8a.d: New test.
> * testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l: New test.
> * testsuite/gas/arm/sp-pc-validations-bad-t.d: Specifies
> * testsuite/gas/arm/sp-pc-validations-bad-t.s: Remove ".arch
> * testsuite/gas/arm/sp-usage-thumb2-relax-on-v7.d: New test.
> * testsuite/gas/arm/sp-usage-thumb2-relax-on-v7.l: New test.
> * testsuite/gas/arm/sp-usage-thumb2-relax-on-v8.d: New test.
> * testsuite/gas/arm/sp-usage-thumb2-relax.s: New test.
> * testsuite/gas/arm/strex-bad-t.d: Specifies -march=armv7-a.