| 247 | } |
| 248 | |
| 249 | constexpr void get_fpr_u32l_context_offset(int fpr_index, sljit_compiler* compiler, int odd_float_address_register, sljit_sw& out, sljit_sw& outw) { |
| 250 | if (fpr_index & 1) { |
| 251 | assert(compiler != nullptr); |
| 252 | // Load ctx->f_odd into the address register. |
| 253 | sljit_emit_op1(compiler, SLJIT_MOV_P, odd_float_address_register, 0, SLJIT_MEM1(Registers::ctx), offsetof(recomp_context, f_odd)); |
| 254 | // sljit_emit_op0(compiler, SLJIT_BREAKPOINT); |
| 255 | out = SLJIT_MEM1(odd_float_address_register); |
| 256 | // Set a memory offset of ((fpr_index - 1) * 2) * sizeof(*f_odd). |
| 257 | outw = ((fpr_index - 1) * 2) * sizeof(*recomp_context::f_odd); |
| 258 | } |
| 259 | else { |
| 260 | out = SLJIT_MEM1(Registers::ctx); |
| 261 | outw = offsetof(recomp_context, f0.u32l) + sizeof(recomp_context::f0) * fpr_index; |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | constexpr int get_fpr_u64_context_offset(int fpr_index) { |
| 266 | return offsetof(recomp_context, f0.u64) + sizeof(recomp_context::f0) * fpr_index; |
no outgoing calls
no test coverage detected