Commit graph

286 commits

Author SHA1 Message Date
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina d0126f0fa0 Fix freezes in HLE Vdec and SPU LLVM precompilation.
Freezes could accidentally occur on close or ingame.
Deprecate range-for loop on lf_queue.
This is a part of PR #9208

Co-authored-by: Eladash <elad3356p@gmail.com>
2021-02-01 19:14:01 +03:00
Megamouse 7bddb87306 Simplify compile threads 2021-01-31 12:18:32 +03:00
Eladash d3bc96a201 Fix minor issue with usage of STL thread::hardware_concurrency() 2021-01-29 18:23:29 +03:00
Eladash 0652870204 New RSX Debugger 2021-01-28 17:40:26 +03:00
Nekotekina ee288340b0 Implement thread_ctrl::scoped_priority
RAII priority control (+1, or -1)
2021-01-25 21:49:16 +03:00
Malcolm Jestadt 486d48e4f8 SPU LLVM: Optimize ROTQBY family for VBMI
- Avoid masking pshufb index by 0xf by using vpermb instead.
- Also fix conversion of vperm2b index to ShuffleVector index.
2021-01-25 13:18:23 +03:00
Ani 7c62574e59 spu: Restore workers priority after initialization 2021-01-24 16:40:59 +03:00
Nekotekina f9bc682115 Refactor some 'offending' code a bit (no effect)
It appears linkage errors were rare even in debug mode (GCC/clang).
2021-01-18 21:58:28 +03:00
Malcolm Jestadt a2e8e3090c SPU LLVM: Optimize FSM following comparison
- FSM following a comparison instruction can be optimized to a single shuffle instruction
2021-01-17 16:52:44 +03:00
Nekotekina def364fe28 SPU LLVM: add splat_scalar helper
Unrolls into zshuffle from the preferred slot.
2021-01-17 15:13:28 +03:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Malcolm Jestadt c952e99f3e SPU LLVM: Fix edgecase in icelake codegen 2020-12-29 22:01:11 +03:00
Nekotekina bd269bccaf types.hpp: remove intrinsic includes
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Eladash ef884642e4 Cleanup disasm classes a bit 2020-12-21 13:46:26 +03:00
Nekotekina db9b7db531 Cleanup and move sysinfo.h -> util/sysinfo.hpp 2020-12-18 12:55:54 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Megamouse d21f87af5d Fix unresponsive UI during SPU compilation 2020-12-16 11:01:51 +03:00
Nekotekina e39348ad96 Make lf_queue<> compatible with atomic_wait 2020-12-15 19:19:36 +03:00
Nekotekina e321765c54 Split BEType.h to util/v128.hpp and util/to_endian.hpp 2020-12-13 16:34:45 +03:00
Nekotekina 65c04e4ddd Remove constexpr from ppu/spu decoders.
We don't need them at compile time (yet).
But can reduce compile time and complexity.
2020-12-10 15:06:01 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina 5d934c8759 Improve narrow() and size32() with src_loc detection 2020-12-09 16:26:20 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Eladash 28cbba5a7d
SPU LLVM: fix AND instruction family (#9290)
Incorrect immediate test (looks like copypasta)
2020-11-18 14:36:26 +03:00
Nekotekina 1b8bf081b5 Upgrade to LLVM 11 Stable 2020-11-02 21:23:25 +03:00
Nekotekina fe03b55046 TSX: tiny optimization of transaction functions
Because new memory manager puts them in first 2G.
2020-11-01 14:44:59 +03:00
Eladash c2c559f8d9 Disasm: do not allow to access previous instructions in non-interpreter mode 2020-10-31 17:15:47 +03:00
Nekotekina 425fce5070 SPU: load previous data on PUTLLC failure
Since it will most likely execute GETLLAR to load it again.
Only implemented for TSX at moment.
2020-10-30 02:58:39 +03:00
Eladash 4cafd5a31c SPU: Remove dead additions in Accurate Xfloat 2020-10-03 20:31:35 +03:00
Eladash ad37259ccc SPU: Implement many missing channel counts 2020-09-22 19:47:47 +03:00
eladash 36ac68b436 SPU: Implement events channel count, minor interrupts fixes 2020-09-18 21:57:24 +03:00
Eladash 4ffc58a8ce SPU: Cleanup for Accurate PUTLLUC
Should no longer affect GET commands because Accurate DMA is available for this functionality.
2020-09-04 10:20:44 +02:00
Eladash 73d23eb6e6
SPU: Implement Accurate DMA (#8822) 2020-09-02 23:58:29 +02:00
Eladash 47b545282e
SPU: Fix events ACK, minor optimizations (#8771) 2020-08-27 21:36:54 +01:00
Eladash 995cb8125e
SPU LLVM: Improve approx FCGT (#8728) 2020-08-14 19:33:35 +01:00
Whatcookie 9e4f43f4d1
SPU LLVM: Add icelake optimized paths for SHUFB (#8712) 2020-08-13 15:00:56 +01:00
Eladash 8cdfe5952a
SPU/PPU LLVM: Improve 0 addend FMA detection (#8709) 2020-08-13 04:13:08 +03:00
Eladash 57471f8c94 SPU LLVM: Fix signed zeroes handling on Accurate xfloat 2020-08-08 22:21:22 +01:00
Eladash 7e11855330 SPU/PPU LLVM: Fix FMA signed zeroes handling 2020-08-08 22:21:22 +01:00
Eladash f6764767f6 SPU/PPU LLVM: Fix cpu_translator::get_const_vector<v128>() 2020-07-30 17:06:24 +01:00
Eladash 21a1072117 SPU LLVM: Minor cleanup after #8559 2020-07-29 03:32:21 +03:00
Malcolm Jestadt a9d0ffcac1 SPU LLVM: Avoid additional endian swapping
- Avoid additional endian swapping with the ROTQBY and ROTQBYBI instructions
- ROTQBYI is left out intentionally, since it caused worse codegen
2020-07-26 11:36:50 +01:00
Malcolm Jestadt 824be77bba SPU LLVM: Avoid redundant endian swapping
- PSHUFB operates in reverse byte order from SHUFB, so we can take advantage of that to swap endianness without additional transformations in some situations
2020-07-26 11:36:50 +01:00
Whatcookie 9f829b375a
SPU/PPU LLVM: Optimize VSEL/SELB with constant mask (#8559) 2020-07-25 17:59:35 +01:00
Eladash 3354c800d7
SPU/PPU LLVM: Improve expressions matching (#8620) 2020-07-24 16:53:48 +01:00
Eladash c37bc3c55c SPU: Make spu_thread::offset private 2020-07-19 17:58:49 +03:00
Malcolm Jestadt 6cc0fe4221 SPU LLVM: Avoid negative clamping when the input is known to be positive 2020-07-19 17:56:59 +03:00
Eladash af1ceb1151 SPU LLVM: LS Memory Mirrors (Optimize loads/stores) 2020-07-18 02:01:33 +03:00