summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-10-07 23:55:26 +0200
committerbunnei <bunneidev@gmail.com>2014-10-25 20:11:40 +0200
commit130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3 (patch)
tree5ee448df0115d2ac2c3a2f5b40b7e9589c039b26 /src
parentARM: Integrate SkyEye faster "dyncom" interpreter. (diff)
downloadyuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar.gz
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar.bz2
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar.lz
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar.xz
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.tar.zst
yuzu-130efd461d4c0c2fdd4dc3f784dc5cadf869f2b3.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 8739b8c14..fe1501b59 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -3751,7 +3751,9 @@ void InterpreterMainLoop(ARMul_State* state)
inst_base = (arm_inst *)&inst_buf[ptr]
#define INC_PC(l) ptr += sizeof(arm_inst) + l
-#ifdef __GNUC__
+// GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback to a
+// clunky switch statement.
+#if defined __GNUC__ || defined __clang__
#define GOTO_NEXT_INST goto *InstLabel[inst_base->idx]
#else
#define GOTO_NEXT_INST switch(inst_base->idx) { \
@@ -3996,7 +3998,9 @@ void InterpreterMainLoop(ARMul_State* state)
//arm_processor *cpu = (arm_processor *)get_cast_conf_obj(core->cpu_data, "arm_core_t");
arm_processor *cpu = state; //(arm_processor *)(core->cpu_data->obj);
-#if __GNUC__
+ // GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback
+ // to a clunky switch statement.
+#if defined __GNUC__ || defined __clang__
void *InstLabel[] = {
#define VFP_INTERPRETER_LABEL
#include "core/arm/skyeye_common/vfp/vfpinstr.cpp"
@@ -6543,7 +6547,7 @@ void InterpreterMainLoop(ARMul_State* state)
DEBUG_LOG(ARM11, "[%llx]\n", InstLabel[i]);
DEBUG_LOG(ARM11, "InstLabel:%d\n", sizeof(InstLabel));
#endif
-#ifdef __GNUC__
+#if defined __GNUC__ || defined __clang__
InterpreterInitInstLength((unsigned long long int *)InstLabel, sizeof(InstLabel));
#endif
#if 0