diff options
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c index d5263f4c6aa..4155c6667a3 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c @@ -2619,6 +2619,7 @@ m88k_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) CUMULATIVE_ARGS next_cum; tree fntype; int stdarg_p; + int regcnt; if (no_rtl) return; @@ -2635,6 +2636,11 @@ m88k_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) m88k_function_arg_advance(&next_cum, mode, type, 1); m88k_first_vararg = next_cum; + + regcnt = m88k_first_vararg < 8 ? 8 - m88k_first_vararg : 0; + if (regcnt & 1) + regcnt++; + *pretend_size = regcnt * UNITS_PER_WORD; } /* Do what is necessary for `va_start'. We look at the current function |