This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AARCH64][PR target/84882] Add mno-strict-align
- From: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- To: Sudakshina Das <sudi dot das at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: James Greenhalgh <James dot Greenhalgh at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, nd <nd at arm dot com>
- Date: Thu, 17 May 2018 10:45:34 +0100
- Subject: Re: [PATCH][AARCH64][PR target/84882] Add mno-strict-align
- References: <8a3653bb-be32-d53f-7611-a16eac233483@arm.com>
Hi Sudi,
On 27/03/18 13:58, Sudakshina Das wrote:
Hi
This patch adds the no variant to -mstrict-align and the corresponding
function attribute. To enable the function attribute, I have modified
aarch64_can_inline_p () to allow checks even when the callee function
has no attribute. The need for this is shown by the new test
target_attr_18.c.
Testing: Bootstrapped, regtested and added new tests that are copies
of earlier tests checking -mstrict-align with opposite scan directives.
Is this ok for trunk?
This looks ok to me but you'll need approval from a maintainer.
Please put the PR marker in your ChangeLog so that the svn hook picks it up on commit.
Thanks,
Kyrill
Sudi
*** gcc/ChangeLog ***
2018-03-27 Sudakshina Das <sudi.das@arm.com>
* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
* config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
* config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
as true for strict-align.
(aarch64_can_inline_p): Perform checks even when callee has no
attributes to check for strict alignment.
* doc/extend.texi (AArch64 Function Attributes): Document
no-strict-align.
* doc/invoke.texi: (AArch64 Options): Likewise.
*** gcc/testsuite/ChangeLog ***
2018-03-27 Sudakshina Das <sudi.das@arm.com>
* gcc.target/aarch64/pr84882.c: New test.
* gcc.target/aarch64/target_attr_18.c: Likewise.