Skip to content

Sync with upstream FEX - #2

Open
github-actions[bot] wants to merge 203 commits into
mainfrom
upstream-main
Open

github-actions[bot] wants to merge 203 commits into
mainfrom
upstream-main

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

upstream-main has 203 commits that are not in main.

Newest upstream commit: 16c1000 Merge pull request #6111 from Sonicadvance1/311

Merge this PR with a merge commit (not squash or rebase) so that main keeps the upstream history.

javelina-pkwy and others added 30 commits October 5, 2026 15:03
This peephole removes unnecessary masking operations when the mask is
provably all 1s. This improves performance in GB7 'Asset Compression' by
about 2% with SVE and about 4% without SVE.
Tests: Enable a handful of tests, and fix small bug in python test runner script
Peephole optimization for VPCMPEQD + VGATHERDPS
Scripts/InstallFEX: Add new ubuntu versions
NtDllRedirectionLUTSize is a uint32_t, but CheckCall loaded it with a
64-bit ldr. The upper half of the bound then comes from whatever follows
the variable in memory, and the :lo12: offset of a 64-bit ldr needs an
8-byte aligned symbol, so the link fails with "misaligned ldr/str offset"
when the variable ends up on a 4-byte boundary.

Load it with a 32-bit ldr, which zero-extends into x17 for the compare.
NtDllRedirectionLUT has NtDllRedirectionLUTSize entries, so valid
offsets are 0 to NtDllRedirectionLUTSize - 1. The bounds check used
b.hi, which let an offset equal to the size through and read one entry
past the end of the allocation.
This is fairly trivial to support.

Fixes #6028
ARM64EC: Fix the NtDllRedirectionLUT bounds check in CheckCall
Linux: Return EFAULT for stat() of a null path
Linux: Track main stack usage more accurately in VmData
Linux/SignalDelegator: Support SA_RESETHAND
Found this through introspection, only a real problem with -O0.
We were moving a fextl::vector in to a shared pointer so it can be long
living, this causes a change in ownership which was causing the
`BlobData` pointer to be stale. This was then passed to the work queue
to be consumed. In -O1 and above a std::move of a fextl::vector is a
proper move, but -O0 it turns in to a copy.

Easy fix is to just create the shared_ptr early and reference that, so
the pointer is long lived and no references become stale.
DiskCache: Fixes a race condition on the data blob
Tests: Reduce wall clock time spent in "ninja tests"
Sonicadvance1 and others added 30 commits November 3, 2026 16:25
This is supposed to be used for checking if FEX needs to have AVX
enabled. This was never wired up.
With a simple `ninja fex_mingw_tests` the tests can now be run with the
currently installed wine. This is useful for building tests and
running them on an x86 host.

Once paired with a CI job that installs the FEX Wine DLLs, this can also
be used to run these against the current FEX build as well.

For the two tests duplicated between 32-bit and 64-bit it takes about
0.94 seconds. So these are relatively heavy compared to our ASM or Linux
tests, so we should try and keep most tests there if possible.
FEXMingwTests: Adds the ability to run the mingw tests
From the comment
[here](FEX-Emu/FEX#6094 (comment))
apparently there is a bug where async unwind tables and preserve_all
conflicts under mingw. So...just disable it. Easy.
I just saw we managed to catch a few throws in the source. Chop them
out.
CMake: Disable async unwind tables on mingw+preserve_all
Tools: Fixes a couple throws that leaked
I had missed testing this instruction because it doesn't show up in the
regular instruction tables that I was checking for system instructions.
Usually doesn't matter but can cause moving directories with Steam's
"Move install folder" to fail.
OpcodeDispatcher: Make sure xsetbv works correctly
FEXServerManager: Stop leaving stale FEXServer sockets around
Annoyingly these are technically host features but they end up being
process feature hash bits because they change between Linux, wow64, and
arm64ec.

This now makes the HostFeaturesHash match between the three which is
what we want. While the process feature bits change between them.

Adds an info log to the DiskCache startup for confirmation.
Tests various instruction lengths to ensure it works robustly.
DiskCache: Moves SVE/AVX from HostFeatureHash to ProcessHash
FEX: Implement support for CPUID faulting
When affinity changes are in play this can cause a crash because core
index is larger than the number of cores known about.

Happens on Frame.
This wasn't ever wired up for Windows.
I forgot to wire this up, so you couldn't turn off an application's
volatile metadata for testing.
checkout -> v7, code format was on v4 which doesn't use nodejs 24
upload-artifact -> v7, supports uploading unzipped files so might add
that in later.
setup-python -> v7, more node 24 sauce

Signed-off-by: crueter <crueter@eden-emu.dev>
A couple paths should get generated early so later routines have paths
properly made. Fixes an issue that a fresh install to XDG paths wouldn't
have some paths set.

This has been an issue every since the XDG paths were introduced, I just
never looked in to why.
FEXRootFSFetcher: Fixes Config setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants