This is the mail archive of the
mailing list for the GCC project.
[PING] [PATCH] Sanitizing the middle-end interface to the back-end for strict alignment
On 8/23/19 12:57 AM, Jeff Law wrote:
> On 8/15/19 1:47 PM, Bernd Edlinger wrote:
>> this is the split out part from the "Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)"
>> which is sanitizing the middle-end interface to the back-end for strict alignment,
>> and a couple of bug-fixes that are necessary to survive boot-strap.
>> It is intended to be applied after the PR 89544 fix.
>> I think it would be possible to change the default implementation of STACK_SLOT_ALIGNMENT
>> to make all stack variables always naturally aligned instead of doing that only
>> in assign_parm_setup_stack, but would still like to avoid changing too many things
>> that do not seem to have a problem. Since this would affect many targets, and more
>> kinds of variables that may probably not have a strict alignment problem.
>> But I am ready to take your advice though.
>> Boot-strapped and reg-tested on x86_64-pc-linux-gnu and arm-linux-gnueabihf
>> Is it OK for trunk?
>> 2019-08-15 Bernd Edlinger <email@example.com>
>> Richard Biener <firstname.lastname@example.org>
>> * expr.c (expand_assignment): Handle misaligned DECLs.
>> (expand_expr_real_1): Handle FUNCTION_DECL as unaligned.
>> * function.c (assign_parm_adjust_stack_rtl): Check movmisalign optab
>> (assign_parm_setup_stack): Allocate properly aligned stack slots.
>> * varasm.c (build_constant_desc): Align constants of misaligned types.
>> * config/arm/arm.md (movdi, movsi, movhi, movhf, movsf, movdf): Check
>> strict alignment restrictions on memory addresses.
>> * config/arm/neon.md (movti, mov<VSTRUCT>, mov<VH>): Likewise.
>> * config/arm/vec-common.md (mov<VALL>): Likewise.
> I'll ack the generic bits. I have no clue if the ARM maintainers want
> the asserts or not.
Okay, thanks Jeff, and Richi.
So I would like to ping on the ARM platform bits.
Just a couple of gcc_checking_asserts.
The wrong code will be fixed by the middle-end changes alone,
but the assertions would help prevent further wrong-code issues
Is it OK for trunk?