summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/config/m88k/m88k.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-05-19 21:38:03 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-05-19 21:38:03 +0000
commitd0c55a70775d9efea2277f35dcf420425109680f (patch)
tree5ba94f00142bbe04d74e4225c65f9d62d4253ca0 /gnu/egcs/gcc/config/m88k/m88k.c
parentad47f1141466671f416ba42c6c4c341965413321 (diff)
When passing a variable of 32 bytes or larger, as argument to a function,
pass all the subsequent arguments on the stack. This is necessary for proper varargs operation, if used.
Diffstat (limited to 'gnu/egcs/gcc/config/m88k/m88k.c')
-rw-r--r--gnu/egcs/gcc/config/m88k/m88k.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/config/m88k/m88k.c b/gnu/egcs/gcc/config/m88k/m88k.c
index 1ff84aa30a2..b57d56b68b0 100644
--- a/gnu/egcs/gcc/config/m88k/m88k.c
+++ b/gnu/egcs/gcc/config/m88k/m88k.c
@@ -2595,6 +2595,14 @@ m88k_function_arg_advance (args_so_far, mode, type, named)
|| ((type != 0) && TYPE_ALIGN (type) > BITS_PER_WORD)))
(*args_so_far)++;
+ /* as soon as we put a structure of 32 bytes or more on stack, everything
+ needs to go on stack, or varargs will lose. */
+ if (bytes >= 8 * UNITS_PER_WORD)
+ {
+ (*args_so_far) += 8;
+ return;
+ }
+
if (mode == BLKmode
&& (TYPE_ALIGN (type) != BITS_PER_WORD || bytes != UNITS_PER_WORD))
return;