| 877 | } |
| 878 | |
| 879 | void N64Recomp::LiveGenerator::load_relocated_address(const InstructionContext& ctx, int reg) const { |
| 880 | // Get the pointer to the section address. |
| 881 | int32_t* section_addr_ptr = (ctx.reloc_tag_as_reference ? inputs.reference_section_addresses : inputs.local_section_addresses) + ctx.reloc_section_index; |
| 882 | |
| 883 | // Load the section's address into the target register. |
| 884 | sljit_emit_op1(compiler, SLJIT_MOV_S32, reg, 0, SLJIT_MEM0(), sljit_sw(section_addr_ptr)); |
| 885 | |
| 886 | // Don't emit the add if the offset is zero (small optimization). |
| 887 | if (ctx.reloc_target_section_offset != 0) { |
| 888 | // Add the reloc section offset to the section's address and put the result in R0. |
| 889 | sljit_emit_op2(compiler, SLJIT_ADD, reg, 0, reg, 0, SLJIT_IMM, ctx.reloc_target_section_offset); |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | void N64Recomp::LiveGenerator::process_unary_op(const UnaryOp& op, const InstructionContext& ctx) const { |
| 894 | // Skip instructions that output to $zero |
nothing calls this directly
no outgoing calls
no test coverage detected