Commit Graph
14964 Commits
Author SHA1 Message Date
LC 51c241d1f8 Merge pull request #5881 from Sonicadvance1/222
UnixLib: Removes old non-unixlib handling
2026-08-30 16:58:07 -04:00
Ryan Houdek 83ead40b78 UnixLib: Removes old non-unixlib handling
Everything that we care about supports the unixlib path now. Also turns
out we were doing `svc #0` on Windows when unixlib didn't exist which is
kind of funny.

Remove the legacy hacky path as it is no longer necessary.
2026-08-30 13:08:52 -07:00
LC dea5c62a44 Merge pull request #5880 from Plagman/plagman/lookup_less_allocs_mr
DiskCache: get rid of more extra copies/allocs on Lookup
2026-08-30 07:57:30 -04:00
Pierre-Loup A. Griffais b3f902166b DiskCache: get rid of more extra copies/allocs on Lookup
Reorganize disk format a bit so that entrypoints and guest pages can be used
as is from the original blob allocation, with some in-place relocation.
2026-08-30 01:52:42 -07:00
Ryan Houdek 98964c5527 Merge pull request #5875 from lioncash/config
Config: Fix assertion being hit in config generation
2026-08-28 15:47:11 -07:00
LC 8ccc8dab49 Merge pull request #5865 from Sonicadvance1/221
FEXCore/Config:  Annotate all config options that can affect codegen
2026-08-28 17:59:11 -04:00
LC e1d8881f57 Merge pull request #5866 from Plagman/plagman/packed_applyrelocs_mr
DiskCache: Apply relocations from disk blob
2026-08-28 17:58:41 -04:00
Lioncache 7a8b9dd341 Config: Fix assertion being hit in config generation 2026-08-28 16:51:11 -04:00
Ryan Houdek 063af711af Merge pull request #5869 from cjacek/wow64-syscall
WOW64: Update frame state ESP and EIP before unlocking context for syscall
2026-08-28 13:30:51 -07:00
Jacek Caban aed71ed5e9 WOW64: Update frame state ESP and EIP before unlocking context for syscall
Fixes reported CPU context when queried while processing the syscall.
2026-08-28 18:52:12 +02:00
Pierre-Loup A. Griffais 8b9237fd52 DiskCache: Apply relocations from disk blob
Removes one allocation in Lookup path.
2026-08-27 22:45:09 -07:00
Ryan Houdek fd180a16d3 Merge pull request #5861 from Plagman/plagman/cache_map_mr
DiskCache: use memory-mapped IO for reads when possible
2026-08-27 22:18:13 -07:00
Pierre-Loup A. Griffais 2a82f58195 DiskCache: use memory-mapped IO for reads when possible
On Wine, use a unixlib call to get a quality mapping that can track a growing
file.
2026-08-27 21:15:22 -07:00
Ryan Houdek 34ffd2d6e2 FEXCore/Config: Annotate all config options that can affect codegen
Instead serializing the world, allow the config to be data driven. A
couple host feature options aren't serialized as they get explained
elsewhere.
2026-08-27 15:08:20 -07:00
LC 62c9c130c4 Merge pull request #5864 from simon902/pf2id_saturation
Fix pf2id overflow saturation
2026-08-27 09:16:04 -04:00
LC fca23d88c3 Merge pull request #5863 from simon902/vfaddp-mmx-width
Fix PFACC producing wrong results due to missing MMX-sized path in VFAddP
2026-08-27 09:15:30 -04:00
LC 3a179a3a40 Merge pull request #5862 from simon902/pf2iw_saturation
Fix pf2iw to saturate on 32-to-16-bit truncation
2026-08-27 08:47:54 -04:00
Simon Scherer fe17c447d9 InstcountCI: Update 2026-08-27 11:50:52 +02:00
Simon Scherer b21a8dafa7 OpcodeDispatcher: Fix pf2id overflow saturation 2026-08-27 11:50:45 +02:00
Simon Scherer 926a871dd4 unittests/ASM: Test pf2id overflow saturation 2026-08-27 11:40:20 +02:00
Simon Scherer 79ef5031eb InstcountCI: Update 2026-08-27 10:36:31 +02:00
Simon Scherer f0135eb332 JIT/VectorOps: Separate 64-bit VFAddP path for MMX-sized operands 2026-08-27 10:36:22 +02:00
Simon Scherer 566b25a35b unittests/ASM: Test pfacc simple addition 2026-08-27 10:33:05 +02:00
Simon Scherer e6748ea1ed InstcountCI: Update 2026-08-27 09:36:28 +02:00
Simon Scherer 5ab2c723ff OpcodeDispatcher: For PF2IWOp use VSQXTN instead of VUnZip to saturate values falling outside the 16-bit range 2026-08-27 09:36:17 +02:00
Simon Scherer cac8785aca unittests/ASM: Test pf2iw with values falling outside of 16-bit range 2026-08-27 09:29:40 +02:00
LC 0814780c2f Merge pull request #5860 from Plagman/plagman/bucket_cleanup_mr
DiskCache: clean up bucket key building a bit
2026-08-26 21:57:02 -04:00
Pierre-Loup A. Griffais 753bce5e73 DiskCache: clean up bucket key building a bit
Less manual math like that.
2026-08-26 17:35:54 -07:00
Ryan Houdek d04ad79eaf Merge pull request #5857 from 06393993/windows-split-cmake-cxxflags
Windows: Split CMAKE_CXX_FLAGS before passing to execute_process
2026-08-26 16:37:35 -07:00
LC baca86bc3f Merge pull request #5859 from Sonicadvance1/220
Config: Filter the `CPUFeatureRegisters` option on serialization
2026-08-26 15:33:59 -04:00
LC adfff26d58 Merge pull request #5858 from Sonicadvance1/219
LookupCache: Add L1 entry on shrink
2026-08-26 15:33:38 -04:00
Ryan Houdek ef3a6963f3 Config: Filter the CPUFeatureRegisters option on serialization
This is unfiltered data that ends up in HostFeatures. If it was
serialized when set then it would effectively never allow the code
serialization to be used.
2026-08-26 12:22:08 -07:00
Ryan Houdek 19dba4a3ec LookupCache: Add L1 entry on shrink
If we're shrinking the L1 cache then we just deleted the entry that we
just looked up. Add it back to ensure we don't get yet another lookup
for this entry.
2026-08-26 12:18:31 -07:00
Ryan Houdek 49c1cda5c0 Merge pull request #5856 from Hojun-Cho/lookupcache_l1_grow_clear
LookupCache: Clear L1 entries on dynamic cache growth
2026-08-26 12:12:44 -07:00
Kaiyi Li 2ea749c7ea Windows: Split CMAKE_CXX_FLAGS before passing to execute_process
CMAKE_CXX_FLAGS is a space-separated string rather than a semicolon-separated
list. Passing ${CMAKE_CXX_FLAGS} directly to execute_process(COMMAND ...)
passes the entire multi-flag string as a single argv argument to the compiler,
causing option parsing to fail when multiple flags are present (such as
flags configured via the CXXFLAGS environment variable).

