| 1665 | } |
| 1666 | |
| 1667 | void N64Recomp::LiveGenerator::emit_return(const Context& context, size_t func_index) const { |
| 1668 | (void)context; |
| 1669 | |
| 1670 | // Check if this function's return is hooked and emit the hook call if so. |
| 1671 | auto find_hook_it = inputs.return_func_hooks.find(func_index); |
| 1672 | if (find_hook_it != inputs.return_func_hooks.end()) { |
| 1673 | // Load rdram and ctx into R0 and R1. |
| 1674 | sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, Registers::rdram, 0, SLJIT_IMM, rdram_offset); |
| 1675 | sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, Registers::ctx, 0); |
| 1676 | // Load the return hook's index into R2. |
| 1677 | sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, find_hook_it->second); |
| 1678 | sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS3V(P, P, W), SLJIT_IMM, sljit_sw(inputs.run_hook)); |
| 1679 | } |
| 1680 | sljit_emit_return_void(compiler); |
| 1681 | } |
| 1682 | |
| 1683 | void N64Recomp::LiveGenerator::emit_check_fr(int fpr) const { |
| 1684 | (void)fpr; |
nothing calls this directly
no outgoing calls
no test coverage detected