15237 Commits
Author SHA1 Message Date
LC 7d3090f782 Merge pull request #6010 from Sonicadvance1/266
FEXCore: Update readme with supported ISAs
2026-10-05 18:50:28 -04:00
Ryan Houdek 435dbdd014 FEXCore: Update readme with supported ISAs
Nothing interesting
2026-10-05 13:45:44 -07:00
Ryan Houdek d2b6e371e2 Merge pull request #6008 from Sonicadvance1/265
DiskCache: Support FileID hash with gnu build-id
2026-10-05 11:26:53 -07:00
Ryan Houdek 902d433a00 Merge pull request #6007 from Sonicadvance1/264
CMake: Stop searching for a bunch of projects when building for Steam
2026-10-05 11:26:05 -07:00
Ryan Houdek f11c8c747e Merge pull request #6006 from javelina-pkwy/tests/add-top-level-ninja-command
Tests: add 'ninja tests' which runs all tests, with large pages
2026-10-05 11:25:39 -07:00
Ryan Houdek 47be6ad720 Merge pull request #5997 from javelina-pkwy/fix/windows-arm64ec-syscall-stubs
Windows: Don't hardcode NT syscall numbers for ARM64EC
2026-10-05 11:23:39 -07:00
Ryan Houdek 12326d7e71 Merge pull request #5998 from rogersnm/no-procfs-no-va-steal
FEXCore/Allocator: Don't hang when /proc/self/maps can't be opened
2026-10-05 11:23:08 -07:00
LC 3648ee97e8 Merge pull request #6005 from Sonicadvance1/263
Externals/code-format-helper: Update for dependabot
2026-10-02 23:22:02 -04:00
Ryan Houdek e3f402a38a DiskCache: Support FileID hash with gnu build-id
This doesn't fully fix #5912 but gets a step closer. Instead of just
hashing the filename, hash in the build-id as well when it exists.

This isn't all encompassing because the build-id may not exist in all
cases. Crypt Of the Necrodancer for example doesn't ship with the
build-id on their 64-bit build. Although their legacy 32-bit build had
it.

The build-id is always a hash, depending on tool it is either 64-bit or
160-bit in all the executables I found. Although it can be anything so
make sure to be flexible enough to support everything.
2026-10-02 17:38:09 -07:00
Ryan Houdek 2aeff14e45 CMake: Stop searching for a bunch of projects when building for Steam
Just to ensure if someone is injecting a built FEX in to the Steam
depot, it doesn't happen to pick up on their system installed packages.

When built under SteamRT4 this isn't an issue as they don't exist, but
locally I'm usually not spinning up the docker instance each time and I
tend to get libxxhash-dev installed since Mesa needs it.
2026-10-02 17:36:12 -07:00
Justin Becker 986c769f52 Tests: add 'ninja tests' which runs all tests with large pages 2026-10-02 16:45:11 -07:00
Ryan Houdek 79a7afe7e1 Merge pull request #6003 from yassinsolim/portable-exec-fd
LinuxSyscalls: Preserve argv and path across portable reexec
2026-10-02 16:33:19 -07:00
Ryan Houdek 7325cb09be Merge pull request #6002 from javelina-pkwy/fix/fxam
X87: Implement full FXAM support
2026-10-02 16:33:07 -07:00
Ryan Houdek c40675c6d0 Externals/code-format-helper: Update for dependabot 2026-10-02 15:28:19 -07:00
Yassin Soliman 1644d185c4 LinuxSyscalls: Preserve argv and path across portable reexec
When binfmt_misc is not visible, execve of an x86 ELF reexecs FEX by path.
That drops the caller-supplied argv[0] and asks the next FEX to reopen the
file through RootFS. Keep the resolved ELF in FEX_EXECVEFD, retain argv[0],
and mark the FD as path-backed so /proc/self/exe stays the real path.
Anonymous memfd execution is unchanged.
2026-10-02 08:45:07 -06:00
Justin Becker 079a69dde2 Style nits 2026-09-30 15:22:22 -07:00
Justin Becker c724742243 Bump diskcache version 2026-09-30 15:07:32 -07:00
Justin Becker 6788bcf264 x87: complete FXAM implementation 2026-09-30 15:07:32 -07:00
Nick Rogers 6b43daccf0 FEXCore/Allocator: Don't hang when /proc/self/maps can't be opened
StealMemoryRegion guards the open() with LogMan::Throw::AFmt, which
compiles out in release builds. With no procfs mounted the fd is -1 and
CollectMemoryGaps then loops on read(-1) forever at 100% CPU.

