Align on 4n bytes when copying fct args on stack

When copying function arguments on stack in prolog, use multiple of 4
bytes for alignment.
master
Thomas Preud'homme 2013-02-05 10:35:12 +01:00
parent e0aee4f455
commit 6c4d3244da
1 changed files with 1 additions and 0 deletions

View File

@ -1202,6 +1202,7 @@ void gfunc_prolog(CType *func_type)
type = &sym->type;
size = type_size(type, &align);
size = (size + 3) >> 2;
align = (align + 3) & ~3;
#ifdef TCC_ARM_HARDFLOAT
if (!variadic && (is_float(sym->type.t)
|| is_float_hgen_aggr(&sym->type))) {