Commit Graph
9533 Commits
Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis a2ffbfedb3 CondJump: Add x86 and ipr backends 2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis f9f80b77e5 CondJump/Arm64: Use cbnz/cbz if faster 2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis 709f5cd925 CondJump: Now with cmp/b.cc support 2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis eafe853c75 CondJump: Switch to two arguments + Cond for flexible branching 2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis 009244c5e0 Merge pull request #488 from FEX-Emu/skmp/improved-select
Select: Add compare & Data sizes, cset/setcc specializations
2020-11-06 10:43:33 +02:00
Stefanos Kornilios Mitsis Poiitidis 2e6a3febfb Merge pull request #491 from FEX-Emu/skmp/cc-refactor
OpDisp: jCC, setCC & cmovCC refactor
2020-11-06 09:11:02 +02:00
Stefanos Kornilios Mitsis Poiitidis 0f18548117 Merge pull request #493 from FEX-Emu/skmp/constprop-inline-consts
ConstProp: Do inline constants in a separate loop
2020-11-06 09:09:06 +02:00
Stefanos Kornilios Mitsis Poiitidis 547b00cbb4 Merge pull request #483 from FEX-Emu/skmp/mul-arm64-less-exts
MUL: remove zext/sexts from 32 bit form
2020-11-06 09:06:54 +02:00
Stefanos Kornilios Mitsis Poiitidis a10eb9e11f Merge pull request #485 from FEX-Emu/skmp/jitsymbols-hostaddr
JitSymbols: Append HostAddr to name
2020-11-06 09:01:40 +02:00
Stefanos Kornilios Mitsis Poiitidis 1b4bc6562c Merge pull request #484 from FEX-Emu/skmp/ir-writer-fixes
IR: Fix writer to handle more RA classes
2020-11-06 09:00:28 +02:00
Stefanos Kornilios Mitsis Poiitidis aea18a3c03 Merge pull request #480 from FEX-Emu/skmp/fallthrough-branching
JIT: fallthrough branching
2020-11-06 08:59:41 +02:00
Stefanos Kornilios Mitsis Poiitidis 1b3683c065 MUL: remove zext/sexts from 32 bit form 2020-11-06 08:55:58 +02:00
Stefanos Kornilios Mitsis Poiitidis 4bb6d6bde6 Merge pull request #481 from FEX-Emu/skmp/dynamic-shift-flags
Dynamic Shifts: use Selects instead of branches for flags
2020-11-06 08:53:55 +02:00
Stefanos Kornilios Mitsis Poiitidis 9d4e498904 Merge pull request #464 from FEX-Emu/skmp/fix-dce
DCE: Needs reverse iteration to be effective
2020-11-06 08:52:06 +02:00
Stefanos Kornilios Mitsis Poiitidis 0a0ad78ee2 ConstProp: Do inline constants in a separate loop 2020-11-06 03:41:07 +02:00
Stefanos Kornilios Mitsis Poiitidis 790618cea9 RCLSE: Enable VMOV cases 2020-11-06 02:47:04 +02:00
Stefanos Kornilios Mitsis Poiitidis de5ae1fe13 RCLSE: Handle more cases 2020-11-06 01:59:03 +02:00
Stefanos Kornilios Mitsis Poiitidis 81214ca556 RCLSE: Also optimize when Access is ACCESS_PARTIAL_READ 2020-11-06 01:59:03 +02:00
Stefanos Kornilios Mitsis Poiitidis d0ec2f66cf Merge pull request #492 from FEX-Emu/skmp/fix-spills
Fill/SpillRegister: Spill based on register class
2020-11-06 01:58:22 +02:00
Stefanos Kornilios Mitsis Poiitidis d6fa850b68 Fill/SpillRegister: Spill based on register class 2020-11-06 01:42:04 +02:00
Stefanos Kornilios Mitsis Poiitidis 49d3bafd9a OpDisp: jCC, setCC & cmovCC refactor 2020-11-06 00:37:10 +02:00
Stefanos Kornilios Mitsis Poiitidis 5fa5e49c58 IR: Add DeadGPRStoreElimination
This is based on the Flag Elimination pass, and is not optimal - but does eliminate quite a few dead stores.
2020-11-05 23:57:57 +02:00
Stefanos Kornilios Mitsis Poiitidis 2abfe71c42 Select: Add compare & Data sizes, cset/setcc specializations
- CompareSize can be 4 or 8
- DataSize can be 4 or 8
- Support for INLINE_CONSTANTS for `Select cmp1,cmp2,1,0` that specializes to cset / setcc
2020-11-05 19:46:57 +02:00
Stefanos Kornilios Mitsis Poiitidis 3e84aaa43a Fallthrough: Fixes, x86 impl 2020-11-05 13:30:15 +02:00
Stefanos Kornilios Mitsis Poiitidis fa8f503feb JitSymbols: Append HostAddr to name 2020-11-05 12:43:24 +02:00
Stefanos Kornilios Mitsis Poiitidis a5212fb4a8 IR: Fix writer to handle more RA classes 2020-11-05 12:41:44 +02:00
Stefanos Kornilios Mitsis Poiitidis 6c0552f145 Dynamic Shifts: use Selects instead of branches for flags 2020-10-30 18:26:40 +02:00
Stefanos Kornilios Mitsis Poiitidis cc311554d2 Frontend: Sort blocks for better branching 2020-10-30 17:50:18 +02:00
Stefanos Kornilios Mitsis Poiitidis 400321bc53 Arm64: Avoid branches to next block of possible 2020-10-30 17:49:07 +02:00
Stefanos Kornilios Mitsis Poiitidis 462cb39043 Merge pull request #478 from Sonicadvance1/x87_double_pop
Fixes FCOMPP, FUCOMPP, and FCOMP
2020-10-28 16:23:38 +02:00
Ryan Houdek 4b6914ad80 Implements unit tests to test the stack popping
Only tests the stack popping for FCOMP, FUCOMP, FCOMPP, and FUCOMPP.
2020-10-27 23:11:30 -07:00
Ryan Houdek 34625441cb Fixes FCOMPP and FUCOMPP
These two instructions pop the x87 stack twice which we didn't support
Repurposes the dead pop template argument to be a "pop twice".
Everything else falls down the table flag information comparison
2020-10-27 23:09:17 -07:00
Ryan Houdek d3d57d48a0 Fixes missing pop flag in x87 table
FCOMP didn't have POP set so it wans't popping the stack.
FFREEP also didn't have it, but it was handled explicitly in the
dispatcher
2020-10-27 23:08:17 -07:00
Ryan Houdek b8b99e7f85 Merge pull request #475 from Sonicadvance1/fix_32bit_x87
Fixes 32bit x87 usage
2020-10-25 11:21:50 -07:00
Ryan Houdek 7f4836b982 Fixes 32bit x87 usage
All of the ops that were relying on a 64bit memory offset were being
downgraded to 32bit.

