diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2012-11-28 22:13:02 +0100 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2012-11-28 22:26:39 +0100 |
| commit | 8d90205fd933fbc8d36c935840d584a019a6be52 (patch) | |
| tree | a553870dfdd9e32a8ac909443d19d766852ec6c7 /arm-gen.c | |
| parent | 05b02a5581d2ad2c1a48a2e9c188d6a1e342738b (diff) | |
| download | tinycc-8d90205fd933fbc8d36c935840d584a019a6be52.tar.gz tinycc-8d90205fd933fbc8d36c935840d584a019a6be52.tar.bz2 | |
Fix OABI calling convention
OABI calling convention was broken since the addition of the hardfloat
calling convention in commit 7f6095bfec82b178084b22b33941d4f06155e514.
This commit fixes the breakage.
Diffstat (limited to 'arm-gen.c')
| -rw-r--r-- | arm-gen.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); |
