From 7fd5d17b31f3ccdbc3eaf7e9761ddb41fa994863 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 30 Jun 2013 23:58:59 +0200 Subject: [PATCH] don't assume svp dynarec on ARM so that it can be disabled --- pico/carthw/svp/svp.c | 10 +++++----- platform/common/common.mak | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pico/carthw/svp/svp.c b/pico/carthw/svp/svp.c index 38e7a4f5..66449192 100644 --- a/pico/carthw/svp/svp.c +++ b/pico/carthw/svp/svp.c @@ -56,7 +56,7 @@ static void PicoSVPReset(void) memcpy(svp->iram_rom + 0x800, Pico.rom + 0x800, 0x20000 - 0x800); ssp1601_reset(&svp->ssp1601); -#ifdef __arm__ +#ifdef _SVP_DRC if ((PicoOpt&POPT_EN_SVP_DRC) && svp_dyn_ready) ssp1601_dyn_reset(&svp->ssp1601); #endif @@ -76,7 +76,7 @@ static void PicoSVPLine(void) delay_lines = 0; #endif -#ifdef __arm__ +#ifdef _SVP_DRC if ((PicoOpt&POPT_EN_SVP_DRC) && svp_dyn_ready) ssp1601_dyn_run(PicoSVPCycles * count); else @@ -118,7 +118,7 @@ static int PicoSVPDma(unsigned int source, int len, unsigned short **srcp, unsig void PicoSVPInit(void) { -#ifdef __arm__ +#ifdef _SVP_DRC // this is to unmap tcache and make // mem available for large ROMs, MCD, etc. drc_cmn_cleanup(); @@ -127,7 +127,7 @@ void PicoSVPInit(void) static void PicoSVPExit(void) { -#ifdef __arm__ +#ifdef _SVP_DRC ssp1601_dyn_exit(); #endif } @@ -150,7 +150,7 @@ void PicoSVPStartup(void) // init SVP compiler svp_dyn_ready = 0; -#ifdef __arm__ +#ifdef _SVP_DRC if (PicoOpt & POPT_EN_SVP_DRC) { if (ssp1601_dyn_startup()) return; diff --git a/platform/common/common.mak b/platform/common/common.mak index 28d5fa67..f4730d78 100644 --- a/platform/common/common.mak +++ b/platform/common/common.mak @@ -89,6 +89,7 @@ SRCS_COMMON += $(R)pico/carthw/carthw.c SRCS_COMMON += $(R)pico/carthw/svp/svp.c $(R)pico/carthw/svp/memory.c \ $(R)pico/carthw/svp/ssp16.c ifeq "$(use_svpdrc)" "1" +DEFINES += _SVP_DRC SRCS_COMMON += $(R)pico/carthw/svp/stub_arm.S SRCS_COMMON += $(R)pico/carthw/svp/compiler.c endif -- 2.39.5