- if (OPT_REPLACE_MEMSET) {
- /* Blocks will jump here when they need to call
- * lightrec_memset() */
- addr3 = jit_indirect();
-
- jit_movr(JIT_V1, LIGHTREC_REG_CYCLE);
-
- jit_prepare();
- jit_pushargr(LIGHTREC_REG_STATE);
-
- jit_finishi(lightrec_memset);
- jit_retval(LIGHTREC_REG_CYCLE);
-
- jit_ldxi_ui(JIT_V0, LIGHTREC_REG_STATE,
- offsetof(struct lightrec_state, regs.gpr[31]));
- jit_subr(LIGHTREC_REG_CYCLE, JIT_V1, LIGHTREC_REG_CYCLE);
-
- if (OPT_DETECT_IMPOSSIBLE_BRANCHES || OPT_HANDLE_LOAD_DELAYS)
- jmp = jit_b();
- }
-
- if (OPT_DETECT_IMPOSSIBLE_BRANCHES) {
- /* Blocks will jump here when they reach a branch that should
- * be executed with the interpreter, passing the branch's PC
- * in JIT_V0 and the address of the block in JIT_V1. */
- addr4 = jit_indirect();
-
- update_cycle_counter_before_c(_jit);
-
- jit_prepare();
- jit_pushargr(LIGHTREC_REG_STATE);
- jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
- jit_finishi(lightrec_emulate_block);
-
- jit_retval(JIT_V0);
-
- update_cycle_counter_after_c(_jit);
-
- if (OPT_HANDLE_LOAD_DELAYS)
- jmp2 = jit_b();
-
- }
-
- if (OPT_HANDLE_LOAD_DELAYS) {
- /* Blocks will jump here when they reach a branch with a load
- * opcode in its delay slot. The delay slot has already been
- * executed; the load value is in (state->temp_reg), and the
- * register number is in JIT_V1.
- * Jump to a C function which will evaluate the branch target's
- * first opcode, to make sure that it does not read the register
- * in question; and if it does, handle it accordingly. */
- addr5 = jit_indirect();
-
- update_cycle_counter_before_c(_jit);
-
- jit_prepare();
- jit_pushargr(LIGHTREC_REG_STATE);
- jit_pushargr(JIT_V0);
- jit_pushargr(JIT_V1);
- jit_finishi(lightrec_check_load_delay);
-
- jit_retval(JIT_V0);
-
- update_cycle_counter_after_c(_jit);
-
- if (OPT_DETECT_IMPOSSIBLE_BRANCHES)
- jit_patch(jmp2);
- }
-
- if (OPT_REPLACE_MEMSET
- && (OPT_DETECT_IMPOSSIBLE_BRANCHES || OPT_HANDLE_LOAD_DELAYS)) {
- jit_patch(jmp);
- }
-