diff options
| author | 2015-04-06 12:43:23 -0400 | |
|---|---|---|
| committer | 2015-04-06 12:48:35 -0400 | |
| commit | b7b8b676202eaeced392dea06e2c3fcc4bd11aec (patch) | |
| tree | b104bd34e6fd7eb109fc7591f383623e877078ad /src/core/arm/skyeye_common | |
| parent | dyncom: Properly return the value of the user RO thread register (diff) | |
| download | yuzu-b7b8b676202eaeced392dea06e2c3fcc4bd11aec.tar.gz yuzu-b7b8b676202eaeced392dea06e2c3fcc4bd11aec.tar.xz yuzu-b7b8b676202eaeced392dea06e2c3fcc4bd11aec.zip | |
Move CP15 enum definitions into their own enum.
Also gets rid of preprocessor mumbo-jumbo
Diffstat (limited to 'src/core/arm/skyeye_common')
| -rw-r--r-- | src/core/arm/skyeye_common/arm_regformat.h | 40 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/armdefs.h | 2 |
2 files changed, 19 insertions, 23 deletions
diff --git a/src/core/arm/skyeye_common/arm_regformat.h b/src/core/arm/skyeye_common/arm_regformat.h index c232376e0..d125dc2fc 100644 --- a/src/core/arm/skyeye_common/arm_regformat.h +++ b/src/core/arm/skyeye_common/arm_regformat.h | |||
| @@ -51,17 +51,23 @@ enum { | |||
| 51 | EXCLUSIVE_STATE, | 51 | EXCLUSIVE_STATE, |
| 52 | EXCLUSIVE_RESULT, | 52 | EXCLUSIVE_RESULT, |
| 53 | 53 | ||
| 54 | // VFP registers | ||
| 55 | VFP_BASE, | ||
| 56 | VFP_FPSID = VFP_BASE, | ||
| 57 | VFP_FPSCR, | ||
| 58 | VFP_FPEXC, | ||
| 59 | |||
| 60 | MAX_REG_NUM, | ||
| 61 | }; | ||
| 62 | |||
| 63 | enum CP15Register { | ||
| 54 | // c0 - Information registers | 64 | // c0 - Information registers |
| 55 | CP15_BASE, | 65 | CP15_MAIN_ID, |
| 56 | CP15_C0 = CP15_BASE, | ||
| 57 | CP15_C0_C0 = CP15_C0, | ||
| 58 | CP15_MAIN_ID = CP15_C0_C0, | ||
| 59 | CP15_CACHE_TYPE, | 66 | CP15_CACHE_TYPE, |
| 60 | CP15_TCM_STATUS, | 67 | CP15_TCM_STATUS, |
| 61 | CP15_TLB_TYPE, | 68 | CP15_TLB_TYPE, |
| 62 | CP15_CPU_ID, | 69 | CP15_CPU_ID, |
| 63 | CP15_C0_C1, | 70 | CP15_PROCESSOR_FEATURE_0, |
| 64 | CP15_PROCESSOR_FEATURE_0 = CP15_C0_C1, | ||
| 65 | CP15_PROCESSOR_FEATURE_1, | 71 | CP15_PROCESSOR_FEATURE_1, |
| 66 | CP15_DEBUG_FEATURE_0, | 72 | CP15_DEBUG_FEATURE_0, |
| 67 | CP15_AUXILIARY_FEATURE_0, | 73 | CP15_AUXILIARY_FEATURE_0, |
| @@ -69,24 +75,19 @@ enum { | |||
| 69 | CP15_MEMORY_MODEL_FEATURE_1, | 75 | CP15_MEMORY_MODEL_FEATURE_1, |
| 70 | CP15_MEMORY_MODEL_FEATURE_2, | 76 | CP15_MEMORY_MODEL_FEATURE_2, |
| 71 | CP15_MEMORY_MODEL_FEATURE_3, | 77 | CP15_MEMORY_MODEL_FEATURE_3, |
| 72 | CP15_C0_C2, | 78 | CP15_ISA_FEATURE_0, |
| 73 | CP15_ISA_FEATURE_0 = CP15_C0_C2, | ||
| 74 | CP15_ISA_FEATURE_1, | 79 | CP15_ISA_FEATURE_1, |
| 75 | CP15_ISA_FEATURE_2, | 80 | CP15_ISA_FEATURE_2, |
| 76 | CP15_ISA_FEATURE_3, | 81 | CP15_ISA_FEATURE_3, |
| 77 | CP15_ISA_FEATURE_4, | 82 | CP15_ISA_FEATURE_4, |
| 78 | 83 | ||
| 79 | // c1 - Control registers | 84 | // c1 - Control registers |
| 80 | CP15_C1_C0, | 85 | CP15_CONTROL, |
| 81 | CP15_CONTROL = CP15_C1_C0, | ||
| 82 | CP15_AUXILIARY_CONTROL, | 86 | CP15_AUXILIARY_CONTROL, |
| 83 | CP15_COPROCESSOR_ACCESS_CONTROL, | 87 | CP15_COPROCESSOR_ACCESS_CONTROL, |
| 84 | 88 | ||
| 85 | // c2 - Translation table registers | 89 | // c2 - Translation table registers |
| 86 | CP15_C2, | 90 | CP15_TRANSLATION_BASE_TABLE_0, |
| 87 | CP15_C2_C0 = CP15_C2, | ||
| 88 | CP15_TRANSLATION_BASE = CP15_C2_C0, | ||
| 89 | CP15_TRANSLATION_BASE_TABLE_0 = CP15_TRANSLATION_BASE, | ||
| 90 | CP15_TRANSLATION_BASE_TABLE_1, | 91 | CP15_TRANSLATION_BASE_TABLE_1, |
| 91 | CP15_TRANSLATION_BASE_CONTROL, | 92 | CP15_TRANSLATION_BASE_CONTROL, |
| 92 | CP15_DOMAIN_ACCESS_CONTROL, | 93 | CP15_DOMAIN_ACCESS_CONTROL, |
| @@ -171,14 +172,9 @@ enum { | |||
| 171 | CP15_TLB_FAULT_ADDR, | 172 | CP15_TLB_FAULT_ADDR, |
| 172 | CP15_TLB_FAULT_STATUS, | 173 | CP15_TLB_FAULT_STATUS, |
| 173 | 174 | ||
| 174 | // VFP registers | 175 | // Not an actual register. |
| 175 | VFP_BASE, | 176 | // All registers should be defined above this. |
| 176 | VFP_FPSID = VFP_BASE, | 177 | CP15_REGISTER_COUNT, |
| 177 | VFP_FPSCR, | ||
| 178 | VFP_FPEXC, | ||
| 179 | |||
| 180 | MAX_REG_NUM, | ||
| 181 | }; | 178 | }; |
| 182 | 179 | ||
| 183 | #define CP15(idx) (idx - CP15_BASE) | ||
| 184 | #define VFP_OFFSET(x) (x - VFP_BASE) | 180 | #define VFP_OFFSET(x) (x - VFP_BASE) |
diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index d5b0242c3..12fa533f7 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h | |||
| @@ -91,7 +91,7 @@ struct ARMul_State | |||
| 91 | ARMword exclusive_tag; // The address for which the local monitor is in exclusive access mode | 91 | ARMword exclusive_tag; // The address for which the local monitor is in exclusive access mode |
| 92 | ARMword exclusive_state; | 92 | ARMword exclusive_state; |
| 93 | ARMword exclusive_result; | 93 | ARMword exclusive_result; |
| 94 | ARMword CP15[VFP_BASE - CP15_BASE]; | 94 | ARMword CP15[CP15_REGISTER_COUNT]; |
| 95 | ARMword VFP[3]; // FPSID, FPSCR, and FPEXC | 95 | ARMword VFP[3]; // FPSID, FPSCR, and FPEXC |
| 96 | // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). | 96 | // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). |
| 97 | // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), | 97 | // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), |