On 8/15/19 1:47 PM, Bernd Edlinger wrote:
> Hi,
> 
> 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?
> 
> 
> Thanks
> Bernd.
> 
> 
> patch-strict-align.diff
> 
> 2019-08-15  Bernd Edlinger  <bernd.edlin...@hotmail.de>
>           Richard Biener  <rguent...@suse.de>
> 
>       * 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
>       too.
>       (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.

jeff

Reply via email to