From: Paul Cercueil Date: Sun, 29 May 2022 11:51:26 +0000 (+0100) Subject: Update Lightning/Lightrec includes to the latest upstream versions X-Git-Tag: r24l~472^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=720b0c92478386b1705688ec8c24b8e09395d80c;p=pcsx_rearmed.git Update Lightning/Lightrec includes to the latest upstream versions Lightning now also requires HAVE_MMAP to be defined. Signed-off-by: Paul Cercueil --- diff --git a/Makefile b/Makefile index de2641b9..d1585a17 100644 --- 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 diff --git a/include/lightning/lightning.h b/include/lightning/lightning.h index a155b8a8..e7afc5c2 100644 --- a/include/lightning/lightning.h +++ b/include/lightning/lightning.h @@ -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 #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; diff --git a/include/lightrec/lightrec-config.h b/include/lightrec/lightrec-config.h index bbb2329c..34ac7a6e 100644 --- a/include/lightrec/lightrec-config.h +++ b/include/lightrec/lightrec-config.h @@ -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