Alyssa Rosenzweig
8e7906a665
IR: add UMaxV
...
will be used to accelerate ptest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:19:22 -04:00
Paulo Matos
85105a6af3
Update instcountci json file
2024-01-29 17:18:02 +00:00
Paulo Matos
027fbbf051
Optimize CDQOp
2024-01-29 17:18:02 +00:00
Paulo Matos
ca31a0404c
ConstProp should generate 32bit constants when required
2024-01-29 17:15:47 +00:00
Paulo Matos
f644959c7c
Fixing some typos; NFC
2024-01-29 17:14:53 +00:00
Alyssa Rosenzweig
10cca02656
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:13:44 -04:00
Alyssa Rosenzweig
16a54742e6
OpcodeDispatcher: optimize 32-bit tzcnt
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
ad9aa0bc87
OpcodeDispatcher: optimize 32-bit lzcnt
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
bd2b3f35a3
OpcodeDispatcher: optimize 32-bit popcnt
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
50169ce640
OpcodeDispatcher: optimize 32-bit pext
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
baae2d68f9
OpcodeDispatcher: optimize 32-bit bextr
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
ad8d038b8a
OpcodeDispatcher: optimize 32-bit blsi
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
820932e3c7
OpcodeDispatcher: optimize 32-bit blsmsk
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
6f11f2e6f4
OpcodeDispatcher: optimize 32-bit blsr
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:11:25 -04:00
Alyssa Rosenzweig
409b6ff6ef
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:08:30 -04:00
Alyssa Rosenzweig
f5ad7682c3
OpcodeDispatcher: optimize 32-bit pdep
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:06:56 -04:00
Alyssa Rosenzweig
04805f351b
JIT: rewrite pdep implementation
...
- use better algorithm that is O(# set bits) instead of O(# total bits)
- eliminate spilling by careful management of our temporaries
- fix nzcv clobber bug (whoops)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:06:56 -04:00
Ryan Houdek
8e3d4a3e02
Merge pull request #3375 from Sonicadvance1/implement_efault_support
...
Linux: Implements a fault safe memcpy routine
2024-01-26 02:15:42 -08:00
Ryan Houdek
0913741343
Linux: Disable EFAULT handler until we find something that uses it.
2024-01-26 01:54:09 -08:00
Ryan Houdek
929193c16c
Linux: Implements support for EFAULT with ppoll's timeout
...
Only need to handle the timeout structure, the rest is handled in the
kernel itself.
2024-01-26 01:54:09 -08:00
Ryan Houdek
69ff984a82
Implements a FEXLinuxTest for testing ppoll EFAULT behaviour
2024-01-26 01:54:09 -08:00
Ryan Houdek
c5ffc0664d
Linux: Implements a fault safe memcpy routine
...
We are required in our syscall emulation to handle cases where pointers
are invalid. This means we need to pessimistically assume a memcpy will
fault when reading application memory.
This implements a signal handler based approach to catching the SIGSEGV
on memcpy and returning an EFAULT if it faults.
2024-01-25 13:50:55 -08:00
Tony Wasserka
c1ef11f034
FEXConfig: Initialize paths before trying to read configuration files
2024-01-25 15:54:25 +01:00
Mai
750b0b70bc
Merge pull request #3356 from Sonicadvance1/modify_code_lock
...
Jitarm64: Implements spin-loop futex for JIT blocks
2024-01-23 13:46:59 -05:00
Ryan Houdek
56d8080ec9
Merge pull request #3345 from Sonicadvance1/fix_syscall_registers
...
OpcodeDispatcher: Fixes syscall rcx/r11 generation
2024-01-22 15:21:13 -08:00
Ryan Houdek
c0be974272
Merge pull request #3368 from bylaws/preprcr
...
FEXCore: Fix RCL/RCR shift wraparound behaviour
2024-01-21 13:44:49 -08:00
Ryan Houdek
0e97f8fb2b
Merge pull request #3366 from bylaws/prep222
...
FEXCore: Use TMP1-4 for values that need preserving across spills
2024-01-21 13:19:34 -08:00
Billy Laws
c4c10d0a16
instcountci: update
2024-01-21 18:15:50 +00:00
Billy Laws
576cf61a96
unittests: Test RC{R,L} wraparound behaviour
2024-01-21 18:15:50 +00:00
Billy Laws
e323938173
FEXCore: Fix RCL/RCR shift wraparound behaviour
...
This ends up being cleaner to handle outside of
CalculateFlags_ShiftVariable as constant masking is only needed for
RCL/RCR.
2024-01-21 18:15:50 +00:00
Billy Laws
407e26bfee
FEXCore: Use TMP1-4 for values that need preserving across spills
...
The ARM64EC SRA layout will use x0-3 for x86_64 registers, as such any
arguments passed to C ABI functions need to proxy their arguments
through the temporaries and move as appropriate.
2024-01-21 16:21:13 +00:00
Ryan Houdek
d04f3a288e
Merge pull request #3377 from neobrain/feature_thunk_flip_nullcheck_order
...
Library Forwarding: Flip order of nullptr check and custom repacking
2024-01-20 06:47:53 -08:00
Ryan Houdek
3bfb4bedd5
Merge pull request #3374 from neobrain/feature_thunk_test_repack_vs_assume_compatible
...
Library Forwarding: Test interaction of struct repacking and assume_compatible_data_layout
2024-01-20 00:15:51 -08:00
Tony Wasserka
fb15cf0db4
Thunks: Flip order of nullptr check and custom repacking
2024-01-19 11:25:07 +01:00
Tony Wasserka
b08d372c78
Thunks: Fix definition of GUEST_THUNK_LIBRARY
...
The -deps target is the wrong target to add this to, since its compile flags
are propagated to both Guest.cpp and Host.cpp. Instead, define the flag only
when processing files within a guest context.
2024-01-19 11:17:44 +01:00
Tony Wasserka
acf48e29b2
FEXLinuxTests/Thunks: Test interaction of struct repacking and assume_compatible_data_layout
2024-01-19 11:17:44 +01:00
Ryan Houdek
162733130c
Merge pull request #3376 from Guztaver/patch-1
...
Improvements to the Dockerfile
2024-01-19 01:53:49 -08:00
Gustavo Muniz
f6ff6c8b44
Improvements to the Dockerfile
...
I added the `pkg-config` that is missing in the Dockerfile, and make the git clone the repository direct from the image, so the user don't need to clone it manually and after that pulls inside the Dockerfile!
2024-01-19 02:27:03 -03:00
Ryan Houdek
6efc4a967c
Merge pull request #3373 from neobrain/feature_thunk_custom_repacking
...
Library Forwarding: Implement assisted struct repacking
2024-01-18 13:56:20 -08:00
Ryan Houdek
a6c57f71e9
SpinWaitLock: Fixes potential extra wait that would occur on contended lock
...
We had a chance of doing an additional bogus wfe if the expected value
was hit in one iteration of a loop. Not the biggest problem on current
hardware where WFE only ever sleeps for 1-4 system cycles, but on future
hardware where WFE might actually sleep for longer then this could have
been an issue.
2024-01-17 10:41:16 -08:00
Ryan Houdek
2af7e997f4
Spinlocks: Fix assembly
...
Need to have a source be +r so it doesn't get overwritten.
2024-01-17 10:19:38 -08:00
Ryan Houdek
ab6c00bbcf
FEXCore/Utils: Rename FutexSpinWait to SpinWaitLock
2024-01-17 10:19:38 -08:00
Ryan Houdek
e18453cb57
Jitarm64: Implements spin-loop futex for JIT blocks
...
This will ensure that multiple concurrent SIGBUS handlers in the same
code block doesn't modify the same code.
2024-01-17 10:19:38 -08:00
Ryan Houdek
39f49782da
Arm64: Move ParanoidTSO checks up out of the non-paranoid code bath
2024-01-17 10:19:38 -08:00
Ryan Houdek
2c5dd20f3c
FutexSpinWait: Implement spin-loop Unique mutex.
2024-01-17 10:19:38 -08:00
Ryan Houdek
136fa78825
FEXCore: Implements an efficient spin-loop API
...
This will only be used internally inside of FEXCore for efficient shared
codecach backpatch spin-loops.
2024-01-17 10:19:38 -08:00
Tony Wasserka
190d8020ff
FEXLinuxTests/Thunks: Add tests for assisted struct repacking
2024-01-15 20:40:13 +01:00
Tony Wasserka
6eaeb48fac
Thunks/gen: Implement assisted struct repacking
...
This can be used to allow automatically handling structures that require
special behavior for one member but are automatically repackable otherwise.
The feature is enabled using the new custom_repack annotation and requires
additional repacking functions to be defined in the host file for each
customized member.
2024-01-15 20:40:13 +01:00
Ryan Houdek
f956f008ea
Merge pull request #3372 from alyssarosenzweig/opt/cmpxchg-review
...
Optimize GPR cmpxchg
2024-01-15 05:11:12 -08:00
Ryan Houdek
be4d1a8860
Merge pull request #3365 from Sonicadvance1/pidof
...
Tools: Adds new FEXpidof tool
2024-01-15 05:10:56 -08:00