wingo pushed a commit to branch main
in repository guile.

commit 746660bf08ca99e2f25ad2715632e4c451832abe
Author: Ekaitz Zarraga <eka...@elenq.tech>
AuthorDate: Fri Nov 15 12:01:52 2024 +0100

    riscv: movi: use addiw in RV64
---
 lightening/riscv-cpu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lightening/riscv-cpu.c b/lightening/riscv-cpu.c
index bd2fff593..92ee7cf1f 100644
--- a/lightening/riscv-cpu.c
+++ b/lightening/riscv-cpu.c
@@ -1585,7 +1585,11 @@ movi(jit_state_t *_jit, int32_t r0, jit_word_t i0)
     }
 
     if(lo || hi == 0){
+#if __WORDSIZE == 64
+      em_wp(_jit, _ADDIW(r0, srcreg, lo));
+#elif __WORDSIZE == 32
       em_wp(_jit, _ADDI(r0, srcreg, lo));
+#endif
     }
 
   } else {

Reply via email to