summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2015-07-25 21:31:47 -0400
committerGravatar Lioncash2015-07-25 22:10:53 -0400
commit3257d797e1f981be0fea87942443ff25fe841e03 (patch)
treee0a111b43246f728aa3717c17e2593d7d04eef80
parentdyncom: Rename armdefs.h to armstate.h (diff)
downloadyuzu-3257d797e1f981be0fea87942443ff25fe841e03.tar.gz
yuzu-3257d797e1f981be0fea87942443ff25fe841e03.tar.xz
yuzu-3257d797e1f981be0fea87942443ff25fe841e03.zip
dyncom: Remove unnecessary abort-related cruft
Both the MPCore and the ARM9 have the same data abort model (base restored), so differentiating isn't necessary.
-rw-r--r--src/core/arm/dyncom/arm_dyncom.cpp3
-rw-r--r--src/core/arm/skyeye_common/armstate.h46
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
41enum {
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
48struct ARMul_State 41struct 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----------------------------------------------------------
101read ARM Architecture Reference Manual
1022.6.5 Data Abort
103There are three Abort Model in ARM arch.
104
105Early Abort Model: used in some ARMv3 and earlier implementations. In this
106model, base register wirteback occurred for LDC,LDM,STC,STM instructions, and
107the base register was unchanged for all other instructions. (oldest)
108
109Base Restored Abort Model: If a Data Abort occurs in an instruction which
110specifies base register writeback, the value in the base register is
111unchanged. (strongarm, xscale)
112
113Base Updated Abort Model: If a Data Abort occurs in an instruction which
114specifies base register writeback, the base register writeback still occurs.
115(arm720T)
116
117read PART B
118chap2 The System Control Coprocessor CP15
1192.4 Register1:control register
120L(bit 6): in some ARMv3 and earlier implementations, the abort model of the
121processor could be configured:
1220=early Abort Model Selected(now obsolete)
1231=Late Abort Model selceted(same as Base Updated Abort Model)
124
125on later processors, this bit reads as 1 and ignores writes.
126-------------------------------------------------------------
127So, 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;