Alyssa Rosenzweig
ee339b5960
OpcodeDispatcher: optimize POPA
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
881c940693
OpcodeDispatcher: optimize POP
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
900c62fa7b
OpcodeDispatcher: add Pop helpers
...
hide away the allocate dance
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
200c6c054f
IR: introduce POP operation
...
rmw on a source, kind of terrible.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
bc0927b7b1
JIT: optimize moves for cmpxchg
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
231c28395c
RegisterAllocationPass: clean up after pair removal
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
64a45c0d29
IR: remove pairs
...
They're now unused. And won't be missed.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
cab02be637
IR: remove unused pair create/extract
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
74f341bc0e
IR: remove pair from cpuid
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
feaa1af1a8
IR: remove pair from XGetBV
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:37:06 -04:00
Alyssa Rosenzweig
d59d040b4e
IR: add design doc breadcrumb
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
a9c26cbf71
IR: add coalescing heuristics for pair replacements
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
f4b5c4e69a
OpcodeDispatcher: allow upper garbage for cmpxchg
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
b8cac9f7d5
JIT: avoid some moves with caspal
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
13974df204
IR: drop CASPair pair result
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
fa6fe9bf06
IR: drop cmppairz pairs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
746be0824e
IR: drop CASPair source pairs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
93120cabbb
IR: drop pair from memcpy
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
04ae05f4ce
IR: add hack for multiple destinations
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
83773dddc7
IR: fix size for cmppairz
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Alyssa Rosenzweig
9813553f02
json_ir_generator: introduce multidestination hack
...
We now have two types of destinations:
* regular destinations. These are SSA. You get exactly 1 per instruction. This
is what almost every instruction should use.
* special destinations, introduced here. These are *not* SSA. They must be
allocated with a special instruction (added later in this PR), and then they
are mutated by the instruction. There are two types, either pure destinations
("out") or read-modify-write source+destinations ("in-out"). The former are
useful for instructions that return multiple destinations, like Memcpy. The
latter are useful for instructions that need a source tied with a special
destination (currently just Pop, introduced later in this series).
Special destinations reuse the mechanism of sources, to get around the
limitations on regular destinations in our current IR. Ops with special
destinations desugar to ops with no destination but extra sources prefixed Out
or Inout.
They further require HasSideEffects so we don't optimize ourselves into corners.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-14 09:17:23 -04:00
Ryan Houdek
924723d433
LinuxSyscalls: Some minor cleanups
...
- We can have the SyscallFunctionDefinitions be the correct size out of
the gate. Both tables are always 512 entries in size.
- In the RegisterSyscall_{32,64} handlers, just get the reference using
operator[]. We always know we will be under the size of the array, add
a an assert to check. Removes a bit of vector range checking overhead.
- Namespace 32-bit syscalls like 64-bit syscalls and include in the
regular header like 64-bit. This was just an oversight
- Use std::fill for the syscall gap for the invalid syscall, just a
minor cleanup.
No functional change.
2024-08-13 14:06:16 -07:00
Ryan Houdek
33558e63c4
Merge pull request #3950 from alyssarosenzweig/bug/flagm-ci
...
InstructionCountCI: explicitly enable flagm for multiinst
2024-08-13 13:49:11 -07:00
Ryan Houdek
97c229d5eb
Merge pull request #3935 from bylaws/win-feats
...
Windows: Support CPU feature detection from ID registry keys
2024-08-13 13:40:54 -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
Billy Laws
890e5e1f0f
FEXCore: Support disabling host cacheline clean/clear operations
2024-08-13 13:25:34 +00:00
Billy Laws
6b98454f03
HostFeatures: Split out vixl feature and CTR/MIDR detection
2024-08-13 13:25:34 +00:00
Alyssa Rosenzweig
b05329c8df
InstructionCountCI: explicitly enable flagm for multiinst
...
Closes: https://github.com/FEX-Emu/FEX/issues/3949
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 09:09:07 -04:00
Ryan Houdek
6f43c8ffac
Merge pull request #3947 from alyssarosenzweig/opt/littles
...
Little opcodedispatcher optimizations
2024-08-13 05:54:47 -07:00
Alyssa Rosenzweig
ffac98051f
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Alyssa Rosenzweig
40812efaae
OpcodeDispatcher: better handle SIB indexing
...
if we have shift and a constant, we can save an instruction
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Alyssa Rosenzweig
3429321d59
OpcodeDispatcher: allow upper garbage for MOVGPR
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Alyssa Rosenzweig
6cddd6cbe7
OpcodeDispatcher: allow upper garbage for a2/a3
...
stores mask.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Alyssa Rosenzweig
23d07d7d0c
OpcodeDispatcher: fix folding negative offsets for 32-bit
...
I don't know what I was thinking when I wrote that code. Drop the silly logic
and let ConstProp inline the immediates. This fixes a lot of silly code
generated for 32-bit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Alyssa Rosenzweig
1351575713
InstructionCountCI: add fpemu blocks
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-13 08:41:16 -04:00
Ryan Houdek
8aa7d1a278
Merge pull request #3939 from alyssarosenzweig/opt/cfinv
...
Invert carry flag internally
2024-08-13 01:05:54 -07:00
Ryan Houdek
fb60a8a032
Docs: Update for release FEX-2408
FEX-2408
2024-08-12 15:05:37 -07:00
Alyssa Rosenzweig
f40bc134df
Merge pull request #3945 from Sonicadvance1/config_nonnullable
...
Config: Little assume non-null check
2024-08-11 15:23:37 -04:00
Ryan Houdek
f3811f04bd
Config: Little assume non-null check
...
Removes a simple runtime nullcheck in Config::Layer::Set. Since we never pass a
nullptr to this.
2024-08-11 10:25:53 -07:00
Alyssa Rosenzweig
94bb7eb311
Merge pull request #3937 from Sonicadvance1/fix_script
...
Scripts: Fix issue in aarch64_fit_native
2024-08-10 20:07:43 -04:00
Alyssa Rosenzweig
3383786205
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 15:21:08 -04:00
Alyssa Rosenzweig
91f4c54768
OpcodeDispatcher: optimize RDRAND on flagm
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 15:21:08 -04:00
Alyssa Rosenzweig
d9c779289c
OpcodeDispatcher: simplify RDRAND
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 15:18:00 -04:00
Alyssa Rosenzweig
5631ff4fd5
OpcodeDispatcher: optimize variable shifts
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00
Alyssa Rosenzweig
34301319bf
OpcodeDispatcher: optimize IncrementByCarry
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00
Alyssa Rosenzweig
8eac3198b6
OpcodeDispatcher: use carry increment for ADC
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00
Alyssa Rosenzweig
832edd4da3
OpcodeDispatcher: use carry increment for SBC
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00
Alyssa Rosenzweig
5823e74bcd
OpcodeDispatcher: use increment carry for atomics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00
Alyssa Rosenzweig
a4545f493e
OpcodeDispatcher: add IncrementByCarry helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2024-08-10 13:06:43 -04:00