aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2004-07-14 19:52:46 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2004-07-14 19:52:46 +0000
commit85d91d5b1d0d8e0664f89495c0d1d47366201cc0 (patch)
tree655129cf6ec1304cf727b4f2b277baa943dcabe0 /gcc
parent9daaba6289ae9790eaa3a6796b22bc62b001f041 (diff)
downloadgcc-85d91d5b1d0d8e0664f89495c0d1d47366201cc0.zip
gcc-85d91d5b1d0d8e0664f89495c0d1d47366201cc0.tar.gz
gcc-85d91d5b1d0d8e0664f89495c0d1d47366201cc0.tar.bz2
xtensa.c (function_arg_advance): Check for args that must be passed in the stack.
* 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. From-SVN: r84708
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/xtensa/xtensa.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6203360..f42c443 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-14 Bob Wilson <bob.wilson@acm.org>
+
+ * 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 <per@bothner.com>
* 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 09f8352..940ba0e 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));