diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 10 |
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) | |||
| 3751 | inst_base = (arm_inst *)&inst_buf[ptr] | 3751 | inst_base = (arm_inst *)&inst_buf[ptr] |
| 3752 | #define INC_PC(l) ptr += sizeof(arm_inst) + l | 3752 | #define INC_PC(l) ptr += sizeof(arm_inst) + l |
| 3753 | 3753 | ||
| 3754 | #ifdef __GNUC__ | 3754 | // GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback to a |
| 3755 | // clunky switch statement. | ||
| 3756 | #if defined __GNUC__ || defined __clang__ | ||
| 3755 | #define GOTO_NEXT_INST goto *InstLabel[inst_base->idx] | 3757 | #define GOTO_NEXT_INST goto *InstLabel[inst_base->idx] |
| 3756 | #else | 3758 | #else |
| 3757 | #define GOTO_NEXT_INST switch(inst_base->idx) { \ | 3759 | #define GOTO_NEXT_INST switch(inst_base->idx) { \ |
| @@ -3996,7 +3998,9 @@ void InterpreterMainLoop(ARMul_State* state) | |||
| 3996 | //arm_processor *cpu = (arm_processor *)get_cast_conf_obj(core->cpu_data, "arm_core_t"); | 3998 | //arm_processor *cpu = (arm_processor *)get_cast_conf_obj(core->cpu_data, "arm_core_t"); |
| 3997 | arm_processor *cpu = state; //(arm_processor *)(core->cpu_data->obj); | 3999 | arm_processor *cpu = state; //(arm_processor *)(core->cpu_data->obj); |
| 3998 | 4000 | ||
| 3999 | #if __GNUC__ | 4001 | // GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback |
| 4002 | // to a clunky switch statement. | ||
| 4003 | #if defined __GNUC__ || defined __clang__ | ||
| 4000 | void *InstLabel[] = { | 4004 | void *InstLabel[] = { |
| 4001 | #define VFP_INTERPRETER_LABEL | 4005 | #define VFP_INTERPRETER_LABEL |
| 4002 | #include "core/arm/skyeye_common/vfp/vfpinstr.cpp" | 4006 | #include "core/arm/skyeye_common/vfp/vfpinstr.cpp" |
| @@ -6543,7 +6547,7 @@ void InterpreterMainLoop(ARMul_State* state) | |||
| 6543 | DEBUG_LOG(ARM11, "[%llx]\n", InstLabel[i]); | 6547 | DEBUG_LOG(ARM11, "[%llx]\n", InstLabel[i]); |
| 6544 | DEBUG_LOG(ARM11, "InstLabel:%d\n", sizeof(InstLabel)); | 6548 | DEBUG_LOG(ARM11, "InstLabel:%d\n", sizeof(InstLabel)); |
| 6545 | #endif | 6549 | #endif |
| 6546 | #ifdef __GNUC__ | 6550 | #if defined __GNUC__ || defined __clang__ |
| 6547 | InterpreterInitInstLength((unsigned long long int *)InstLabel, sizeof(InstLabel)); | 6551 | InterpreterInitInstLength((unsigned long long int *)InstLabel, sizeof(InstLabel)); |
| 6548 | #endif | 6552 | #endif |
| 6549 | #if 0 | 6553 | #if 0 |