lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_mips-cpu.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年02月24日 12:22:03 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年02月24日 12:22:03 -0300
commitb6e9d9f2a976247db80e425df7549f2da8a040be (patch)
tree8e1693729b5241ba86bb8ef2993bac5a1053117a /lib/jit_mips-cpu.c
parent8e5ba87a647a9e16e09172764a7133567cff1c84 (diff)
downloadlightning-b6e9d9f2a976247db80e425df7549f2da8a040be.tar.gz
mips: Correct comment and usage of jmpi_p
It was a copy&paste of calli_p. There is no need to check for "t9" usage in the delay slot. Also, a register must be allocated, cannot pass jit_class_chk.
Diffstat (limited to 'lib/jit_mips-cpu.c')
-rw-r--r--lib/jit_mips-cpu.c 9
1 files changed, 4 insertions, 5 deletions
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);
}
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月13日 15:06:44 +0000

AltStyle によって変換されたページ (->オリジナル) /