diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2013-11-21 21:14:25 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2013-11-21 22:27:15 +0800 |
| commit | c3e7c725b540c837e25093e2f488a4667f4d4ea0 (patch) | |
| tree | 6683034dc334229f816d22c0443475ed527e2e4c | |
| parent | 41ce391c86df135609af33658414d4d452c5beb3 (diff) | |
| download | tinycc-c3e7c725b540c837e25093e2f488a4667f4d4ea0.tar.gz tinycc-c3e7c725b540c837e25093e2f488a4667f4d4ea0.tar.bz2 | |
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.
| -rw-r--r-- | arm-gen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1227,7 +1227,8 @@ void gfunc_prolog(CType *func_type) #ifdef TCC_ARM_HARDFLOAT if (!variadic && (is_float(sym2->type.t) || 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; } else #endif |
