Commit Graph
15082 Commits
Author SHA1 Message Date
Ryan Houdek 9fbdc00bd6 Docs: Update for release FEX-2609.1 FEX-2609.1 2026-09-21 11:44:20 -07:00
Ryan Houdek 116053cd29 InstcountCI: Update 2026-09-21 11:43:34 -07:00
Ryan Houdek 536722f59d FEXCore/OpcodeDispatcher: Fixes syscall instruction on Linux
I forgot on Linux by default we didn't have the syscall instructions
count as block end. Change this so that it counts as block end now.

This has the additional benefit that now the frontend needs to modify
the RIP manually as well which is fine as it's what arm64ec and wow64
does.

Also add back the UnimplementedOp in RDPID that accidentally got caught
up. Also increment DiskCache version as both changes will change
codegen.

Fixes #5942
2026-09-21 11:43:28 -07:00
Ryan Houdek 395b132f34 Docs: Update for release FEX-2609 FEX-2609 2026-09-07 23:42:35 -07:00
Ryan Houdek 566a5e266d Merge pull request #5934 from Plagman/plagman/multi_key_drifting_mr
DiskCache: support multiple entries per lookup key
2026-09-07 23:38:31 -07:00
Pierre-Loup A. Griffais cc5686de37 InstcountCI: Update 2026-09-07 22:51:31 -07:00
Pierre-Loup A. Griffais 049c932675 DiskCache: support multiple entries per lookup key
The LookupKey based on data available at Lookup time gives a list of possible
candidate entries, which may have different guest code sizes/footprints.

If only one candidate, it's stored in-line in the map like before - if we grow
past that, an additional (multi)map is allocated, sorted by footprint.

The footprint sorting lets us reduce the amount of hashes performed at Lookup
to the strict minimum.

Anon entries keys are based on a limited size decoded prefix, so this is an
important part of geting the best hit rate possible out of all the other work
with anon keys, as there's often multiple candidates with the same prefix.

Cap the max amount of entries per bucket to limit growth.
2026-09-07 22:50:22 -07:00
LC 84fabf4ed8 Merge pull request #5933 from Sonicadvance1/235
FEXCore/Allocator: Support naming VMA regions from rpmalloc
2026-09-07 23:36:30 -04:00
Ryan Houdek 310c2504f6 Merge pull request #5930 from cjacek/raise-exception
Windows: Use NtRaiseException to raise guest exception
2026-09-07 15:20:37 -07:00
Ryan Houdek 021c4fa4bf FEXCore/Allocator: Support naming VMA regions from rpmalloc
This allows WTF to catch the allocations just like on Linux. Punch our
unixlib path all the way through to rpmalloc so it gets named and
tracked properly.
2026-09-07 15:13:33 -07:00
Ryan Houdek 319c5bf023 Externals/rpmalloc: Update 2026-09-07 15:13:14 -07:00
Ryan Houdek 023d0cdaa6 Merge pull request #5927 from Plagman/plagman/mono_more_caching
DiskCache: also patch branches for more anon hit rate
2026-09-07 14:09:35 -07:00
Ryan Houdek 5a4f84cad9 Merge pull request #5870 from cjacek/fmt-update
External: Update fmt to upstream master to fix building with LLVM 23
2026-09-07 12:24:52 -07:00
Jacek Caban eb27391954 External: Update fmt to upstream master to fix building with LLVM 23
Includes https://github.com/fmtlib/fmt/pull/4868.
2026-09-07 16:23:16 +02:00
Pierre-Loup A. Griffais ffaa5d6316 InstcountCI: Update 2026-09-07 00:56:39 -07:00
Pierre-Loup A. Griffais 8bf22b6382 DiskCache: add plumbing for guest-patching for branches
To catch many conditional jumps found in Mono JITted code.
2026-09-07 00:47:47 -07:00
Ryan Houdek 42c663269b Merge pull request #5910 from Plagman/plagman/mono_initial_caching
DiskCache: detect inline data, hash around it and patch it on Lookup
2026-09-06 23:45:17 -07:00
Pierre-Loup A. Griffais 983c5defc1 InstcountCI: Update 2026-09-06 23:25:53 -07:00
Pierre-Loup A. Griffais c92805475d DiskCache: detect inline data, hash around it and patch it on Lookup
Only detect certain kinds of mov reg,immediate so far, which was the bulk of
Mono JIT activity.
2026-09-06 23:25:29 -07:00
Ryan Houdek 50e6eee95a Merge pull request #5931 from Plagman/plagman/key_flags_mr
DiskCache: key fixes
2026-09-06 22:32:00 -07:00
Pierre-Loup A. Griffais 31cda95039 DiskCache: also fold FileId into the key for file-backed blocks 2026-09-06 21:47:18 -07:00
Pierre-Loup A. Griffais 970ce4bc13 DiskCache: fold more codegen-affecting environment into key
Fixes a hang during load with Three Point Hospital
2026-09-06 21:40:54 -07:00
Jacek Caban e4c6154be2 WOW64: Use NtRaiseException to raise guest exception
Instead of returning to the currently dispatched exception, which doesn't send a debug event.
2026-09-06 15:22:43 +02:00
Jacek Caban 064a6e96c7 ARM64EC: Use NtRaiseException to raise guest exception
Instead of returning to KiUserExceptionDispatcher, which doesn't send a debug event.
2026-09-06 15:20:30 +02:00
Jacek Caban d704bd3cef Windows: Rise a non-continuable excetpion for STATUS_STACK_BUFFER_OVERRUN 2026-09-06 15:20:30 +02:00
Jacek Caban 9f511d5d78 WOW64: Remove unused variable 2026-09-06 15:20:30 +02:00
Ryan Houdek a77d00acae Merge pull request #5929 from Plagman/plagman/smc_mr
DiskCache: SMC regression fixes
2026-09-06 03:24:15 -07:00
Pierre-Loup A. Griffais 5d11b8b0d5 DiskCache: SMC regression fixes
One from a bad conflict resolution :/
2026-09-06 02:00:05 -07:00
Ryan Houdek bf70dee3ae Merge pull request #5928 from Plagman/plagman/jittail_mr
Frontend: fix nondeterminism by rolling back DecodedMaxAddress on error
2026-09-05 22:39:05 -07:00
Pierre-Loup A. Griffais 4a065ad1a2 InstcountCI: Update 2026-09-05 21:58:07 -07:00
Pierre-Loup A. Griffais 96d955e7b1 Frontend: fix nondeterminism by rolling back DecodedMaxAddress on error
Otherwise GuestSize ends up different across compiles of the same valid code
extents, including the copy of it baked in JITCodeTail of the host code itself.
2026-09-05 21:53:30 -07:00
LC abec314720 Merge pull request #5926 from Sonicadvance1/234
Frontend: Stop asserting on too long of an instruction
2026-09-05 03:29:29 -04:00
LC ec63be4028 Merge pull request #5925 from Sonicadvance1/233
Wine: Change behaviour around SMC and NtReadFile
2026-09-05 03:28:17 -04:00
Ryan Houdek 179b4423a7 Wine: Change behaviour around SMC and NtReadFile
JIT invalidation around syscalls and kernel calls is mighty fickle.
This is why the previous code path was born. In order to properly handle
this case we need strong coordination between Wine and FEX around
invalidating code and memory protections. This doesn't quite exist today
so we're kind of stuck with a kludge solution. Instead of forcing the
Persona 5 code invalidation on to every process, only do it on P5R.

