Commit graph

314 commits

Author SHA1 Message Date
scribam
3fd3bd7ca1 spu: Add some "if constexpr" 2020-04-25 14:56:47 +03:00
Eladash
a3f2dfa232 sys_isolated_spu 2020-04-17 11:41:50 +01:00
Eladash
d451a0b7b7 SPU LLVM: Improve FNMS
Should be more accurate with postive/negative zero inputs according to docs while being more optimized.
TODO: Check SPU precise interptreter.
2020-04-09 17:27:14 +03:00
Eladash
158b24ec25 SPU LLVM: Add accurate double-precision FMA support 2020-04-09 17:27:14 +03:00
Nekotekina
7939160178 Shorten SPU LLVM Worker name to SPUW.#
For debugging.
2020-04-07 15:55:30 +03:00
Nekotekina
3eabec0030 SPU: Fix SPU Precise interpreter 2020-04-07 15:42:27 +03:00
Nekotekina
ae140a1ac9 SPU LLVM: improve stack mirror format in Mega mode
Store first instruction for additional validation.
Should fix some problems.
I didn't touch ASMJIT.
2020-04-04 21:40:42 +03:00
Nekotekina
8053d2602a SPU LLVM: implement bisect helper (debugging tool)
Added two new settings: SPU LLVM Lower/Upper Bound
By manipulating values, conditionally avoid compiling programs.
It uses hash of the programs (64-bit start hash of SHA-1).
Programs which aren't compiled run with interpreter.
2020-04-04 21:38:40 +03:00
Nekotekina
a53d0d50b3 SPU LLVM: add alternative ROTQBY implementation
Used if SSSE3 is not available (exec_rotqby).
2020-04-04 21:38:40 +03:00
Nekotekina
f05e24e8e8 SPU LLVM: make LS loads/stores volatile
Fixes PS1 classics and possibly something else.
2020-04-04 21:38:40 +03:00
Nekotekina
dcc269128f SPU LLVM: runtime multithreaded compilation
Active for CPU with 12 or more threads.
2020-03-28 17:17:51 +03:00
Nekotekina
9db088e17b SPU LLVM: log hash in some places 2020-03-28 17:17:51 +03:00
Nekotekina
a936533eb1 Make spu_decoder<> objects constexpr 2020-03-24 12:18:37 +03:00
Nekotekina
04dedb17eb Disable exception handling.
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00
Nekotekina
9dca2887d8 Fixup for Emu.Pause()
Remove some reduntant calls.
Don't pause on unknown sys_fs_fcntl operation.
2020-03-08 22:03:16 +03:00
Nekotekina Aux1
250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina
5b0476e772 Update LLVM to new llvm-mirror (LLVM 11)
Use clang-cl to build LLVM on Windows.
2020-03-03 18:33:02 +03:00
Nekotekina
01db83bc36 SPU LLVM: Rewrite fma32x4 to match FM and older asmjit stuff 2020-03-03 11:31:20 +03:00
Nekotekina
f72971f19f Implement named_thread_group 2020-02-29 16:55:25 +03:00
gamerforEA
93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
JohnHolmesII
479a64c4e8 Remove some inline compiler pragmas 2020-02-23 09:38:04 +03:00
Nekotekina
771eff273b First part of fixing sign-compare warning (inside be_t). 2020-02-19 22:54:58 +03:00
Eladash
727d783959 RawSPU: protect NPC from writes/reads in running state 2020-02-18 18:09:10 +00:00
Nekotekina
8a176de6a1 Restore -Wenum-compare and fix some [=] warnings 2020-02-18 17:37:30 +03:00
Nekotekina
244e74ebe2 Try to ignore some annoying warning (seems CIB) 2020-02-17 20:56:03 +03:00
Megamouse
fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
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