Commit graph

66 commits

Author SHA1 Message Date
Nekotekina ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Nekotekina 8abe6489ed Mega-cleanup for atomic_t<> and named bit-sets bs_t<>
Remove "atomic operator" classes
Remove test, test_and_set, test_and_reset, test_and_complement global functions
Simplify atomic_t<> with constexpr if, remove some garbage
Redesign bs_t<> to use class, mark its methods constexpr
Implement atomic_bs_t<> for optimizations
Remove unused __bitwise_ops concept (should be in other header anyway)
Bitsets can now be tested via safe bool conversion
2018-09-03 21:40:36 +03:00
Nekotekina 9578e1e923 SPU LLVM: lower some log levels 2018-08-14 15:14:06 +03:00
eladash f349695a75 Rsx: rewrite address translation 2018-08-13 16:16:34 +03:00
Nekotekina fdd4f03b93 SPU LLVM: improve xfloat precision
Use doubles for intermediate representation
Add option "Accurate xfloat" to enable
2018-08-12 15:42:47 +03:00
Nekotekina 14e6577700 SPU LLVM: improve debugging RPCS3
Build cache in reverse order
Catch exceptions in instruction loop: print IR
2018-08-12 02:42:32 +03:00
Nekotekina 711e0f75ee SPU LLVM: inline WRCH (preview)
With lööps for TSX bróþers
2018-08-12 02:42:32 +03:00
Nekotekina d01bf3bcb0 SPU LLVM: rewrite CGX 2018-08-12 02:42:32 +03:00
Nekotekina d3ad44aec4 SPU LLVM: improve constant propagation
Propagate constants in non-volatile registers between chunks
Disable function table in Mega mode
2018-08-12 02:42:32 +03:00
Nekotekina 9b4e63df6d SPU LLVM: simplify CG, CGX, BG, BGX 2018-07-21 12:18:07 +03:00
scribam 1b0f5b1ed9 spu: improve dfnma instruction 2018-07-09 03:33:05 +04:00
Nekotekina d856dc89a8 SPU LLVM: combine SELB with comparison instructions
Turn bitwise select into a vector select
2018-07-06 02:26:18 +03:00
Nekotekina caf827344f SPU LLVM: improve SHL, SHLH, ROTM, ROTHM instructions
Avoid zero extension, select undef result to zero
2018-07-06 00:33:52 +03:00
Nekotekina b9c026d441 SPU LLVM: improve ROTMA and ROTMAH instructions
Avoid sign extension, clamp shift amount with min op
2018-07-06 00:33:52 +03:00
Nekotekina 2b9fa7ed23 SPU LLVM: combine SHUFB with CWD-alike instructions
Turn SHUFB into a vector insert
2018-07-06 00:33:52 +03:00
Nekotekina 253e8b4466 SPU LLVM: improve SHUFB with constant mask 2018-07-06 00:33:52 +03:00
Nekotekina 622f2f7f66 SPU LLVM: constant computation fixes
Fixed instructions:
Gather Bits: GB, GBH, GBB
Form Select Mask: FSM, FSMH, FSMB
2018-07-06 00:33:52 +03:00
Nekotekina c959ab2698 SPU LLVM: fix constant propagation
Compute constant bitcasts
2018-07-06 00:33:52 +03:00
Nekotekina afd5af04f6 SPU: improve analyser (v5)
Fix jumptable analysis
2018-07-06 00:33:52 +03:00
Nekotekina 712632d28a SPU LLVM: inline RDCH 2018-07-06 00:33:52 +03:00
Nekotekina c1385558ad SPU LLVM: inline RCHCNT 2018-07-06 00:33:52 +03:00
Nekotekina 0910acad42 SPU LLVM: clean NOP/LNOP
Add volatile to state check and update_pc()
2018-07-06 00:33:52 +03:00
Nekotekina 513bac0304 SPU LLVM: refactor halt instructions 2018-07-06 00:33:52 +03:00
Nekotekina a0bf103e8b Implement cpu_translator::pshufb<>()
Remove spu_translator::pshufb<>()
Improve PSHUFB emulation (pre-SSSE3)
Emit static shufflevector for the constant mask
PPU: Inline VPERM instruction
2018-07-06 00:33:52 +03:00
Nekotekina 41eab62ed7 Implement spu_iname helper
Remove old code
Report $SP anomalies
2018-07-06 00:33:52 +03:00
Nekotekina 8ad05ce10e SPU LLVM: fix jt target duplication bug 2018-07-05 22:26:35 +03:00
Nekotekina a999bccc03 SPU LLVM: use cpu_translator::build<> 2018-07-05 22:26:35 +03:00
Nekotekina ded9d1ddfd SPU LLVM: improve function type
Use pointers for args
Use noalias attribute
2018-07-05 22:26:35 +03:00
Nekotekina e4da284176 SPU: analyser v4 and fixes
Build SPU cache after PPU, fix mixing progress
SPU ASMJIT: add support for Giga mode
SPU ASMJIT: use the same spu.log location as SPU LLVM
SPU: improve spu.log disasm
SPU: improve trampolines, unify with SPU ASMJIT
SPU: decode interrupt handler address from BR/BRA at 0x0
SPU LLVM: support Mega/Giga modes
SPU LLVM: implement function chunks
SPU LLVM: use PHI nodes, value visibility across basic blocks
SPU LLVM: implement function chunk table
New simple memory manager for LLVM (bugfix)
2018-06-21 22:29:34 +03:00
Nekotekina 5c9d0e4b46 Add "SPU Cache" option
If disabled, the cache will still be loaded, but never updated.
2018-06-05 12:35:26 +03:00
Nekotekina 5d4c5ecc1c Add "SPU Verification" option
Should be always enabled
2018-06-05 12:35:26 +03:00
Nekotekina 12eee6a19e SPU ASMJIT: Implement Mega block mode (experimental)
Disable extra modes for SPU LLVM for now.
In Mega mode, SPU Analyser tries to determine complete functions.
Recompiler tries to speed up returns via 'stack mirror'.
2018-06-05 12:35:26 +03:00
Nekotekina 11bdb4102a SPU LLVM: implement returnable check_state()
Call it only at the beginning of loop entries
2018-06-05 12:35:26 +03:00
Nekotekina 1e107487da SPU: improve analyser (v3) 2018-06-04 16:01:17 +03:00
Nekotekina 05e24f38f9 SPU: use progress dialog 2018-06-04 16:01:17 +03:00
Nekotekina a2253e840f SPU LLVM: fix *QBI instructions (UB)
Improve codegen at the cost of unnecessary shuffle, use u64[2]
2018-05-30 20:35:35 +03:00
Nekotekina 37577714fa SPU LLVM: emulate PSHUFB
For targets without SSSE3 support
2018-05-30 20:35:35 +03:00
Nekotekina 944e89058e SPU: improve SHUFB 2018-05-30 20:35:35 +03:00
Nekotekina c5d8d50908 Move SPU LLVM log file 2018-05-23 15:36:29 +03:00
Nekotekina 3c70645f0b Update SPU cache (v2)
Improve SPU analyser: filter unreachable fragments
More strict NOP/LNOP analysis
Fill block predecessors info
ASMJIT: fix assertion and improve indirect branch
2018-05-13 20:40:23 +03:00
Nekotekina 7cb4672344 Travis: remove LLVM for now 2018-05-13 00:03:08 +03:00
Nekotekina a77896c1b6 Update LLVM commit, use small code model 2018-05-13 00:03:08 +03:00
Nekotekina be5c18cc85 SPU Re: more precise jt generation
Improve analyser, set v1
Fix branch indirect conditional
2018-05-12 23:50:49 +03:00
Nekotekina fe4c3c4d84 Implement SPU recompiler cache
Shared between ASMJIT/LLVM recompilers, compiled at startup
2018-05-09 23:35:18 +03:00
Nekotekina acfe22e5bc SPU: improve jumptable detection 2018-05-09 22:19:55 +03:00
Nekotekina 8f91917e8c SPU ASMJIT: simplify patchpoints
Remove SPU thread reference from spu_recompiler_base
Disable support for far jumps in pathpoints (they were rare and unsafe)
2018-05-09 22:19:55 +03:00
Nekotekina 1ca51a023c SPU LLVM Recompiler (preview) 2018-05-09 22:19:55 +03:00
Nekotekina 16f5167aed SPU Analyser improved
This restores some functionality removed in SPU ASMJIT v2.0
Also implements new experimental features
2018-05-08 13:05:29 +03:00
Nekotekina 3ffafb741c SPU ASMJIT: übertrampolines and spu_runtime
Use opt-out shared spu_runtime to save memory (Option: SPU Shared Runtime)
Implement "übertrampolines" for dispatching compiled blocks
Patch fixed branch points to use trampolines after check failure
2018-04-22 00:06:49 +03:00
Nekotekina 8ca33bcb94 SPU ASMJIT v2.0
Use X86Assembler and blocks
2018-04-22 00:06:48 +03:00