Commit graph

51 commits

Author SHA1 Message Date
Jean-Philip Desjardins
71d509c953 Update relativePipeTime later in stall analysis.
Fixes actual times where results are available.
2023-10-19 17:12:45 -04:00
Jean-Philip Desjardins
6f7cd3a41c Remove some dead code. 2023-10-16 18:03:42 -04:00
Jean-Philip Desjardins
b801afb8c4 Add dynamic FMAC stall resolution. 2023-10-16 18:01:34 -04:00
Jean-Philip Desjardins
9bcbe1f699 Update pipeTime when syncing EFU operations.
Fixes issues with Shinobi where WAITP is used and FDIV pipeline needs to be updated as a side-effect.
2023-05-11 10:01:48 -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
aa8cc9ea36 Detect self loops in VU code. 2022-12-01 14:14:12 -05:00
Jean-Philip Desjardins
930e90a9a2 Stay inside block when it's branch target is itself. 2022-12-01 09:03:40 -05:00
Mahmood - Zer0xFF
2f4f10e91c make VU jumps relative: pass instruction relative location CMIPSInstructionFactory 2022-10-25 17:27:51 -04:00
Jean-Philip Desjardins
4a7b10cad1 Add block category concept. 2022-10-17 14:27:13 -04:00
Jean-Philip Desjardins
33eaad94ad Generate stalls when using result of integer load instruction too quickly. 2022-09-30 09:01:43 -04:00
Jean-Philip Desjardins
b4288b93ce Take FMAC stalls into account when computing branch delay info. 2022-08-24 10:12:20 -04:00
Jean-Philip Desjardins
8483da53a6 Fix max operation. 2022-08-24 10:12:20 -04:00
Jean-Philip Desjardins
927aebc4a3 Rename some constants. 2022-07-11 14:09:46 -04:00
Jean-Philip Desjardins
a214f0296e Update relative pipe time before checking pipelines. 2021-07-27 09:16:04 -04:00
Jean-Philip Desjardins
a4ed0f0694 Upper and lower affected registers code works the same now. 2021-02-14 20:06:23 -05:00
Jean-Philip Desjardins
595ac814a6 First shot at non hack fix for GoW FMAC stall situation.
Makes some wild assumptions, probably need to be constrained to prevent regressions.
2021-02-14 20:06:22 -05:00
Jean-Philip Desjardins
bd9be0078b Add per element stall check for lower ops. 2021-02-14 20:06:22 -05:00
Jean-Philip Desjardins
39d664357a Handle VU branching peculiarities found in Star Ocean 3.
Can probably be extended if we find other problematic cases.
2020-06-02 15:12:27 -04:00
Jean-Philip Desjardins
9a8e08c4c1 Code style fixes. 2020-03-03 09:44:25 -05:00
Jean-Philip Desjardins
c3a1e62b43 Check broadcast elements in FMAC stall detection.
Probably needs more checks, but this is a start.
2020-03-02 21:18:16 -05:00
Jean-Philip Desjardins
8d38672c42 Update flag skip compile hint algorithm. 2020-02-27 19:46:02 -05:00
Jean-Philip Desjardins
cbc901c25b Go back to the static adjustment approach.
But this time, do the check per element to prevent false positives that broke games like FF12.
2020-02-27 19:46:02 -05:00
Jean-Philip Desjardins
4aeadfab7b Another slightly different approach.
Fixes Rogue Galaxy.
2020-02-27 19:46:01 -05:00
Jean-Philip Desjardins
20103cec22 Slightly different approach.
Only update Q and P pipelines when a stall is detected.
Fixes FF12.
2020-02-27 19:46:01 -05:00
Jean-Philip Desjardins
8d1f0e0eb8 Add very basic FMAC hazard detection. 2020-02-27 19:46:01 -05:00
Jean-Philip Desjardins
cc274e96b1 Fix code style. 2020-02-10 21:40:09 -05:00
Jean-Philip Desjardins
41b012bfd8 Better skip flags hint computation.
Fixes KH2.
2020-02-10 21:40:09 -05:00
Jean-Philip Desjardins
39db2e8ab0 Move hints computation to a function. 2020-02-10 21:40:09 -05:00
Jean-Philip Desjardins
66684a16b0 Skip flags update when we're sure result won't be used.
This is proof of concept, needs to be cleaned.
2020-02-10 21:40:08 -05:00
Jean-Philip Desjardins
b475b8ff16 Experimental P pipeline support. 2018-08-31 07:40:14 -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
193e72635a Block lookup table now only stores "entry-point" functions to guest code.
Used to be a 1 to 1 map to covering function for a specific address.
2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
5e6058b530 Move PC changing piece of code in compiled block.
Makes basic blocks more generic.
2018-07-26 21:38:14 -04:00
Clang-Format
acf75535ec Clang format 2018-04-30 21:01:23 +01:00
Jean-Philip Desjardins
4ed0b7f711 Clear pending XGKICK if current instruction is an XGKIGK. 2017-08-09 23:06:27 -04:00
Jean-Philip Desjardins
2d229688ae Cleanup. 2017-08-09 23:06:27 -04:00
Jean-Philip Desjardins
f5133ab86a Store XGKICK address for delayed execution. 2017-08-09 23:06:26 -04:00
Jean-Philip Desjardins
8c9aa190f3 Delay execution of XGKICK. 2017-08-09 23:06:26 -04:00
Jean-Philip Desjardins
0ff20307b2 Cleanup. 2017-08-09 23:06:26 -04:00
Jean-Philip Desjardins
cdf153ebb0 Cleanup. 2017-01-29 21:13:27 -05:00
Jean-Philip Desjardins
39d8d55630 Reorganised integer branch delay handling code.
Also made it work with all games that had known issues.
2016-08-16 22:05:50 -04:00
Jean-Philip Desjardins
cb12d803ab Use branchValue. 2016-08-16 22:05:43 -04:00
Jean-Philip Desjardins
8ccea2bb00 Merge branch 'lego_spike' 2016-08-16 22:05:26 -04:00
Jean-Philip Desjardins
5569aa2e8c Cleanup. 2016-08-06 22:42:47 -04:00
Ian Brown
330a6dcf65 only take the delayed integer value when it is set in the current block. 2016-06-21 22:31:05 +01:00
Ian Brown
c696a4fbac deal with edge case where register value is read before the start of the block. It's not ideal, but it's probably sufficient. Fixed brace placement to suit existing convention. 2016-06-10 17:04:41 +01:00
Ian Brown
b67a2eb74c turned optimisation back on 2016-06-06 23:09:08 +01:00
Ian Brown
1f28c743d7 use GetAffectedOperands in conditional branch optimisation. 2016-06-06 22:58:03 +01:00
Ian Brown
72a5ab6279 quick spike to investigate a technique for conditional branching. 2016-06-03 23:35:59 +01:00