Billy Laws
c578df0bf1
CMake: Support overriding version/hash via CMake args
2025-12-15 15:35:03 +00:00
Tony Wasserka
70eff81f19
CodeCache: Implement cache loading
2025-12-15 16:12:43 +01:00
Tony Wasserka
602ecece50
CodeCache: Clean up OrderedContainer checks
2025-12-15 12:21:41 +01:00
Changwei Miao
98f66d5028
LookupCache: Fix mistake in nested CacheBlockMapping call
...
Signed-off-by: Changwei Miao <chanthmiao@outlook.com >
2025-12-14 15:43:38 +08:00
Ryan Houdek
2a5c1684de
AllocatorHooks: Add missing header
2025-12-07 10:08:59 -08:00
Ryan Houdek
f7eedc1f06
JIT: Fixes typo
...
A previous PR fixed this in the generated SourceOutline.md file. Add the
typo fix back in the file that generates it.
2025-12-05 17:12:24 -08:00
Ryan Houdek
d0e47f9073
Merge pull request #5096 from neobrain/feature_fexofflinecompiler
...
CodeCache: Implement offline compiler for cache generation
2025-12-05 14:47:58 -08:00
Ryan Houdek
45e594e806
Utils/StringUtils: Add in-place token replace helper
2025-12-04 14:02:43 -08:00
Ryan Houdek
4fd1a35b2a
CMake: Disable some installs when building for Steam
2025-12-04 14:02:42 -08:00
Tony Wasserka
983802da61
CodeCache: Add offline compiler for generating caches
2025-12-04 19:16:51 +01:00
Tony Wasserka
49273e0d59
CodeCache: Add workaround for clang-15's broken std::piecewise_construct
2025-12-04 19:16:51 +01:00
Tony Wasserka
76b8459cdc
CodeCache: Zero-initialize FileId in ExecutableFileInfo
2025-12-04 19:16:51 +01:00
Ryan Houdek
9f584c8014
SVE256: Fixes AVX scalar round with insert
...
We were using the incorrect source registers on SVE256 implementation of
these instructions.
Fixes #5100
2025-12-04 01:43:07 -08:00
Ryan Houdek
90c8fcf393
Merge pull request #5094 from pmatos/fix/issue5084
...
Set current code block in x87 pass
2025-12-02 14:43:54 -08:00
Tony Wasserka
994613260c
CodeCache: Support reverse application of relocations
...
This allows code to be serialized consistently across runs.
2025-12-02 22:27:53 +01:00
Tony Wasserka
1430fa8220
CodeCache: Move ApplyCodeRelocations
2025-12-02 18:38:59 +01:00
Tony Wasserka
33e06058c6
JIT: Move ApplyRelocations to CodeCache
2025-12-02 18:38:59 +01:00
Tony Wasserka
b032d1e1f7
JIT: Make relocations relative to guest base before serialization
...
This ensures consistency of generated code caches across multiple runs.
2025-12-02 18:38:59 +01:00
Tony Wasserka
d6b43b1fe6
Dispatcher: Add public interface to query ExitFunctionLinkerAddress
2025-12-02 17:56:56 +01:00
Paulo Matos
f91ac09f87
Set current code block in x87 pass
...
This resets the constant pool in IREmit used by SelectAddressMode().
Fixes #5084 .
2025-12-02 15:33:08 +01:00
Ryan Houdek
e4fa399412
Merge pull request #5091 from neobrain/feature_better_relocations
...
JIT: Prepare FEX relocations for code caching
2025-12-01 13:21:29 -08:00
Tony Wasserka
952e949e10
JIT: Clean up block tail writing code
2025-12-01 20:13:51 +01:00
Tony Wasserka
3d093d66fb
JIT: Change relocation offset base to CodeBuffer start
2025-12-01 20:13:51 +01:00
Tony Wasserka
05fe2893c7
JIT: Emit relocation from IROP_THUNK
2025-12-01 20:13:51 +01:00
Tony Wasserka
6fc17294b6
JIT: Add relocation for guest RIP stored in jump thunks
2025-12-01 20:13:51 +01:00
Tony Wasserka
6607921bee
JIT: Add relocation for guest RIP stored in block tail
2025-12-01 20:13:51 +01:00
Tony Wasserka
0b0793438f
JIT: Add relocation for constants relative to the guest entrypoint
2025-12-01 20:13:51 +01:00
LC
f290d2f899
Merge pull request #5090 from neobrain/refactor_3waycomp
...
IR: Replace hand-written operators with three-way comparison
2025-12-01 14:05:04 -05:00
Tony Wasserka
a676ad7193
JIT: Add explicit padding to relocation descriptors
...
This ensures zero-initialization, which is required to make code cache
generation produce consistent results.
Also consolidated header fields.
2025-12-01 19:28:39 +01:00
Tony Wasserka
096c408ef6
IR: Replace hand-written operators with three-way comparison
2025-12-01 17:10:06 +01:00
Ryan Houdek
39fb266282
Merge pull request #5087 from neobrain/refactor_simpler_calls
...
OpcodeDispatcher: Simplify convoluted logic for computing call offsets
2025-11-28 10:10:22 -08:00
Tony Wasserka
439c6bb3c0
OpcodeDispatcher: Simplify convoluted logic for computing call offsets
2025-11-28 11:32:11 +01:00
Tony Wasserka
5cedbf9d34
LookupCache: Fix use of invalidated iterators
2025-11-28 11:29:46 +01:00
LC
a12b8927bc
Merge pull request #5076 from Sonicadvance1/5
...
Utils/WritePriorityMutex: Support being forkable
2025-11-27 20:38:37 -05:00
Billy Laws
547135dc2d
JIT: Fix indirect delinker branch distance
...
This is in insts not bytes.
2025-11-27 14:42:56 +00:00
Ryan Houdek
1cffe618d2
CPUID: Fixes #5033
...
This leaf changed to being non-constant on that PR since CPUID function
1h returns APICID now.
2025-11-25 11:25:36 -08:00
Ryan Houdek
9c19799023
Config: Document the new FEX_APP_CACHE_LOCATION option
...
I forgot to document this in the man page.
2025-11-24 12:07:54 -08:00
Ryan Houdek
f423b110a8
Utils/WritePriorityMutex: Support being forkable
...
This will be useful to fix the mutex locking mess that occurs currently
when forks occur. Instead of needing to be /very/ meticulous with many
futexes, we can instead have working threads shared_lock this one, then
when a fork occurs just only have the forker themselves unique_lock and
let the readers drain out. Since it's write-priority it'll happen quite
quickly, letting the fork get in and out relatively easily.
This is going to take some massaging to get the frontend and FEXCore to
a place that this works but we can get this simple change in early.
2025-11-24 11:50:20 -08:00
Ryan Houdek
cca5a68e20
SHMStats: Add missing header
2025-11-21 18:01:37 -08:00
Tony Wasserka
e2f4065376
Merge pull request #5065 from Sonicadvance1/1
...
FEXCore/CodeCache: Move spin-loop over to a WFE loop
2025-11-21 14:21:45 +01:00
Ryan Houdek
d3bf87f4f4
Merge pull request #4985 from Sonicadvance1/fex-atomic
...
Support (downstream) kernel-side unaligned atomic handling (The rebase sequel)
2025-11-20 17:09:29 -08:00
Ryan Houdek
6d351ec47f
FEXCore/CodeCache: Moves spin-loop in to a WFE loop
...
Saves power and responds faster. Pass in the atomic to `WaitPred` with
the predicate checking if the buffer has been flushed yet. Same
behaviour as previous code but more efficient on our hardware.
2025-11-20 14:23:01 -08:00
Ryan Houdek
4dc1dd2511
FEXCore/Utils/SpinWaitLock: Adds WaitPred for waiting on a predicate
...
This simplifies the loop a bit and moves the non-predicated exact
matching version to use the predicated version.
We will need a predicated version for the next commit.
2025-11-20 14:23:01 -08:00
Ryan Houdek
5205ae40fa
Merge pull request #5062 from pmatos/fix/address-size-handle
...
Implement address size modifier handling in CMPSOp and SCASOp
2025-11-20 12:19:22 -08:00
Ryan Houdek
387201815b
Config: Add option to enable or disable kernel backpatchin on unaligned atomic
...
Default to enabled because this is the config we expect by default.
In the future will get some benchmarking in various games like
Assassin's Creed, and Call of Duty.
2025-11-20 12:04:59 -08:00
Tony Wasserka
6403da3715
LinuxSyscalls: Shield code map FD from guest access
...
This prevents chromium/CEF from closing the FD.
2025-11-20 19:13:18 +01:00
Tony Wasserka
90cb76312c
LinuxSyscalls: Implement code map writing for future code caching
2025-11-20 19:13:18 +01:00
Tony Wasserka
b34b711161
CodeCache: Add interfaces to describe and generate code maps
...
Code maps describe per-binary metadata used to generate caches. Currently,
this includes compiled block offsets and loaded shared libraries.
2025-11-20 19:13:18 +01:00
Paulo Matos
2cc70b8051
Implement address size modifier handling in CMPSOp and SCASOp for 64bits
...
A few games were generating "Can't handle adddress size".
I implemented 0x67 prefix handling for CMPSOp and SCASOP and improved
the error messages for the remainder. This will implement the address
modifier on 64bit systems, and keep issuing an error on 32bits.
2025-11-20 13:42:19 +01:00
Billy Laws
8c00ac78b1
Linux: Support new two-stage invalidation model
2025-11-20 00:38:03 +00:00