Skip to content

Commit 01039e6

Browse files
committed
Enable O3, switch to IR JIT
1 parent ee19ff9 commit 01039e6

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

libretro/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ else ifeq ($(platform), emscripten)
304304
GLES = 1
305305
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
306306
PLATCFLAGS += -msimd128 -msse3 -mssse3 -msse4.1 -pthread -D__EMSCRIPTEN__ -DNO_MMAP
307+
PLATCFLAGS += -O3
307308
PLATFORM_EXT = emscripten
308309
STATIC_LINKING = 1
309310

libretro/emscripten/build_emscripten.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
#!/bin/bash
2+
set -e
23

34
cd "$(dirname "$0")"
4-
55
cd ../../
66

77
git submodule update --init --recursive
88

9-
#Build emscripten ffmpeg
10-
119
cd ffmpeg
1210
cp ../libretro/emscripten/linux_wasm32.sh ./
1311
bash linux_wasm32.sh
1412
cd ../
1513

16-
#GetElfHwcapFromGetauxval - Always return "1" (Idk what this function actually does)
17-
1814
sed -i 's|return getauxval(hwcap_type);|return 1;|g' ext/cpu_features/src/hwcaps.c
1915
sed -i 's|#include <sys/auxv.h>||g' ext/cpu_features/src/hwcaps.c
2016

21-
#filesystem dependency - update to latest
22-
2317
cd ext/armips/ext/
2418
rm -rf filesystem
2519
git clone https://github.com/gulrak/filesystem.git filesystem

libretro/libretro.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ static void check_variables(CoreParameter &coreParam)
528528
g_Config.iLanguage = PSP_SYSTEMPARAM_LANGUAGE_CHINESE_SIMPLIFIED;
529529
}
530530

531-
#ifndef __EMSCRIPTEN__
532531
var.key = "ppsspp_cpu_core";
533532
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
534533
{
@@ -546,9 +545,6 @@ static void check_variables(CoreParameter &coreParam)
546545
// to experiment in future iOS versions or something...
547546
g_Config.iCpuCore = (int)CPUCore::IR_INTERPRETER;
548547
}
549-
#else
550-
g_Config.iCpuCore = (int)CPUCore::INTERPRETER;
551-
#endif
552548

553549
var.key = "ppsspp_fast_memory";
554550
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
@@ -1499,9 +1495,11 @@ bool retro_load_game(const struct retro_game_info *game)
14991495

15001496
useEmuThread = ctx->GetGPUCore() == GPUCORE_GLES;
15011497

1502-
// default to interpreter to allow startup in platforms w/o JIT capability
1503-
// TODO: I guess we should auto detect? And also, default to IR Interpreter...
1498+
#ifdef __EMSCRIPTEN__
1499+
g_Config.iCpuCore = (int)CPUCore::IR_INTERPRETER;
1500+
#else
15041501
g_Config.iCpuCore = (int)CPUCore::INTERPRETER;
1502+
#endif
15051503

15061504
CoreParameter coreParam = {};
15071505
coreParam.enableSound = true;
@@ -1990,6 +1988,8 @@ bool System_GetPropertyBool(SystemProperty prop)
19901988
#if PPSSPP_PLATFORM(IOS)
19911989
bool can_jit;
19921990
return (environ_cb(RETRO_ENVIRONMENT_GET_JIT_CAPABLE, &can_jit) && can_jit);
1991+
#elif defined(__EMSCRIPTEN__)
1992+
return false;
19931993
#else
19941994
return true;
19951995
#endif

libretro/libretro_core_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
136136
{ NULL, NULL },
137137
},
138138
#ifdef __EMSCRIPTEN__
139-
"Interpreter"
139+
"IR JIT"
140140
#else
141141
"JIT"
142142
#endif

0 commit comments

Comments
 (0)