MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / emit_cop1_cs_read

Method emit_cop1_cs_read

LiveRecomp/live_generator.cpp:1721–1737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1719}
1720
1721void N64Recomp::LiveGenerator::emit_cop1_cs_read(int reg) const {
1722 // Skip the read if the target is the zero register.
1723 if (reg != 0) {
1724 sljit_sw dst;
1725 sljit_sw dstw;
1726 get_gpr_values(reg, dst, dstw);
1727
1728 // Call get_cop1_cs.
1729 sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS0(32), SLJIT_IMM, sljit_sw(get_cop1_cs));
1730
1731 // Sign extend the result into a temp register.
1732 sljit_emit_op1(compiler, SLJIT_MOV_S32, Registers::arithmetic_temp1, 0, SLJIT_RETURN_REG, 0);
1733
1734 // Move the sign extended result into the destination.
1735 sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, Registers::arithmetic_temp1, 0);
1736 }
1737}
1738
1739void N64Recomp::LiveGenerator::emit_cop1_cs_write(int reg) const {
1740 sljit_sw src;

Callers

nothing calls this directly

Calls 1

get_gpr_valuesFunction · 0.85

Tested by

no test coverage detected