The function should to be saved to stack in some cases (fastcall on i386, struct argument on arm etc.). But I neglected. So I revert this commit.
Unified · Split
| @@ -1187,7 +1187,7 @@ again: · 1186 unmodified lines | ||
| 1187 | 1187 | |
| 1188 | 1188 | /* Manually free remaining registers since next parameters are loaded |
| 1189 | 1189 | * manually, without the help of gv(int). */ |
| 1190 | − save_regs(nb_args+1); | |
| 1190 | + save_regs(nb_args); | |
| 1191 | 1191 | |
| 1192 | 1192 | if(todo) { |
| 1193 | 1193 | o(0xE8BD0000|todo); /* pop {todo} */ |
| @@ -948,7 +948,7 @@ ST_FUNC void gfunc_call(int nb_args) · 947 unmodified lines | ||
| 948 | 948 | vswap(); |
| 949 | 949 | } |
| 950 | 950 | |
| 951 | − save_regs(1); | |
| 951 | + save_regs(0); | |
| 952 | 952 | arm64_gen_bl_or_b(0); |
| 953 | 953 | --vtop; |
| 954 | 954 | if (stack) |
| @@ -475,7 +475,7 @@ ST_FUNC void gfunc_call(int nb_args) · 474 unmodified lines | ||
| 475 | 475 | } |
| 476 | 476 | vtop--; |
| 477 | 477 | } |
| 478 | − save_regs(1); /* save used temporary registers */ | |
| 478 | + save_regs(0); /* save used temporary registers */ | |
| 479 | 479 | func_sym = vtop->type.ref; |
| 480 | 480 | func_call = func_sym->f.func_call; |
| 481 | 481 | /* fast call case */ |