diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-09 23:52:13 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-09 23:52:13 +0000 |
commit | 8a0097e85fa0d44269c300d6e105e5a9a577a36b (patch) | |
tree | 8987faad155164050ad8ce5a6a5e6bc61805800a /gcc/function.c | |
parent | 6108f5ddd046bf958c06ed537952594219368999 (diff) | |
download | gcc-8a0097e85fa0d44269c300d6e105e5a9a577a36b.tar.gz |
PR middle-end/15228
* function.c (assign_parms): Always set_mem_align with the computed
FUNCTION_ARG_BOUNDARY. Don't clear stack_parm if !STRICT_ALIGNMENT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82867 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/function.c b/gcc/function.c index 69866f9812d..00c56e322af 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4621,10 +4621,8 @@ assign_parms (tree fndecl) offset_rtx)); set_mem_attributes (stack_parm, parm, 1); - if (entry_parm && MEM_ATTRS (stack_parm)->align < PARM_BOUNDARY) - set_mem_align (stack_parm, PARM_BOUNDARY); - - /* Set also REG_ATTRS if parameter was passed in a register. */ + set_mem_align (stack_parm, + FUNCTION_ARG_BOUNDARY (promoted_mode, passed_type)); if (entry_parm) set_reg_attrs_for_parm (entry_parm, stack_parm); } @@ -4692,13 +4690,9 @@ assign_parms (tree fndecl) /* If we can't trust the parm stack slot to be aligned enough for its ultimate type, don't use that slot after entry. We'll make another stack slot, if we need one. */ - { - unsigned int thisparm_boundary - = FUNCTION_ARG_BOUNDARY (promoted_mode, passed_type); - - if (GET_MODE_ALIGNMENT (nominal_mode) > thisparm_boundary) - stack_parm = 0; - } + if (STRICT_ALIGNMENT && stack_parm + && GET_MODE_ALIGNMENT (nominal_mode) > MEM_ALIGN (stack_parm)) + stack_parm = 0; /* If parm was passed in memory, and we need to convert it on entry, don't store it back in that same slot. */ |