author | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2023年02月24日 12:22:03 -0300 |
---|---|---|
committer | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2023年02月24日 12:22:03 -0300 |
commit | b6e9d9f2a976247db80e425df7549f2da8a040be (patch) | |
tree | 8e1693729b5241ba86bb8ef2993bac5a1053117a /lib/jit_mips-cpu.c | |
parent | 8e5ba87a647a9e16e09172764a7133567cff1c84 (diff) | |
download | lightning-b6e9d9f2a976247db80e425df7549f2da8a040be.tar.gz |
-rw-r--r-- | lib/jit_mips-cpu.c | 9 |
diff --git a/lib/jit_mips-cpu.c b/lib/jit_mips-cpu.c index 0b1b3b4..3b58a2a 100644 --- a/lib/jit_mips-cpu.c +++ b/lib/jit_mips-cpu.c @@ -3171,9 +3171,9 @@ _jmpi_p(jit_state_t *_jit, jit_word_t i0) { jit_word_t w; jit_int32_t op, t0; - /* make sure delay slot does not use _T9_REGNO */ - t0 = jit_get_reg_for_delay_slot(jit_class_gpr|jit_class_chk, - _T9_REGNO, _ZERO_REGNO); + /* Get a register without side effects in delay slot */ + t0 = jit_get_reg_for_delay_slot(jit_class_gpr, _ZERO_REGNO, _ZERO_REGNO); + /* Check for a instruction that can be executed in the delay slot */ op = pending(); /* implicit flush() */ w = _jit->pc.w; @@ -3181,8 +3181,7 @@ _jmpi_p(jit_state_t *_jit, jit_word_t i0) flush(); /* movi_p will be patched */ JR(rn(t0)); delay(op); - if (t0 != JIT_NOREG) - jit_unget_reg(t0); + jit_unget_reg(t0); return (w); } |