mirror of
https://github.com/frida/tinycc
synced 2024-12-25 22:46:49 +03:00
Fix counting of VFP regs in ARM's gfunc_prolog
Fix in gfunc_prolog for ARM the counting of the highest numbered VFP float register used for parameter passing, rounded to 2. It can be computed from the range of VFP float register with the highest range start and adding the number of VFP float register occupied. This ensure that parameter of type struct that spans over more than 2 float registers are correctly taken into account.
This commit is contained in:
parent
41ce391c86
commit
c3e7c725b5
@ -1227,7 +1227,8 @@ void gfunc_prolog(CType *func_type)
|
|||||||
#ifdef TCC_ARM_HARDFLOAT
|
#ifdef TCC_ARM_HARDFLOAT
|
||||||
if (!variadic && (is_float(sym2->type.t)
|
if (!variadic && (is_float(sym2->type.t)
|
||||||
|| is_hgen_float_aggr(&sym2->type))) {
|
|| is_hgen_float_aggr(&sym2->type))) {
|
||||||
int tmpnf = assign_vfpreg(&avregs, align, size) + 1;
|
int tmpnf = assign_vfpreg(&avregs, align, size);
|
||||||
|
tmpnf += (size + 3) / 4;
|
||||||
nf = (tmpnf > nf) ? tmpnf : nf;
|
nf = (tmpnf > nf) ? tmpnf : nf;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user