Update Lightning/Lightrec includes to the latest upstream versions
authorPaul Cercueil <paul@crapouillou.net>
Sun, 29 May 2022 11:51:26 +0000 (12:51 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 30 May 2022 17:26:25 +0000 (18:26 +0100)
Lightning now also requires HAVE_MMAP to be defined.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile
include/lightning/lightning.h
include/lightrec/lightrec-config.h

index de2641b..d1585a1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,7 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
 # dynarec
 ifeq "$(DYNAREC)" "lightrec"
 CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
-                 -DLIGHTREC -DLIGHTREC_STATIC
+                 -DLIGHTREC -DLIGHTREC_STATIC -DHAVE_MMAP
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
 LDLIBS += -lrt
 OBJS += libpcsxcore/lightrec/mem.o
index a155b8a..e7afc5c 100644 (file)
@@ -123,6 +123,11 @@ typedef jit_int32_t                jit_bool_t;
 typedef jit_int32_t            jit_gpr_t;
 typedef jit_int32_t            jit_fpr_t;
 
+#if !defined(__powerpc__) && \
+       (defined(__POWERPC__) || defined(__ppc__) || defined(__PPC__))
+#define __powerpc__ 1
+#endif
+
 #if defined(__i386__) || defined(__x86_64__)
 #  include <lightning/jit_x86.h>
 #elif defined(__mips__)
@@ -305,10 +310,6 @@ typedef enum {
 #define jit_comr(u,v)          jit_new_node_ww(jit_code_comr,u,v)
     jit_code_negr,             jit_code_comr,
 
-#define jit_ffsr(u,v)          jit_new_node_ww(jit_code_ffsr,u,v)
-#define jit_clzr(u,v)          jit_new_node_ww(jit_code_clzr,u,v)
-    jit_code_ffsr,             jit_code_clzr,
-
 #define jit_ltr(u,v,w)         jit_new_node_www(jit_code_ltr,u,v,w)
 #define jit_lti(u,v,w)         jit_new_node_www(jit_code_lti,u,v,w)
     jit_code_ltr,              jit_code_lti,
@@ -343,9 +344,11 @@ typedef enum {
 #define jit_movr(u,v)          jit_new_node_ww(jit_code_movr,u,v)
 #define jit_movi(u,v)          jit_new_node_ww(jit_code_movi,u,v)
     jit_code_movr,             jit_code_movi,
+
 #define jit_movnr(u,v,w)       jit_new_node_www(jit_code_movnr,u,v,w)
 #define jit_movzr(u,v,w)       jit_new_node_www(jit_code_movzr,u,v,w)
     jit_code_movnr,            jit_code_movzr,
+
 #define jit_extr_c(u,v)                jit_new_node_ww(jit_code_extr_c,u,v)
 #define jit_extr_uc(u,v)       jit_new_node_ww(jit_code_extr_uc,u,v)
     jit_code_extr_c,           jit_code_extr_uc,
@@ -898,6 +901,18 @@ typedef enum {
 #define jit_movr_d_w(u, v)     jit_new_node_ww(jit_code_movr_d_w, u, v)
 #define jit_movi_d_w(u, v)     jit_new_node_wd(jit_code_movi_d_w, u, v)
 
+#define jit_bswapr_us(u,v)     jit_new_node_ww(jit_code_bswapr_us,u,v)
+    jit_code_bswapr_us,
+#define jit_bswapr_ui(u,v)     jit_new_node_ww(jit_code_bswapr_ui,u,v)
+    jit_code_bswapr_ui,
+#define jit_bswapr_ul(u,v)     jit_new_node_ww(jit_code_bswapr_ul,u,v)
+    jit_code_bswapr_ul,
+#if __WORDSIZE == 32
+#define jit_bswapr(u,v)                jit_new_node_ww(jit_code_bswapr_ui,u,v)
+#else
+#define jit_bswapr(u,v)                jit_new_node_ww(jit_code_bswapr_ul,u,v)
+#endif
+
     jit_code_last_code
 } jit_code_t;
 
index bbb2329..34ac7a6 100644 (file)
@@ -10,6 +10,7 @@
 #define ENABLE_FIRST_PASS 1
 #define ENABLE_DISASSEMBLER 0
 #define ENABLE_TINYMM 0
+#define ENABLE_CODE_BUFFER 0
 
 #define HAS_DEFAULT_ELM 1