Use separate_arguments() to convert CMAKE_CXX_FLAGS into a list so each flag
is passed as an individual argument.
2026-08-26 15:52:58 +00:00
LC 9d4b493ec0 Merge pull request #5852 from Plagman/plagman/keybucket_mr
DiskCache: bucket/key bookkeeping
2026-08-26 10:59:48 -04:00
Hojun-Cho 7e3e4f81ac LookupCache: Clear L1 entries on dynamic cache growth
Growing widens L1PointerMask without touching the table, so an entry whose
address has the new mask bit set sits where InvalidateCache no longer looks,
and a later shrink hands it back to the JIT. Wipe [0, old) on grow, the way
the shrink wipes [new, MAX); the still-valid entries go with it.
2026-08-26 20:51:25 +09:00
Pierre-Loup A. Griffais e740af05b0 DiskCache: bucket/key bookkeeping
Compute a bucket hash and use it in the cache path to avoid grouping entries
that will never make sense together. Don't trust the path, though, and also
lace it into the keys themselves, so that eg. a RO cache miss can never turn
into corruption.

Keep a readable metadata entry at the beginning of the cache, with readable
version, bitness and serialized config.

Use printable characters in FOZ key names as intended.
2026-08-25 22:21:09 -07:00
LC 4ed80fd071 Merge pull request #5855 from Sonicadvance1/218
HostFeatures: Fixes crash in mingw build
2026-08-25 20:37:52 -04:00
Ryan Houdek 59116a06b9 HostFeatures: Fixes crash in mingw build
Turns out packed enum classes without specifying an underlying type
causes problems. Declare its underlying type as uint32_t to match
everything else here.
2026-08-25 17:19:35 -07:00
LC a409220e54 Merge pull request #5854 from Sonicadvance1/217
OpcodeDispatcher: Fixes SHLD by 16 behaviour
2026-08-25 18:33:39 -04:00
Ryan Houdek 485f1c6acf InstcountCI: Update 2026-08-25 15:18:17 -07:00
Ryan Houdek 6646a5cc72 OpcodeDispatcher: Fixes SHLD by 16 behaviour
We were assuming that SHLD undefined behaviour matches SHL, but the
specification actually changes a `ge` comparison to `gt`, which means a
shift of 16 isn't UB!

