Commit graph

188 commits

Author SHA1 Message Date
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina f9a8efe406 SPU LLVM: gisable NewGVN pass
It goes into an endless loop with memory leak for some reason.
2020-02-03 11:16:03 +03:00
Nekotekina 6dfd97f0b6 Modernize SPU logging (spu_log variable) and remove log legacy
Remove legacy macro (LOG_ERROR, etc)
2020-02-01 11:52:52 +03:00
Nekotekina 1d0f359406 logs: add more log channels instead of GENERAL 2020-01-31 16:44:48 +03:00
Eladash a9162a3f57 SPU LLVM: Improve approximate FCMGT 2020-01-26 18:37:07 +00:00
Eladash 160ddcf86b SPU: Minor FREST bugfix 2020-01-21 16:45:41 +03:00
Nekotekina 98a8eeaac2 SPU: properly support STOP 0x0 instruction 2020-01-20 23:40:10 +03:00
Eladash c9b0f0e734 SPU: Fix FREST 2020-01-16 23:42:50 +03:00
Eladash 923cd7ad72 SPU LLVM: rewrite comparison on non-xfloat path of CFLTU, CFLTS
CFLTU on non-xfloat path is accurate as xfloat path now.
* Also optimize FCTIW like FCTIWZ (PPU)
2019-12-30 22:20:34 +03:00
Markus Stockhausen a36f0497ce Improve approximate xfloat
- Disable denormals for SPU threads
- Add clamping helpers
2019-12-22 01:26:34 +03:00
Nekotekina 3b46c9cb6a SPU LLVM: use FMA with approx xfloat when available
Emulate FMA with double precision if unsupported natively.
2019-12-21 17:53:34 +03:00
Nekotekina 28eacc616a C-style cast cleanup III 2019-12-01 00:32:44 +03:00
Nekotekina 1b9a3e6077 SPU: internal refactoring, add spu_program
Use struct (spu_program) instead of std::vector<u32>.
2019-11-26 00:01:38 +03:00
Nekotekina 4caf747729 SPU LLVM: detect mpy32 pattern 2019-11-26 00:01:38 +03:00
Nekotekina db4e201fee SPU LLVM: use updateGlobalMapping instead of addGlobalMapping
...Where appropriate.
Fix to incorrect addGlobalMapping usage.
Also use clearAllGlobalMappings at compilation start.
2019-11-17 22:15:59 +03:00
Nekotekina f30b81f8b0 SPU LLVM: change patchpoint name generation
Allow 2 or more patchpoint from a single address.
2019-11-17 22:07:08 +03:00
Nekotekina abbf3c4d16 SPU LLVM: add SPU profiling to compilation thread
Run another thread to collect profile data from SPU threads.
Use this data to prioritize compiling hot spot SPU blocks.
Implement stx::init_mutex::wait_for_initialized() helper.
2019-11-11 23:13:13 +03:00
Eladash a21d7def33 SPU: Don't break blocks on DSYNC instruction in Safe mode (#6731) 2019-11-11 23:12:21 +03:00
Nekotekina 587ae17aa2 Simplify fmt::throw_exception
Gradual exception deprecation: disallow choosing exception type.
However, the function itself can remain here forever.
2019-11-08 19:27:11 +03:00
Nekotekina da135fbfcc SPU LLVM: Disable "special" branch patchpoints 2019-11-04 22:52:03 +03:00
Eladash 739f68271f SPU LLVM: fix MFC CMD enqueuing 2019-10-29 18:16:08 +03:00
Nekotekina 83f253636a SPU LLVM: verbose patchpoints in "giga table" 2019-10-27 13:04:05 +03:00
Nekotekina 16edb5bdd0 SPU Analyser: don't compile on "analyser failed" 2019-10-27 13:04:05 +03:00
Nekotekina 5f00b32867 SPU: fixup for duplicates in recompilers
Fixup for the edge case.
2019-10-27 13:04:05 +03:00
Nekotekina 37dbbce194 SPU LLVM: Enable "Giga table" in Mega mode
Was previously only enabled in Giga mode.
Also fill the table with branch patchpoints.
2019-10-27 13:04:05 +03:00
Nekotekina 8c28c4e8ec SPU: Make recompilers lock-free. 2019-10-26 23:33:18 +03:00
Nekotekina 9ac6ef6494 SPU: cleanup former OOM handling
Remove cpu_flag::jit_return.
It's obsolete now, and worked only in SPU ASMJIT anyway.
2019-10-26 21:24:12 +03:00
MSuih f3ed26e9db Small warnings cleanup (#6671)
* Ignore more warnings

These are intentional

* Signed/unsigned mismatch when comparing

* Explictly cast values

* Intentionally discard a nodiscard value

* Change ppu_tid to u32

* Do not use POSIX function name on Windows

* Qt: Use horizontalAdvance instead of width

* Change progress variables to u32
2019-10-25 13:32:21 +03:00
Nekotekina b329bb604c SPU LLVM: implemented asynchronous compilation
Implemented interpreter-based pre-recompiler.
Interpreter functions are build with SPU LLVM.
2019-10-21 19:29:34 +03:00
Nekotekina 0fe46934de Fix "SPU Interpreter (fast)"
Regression after #6770
2019-10-16 14:20:35 +03:00
Nekotekina eafbc77c0d SPU LLVM: Always use linux-gnu target triple (affects Windows)
Unify internal code generation to make better use of GHC calling convention.
Ideally, it would just work on Windows as well, but some random bug appeared.
This bug was causing freezes on SPU LLVM compilation.
This commit desperately attempts to workaround it.
2019-10-15 18:04:50 +03:00
Nekotekina c69fe0f664 SPU Profiler preview
Add option "SPU Profiler" (disabled by default).
Works only with SPU recompilers.
Results are flushed on pausing.
2019-10-15 17:42:57 +03:00
Eladash c2278fb879 spu: Mask SRR0 at write 2019-10-08 02:52:33 +03:00
Nekotekina 239f53568c SPU: optimize function dispatch in trampolines
Add a top-level hashtable
2019-10-06 16:03:38 +03:00
Eladash feabe71183 SPU: Rewrite BGX 2019-09-28 03:42:22 +03:00
Eladash e315b39822 SPU: Rewrite CGX 2019-09-28 03:42:22 +03:00
Nekotekina a6edcca6e6 Use g_fxo for spu_cache 2019-09-26 23:26:36 +03:00
Nekotekina 9672ad53cd Fix SPRX building on AppImage builds 2019-08-27 17:25:55 +03:00
Nekotekina 8517ccfdfa Add new typemap for always existing objects
Not to be confused with singletons or global variables.
2019-08-22 02:13:39 +03:00
Nekotekina 1b140c8e97 SPU Recompiler: optimize JIT memory consumption
Avoid rebuilding trampoline for every function at startup.
This should fix Out of Memory error in some cases.
2019-07-19 04:56:35 +03:00
Nekotekina 736ec4035e Fixup for SPU Recompilers, regression after #6210 2019-07-15 19:51:58 +03:00
Nekotekina cb5c26f2b5 Fix SPU Interpreter regression after #6147 2019-07-15 16:34:34 +03:00
msuih 690cdff0d3 Minor fixes
- Fix a typo in OpenAL
- Fix typo in cellHttp.h
- Unused variables in catch
- Use 64-bit shifts
- Use use_count with shared pointers, unique is depracated and getting removed
- Explicitly cast boolean to int
- Signed/unsigned issues with loop variables
- Fix missing return statement (the code path is unreachable, but compiler wants a return)
- */ ouside of comment
- Fix duplicate layout name
2019-07-01 04:33:23 +03:00
Lassi Hämäläinen c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Nekotekina b9b591bf02 Fix SPU Loop Detection 2019-06-20 14:46:32 +03:00
Nekotekina 5d45a3e47d Implement cpu_thread::suspend_all
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
Nekotekina 447029a700 Implement fs::file::write_gather (Vectored I/O) 2019-06-03 23:18:39 +03:00
Nekotekina bf7ee2de4c SPU: fix spu_runtime::g_tail_escape (unused yet) 2019-05-17 23:44:19 +03:00
Nekotekina 2cf139c7a8 SPU analyser: minor Safe fix
Properly handle known indirect branch target as a function call target.
2019-05-17 23:44:19 +03:00
Nekotekina a016728a9e SPU LLVM: re-enable stack mirror
It was disabled due to other bugs which should be fixed now.
2019-05-16 04:12:08 +03:00