From 325437b2a329715da7be4de792af052c19a0ac7b Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 22 May 2019 00:30:42 +0000 Subject: [PATCH] In ... In : ...a change introduced in r94104 where BITS_PER_WORD was chosenperhaps because we expect register-sized writes into this area. See for the r94104 change. * function.c (assign_parm_setup_block): Raise alignment of stacked parameter only for STRICT_ALIGNMENT targets. From-SVN: r271497 --- gcc/ChangeLog | 5 +++++ gcc/function.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 592cecd529e..9c4c21589ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-05-22 Hans-Peter Nilsson + + * function.c (assign_parm_setup_block): Raise alignment of + stacked parameter only for STRICT_ALIGNMENT targets. + 2019-05-21 Segher Boessenkool * config/rs6000/constraints.md (define_register_constraint "wz"): diff --git a/gcc/function.c b/gcc/function.c index c6e862b3369..e30ee259bec 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2912,7 +2912,11 @@ assign_parm_setup_block (struct assign_parm_data_all *all, size_stored = CEIL_ROUND (size, UNITS_PER_WORD); if (stack_parm == 0) { - SET_DECL_ALIGN (parm, MAX (DECL_ALIGN (parm), BITS_PER_WORD)); + HOST_WIDE_INT parm_align + = (STRICT_ALIGNMENT + ? MAX (DECL_ALIGN (parm), BITS_PER_WORD) : DECL_ALIGN (parm)); + + SET_DECL_ALIGN (parm, parm_align); if (DECL_ALIGN (parm) > MAX_SUPPORTED_STACK_ALIGNMENT) { rtx allocsize = gen_int_mode (size_stored, Pmode); -- 2.30.2