Thanks to the impeccable @OFFTKP in #5842 for bringing this up as it took a bit
for me to figure out what was actually wrong here. I modified their
unittest to cover more just to ensure we don't break it.
2026-08-25 15:15:36 -07:00
Ryan Houdek 2a76d3b153 Merge pull request #5809 from simon902/fcomi_flag_zero
FCOMI fails to clear OF, SF, AF
2026-08-25 13:22:28 -07:00
LC 7614e48322 Merge pull request #5851 from Sonicadvance1/215
FEXCore/HostFeatures: Adds HostFeatures hashing support
2026-08-25 06:13:21 -04:00
Ryan Houdek 631b8c3f58 FEXCore/HostFeatures: Adds HostFeatures hashing support
As long as the hash is smaller than 64-bits we can just return the bits
encoded directly. Codegen slightly changes with this packed
representation, but doesn't really matter.

Also removes ICacheLineSize as that doesn't actually affect codegen for
us. Once we add 27 more HostFeatures we can switch the hash over to
XXH3.
2026-08-24 20:50:35 -07:00
LC b4b38a92ef Merge pull request #5850 from Sonicadvance1/214
unittests/FEXLinuxTests: Fixes race condition in signal_sra_state
2026-08-24 22:14:15 -04:00
LC c3769a6937 Merge pull request #5849 from Sonicadvance1/213
FEXCore/Context: Removes InitialRIP/RSP from CreateThread
2026-08-24 22:11:34 -04:00
Ryan Houdek 8d69852785 unittests/FEXLinuxTests: Fixes race condition in signal_sra_state
This was using a one second alarm which could catch the JIT while it is
still busy. Instead wait for it to let an alarm thread that it is ready,
then tgkill the thread. This removes the race that this was hitting.
2026-08-24 19:02:39 -07:00
Ryan Houdek b83dd97762 FEXCore/Context: Removes InitialRIP/RSP from CreateThread
We actually never use this anymore, we instead always pass zero for
both, and then rely on the thread inheritance model or setting the
values manually. Now that we expose visibility of the
InternalThreadState to the frontend they just access it directly.

Just a smidge of cleanup, NFC.
2026-08-24 18:32:35 -07:00