This fixes a hang in msiexec with PhysX trying to do a blocking read and
jitting code or creating threads, while also maintaining the P5R
approach. The full comment is in the file about the reasoning.
2026-09-04 20:08:18 -07:00
Ryan Houdek 9956a528b9 Frontend: Stop asserting on too long of an instruction
Return the same as the NonExecutableRange for now. I have a unittest
that is mostly correct with this change, just need to fixup some of the
supplementary data.

For now push this change to get a bad assert removed that can happen
during code discovery. I'll fix up the remaining details afterwards.
2026-09-04 20:05:18 -07:00
Ryan Houdek e3c6b37f70 Merge pull request #5924 from Sonicadvance1/232
Common/Config: Fixes Cache directory when `STEAM_COMPAT_SHADER_PATH` on Win32
2026-09-04 16:08:44 -07:00
LC b78bde7ec8 Merge pull request #5923 from Sonicadvance1/231
OpcodeDispatcher: Explicitly handle no-nop vector moves
2026-09-04 17:54:36 -04:00
Ryan Houdek 6ff7e82e3b Merge pull request #5918 from Plagman/plagman/validation_mr
DiskCache: optional validation-only mode
2026-09-04 14:34:38 -07:00
Ryan Houdek 37675e0351 Common/Config: Fixes Cache directory when STEAM_COMPAT_SHADER_PATH on Win32
Moves cache data from %APPDATA% to wherever `STEAM_COMPAT_SHADER_PATH`
points. Turns out this was easier than expected.

Basically moving disk cache from:
- compatdata/<AppID>/pfx/drive_c/users/steamuser/AppData/Local/fex-emu/DiskCache
to:
- shadercache/<AppID>/fex-emu/DiskCache/

Fixes #5913
2026-09-04 14:20:57 -07:00
Ryan Houdek 38c9f14dbd OpcodeDispatcher: Explicitly handle no-nop vector moves
Just be very explicit about this rather than questioning why MMX moves
can't be a nop in the regular vector move code.
Doesn't change codegen so binarycacheversion doesn't need to change.
2026-09-04 12:19:21 -07:00
Ryan Houdek 7187bc0e59 Merge pull request #5922 from simon902/MOVVectorUnalignedOp_Selfmove
MOVVectorUnalignedOp: Fix same-register MMX writes being treated as a Nop
2026-09-04 12:07:19 -07:00
Simon Scherer c5700cb0cc InstcountCI: Update 2026-09-04 17:03:46 +02:00
Simon Scherer 8ed4c52d58 OpcodeDispatcher: Don't skip the MMX state transition for same-register writes in MOVVectorUnalignedOp 2026-09-04 17:00:45 +02:00
Simon Scherer bd65c3e568 unittests/ASM: Test PFRCPIT1 self-move 2026-09-04 16:58:10 +02:00
LC 7052f91495 Merge pull request #5919 from simon902/fst_tag_word
Mark tag word valid for FST ST(0) self-store
2026-09-04 06:34:08 -04:00
Simon Scherer 040d3115d2 InstcountCI: Update 2026-09-04 11:53:13 +02:00
Simon Scherer 7236c2bf0a Fix x87 tag word not updating on FST ST(0) self-store 2026-09-04 11:51:12 +02:00
Simon Scherer ed3fa2f1c6 unittests/ASM: Test FST ST(0) tag word update 2026-09-04 11:50:21 +02:00
LC a454845ffd Merge pull request #5909 from simon902/fxch_tag_word
Mark both operands valid in the tag word for FXCH
2026-09-04 02:50:17 -04:00
Pierre-Loup A. Griffais 40bfff985f DiskCache: optional validation-only mode
Diffs guest code in lookup miss hash mismatches and host code after lookup hit.
2026-09-03 23:31:05 -07:00