Commit graph

107 commits

Author SHA1 Message Date
Jean-Philip Desjardins
35e939cdd4 Use standard thread_local specifier. 2023-03-21 21:30:53 -04:00
Jean-Philip Desjardins
38d3775a07 Add proper "empty" return value to GetEffectiveAddress.
Zero is valid and cannot be used as "empty".
2022-12-07 14:48:20 -05:00
Jean-Philip Desjardins
55f24a1ee1 Check which slots we have when copying function. 2022-12-01 11:29:42 -05:00
Jean-Philip Desjardins
638ac5797b Allow blocks not to have a branch link. 2022-12-01 11:14:30 -05:00
Jean-Philip Desjardins
930e90a9a2 Stay inside block when it's branch target is itself. 2022-12-01 09:03:40 -05:00
Jean-Philip Desjardins
e2683a6246 Remove duplicated code. 2022-12-01 09:03:34 -05:00
Jean-Philip Desjardins
532c38ab6a Use CreateInstance to copy memory function. 2022-10-26 11:31:09 -04:00
Jean-Philip Desjardins
c18c994e41 Remove XXH_INLINE_ALL, seems to cause issues on iOS/macOS. 2022-10-25 17:29:13 -04:00
Jean-Philip Desjardins
4bc1c64a5f Use actual blockSize as key. 2022-10-25 17:27:52 -04:00
Jean-Philip Desjardins
e5803bc939 Cleanup includes. 2022-10-25 17:27:52 -04:00
Mahmood - Zer0xFF
53efd4f52d update AOT block references to use new hash 2022-10-25 17:27:52 -04:00
Mahmood - Zer0xFF
29bd2522e6 swap from crc32 to xxHash3 (128bit) 2022-10-25 17:27:52 -04:00
Jean-Philip Desjardins
340e04dd8a Fix block linking support. 2022-10-25 17:27:52 -04:00
Mahmood - Zer0xFF
eb057660d5 Add CBasicBlock::CopyFunction(...) 2022-10-25 17:27:51 -04:00
Mahmood - Zer0xFF
2f4f10e91c make VU jumps relative: pass instruction relative location CMIPSInstructionFactory 2022-10-25 17:27:51 -04:00
Jean-Philip Desjardins
5bc4a8cf9e Use GetInstruction to fill in AOT block data. 2022-10-17 14:34:20 -04:00
Jean-Philip Desjardins
4a7b10cad1 Add block category concept. 2022-10-17 14:27:13 -04:00
Mahmood - Zer0xFF
9dc94fbb51 use zstd zlibwrapper 2022-05-15 22:46:03 +01:00
Jean-Philip Desjardins
1ddf39c5eb Code style fixes. 2022-02-08 18:43:33 -05:00
Jean-Philip Desjardins
ea6af15314 PsfPlayer for JS PoC 2022-02-08 18:41:06 -05:00
Jean-Philip Desjardins
dd90e7b7ae Move idle loop detection logic.
This is an EE only thing, no point in having this in the generic code.
2022-01-21 20:09:08 -05:00
Jean-Philip Desjardins
12522ef437 Improve idle block detection.
Should help Mark of Kri and Speed Kings.
2022-01-21 20:09:08 -05:00
Jean-Philip Desjardins
8f2c6e2af6 Make sure we check delay slot instruction. 2022-01-21 20:09:08 -05:00
Jean-Philip Desjardins
f50d3573d2 Improve again.
This helps catch loops that wait for DMA to complete. Gives a small boost in some games.
2022-01-21 20:09:07 -05:00
Jean-Philip Desjardins
32dafbb660 Improved detection.
For Resident Evil: Code Veronica.
2022-01-21 20:09:07 -05:00
Jean-Philip Desjardins
e0858565d5 Improved detection.
Fixes some false positives. Improves TriAce games.
2022-01-21 20:09:07 -05:00
Jean-Philip Desjardins
0e99d6b6e6 Limit idle loop detection to EE.
Will improve the check later.
2022-01-21 20:09:07 -05:00
Jean-Philip Desjardins
7e51fc99c4 Add analysis to detect blocks that just loop waiting for a flag to change.
If we find such a case, the block will stop executing its quota and report idle time.

This first version improves Castlevania: Curse of Darkness and Contra: Shattered Soldier.
2022-01-21 20:09:07 -05:00
Jean-Philip Desjardins
e5e9a6cb76 Add padding in AOT_BLOCK_KEY to align pointers on 8 bytes. 2021-01-14 12:58:45 -05:00
Jean-Philip Desjardins
b99ac3e3d8 Greatly improve block link bookkeeping algorithm.
Improves performance on code generating games/homebrew.
2020-08-06 16:57:12 -04:00
Jean-Philip Desjardins
2ae43e0320 Don't cache blocks that have breakpoints.
Broke breakpoint toggling.

(cherry picked from commit 3d2ed9e20f2b917b10f359ee76c8724192e839c2)
2020-02-10 21:40:09 -05:00
Jean-Philip Desjardins
95584611ca Add a no link threshold for recycled blocks.
Significatively improves speed of Jak series games.
2019-12-20 21:25:33 -05:00
Greg Land
131a709e11 Removed this assert as per discord conversation.
Removed assert that was stopping Dark Cloud from loading saved games when asserts are enabled
2019-09-12 01:15:09 -04:00
Jean-Philip Desjardins
1604a613af Disable block linking when using AOT. 2019-05-09 13:00:34 -04:00
Jean-Philip Desjardins
9b454de926 Disable block linking when doing AOT. 2019-05-09 13:00:34 -04:00
Jean-Philip Desjardins
dd3853dc7e Fix issues occurring with empty blocks. 2019-05-09 13:00:34 -04:00
Jean-Philip Desjardins
9f4eda3d3d Make block link related functions externally linkable. 2019-05-09 13:00:34 -04:00
Jean-Philip Desjardins
03fa233c4f Use JumpToDynamic for block linking targets. 2019-05-08 13:46:15 -04:00
Jean-Philip Desjardins
fa754f0403 Moved check for symbol ref type. 2018-09-30 10:40:10 -04:00
Jean-Philip Desjardins
e584f5d639 Update for CodeGen's new external symbol ref handler. 2018-09-28 13:31:24 -04:00
Jean-Philip Desjardins
a68cf01d09 Fix build. 2018-07-26 21:38:17 -04:00
Jean-Philip Desjardins
3210ffecfa Breakpoints now work again. 2018-07-26 21:38:17 -04:00
Jean-Philip Desjardins
f2f0b9e6ca Prolog is actually the epilog. 2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
3f7f6ae29d Notify CMemoryFunction that we're modifying the function. 2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
9ddbdf80b2 Fix handling of likely branches. 2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
1b0bfaab36 Fix formatting. 2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
8cdc57e0e4 Fix Unix build. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
ab5aebc3a7 Make sure everything is coherent when deleting blocks. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
3952e74d32 Simplify block link code. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
676d301ab2 Fix build. 2018-07-26 21:38:15 -04:00