Nekotekina
346a1d4433
vm: rewrite reservation bits
...
Implement classic unique/shared locking concept.
Implement vm::reservation_light_op.
2020-10-10 13:58:48 +03:00
Eladash
865464f607
SPU Local Storage capture
2020-10-08 19:05:14 +03:00
Eladash
493e57837b
SPU: Fix extremely rare bug of GETLLAR ( #9011 )
2020-10-03 09:31:28 +01:00
Eladash
56cebd99c2
SPU: Simplify logging of MFC commands ( #9004 )
2020-10-01 19:52:39 +03:00
Eladash
f4ca6f02a1
PPU: Implement support for 128-byte reservations coherency
2020-09-28 22:34:42 +03:00
Eladash
09cddc84be
SPU/PPU: Implement Atomic Cache Line Stores
2020-09-27 20:09:21 +03:00
Eladash
bfa78870cb
SPU: Fix unregistered channels in RCHCNT
...
Shouldn't throw exception on realhw.
2020-09-22 19:47:47 +03:00
Eladash
ad37259ccc
SPU: Implement many missing channel counts
2020-09-22 19:47:47 +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
3206378ae6
sys_spu: Fix overexecution of cpu_return()
2020-09-12 22:11:40 +03:00
Eladash
7ce790f369
SPU: Use ASM for AVX2 coompilation instead of intrinsics
2020-09-12 18:49:49 +03:00
Eladash
9ff0b460a2
SPU: Make PUTLLUC LR event accurate
2020-09-11 09:02:18 +02:00
Eladash
4f0125a0e9
SPU: Remove "Accurate PUTLLUC" setting (always accurate)
2020-09-11 09:02:18 +02:00
Eladash
1e4655aef6
SPU: Remove STOP 0x0 hack ( #8873 )
2020-09-09 11:36:04 +01:00
Eladash
5060c779da
SPU: Use unaligned instructions in mov_rdata_avx (MSVC) ( #8851 )
2020-09-07 21:32:44 +01:00
Eladash
abc715bc5c
SPU: Make PUT transfers use SEQ-CST ordering on Accurate DMA ( #8844 )
2020-09-06 12:09:14 +01:00
Eladash
2688081656
SPU: Use unaligned AVX instructions for cmp_data_avx
2020-09-06 07:51:12 +03:00
Eladash
e4abd3dc5a
SPU: Do not ignore pending PUT tranfers just becase GET may not be cache-line atomic
...
This is not the proper way to emulate non-atomic GET tranfers, as it makes it seems as if PUT atomic tranfers arent atomic. (TODO)
Incomplete GET cache line accesses still do not verify data though.
2020-09-05 22:23:55 +03:00
Eladash
c7a185d4e7
SPU: Fix not acuiring reservation locks on DMA with more than one cache line (Accurate DMA)
2020-09-05 22:23:55 +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
c5c9ea1b21
SPU: Make GET's full and aligned cache line accesses atomic with Accurate DMA
2020-09-04 10:20:44 +02:00
Eladash
73d23eb6e6
SPU: Implement Accurate DMA ( #8822 )
2020-09-02 23:58:29 +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
841b8fad38
SPU: Fix timer events
2020-08-24 01:57:32 +03:00
Eladash
0f8ca1f7c5
SPU: Implement RSX accurate reservations on TSX ( #8721 )
2020-08-13 00:00:37 +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
f8d2d8ca11
SPU/Windows: Fix LS memory mirrors
...
This is a workaround but this is because of how utils::shm works on Windows path.
2020-07-19 17:58:49 +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
235d12aa6b
SPU MFC: Never clear tag status in WrTagUpdate
2020-07-10 02:52:02 +03:00
Eladash
5d1fc546a8
SPU MFC: Fix MFC_WrTagUpdate channel count
...
Always report available, in realhw this is just a hint if the previous tag update hasnt been checked yet by the MFC, avoiding blocking writes and allowing the SPU to execute some code while it processes the previous update request.
Except for MFC_TAG_UPDATE_IMMEDIATE, where it also waits for MFC to process it.
2020-07-10 02:52:02 +03:00
Eladash
84470c34db
SPU: Disable PUTLLC NOP transfers detection on TSX path
2020-07-09 03:17:35 +01:00
Eladash
f8dbfa1d1e
SPU: Implement GETLLAR polling detection
2020-07-09 03:17:35 +01:00
Eladash
dc25a3fa2a
PPU debugger: Show stack address of each function
2020-07-06 18:58:16 +02:00
Eladash
2c93fecd8b
SPU: Use named constants for MFC tag updates
2020-06-27 20:42:41 +01:00
Eladash
f29589e5cf
SPU debugger: Add atomic status and tag update channels information
2020-06-27 07:04:37 +01:00
Eladash
731d4330fe
v128: A few optimizations ( #8432 )
2020-06-15 17:24:04 +03:00
Eladash
5777a1d426
SPU: Implement EBUSY error on non-empty mailbox (sys_spu_thread_send_event/sys_event_flag_set_bit)
...
Write into inbound mailbox under mutex.
2020-06-15 17:08:57 +03:00
Eladash
c15b5f1eca
SPU: Move check_state() outside of mutex scope
...
Can result in a deadlock in some cases, cpu flags are checked after this function as well anyways.
2020-06-15 17:08:57 +03:00
sampletext32
437f374bae
Fix some checks
2020-06-04 19:48:08 +03:00
Nekotekina
abf9a08ee3
Fix warnings
2020-05-27 18:41:17 +03:00
Eladash
7c3166a0c6
SPU MFC: Fix MFC_WrListStallAck on interpreters
2020-05-20 22:55:30 +03:00
Eladash
4405f46aec
SPU MFC: Fix SN interrupts
2020-05-20 22:55:30 +03:00
Eladash
81684919f5
SPU MFC: Implement MFC_SDCRZ_CMD
2020-05-20 22:55:30 +03:00
Eladash
a2653532ef
SPU reservations (TSX): Remove wait flag in PUTQLLUC
2020-05-17 14:20:21 +03:00
Eladash
61f43d78df
SPU: Minor cleanup of exception in stop_and_signal
2020-05-14 16:58:50 +01:00
Eladash
54dd9f4eae
sys_spu: Fix sys_spu_thread_group_terminate vs sys_spu_thread_group_exit race on values
2020-05-14 16:58:50 +01:00
Eladash
9266507e4c
SPU: Implement spu_channel_(4_)t::try_read
2020-05-13 19:36:44 +03:00
Eladash
7ff25588f4
sys_spu: Minor cleanup of group termination process
2020-05-13 19:36:44 +03:00
Eladash
525453794f
SPU/PPU reservations: Optimizations part 1
...
- Implement vm::reservation_trylock, optimized locking on reservation stores with no waiting. Always fail if reservation lock bitsa are set.
- Make SPU accurate GET transfers on non-TSX not modify reservation lock bits.
- Add some optimization regarding to unmodified data reservations writes.
2020-05-13 11:10:13 +01: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
Eladash
1bd6cb2105
SPU/PPU debugger: use ':' instead of '='
2020-05-05 13:46:26 +03:00
Eladash
edde748519
sys_event_queue: Fix forced event queue destruction
...
Add missing last existence check at sys_spu_thread_(try)receive_event and lv2_event_queue::send.
2020-05-04 01:10:19 +03:00
Eladash
0e6937a359
SPU GETLLAR: Don't use loop detection for TSX
2020-05-02 14:57:38 +03:00
Eladash
2b75df22d9
sys_event_queue: Fix ports disconnection after queue destruction
2020-04-30 18:58:42 +03:00
Nekotekina
19acf260d8
SPU DMA: Fix PUTLLUC (TSX)
...
Prevent edge case of missing store.
2020-04-29 15:40:41 +03:00
Eladash
954e3f6e6c
Fixup for cpu_flag::pause state check after #8114
2020-04-29 05:56:47 +03:00
Eladash
a505d87565
Partial revert of 3be687cd18
2020-04-28 20:20:19 +03:00
Nekotekina
790fd9ce14
SPU DMA: implement cmp_rdata_avx
...
Use technique similar to mov_rdata_avx with inline assembly.
2020-04-28 17:58:26 +03:00
Eladash
7da8ba5c15
Wait for SPU event to be received in sys_spu_thread_group_exit
...
Also use atomic check for group->run_state outside the mutex,
explicitly forbid group termination while we are waiting for an event to be received.
2020-04-28 14:58:17 +03:00
Eladash
a9c18964b6
Add missing cpu state check sys_spu_thread_receive_event
2020-04-28 14:58:17 +03:00
Eladash
9506676223
SPU debugger: dump Stall Stat and SRR0
2020-04-28 14:27:40 +03:00
Eladash
7d7909149f
SPU: Detect reservation spinning loop
2020-04-28 14:27:40 +03:00
Eladash
e423128a32
SPU: New GETLLAR technique
2020-04-28 14:27:40 +03: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
Nekotekina
4f71c570bd
SPU DMA: disable memcpy path
...
Due to update of the alternative path (SSE/AVX)
2020-04-26 22:36:55 +03:00
Nekotekina
8ae2554505
Implement mov_rdata_avx
2020-04-26 22:36:45 +03:00
Eladash
83c7f6f149
debugger: Rephrase "Current function" to "In function"
...
Takes less space which makes actual function name display a bit nicer.
Also the meaning is clearer.
2020-04-19 10:56:42 +01:00
Eladash
a3f2dfa232
sys_isolated_spu
2020-04-17 11:41:50 +01:00
Nekotekina
c7fe8567b8
Experimental squashing of reservation memory area.
...
Enables trivial synchronization between shared mem.
Reduces memory usage, but potentially degrades performance.
Rename an overload of vm::passive_lock to vm::range_lock.
2020-04-16 02:25:43 +03:00
Nekotekina
b1b67a13c6
Revert "Replace rotate utils with std::rotl" (partial)
...
This reverts commit 4d8bfe328b .
2020-04-14 19:45:53 +03:00
Eladash
ec1e82bc9d
SPU debugger: Implement blocking functions dumping
2020-04-14 17:09:58 +03:00
scribam
f37adc4188
Add fallthrough attribute
2020-04-14 17:06:58 +03:00
Nekotekina
4d8bfe328b
Replace rotate utils with std::rotl
...
More include cleanup.
2020-04-14 16:05:58 +03:00
Eladash
cb14805d78
rsx fp/vp analyzers: Fix strict type aliasing and improve codegen
2020-04-12 16:48:43 +03:00
Nekotekina
1b68f90e42
Tweak TSC calibration
...
Round to 3 digits after dot (count in MHz).
2020-04-09 16:23:33 +03:00
Eladash
cce946f10e
spu: typo fix
2020-04-08 19:23:13 +03:00
Eladash
c0f4fb6e35
SPU debugger: dump reservation address
2020-04-08 14:35:44 +03:00
Eladash
cc8f024c6c
Fixup ppu/spu_thread::dump_all()
2020-04-08 14:35:44 +03:00
Megamouse
b1fdbc7fcc
Move some format functions
2020-04-06 20:59:58 +02:00
Eladash
13820d6802
SPU debugger: Show channels data
2020-04-03 18:37:21 +03:00
Eladash
0beea91d5e
Minor debugger fixups
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
Emmanuel Gil Peyrot
425e032a62
SPU: Copy with memcpy() instead of hand-rolled SSE2
...
In some very unscientific benchmark:
spu_thread::do_dma_transfer() was taking 2.27% of my CPU before, now
0.07%, while __memmove_avx_unaligned_erms() was taking 1.47% and now
2.88%, which added makes about 0.8% saved.
2020-03-22 15:51:03 +03:00
Nekotekina
6a2571d0e1
SPU: print current chunk hash in dump
2020-03-18 18:28:46 +03:00
Eladash
9e14e835e7
Fix sys_raw_spu_destroy
2020-03-16 21:06:33 +03: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
Nekotekina
972e0ab31d
Remove -Wno-reorder and make it an error
2020-02-21 15:20:34 +03:00
Nekotekina
92e3eaf3ff
Fix signed-unsigned comparisons and mark warning as error (part 2).
2020-02-19 22:54:58 +03:00
Nekotekina
771eff273b
First part of fixing sign-compare warning (inside be_t).
2020-02-19 22:54:58 +03:00
Eladash
df8d0cde4a
RSX/SPU: Accurate reservation access
2020-02-19 18:11:30 +00:00
Eladash
727d783959
RawSPU: protect NPC from writes/reads in running state
2020-02-18 18:09:10 +00:00
Eladash
fad8b38b28
sys_spu: protect sys_spu_image members in kernel mode
...
Save relevant info in idm, set sys_spu_image segs and nsegs members to 0.
2020-02-18 18:09:10 +00:00
Megamouse
fe75311be2
move config structs to own files and clean up some headers
2020-02-17 15:08:17 +03:00