lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] mips: set _T9 in jit_callr instead of jit_finishr


From: Paul Cercueil
Subject: [PATCH 1/2] mips: set _T9 in jit_callr instead of jit_finishr
Date: Sat, 27 Aug 2022 16:49:49 +0100

In _jit_finishr(), instead of moving the target register to _T9 then
calling jit_callr(_T9), call jit_callr(r0) directly and let jit_callr()
set _T9.

The advantage of doing this is that _T9 can now be set in the delay slot
of the jump opcode.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 lib/jit_mips.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/jit_mips.c b/lib/jit_mips.c
index 94fe797..25353a5 100644
--- a/lib/jit_mips.c
+++ b/lib/jit_mips.c
@@ -1073,8 +1073,7 @@ _jit_finishr(jit_state_t *_jit, jit_int32_t r0)
     jit_inc_synth_w(finishr, r0);
     if (_jitc->function->self.alen < _jitc->function->call.size)
        _jitc->function->self.alen = _jitc->function->call.size;
-    jit_movr(_T9, r0);
-    call = jit_callr(_T9);
+    call = jit_callr(r0);
     call->v.w = _jitc->function->self.argi;
 #if NEW_ABI
     call->w.w = call->v.w;
-- 
2.35.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]