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.
This commit is contained in:
Thomas Preud'homme 2013-02-05 10:35:12 +01:00
parent e0aee4f455
commit 6c4d3244da

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))) {