Commit Graph
9533 Commits
Author SHA1 Message Date
Ryan Houdek 921867de7e Works around Clang failing to identify new Kryo CPUs
Some of the newer CPU cores in LLVM's source claim to be a Cortex-A73,
which means they become limited to an ARMv8.0 feature set.

This is what you get if you compile FEX with -mcpu=native

To work around this issue, manually parse /proc/cpuinfo ourselves and
pull out the CPU type to pass to clang directly.
This also fixes the issue that we were using -march on AArch64, which no
longer works on newer clang versions. We instead need to use mcpu or
mtune.

Should improve all atomic op performance outside of the JITs, where they
were turning in to loadstore exclusive pairs.
2021-01-19 03:21:10 -08:00
Ryan Houdek fa542a5b9d Merge pull request #665 from FEX-Emu/skmp/continue-on-invalid-insn
Frontend, OpDisp: Don't assert on invalid instructions
2021-01-18 07:32:31 -08:00
Stefanos Kornilios Mitsis Poiitidis 567e315854 Frontend, OpDisp: Don't assert on invalid instructions 2021-01-18 17:19:11 +02:00
Stefanos Kornilios Mitsis Poiitidis 8ad32a135f Merge pull request #660 from FEX-Emu/skmp/remove-debug-printfs
OpDisp: Remove missed debug printf
2021-01-18 11:32:30 +02:00
Ryan Houdek 108992de80 Merge pull request #653 from Sonicadvance1/add_O0
Adds an option to disable optimization passes
FEX-2101
2021-01-18 00:10:48 -08:00
Stefanos Kornilios Mitsis Poiitidis aa0cd76e06 OpDisp: Remove missed debug printf 2021-01-18 10:03:31 +02:00
Ryan Houdek 544a1f307f Adds an option to disable optimization passes
Instead of forcing someone to test by modifying code, allow a -O0 option
to be passed in.
Also added to FEXConfig GUI for easily touching.

Fixes #652
2021-01-17 23:51:22 -08:00
Ryan Houdek e7315d9a97 Merge pull request #339 from FEX-Emu/skmp/ir-constant-pooling
ConstProp: Allocate constants once per block
2021-01-17 23:49:31 -08:00
Ryan Houdek fbe67db93b Merge pull request #657 from FEX-Emu/skmp/block-ordering
OpDisp: Improved Block Ordering
2021-01-17 23:39:53 -08:00
Ryan Houdek 63f9b62594 Merge pull request #497 from FEX-Emu/skmp/block-linking
Block linking
2021-01-17 23:35:40 -08:00
Stefanos Kornilios Mitsis Poiitidis 8b93d0a278 Tests: Add a basic const pooling test 2021-01-16 17:16:31 +02:00
Stefanos Kornilios Mitsis Poiitidis b322dcb3f6 RA: Spill any node that we can as a last resort 2021-01-16 17:15:35 +02:00
Stefanos Kornilios Mitsis Poiitidis 279a4f3c33 ConstProp: Allocate constants once per block 2021-01-16 17:11:46 +02:00
Stefanos Kornilios Mitsis Poiitidis 1fc9480988 Tests: Add delinking test 2021-01-16 13:24:37 +02:00
Stefanos Kornilios Mitsis Poiitidis eb430815ad Jit: Add Block Linking information 2021-01-16 12:30:32 +02:00
Stefanos Kornilios Mitsis Poiitidis 265dfc5668 Merge pull request #658 from Sonicadvance1/kernel_check
Adds kernel version check to FEXLoader
2021-01-16 00:29:16 +02:00
Ryan Houdek 0e11dea46f Adds kernel version check to FEXLoader
We require kernel 4.17 minimum on the host to run correctly
2021-01-15 13:55:04 -08:00
Ryan Houdek 80dfa76d48 Have SyscallHandler calculate host kernel version 2021-01-15 13:44:08 -08:00
Stefanos Kornilios Mitsis Poiitidis 2e038c788b IREmitter: Fix CreateNewCodeBlockAfter to append at the end when asked so, don't order block storage 2021-01-15 22:22:50 +02:00
Stefanos Kornilios Mitsis Poiitidis 41d0f84710 OpDisp: Improve block ordering interface, optimize branching order and conds 2021-01-15 21:05:29 +02:00
Stefanos Kornilios Mitsis Poiitidis 5fdbb8a9b2 OpDisp: Improve block ordering for multi-block ops 2021-01-15 21:05:29 +02:00
Stefanos Kornilios Mitsis Poiitidis 21d39fed6e Merge pull request #655 from Sonicadvance1/dispatcher_in_perf
Allows JITSymbols to see central dispatcher
2021-01-15 15:26:30 +02:00
Ryan Houdek 8d81a925ee Allows JITSymbols to see central dispatcher
Will let us see in perf how much time is spent there
2021-01-14 13:05:24 -08:00
Stefanos Kornilios Mitsis Poiitidis 225a4bef2d Merge pull request #651 from Sonicadvance1/more_16bit_modrm_fixes
More 16bit addressing mode fixes
2021-01-13 22:20:25 +02:00
Stefanos Kornilios Mitsis Poiitidis 3507328232 JIT/x64: Add block linking for x86_64 2021-01-13 22:16:07 +02:00
Stefanos Kornilios Mitsis Poiitidis c46b932b26 JIT/arm64: Implement block linking 2021-01-13 22:03:46 +02:00
Ryan Houdek 6b7d508401 Adds a couple LEA unit tests for 16bit addressing mode 2021-01-13 12:02:20 -08:00
Ryan Houdek e884525434 Fixes 16bit addr offset calculation
In the case of 16bit addressing mode, the upper bits 16bits are zext
prior to result.
2021-01-13 12:02:19 -08:00
Ryan Houdek 1084ecf2d3 Fixes more 16bit modrm addressing problems
In the case of an instruction that used 16bit addressing mode. It would
calculate the amount of displacement needing to be read using a 32bit
modrm mode. It would then read calculate modrm displacement again and
read the correct number of bytes.

