Ryan Houdek
048e967546
FEXCore: Adds support for CPU Index through TPIDRRO
2024-10-25 15:07:57 -07:00
Ryan Houdek
967c04e252
Merge pull request #4088 from bylaws/winesys
...
ARM64EC: Dynamically determine syscall numbers under wine.
2024-10-01 09:07:35 -07:00
Tony Wasserka
682b8ef705
Build host tools without jemalloc
...
Jemalloc blocks use on platforms with 16K pages.
2024-09-30 20:38:24 +02:00
Ryan Houdek
e9d34c7ded
Merge pull request #4089 from bylaws/wineavx
...
ARM64EC: AVX register save/restore support under wine
2024-09-30 09:46:33 -07:00
Billy Laws
38acd9e18c
ARM64EC: Dynamically determine syscall numbers under wine
...
Takes advantage of the consistent alphabetical syscall ordering that
wine follows.
2024-09-29 19:42:49 +00:00
Billy Laws
21604708ca
Windows: Commonise the linker loadcfg and support CFGuard toolchains
2024-09-29 19:42:13 +00:00
Billy Laws
5fec6faeb6
Windows: Switch supported MinGW CRT to UCRT
...
MSVCRT is deprecated and the reasons FEX used it no longer apply, so
support UCRT and UCRT only.
2024-09-29 19:42:13 +00:00
Billy Laws
b659701cef
ARM64EC: AVX register save/restore support under wine
...
Requires corresponding a wine patch to function:
https://github.com/bylaws/wine/commit/7d411bd74bd03ba90cf202623560733cb229cc7d
Since AVX still works in almost all cases without this, I chose not to
e.g. detect the patch and disable AVX support when it is missing.
2024-09-29 18:59:22 +00:00
Ryan Houdek
f20e626fda
Merge pull request #4059 from bylaws/log
...
Windows: Don't assume the log file was successfully opened
2024-09-11 10:16:14 -07:00
Ryan Houdek
2672e06aa5
Merge pull request #4058 from bylaws/cef
...
ARM64EC: Patch the call checker before calling any syscall exports
2024-09-11 10:16:02 -07:00
Billy Laws
1266a5a5ce
Windows: Support emulated memory overcommit
2024-09-10 16:08:45 +00:00
Billy Laws
7255850e9d
ARM64EC: Patch the call checker before calling any syscall exports
...
CEF on Windows patches these before FEX is even loaded, so this needs to
be setup as early as possible using some direct syscalls which skip any
such patches.
2024-09-10 16:05:37 +00:00
Billy Laws
002a8bebd8
Windows: Cleanup exception handling logic
2024-09-10 16:05:02 +00:00
Billy Laws
0b0e15c9b4
Windows: Don't assume the log file was successfully opened
2024-09-10 15:58:03 +00:00
Billy Laws
621af9e7e8
ARM64EC: Switch to exception-based native syscall dispatch
...
The previous approach assumed that ntdll wouldn't have been patched
before FEX was loaded, but that isn't necessarily the case thanks to
CEF. This takes the same approach used by xtajit which wine recently gained
support for wine. The overhead to this isn't ideal but most syscalls
aren't directly done through x86 code anyway and in the future FEX could
forward unpatched thunks to their ARM variants at JIT time.
2024-09-07 15:30:00 +00:00
Billy Laws
f4d107c8f0
ARM64EC: Split out FEX -> packed EC context conversion from reconstruction
2024-09-07 15:29:48 +00:00
Ryan Houdek
49b40b71a6
Merge pull request #4030 from bylaws/eccfg
...
Windows: Load per-application configs
2024-09-03 16:11:42 -07:00
Ryan Houdek
e415b9443f
Merge pull request #4032 from bylaws/small
...
Windows: Fix missing pragma and license text
2024-09-03 13:47:43 -07:00
Billy Laws
b0474816c7
Windows: Fix missing pragma and license text
2024-09-03 20:30:07 +00:00
Billy Laws
941b065da6
Windows: Fill in per-core MIDR information
2024-09-03 20:29:37 +00:00
Billy Laws
ccba993ca9
Windows: Load per-application configs
2024-09-03 20:25:21 +00:00
Ryan Houdek
c413d7950b
FEXInterpreter: Support portable installs
2024-09-02 09:37:21 -07:00
Ryan Houdek
fbf62f1296
Merge pull request #3998 from Sonicadvance1/move_midr_fetch
...
HostFeatures: Moves MIDR querying to the frontend
2024-08-23 15:19:18 -07:00
Billy Laws
fc2917117e
ARM64EC: Always use the CPU area context for BeginSimulation
...
New wine tests suggest x0 holding the pointer to the correct context is
just a coincidence so avoid relying on it.
2024-08-23 21:43:09 +00:00
Ryan Houdek
0ec724cf1f
HostFeatures: Moves MIDR querying to the frontend
...
The MIDR querying is inherently OS specific and needs a bit of special
casing. Instead let the frontend inform FEXCore how many CPU cores there
are and their MIDRs instead.
This lets us keep the Linux specific code in the frontend.
2024-08-23 00:53:53 -07:00
Ryan Houdek
b6cb897896
Merge pull request #3994 from bylaws/iofix
...
Windows: Fix some file operations on actual Windows
2024-08-22 14:01:56 -07:00
Billy Laws
6aa95d82f2
Windows: Query FileStandardInformation for getting file EOF info
...
FileEOFInformation is write-only on actual windows.
2024-08-22 14:34:45 +00:00
Billy Laws
7c34f449d1
Windows: Translate file open flags passed to NtCreateFile
2024-08-22 14:34:45 +00:00
Billy Laws
e9435203a0
Windows: Fix access() implementation
...
Had the result inverted.
2024-08-22 14:33:06 +00:00
Billy Laws
8d9ba0e102
ARM64EC: Fix ContextFlag member tests
...
There is a common arch bit that is included in each individual mask,
explicitly test for equality against the whole mask to avoid just
testing for this.
2024-08-22 14:31:11 +00:00
Ryan Houdek
eadb502059
Merge pull request #3978 from bylaws/create
...
Windows: Implement CreateDirectoryW CRT function
2024-08-20 11:39:57 -07:00
Ryan Houdek
8e1695afa3
Merge pull request #3977 from bylaws/wowex
...
WOW64: Improve exception handling
2024-08-20 11:39:22 -07:00
Ryan Houdek
1caa31c5cb
Merge pull request #3962 from Sonicadvance1/remove_vixl_requirement
...
HostFeatures: Removes vixl usage
2024-08-19 14:31:13 -07:00
Billy Laws
9067f3513a
Windows: Implement CreateDirectoryW CRT function
...
Used when the .fex-emu config dir doesn't exist. Also fixes up
CreateFile to not leak memory.
2024-08-19 19:11:17 +00:00
Billy Laws
409d691877
WOW64: Only handle unaligned atomics in JIT code
2024-08-19 19:07:30 +00:00
Billy Laws
1762ff0393
WOW64: Spill EFlags into the FEX state when reconstructing JIT context
2024-08-19 19:07:30 +00:00
Billy Laws
4d26178f25
Windows: Commonise guest exception handling logic and use for WOW64
2024-08-19 19:07:29 +00:00
Ryan Houdek
33cef7c8cd
CRT: New symbols that fmt uses
2024-08-18 13:21:17 -07:00
Billy Laws
ea6c05a46a
Windows: Install libraries to CMAKE_INSTALL_LIBDIR
2024-08-16 23:43:55 +00:00
Ryan Houdek
40d12c4d0e
HostFeatures: Removes vixl usage
...
If we query the CPU flags ourselves then vixl is no longer a
compile-time or runtime dependency unless the vixl disassembler or
simulator is built.
A bit spicy from all the feature bits we need to load up.
2024-08-16 08:36:52 -07:00
Ryan Houdek
ef4c4f6e9b
FEXCore: Disable vixl linking if vixl disasm or simulator is disabled
...
This was mostly there, just needed to remove some extraneous headers and
only insert vixl in to the library list if the options were enabled.
2024-08-16 07:29:41 -07:00
Ryan Houdek
df0ecad15b
Merge pull request #3933 from bylaws/arm64-suspend
...
Support cooperative suspend on ARM64EC
2024-08-15 01:22:28 -07:00
Billy Laws
16b007df33
Windows: Partially implement the registry read API
2024-08-13 13:31:32 +00:00
Billy Laws
3cbc421c7e
Windows: Detect CPU features using the registry
...
Native Windows does not support ID instruction emulation, instead it
populates registry keys containing their values.
2024-08-13 13:31:32 +00:00
Ryan Houdek
03ca3e7e68
Merge pull request #3934 from bylaws/wow64-b
...
WOW64: Support the JIT API as used by Windows
2024-08-10 09:07:58 -07:00
Ryan Houdek
2c3e6cbe65
Merge pull request #3932 from bylaws/arm64-callchk
...
ARM64EC: Install a custom call checker to bypass NTDLL function patches
2024-08-10 09:07:31 -07:00
Ryan Houdek
0ecfc651b6
Merge pull request #3931 from Sonicadvance1/move_hostfeatures_init
...
FEXCore: Pass HostFeatures in to CreateNewContext directly
2024-08-09 20:30:17 -07:00
Ryan Houdek
4a3250ddea
Merge pull request #3928 from bylaws/winval
...
InvalidationTracker: Better match Windows code invalidation behaviour
2024-08-09 20:29:57 -07:00
Billy Laws
ea4004ec9d
ARM64EC: Support cooperative suspend
...
When a suspend request occurs on a running thread, Windows gives the JIT
~10s to pause and NtContinue with the x86 context. Resumption is then
done through BeginSimulation.
2024-08-09 14:34:17 +00:00
Billy Laws
26a8a2717c
WOW64: Mark the CPU area context as dirty initially
...
After thread creation, the WOW64 CPU area context needs to be flushed
into the FEX state before entering the JIT. Wine explicitly calls
BTCpuSetContext to trigger this but Windows doesn't.
2024-08-09 11:57:09 +00:00