| 1692 | } |
| 1693 | |
| 1694 | void N64Recomp::LiveGenerator::emit_cop0_status_read(int reg) const { |
| 1695 | // Skip the read if the target is the zero register. |
| 1696 | if (reg != 0) { |
| 1697 | // Load ctx into R0. |
| 1698 | sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, Registers::ctx, 0); |
| 1699 | |
| 1700 | // Call cop0_status_read. |
| 1701 | sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS1V(P), SLJIT_IMM, sljit_sw(inputs.cop0_status_read)); |
| 1702 | |
| 1703 | // Store the result in the output register. |
| 1704 | sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(Registers::ctx), get_gpr_context_offset(reg), SLJIT_R0, 0); |
| 1705 | } |
| 1706 | } |
| 1707 | |
| 1708 | void N64Recomp::LiveGenerator::emit_cop0_status_write(int reg) const { |
| 1709 | sljit_sw src; |
nothing calls this directly
no test coverage detected