Abuses the XMM_FLAGS option a bit to indicate that it shouldn't
downgrade the 64bit size flag. Which isn't an issue since all these
operations can't encode a register since modrm_r is used for table
decoding
2020-10-25 11:17:00 -07:00
Stefanos Kornilios Mitsis Poiitidis 82d9b28563 Merge pull request #476 from Sonicadvance1/initial_sse4_1
Adds some initial SSE 4.1 ops
2020-10-25 06:44:58 +02:00
Stefanos Kornilios Mitsis Poiitidis 13dc69987c Merge pull request #474 from Sonicadvance1/more_32bit_fixes_2
More 32bit related fixes
2020-10-25 06:40:27 +02:00
Ryan Houdek f6c2ee40d1 Adds some initial SSE 4.1 ops
These are being used unconditionally by the steam client (browser?) and
Minit.

Push out the initial implementation without unit tests just to get
further.
Would be nice to figure out why these are using these ops instead of
checking if it is supported.
2020-10-24 21:34:23 -07:00
Ryan Houdek 4700edaac4 Merge pull request #465 from FEX-Emu/skmp/inline-const
IR/JIT: Inline constants
2020-10-22 19:33:13 -07:00
Ryan Houdek 9cf047317d Adds unit tests for 32bit segment register push and pop
This only tests to ensure we are pushing the correct amount data rather
than the segment registers being correct.

Bit difficult to test for anything other than null descriptor
2020-10-22 19:10:28 -07:00
Ryan Houdek 68f3a04f5b Adds unit tests for 32bit popa 2020-10-22 19:10:28 -07:00
Ryan Houdek d6c3518b74 Adds unit tests for 32bit pusha 2020-10-22 19:10:28 -07:00
Ryan Houdek 2a81468663 Adds a new test for push 8bit immediate
On 64bit this will operate as a 64bit or a 16bit push, with the
immediate being sign extended.

We were only previously testing the 64bit variant
2020-10-22 19:10:28 -07:00
Ryan Houdek c050e094da Adds four new 32bit push and pop ops
push and pop for segment registers and the push/pop all instructions
2020-10-22 19:10:28 -07:00
Ryan Houdek 9888141feb Some more table fixes 2020-10-22 19:10:28 -07:00
Stefanos Kornilios Mitsis Poiitidis 93e372c7a4 IR/JITs: Inline Constants Implementation
Based on @phire's idea, Inline constants are constants that can be used as imms in instructions.

This
- Adds OP_INLINECONSTANT to represent them in the IR
- Modifies the ConstProp pass to transform OP_CONSTANT to OP_INLINECONSTANT based on per-platform heuristics
- Modifies the backends to use imms
- Supported opcodes: Add, Sub, Lsl, Lsr, Asr, Ror, Rol
2020-10-22 18:49:17 +03:00
Stefanos Kornilios Mitsis Poiitidis ae3261df08 Merge pull request #472 from Sonicadvance1/fix_set_roundingmode_arm64
Fixes SetRoundingMode on AArch64 JIT
2020-10-21 12:03:15 +03:00
Stefanos Kornilios Mitsis Poiitidis e8efb399f8 Merge pull request #471 from Sonicadvance1/static_sonicutils
Switches SonicUtils over to be a static library
2020-10-21 11:55:35 +03:00
Stefanos Kornilios Mitsis Poiitidis b6fa4cfe2f Merge pull request #470 from Sonicadvance1/fix_ppoll
Fixes 64bit ppoll
2020-10-21 11:54:40 +03:00
Ryan Houdek 5af576b554 Fixes SetRoundingMode on AArch64 JIT
Just needed to make sure to use the right register size
2020-10-21 01:31:08 -07:00