diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-11 17:40:29 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-11 17:40:29 +0000 |
commit | 8645d3e7de18e07ecec03a645dbe7650d34e63f4 (patch) | |
tree | f7d7a64b4ca810edf1a746863dde1086ecd8cbd9 /gcc/function.c | |
parent | 738ab6f51ce3bb0ec1b2ee03249a0738db98b0cf (diff) | |
download | gcc-8645d3e7de18e07ecec03a645dbe7650d34e63f4.tar.gz |
PR rtl-optimization/40667
* defaults.h (MINIMUM_ALIGNMENT): Define if not defined.
* doc/tm.texi (MINIMUM_ALIGNMENT): Document it.
* config/i386/i386.h (MINIMUM_ALIGNMENT): Define.
* config/i386/i386.c (ix86_minimum_alignment): New function.
* config/i386/i386-protos.h (ix86_minimum_alignment): New prototype.
* cfgexpand.c (expand_one_var): Use MINIMIM_ALIGNMENT.
* emit-rtl.c (gen_reg_rtx): Likewise.
* function.c (assign_parms): Likewise. If nominal_type needs
bigger alignment than FUNCTION_ARG_BOUNDARY, use its alignment
rather than passed_type's alignment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c index 258f5941950..e31c12ada35 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3146,8 +3146,12 @@ assign_parms (tree fndecl) { unsigned int align = FUNCTION_ARG_BOUNDARY (data.promoted_mode, data.passed_type); + align = MINIMUM_ALIGNMENT (data.passed_type, data.promoted_mode, + align); if (TYPE_ALIGN (data.nominal_type) > align) - align = TYPE_ALIGN (data.passed_type); + align = MINIMUM_ALIGNMENT (data.nominal_type, + TYPE_MODE (data.nominal_type), + TYPE_ALIGN (data.nominal_type)); if (crtl->stack_alignment_estimated < align) { gcc_assert (!crtl->stack_realign_processed); |