Logo
Explore Help
Register Sign In
steam-frame/FEX-Emu--FEX
Watch 1
Star 0 Fork 0
mirror of https://github.com/FEX-Emu/FEX.git synced 2026-10-06 09:00:17 +02:00
Code Issues Packages Projects Releases 66 Wiki Activity

66 Releases 70 Tags

RSS Feed
  • FEX-2308 e9e5b6fb0b
    Compare

    FEX-2308 Stable

    DieMitchell released this 2026-10-05 11:20:12 +02:00 | 8228 commits to main since this release

    Read the blog post at FEX-Emu's Site!

    Whoa jeez, another month already? We've had our heads down working hard this last month, trying to make FEX-Emu the greatest x86/x86-64 emulator on
    Linux. A huge focus this month is optimizations because of course what we want is to go fast. We're all cats and we've got the zoomies.

    Every day we're optimizing

    As said before, this month has been an absolute mess of optimizations as we've been optimizing the project as thoroughly as possible. We could spend
    another month talking about the optimizations that we did this last month, so let's blast through what we did. First let's show a graph for how much
    FEX has improved over this last month.

    Look at those numbers! Some benchmarks from bytemark have cracked the 200% mark! While a couple benchmarks do have regressions, we're pretty sure that
    we know what they are and they will be rectified soon. These are the sorts of optimizations that can be felt in real games though.

    So lets quickly run through some of the optimizations we ran in to this last month.

    Switch to using half-barriers for memory accesses

    When ARM hits an unaligned atomic memory access, we previous wrapped that load or store in two slow barrier instructions. We can now safely only use
    one barrier on one half of the instruction! This makes unaligned accesses quite a bit quicker.

    Optimize x87 memory accesses

    This removes a couple instructions when we access 80-bit floats.

    Only clear icache for code

    Some large code blocks can generate a decent amount of metadata that don't need an icache clear. Can remove a bit of stutter.

    Const prop BFI operation

    Sometimes when a BFI instruction has constants in it, we can remove the BFI instruction

    Optimize vector TSO loadstores

    vector operations typically need an additional add on its address if it can't fit in the instruction encoding for the immediate offset. We missed the
    optimization in which the immediate offset CAN actually fit. Removes an instruction per vector loadstore commonly

    Use TST instead of CMN

    Sometimes these instructions hit a slow path on Cortex-A57 so a minor win there.

    Optimize xor reg, reg

    x86's universally agreed upon instruction for generating zero in a register is xor. This instruction isn't actually optimal in ARM hardware. We now
    emit a move of constant zero which gets optimized to register rename on most ARM hardware.

    More instructions optimized

    These mostly just make the implementations use less instructions which makes them faster. There will be way more of this in the coming month

    • rotate flag calculations
    • phsubsw/phaddsw
    • cmpxchg8b/16b
    • psad*
    • 8-bit, 16-bit rcr
    • fcmov
    • shld/shrd
    • movss
    • maskmovdqu
    • maskmovq
    • phminposuw
    • fild
    • PF flag calculation optimization
    • Optimizing packing RFLAGS
    • Optimize ADD/ADC OF flag packing

    Fixes bug in SSE4.2 pcmpestri

    This was causing Java applications to crash. Now that we fixed a different bug last month, we now have Java working to an extent. It still crashes on
    shutdown which is interesting and not all games are expected to work. But good luck testing random Java games!

    Pack NZCV flags

    This is the first step towards FEX generating x86 flags in a more optimal way. These flags match the ARM flags fairly closely and can be emulated in a
    more optimal way if we pack them together. This is likely what causes the regression in bytemark, but since this is an intermediate step it is
    expected to go away with the next optimization after this. Look forward to future optimizations that make this faster!

    Remove weak symbol declarations in thunks

    A bug that cropped up in thunks has been a crash that occurs when trying to use thunks from Ubuntu's PPA system. This has been a major thorn in FEX's
    side for months because once you rebuild the project locally, it would never reproduce. The problem stems from the fact that clang would decide that
    it can inline a "weak" symbol if its implementation is visible. This would only occur on Canonical's ARM builders, potentially due to whatever device
    they use to compile the code on. This would cause our thunks to crash almost immediately if a user tried them from the PPA system. We have now worked
    around this clang quirk and this will now fix thunks when enabled from the PPA system.

    Mingw build work

    As part of FEX's effort towards supporting running as a WINE dll, we have been slowly adding support for compiling FEXCore as a Windows DLL.
    This month we have removed a bunch of Linux assumptions and API usages from FEXCore and moved it to the frontend FEXInterpreter application. In doing
    so, FEXCore can now be compiled using llvm-mingw as a WINE specific DLL. This is completely unusable for users today but sets the groundwork towards
    what will eventually become a WoW64 integration in the future. We have also added mingw building of FEXCore to our CI so we ensure it doesn't get
    broken.
    To be clear, even though this work allows us to compile as a Windows DLL, this doesn't allow us to run under Windows. FEX still does a bunch of things
    that are Linux specific inside of the code.

    ARMEmitter cleanups

    Another improvement that doesn't affect our users but good to shoutout the improvement for our developers. @Lioncache
    has spent a good amount of time this last month adding missing instructions and aliases to our AArch64 code emitter. While our code emitter covers a
    decent amount of the AArch64 instruction space, it takes time to ensure full coverage. Whenever we're writing code for our JIT and an instruction is
    missing, it slows down whatever we are working on. So kudos for improving our coverage because it makes everyone's lives easier.

    Implement missing accept4, recvmmsg, sendmmsg for 32-bit socketcall

    In a recent Steam client update, it started using accept4 for some background thing. This would cause it to spam a bunch of logs when failing to
    accept some connection. A simple fix just for a few missing system calls, Steam now no longer is complaining loudly.

    Fix variadic packing in X11 thunking

    WINE had broken X11 thunking for all of FEX's history without any indication as to why. We never had time to look in to this but this last month we
    finally hit a game that crashed which made this easier to debug. This bug occured because WINE is one of the few applications that pass more than
    seven arguments through a few variadic API calls. This triggered a bug in FEX's variadic repacking code once we starting packing the arguments on to
    the stack. With this fixed, WINE X11 thunking now works in significantly more games. This means that both OpenGL and Vulkan applications can be
    thunked under WINE.

    Fixes dead context store elimination pass

    This optimization pass removes redundant stores to FEX's CPU context state. While this usually doesn't save much, it can improve performance for some
    edge cases in FEX's JIT. While this is a performance optimization, it likely won't affect many things.

    Fix 16-bit POPA instruction

    This instruction was accidentally zero extending the 16-bit value in to the 32-bit register. We now insert the 16-bits as expected. This fixes an
    issue with OpenAL in some cases.

    Raw Changes

    • ARMEmitter

    • Add missing atomic aliases (https://github.com/FEX-Emu/FEX/commit/68cb6e61d1c0e9cb0b057dd5790f3105545cf8fe)

    • Add cinc/cinv/csetm aliases (https://github.com/FEX-Emu/FEX/commit/30ab4d3f5855d2422a369f2e0f80a6b3675c639e)

    • Add ngc/ngcs aliases (https://github.com/FEX-Emu/FEX/commit/eebcbfda965dbe408d6c06e99162a8df13bb3856)

    • Add bfc/bfxil aliases (https://github.com/FEX-Emu/FEX/commit/d2bca9b997c8180d3a3b1b9250f4d11a45ae8fd7)

    • Add sbfiz/tst/ubfiz aliases (https://github.com/FEX-Emu/FEX/commit/4681061011dc7df961747116b407ed3fdde21def)

    • Finish off remaining SVE Integer Wide Immediate - Unpredicated categories (https://github.com/FEX-Emu/FEX/commit/2fc6542d15ad57c3574d6c06d13552597c70fd86)

    • Implement cmn alias (https://github.com/FEX-Emu/FEX/commit/1ce0ea8f3b9a0ae35b21193ac387b6931725b66f)

    • Arm64

    • Switch to using half barriers (https://github.com/FEX-Emu/FEX/commit/94273fbf4f8397d680eb5d5d30b6c3db64a07c9a)

    • Fixes LR corruption in 128-bit divides (https://github.com/FEX-Emu/FEX/commit/5821175ddb55cf8bdccaddd59c75ff702a12953c)

    • Optimize {Load,Store}ContextIndexed address generation (https://github.com/FEX-Emu/FEX/commit/536b2ed495f88173deefc1ec90c643caf8010fe0)

    • Only clear icache for code (https://github.com/FEX-Emu/FEX/commit/0674dfab0a41ed6165e6e7d52abaf1f7749da0c3)

    • Emitter: Handle LD1{}/LDFF1{} Vector + Immediate encodings (https://github.com/FEX-Emu/FEX/commit/421214e7235698318a4908eaeb7c4ff5bc844a4f)

    • Emitter

    • Add remaining missing SVE predicate range assertions (https://github.com/FEX-Emu/FEX/commit/64c72430bf28dece1c428857b1dcff3661cc50af)

    • Deduplicate some more SVE implementations pt. 2 (https://github.com/FEX-Emu/FEX/commit/0a1820d44478e639dbed92ed868cb783964aefd1)

    • Deduplicate some more SVE implementations (https://github.com/FEX-Emu/FEX/commit/9c175da0e2997fef8e44c3f36ad17a06f2578139)

    • Reorganize some base opcode and assert locations (https://github.com/FEX-Emu/FEX/commit/0be68a54d0bbd88bfb0a24ef4a61a9060d023c3e)

    • Simplify SVE immediate shift helper (https://github.com/FEX-Emu/FEX/commit/e689c6fcfa48cd1f17ea1ae7cdf2867ebb6b2677)

    • Collapse encoding cases for indexed dup (https://github.com/FEX-Emu/FEX/commit/d6697fce32463a1fd16dedf60c0ac91affbfa4b9)

    • Handle SVE FP convert precision group (https://github.com/FEX-Emu/FEX/commit/e633ef7cf55711b8507fe32062cef97df8bd82a5)

    • Handle SVE FP arithmetic with immediate (predicated) group (https://github.com/FEX-Emu/FEX/commit/754bc188135cc10daa7a19158818ad8eeedbcd3e)

    • Handle SVE XAR (https://github.com/FEX-Emu/FEX/commit/842b71cf8318c3c7b0405512fbf99d04efc185be)

    • Add helper for encoding SVE shift immediates (https://github.com/FEX-Emu/FEX/commit/41b3c52663a4512981cb86d344fd4031d7378bb4)

    • Deduplicate some opcode values (https://github.com/FEX-Emu/FEX/commit/d7200e2a1ebc521199c267b2da20048db35b021e)

    • Handle unsized contiguous STR variants (https://github.com/FEX-Emu/FEX/commit/46d3f283b87bc58b2410ddf728132857109b8f92)

    • Handle ST1{*} scatter store variants (https://github.com/FEX-Emu/FEX/commit/724a8e13bf9d06e135d58fa62cfb3db896078061)

    • Simplify SVEMemOperand data union (https://github.com/FEX-Emu/FEX/commit/699c3f5762a8e15d1bd5c0edf58e8076a999be85)

    • Handle LD1{}/LDFF1{} scalar + vector load variants (https://github.com/FEX-Emu/FEX/commit/5c27febbc2cda29c51a331992720ebaafa3db0be)

    • VectorOps

    • Hoist asserts out of VInsElement cases (https://github.com/FEX-Emu/FEX/commit/5b261b0d2e8af7331a3913b2406443f91a1f980e)

    • ArmEmitter

    • Support 32-bit bitmask moves (https://github.com/FEX-Emu/FEX/commit/d9b52fd67df400a98eb78dea18376763a686d6f5)

    • CMake

    • Allow overriding linker (https://github.com/FEX-Emu/FEX/commit/0d6837f1a1c42197c507ecd3530098cd354330ac)

    • Fix pkg version extraction for xcb (https://github.com/FEX-Emu/FEX/commit/96b428dcaab1f146ff0f22c2e817f7a0499c5353)

    • Stop installing fmt (https://github.com/FEX-Emu/FEX/commit/2c3361be9e0295d6d00ce7d2cdbe862737dbe691)

    • ConstProp

    • Handle constant Bfi (https://github.com/FEX-Emu/FEX/commit/29dc77c44bb367b089c5c58c90e2638162b80118)

    • Fix shift mask in const-prop (https://github.com/FEX-Emu/FEX/commit/daeba0625f6f20cd6aa0fb10001d54db511fccab)

    • Context

    • Pull out some long std::function declarations into aliases (https://github.com/FEX-Emu/FEX/commit/7562ff2308a460096928b7baccbaef4ebdef70ad)

    • FEXCore

    • Ensure that the man page follows DESTDIR (https://github.com/FEX-Emu/FEX/commit/d196709162dee5d44a2c89fb9d27c401924893da)

    • Remove erroneous asserts in the project (https://github.com/FEX-Emu/FEX/commit/f5262446a00868c454b88db6c9f794ce219d4e86)

    • Removes unused TLS variable (https://github.com/FEX-Emu/FEX/commit/6455c4817a4353833037ae4a180039aa4d89893c)

    • Fixes WIN32 compiling again (https://github.com/FEX-Emu/FEX/commit/2283c73faef847e283721b1406bfe1d65e80df18)

    • Minor cleanup (https://github.com/FEX-Emu/FEX/commit/462feec2a623cab0af182052c70ee8e64c909f9c)

    • Config

    • Adds support for enum mask configuration array (https://github.com/FEX-Emu/FEX/commit/2c91b5cff60fdc744b7623547db5a1a2c93ee272)

    • FEXLinuxTests

    • Fixes race in smc-mt-2 (https://github.com/FEX-Emu/FEX/commit/af35e18979d9748ae86b6d4a20e6e7597221589a)

    • FEXRootFSFetcher

    • Make verification percent easier to read (https://github.com/FEX-Emu/FEX/commit/7765bbc7b87f4fc4b4a5cb373fe7a461e93aa238)

    • FHU

    • Avoid calling faccessat on WIN32 (https://github.com/FEX-Emu/FEX/commit/b34401bb33534d559894371630766bf326a9ed01)

    • Fix WIN32 getcpu implementation (https://github.com/FEX-Emu/FEX/commit/70d54122b2f938a30eb2c0db368738bcdd2d56df)

    • Frontend

    • Remove unused ModRMDecoded instance (https://github.com/FEX-Emu/FEX/commit/f9a9645ef310d6d5191ecf80d9a5aa5025397570)

    • Remove redundant lookups in BranchTargetInMultiblockRange() (https://github.com/FEX-Emu/FEX/commit/c81b1c34324e9c13fcbd31c462242ae37a540c62)

    • Handle VSIB byte (https://github.com/FEX-Emu/FEX/commit/4a7fa7f2bcd850ee6074aa3fc2c9fdf9ba0443a7)

    • Github

    • Adds mingw build test workflow (https://github.com/FEX-Emu/FEX/commit/0f748bd7247e959106cfdcf9acc06b90d7d96026)

    • IR

    • Expand to 16-bit opcodes (https://github.com/FEX-Emu/FEX/commit/003c88e53700b68fe124e1ec0521d5dc09ad02a4)

    • Print SSA values as %123 instead of %ssa123 (https://github.com/FEX-Emu/FEX/commit/599b64e9753fe82eddfe9082d69f7a49f0d3d321)

    • Optimize vector TSO loadstore address calculation (https://github.com/FEX-Emu/FEX/commit/810c7d926c0cfab5e302834d27dde0ef7cb79983)

    • Passes

    • Fixes DeadStoreElimination pass (https://github.com/FEX-Emu/FEX/commit/ee66985ae08f562a6bcd8d6aea0e744a4ac37fe5)

    • JIT

    • Use TST instead of CMN (https://github.com/FEX-Emu/FEX/commit/5a53c9231b6616e63a4ef3c62a7bc784f68c2e94)

    • Jit

    • Add block links directly through the lookup cache on thread exit (https://github.com/FEX-Emu/FEX/commit/8d8b64d2b73e4657bc581d361e370c54f404288d)

    • Linux

    • Implement {recv,send}mmsg inside of socketcall (https://github.com/FEX-Emu/FEX/commit/0a5db6c404dd14acd8ffbcc811e802ca41e25358)

    • Implement accept4 inside of socketcall (https://github.com/FEX-Emu/FEX/commit/7c4e4c440970adb6cf5621bbd08a09d13cc73f87)

    • LongDivideRemovalPass

    • Remove unused variable (https://github.com/FEX-Emu/FEX/commit/759747b3c5e01d371153b2f43b80f44a9f26db2f)

    • Mingw

    • Fixes compiling again (https://github.com/FEX-Emu/FEX/commit/dc8f063a4be554f7b30706b28c0b640093fa8f47)

    • OpcodeDispatcher

    • Optimize rotates (https://github.com/FEX-Emu/FEX/commit/25b2af14fdebade8afdc52a5a5bdb40083689862)

    • Optimize phsubsw/phaddsw (https://github.com/FEX-Emu/FEX/commit/76059949eab5fec27d397e0526b589aaf5d355f0)

    • Optimize CMPXCHG{8B,16B} final comparison (https://github.com/FEX-Emu/FEX/commit/6e15c9c213e7812a7c602b437ee97b217037396b)

    • Optimize PSAD* to use vuabdl{2,} (https://github.com/FEX-Emu/FEX/commit/173b70d191500c10f42c33401b92a3f176b964a1)

    • Fixes SHRD by immediate OF flag calculation (https://github.com/FEX-Emu/FEX/commit/52d7efda1030d25a9c9bb655291f7d662cbf7bdc)

    • Optimize 8/16-bit RCR (https://github.com/FEX-Emu/FEX/commit/072f027885b53d384d43a4e714eb47bddb92689e)

    • Another FCMov minor optimization (https://github.com/FEX-Emu/FEX/commit/f7b7997c77917d1f53da84ec3d9f872d84bbea90)

    • Handle VSIB byte (https://github.com/FEX-Emu/FEX/commit/6979dc9c4e5d36bd9db7b0c15516293b6500d735)

    • Remove unused member variables and reorganize (https://github.com/FEX-Emu/FEX/commit/be71886990ae02fc92e45efa71f03f3ae8ba54af)

    • Minor optimization to phminposuw (https://github.com/FEX-Emu/FEX/commit/d3a27951060725188a4a89ab7d3bb7da14f89d3e)

    • Optimize 32/64-bit SH{L,R}D with extr (https://github.com/FEX-Emu/FEX/commit/3cd6c2d91ab96d47e1f4fdc1a024440926510022)

    • Minor optimization to FILD (https://github.com/FEX-Emu/FEX/commit/1b1e9e0fb5888091dfc15d932ed32f64914c3e18)

    • Narrow use of LoadXMMRegister in StoreResult_WithOpSize (https://github.com/FEX-Emu/FEX/commit/68a2441e65c6c0ea6c5517d79122d2fde8a1550c)

    • Fix and optimize PF calculation (https://github.com/FEX-Emu/FEX/commit/1d7b4bb522612f163072b1269293d5726feac7c8)

    • Optimize ADD/ADC OF flag packing (https://github.com/FEX-Emu/FEX/commit/9722c4c5a4f26ff0f20c4811c3c3798090063583)

    • Remove spurious bfe with flag storing (https://github.com/FEX-Emu/FEX/commit/ddd6dbfdcc4daf1a0b602ca01a87e9c23f28c929)

    • Optimize MOVSS to register (https://github.com/FEX-Emu/FEX/commit/7f2557e3221f7d517b84b2f495f29c3fc74ee4e1)

    • Optimize MOVSS to memory destination (https://github.com/FEX-Emu/FEX/commit/0121e858f280b0a270445e344b94a2a85f683146)

    • Optimize some shifts size masking (https://github.com/FEX-Emu/FEX/commit/98eda5e16373221aa5d36cc76958c08a2e35054e)

    • Fixes bug with pcmpestri (https://github.com/FEX-Emu/FEX/commit/592935790e1525684950a5f32b1b61ea5cb244b2)

    • Optimize GetPackedRFLAG (https://github.com/FEX-Emu/FEX/commit/8a4bfba47c94ea43c6e7313f512d4e8d09b2bab4)

    • Optimize MASKMOVDQU and MASKMOVQ (https://github.com/FEX-Emu/FEX/commit/69ea03f0eb4f01a47404d27625f3deffb600c992)

    • RCLSE

    • Rename Node to ValueNode (https://github.com/FEX-Emu/FEX/commit/d83960d4ddca7af4ecd8ff5f30bbeeb65c2f4c49)

    • SignalDelegator

    • Moves last TLS variable to the frontend (https://github.com/FEX-Emu/FEX/commit/b86abfbccf1573d906884974621c649f31fbc481)

    • StructPackVerifier

    • Fixes missing cursorkind again (https://github.com/FEX-Emu/FEX/commit/296adf183003d1dbe7b7ae937e3cf2839a2e717d)

    • Thunks

    • Set bitness flags for 64-bit guests (https://github.com/FEX-Emu/FEX/commit/96aa0a844e8ebba8405b61e78d65c31cc8e4a8ba)

    • Remove weak symbol definitions (https://github.com/FEX-Emu/FEX/commit/ff3b40400c3ab6c379600afad62826c26c321aed)

    • Fixes thunks in non-multiarch (https://github.com/FEX-Emu/FEX/commit/9def04c705b187580c6bf4786067edf8a9e778a7)

    • X11

    • Fixes variadic packing and callbacks. (https://github.com/FEX-Emu/FEX/commit/82295b29435f98e521ac8f4b9645c1b708686e04)

    • xcb

    • Fixes typo in version check. (https://github.com/FEX-Emu/FEX/commit/8c53a373bfbde1a5b314571cd9ecea03f689e93f)

    • ThunksDB

    • Adds X11 dependency to XCB (https://github.com/FEX-Emu/FEX/commit/597da880353b18b9a4e52d435dc347266d22a206)

    • X86Tables

    • Fixes CLZero destination address (https://github.com/FEX-Emu/FEX/commit/5d0b2060e28010c9f8c44f6b1e611b053722cb38)

    • Adds spaceship operator to couple op types (https://github.com/FEX-Emu/FEX/commit/20aaad15e496234673cdc9b3eac1804d3b363093)

    • Misc

    • Fix 16-bit popa insertion behaviour (https://github.com/FEX-Emu/FEX/commit/21eb6e03c724175ae169bd1532b86c59bcaead06)

    • Pack NZCV flags (https://github.com/FEX-Emu/FEX/commit/91bd3aa62a7bf4be94a2c032bb9b3d7a73fc7fd3)

    • Preserve PF across zero shift (https://github.com/FEX-Emu/FEX/commit/abf5e8c6a535662b1439454df39354556c670bcf)

    • Optimize xor %eax, %eax (https://github.com/FEX-Emu/FEX/commit/77c88ffe53bbdabc9b6a304f4d7d57c2e56b637e)

    • github-actions: Adds timeout to upload results (https://github.com/FEX-Emu/FEX/commit/6baee3b7c10f0d61072acd65b3db082de59e831c)

    • fix spelling errors (https://github.com/FEX-Emu/FEX/commit/22f95e627dbed91a0673865838171640f292b08a)

    • unittests

    • Adds missing header (https://github.com/FEX-Emu/FEX/commit/573f3396473f74f3d761b5de9ec56227c9f9c724)

    • gvisor

    • Adds all socket tests to flakes (https://github.com/FEX-Emu/FEX/commit/6f2452e2eab3eb440c8f6127ae91806aedb11515)

    Downloads
    • Source Code (ZIP)
    • Source Code (TAR.GZ)
Powered by Gitea Version: 28.0.0 Page: 50ms Template: 1ms
Auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API