diff options
| author | 2015-01-31 21:44:35 -0500 | |
|---|---|---|
| committer | 2015-01-31 21:55:34 -0500 | |
| commit | 3f00dd911780552c77575d3176860f576ebc0fdb (patch) | |
| tree | c80ea3a4035a20810fb5914f3bfc99f392376939 /src/core/arm/skyeye_common | |
| parent | Merge pull request #522 from lioncash/adios (diff) | |
| download | yuzu-3f00dd911780552c77575d3176860f576ebc0fdb.tar.gz yuzu-3f00dd911780552c77575d3176860f576ebc0fdb.tar.xz yuzu-3f00dd911780552c77575d3176860f576ebc0fdb.zip | |
arm: Clean up ARMul_State
Remove unnecessary/unused struct variables.
Diffstat (limited to 'src/core/arm/skyeye_common')
| -rw-r--r-- | src/core/arm/skyeye_common/armdefs.h | 181 |
1 files changed, 71 insertions, 110 deletions
diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index be54ce71b..778868783 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h | |||
| @@ -74,88 +74,69 @@ typedef unsigned ARMul_CPWrites(ARMul_State* state, unsigned reg, ARMword value) | |||
| 74 | #define VFP_REG_NUM 64 | 74 | #define VFP_REG_NUM 64 |
| 75 | struct ARMul_State | 75 | struct ARMul_State |
| 76 | { | 76 | { |
| 77 | ARMword Emulate; /* to start and stop emulation */ | 77 | ARMword Emulate; // To start and stop emulation |
| 78 | unsigned EndCondition; /* reason for stopping */ | 78 | unsigned EndCondition; // Reason for stopping |
| 79 | unsigned ErrorCode; /* type of illegal instruction */ | 79 | unsigned ErrorCode; // Type of illegal instruction |
| 80 | 80 | ||
| 81 | /* Order of the following register should not be modified */ | 81 | // Order of the following register should not be modified |
| 82 | ARMword Reg[16]; /* the current register file */ | 82 | ARMword Reg[16]; // The current register file |
| 83 | ARMword Cpsr; /* the current psr */ | 83 | ARMword Cpsr; // The current PSR |
| 84 | ARMword Spsr_copy; | 84 | ARMword Spsr_copy; |
| 85 | ARMword phys_pc; | 85 | ARMword phys_pc; |
| 86 | ARMword Reg_usr[2]; | 86 | ARMword Reg_usr[2]; |
| 87 | ARMword Reg_svc[2]; /* R13_SVC R14_SVC */ | 87 | ARMword Reg_svc[2]; // R13_SVC R14_SVC |
| 88 | ARMword Reg_abort[2]; /* R13_ABORT R14_ABORT */ | 88 | ARMword Reg_abort[2]; // R13_ABORT R14_ABORT |
| 89 | ARMword Reg_undef[2]; /* R13 UNDEF R14 UNDEF */ | 89 | ARMword Reg_undef[2]; // R13 UNDEF R14 UNDEF |
| 90 | ARMword Reg_irq[2]; /* R13_IRQ R14_IRQ */ | 90 | ARMword Reg_irq[2]; // R13_IRQ R14_IRQ |
| 91 | ARMword Reg_firq[7]; /* R8---R14 FIRQ */ | 91 | ARMword Reg_firq[7]; // R8---R14 FIRQ |
| 92 | ARMword Spsr[7]; /* the exception psr's */ | 92 | ARMword Spsr[7]; // The exception psr's |
| 93 | ARMword Mode; /* the current mode */ | 93 | ARMword Mode; // The current mode |
| 94 | ARMword Bank; /* the current register bank */ | 94 | ARMword Bank; // The current register bank |
| 95 | ARMword exclusive_tag; /* the address for which the local monitor is in exclusive access mode */ | 95 | ARMword exclusive_tag; // The address for which the local monitor is in exclusive access mode |
| 96 | ARMword exclusive_state; | 96 | ARMword exclusive_state; |
| 97 | ARMword exclusive_result; | 97 | ARMword exclusive_result; |
| 98 | ARMword CP15[VFP_BASE - CP15_BASE]; | 98 | ARMword CP15[VFP_BASE - CP15_BASE]; |
| 99 | ARMword VFP[3]; /* FPSID, FPSCR, and FPEXC */ | 99 | ARMword VFP[3]; // FPSID, FPSCR, and FPEXC |
| 100 | /* VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). | 100 | // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). |
| 101 | VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), | 101 | // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), |
| 102 | and only 32 singleword registers are accessible (S0-S31). */ | 102 | // and only 32 singleword registers are accessible (S0-S31). |
| 103 | ARMword ExtReg[VFP_REG_NUM]; | 103 | ARMword ExtReg[VFP_REG_NUM]; |
| 104 | /* ---- End of the ordered registers ---- */ | 104 | /* ---- End of the ordered registers ---- */ |
| 105 | 105 | ||
| 106 | ARMword RegBank[7][16]; /* all the registers */ | 106 | ARMword RegBank[7][16]; // all the registers |
| 107 | //chy:2003-08-19, used in arm xscale | 107 | |
| 108 | /* 40 bit accumulator. We always keep this 64 bits wide, | 108 | ARMword NFlag, ZFlag, CFlag, VFlag, IFFlags; // Dummy flags for speed |
| 109 | and move only 40 bits out of it in an MRA insn. */ | ||
| 110 | ARMdword Accumulator; | ||
| 111 | |||
| 112 | ARMword NFlag, ZFlag, CFlag, VFlag, IFFlags; /* dummy flags for speed */ | ||
| 113 | unsigned long long int icounter, debug_icounter, kernel_icounter; | ||
| 114 | unsigned int shifter_carry_out; | 109 | unsigned int shifter_carry_out; |
| 115 | 110 | ||
| 116 | /* add armv6 flags dyf:2010-08-09 */ | 111 | // Add armv6 flags dyf:2010-08-09 |
| 117 | ARMword GEFlag, EFlag, AFlag, QFlag; | 112 | ARMword GEFlag, EFlag, AFlag, QFlag; |
| 118 | //chy:2003-08-19, used in arm v5e|xscale | 113 | |
| 119 | ARMword SFlag; | ||
| 120 | #ifdef MODET | 114 | #ifdef MODET |
| 121 | ARMword TFlag; /* Thumb state */ | 115 | ARMword TFlag; // Thumb state |
| 122 | #endif | 116 | #endif |
| 123 | ARMword instr, pc, temp; /* saved register state */ | ||
| 124 | ARMword loaded, decoded; /* saved pipeline state */ | ||
| 125 | //chy 2006-04-12 for ICE breakpoint | ||
| 126 | ARMword loaded_addr, decoded_addr; /* saved pipeline state addr*/ | ||
| 127 | unsigned int NumScycles, NumNcycles, NumIcycles, NumCcycles, NumFcycles; /* emulated cycles used */ | ||
| 128 | unsigned long long NumInstrs; /* the number of instructions executed */ | ||
| 129 | unsigned NumInstrsToExecute; | ||
| 130 | 117 | ||
| 131 | ARMword currentexaddr; | 118 | unsigned long long NumInstrs; // The number of instructions executed |
| 132 | ARMword currentexval; | 119 | unsigned NumInstrsToExecute; |
| 133 | ARMword currentexvald; | ||
| 134 | ARMword servaddr; | ||
| 135 | 120 | ||
| 136 | unsigned NextInstr; | 121 | unsigned NextInstr; |
| 137 | unsigned VectorCatch; /* caught exception mask */ | 122 | unsigned VectorCatch; // Caught exception mask |
| 138 | unsigned CallDebug; /* set to call the debugger */ | 123 | |
| 139 | unsigned CanWatch; /* set by memory interface if its willing to suffer the | 124 | ARMul_CPInits* CPInit[16]; // Coprocessor initialisers |
| 140 | overhead of checking for watchpoints on each memory | 125 | ARMul_CPExits* CPExit[16]; // Coprocessor finalisers |
| 141 | access */ | 126 | ARMul_LDCs* LDC[16]; // LDC instruction |
| 142 | 127 | ARMul_STCs* STC[16]; // STC instruction | |
| 143 | ARMul_CPInits *CPInit[16]; /* coprocessor initialisers */ | 128 | ARMul_MRCs* MRC[16]; // MRC instruction |
| 144 | ARMul_CPExits *CPExit[16]; /* coprocessor finalisers */ | 129 | ARMul_MCRs* MCR[16]; // MCR instruction |
| 145 | ARMul_LDCs *LDC[16]; /* LDC instruction */ | 130 | ARMul_MRRCs* MRRC[16]; // MRRC instruction |
| 146 | ARMul_STCs *STC[16]; /* STC instruction */ | 131 | ARMul_MCRRs* MCRR[16]; // MCRR instruction |
| 147 | ARMul_MRCs *MRC[16]; /* MRC instruction */ | 132 | ARMul_CDPs* CDP[16]; // CDP instruction |
| 148 | ARMul_MCRs *MCR[16]; /* MCR instruction */ | 133 | ARMul_CPReads* CPRead[16]; // Read CP register |
| 149 | ARMul_MRRCs *MRRC[16]; /* MRRC instruction */ | 134 | ARMul_CPWrites* CPWrite[16]; // Write CP register |
| 150 | ARMul_MCRRs *MCRR[16]; /* MCRR instruction */ | 135 | unsigned char* CPData[16]; // Coprocessor data |
| 151 | ARMul_CDPs *CDP[16]; /* CDP instruction */ | 136 | unsigned char const* CPRegWords[16]; // Map of coprocessor register sizes |
| 152 | ARMul_CPReads *CPRead[16]; /* Read CP register */ | 137 | |
| 153 | ARMul_CPWrites *CPWrite[16]; /* Write CP register */ | 138 | unsigned Debug; // Show instructions as they are executed |
| 154 | unsigned char *CPData[16]; /* Coprocessor data */ | 139 | unsigned NresetSig; // Reset the processor |
| 155 | unsigned char const *CPRegWords[16]; /* map of coprocessor register sizes */ | ||
| 156 | |||
| 157 | unsigned Debug; /* show instructions as they are executed */ | ||
| 158 | unsigned NresetSig; /* reset the processor */ | ||
| 159 | unsigned NfiqSig; | 140 | unsigned NfiqSig; |
| 160 | unsigned NirqSig; | 141 | unsigned NirqSig; |
| 161 | 142 | ||
| @@ -199,54 +180,34 @@ So, if lateabtSig=1, then it means Late Abort Model(Base Updated Abort Model) | |||
| 199 | */ | 180 | */ |
| 200 | unsigned lateabtSig; | 181 | unsigned lateabtSig; |
| 201 | 182 | ||
| 202 | ARMword Vector; /* synthesize aborts in cycle modes */ | 183 | ARMword Vector; // Synthesize aborts in cycle modes |
| 203 | ARMword Aborted; /* sticky flag for aborts */ | 184 | ARMword Aborted; // Sticky flag for aborts |
| 204 | ARMword Reseted; /* sticky flag for Reset */ | 185 | ARMword Reseted; // Sticky flag for Reset |
| 205 | ARMword Inted, LastInted; /* sticky flags for interrupts */ | 186 | ARMword Inted, LastInted; // Sticky flags for interrupts |
| 206 | ARMword Base; /* extra hand for base writeback */ | 187 | ARMword Base; // Extra hand for base writeback |
| 207 | ARMword AbortAddr; /* to keep track of Prefetch aborts */ | 188 | ARMword AbortAddr; // To keep track of Prefetch aborts |
| 208 | 189 | ||
| 209 | int verbose; /* non-zero means print various messages like the banner */ | 190 | // For differentiating ARM core emulaiton. |
| 210 | 191 | bool is_v4; // Are we emulating a v4 architecture (or higher)? | |
| 211 | int mmu_inited; | 192 | bool is_v5; // Are we emulating a v5 architecture? |
| 212 | 193 | bool is_v5e; // Are we emulating a v5e architecture? | |
| 213 | //chy: 2003-08-11, for different arm core type | 194 | bool is_v6; // Are we emulating a v6 architecture? |
| 214 | unsigned is_v4; /* Are we emulating a v4 architecture (or higher) ? */ | 195 | bool is_v7; // Are we emulating a v7 architecture? |
| 215 | unsigned is_v5; /* Are we emulating a v5 architecture ? */ | 196 | bool is_XScale; // Are we emulating an XScale architecture? |
| 216 | unsigned is_v5e; /* Are we emulating a v5e architecture ? */ | 197 | bool is_iWMMXt; // Are we emulating an iWMMXt co-processor? |
| 217 | unsigned is_v6; /* Are we emulating a v6 architecture ? */ | 198 | bool is_ep9312; // Are we emulating a Cirrus Maverick co-processor? |
| 218 | unsigned is_v7; /* Are we emulating a v7 architecture ? */ | 199 | bool is_pxa27x; // Are we emulating a Intel PXA27x co-processor? |
| 219 | unsigned is_XScale; /* Are we emulating an XScale architecture ? */ | 200 | |
| 220 | unsigned is_iWMMXt; /* Are we emulating an iWMMXt co-processor ? */ | 201 | // ARM_ARM A2-18 |
| 221 | unsigned is_ep9312; /* Are we emulating a Cirrus Maverick co-processor ? */ | 202 | // 0 Base Restored Abort Model, 1 the Early Abort Model, 2 Base Updated Abort Model |
| 222 | unsigned is_pxa27x; /* Are we emulating a Intel PXA27x co-processor ? */ | 203 | int abort_model; |
| 223 | 204 | ||
| 224 | //chy: seems only used in xscale's CP14 | 205 | // Added by ksh in 2005-10-1 |
| 225 | ARMword CP14R0_CCD; /* used to count 64 clock cycles with CP14 R0 bit 3 set */ | 206 | cpu_config_t* cpu; |
| 226 | |||
| 227 | //teawater add for arm2x86 2005.07.05------------------------------------------- | ||
| 228 | //arm_arm A2-18 | ||
| 229 | int abort_model; //0 Base Restored Abort Model, 1 the Early Abort Model, 2 Base Updated Abort Model | ||
| 230 | |||
| 231 | /*added by ksh in 2005-10-1*/ | ||
| 232 | cpu_config_t *cpu; | ||
| 233 | |||
| 234 | /* added LPC remap function */ | ||
| 235 | int vector_remap_flag; | ||
| 236 | u32 vector_remap_addr; | ||
| 237 | u32 vector_remap_size; | ||
| 238 | |||
| 239 | u32 step; | ||
| 240 | u32 cycle; | ||
| 241 | |||
| 242 | /* monitored memory for exclusice access */ | ||
| 243 | ARMword exclusive_tag_array[128]; | ||
| 244 | /* 1 means exclusive access and 0 means open access */ | ||
| 245 | ARMword exclusive_access_state; | ||
| 246 | 207 | ||
| 247 | u32 CurrInstr; | 208 | u32 CurrInstr; |
| 248 | u32 last_pc; /* the last pc executed */ | 209 | u32 last_pc; // The last PC executed |
| 249 | u32 last_instr; /* the last inst executed */ | 210 | u32 last_instr; // The last instruction executed |
| 250 | u32 WriteAddr[17]; | 211 | u32 WriteAddr[17]; |
| 251 | u32 WriteData[17]; | 212 | u32 WriteData[17]; |
| 252 | u32 WritePc[17]; | 213 | u32 WritePc[17]; |