Commit graph

23 commits

Author SHA1 Message Date
Connor McLaughlin b7fbde31a7 Move utility classes from common to own static lib 2022-07-21 17:29:58 +10:00
Connor McLaughlin 6251894d3c Common/JitCodeBuffer: Add ability to reserve non-code space 2021-07-11 15:20:38 +10:00
Connor McLaughlin 03ab18909a Common: Add UWP support for helper classes 2021-07-11 15:20:38 +10:00
Connor McLaughlin 911e9a37f1 WIN32 macro -> _WIN32 2021-06-30 14:38:07 +10:00
Connor McLaughlin 2ac6f60bbb Rename cpu_detect.h to platform.h and add OS 2021-04-04 13:01:43 +10:00
Connor McLaughlin 5bbbb8d3d5 CPU/Recompiler: Use MAP_JIT for code space on Apple Silicon 2021-03-19 18:47:31 +10:00
Connor McLaughlin 627f147a90 Support compiling for FreeBSD 2021-03-07 19:35:02 +10:00
Connor McLaughlin f5ccb6ea60 CPU: Fall back to mmap'ed buffer if reprotecting code space fails 2020-12-06 18:13:07 +10:00
Connor McLaughlin dba42cf323 Common/CPUDetect: Use consistant naming for ARM targets 2020-11-21 18:39:03 +10:00
kwyxz 31695c4ff7
Haiku port of duckstation libretro core (#716)
* Haiku build 1st attempt

* fix load on Haiku

* Removed debugging flags

* Added a couple ifndef
2020-08-22 13:20:37 +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 23c8a5588d Add macOS to some Linux/Android-only-isms 2020-02-14 22:58:18 +09:00
Connor McLaughlin 71c1e243fe Remove YBaseLib dependency 2020-01-10 13:40:53 +10:00
Connor McLaughlin 9f45c67b1d JitCodeBuffer: Fix compilation on AArch64 2019-12-27 20:38:07 +10:00
Connor McLaughlin ad93d83421 JitCodeBuffer: Don't leak code space on Windows 2019-12-21 22:09:08 +10:00
Connor McLaughlin decf416aee JitCodeBuffer: Expose FlushInstructionCache() to callers 2019-12-20 21:55:25 +10:00
Connor McLaughlin 1de096224c JitCodeBuffer: Fix far code pointer not being initialized without reset 2019-12-20 21:55:21 +10:00
Connor McLaughlin 2c645d9e93 JitCodeBuffer: Use __builtin___clear_cache instead of __clear_cache
The former exists on Android.
2019-12-04 20:33:02 +10:00
Connor McLaughlin f49216f5f8 CPU/Recompiler: Implement most instructions for AArch64 2019-12-04 01:50:59 +10:00
Connor McLaughlin 98e67616ec JitCodeBuffer: Flush cache after committing code on ARM CPUs
ARM's instruction and data caches are not coherent, so we need to flush
before executing to ensure there's no stale data left over.
2019-12-03 20:21:32 +10:00
Connor McLaughlin 897e75fa8e CPU/Recompiler: Fix code generation crash on Linux 2019-11-23 21:38:38 +10:00
Connor McLaughlin 11966e4caf CPU/Recompiler: Write exception exits to far code buffer
Keeps the hot path nice and clean.
2019-11-22 18:01:28 +10:00
Connor McLaughlin 2149ab4d69 Initial commit 2019-09-11 14:00:42 +10:00