Commit graph

110 commits

Author SHA1 Message Date
Nekotekina
fe4c3c4d84 Implement SPU recompiler cache
Shared between ASMJIT/LLVM recompilers, compiled at startup
2018-05-09 23:35:18 +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
767dfa271e SPU ASMJIT: internal jumptable
Allow indirect calls within current function using a jumptable
This restores some functionality removed in SPU ASMJIT 2.0
Change SPUThread::get_ch_value prototype
2018-05-08 13:05:29 +03:00
Nekotekina
df453d6d4f SPU ASMJIT: allow holes in raw block data
This is preparation for further changes.
This commit shouldn't affect anything.
2018-05-08 13:05:29 +03:00
Nekotekina
2fecddcde2 SPU ASMJIT: rewrite halt instruction
Use conditional memory access to invalid address.
This approach can allow continue (for debugging);
but at the same time it doesn't add function call to recompiled code.
2018-05-08 13:05:29 +03:00
Nekotekina
738a7cac4f SPU ASMJIT: inline WRCH 2018-04-22 00:06:49 +03:00
Nekotekina
2418de7e8b SPU ASMJIT: inline RDCH 2018-04-22 00:06:49 +03:00
Nekotekina
00ce814501 SPU ASMJIT: inline RCHCNT 2018-04-22 00:06:49 +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
Nekotekina
898637f830 Remove mfc_thread
Clear mfc_queue on reset
Improve MFC Proxy a bit
2018-03-31 21:13:12 +03:00
Nekotekina
445b7c0758 Optimize SPU interpreter
Made SPU decoder similar to PPU decoder
2018-03-01 16:13:35 +03:00
Nekotekina
439a78d12c SPU ASMJIT: rewrite 128-bit shifts by bit
Six instructions changed to use xmm registers instead of gpr.
ROTQBII, ROTQMBII, SHLQBII look better (shifts by imm)
ROTQBI, ROTQMBI, SHLQBI changed for consistency (shifts by variable)
2018-02-08 21:10:03 +03:00
Nekotekina
c7c49ab286 SPU ASMJIT: minor change to ROTH instruction
Only AVX-512 path is changed (third version).
This instruction is extremely rare.
And the code is probably not optimal.
So this commit is pretty useless.
2018-02-08 21:10:03 +03:00
Nekotekina
74834527eb SPU: rewrite ORX instruction 2018-02-08 21:10:03 +03:00
Nekotekina
9b9ac3ca62 SPU: emit VZEROUPPER
Workaround dirty AVX high state
2018-02-08 21:10:03 +03:00
Nekotekina
e2439e962c SPU: use XOP instructions 2018-02-08 20:46:13 +03:00
Nekotekina
84103b69cf SPU: 16-bit shifts for AVX2 2018-02-08 20:46:13 +03:00
Nekotekina
83b541ea9d SPU: rewrite ROTH (AVX-512) 2018-01-03 01:04:04 +03:00
Nekotekina
f271b650da SPU: minor addition for CFLTU, CUFLT 2017-12-29 03:09:35 +03:00
Nekotekina
39a3ed2d03 SPU: minor additions for AVX2+ 2017-12-27 02:51:58 +03:00
Nekotekina
f24491de84 SPU: fixes 2017-12-20 01:21:59 +03:00
Nekotekina
d3198ddf60 SPU: reorder some instructions for better throughput 2017-12-20 00:04:09 +03:00
Nekotekina
6d34dcd75f SPU: add some AVX-512 variants 2017-12-20 00:04:09 +03:00
Nekotekina
4aee4ed6d7 SPU: remove SSSE3 dependency 2017-12-20 00:04:08 +03:00
scribam
50f2be57f7 Spaces to tabs 2017-12-10 16:48:33 +04:00
Jake
d17093e65b spu: Fix interrupt jump check - also change interrupt variable to atomic bool for ease of setting/checking 2017-12-01 20:29:59 +03:00
Jake
8b476b5bfa spu: Recompiler Interrupt optimizations - Pigeonhole optimize for branching pattern that is used to enable and disable interrupts used in code, this should lower amount of blocks that are compiled and avoid falling out of a block - Recompiled interupt check in some cases to stay in block instead of falling out to dispatcher 2017-12-01 20:29:59 +03:00
Jake
ad97780c4f spu: Implement DFCMGT for interpreter and recompiler 2017-12-01 20:29:59 +03:00
kd-11
b338c81907 spu: Fixes (#3526)
* spu: Rewrite interpreter fast FM
- Partially implement accurate FM
- Fix FMA/FMS/FNMS by removing an optimization that does not work for INF (cmpunord)
- cmpunord does not catch all cases of an extended result/overflow
- NOTE: FM still does not handle corner cases well (e.g inf * 1.2 because SPU does not have concept of inf)
2017-10-04 20:58:06 +03:00
mp-t
607d2486ea Code review (#3114)
* Fix always-true conditions in sceNp module

* gl_render_targets: useless check on unsigned variable, possible bug

* fixed UB in crypto utility functions

* copy-paste error in vk::init_default_resources

* pass strings by const ref

* Dont copy vectors. Make sure copies are not needed because functions are used in a multi-threaded context.
2017-08-01 20:22:33 +03:00
kd-11
41d921808b spu: Reimplement FCGT and FCMGT to handle corner cases (such as comparisons against infinites and denormals)
- Also optimize FMA/FMS/FNMS for recompiler
2017-07-08 14:52:16 +03:00
Nekotekina
f010b5b235 Configuration simplified 2017-05-20 16:01:48 +03:00
Zion
c133db6721 Update asmjit submodule (Testers wanted!) (#2782)
* Update asmjit submodule

* Add myself as a contributor 	😉
2017-05-18 14:22:45 +03:00
Nekotekina
463e18f893 Disable SPUJIT.log (opt-in) 2017-04-20 00:52:31 +03:00
Nekotekina
9b43203111 offset32(): pointer-to-member arithmetic 2017-04-20 00:17:16 +03:00
kd-11
65bdcaed29 spu: Check exponent bits in FMA ops (#2683) 2017-04-13 23:02:51 +03:00
Nekotekina
7b65f93953 SPU ch69 2017-03-11 21:55:50 +03:00
Nekotekina
5e3bacbd9b New reservations
Memory system cleanup
sys_memory_get_page_attribute
2017-03-10 15:51:40 +03:00
Nekotekina
3baf79f929 ror64 added 2017-03-04 17:34:59 +03:00
Nekotekina
d2ddb9882f SPU: IRET, SN event 2017-02-13 16:29:32 +03:00
Nekotekina
bdeccd889f cpu_type removed, system_type added
cpu_state -> cpu_flag
vm::stack_allocator template improved
ppu_cmd type changed to enum, cmd64 type added
2016-08-09 17:14:41 +03:00
Nekotekina
a7e808b35b EXCEPTION macro removed
fmt::throw_exception<> implemented
::narrow improved
Minor fixes
2016-08-08 19:19:32 +03:00
Nekotekina
46735d6b3d New bitsets (experimental) 2016-08-08 16:29:37 +03:00
Nekotekina
f8719c1230 PPUThread refactoring
`CallbackManager` removed, added _gcm_intr_thread for cellGcmSys
`PPUThread` renamed to `ppu_thread`, inheritance allowed
Added lightweight command queue for `ppu_thread`
Implemented call stack dump for PPU
`get_current_thread_mutex` removed
`thread_ctrl::spawn`: minor initialization fix
`thread_ctrl::wait_for` added
`named_thread`: some methods added
`cpu_thread::run` added
Some bugs fixes, including SPU channels
2016-07-30 16:35:02 +03:00
Nekotekina
7a921cbdf9 cpu_thread compressed 2016-06-27 16:43:57 +03:00
Nekotekina
6fa5e2cc7c PPUAnalyser.h added 2016-06-19 20:50:21 +03:00
Nekotekina
e2d82394f6 Cell 2016-05-23 16:22:23 +03:00
Ivan
aafcf44581 Header optimizations (#1684)
Shouldn't break anything. I hope.
2016-04-27 01:27:24 +03:00
Nekotekina
c4e99dbdb2 Partial commit: Cell 2016-04-15 19:22:34 +03:00