mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Fix OABI calling convention
OABI calling convention was broken since the addition of the hardfloat
calling convention in commit 7f6095bfec
.
This commit fixes the breakage.
This commit is contained in:
parent
05b02a5581
commit
8d90205fd9
10
arm-gen.c
10
arm-gen.c
@ -829,7 +829,7 @@ void gfunc_call(int nb_args)
|
||||
--nb_args;
|
||||
}
|
||||
|
||||
vpushi(0);
|
||||
vpushi(0), nb_args++;
|
||||
vtop->type.t = VT_LLONG;
|
||||
args_size = 0;
|
||||
#endif
|
||||
@ -845,7 +845,7 @@ void gfunc_call(int nb_args)
|
||||
structures in the first zone are moved just after the SValue pointed by
|
||||
before_vfpreg_hfa. SValue's representing structures in the second zone are
|
||||
moved just after the SValue pointer by before_stack. */
|
||||
for(i = nb_args + 1 ; i-- ;) {
|
||||
for(i = nb_args; i-- ;) {
|
||||
int j, assigned_vfpreg = 0;
|
||||
size = type_size(&vtop[-i].type, &align);
|
||||
switch(vtop[-i].type.t & VT_BTYPE) {
|
||||
@ -920,9 +920,11 @@ void gfunc_call(int nb_args)
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
#ifdef TCC_ARM_EABI
|
||||
if (!i) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (ncrn < 4) {
|
||||
int is_long = (vtop[-i].type.t & VT_BTYPE) == VT_LLONG;
|
||||
|
||||
@ -953,7 +955,9 @@ void gfunc_call(int nb_args)
|
||||
#endif
|
||||
args_size += (size + 3) & -4;
|
||||
}
|
||||
vtop--;
|
||||
#ifdef TCC_ARM_EABI
|
||||
vtop--, nb_args--;
|
||||
#endif
|
||||
args_size = keep = 0;
|
||||
for(i = 0;i < nb_args; i++) {
|
||||
vrotb(keep+1);
|
||||
|
Loading…
Reference in New Issue
Block a user