From: bwilson Date: Wed, 14 Jul 2004 19:52:46 +0000 (+0000) Subject: * config/xtensa/xtensa.c (function_arg_advance): Check for args X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=ea2981b994643c944326230591de4789af40828b;ds=sidebyside * config/xtensa/xtensa.c (function_arg_advance): Check for args that must be passed in the stack. (xtensa_gimplify_va_arg_expr): Skip special-case padding for small arguments if the size is not a constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84708 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62033604e75..f42c4436528 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-07-14 Bob Wilson + + * config/xtensa/xtensa.c (function_arg_advance): Check for args + that must be passed in the stack. + (xtensa_gimplify_va_arg_expr): Skip special-case padding for small + arguments if the size is not a constant. + 2004-07-14 Per Bothner * c-typeck.c (emit_side_effect_warnings): Use EXPR_HAS_LOCATION diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 09f835282fe..940ba0eca47 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -1783,7 +1783,9 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type) ? (int) GET_MODE_SIZE (mode) : int_size_in_bytes (type)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - if ((*arg_words + words > max) && (*arg_words < max)) + if (*arg_words < max + && (targetm.calls.must_pass_in_stack (mode, type) + || *arg_words + words > max)) *arg_words = max; *arg_words += words; @@ -2619,7 +2621,7 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, are aligned differently. */ - if (BYTES_BIG_ENDIAN) + if (BYTES_BIG_ENDIAN && TREE_CODE (type_size) == INTEGER_CST) { t = size_int (PARM_BOUNDARY / BITS_PER_UNIT); t = fold (build (GE_EXPR, boolean_type_node, type_size, t));