Commit graph

26 commits

Author SHA1 Message Date
Connor McLaughlin 21938e14c6 CPU/Recompiler: Implement block linking 2021-07-24 13:07:11 +10:00
Connor McLaughlin 033d85cd90 CPU/Recompiler: Simplify fast map addressing 2021-07-24 13:03:43 +10:00
Connor McLaughlin e382df0d41 Support expanding RAM to 8MB (dev console) 2021-05-03 12:43:33 +10:00
Connor McLaughlin f34a048009 CPU/CodeCache: Fall back constantly-modified blocks to interpreter
Partial fix for slowdown in Colin McRae Rally 2.0.
2021-04-27 02:56:57 +10:00
Connor McLaughlin bf5f53e1d1 CPU/CodeCache: Don't choke on indirect -> direct branch in delay slot 2021-03-06 02:21:27 +10:00
Connor McLaughlin c9240eea72 CPU/Recompiler: Use PGXP interpreter for fallback
Fixes holes in geometry with PGXP enabled in Threads of Fate.
2021-01-01 17:16:55 +10:00
Connor McLaughlin bf2e38aed5 CPU/Recompiler: Implement LUT-based fastmem 2020-11-24 14:49:21 +10:00
Connor McLaughlin 042bdd9c0c CPU/CodeCache: Fetch second delay slot from first branch for double branches 2020-11-19 00:40:02 +10:00
Connor McLaughlin a8171405b1 CPU/CodeCache: Fix incorrect invalidation on non-page-crossing DMA writes
Fixes recompiler mode for Breath of Fire III, probably others.
2020-10-29 01:30:00 +10:00
Connor McLaughlin 3fc9f264d7 CPUCodeCache: Fix extra page being invalidated on writing to edge 2020-10-22 11:08:57 +10:00
Connor McLaughlin 7566c45f64 CPU/Recompiler: Implement fastmem 2020-10-18 14:54:38 +10:00
Connor McLaughlin a6f8dde790 CPU/Recompiler: Faster ASM dispatcher 2020-10-18 14:54:38 +10:00
Connor McLaughlin 19d6037b99 CPU: Implement instruction cache simulation
Implemented for all execution modes. Disabled by default in the cached
interpreter and recompiler, always enabled in the pure interpreter.
2020-08-29 22:07:40 +10:00
Connor McLaughlin 2e9f656546 CPU: Implement PGXP CPU Mode
This is *very* slow. You don't want to enable it if you don't need it.
It is also incompatible with the recompiler and will disable it if the
option is enabled.
2020-08-20 00:49:39 +10:00
Connor McLaughlin b1377fe0d9 CPU/Recompiler: Add a fast block lookup array
Up to 15% perf improvement.
2020-08-08 23:06:28 +10:00
Connor McLaughlin b6f871d2b9
JIT optimizations and refactoring (#675)
* CPU/Recompiler: Use rel32 call where possible for no-args

* JitCodeBuffer: Support using preallocated buffer

* CPU/Recompiler/AArch64: Use bl instead of blr for short branches

* CPU/CodeCache: Allocate recompiler buffer in program space

This means we don't need 64-bit moves for every call out of the
recompiler.

* GTE: Don't store as u16 and load as u32

* CPU/Recompiler: Add methods to emit global load/stores

* GTE: Convert class to namespace

* CPU/Recompiler: Call GTE functions directly

* Settings: Turn into a global variable

* GPU: Replace local pointers with global

* InterruptController: Turn into a global pointer

* System: Replace local pointers with global

* Timers: Turn into a global instance

* DMA: Turn into a global instance

* SPU: Turn into a global instance

* CDROM: Turn into a global instance

* MDEC: Turn into a global instance

* Pad: Turn into a global instance

* SIO: Turn into a global instance

* CDROM: Move audio FIFO to the heap

* CPU/Recompiler: Drop ASMFunctions

No longer needed since we have code in the same 4GB window.

* CPUCodeCache: Turn class into namespace

* Bus: Local pointer -> global pointers

* CPU: Turn class into namespace

* Bus: Turn into namespace

* GTE: Store registers in CPU state struct

Allows relative addressing on ARM.

* CPU/Recompiler: Align code storage to page size

* CPU/Recompiler: Fix relative branches on A64

* HostInterface: Local references to global

* System: Turn into a namespace, move events out

* Add guard pages

* Android: Fix build
2020-07-31 17:09:18 +10:00
Connor McLaughlin 4655aa02f8 CPU/CodeCache: Fix uninitialized pointers 2020-04-20 12:35:57 +10:00
Connor McLaughlin aa52dbfeb8 CPU/Recompiler: Use register cache for managing pc
Reduces the number of loadstores after each instruction.
2019-12-12 23:55:23 +10:00
Connor McLaughlin f11d357ab9 Compile fixes for Android 2019-11-28 01:55:33 +10:00
Connor McLaughlin 889bd73ac8 CPU: Add settings for execution mode 2019-11-23 20:22:09 +10:00
Connor McLaughlin b8de55b9b8 CPU/Recompiler: Implement simple block linking 2019-11-23 19:56:19 +10:00
Connor McLaughlin 9e82afac7b CPU/Recompiler: Support block revalidation instead of flushing 2019-11-22 00:32:40 +10:00
Connor McLaughlin 7aafaeacbc CPU/Recompiler: Implement lb/lbu/lh/lhu/lw/sb/sh/sw instructions
Currently not passing CPU tests when combined with lwl/lwr.
2019-11-21 23:34:04 +10:00
Connor McLaughlin 9e3bb62216 CPU/CodeCache: Fast path for self-linking blocks 2019-11-20 01:19:03 +10:00
Connor McLaughlin 5217088d82 CPU: Refactor load delay handling
Now works when mixing interpreter and recompiler code.
2019-11-20 00:15:15 +10:00
Connor McLaughlin 1d6c4a3af1 CPU: Basic recompiler implementation for x64 (lui, ori, addiu)
Disabled by default.
2019-11-19 20:38:05 +10:00