This is hit whenever FEX is the x86_64 binfmt handler and something runs
an x86 binary in a root without /proc. BuildKit does exactly that: its
emulator probe execs a static x86_64 binary in an empty chroot, so every
BuildKit start on an Arm host with FEX registered hangs.

Reserve nothing instead: StealMemoryRegion returns no regions and
Setup48BitAllocatorIfExists skips the 48-bit allocator. The guest then
runs without the upper VA hidden, which only matters in environments
that previously never got past startup.
2026-09-30 14:43:05 +01:00
Justin Becker 67a7d4b352 NIT: Unneeded ifdef 2026-09-29 12:02:38 -07:00
Justin Becker aad2c969b7 Windows: Don't hardcode NT syscall numbers for ARM64EC 2026-09-29 11:24:36 -07:00
LC 0df84d3844 Merge pull request #5995 from Sonicadvance1/262
Steam: Enable DiskCache by default
2026-09-28 10:12:17 -04:00
Ryan Houdek e320e1de79 Merge pull request #5994 from cjacek/thread-term
WOW64: Use correct thread's CPU area in BTCpuThreadTerm
2026-09-28 06:54:55 -07:00
Ryan Houdek 63eb604b6c Steam: Enable DiskCache by default 2026-09-28 06:13:03 -07:00
Jacek Caban 517a1836ee ARM64EC: Use correct context flags in ThreadTerm 2026-09-28 10:39:21 +02:00
Jacek Caban b1e54d803b WOW64: Get thread context in BTCpuThreadTerm to make sure the thread is actually suspended 2026-09-28 10:38:29 +02:00
Jacek Caban 4956ac23e5 WOW64: Use correct thread's CPU area in BTCpuThreadTerm
Fixes af04940466.
2026-09-27 23:02:30 +02:00
LC 59f85d6b7d Merge pull request #5992 from Sonicadvance1/261
Windows: On unimplemented print a log
2026-09-25 21:54:39 -04:00
Ryan Houdek d3dcc740b8 Merge pull request #5989 from Sonicadvance1/260
FEXCore/DiskCache: Prune old entries automatically
2026-09-25 15:18:34 -07:00
Ryan Houdek dd63548cb1 Windows: On unimplemented print a log
Makes it easier to find which one was missing. Can't use regular log
routines in the header due to conflicting win32 defines.
2026-09-25 14:44:11 -07:00
Ryan Houdek 7962f40065 FileUtils: Implement RecursiveRemoveDirectory and WalkDirectory with NT syscalls
A bit messy but it basically duplicates the Linux side. We don't have a
way to include NT internal defines in to FEXCore currently so the two
required symbols are just forward declared.
2026-09-25 14:40:21 -07:00
Ryan Houdek f3b0b41254 Win32: Implement RemoveDirectory 2026-09-25 14:39:55 -07:00
Ryan Houdek 47557a6184 FEXCore/DiskCache: Prune old entries automatically
Adds a config option to disable pruning if desired.

Had to change FEXCore::HostFeatures slightly to remove the HostType from
the Hash for caching, as we don't want the bucket to inadvertently
delete wow64,arm64ec,linux buckets when executing in the same namespace.

Minor changes to the DiskCache::Init code to handle returning two
values, moving the HostType to be a part of the "ProcessBucketHash"
instead of the "MachineBucketHash".