Leftover bytes would then be in a mismatched state which means if an
instruction was using 16bit addressing + modrm + literal at /that/ point
the number of literal bytes remaining would be calculated as a negative.

This didn't actually break things since instructions that have modrm +
literal and can safely use 16bit addressing without breaking in a 32bit
environment is impossible on Linux. Due to the inability to map a memory
range in 16bit range.
2021-01-13 12:02:19 -08:00
Ryan Houdek 96b2c6ca8b Merge pull request #637 from FEX-Emu/skmp/unsyncronized-rip
Dispatch: ExitFunction InlineConstant & unsynchronized rip
2021-01-13 10:58:58 -08:00
Stefanos Kornilios Mitsis Poiitidis f951bc969e Merge pull request #628 from Sonicadvance1/more_syscalls
Implements more syscalls
2021-01-13 20:45:02 +02:00
Stefanos Kornilios Mitsis Poiitidis 8758348dfd Dispatch: Support constant Rips, don't syncronize on context on ddisp 2021-01-13 17:26:40 +02:00
Stefanos Kornilios Mitsis Poiitidis 271d5898fb Merge pull request #642 from Sonicadvance1/fix_llvm_asan
Fixes 64bit ELF loading when LLVM ASAN is used
2021-01-13 12:55:58 +02:00
Stefanos Kornilios Mitsis Poiitidis 0c1510e763 Merge pull request #641 from Sonicadvance1/uninstall_handlers
Uninstalls both the signal delegator and logmanager handlers on shutdown
2021-01-13 12:15:10 +02:00
Stefanos Kornilios Mitsis Poiitidis 709075de58 Merge pull request #639 from Sonicadvance1/fix_32bit_program_header
Makes sure to not calculate zero sized program headers on 32bit
2021-01-13 12:08:00 +02:00
Stefanos Kornilios Mitsis Poiitidis f34f8981ab Merge pull request #638 from Sonicadvance1/irvalidation_memoryleak
Fixes a memory leak in IRValidation
2021-01-13 12:07:33 +02:00
Ryan Houdek 9869a7c576 Disables problematic gvisor test
This also manages to fail on master but for some reason not on the ARM
runners.
2021-01-12 15:04:43 -08:00
Ryan Houdek 433162004a Implements more syscalls 2021-01-12 14:50:17 -08:00
Ryan Houdek 067889c861 Merge pull request #644 from duck-37/faster-pmovmskb
Add specialized case for PMOVMSKB with vector ops
2021-01-12 12:25:50 -08:00
duck ade89bba6a XXX -> TODO 2021-01-12 15:19:45 -05:00
duck 059594cbd3 Add a quick comment for potential optimization 2021-01-12 15:15:41 -05:00
Ryan Houdek f78a342a72 Merge pull request #645 from duck-37/dcse-flags
Make DCSE aware of OP_INVALIDATEFLAGS
2021-01-12 11:50:35 -08:00
duck 501bccdd80 Faster PMOVMSKB, part 2 2021-01-12 14:06:52 -05:00
duck 49afb6bceb Faster PMOVMSKB instruction. 2021-01-12 14:06:51 -05:00
Ryan Houdek 77bbe95cd9 Merge pull request #643 from duck-37/one-byte-horizontal-add-x64
Support one-byte horizontal adds on x64
2021-01-12 11:05:55 -08:00
duck c690e65365 Make sure to only record when necessary 2021-01-12 12:49:49 -05:00
duck 4e3934eddd Make DeadContextStoreElimination aware of OP_INVALIDATEFLAGS 2021-01-12 12:47:32 -05:00
duck 464eb13b93 One-byte horizontal add support on x86-64. 2021-01-12 11:10:16 -05:00
Stefanos Kornilios Mitsis Poiitidis 80771226b8 Merge pull request #640 from Sonicadvance1/fix_test_flakes
Disables killpg tests and reenables a few tests
2021-01-11 19:32:35 +02:00
Ryan Houdek b857d6ba16 Disables killpg tests and reenables a few tests
killpg has been causing us testing problems for a while now.
As we were running more tests it was becoming more likely to hit a test
doing killpg in the background.

All of the tests run under the same process group so it is a significant
race condition to have these running.
Until we improve CI to somehow work around how killpg works, we just
need to have these disabled.
2021-01-11 09:12:02 -08:00