diff options
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom.cpp | 3 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/armstate.h | 46 |
2 files changed, 1 insertions, 48 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index 3f93b4392..8d4a7dd98 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp | |||
| @@ -23,10 +23,7 @@ ARM_DynCom::ARM_DynCom(PrivilegeMode initial_mode) { | |||
| 23 | ARMul_NewState(state.get()); | 23 | ARMul_NewState(state.get()); |
| 24 | ARMul_SelectProcessor(state.get(), ARM_v6_Prop | ARM_v5_Prop | ARM_v5e_Prop); | 24 | ARMul_SelectProcessor(state.get(), ARM_v6_Prop | ARM_v5_Prop | ARM_v5e_Prop); |
| 25 | 25 | ||
| 26 | state->abort_model = ABORT_BASE_RESTORED; | ||
| 27 | |||
| 28 | state->bigendSig = LOW; | 26 | state->bigendSig = LOW; |
| 29 | state->lateabtSig = LOW; | ||
| 30 | state->NirqSig = HIGH; | 27 | state->NirqSig = HIGH; |
| 31 | 28 | ||
| 32 | // Reset the core to initial state | 29 | // Reset the core to initial state |
diff --git a/src/core/arm/skyeye_common/armstate.h b/src/core/arm/skyeye_common/armstate.h index f1af02210..0a165bcf0 100644 --- a/src/core/arm/skyeye_common/armstate.h +++ b/src/core/arm/skyeye_common/armstate.h | |||
| @@ -37,13 +37,6 @@ enum { | |||
| 37 | INSTCACHE = 2, | 37 | INSTCACHE = 2, |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | // Abort models | ||
| 41 | enum { | ||
| 42 | ABORT_BASE_RESTORED = 0, | ||
| 43 | ABORT_EARLY = 1, | ||
| 44 | ABORT_BASE_UPDATED = 2 | ||
| 45 | }; | ||
| 46 | |||
| 47 | #define VFP_REG_NUM 64 | 40 | #define VFP_REG_NUM 64 |
| 48 | struct ARMul_State | 41 | struct ARMul_State |
| 49 | { | 42 | { |
| @@ -96,50 +89,13 @@ struct ARMul_State | |||
| 96 | unsigned bigendSig; | 89 | unsigned bigendSig; |
| 97 | unsigned syscallSig; | 90 | unsigned syscallSig; |
| 98 | 91 | ||
| 99 | /* 2004-05-09 chy | 92 | // For differentiating ARM core emulation. |
| 100 | ---------------------------------------------------------- | ||
| 101 | read ARM Architecture Reference Manual | ||
| 102 | 2.6.5 Data Abort | ||
| 103 | There are three Abort Model in ARM arch. | ||
| 104 | |||
| 105 | Early Abort Model: used in some ARMv3 and earlier implementations. In this | ||
| 106 | model, base register wirteback occurred for LDC,LDM,STC,STM instructions, and | ||
| 107 | the base register was unchanged for all other instructions. (oldest) | ||
| 108 | |||
| 109 | Base Restored Abort Model: If a Data Abort occurs in an instruction which | ||
| 110 | specifies base register writeback, the value in the base register is | ||
| 111 | unchanged. (strongarm, xscale) | ||
| 112 | |||
| 113 | Base Updated Abort Model: If a Data Abort occurs in an instruction which | ||
| 114 | specifies base register writeback, the base register writeback still occurs. | ||
| 115 | (arm720T) | ||
| 116 | |||
| 117 | read PART B | ||
| 118 | chap2 The System Control Coprocessor CP15 | ||
| 119 | 2.4 Register1:control register | ||
| 120 | L(bit 6): in some ARMv3 and earlier implementations, the abort model of the | ||
| 121 | processor could be configured: | ||
| 122 | 0=early Abort Model Selected(now obsolete) | ||
| 123 | 1=Late Abort Model selceted(same as Base Updated Abort Model) | ||
| 124 | |||
| 125 | on later processors, this bit reads as 1 and ignores writes. | ||
| 126 | ------------------------------------------------------------- | ||
| 127 | So, if lateabtSig=1, then it means Late Abort Model(Base Updated Abort Model) | ||
| 128 | if lateabtSig=0, then it means Base Restored Abort Model | ||
| 129 | */ | ||
| 130 | unsigned lateabtSig; | ||
| 131 | |||
| 132 | // For differentiating ARM core emulaiton. | ||
| 133 | bool is_v4; // Are we emulating a v4 architecture (or higher)? | 93 | bool is_v4; // Are we emulating a v4 architecture (or higher)? |
| 134 | bool is_v5; // Are we emulating a v5 architecture? | 94 | bool is_v5; // Are we emulating a v5 architecture? |
| 135 | bool is_v5e; // Are we emulating a v5e architecture? | 95 | bool is_v5e; // Are we emulating a v5e architecture? |
| 136 | bool is_v6; // Are we emulating a v6 architecture? | 96 | bool is_v6; // Are we emulating a v6 architecture? |
| 137 | bool is_v7; // Are we emulating a v7 architecture? | 97 | bool is_v7; // Are we emulating a v7 architecture? |
| 138 | 98 | ||
| 139 | // ARM_ARM A2-18 | ||
| 140 | // 0 Base Restored Abort Model, 1 the Early Abort Model, 2 Base Updated Abort Model | ||
| 141 | int abort_model; | ||
| 142 | |||
| 143 | // TODO(bunnei): Move this cache to a better place - it should be per codeset (likely per | 99 | // TODO(bunnei): Move this cache to a better place - it should be per codeset (likely per |
| 144 | // process for our purposes), not per ARMul_State (which tracks CPU core state). | 100 | // process for our purposes), not per ARMul_State (which tracks CPU core state). |
| 145 | std::unordered_map<u32, int> instruction_cache; | 101 | std::unordered_map<u32, int> instruction_cache; |