1 struc PPC_CPU_State 2 dummy: 3 gpr: 4 fpr: 5 cr: 6 fpscr: 7 xer: 8 xer_ca: 9 lr: 10 ctr: 11 12 msr: 13 pvr: 14 15 ibatu: 16 ibatl: 17 ibat_bl17: 18 19 dbatu: 20 dbatl: 21 dbat_bl17: 22 23 sdr1: 24 25 sr: 26 27 dar: 28 dsisr: 29 sprg: 30 srr0: 31 srr1: 32 33 decr: 34 ear: 35 pir: 36 tb: 37 38 hid: 39 40 pc: 41 npc: 42 current_opc: 43 44 exception_pending: 45 dec_exception: 46 ext_exception: 47 stop_exception: 48 singlestep_ignore: 49 align1: 50 align2: 51 align3: 52 53 pagetable_base: 54 pagetable_hashmask: 55 reserve: 56 have_reservation: 57 58 tlb_last: 59 tlb_pa: 60 tlb_va: 61 62 effective_code_page: 63 physical_code_page: 64 pdec: 65 ptb: 66 67 temp: 68 temp2: 69 x87cw: 70 pc_ofs: 71 current_code_base: 72 endstruc 73 74 struc JITC 75 clientPages 76 77 tlb_code_0_eff 78 tlb_data_0_eff 79 tlb_data_8_eff 80 tlb_code_0_phys 81 tlb_data_0_phys 82 tlb_data_8_phys 83 tlb_code_0_hits 84 tlb_data_0_hits 85 tlb_data_8_hits 86 tlb_code_0_misses 87 tlb_data_0_misses 88 tlb_data_8_misses 89 90 nativeReg 91 92 nativeRegState 93 94 nativeFlags 95 96 nativeFlagsState 97 nativeCarryState 98 99 clientReg 100 101 nativeRegsList 102 103 LRUreg 104 MRUreg 105 106 LRUpage 107 MRUpage 108 109 freeFragmentsList 110 111 freeClientPages 112 113 translationCache 114 endstruc 115 116 extern gCPU, gJITC, gMemory, gMemorySize, 117 extern jitc_error, ppc_isi_exception_asm, ppc_dsi_exception_asm 118 extern jitcDestroyAndFreeClientPage 119 extern io_mem_read_glue 120 extern io_mem_write_glue 121 extern io_mem_read64_glue 122 extern io_mem_write64_glue 123 extern io_mem_read128_glue 124 extern io_mem_write128_glue 125 extern io_mem_read128_native_glue 126 extern io_mem_write128_native_glue 127 global ppc_effective_to_physical_code, ppc_effective_to_physical_data 128 global ppc_write_effective_byte_asm 129 global ppc_write_effective_half_asm 130 global ppc_write_effective_word_asm 131 global ppc_write_effective_dword_asm 132 global ppc_write_effective_qword_asm 133 global ppc_write_effective_qword_sse_asm 134 global ppc_read_effective_byte_asm 135 global ppc_read_effective_half_z_asm 136 global ppc_read_effective_half_s_asm 137 global ppc_read_effective_word_asm 138 global ppc_read_effective_dword_asm 139 global ppc_read_effective_qword_asm 140 global ppc_read_effective_qword_sse_asm 141 global ppc_mmu_tlb_invalidate_all_asm 142 global ppc_mmu_tlb_invalidate_entry_asm 143 global ppc_opc_lswi_asm 144 global ppc_opc_stswi_asm 145 global ppc_opc_icbi_asm 146 147 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 148 ;; 149 ppc_mmu_tlb_invalidate_all_asm: 150 mov edi, gJITC+tlb_code_0_eff 151 152 ppc_mmu_tlb_invalidate_entry_asm: 153 154 ppc_pte_protection: 155 156 %macro bat_lookup 4 157 %%npr: 158 %%ok: 159 %%bat_lookup_failed: 160 %endmacro 161 162 %macro pg_table_lookup 3 163 %%invalid: 164 %endmacro 165 166 protection_fault_0_code: 167 protection_fault_0_data: 168 protection_fault_8_data: 169 170 %macro tlb_lookup 2 171 %%tlb_lookup_failed: 172 %endmacro 173 174 ppc_effective_to_physical_code_ret: 175 ppc_effective_to_physical_code: 176 tlb_lookup 0, code 177 178 bat_lookup i, 0, 0, code 179 bat_lookup i, 1, 0, code 180 bat_lookup i, 2, 0, code 181 bat_lookup i, 3, 0, code 182 183 pg_table_lookup 0, 0, code 184 pg_table_lookup 0, 0, code 185 pg_table_lookup 0, 0, code 186 pg_table_lookup 0, 0, code 187 pg_table_lookup 0, 0, code 188 pg_table_lookup 0, 0, code 189 pg_table_lookup 0, 0, code 190 pg_table_lookup 0, 0, code 191 192 pg_table_lookup (1<<6), 0, code 193 pg_table_lookup (1<<6), 0, code 194 pg_table_lookup (1<<6), 0, code 195 pg_table_lookup (1<<6), 0, code 196 pg_table_lookup (1<<6), 0, code 197 pg_table_lookup (1<<6), 0, code 198 pg_table_lookup (1<<6), 0, code 199 pg_table_lookup (1<<6), 0, code 200 201 .noexec: 202 ppc_effective_to_physical_data_read_ret: 203 ppc_effective_to_physical_data_read: 204 tlb_lookup 0, data 205 206 bat_lookup d, 0, 0, data 207 bat_lookup d, 1, 0, data 208 bat_lookup d, 2, 0, data 209 bat_lookup d, 3, 0, data 210 211 pg_table_lookup 0, 0, data 212 pg_table_lookup 0, 0, data 213 pg_table_lookup 0, 0, data 214 pg_table_lookup 0, 0, data 215 pg_table_lookup 0, 0, data 216 pg_table_lookup 0, 0, data 217 pg_table_lookup 0, 0, data 218 pg_table_lookup 0, 0, data 219 220 pg_table_lookup (1<<6), 0, data 221 pg_table_lookup (1<<6), 0, data 222 pg_table_lookup (1<<6), 0, data 223 pg_table_lookup (1<<6), 0, data 224 pg_table_lookup (1<<6), 0, data 225 pg_table_lookup (1<<6), 0, data 226 pg_table_lookup (1<<6), 0, data 227 pg_table_lookup (1<<6), 0, data 228 229 ppc_effective_to_physical_data_write_ret: 230 ppc_effective_to_physical_data_write: 231 tlb_lookup 8, data 232 233 bat_lookup d, 0, 8, data 234 bat_lookup d, 1, 8, data 235 bat_lookup d, 2, 8, data 236 bat_lookup d, 3, 8, data 237 238 pg_table_lookup 0, 8, data 239 pg_table_lookup 0, 8, data 240 pg_table_lookup 0, 8, data 241 pg_table_lookup 0, 8, data 242 pg_table_lookup 0, 8, data 243 pg_table_lookup 0, 8, data 244 pg_table_lookup 0, 8, data 245 pg_table_lookup 0, 8, data 246 247 pg_table_lookup (1<<6), 8, data 248 pg_table_lookup (1<<6), 8, data 249 pg_table_lookup (1<<6), 8, data 250 pg_table_lookup (1<<6), 8, data 251 pg_table_lookup (1<<6), 8, data 252 pg_table_lookup (1<<6), 8, data 253 pg_table_lookup (1<<6), 8, data 254 pg_table_lookup (1<<6), 8, data 255 256 ppc_write_effective_byte_asm: 257 .mmio: 258 ppc_write_effective_half_asm: 259 .mmio: 260 .overlap: 261 .overlapped_mmio_1_back: 262 .overlapped_mmio_1: 263 .overlapped_mmio_2: 264 ppc_write_effective_word_asm: 265 .mmio: 266 .overlap: 267 .loop1: 268 .overlapped_mmio_1_back: 269 .loop2: 270 .overlapped_mmio_1: 271 .overlapped_mmio_1_loop: 272 .overlapped_mmio_2: 273 .overlapped_mmio_2_loop: 274 ppc_write_effective_dword_asm: 275 .mmio: 276 277 .overlap: 278 .loop1: 279 .overlapped_mmio_1_back: 280 .loop2: 281 .overlapped_mmio_1: 282 .overlapped_mmio_1_loop: 283 .overlapped_mmio_2: 284 .overlapped_mmio_2_loop: 285 ppc_write_effective_qword_asm: 286 .mmio: 287 288 ppc_write_effective_qword_sse_asm: 289 .mmio: 290 ppc_read_effective_byte_asm: 291 .mmio: 292 ppc_read_effective_half_z_asm: 293 .mmio: 294 .overlap: 295 .loop1: 296 .mmio1: 297 .mmio2: 298 ppc_read_effective_half_s_asm: 299 .mmio: 300 .overlap: 301 .loop1: 302 303 .mmio1: 304 .mmio2: 305 ppc_read_effective_word_asm: 306 .mmio: 307 .overlap: 308 .loop1: 309 .overlapped_mmio_1_back: 310 .loop2: 311 312 .overlapped_mmio_1: 313 .overlapped_mmio_1_loop: 314 .overlapped_mmio_2: 315 .overlapped_mmio_2_loop: 316 ppc_read_effective_dword_asm: 317 .mmio: 318 .overlap: 319 .loop1: 320 .overlapped_mmio_1_back: 321 .loop2: 322 323 .overlapped_mmio_1: 324 .overlapped_mmio_1_loop: 325 .overlapped_mmio_2: 326 .overlapped_mmio_2_loop: 327 ppc_read_effective_qword_asm: 328 .mmio: 329 330 ppc_read_effective_qword_sse_asm: 331 .mmio: 332 ppc_opc_stswi_asm: 333 .loop: 334 .ok1: 335 .back: 336 .mmio: 337 ppc_opc_lswi_asm: 338 .loop: 339 .ok1: 340 .back: 341 .loop2: 342 .ret: 343 .mmio: 344 ppc_opc_icbi_asm: 345 .destroy: 346 .ok: 347