Alyssa Rosenzweig
06e6a1b19e
OpcodeDispatcher: optimize logic ops
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
256d166126
OpcodeDispatcher: optimize DAA
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
630285c589
OpcodeDispatcher: optimize SetPackedRFLAG
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
9621eca677
OpcodeDispatcher: fix setrflag masking
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
7eee50d929
OpcodeDispatcher: optimize mul/umul
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
1dc22e33ae
OpcodeDispatcher: inline some flag calculations
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
0ef8aaebeb
OpcodeDispatcher: optimize BZHI
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
d17c427e47
OpcodeDispatcher: optimize non-flagm2 comiss
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
f73fb62c6e
OpcodeDispatcher: optimize V(P)TEST
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
5976b712ca
OpcodeDispatcher: optimize bl*
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
63f5e64adb
OpcodeDispatcher: optimize add/sub
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
34ee3bb8aa
OpcodeDispatcher: optimize clc/stc
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
79c745929a
FEXCore: invert CF internally
...
Flag day change to the ABI.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:06:42 -04:00
Alyssa Rosenzweig
8330cc6876
OpcodeDispatcher: defer carry inverts
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 13:05:21 -04:00
Alyssa Rosenzweig
16e6163677
OpcodeDispatcher: drop unused NZCVIndexMask
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 11:26:12 -04:00
Alyssa Rosenzweig
bbbc0dc9dc
OpcodeDispatcher: fix weird formatting
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-08-10 11:26:12 -04: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
Alyssa Rosenzweig
633f624a69
Merge pull request #3930 from Sonicadvance1/hostfeatures_only_harnessrunner
...
HostFeatures: Removes feature flags always supported by FEX
2024-08-09 15:12:04 -04:00
Ryan Houdek
85d1b573ef
Merge pull request #3927 from bylaws/winafp
...
ARM64EC: Set appropriate AFP and SVE256 state on JIT entry/exit
2024-08-08 22:21:23 -07:00
Ryan Houdek
2f8c5b4820
FEXCore: Pass HostFeatures in to CreateNewContext directly
...
The class constructor for ContextImpl::CPUID requires HostFeatures to be
available at construction time. Pass the host features struct directly
through during construction time instead, which cleans up the interface
slightly and fixes that issue.
2024-08-08 21:02:41 -07:00
Ryan Houdek
a1f55f0b0b
HostFeatures: Removes feature flags always supported by FEX
...
These are only missing if using the hostrunner and the CI machine
doesn't support that particular feature. FEX otherwise always supports
these feature flags so they don't need to exist as options.
Just check the feature bit directly in the HostRunner frontend for these
bits.
2024-08-08 19:05:55 -07:00
Ryan Houdek
1007f874bf
Merge pull request #3926 from bylaws/windef
...
FEXCore: Drop deferred signal handling on Windows
2024-08-08 17:33:44 -07:00
Mai
4882f10536
Merge pull request #3888 from Sonicadvance1/avx128_optimize_blends
...
AVX128: Optimize blends
2024-08-07 17:08:19 -04:00
Billy Laws
fe43a2bcb2
ARM64EC: Set appropriate AFP and SVE256 state on JIT entry/exit
2024-08-07 18:34:35 +00:00
Billy Laws
6700511cdf
FEXCore: Drop deferred signal handling on Windows
...
The async signal issues this handles do not exist on Windows.
2024-08-07 18:31:48 +00:00
Ryan Houdek
e84848b16b
FEX: Moves HostFeatures querying to the frontend
...
This moves the CPU feature querying to the frontend. The primary purpose
here is for the wow64 frontend to not require linux-isms for querying
these features. This is required since non-Linux environments don't have
the "CPUID" feature for reading EL1 MSRs in EL0.
Wiring up the remaining wow64 registry querying is left for a future
exercise.
This also technically removes an xbyak requirement from FEXCore for when
building the x86 Test harness runner, but that doesn't really matter for
regular use cases.
2024-08-07 05:26:02 -07:00
Ryan Houdek
e613876e9d
AVX128: Optimize all cases of vpermq
...
Started by cherry-picking some cases from the variants that appeared when running
Steam, games, AV1 convolve tests, openssl, ffmpeg, libjpeg-turbo,
openh264, libvpx, gemmlowp, libyuv, and dav1d.
Then turned it around and optimized them all since all variants end up
needing to be split in to two halves, that effectively means we need to
have 16 implementations, plus a couple of special cases for duplicated
results.
Fixes #3795
2024-08-06 09:08:30 -07:00
Alyssa Rosenzweig
a7424416d9
Merge pull request #3921 from bylaws/reloadf
...
Arm64Emitter: Reload STATE before SRA fill on ARM64EC
2024-08-06 09:28:23 -04:00
Billy Laws
ccf332d48e
Arm64Emitter: Reload STATE before SRA fill on ARM64EC
...
While ARM64EC code cannot use x28, it can be cleared by the kernel
when performing syscalls etc so restore it from the TEB to be safe.
2024-08-05 17:31:01 +00:00
Ryan Houdek
70c02d5c58
ARM64Emitter: Removes unused vixl CPU object
2024-08-03 22:26:00 -07:00
Ryan Houdek
2e4fb47848
HostFeatures: Read VL ourselves
...
Instead of calling out to vixl
2024-08-03 22:26:00 -07:00
Ryan Houdek
a4d5302369
Arm64: Adds Int helpers
...
One more vixl step removed.
2024-08-03 21:40:28 -07:00
Ryan Houdek
6ff3c90af3
CodeEmitter: Removes vestigial vixl usage
...
- IsImmLogical already existed in our CodeEmitter. We just forgot to
allow nullptr arguments and to use it.
- Adds an equivalent IsImmAddSub helper and uses it
This gets us closer to removing vixl's global initializers from FEXCore.
2024-08-03 21:04:56 -07:00
Ryan Houdek
201fe6ee23
Merge pull request #3909 from bylaws/ec-bitmap
...
Directly use the EC code bitmap for determining page arch
2024-08-02 10:55:43 -07:00
Ryan Houdek
83fedd6c8f
Merge pull request #3912 from bylaws/addroverride
...
Don't apply the address-size flag to segment addresses
2024-08-01 18:35:06 -07:00
Ryan Houdek
c3c2b6115d
Merge pull request #3910 from bylaws/f80
...
F80: Drop dependency on state stored in TLS
2024-08-01 12:03:41 -07:00
Billy Laws
be4777110c
OpcodeDispatcher: Don't apply the address-size flag to segment addresses
...
The address-size flag only applies to the offset from the segment base,
rather than the segment address itself.
2024-07-31 18:14:32 +00:00
Billy Laws
696503680a
F80: Drop dependency on state stored in TLS
...
Windows cannot support the implicit TLS as was used prior, so introduce
a state structure and pass it in to functions where necessary.
2024-07-31 18:51:42 +01:00
Billy Laws
2c4fd79304
FEXCore: Add a generic spill/fill-all syscall ABI and use for Windows
...
Also drop the legacy hangover ABI as it has no users.
2024-07-31 17:25:59 +00:00
Billy Laws
910ec4aadd
Dispatcher: Directly use the EC code bitmap for determining page arch
...
The prior approach using the L2 cache was flawed as it assumed L2
page entries had a 1-1 correspondence with actual pages. While the L2
cache could be extended to handle aliases with EC, this could lead to
thrashing etc. The cost of a lookup in the actual EC code bitmap is
cheap enough to perform every time considering the infrequency of calls
to ARM64EC code when compare to X86 L2 hits.
2024-07-31 17:24:50 +00:00
Billy Laws
fb7275b3d8
Revert: "LookupCache: Track ARM64EC page state in the code cache"
...
This reverts the commit 526e3e654f .
2024-07-31 17:24:50 +00:00
Billy Laws
51b4bfc6a6
FEXCore: Move ARM64EC TEB offset constants to Arm64Emitter
...
These need to be used from outside the dispatcher, and there are already
similar defines for EC registers in the emitter header.
2024-07-31 17:24:50 +00:00
Paulo Matos
5933a59c09
Intersperse flag retrieval and FSW insertion
2024-07-31 12:04:54 +02:00
Paulo Matos
c2136272bf
Reuse Top in ReconstructFSW_Helper
...
This is a non functional. Instead of fetching top again, we use the one
obtained through the fast path calculation.
2024-07-31 11:56:14 +02:00
Ryan Houdek
87fbcf754d
Vector: Optimize pblendw
...
Using a brute force solver to add in more optimized code paths
- Adds 12 single VInsElement implementations
- Adds 4 two IR operation implementations
Not adding any of the two or three IR operation implementations that use
VInsElement because SRA interacts badly and becomes worse than the VTBX
implementation.
2024-07-27 19:25:51 -07:00
Ryan Houdek
403fd62b34
Merge pull request #3890 from Sonicadvance1/refactor_frontend_threadmanager
...
FEXCore: Removes ThreadManager
2024-07-26 13:27:43 -07:00
Ryan Houdek
d92b6a9ac4
Merge pull request #3898 from alyssarosenzweig/ir/creative-refs
...
OpcodeDispatcher/X87: use less creative Refs
2024-07-26 13:26:43 -07:00
Ryan Houdek
c2092bfed0
Merge pull request #3893 from pmatos/FNINITFix
...
Fix call to FNINITF64 and refactor
2024-07-26 13:25:49 -07:00
Alyssa Rosenzweig
5ff09f5091
OpcodeDispatcher/X87: use less creative Refs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-07-26 14:30:42 -04:00
Paulo Matos
d1e36f264f
Fix call to FNINITF64 and refactor
2024-07-26 14:56:06 +02:00