From: notaz Date: Thu, 31 Mar 2016 22:49:55 +0000 (+0300) Subject: don't use __ARM_ARCH_7A__ X-Git-Tag: r23~176 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f2bb0cbd20c00475196d1efb72103b65e57bc66;p=pcsx_rearmed.git don't use __ARM_ARCH_7A__ github issue #68 --- diff --git a/frontend/libretro.c b/frontend/libretro.c index acc64a12..37cccc4f 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -25,6 +25,7 @@ #include "main.h" #include "plugin.h" #include "plugin_lib.h" +#include "arm_features.h" #include "revision.h" #include "libretro.h" @@ -1249,9 +1250,8 @@ void retro_init(void) /* Set how much slower PSX CPU runs * 100 (so that 200 is 2 times) * we have to do this because cache misses and some IO penalties * are not emulated. Warning: changing this may break compatibility. */ -#if !defined(__arm__) || defined(__ARM_ARCH_7A__) cycle_multiplier = 175; -#else +#ifdef HAVE_PRE_ARMV7 cycle_multiplier = 200; #endif pl_rearmed_cbs.gpu_peops.iUseDither = 1; diff --git a/frontend/main.c b/frontend/main.c index 4c84803e..a824fdcc 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -26,6 +26,7 @@ #include "../libpcsxcore/new_dynarec/new_dynarec.h" #include "../plugins/cdrcimg/cdrcimg.h" #include "../plugins/dfsound/spu_config.h" +#include "arm_features.h" #include "revision.h" #ifndef NO_FRONTEND @@ -142,7 +143,7 @@ void emu_set_default_config(void) spu_config.iVolume = 768; spu_config.iTempo = 0; spu_config.iUseThread = 1; // no effect if only 1 core is detected -#if defined(__arm__) && !defined(__ARM_ARCH_7A__) /* XXX GPH hack */ +#ifdef HAVE_PRE_ARMV7 /* XXX GPH hack */ spu_config.iUseReverb = 0; spu_config.iUseInterpolation = 0; spu_config.iTempo = 1; @@ -771,7 +772,7 @@ int emu_save_state(int slot) return ret; ret = SaveState(fname); -#if defined(__arm__) && !defined(__ARM_ARCH_7A__) /* XXX GPH hack */ +#ifdef HAVE_PRE_ARMV7 /* XXX GPH hack */ sync(); #endif SysPrintf("* %s \"%s\" [%d]\n", diff --git a/frontend/menu.c b/frontend/menu.c index 9ddbe376..cf9382a8 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -39,6 +39,7 @@ #include "../plugins/dfinput/externals.h" #include "../plugins/dfsound/spu_config.h" #include "psemu_plugin_defs.h" +#include "arm_features.h" #include "revision.h" #define REARMED_BIRTHDAY_TIME 1293306830 /* 25 Dec 2010 */ @@ -100,7 +101,7 @@ int scanlines, scanline_level = 20; int soft_scaling, analog_deadzone; // for Caanoo int soft_filter; -#ifdef __ARM_ARCH_7A__ +#ifndef HAVE_PRE_ARMV7 #define DEFAULT_PSX_CLOCK 57 #define DEFAULT_PSX_CLOCK_S "57" #else @@ -732,7 +733,7 @@ static unsigned short fname2color(const char *fname) static void draw_savestate_bg(int slot); #define MENU_ALIGN_LEFT -#ifdef __ARM_ARCH_7A__ // assume hires device +#ifndef HAVE_PRE_ARMV7 // assume hires device #define MENU_X2 1 #else #define MENU_X2 0 @@ -852,7 +853,7 @@ me_bind_action emuctrl_actions[] = { "Toggle Frameskip ", 1 << SACTION_TOGGLE_FSKIP }, { "Take Screenshot ", 1 << SACTION_SCREENSHOT }, { "Show/Hide FPS ", 1 << SACTION_TOGGLE_FPS }, -#ifdef __ARM_ARCH_7A__ +#ifndef HAVE_PRE_ARMV7 { "Switch Renderer ", 1 << SACTION_SWITCH_DISPMODE }, #endif { "Fast Forward ", 1 << SACTION_FAST_FORWARD }, @@ -2521,7 +2522,7 @@ void menu_init(void) me_enable(e_menu_gfx_options, MA_OPT_GAMMA, plat_target.gamma_set != NULL); -#ifndef __ARM_ARCH_7A__ +#ifdef HAVE_PRE_ARMV7 me_enable(e_menu_gfx_options, MA_OPT_SWFILTER, 0); #endif me_enable(e_menu_gfx_options, MA_OPT_VARSCALER, MENU_SHOW_VARSCALER); diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 556b512f..17d65ab8 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -24,6 +24,7 @@ #include "cdrom.h" #include "ppf.h" #include "psxdma.h" +#include "arm_features.h" /* logging */ #if 0 @@ -1006,7 +1007,7 @@ finish: #endif } -#ifdef __ARM_ARCH_7A__ +#ifdef HAVE_ARMV7 #define ssat32_to_16(v) \ asm("ssat %0,#16,%1" : "=r" (v) : "r" (v)) #else diff --git a/libpcsxcore/new_dynarec/linkage_arm.S b/libpcsxcore/new_dynarec/linkage_arm.S index 50b577b3..95af8b4e 100644 --- a/libpcsxcore/new_dynarec/linkage_arm.S +++ b/libpcsxcore/new_dynarec/linkage_arm.S @@ -116,10 +116,10 @@ ptr_hash_table: #endif .macro load_varadr reg var -#if defined(__ARM_ARCH_7A__) && !defined(__PIC__) +#if defined(HAVE_ARMV7) && !defined(__PIC__) movw \reg, #:lower16:\var movt \reg, #:upper16:\var -#elif defined(__ARM_ARCH_7A__) && defined(__MACH__) +#elif defined(HAVE_ARMV7) && defined(__MACH__) movw \reg, #:lower16:(\var-(1678f+8)) movt \reg, #:upper16:(\var-(1678f+8)) 1678: @@ -130,7 +130,7 @@ ptr_hash_table: .endm .macro load_varadr_ext reg var -#if defined(__ARM_ARCH_7A__) && defined(__MACH__) && defined(__PIC__) +#if defined(HAVE_ARMV7) && defined(__MACH__) && defined(__PIC__) movw \reg, #:lower16:(ptr_\var-(1678f+8)) movt \reg, #:upper16:(ptr_\var-(1678f+8)) 1678: @@ -141,7 +141,7 @@ ptr_hash_table: .endm .macro mov_16 reg imm -#ifdef __ARM_ARCH_7A__ +#ifdef HAVE_ARMV7 movw \reg, #\imm #else mov \reg, #(\imm & 0x00ff) @@ -150,7 +150,7 @@ ptr_hash_table: .endm .macro mov_24 reg imm -#ifdef __ARM_ARCH_7A__ +#ifdef HAVE_ARMV7 movw \reg, #(\imm & 0xffff) movt \reg, #(\imm >> 16) #else diff --git a/plugins/dfsound/arm_utils.S b/plugins/dfsound/arm_utils.S index 96523136..eaeca518 100644 --- a/plugins/dfsound/arm_utils.S +++ b/plugins/dfsound/arm_utils.S @@ -20,10 +20,10 @@ ptr_ChanBuf: .word ESYM(ChanBuf) .align 2 .macro load_varadr reg var -#if defined(__ARM_ARCH_7A__) && !defined(__PIC__) +#if defined(HAVE_ARMV7) && !defined(__PIC__) movw \reg, #:lower16:ESYM(\var) movt \reg, #:upper16:ESYM(\var) -#elif defined(__ARM_ARCH_7A__) && defined(__MACH__) +#elif defined(HAVE_ARMV7) && defined(__MACH__) movw \reg, #:lower16:(ptr_\var-(1678f+8)) movt \reg, #:upper16:(ptr_\var-(1678f+8)) 1678: diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index c6a1bf5e..0058ad26 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -35,7 +35,7 @@ #include "arm_features.h" #endif -#ifdef __ARM_ARCH_7A__ +#ifdef HAVE_ARMV7 #define ssat32_to_16(v) \ asm("ssat %0,#16,%1" : "=r" (v) : "r" (v)) #else diff --git a/plugins/gpu_unai/gpulib_if.cpp b/plugins/gpu_unai/gpulib_if.cpp index 646b0f22..2dedbf83 100644 --- a/plugins/gpu_unai/gpulib_if.cpp +++ b/plugins/gpu_unai/gpulib_if.cpp @@ -23,6 +23,7 @@ #include #include #include "../gpulib/gpu.h" +#include "arm_features.h" #define u8 uint8_t #define s8 int8_t @@ -171,7 +172,7 @@ int do_cmd_list(unsigned int *list, int list_len, int *last_cmd) unsigned int *list_end = list + list_len; linesInterlace = force_interlace; -#ifndef __ARM_ARCH_7A__ /* XXX */ +#ifdef HAVE_PRE_ARMV7 /* XXX */ linesInterlace |= gpu.status.interlace; #endif