summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 7ba82503d..d347496e5 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -3429,8 +3429,6 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr
3429 return ret; 3429 return ret;
3430} 3430}
3431 3431
3432unsigned int *InstLength;
3433
3434enum { 3432enum {
3435 KEEP_GOING, 3433 KEEP_GOING,
3436 FETCH_EXCEPTION 3434 FETCH_EXCEPTION
@@ -3515,28 +3513,6 @@ translated:
3515 3513
3516#define LOG_IN_CLR skyeye_printf_in_color 3514#define LOG_IN_CLR skyeye_printf_in_color
3517 3515
3518int cmp(const void *x, const void *y) {
3519 return *(unsigned long long int*)x - *(unsigned long long int *)y;
3520}
3521
3522void InterpreterInitInstLength(unsigned long long int *ptr, size_t size) {
3523 int array_size = size / sizeof(void *);
3524 unsigned long long int *InstLabel = new unsigned long long int[array_size];
3525 memcpy(InstLabel, ptr, size);
3526 qsort(InstLabel, array_size, sizeof(void *), cmp);
3527 InstLength = new unsigned int[array_size - 4];
3528 for (int i = 0; i < array_size - 4; i++) {
3529 for (int j = 0; j < array_size; j++) {
3530 if (ptr[i] == InstLabel[j]) {
3531 InstLength[i] = InstLabel[j + 1] - InstLabel[j];
3532 break;
3533 }
3534 }
3535 }
3536 for (int i = 0; i < array_size - 4; i++)
3537 LOG_DEBUG(Core_ARM11, "[%d]:%d", i, InstLength[i]);
3538}
3539
3540int clz(unsigned int x) { 3516int clz(unsigned int x) {
3541 int n; 3517 int n;
3542 if (x == 0) return (32); 3518 if (x == 0) return (32);
@@ -6564,9 +6540,6 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
6564 } 6540 }
6565 INIT_INST_LENGTH: 6541 INIT_INST_LENGTH:
6566 { 6542 {
6567#if defined __GNUC__ || defined __clang__
6568 InterpreterInitInstLength((unsigned long long int *)InstLabel, sizeof(InstLabel));
6569#endif
6570 cpu->NumInstrsToExecute = 0; 6543 cpu->NumInstrsToExecute = 0;
6571 return num_instrs; 6544 return num_instrs;
6572 } 6545 }