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 c5e885bcd..bc55a082f 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -3443,8 +3443,6 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr
3443 return ret; 3443 return ret;
3444} 3444}
3445 3445
3446unsigned int *InstLength;
3447
3448enum { 3446enum {
3449 KEEP_GOING, 3447 KEEP_GOING,
3450 FETCH_EXCEPTION 3448 FETCH_EXCEPTION
@@ -3529,28 +3527,6 @@ translated:
3529 3527
3530#define LOG_IN_CLR skyeye_printf_in_color 3528#define LOG_IN_CLR skyeye_printf_in_color
3531 3529
3532int cmp(const void *x, const void *y) {
3533 return *(unsigned long long int*)x - *(unsigned long long int *)y;
3534}
3535
3536void InterpreterInitInstLength(unsigned long long int *ptr, size_t size) {
3537 int array_size = size / sizeof(void *);
3538 unsigned long long int *InstLabel = new unsigned long long int[array_size];
3539 memcpy(InstLabel, ptr, size);
3540 qsort(InstLabel, array_size, sizeof(void *), cmp);
3541 InstLength = new unsigned int[array_size - 4];
3542 for (int i = 0; i < array_size - 4; i++) {
3543 for (int j = 0; j < array_size; j++) {
3544 if (ptr[i] == InstLabel[j]) {
3545 InstLength[i] = InstLabel[j + 1] - InstLabel[j];
3546 break;
3547 }
3548 }
3549 }
3550 for (int i = 0; i < array_size - 4; i++)
3551 LOG_DEBUG(Core_ARM11, "[%d]:%d", i, InstLength[i]);
3552}
3553
3554int clz(unsigned int x) { 3530int clz(unsigned int x) {
3555 int n; 3531 int n;
3556 if (x == 0) return (32); 3532 if (x == 0) return (32);
@@ -6593,9 +6569,6 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
6593 } 6569 }
6594 INIT_INST_LENGTH: 6570 INIT_INST_LENGTH:
6595 { 6571 {
6596#if defined __GNUC__ || defined __clang__
6597 InterpreterInitInstLength((unsigned long long int *)InstLabel, sizeof(InstLabel));
6598#endif
6599 cpu->NumInstrsToExecute = 0; 6572 cpu->NumInstrsToExecute = 0;
6600 return num_instrs; 6573 return num_instrs;
6601 } 6574 }