History

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.

Thomas Preud'homme committed 12 years ago

Commit c3e7c721 parent 41ce3911 file · +2 −1Browse files

Unified · Split

arm-gen.c+2−1
@@ -1227,7 +1227,8 @@ void gfunc_prolog(CType *func_type) · 1226 unmodified lines
12271227 #ifdef TCC_ARM_HARDFLOAT
12281228 if (!variadic && (is_float(sym2->type.t)
12291229 || is_hgen_float_aggr(&sym2->type))) {
1230− int tmpnf = assign_vfpreg(&avregs, align, size) + 1;
1230+ int tmpnf = assign_vfpreg(&avregs, align, size);
1231+ tmpnf += (size + 3) / 4;
12311232 nf = (tmpnf > nf) ? tmpnf : nf;
12321233 } else
12331234 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t