When the function call is indirect, these registers may be broken to load a function pointer.
Unified · Split
| @@ -582,6 +582,8 @@ void gfunc_call(int nb_args) · 581 unmodified lines | ||
| 582 | 582 | vtop--; |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | + save_regs(0); /* save used temporary registers */ | |
| 586 | + | |
| 585 | 587 | /* Copy R10 and R11 into RDX and RCX, respectively */ |
| 586 | 588 | if (nb_reg_args > 2) { |
| 587 | 589 | o(0xd2894c); /* mov %r10, %rdx */ |
| @@ -590,8 +592,6 @@ void gfunc_call(int nb_args) · 2 unmodified lines | ||
| 590 | 592 | } |
| 591 | 593 | } |
| 592 | 594 | |
| 593 | − save_regs(0); /* save used temporary registers */ | |
| 594 | − | |
| 595 | 595 | func_sym = vtop->type.ref; |
| 596 | 596 | func_call = FUNC_CALL(func_sym->r); |
| 597 | 597 | oad(0xb8, nb_sse_args < 8 ? nb_sse_args : 8); /* mov nb_sse_args, %eax */ |