Then uses the directory walking function added in the previous commit to
find mismatched/old "MachineBucketHash" directories and remove them.
2026-09-24 15:21:48 -07:00
Ryan Houdek 47bc73575e FEXCore/FileUtils: Adds a way to walk a directory with callback
We need to walk a directory calling back to the DiskCache, but without
recursion.

Also fixes a function signature issue on win32.
2026-09-24 14:53:53 -07:00
Ryan Houdek 72b2ff88ae Merge pull request #5987 from Plagman/plagman/re-key_mr
DiskCache: adjust key strategy
2026-09-24 11:55:40 -07:00
Pierre-Loup A. Griffais b37aae728f DiskCache: adjust key strategy
The base directory is now the machine bucket, which is everything that affects
codegen that you can ask FEX about offline: FEX compiler version, host features.

The DB files now carry a process bucket, which is everything else that can
affect codegen, on the user/process side: 32-bitness and config.

Both together are still the bucket hash that gets laced into every lookup key,
so we still won't load mismatching code because a file is in the wrong spot.
2026-09-24 00:08:11 -07:00
LC 4e5c18113a Merge pull request #5986 from Sonicadvance1/259
FEXCore: Adds a utility function for deleting a directory
2026-09-23 23:36:12 -04:00
Ryan Houdek ae3a4ae197 FEXCore: Adds a utility function for deleting a directory
We can't use std::filesystem::remove_all on FEX Linux, so reimplement
it. No unittest for this because....That's spicy on the CI NAND.
2026-09-23 18:34:46 -07:00
Ryan Houdek e2f973fe93 Merge pull request #5981 from javelina-pkwy/opt/faster-pcmp
Vector: Inline PCMPXSTRX SSE4.2 Instructions
2026-09-22 14:17:18 -07:00
Justin Becker af8770005b Clang format 2026-09-22 12:53:05 -07:00
Justin Becker 0206479a08 Clarify new tests 2026-09-22 12:53:05 -07:00
Justin Becker 0ddd46ba44 Bump DiskCacheVersion 2026-09-22 12:53:05 -07:00
Justin Becker e2f0cf41d8 More cleanup 2026-09-22 12:53:05 -07:00
Justin Becker ff887adb19 Include all immediates 2026-09-22 12:53:05 -07:00
Justin Becker 638329278c Inlined PCMPXSTRX
Improves performance for SSE4.2 String operations by ~10x by emitting inline ASM instead of jumping to a C++ helper.

Performance numbers from a simple microbenchmark vs the existing C++ implementation:
|               | Equal Any | Ranges | Equal Each | Equal Ordered |
|---------------|-----------|--------|------------|---------------|
| **pcmpestri** | 13.40×    | 9.71×  | 19.38×     | 14.07×        |
| **pcmpestrm** | 13.12×    | 9.54×  | 18.73×     | 13.80×        |
| **pcmpistri** | 11.75×    | 9.19×  | 17.63×     | 12.80×        |
| **pcmpistrm** | 11.39×    | 8.83×  | 16.31×     | 12.26×        |
2026-09-22 12:50:02 -07:00
LC 08f451d3bc Merge pull request #5980 from Plagman/plagman/maxrwsize_mr
DiskCache: configurable max file size
2026-09-22 11:10:40 -04:00
Pierre-Loup A. Griffais 83d8317dae DiskCache: configurable max file size 2026-09-22 00:05:10 -07:00
LC 37d83d9375 Merge pull request #5979 from Sonicadvance1/258
FEXCore: Have ThreadRemoveCodeEntry IR op jump to dispatcher
2026-09-22 01:46:23 -04:00
Ryan Houdek 2ea5cc3f41 InstcountCI: Update 2026-09-21 20:53:28 -07:00
Ryan Houdek 4b418a81aa FEXCore: Have ThreadRemoveCodeEntry IR op jump to dispatcher
In order to reuse code buffers, when invalidating we will no longer be
able to invalidate code while inside the code we are invalidating.

Changes the IR operation to be a block ender itself and control jumping
to the new RIP. This way it can invalidate from the dispatcher and just
restart JIT execution.
2026-09-21 20:53:27 -07:00