Commit graph

39 commits

Author SHA1 Message Date
Jean-Philip Desjardins
3210ffecfa Breakpoints now work again. 2018-07-26 21:38:17 -04:00
Jean-Philip Desjardins
050bf0f854 MipsExecutor is now owned by MIPS CPU context.
Will help to make new breakpoint implementation simpler.
2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
c7f4a9e567 Fix formatting. 2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
f8faff57c1 ClearActiveBlocks is not a thing anymore.
Was broken due to caching mechanism used by VuExecutor.
2018-07-26 21:38:16 -04:00
Jean-Philip Desjardins
7f4c3fd744 Systematically mask addresses involved in block lookup.
It's not technically correct if there's any non-trivial virtual memory mapping enabled, but block linking itself will need more work if we ever need to properly support paging.
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
d248ddda77 ClearActiveBlocks must also clear block links. 2018-07-26 21:38:16 -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
241e7a9809 Remove useless check/optimisation. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
1f4ba149a1 Block link WIP. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
890708fcba Code style fixes. 2018-07-26 21:38:15 -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
7f6c35efcf Store empty block instead of nullptr in tables. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
8063155134 Fix return value mistake. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
dc597e34ce Add empty block concept. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
b30658ba1a Move cycle quota update to block prolog. 2018-07-26 21:38:15 -04:00
Jean-Philip Desjardins
f23dce025b Made MipsExecutor a template.
Allows choosing block lookup policy.
2018-07-26 21:38:14 -04:00
Jean-Philip Desjardins
aaef7e38a0 Cleanup. 2018-07-26 21:38:14 -04:00
Jean-Philip Desjardins
5dc8d3fbcb Move block lookup logic in separate class. 2018-07-26 21:38:14 -04:00
Clang-Format
acf75535ec Clang format 2018-04-30 21:01:23 +01:00
Jean-Philip Desjardins
0cb1dcfd88 Made Execute function templated to allow specifying a constant function pointer. 2017-08-09 23:05:30 -04:00
Jean-Philip Desjardins
2a88df937d Cleanup. 2017-08-09 23:05:30 -04:00
Jean-Philip Desjardins
f7e84ea26b Store maxAddress and change way subTableCount is computed. 2017-08-09 23:05:30 -04:00
Jean-Philip Desjardins
a3d53f6a14 Cleanup. 2017-08-09 23:05:29 -04:00
Jean-Philip Desjardins
295da9f66c Added EE executor that handles block cache invalidation using virtual memory mechanisms. 2015-06-07 23:44:46 -04:00
jpd002
0f75cf8538 Added AOT compiled block support in BasicBlock and fixed some compilation problems in VuExecutor.
git-svn-id: http://svn.purei.org/purei/trunk@1098 b36208d7-6611-0410-8bec-b1987f11c4a2
2013-04-14 06:35:40 +00:00
jpd002
372740688f Removed intrusive_ptr stuff from BasicBlock and use move operator = instead of allocating a new CMemoryFunction.
MipsExecutor now manages its blocks with unique_ptrs.

git-svn-id: http://svn.purei.org/purei/trunk@1096 b36208d7-6611-0410-8bec-b1987f11c4a2
2013-04-12 02:35:55 +00:00
jpd002
91f6d7d10f Added a way to flush parts of the instruction cache when loading data from disk.
git-svn-id: http://svn.purei.org/purei/trunk@1091 b36208d7-6611-0410-8bec-b1987f11c4a2
2013-03-10 05:11:53 +00:00
jpd002
3b56af1456 Made breakpoints handling more reliable by moving the breakpoint checking code after function partitioning because a breakpoint inside a non-partitioned function could never be hit.
Also added a different "first run" check for breakpoints that is only enabled when we come back from paused virtual machine state.
Moved more stuff between "DEBUGGER_INCLUDED" ifdefs.

git-svn-id: http://svn.purei.org/purei/trunk@1010 b36208d7-6611-0410-8bec-b1987f11c4a2
2012-09-29 01:28:23 +00:00
jpd002
b1afb8abee Added new way to search for blocks in the compiled block list which is O(1).
Removed some useless params in MIPS constructor.
Removed the need for the _PSX preprocessor def.

git-svn-id: http://svn.purei.org/purei/trunk@860 b36208d7-6611-0410-8bec-b1987f11c4a2
2012-03-13 06:16:33 +00:00
jpd002
929127a3af Made DeleteBlock public in MipsExecutor.
git-svn-id: http://svn.purei.org/purei/trunk@815 b36208d7-6611-0410-8bec-b1987f11c4a2
2011-11-24 07:13:30 +00:00
jpd002
75cb0db8f4 Changed basic block memory management to use intrusive_ptr and added a block caching mechanism in VuExecutor to speed things up.
git-svn-id: http://svn.purei.org/purei/trunk@719 b36208d7-6611-0410-8bec-b1987f11c4a2
2010-11-17 03:59:29 +00:00
jpd002
1b07b4716d Changes for Half-Life.
git-svn-id: http://svn.purei.org/purei/trunk@527 b36208d7-6611-0410-8bec-b1987f11c4a2
2009-06-06 15:38:03 +00:00
jpd002
4965042ad7 PsfPlayer : Fixed playing speed problems.
git-svn-id: http://svn.purei.org/purei/trunk@356 b36208d7-6611-0410-8bec-b1987f11c4a2
2008-07-29 19:01:20 +00:00
jpd002
d38d3f2e90 More conversion done for VU.
git-svn-id: http://svn.purei.org/purei/trunk@278 b36208d7-6611-0410-8bec-b1987f11c4a2
2008-03-24 01:18:20 +00:00
jpd002
0f0fad5ab4 1987 runs completely (still a bug though).
Fixed FPS counter.

git-svn-id: http://svn.purei.org/purei/trunk@213 b36208d7-6611-0410-8bec-b1987f11c4a2
2008-01-03 07:42:54 +00:00
jpd002
2c5b592126 New VM state engine
git-svn-id: http://svn.purei.org/purei/trunk@202 b36208d7-6611-0410-8bec-b1987f11c4a2
2007-12-17 04:08:46 +00:00
jpd002
9b21741059 Added some missing files
git-svn-id: http://svn.purei.org/purei/trunk@182 b36208d7-6611-0410-8bec-b1987f11c4a2
2007-12-06 23:05:38 +00:00