Alyssa Rosenzweig
44484a7b05
ConstProp: drop non-loadbearing opts
...
every pattern costs us JIT time, but not every pattern is doing anything.
especially with the flag rework of 2023-2024, a lot of patterns just don't make
sense anymore. constant folding in particular isn't too useful now.
only instcountci change is AAD which i'm contractually forbidden from caring
about.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 14:01:32 -04:00
Alyssa Rosenzweig
6ac7ba388f
ConstProp: rm leftover
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
36d0a67070
ConstProp: don't pool with a hash table
...
hash tables have high overhead! but individual blocks are small, so the
quadratic search is _much_ faster in practice. knocks 8% off node.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
0650dd1992
ConstProp: defer initialization
...
for blocks that don't need pooling. hopefully that's most of them.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
e2d58809ed
OpcodeDispatcher: rm dead
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
967a74cda9
OpcodeDispatcher: manually inline constants
...
less work for constprop.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
6cc6181261
OpcodeDispatcher/Flags: dont emit zero
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
f175b525f4
OpcodeDispatcher/Flags: inline constants
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
319f1e66cb
RegisterAllocationPass: eliminate a silly sxtb
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
d16969bdce
RegisterAllocationPass: simplify
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
c17858bfeb
RegisterAllocationPass: don't lookup sources
...
lot of silly chasing. not needed.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
ec24fc3d5d
RegisterAllocationPass: infer AnyRemapped
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
8819fa88d5
RegisterAllocationPass: avoid allocating remaps
...
shaves 6ms off.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 13:38:48 -04:00
Alyssa Rosenzweig
5e9c2110db
Merge pull request #4096 from pmatos/x87Cleanup
...
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
x87 small cleanups; NFC
2024-10-02 12:43:13 -04:00
Alyssa Rosenzweig
5aaa18e7a2
RegisterAllocationPass: remove Class->Allocated
...
not needed anymore.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 12:41:37 -04:00
Alyssa Rosenzweig
8a551b9e64
RegisterAllocationPass: rm leftover comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 12:41:37 -04:00
Alyssa Rosenzweig
aa548bd19c
RegisterAllocationPass: track if we need a remap
...
should be faster on average.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 12:41:37 -04:00
Alyssa Rosenzweig
9565f16d84
RegisterAllocationPass: simplify
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-10-02 12:41:37 -04:00
Paulo Matos
eb76dbdf4d
x87 small cleanups; NFC
2024-10-02 18:27:51 +02: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
Ryan Houdek
49de1fac59
Merge pull request #4028 from neobrain/refactor_jemallocless_tools
...
Build host tools without jemalloc
2024-09-30 11:59:45 -07:00
Ryan Houdek
3c205eb35e
Merge pull request #4094 from Sonicadvance1/strict_unittest_args
...
unittests: Be more strict with -- separator
2024-09-30 11:38:30 -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
Tony Wasserka
8c47a40625
Update jemalloc
2024-09-30 20:35:46 +02:00
Ryan Houdek
ee5c6af868
unittests: Be more strict with -- separator
2024-09-30 11:30:56 -07:00
Ryan Houdek
1670c89b5e
Merge pull request #4090 from Sonicadvance1/update_vulkan_headers
...
Thunks/Vulkan: Updates thunks to v1.3.296
2024-09-30 09:54:15 -07: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
Ryan Houdek
c2f2c58367
Merge pull request #4060 from bylaws/ucrt
...
Windows: Switch supported MinGW CRT to UCRT
2024-09-30 09:31:27 -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:
7d411bd74b
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
LC
e902ad5278
Merge pull request #3946 from Sonicadvance1/vdso_getrandom
...
VDSO: Implements v6.11 vdso getrandom
2024-09-28 15:26:35 -04:00
Ryan Houdek
0f54369f9b
VDSO: Implements v6.11 vdso getrandom
...
This is an interesting vdso implementation because it only exists in
x86-64 with kernel v6.11. For Arm64 the implementation is likely to land
in a couple kernel versions from now.
Some differences with vdso_getrandom versus the regular getrandom
syscall
- Has two additional arguments, opaque_state and opaque_len
- Expects the userspace to mmap/munmap this opaque state structure
- Lets userspace query information about this structure upfront
- If the opaque data structure isn't provided then it falls back to
regular SYS_getrandom
With the "glibc" implementation, we can tell the interface to allocate a
single page that gets unused (otherwise glibc ends up not using the
interface), and fallback to the regular SYS_getrandom.
In the case of the vdso interface, currently the arguments just get
passed through.
Keeping this as a WIP until the ARM64 kernel patches land and I can
actually test the things. Running the "glibc" path works today with the
selftest, but the vdso path is currently completely untested.
2024-09-28 01:06:56 -07:00
LC
f640dcc7a4
Merge pull request #4075 from Sonicadvance1/move_thunkhandler
...
Thunks: Move to the frontend
2024-09-28 03:26:10 -04:00
Ryan Houdek
b59da0e049
Thunks/Vulkan: Updates thunks to v1.3.296
...
Between this version and our previous version v1.3.278 this adds a few
extensions.
- VK_EXT_device_generated_commands
- VK_EXT_depth_clamp_control
- VK_AMD_anti_lag
- VK_KHR_pipeline_binary
These extensions are almost immediately getting picked up by mesa and
the D3D layers, so we want to support them as soon as possible.
Once again updated as described in #2076 . This is starting to take more
time as more features and extensions get added to Vulkan. We probably
want to update the `DefinitionExtract.py` script at some point to
contain all the tertiary data in some json so everything gets generated
automatically. Not doing that today but something to think about.
Fixes #4083
2024-09-27 17:59:31 -07:00
Ryan Houdek
4ae3aef502
Vulkan-Headers: Update to v1.3.296
2024-09-27 17:17:50 -07:00
Ryan Houdek
926fa3c24c
Thunks: Just move code around for a minor cleanup
...
NFC
2024-09-27 15:50:23 -07:00
Ryan Houdek
8c1740f592
Thunks: Remove the temporary TLS variables
...
From prep commit 511103ee5d
.
Now that the frontend is setup, we can remove the temporary TLS
variables and use the ThreadObject directly.
2024-09-27 15:50:23 -07:00
Ryan Houdek
611aa0a5b9
Thunks: Wire up TLS handling in the frontend
...
Because it was moved from the backend to the frontend, re-wire up the
TLS handling which requires going through our syscall handler.
2024-09-27 15:50:21 -07:00
Ryan Houdek
0b8b5108b9
Thunks: Moves AppendThunkDefinitions function to the frontend
...
Backend doesn't need access to this at all
2024-09-27 15:48:31 -07:00
Ryan Houdek
e409a0afec
Thunks: Shift namespace name
...
Moves from FEXCore to FEX::HLE. Also moves the ThunkFunctions that get
exposed to a namespace to make it more obvious that these are
thunkhandlers rather than just static functions.
2024-09-27 15:48:31 -07:00
Ryan Houdek
24211f8523
FEXCore: Move ThunksHandler class to FEXLoader
...
With as little changes as possible, because this is fairly tricky.
2024-09-27 15:48:31 -07:00
Ryan Houdek
94462e4dd0
Thunks: Temporarily add more TLS variables while moving
...
Prep commit to give Thunks the data it needs before moving.
2024-09-27 15:48:31 -07:00
Ryan Houdek
aa44668a41
FEXCore/Thunks: Moves the implementation of LinkAddressToGuestFunction to ContextImpl
...
No functional change, just moving code here.
2024-09-27 15:48:31 -07:00
Ryan Houdek
33a675624c
FEXCore/Thunks: Remove lock passing in AddCustomIREntrypoint
...
This was a legacy feature that is no longer necessary every since we
removed the frontend IRLoader.
2024-09-27 15:48:31 -07:00
LC
5745b419d9
Merge pull request #4045 from Sonicadvance1/stop_using_dlopen_for_vdso
...
VDSOEmulation: Stop using dlopen for VDSO
2024-09-27 18:20:55 -04:00
LC
9100235041
Merge pull request #4077 from Sonicadvance1/frontend_informed_supportsavx
...
SignalDelegator: Let the frontend inform AVX support
2024-09-27 18:15:13 -04:00
LC
4d62e75d5a
Merge pull request #4085 from pmatos/FScaleZero
...
Fix FScale'ing zero that should return zero
2024-09-27 18:13:07 -04:00
LC
b6d3df0e54
Merge pull request #4086 from Sonicadvance1/stop_breaking_x86
...
Stop installing binfmt_misc on x86
2024-09-27 03:34:41 -04:00