Commit graph

273 commits

Author SHA1 Message Date
Eladash
b1710bb712
SPU Debugger: Implement float registers view + General debugger fixes (#9265)
* SPU Debugger: Fix try_get_insert_mask_info
* Debugger: Always update thread state on context's data change
No longer needing to press on thread's instructions for actions to work!
2020-11-15 08:45:28 +03:00
Eladash
52fa69d93d SPU Debugger: Improve registers panel 2020-11-10 22:51:52 +03:00
Eladash
3cb5fd8ebc Debugger: Implement SPU callstack, fix PPU callstack 2020-11-07 20:45:57 +03:00
Eladash
6dcd482dd0 SPU reservations: Do not illegally dereference reservation data 2020-11-07 14:03:09 +03:00
Megamouse
2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Nekotekina
150e18539c Allow cpu_thread& arg passed to the syscalls
Minor cleanup. cpu_mem(), cpu_unmem() removed.
2020-10-30 17:03:32 +03:00
Nekotekina
006c783aba SPU: make do_dma_transfer() static with _this arg
Instead of this, nullptr will be passed from another thread.
MMIO via MMIO is disabled if it even possible.
2020-10-30 02:58:39 +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
Nekotekina
8ce0819b42 SPU: add stx/ftx counters
Just count pure transaction successes and failures.
2020-10-29 18:57:57 +03:00
Nekotekina
4966f6de73 vm: improve range_lock and shareable cache (Non-TSX)
Allocate "personal" range lock variable for each spu_thread.
Switch from reservation_lock to range lock for all stores.
Detect actual memory mirrors in shareable cache setup logic.
2020-10-27 17:56:19 +03:00
Nekotekina
a806be8bc4 SPU: Implement S1/S2 (SNR) events (closes #8789)
Add TSX path in push_snr()
Add locks bits in ch_events
2020-10-12 21:41:57 +03:00
Eladash
865464f607 SPU Local Storage capture 2020-10-08 19:05:14 +03:00
Eladash
f4ca6f02a1 PPU: Implement support for 128-byte reservations coherency 2020-09-28 22:34:42 +03:00
Eladash
c436ef0c6f
SPU: Implement channels 70, 71, add naming for channel 69 (#8932) 2020-09-19 13:08:35 +01:00
eladash
36ac68b436 SPU: Implement events channel count, minor interrupts fixes 2020-09-18 21:57:24 +03:00
Eladash
9ff0b460a2 SPU: Make PUTLLUC LR event accurate 2020-09-11 09:02:18 +02:00
Nekotekina
ebc4a0188a Restore some code 2020-08-28 01:54:39 +03:00
Eladash
47b545282e
SPU: Fix events ACK, minor optimizations (#8771) 2020-08-27 21:36:54 +01:00
Eladash
e52dd9dc6f
SPU: Implement SYS_SPU_THREAD_OPTION_DEC_SYNC_TB_ENABLE (#8657) 2020-07-30 14:01:25 +01:00
Eladash
82068cf802
SPU: Fix spu_thread::cpu_stop() missed executions (#8656) 2020-07-30 10:07:18 +01:00
Eladash
a029a94c73 SPU: Use waitable atomics for SPU channels interface 2020-07-23 13:45:58 +03:00
Eladash
c37bc3c55c SPU: Make spu_thread::offset private 2020-07-19 17:58:49 +03:00
Eladash
af1ceb1151 SPU LLVM: LS Memory Mirrors (Optimize loads/stores) 2020-07-18 02:01:33 +03:00
Eladash
dc25a3fa2a PPU debugger: Show stack address of each function 2020-07-06 18:58:16 +02:00
Eladash
4405f46aec SPU MFC: Fix SN interrupts 2020-05-20 22:55:30 +03:00
Eladash
9266507e4c SPU: Implement spu_channel_(4_)t::try_read 2020-05-13 19:36:44 +03:00
Eladash
f95b81574f
sys_spu: Fix race in sys_spu_thread_group_destroy and other minor fixes (#8182)
* sys_spu: Fix race in sys_spu_thread_group_destroy and other minor fixes

* SPU: Wait for all threads to have error codes if exited by sys_spu_thread_exit

On last thread in group to run.

* sys_spu: Fix sys_spu_thread_group_start

* fixup ad fix sys_spu_thread_group_terminate

idk why "- !group->running" was put in the first place but its probably no longer relevant due to other changes and was causing other issues such as not always waiting for last SPU thread to set group state to INITIALIZED.
2020-05-11 21:24:04 +03:00
Eladash
09797c3584 sys_spu: Improve sys_spu_thread_get_exit_status 2020-05-10 03:46:11 +01:00
Nekotekina
3ec73b651e SPU DMA: more tuning for mov_rdata_avx
Avoid unaligned stores.
Prefer asm path if __AVX2__ is not set.
Don't emit vzeroupper if __AVX__ is set.
2020-04-27 18:05:52 +03:00
Eladash
a3f2dfa232 sys_isolated_spu 2020-04-17 11:41:50 +01:00
Eladash
ec1e82bc9d SPU debugger: Implement blocking functions dumping 2020-04-14 17:09:58 +03:00
Eladash
13820d6802 SPU debugger: Show channels data 2020-04-03 18:37:21 +03:00
Nick Renieris
1231274e0f CPUThread: Split dump() info to separate methods 2020-04-03 01:36:35 +01:00
Eladash
c11074a128 RawSPU: fix race condition in RunCntl stop request 2020-02-29 21:54:54 +03:00
Nekotekina
65eeee0f4c Remove cancerous lf_value<>
Replace thread names (generic, PPU, SPU) with new shared pointers.
Devirtualize cpu_thread::get_name (used in single case).
2020-02-28 18:54:46 +03:00
Eladash
727d783959 RawSPU: protect NPC from writes/reads in running state 2020-02-18 18:09:10 +00:00
Nekotekina
4bc431ec31 Silence deprecation warning (implicit capture of this on [=]) 2020-02-10 14:47:12 +03:00
eladash
f901846acb RawSPU: execute MFC proxy cmd after reading CMDStatus
Implement MFC proxy argument sequence checking.
2020-02-06 20:43:38 +00:00
Nekotekina
c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +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
ddda09607d SPU: fixup for STOP 0w0 2020-01-21 16:32:00 +03:00
Eladash
9958a83d10 Make spu_channel_4_t::clear() atomic
By removing separate value3 write, fixes a rare race introduced by #6917.
2019-12-31 19:05:06 +03:00
Eladash
3257552227 Minor spu_channel_4_t optimization 2019-12-31 19:05:06 +03:00
Eladash
45cff1219c Allow sys_raw_spu_create_tag to be called more than once 2019-12-30 23:46:45 +03:00
Eladash
5631382623 sys_spu: Fix SPU Thread Id
* Removed wrong code in sys_spu_thread_group_terminate.
* SPU Thread ID is accurate, including 5th thread id "rule".
* Fixed possible use-after-free access of spu_thread::group member.
* RawSPU ID management simplified.
2019-12-06 19:59:29 +03:00
Eladash
b99992d570 sys_spu: Fix SNR and Inbound Mailbox state reset
Also remove bugged ESTAT check at sys_spu_thread_write_spu_mb.
2019-10-29 18:34:28 +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
eladash
95752607ea sys_spu: Don't reset snr config at group_start()
Also first check for EINVAL in sys_spu_thread_set_spu_cfg
2019-10-16 21:11:29 +03:00
Eladash
43f919c04b Fixup after #6143 (#6146)
vm::spu max address was overflowing resulting in issues, so cast to u64 where needed. Fixes #6145.
    Use vm::get_addr instead of manually substructing vm::base(0) from pointer in texture cache code.
    Prefer std::atomic_thread_fence over _mm_?fence(), adjust usage to be more correct.
    Used sequantially consistent ordering in semaphore_release for TSX path as well.
    Improved memory ordering for sys_rsx_context_iounmap/map.
    Fixed sync bugs in HLE gcm because of not using atomic instructions.
    Use release memory barrier in lwsync for PPU LLVM, according to this xbox360 programming guide lwsync is a hw release memory barrier.
    Also use release barrier where lwsync was originally used in liblv2 sys_lwmutex and cellSync.
    Use acquire barrier for isync instruction, see https://devblogs.microsoft.com/oldnewthing/20180814-00/?p=99485
2019-06-29 18:48:42 +03:00
Lassi Hämäläinen
e9e87b8bd9 Add missing #includes to header files
- Multiple header files where missing #includes to other headers that
  where used in the header. Correct header was included in correct
  order in source files which caused everything to compile.
- Added missing #includes so header files correctly include all their
  dependencies and fixes problems with IDEs being unable to parse
  headers correctly due to missing symbols
2019-06-25 17:11:10 +03:00