From 6f173b35c963ed131293a898b156c6b51c2c0fe6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 27 Sep 2016 02:56:42 +0200 Subject: [PATCH] Rearrange files for new_dynarec --- Makefile | 12 +++++++----- jni/Android.mk | 2 +- libpcsxcore/gte_neon.S | 2 +- libpcsxcore/new_dynarec/{ => arm}/assem_arm.c | 12 ++++++------ libpcsxcore/new_dynarec/{ => arm}/assem_arm.h | 0 libpcsxcore/new_dynarec/{ => arm}/linkage_arm.S | 2 +- .../new_dynarec/{ => arm}/linkage_offsets.h | 0 .../new_dynarec/{ => backends/psx}/emu_if.c | 16 ++++++++-------- .../new_dynarec/{ => backends/psx}/emu_if.h | 4 ++-- .../new_dynarec/{ => backends/psx}/pcsxmem.c | 10 +++++----- .../new_dynarec/{ => backends/psx}/pcsxmem.h | 0 .../{ => backends/psx}/pcsxmem_inline.c | 0 libpcsxcore/new_dynarec/new_dynarec.c | 6 +++--- 13 files changed, 34 insertions(+), 32 deletions(-) rename libpcsxcore/new_dynarec/{ => arm}/assem_arm.c (99%) rename libpcsxcore/new_dynarec/{ => arm}/assem_arm.h (100%) rename libpcsxcore/new_dynarec/{ => arm}/linkage_arm.S (99%) rename libpcsxcore/new_dynarec/{ => arm}/linkage_offsets.h (100%) rename libpcsxcore/new_dynarec/{ => backends/psx}/emu_if.c (98%) rename libpcsxcore/new_dynarec/{ => backends/psx}/emu_if.h (97%) rename libpcsxcore/new_dynarec/{ => backends/psx}/pcsxmem.c (99%) rename libpcsxcore/new_dynarec/{ => backends/psx}/pcsxmem.h (100%) rename libpcsxcore/new_dynarec/{ => backends/psx}/pcsxmem_inline.c (100%) diff --git a/Makefile b/Makefile index 600a1d3a..46539c5a 100644 --- a/Makefile +++ b/Makefile @@ -65,18 +65,20 @@ ifeq "$(USE_DYNAREC)" "1" OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o OBJS += libpcsxcore/new_dynarec/pcsxmem.o else -libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -DDRC_DISABLE +libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -DDRC_DISABLE frontend/libretro.o: CFLAGS += -DDRC_DISABLE endif -OBJS += libpcsxcore/new_dynarec/emu_if.o -libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c \ - libpcsxcore/new_dynarec/pcsxmem_inline.c +OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o +libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/arm/assem_arm.c \ + libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c ifdef DRC_DBG -libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 +libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -DDRC_DBG endif ifeq "$(DRC_CACHE_BASE)" "1" libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 +libpcsxcore/new_dynarec/backends/psx/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 +libpcsxcore/new_dynarec/arm/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 endif # spu diff --git a/jni/Android.mk b/jni/Android.mk index 36b0c931..a0dbec34 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -27,7 +27,7 @@ ifeq ($(TARGET_ARCH),arm) LOCAL_SRC_FILES += ../libpcsxcore/gte_arm.S # dynarec - LOCAL_SRC_FILES += ../libpcsxcore/new_dynarec/new_dynarec.c ../libpcsxcore/new_dynarec/linkage_arm.S ../libpcsxcore/new_dynarec/emu_if.c ../libpcsxcore/new_dynarec/pcsxmem.c + LOCAL_SRC_FILES += ../libpcsxcore/new_dynarec/new_dynarec.c ../libpcsxcore/new_dynarec/arm/linkage_arm.S ../libpcsxcore/new_dynarec/backends/psx/emu_if.c ../libpcsxcore/new_dynarec/backends/psx/pcsxmem.c # spu LOCAL_SRC_FILES += ../plugins/dfsound/arm_utils.S diff --git a/libpcsxcore/gte_neon.S b/libpcsxcore/gte_neon.S index fe153e20..fbe0e595 100644 --- a/libpcsxcore/gte_neon.S +++ b/libpcsxcore/gte_neon.S @@ -6,7 +6,7 @@ */ #include "arm_features.h" -#include "new_dynarec/linkage_offsets.h" +#include "new_dynarec/arm/linkage_offsets.h" .syntax unified .text diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/arm/assem_arm.c similarity index 99% rename from libpcsxcore/new_dynarec/assem_arm.c rename to libpcsxcore/new_dynarec/arm/assem_arm.c index 21640f84..db1d2af5 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/arm/assem_arm.c @@ -19,12 +19,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "../gte.h" +#include "../../gte.h" #define FLAGLESS -#include "../gte.h" +#include "../../gte.h" #undef FLAGLESS -#include "../gte_arm.h" -#include "../gte_neon.h" +#include "../../gte_arm.h" +#include "../../gte_neon.h" #include "pcnt.h" #include "arm_features.h" @@ -2518,8 +2518,8 @@ static void mov_loadtype_adj(int type,int rs,int rt) } } -#include "pcsxmem.h" -#include "pcsxmem_inline.c" +#include "../backends/psx/pcsxmem.h" +#include "../backends/psx/pcsxmem_inline.c" static void do_readstub(int n) { diff --git a/libpcsxcore/new_dynarec/assem_arm.h b/libpcsxcore/new_dynarec/arm/assem_arm.h similarity index 100% rename from libpcsxcore/new_dynarec/assem_arm.h rename to libpcsxcore/new_dynarec/arm/assem_arm.h diff --git a/libpcsxcore/new_dynarec/linkage_arm.S b/libpcsxcore/new_dynarec/arm/linkage_arm.S similarity index 99% rename from libpcsxcore/new_dynarec/linkage_arm.S rename to libpcsxcore/new_dynarec/arm/linkage_arm.S index 147b0dfc..b6301427 100644 --- a/libpcsxcore/new_dynarec/linkage_arm.S +++ b/libpcsxcore/new_dynarec/arm/linkage_arm.S @@ -20,7 +20,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "arm_features.h" -#include "new_dynarec_config.h" +#include "../new_dynarec_config.h" #include "linkage_offsets.h" diff --git a/libpcsxcore/new_dynarec/linkage_offsets.h b/libpcsxcore/new_dynarec/arm/linkage_offsets.h similarity index 100% rename from libpcsxcore/new_dynarec/linkage_offsets.h rename to libpcsxcore/new_dynarec/arm/linkage_offsets.h diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/backends/psx/emu_if.c similarity index 98% rename from libpcsxcore/new_dynarec/emu_if.c rename to libpcsxcore/new_dynarec/backends/psx/emu_if.c index 8aebd644..6dc48e2f 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/backends/psx/emu_if.c @@ -9,15 +9,15 @@ #include "emu_if.h" #include "pcsxmem.h" -#include "../psxhle.h" -#include "../r3000a.h" -#include "../cdrom.h" -#include "../psxdma.h" -#include "../mdec.h" -#include "../gte_arm.h" -#include "../gte_neon.h" +#include "../../../psxhle.h" +#include "../../../r3000a.h" +#include "../../../cdrom.h" +#include "../../../psxdma.h" +#include "../../../mdec.h" +#include "../../../gte_arm.h" +#include "../../../gte_neon.h" #define FLAGLESS -#include "../gte.h" +#include "../../../gte.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) diff --git a/libpcsxcore/new_dynarec/emu_if.h b/libpcsxcore/new_dynarec/backends/psx/emu_if.h similarity index 97% rename from libpcsxcore/new_dynarec/emu_if.h rename to libpcsxcore/new_dynarec/backends/psx/emu_if.h index 73f842bd..d8c7990d 100644 --- a/libpcsxcore/new_dynarec/emu_if.h +++ b/libpcsxcore/new_dynarec/backends/psx/emu_if.h @@ -1,5 +1,5 @@ -#include "new_dynarec.h" -#include "../r3000a.h" +#include "../../new_dynarec.h" +#include "../../../r3000a.h" extern char invalid_code[0x100000]; diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/backends/psx/pcsxmem.c similarity index 99% rename from libpcsxcore/new_dynarec/pcsxmem.c rename to libpcsxcore/new_dynarec/backends/psx/pcsxmem.c index 9376ff47..647981ea 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/backends/psx/pcsxmem.c @@ -6,11 +6,11 @@ */ #include -#include "../psxhw.h" -#include "../cdrom.h" -#include "../mdec.h" -#include "../gpu.h" -#include "../psxmem_map.h" +#include "../../../psxhw.h" +#include "../../../cdrom.h" +#include "../../../mdec.h" +#include "../../../gpu.h" +#include "../../../psxmem_map.h" #include "emu_if.h" #include "pcsxmem.h" diff --git a/libpcsxcore/new_dynarec/pcsxmem.h b/libpcsxcore/new_dynarec/backends/psx/pcsxmem.h similarity index 100% rename from libpcsxcore/new_dynarec/pcsxmem.h rename to libpcsxcore/new_dynarec/backends/psx/pcsxmem.h diff --git a/libpcsxcore/new_dynarec/pcsxmem_inline.c b/libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c similarity index 100% rename from libpcsxcore/new_dynarec/pcsxmem_inline.c rename to libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index d8c23725..02f335c3 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -36,7 +36,7 @@ int getVMBlock(); #endif #include "new_dynarec_config.h" -#include "emu_if.h" //emulator interface +#include "backends/psx/emu_if.h" //emulator interface //#define DISASM //#define assem_debug printf @@ -51,7 +51,7 @@ int getVMBlock(); #include "assem_x64.h" #endif #ifdef __arm__ -#include "assem_arm.h" +#include "arm/assem_arm.h" #endif #ifdef VITA @@ -774,7 +774,7 @@ void alloc_all(struct regstat *cur,int i) #include "assem_x64.c" #endif #ifdef __arm__ -#include "assem_arm.c" +#include "arm/assem_arm.c" #endif // Add virtual address mapping to linked list -- 2.39.5