| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| FEX Release FEX-2510 source code.tar.gz | 2025-10-09 | 2.3 MB | |
| FEX Release FEX-2510 source code.zip | 2025-10-09 | 4.2 MB | |
| README.md | 2025-10-09 | 18.7 kB | |
| Totals: 3 Items | 6.5 MB | 0 | |
Read the blog post at FEX-Emu's Site!
We're just gonna kick out this little release and be on our way. There might be some interesting things this month, read and find out!
JIT Improvements
This month we have had various JIT improvements and bug fixes. Most of which are bug fixes but we do have some performance optimizations as well.
- Fixed a potential crash with x87 loadstore operations
- Fixed a potential crash with AVX on 32-bit applications
- Fixes legacy fxsave/fxrstor x87 register saving and restoring
- Fix telemetry on legacy segment register usage
- Avoid flushing MMX registers until MMX->x87 transition
- Fix NaN propagation behaviour in x87
- Implement support for SSE4a
- Fix SIGILL reporting
- Fixes Mafia II Classic
- ARM64ec: Check for suspend interrupts on backedges
- Fixes UPlay behaviour
Better cache x87 intermediate results in "slow path"
To understand what this is doing, one must first understand the optimizations that our JIT is doing for most x87 operations. As everyone knows, x87 is a wacky stack based architecture where you push data on to a stack before doing operations. When done, you then pop those off in to memory.
Contrary to popular belief, this isn't how most architectures today to floating point operations. Both ARM's ASIMD/NEON and x86's SSE instead work directly on this popular concept called "registers." So when translating x87 behaviour to what ARM does, it doesn't really match!
To combat this, FEX has a very extensive "x87StackOptimizationPass" which optimizes our IR to remove stack usage behaviour as much as possible. This causes significant performance improvements in x87 heavy games because all the x87 stack management typically gets deleted! But, this does have the downside that if FEX doesn't see all of the x87 stack usage, we must fall down a safe "slow path" which does correct stack management. This means some code doesn't get the benefits of the optimization pass.
This month our developer bylaws decided to tackle this problem and improve the situation. In the case that we need to hit this slow path, we were not caching any of the intermediate stack calculations which was causing more overhead than should be necessary. With this significant improvement, we have seen the number of ARM instructions necessary to run in the slow path drop dramatically!
Some examples:
- 25 x86 instructions: Used to take 169 ARM instructions, now only 72.
- This was in Half-Life
- 214 x86 instructions: 3165 -> 1743!
- This was in Oblivion
- 351 x86 instructions: 5270 -> 2809!
- This was Psychonauts
As one can see, there are some significant instruction reductions which directly correlate to performance improvements! There will be countless number of games using x87 that this improves performance of!
Memory usage hunting
This month we started hunting down FEX's memory usage. It has been known for a while that FEX's memory usage could be better, tripping up 16GB devices, and even worse 12GB or 8GB devices. This has been a known thorn but there were other higher priority problems before we work towards solving this.
This month we have added the ability to name our memory allocations so we can start tracking usage by what is actually allocating it. Additionally going through some data structures and making them smaller. While this month we only did some minor improvements, expect some more significant memory savings as we have a bunch in-flight as we are rolling out this release!
(P.S. We also fixed a bug where we allocated 16MB of RAM from 32-bit guests, that's been fixed)
Implement support for "Extended Volatile Metadata" on Linux
Taking a leaf from what Microsoft has done in their compiler, we have implemented a feature called "Extended Volatile Metadata" or lovingly called EVMD. To know how this feature works, we need to know how Microsoft's "Volatile Metadata" itself works.
In Windows land, Microsoft knew that emulating the x86 memory model is one of the most costly things emulators need to do. To help alleviate the strain of this, they employed compiler assistance to know when x86 doesn't need to strictly follow the x86 memory model. In Microsoft's Visual Studio compiler 2019 and newer, they will inspect code as it is compiled and determine if it is requiring thread safe memory semantics or not. When it has been determined that a piece of code is safe to use a weaker memory model, they add it to the volatile metadata. Once the entire program is compiled, it then gets stored inside the executable.
When the executable runs on x86 hardware, this data is ignored and nothing has changed. On the other hand, when running on a Windows Arm64 device, this data structure is fed in to their emulator and is used to determine if they can safely turn off x86-TSO emulation! This gives a dramatic speedup for any application that actually has this metadata. In fact, it is so useful that ARM64EC FEX uses the data as well to ensure we get similar performance improvements!
This new feature that FEX has implemented allows manual user intervention to declare regions of code that are known safe to disable TSO emulation on. Just like the regular metadata, but works on Linux applications and also Windows applications that are compiled without it or before 2019!
Sadly this isn't automatic and requires significant work from either FEX developers or users to safely determine hot code blocks. For example, a game that spends more than 80% of its CPU time in a memcpy function can be safely optimized with a simple FEX option to enable EVMD.
- FEX_EXTENDEDVOLATILEMETADATA=iw4sp.exe\;0xe9da0-0xe9ec7
Hopefully this feature will be used by our users for games they've determined run too slow with TSO emulation enabled, but crash with TSO emulation disable! Gives us a little step in the middle to work around the FEAT_LRCPC extension.
Good bye FEXLoader and FEXInterpreter!
FEX has historically had to methods of invocation: FEXInterpreter, which directly starts emulation of the given program, and FEXLoader, which additionally supports overriding FEX configuration using command line arguments. We also support such config overrides using environment variables like FEX_MULTIBLOCK though, so we decided to remove the redundant FEXLoader binary to ease maintenance. With environment variables, per-app configuration files, and the graphical FEXConfig tool for permanent changes, we're covering most use cases.
With FEXLoader out of the picture, we took the opportunity to rename FEXInterpreter to just FEX. The old name is still available as an alias for now, but we recommend updating any scripts to avoid friction in the near future.
A small change for building FEX tests
Our build scripts used to have two variables that needed to be set to enable testing: BUILD_TESTS and BUILD_TESTING. Setting the wrong one when toggling tests on or off would have surprising side effects (like CTest running old build artifacts!), so we invested some time to refactor our CMake code and unify the two. In the new release, testing is now controlled using the BUILD_TESTING variable, as in any other CMake-based project.
Raw Changes
FEX Release FEX-2510
- Addressing
-
Shave 8 bytes off AddressMode (https://github.com/FEX-Emu/FEX/commit/9626a643400d0f459edb36619f3ad2b71a08259c)
-
Allocator
-
Name FEX's VMA regions for allocation (https://github.com/FEX-Emu/FEX/commit/5f8cb0dc541dfa7d700aff3c50d62ea5906dc5b3)
-
Arm64Emitter
-
Cull unnecessary includes (https://github.com/FEX-Emu/FEX/commit/88e90a6f3aa557b73dcc21a10664fa2ef8eadaf9)
-
Build
-
Update toolchain for WoA builds (https://github.com/FEX-Emu/FEX/commit/b0b60fb76154b48a7937d970ac68f22876996d95)
-
CMake
- Update our python minspec to 3.10 (https://github.com/FEX-Emu/FEX/commit/13199ad203f94d8e24c8d27fe4fb811e0554547e)
- Remove CPack, completely unused (https://github.com/FEX-Emu/FEX/commit/ffb1cf4c7cd00eca8697846fe204f77b9ccaffef)
- Merge BUILD_TESTS into BUILD_TESTING (https://github.com/FEX-Emu/FEX/commit/8c1e9eda12913e458e63a8fb3a51dc24bbe23b35)
-
Enable runtime-only installation (https://github.com/FEX-Emu/FEX/commit/58c86d16f305f80dba5137f9f55d8cc42322910d)
-
CPUID
-
Adds new CPU product names that exist (https://github.com/FEX-Emu/FEX/commit/30dd9ed267b064844525d6e0c11c210fc3f147c7)
-
CodeCache
-
Introduce new interfaces (https://github.com/FEX-Emu/FEX/commit/61719115e5fd722e63de21c4cba460fa9339fd83)
-
Common
-
StringConv
- std::stoull -> std::strtoull for enum handler (https://github.com/FEX-Emu/FEX/commit/75206c7a517936e52c7274592a26602a36df6f0c)
-
Core
-
Drop support for TSO auto migration (https://github.com/FEX-Emu/FEX/commit/b9ec94264ea57ebbbeb8f98ed6c95efeea347f92)
-
Dispatcher
-
Fix FABI_F32_I16_F80_PTR argument size (https://github.com/FEX-Emu/FEX/commit/dcb889704ddd6eaa24ce2d860b1a6a14f65eb2c4)
-
Docs
-
Fix wrong link in
Readme_CN.md(https://github.com/FEX-Emu/FEX/commit/4e926076c9e4152fa8054b2f6898b82202eceee2) -
EnumUtils
- Remove fmt include (https://github.com/FEX-Emu/FEX/commit/bd5188e7bcc465a4e78ba7752172a4b113e97f75)
- Further simplify enum passthrough formatting (https://github.com/FEX-Emu/FEX/commit/802f3bed47cbf09ad47dbee64a4eb4449d0d283a)
-
Add define for default passthrough formatting (https://github.com/FEX-Emu/FEX/commit/b5d93bc4a09b289830d4ce2105f64fa7792069af)
-
FEX
- Fixes SIGILL reporting (https://github.com/FEX-Emu/FEX/commit/6de5fb288517350cf7bb0ebabac68364179213da)
-
Rebrand FEXInterpreter as FEX (https://github.com/FEX-Emu/FEX/commit/c9fc347de1fce1b47c1646547de848ff22fbc52f)
-
FEXBash
-
Remove ArgLoader usage (https://github.com/FEX-Emu/FEX/commit/7bd0789402ab08db9bbb01415961b8357e174ff9)
-
FEXCore
- Implement support for AVX gathers with overflow (https://github.com/FEX-Emu/FEX/commit/74b09d558137e19bbee24e4c29a0656c9ccd8ec8)
-
Fixes OOB access on x87 reduced precision loads (https://github.com/FEX-Emu/FEX/commit/5f0a1d55e5c0e00d8a18d91f0df79880e98c6f6e)
-
FEXInterpreter
-
Remove FEXLoader (https://github.com/FEX-Emu/FEX/commit/be84a4332a6b2f68c31fed0f4a88cab4a9adf831)
-
FEXLinuxTests
-
Adds a small sleep for consistency (https://github.com/FEX-Emu/FEX/commit/376d6ba72cacf869167695e64c899788e503008f)
-
FEXLoader
-
Move to FEXInterpreter (https://github.com/FEX-Emu/FEX/commit/964165eabe4b55e7bb8b01d47e43c63f2bdb4d37)
-
FEXRootFSFetcher
-
Removes argloader usage (https://github.com/FEX-Emu/FEX/commit/c0ef0a75036f38111ce7c1b30cc3d63d4962376e)
-
FEXServer
-
Remove usage of ArgLoader (https://github.com/FEX-Emu/FEX/commit/eb9fb9e8344419bb664b7a14ed4a39dbf7dd2b84)
-
Frontend
-
Improve DecodeInst size from 128 bytes to 80 (https://github.com/FEX-Emu/FEX/commit/bdbeef3b9ad1831714a48d12cd505fae6f4dd0fa)
-
General
-
Migrate to std::bit_cast (https://github.com/FEX-Emu/FEX/commit/9db9be961294451c8c1455ff2b699bce71069bad)
-
IR
- Remove Swap1/Swap2 ops (https://github.com/FEX-Emu/FEX/commit/06ff0a45a79ec884c81e84fd2b0d90bd497fc382)
- Move RegisterAllocationPass forward decl to JITClass (https://github.com/FEX-Emu/FEX/commit/38a8559943825b9f1289c555aed12e4055ceaf8b)
- Convert RegisterClassType to an enum class (https://github.com/FEX-Emu/FEX/commit/86898035da4a7800dbb567fe33cf8a1d47c2dfeb)
- Remove TypeDefinition struct (https://github.com/FEX-Emu/FEX/commit/d41b21a626057440dfc321963a8624735a412599)
- Convert MemOffsetType to enum class (https://github.com/FEX-Emu/FEX/commit/a5d3bf0f48c850979f360dc5989145d1637a8fce)
- Convert rounding modes to enum class (https://github.com/FEX-Emu/FEX/commit/96145e8e3f119261488ae14db25d4399e36dfb71)
- Convert CondClassType over to enum class (https://github.com/FEX-Emu/FEX/commit/c64d6f2b368dd4c2557365a6b1dcc6068669af36)
-
Remove unnecessary friend class declarations from OrderedNode (https://github.com/FEX-Emu/FEX/commit/034a27ce5afa9198c543c57115261837b2278821)
-
IREmitter
- Add register class helpers (https://github.com/FEX-Emu/FEX/commit/c35b81d2c5b6bf00a75a61cc0b67bf30793cc22a)
-
Remove friend class declarations (https://github.com/FEX-Emu/FEX/commit/aa3df3914b26e37c7f753ebb8440bf78e20a4135)
-
Interface
-
Context
- Remove unnecessary headers/forward declarations (https://github.com/FEX-Emu/FEX/commit/997d041a8472c97c03fca53fedeb23b6d182289f)
-
IoctlEmulation
-
Finish v4l2 implementation (https://github.com/FEX-Emu/FEX/commit/8f47b46219c52bfdf7ec09789df82970fdc345e9)
-
JIT
-
Check for suspend interrupts at back-edges (https://github.com/FEX-Emu/FEX/commit/91c6d693dfb92935372e2462ecd8c193ad718b37)
-
JITClass
-
Mark functions as static where applicable (https://github.com/FEX-Emu/FEX/commit/d9520c94989735e1aebe374a6bb6e5eee5cb341a)
-
Linux
-
Implement support for extended volatile metadata (https://github.com/FEX-Emu/FEX/commit/18d0dec416069800c69f2bc870e64eed0992f762)
-
OpcodeDispatcher
- Remove unimplemented function prototypes (https://github.com/FEX-Emu/FEX/commit/2017100ff385c5335f7af3d6ea8e6a12a2dd7987)
- Default alignment parameters for store helpers (https://github.com/FEX-Emu/FEX/commit/a2b0d594fb4b7850e99c7b1f9e99ea0a534481ed)
- Move off implicit _Select (https://github.com/FEX-Emu/FEX/commit/c948d532a7d18f414ef52799bb490119f585e067)
- Implement support for imm variants of SSE4a extrq/insertq (https://github.com/FEX-Emu/FEX/commit/a9fffe771bd0ddf16adc81272cf3119e9c554f87)
- Fixes telemetry on legacy segment read (https://github.com/FEX-Emu/FEX/commit/533dd1a54bfbda2af2c97e9e879deb649fd51039)
- Fixes fxsave x87 register storing (https://github.com/FEX-Emu/FEX/commit/892e44a90009ac9db70f91442bba45cc6c1f2ec4)
- Removes a log about unknown segments (https://github.com/FEX-Emu/FEX/commit/2d53a9b0dc42bfeea0013a804c3d69ec7b0163c3)
- Fix misaligned clang-format (https://github.com/FEX-Emu/FEX/commit/ef7b2a9d4f240f53f98e7a7e06e11b9b71cb70b9)
- Only flush MMX registers on MMX -> x87 transitions (https://github.com/FEX-Emu/FEX/commit/3c6eba561f860d232943339562504cdba7fdf73a)
-
Don't assert on invalid ALU op encoding (https://github.com/FEX-Emu/FEX/commit/0d77af536610ed305efefd4e399fb0699a0f8f7a)
-
PrctlUtils
-
Move to include folder (https://github.com/FEX-Emu/FEX/commit/3cc0cae249c826b7e9c30a9a0a09e29054295751)
-
RedundantFlagCalculationElimination
-
Eliminate unnecessary vector copy (https://github.com/FEX-Emu/FEX/commit/3825483f798410f9739192fe5f00d1b7432d5e17)
-
SignalDelegator
-
Correctly save and restore x87 state. (https://github.com/FEX-Emu/FEX/commit/3058a825b7ec885be4a84ab8b279363f03bbf9ed)
-
StringConv
- Merge integral-handling facilities together (https://github.com/FEX-Emu/FEX/commit/c17b9dea30fc4779822207f0bcca59d80be3345b)
-
Fix std::enable_if usage (https://github.com/FEX-Emu/FEX/commit/5858c5041f8235677d754171442b2a8075d854ae)
-
SysCalls
-
Remove unimplemented prototypes (https://github.com/FEX-Emu/FEX/commit/9c606a278d82795cb377a6b3a09779642798825a)
-
SyscallHandler
-
Shrink definition struct from 24 to 16 bytes (https://github.com/FEX-Emu/FEX/commit/3b88947cbe3e572c13e335641049bea92f0741e3)
-
TestHarnessRunner
- Don't attempt to build on MinGW (https://github.com/FEX-Emu/FEX/commit/cbd8217c60187a5a41168273af05a56831971caf)
-
Removes ArgumentLoader (https://github.com/FEX-Emu/FEX/commit/226233ddce9e852983fef5f3e1a8601fd70a7857)
-
ThreadManager
- Make StatAlloc instance private (https://github.com/FEX-Emu/FEX/commit/f05be0120e2048724ff4540a462772e2fa570e94)
-
Fix mmap usage to not take guest space (https://github.com/FEX-Emu/FEX/commit/a94059ad8152910772e36f0b14c3e2cc65227f94)
-
WOW64
-
Fix CsSeg initialization (https://github.com/FEX-Emu/FEX/commit/a3435f2d2218a765ad1cda8c6836c32f523a9f28)
-
Windows
-
Avoid redeclaring strtoll as unimplemented (https://github.com/FEX-Emu/FEX/commit/05eeffe0f7b04dd0475c17b9d415290fd4292ee1)
-
Wow64
-
Ensure extended volatile metadata is removed (https://github.com/FEX-Emu/FEX/commit/752046108c47d3052bcc7b0ccc27ed5e4f6c2cb2)
-
X86Tables
-
Remove unused LateInitCopyTable() (https://github.com/FEX-Emu/FEX/commit/bfda91ac16b6868de28647013c52a2b93399140f)
-
X87
-
Better cache intermediate results in the X87 slowpath (https://github.com/FEX-Emu/FEX/commit/4a9170e981a8fae553f1bbba633482b3ede984c8)
-
Misc
- json_ir_generator: Minor cleanup (https://github.com/FEX-Emu/FEX/commit/7c2c0f7fe590ba3e2b1c1656d166b45755a59cae)
- Implement remaining SSE4a instructions (https://github.com/FEX-Emu/FEX/commit/85937a7bfbfa8f3c71bdf246e5ad8419383b00ca)
- (https://github.com/FEX-Emu/FEX/commit/c4d019939b23c0b19dc04db1cb16eeeb448d4667)
- (https://github.com/FEX-Emu/FEX/commit/e4a4a529dd991fa2cc4a82a72285384cb1f9ffe4)
- Change required Python version from 3.10 to 3.9 (https://github.com/FEX-Emu/FEX/commit/6ecec77a74fdeab43101f29803ad6cc966b2af80)
- Update fmt to 12.0.0 (https://github.com/FEX-Emu/FEX/commit/0c5ef1ce1d6da9925d4f15bb252c4803c1253d3a)
- Fix quiet and signalling nan propagation (https://github.com/FEX-Emu/FEX/commit/e5680e031d7663d35a4bcc1a59060f48ca1d54c8)
- Remove unused IsZero; NFC (https://github.com/FEX-Emu/FEX/commit/4593099882ec4e62d85019b2af2b88b568f4b56c)
- Support configuration-specific known failures in asm_tests (https://github.com/FEX-Emu/FEX/commit/b3d88c043d046bfc1c579bd1e72f9df8f44512e8)
- VDSO_Emulation: Remove duplicate span include (https://github.com/FEX-Emu/FEX/commit/4a14003f34535550ca17cbc9866a6d2679edc843)
-
Update code formatting (https://github.com/FEX-Emu/FEX/commit/0eedd55dfd714fc75da8a746fa121228b11d3957)
-
fextl
-
string
- Correct <filesystem> include to <functional> (https://github.com/FEX-Emu/FEX/commit/1b8e03e1def301333c14153909687e4c6281dc79)
-
unittests
-
Remove FEXLoader usage from unittests (https://github.com/FEX-Emu/FEX/commit/6c8edcbea5ef22783edcee5b17699f13813788fc)
-
ASM
- Implement modrm OOB tests (https://github.com/FEX-Emu/FEX/commit/8ead4a3c34c92d039f2690708211b2a40c24c8fe)
- Enables some previously disabled tests (https://github.com/FEX-Emu/FEX/commit/cfeba859acdd0ef639256fcdd61eaf836a3f306b)
- Fixes xlat test so it can be run (https://github.com/FEX-Emu/FEX/commit/38ed7c9bb1b4571a99e28b1d61bceea3d67fe627)
-
vixl
- Update submodule (https://github.com/FEX-Emu/FEX/commit/4de1762c211a157ab8310d58cc96754178ca0536)