summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-11-16 23:12:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-11-16 23:12:18 +0000
commitac1c35883515b8dce178c52bbe5047f9e361b38d (patch)
treed76885d5e6f9a83fbd09739dfee38d1e3856c8d4 /gnu
parent9943cd4635044a30007a0b5a87b680c578e66667 (diff)
In SETUP_INCOMING_VARARGS(), make sure to return in pretend_size the amount
of memory which will be used for the __va_reg register spill.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.c6
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