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:
@ -1202,6 +1202,7 @@ void gfunc_prolog(CType *func_type)
|
|||||||
type = &sym->type;
|
type = &sym->type;
|
||||||
size = type_size(type, &align);
|
size = type_size(type, &align);
|
||||||
size = (size + 3) >> 2;
|
size = (size + 3) >> 2;
|
||||||
|
align = (align + 3) & ~3;
|
||||||
#ifdef TCC_ARM_HARDFLOAT
|
#ifdef TCC_ARM_HARDFLOAT
|
||||||
if (!variadic && (is_float(sym->type.t)
|
if (!variadic && (is_float(sym->type.t)
|
||||||
|| is_float_hgen_aggr(&sym->type))) {
|
|| is_float_hgen_aggr(&sym->type))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user