legacy ir builds in retroarch
This commit is contained in:
parent
dedd3c82dc
commit
c4738f246f
30
build.sh
30
build.sh
|
|
@ -10,13 +10,25 @@ IOS_MIN_VERSION="15.0"
|
|||
IOS="ON"
|
||||
SYSTEM_NAME="iOS"
|
||||
RUN_BUILD="ON"
|
||||
# Dynarec type: "jitless" (default), "jit", or "none"
|
||||
DYNAREC_TYPE=${DYNAREC_TYPE:-"jitless"}
|
||||
|
||||
# Set JIT flags based on dynarec type
|
||||
if [ "$DYNAREC_TYPE" = "jitless" ]; then
|
||||
USE_JIT="OFF"
|
||||
NO_JIT="ON"
|
||||
echo "🔧 Building with JITLESS dynarec"
|
||||
else
|
||||
USE_JIT="ON"
|
||||
NO_JIT="OFF"
|
||||
echo "🔧 Building with NO dynarec (interpreter only)"
|
||||
fi
|
||||
|
||||
# Initialize flags
|
||||
C_FLAGS="-arch ${ARCH} \
|
||||
-DIOS \
|
||||
-DTARGET_NO_REC=ON \
|
||||
-DNO_JIT=ON \
|
||||
-DUSE_JIT=OFF \
|
||||
-DNO_JIT=${NO_JIT} \
|
||||
-DUSE_JIT=${USE_JIT} \
|
||||
-DTARGET_NO_NIXPROF \
|
||||
-miphoneos-version-min=${IOS_MIN_VERSION} \
|
||||
-fdata-sections \
|
||||
|
|
@ -36,10 +48,9 @@ C_FLAGS="-arch ${ARCH} \
|
|||
|
||||
CXX_FLAGS="-arch ${ARCH} \
|
||||
-DIOS \
|
||||
-DTARGET_NO_REC=ON \
|
||||
-DNO_JIT=ON \
|
||||
-DNO_JIT=${NO_JIT} \
|
||||
-DUSE_JIT=${USE_JIT} \
|
||||
-miphoneos-version-min=${IOS_MIN_VERSION} \
|
||||
-DUSE_JIT=OFF \
|
||||
-DTARGET_NO_NIXPROF \
|
||||
-fdata-sections \
|
||||
-ffast-math \
|
||||
|
|
@ -171,8 +182,11 @@ CMAKE_CMD="cmake -B ${BUILD_DIR} \
|
|||
-DCMAKE_CXX_FLAGS=\"${CXX_FLAGS}\" \
|
||||
-DIOS=${IOS} \
|
||||
-DCMAKE_SYSTEM_NAME=${SYSTEM_NAME} \
|
||||
-DENABLE_SH4_CACHED_IR=ON \
|
||||
-DNO_JIT=ON \
|
||||
-DENABLE_SH4_CACHED_IR=OFF \
|
||||
-DNO_JIT=${NO_JIT} \
|
||||
-DUSE_JIT=${USE_JIT} \
|
||||
-DENABLE_LTO=ON \
|
||||
-DUSE_LINK_TIME_OPTIMIZATION=ON \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
|
||||
|
||||
# Add linker flags if provided
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace config {
|
|||
|
||||
// Dynarec
|
||||
|
||||
Option<bool> DynarecEnabled("Dynarec.Enabled", true);
|
||||
Option<bool> DynarecEnabled("Dynarec.Enabled", false);
|
||||
Option<int> Sh4Clock("Sh4Clock", 200);
|
||||
|
||||
// General
|
||||
|
|
|
|||
|
|
@ -503,15 +503,15 @@ void Emulator::init()
|
|||
else
|
||||
#endif // FEAT_SHREC != DYNAREC_NONE
|
||||
{
|
||||
#ifdef ENABLE_SH4_CACHED_IR
|
||||
INFO_LOG(INTERPRETER, "Using new Cached Interpreter");
|
||||
sh4::ir::Get_Sh4Interpreter(&sh4_cpu);
|
||||
sh4_cpu.Init();
|
||||
#else
|
||||
// #ifdef ENABLE_SH4_CACHED_IR
|
||||
// INFO_LOG(INTERPRETER, "Using new Cached Interpreter");
|
||||
// sh4::ir::Get_Sh4Interpreter(&sh4_cpu);
|
||||
// sh4_cpu.Init();
|
||||
// #else
|
||||
Get_Sh4Interpreter(&sh4_cpu);
|
||||
sh4_cpu.Init();
|
||||
INFO_LOG(INTERPRETER, "Using Interpreter");
|
||||
#endif // ENABLE_SH4_CACHED_IR
|
||||
// #endif // ENABLE_SH4_CACHED_IR
|
||||
}
|
||||
|
||||
state = Init;
|
||||
|
|
@ -959,13 +959,13 @@ void Emulator::start()
|
|||
else
|
||||
#endif // FEAT_SHREC != DYNAREC_NONE
|
||||
{
|
||||
#if defined(ENABLE_SH4_CACHED_IR)
|
||||
sh4::ir::Get_Sh4Interpreter(&sh4_cpu);
|
||||
INFO_LOG(DYNAREC, "Using NEW Cached Interpreter");
|
||||
#else
|
||||
// #if defined(ENABLE_SH4_CACHED_IR)
|
||||
// sh4::ir::Get_Sh4Interpreter(&sh4_cpu);
|
||||
// INFO_LOG(DYNAREC, "Using NEW Cached Interpreter");
|
||||
// #else
|
||||
Get_Sh4Interpreter(&sh4_cpu);
|
||||
INFO_LOG(DYNAREC, "Using LEGACY Interpreter");
|
||||
#endif // ENABLE_SH4_CACHED_IR
|
||||
// #endif // ENABLE_SH4_CACHED_IR
|
||||
}
|
||||
setupPtyPipe();
|
||||
|
||||
|
|
|
|||
|
|
@ -514,11 +514,11 @@ static void recSh4_Reset(bool hard)
|
|||
static void recSh4_Init()
|
||||
{
|
||||
INFO_LOG(DYNAREC, "recSh4 Init");
|
||||
#ifdef ENABLE_SH4_CACHED_IR
|
||||
sh4::ir::Get_Sh4Interpreter(&sh4Interp);
|
||||
#else
|
||||
// #ifdef ENABLE_SH4_CACHED_IR
|
||||
// sh4::ir::Get_Sh4Interpreter(&sh4Interp);
|
||||
// #else
|
||||
Get_Sh4Interpreter(&sh4Interp);
|
||||
#endif
|
||||
// #endif
|
||||
sh4Interp.Init();
|
||||
bm_Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -970,11 +970,11 @@ static void recSh4_Reset(bool hard)
|
|||
static void recSh4_Init()
|
||||
{
|
||||
INFO_LOG(DYNAREC, "recSh4 Init");
|
||||
#ifdef ENABLE_SH4_CACHED_IR
|
||||
sh4::ir::Get_Sh4Interpreter(&sh4Interp);
|
||||
#else
|
||||
// #ifdef ENABLE_SH4_CACHED_IR
|
||||
// sh4::ir::Get_Sh4Interpreter(&sh4Interp);
|
||||
// #else
|
||||
Get_Sh4Interpreter(&sh4Interp);
|
||||
#endif
|
||||
// #endif
|
||||
sh4Interp.Init();
|
||||
bm_Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -316,9 +316,9 @@ static inline void sh4_sr_SetFull(u32 value)
|
|||
#define sh4rcb (*p_sh4rcb)
|
||||
#define Sh4cntx (sh4rcb.cntx)
|
||||
|
||||
#ifdef ENABLE_SH4_CACHED_IR
|
||||
namespace sh4 { namespace ir { void Get_Sh4Interpreter(sh4_if* cpu); } }
|
||||
#endif
|
||||
// #ifdef ENABLE_SH4_CACHED_IR
|
||||
// namespace sh4 { namespace ir { void Get_Sh4Interpreter(sh4_if* cpu); } }
|
||||
// #endif
|
||||
|
||||
//Get an interface to sh4 interpreter
|
||||
void Get_Sh4Interpreter(sh4_if* cpu);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace config {
|
|||
|
||||
// Dynarec
|
||||
|
||||
Option<bool> DynarecEnabled("", true);
|
||||
Option<bool> DynarecEnabled("", false);
|
||||
IntOption Sh4Clock(CORE_OPTION_NAME "_sh4clock", 200);
|
||||
|
||||
// General
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ fi
|
|||
-DUSE_JIT=${USE_JIT} \
|
||||
-DNO_JIT=${NO_JIT} \
|
||||
-DUSE_BREAKPAD=OFF \
|
||||
-DENABLE_SH4_JITLESS=OFF \
|
||||
-DTARGET_NO_NIXPROF=ON \
|
||||
-DNGGEN_ARM64=$( [ "${ARCH}" = "arm64" ] && echo ON || echo OFF ) \
|
||||
-DENABLE_LOG=${ENABLE_LOG} \
|
||||
|
|
|
|||
Loading…
Reference in New Issue