diff options
author | bunnei <bunneidev@gmail.com> | 2015-02-12 19:24:15 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-02-12 19:24:15 +0100 |
commit | ea54355d95e8b1b9afaffa3899b86db40992db6a (patch) | |
tree | ffa45a6357978ab4ea387ff6287b26a17408fcfe | |
parent | Merge pull request #563 from lioncash/ext (diff) | |
parent | arm: Remove ARMul_EmulateInit (diff) | |
download | yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar.gz yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar.bz2 yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar.lz yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar.xz yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.tar.zst yuzu-ea54355d95e8b1b9afaffa3899b86db40992db6a.zip |
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom.cpp | 7 | ||||
-rw-r--r-- | src/core/arm/interpreter/arminit.cpp | 40 | ||||
-rw-r--r-- | src/core/arm/skyeye_common/armdefs.h | 1 | ||||
-rw-r--r-- | src/core/arm/skyeye_common/armemu.h | 8 |
4 files changed, 1 insertions, 55 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index 1977112dd..c4af85242 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp @@ -18,10 +18,7 @@ const static cpu_config_t s_arm11_cpu_info = { ARM_DynCom::ARM_DynCom() { state = std::unique_ptr<ARMul_State>(new ARMul_State); - ARMul_EmulateInit(); - memset(state.get(), 0, sizeof(ARMul_State)); - - ARMul_NewState((ARMul_State*)state.get()); + ARMul_NewState(state.get()); state->abort_model = ABORT_BASE_RESTORED; state->cpu = (cpu_config_t*)&s_arm11_cpu_info; @@ -41,8 +38,6 @@ ARM_DynCom::ARM_DynCom() { state->NirqSig = HIGH; VFPInit(state.get()); // Initialize the VFP - - ARMul_EmulateInit(); } ARM_DynCom::~ARM_DynCom() { diff --git a/src/core/arm/interpreter/arminit.cpp b/src/core/arm/interpreter/arminit.cpp index e7545728e..0c0ce6c91 100644 --- a/src/core/arm/interpreter/arminit.cpp +++ b/src/core/arm/interpreter/arminit.cpp @@ -19,46 +19,6 @@ #include "core/arm/skyeye_common/armemu.h" /***************************************************************************\ -* Definitions for the emulator architecture * -\***************************************************************************/ - -void ARMul_EmulateInit(); -ARMul_State* ARMul_NewState(ARMul_State* state); -void ARMul_Reset (ARMul_State* state); - -unsigned ARMul_MultTable[32] = { - 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, - 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16 -}; -ARMword ARMul_ImmedTable[4096]; // immediate DP LHS values -char ARMul_BitList[256]; // number of bits in a byte table - -/***************************************************************************\ -* Call this routine once to set up the emulator's tables. * -\***************************************************************************/ -void ARMul_EmulateInit() -{ - unsigned int i, j; - - // the values of 12 bit dp rhs's - for (i = 0; i < 4096; i++) { - ARMul_ImmedTable[i] = ROTATER (i & 0xffL, (i >> 7L) & 0x1eL); - } - - // how many bits in LSM - for (i = 0; i < 256; ARMul_BitList[i++] = 0); - for (j = 1; j < 256; j <<= 1) - for (i = 0; i < 256; i++) - if ((i & j) > 0) - ARMul_BitList[i]++; - - // you always need 4 times these values - for (i = 0; i < 256; i++) - ARMul_BitList[i] *= 4; - -} - -/***************************************************************************\ * Returns a new instantiation of the ARMulator's state * \***************************************************************************/ ARMul_State* ARMul_NewState(ARMul_State* state) diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index a827184fc..02f54f385 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h @@ -294,7 +294,6 @@ enum { /***************************************************************************\ * Definitons of things in the emulator * \***************************************************************************/ -extern void ARMul_EmulateInit(); extern void ARMul_Reset(ARMul_State* state); extern ARMul_State* ARMul_NewState(ARMul_State* state); diff --git a/src/core/arm/skyeye_common/armemu.h b/src/core/arm/skyeye_common/armemu.h index 5d4c06837..2467f4319 100644 --- a/src/core/arm/skyeye_common/armemu.h +++ b/src/core/arm/skyeye_common/armemu.h @@ -95,14 +95,6 @@ enum { #define FLUSHPIPE state->NextInstr |= PRIMEPIPE -// Macro to rotate n right by b bits. -#define ROTATER(n, b) (((n) >> (b)) | ((n) << (32 - (b)))) - -// Stuff that is shared across modes. -extern unsigned ARMul_MultTable[]; // Number of I cycles for a mult. -extern ARMword ARMul_ImmedTable[]; // Immediate DP LHS values. -extern char ARMul_BitList[]; // Number of bits in a byte table. - // Coprocessor support functions. extern void ARMul_CoProInit(ARMul_State*); extern void ARMul_CoProExit(ARMul_State*); |