Commit graph

829 commits

Author SHA1 Message Date
2f01c69710 LRU Cache Refactor with Thread-Safety (#199)
The cache is now thread-safe using std::shared_mutex, allowing concurrent reads without blocking and some other minor things to better maintenance

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/199
Co-authored-by: MrPurple666 <mrpurple666@noreply.localhost>
Co-committed-by: MrPurple666 <mrpurple666@noreply.localhost>
2025-06-21 19:32:32 +00:00
bb2f527b16 Use a different approach for the LRU toggle 2025-04-30 16:11:15 -03:00
b5bec371ae Add toggle for LRU 2025-04-30 04:05:45 -03:00
EmulationEnjoyer
e6d0c5ea42 arm: Skip duplicate consecutive addresses in backtrace output
ref: aa56430f2a
2025-04-19 17:56:48 -03:00
be4bc3b477 WIP: DO-NOT-MERGE: NCE experiments: Better Pre-Fetch implementation
should make it more performatic as in use with new lru cache implmentation
2025-04-12 22:54:32 -03:00
739e5c47ea WIP: DO-NOT-MERGE: NCE experiments: Better LRU cache implementation
It uses a better lru implementation, since initial as basic functions to LRU, use a modern system to it to make performance better
2025-04-12 22:54:32 -03:00
3d43fecece WIP: DO-NOT-MERGE: NCE experiments: Initial LRU 2025-04-11 17:05:06 -03:00
27ceda2c6c WIP: DO-NOT-MERGE: NCE experiments: Fix build errors 2025-04-11 17:04:55 -03:00
777b674edf WIP: DO-NOT-MERGE: NCE experiments: Some optimizations on pre-fetch and cache 2025-04-11 17:04:45 -03:00
d36031849e WIP: DO-NOT-MERGE: NCE experiments: Ensure guest context reflects thread state during unlock 2025-04-11 17:04:34 -03:00
d621707001 WIP: DO-NOT-MERGE: NCE experiments
botw boots but with poor performance
2025-04-11 17:04:24 -03:00
9cef9f5dce Update fmt to allow for v11
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-10 01:11:22 +02:00
Briar
c98be3d793 Update fastmem pointer handling to use std::optional 2025-04-04 03:23:32 +02:00
GPUCode
26a25d2280 core: Support multiple modules per patcher 2024-01-15 00:46:05 +02:00
Liam
c366d8e8d9 core: track separate heap allocation for linux 2023-12-25 23:30:56 -05:00
Liam
e2b5f2392e kernel: instantiate memory separately for each guest process 2023-12-22 21:52:49 -05:00
Fernando S
11fb4a3a11 Merge pull request #12417 from liamwhite/arm64-gcc-fix
nce: hide shadowing warnings from dynarmic headers
2023-12-20 18:46:08 +01:00
Liam
cdf5beae3d nce: hide shadowing warnings from dynarmic headers 2023-12-20 11:07:50 -05:00
Liam
236173f804 nce: increase handler stack size 2023-12-19 15:24:13 -05:00
Liam
f5846edffa nce: fix read size in simd immediate emulation 2023-12-19 12:51:19 -05:00
Liam
91aefd5d35 nce: adjust initialization for repeated calls 2023-12-11 23:02:01 -05:00
Liam
ecb3d74dcd nce: implement instruction emulation for misaligned memory accesses 2023-12-10 18:23:42 -05:00
Liam
e1b32b6c35 debug: fix reading of module names 2023-12-09 11:18:10 -05:00
Fernando S
9046851d9f Merge pull request #12236 from liamwhite/cpu-refactor
core: refactor emulated cpu core activation
2023-12-06 14:19:17 +01:00
Liam
33b7353d73 arm: fix context save of vector regs 2023-12-04 22:19:11 -05:00
Liam
3d5c6a73cb core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00
Liam
79d497c022 nce: fix pre-text patch for single modules 2023-12-02 16:14:52 -05:00
GPUCode
e6e15d2d10 core: Rename patcher file 2023-11-29 23:49:16 +02:00
GPUCode
181a7a027f oaknut: Address warnings 2023-11-25 00:47:43 -05:00
GPUCode
1e5a1d1702 Address more review comments 2023-11-25 00:47:43 -05:00
Liam
2e2b3de592 arm_nce: skip data aborts for crash handling parity 2023-11-25 00:47:36 -05:00
GPUCode
a1818cddf6 arm: Print backtrace on data abort 2023-11-25 00:47:36 -05:00
Liam
a3e2b0bd91 patch: check offsets from first code word 2023-11-25 00:47:36 -05:00
Liam
683b58b075 arm_nce: skip dc cvac on possibly write-protected areas 2023-11-25 00:47:36 -05:00
GPUCode
3814ca9d84 Address some review comments 2023-11-25 00:47:35 -05:00
Liam
19619b1b14 arm: Implement native code execution backend 2023-11-25 00:46:47 -05:00
Liam
317741356f core: check for thread dpc before eret 2023-11-13 11:28:23 -05:00
Liam
62e106dbe8 kernel: update KProcess 2023-10-21 20:03:41 -04:00
liamwhite
28b236b988 Merge pull request #10839 from lat9nq/pgc-plus
general: Reimplement per-game configurations
2023-08-02 14:25:52 -04:00
liamwhite
a28a0c47f8 Merge pull request #10990 from comex/ubsan
Fixes and workarounds to make UBSan happier on macOS
2023-07-26 10:33:28 -04:00
Liam
545880f71b core: remove remaining uses of dynamic_cast 2023-07-21 19:37:29 -04:00
lat9nq
78f92086ca settings,general: Rename non-confirming enums 2023-07-21 10:56:54 -04:00
comex
85d77f636c Fixes and workarounds to make UBSan happier on macOS
There are still some other issues not addressed here, but it's a start.

Workarounds for false-positive reports:

- `RasterizerAccelerated`: Put a gigantic array behind a `unique_ptr`,
  because UBSan has a [hardcoded limit](https://stackoverflow.com/questions/64531383/c-runtime-error-using-fsanitize-undefined-object-has-a-possibly-invalid-vp)
  of how big it thinks objects can be, specifically when dealing with
  offset-to-top values used with multiple inheritance.  Hopefully this
  doesn't have a performance impact.

- `QueryCacheBase::QueryCacheBase`: Avoid an operation that UBSan thinks
  is UB even though it at least arguably isn't.  See the link in the
  comment for more information.

Fixes for correct reports:

- `PageTable`, `Memory`: Use `uintptr_t` values instead of pointers to
  avoid UB from pointer overflow (when pointer arithmetic wraps around
  the address space).

- `KScheduler::Reload`: `thread->GetOwnerProcess()` can be `nullptr`;
  avoid calling methods on it in this case.  (The existing code returns
  a garbage reference to a field, which is then passed into
  `LoadWatchpointArray`, and apparently it's never used, so it's
  harmless in practice but still triggers UBSan.)

- `KAutoObject::Close`: This function calls `this->Destroy()`, which
  overwrites the beginning of the object with junk (specifically a free
  list pointer).  Then it calls `this->UnregisterWithKernel()`.  UBSan
  complains about a type mismatch because the vtable has been
  overwritten, and I believe this is indeed UB.  `UnregisterWithKernel`
  also loads `m_kernel` from the 'freed' object, which seems to be
  technically safe (the overwriting doesn't extend as far as that
  field), but seems dubious.  Switch to a `static` method and load
  `m_kernel` in advance.
2023-07-15 12:00:28 -07:00
Liam
1f791daa01 arm_interface: correct breakpoint rewind condition 2023-07-09 12:03:25 -04:00
Merry
09012476db arm_dynarmic_32: Remove disabling of block linking on arm64 2023-06-27 23:51:49 +01:00
Liam
5b858c8306 core: decouple ARM interface from Dynarmic 2023-06-12 22:11:51 -04:00
bunnei
a09fcccb72 core: arm_dynarmic_32: Update SaveContext/LoadContext. 2023-04-01 17:03:08 -07:00
Liam
6eaef51cf2 memory: rename global memory references to application memory 2023-03-23 20:28:47 -04:00
Liam
156516e399 kernel: use KTypedAddress for addresses 2023-03-22 09:35:16 -04:00
Liam
c68577384a general: rename CurrentProcess to ApplicationProcess 2023-02-13 19:03:12 -05:00