Commit graph

211 commits

Author SHA1 Message Date
Unknown W. Brackets
65ecc9a464 jit: Use an exclusive end in the block map.
Simpler, was not consistent before, oops.
2014-10-21 11:52:19 -07:00
Unknown W. Brackets
ef6d583542 x86jit: Oops, don't pad INT3s in prelinked blocks.
Fixes #7007.
2014-10-15 22:07:56 -07:00
Unknown W. Brackets
040a6d1745 jit: Improve performance of clearing jit. 2014-10-12 19:00:03 -07:00
Unknown W. Brackets
e6373aaed9 jit: Remove from the block map more carefully. 2014-10-12 17:47:07 -07:00
Unknown W. Brackets
2e81a38892 jit: Fix a possible infinite loop in invalidation. 2014-10-12 17:46:54 -07:00
Unknown W. Brackets
4853a1b7a0 jit: Optimize proxy block lookup from address.
It was really slow before with enough proxy blocks.
2014-10-12 17:35:23 -07:00
Unknown W. Brackets
d98adf27d6 x86jit: Add proxy blocks for continuing. 2014-10-12 17:15:31 -07:00
Unknown W. Brackets
01f9521dc5 jit: Invalidate blocks even if they end unevenly.
This allows blocks to start and end where ever they need, which should be
good for replacements and for continuing.
2014-10-12 17:13:04 -07:00
Unknown W. Brackets
90821b761d x86jit: Pad linked exits with breakpoints.
So that we don't get garbage, and so we see if we end up there.
2014-10-12 16:00:58 -07:00
Unknown W. Brackets
928e2adfc9 jit: Avoid applying/restoring the rounding mode.
If the game never sets it, we can skip around syscalls, interpreter,
replacements, etc.
2014-10-12 12:51:45 -07:00
Henrik Rydgard
808f05da89 (Partially) slip thin3d underneath DrawBuffer. 2014-08-22 20:54:53 +02:00
Unknown W. Brackets
09b9d2ad81 Keep track of ranges that have emuhack ops.
So that we can invalidate them smarter.
2014-07-05 16:25:16 -07:00
Henrik Rydgård
585050de27 Fix crash in block cache 2014-05-27 22:02:20 +02:00
Unknown W. Brackets
95dcadb6ae Ignore when a proxied block points to erased mem.
Happens for example when a new module is loaded, sometimes.
2014-05-04 01:25:19 -07:00
Unknown W. Brackets
7326c6e716 Fix a race condition on shutdown with hashmap.
Also, always need to init the blocks, they are not zero initialized.
2014-04-20 21:44:10 -07:00
Unknown W. Brackets
dc39e75fc1 Oops, forgot about proxy blocks for replace jal.
Also fix a crash when they are used.
2014-04-17 01:03:46 -07:00
Henrik Rydgard
58237d976f Fix performance issue in BlockCache due to an instance of std::vector in every block:
Avoid creating the vector when not necessary.

This was especially noticeable in debug mode.
2014-03-29 22:26:51 +01:00
Unknown W. Brackets
a843cbd580 Shrink the very common sceKernelThread.h include. 2014-03-15 11:44:02 -07:00
Henrik Rydgard
ef6e6083dc Including <cstddef> here was reported to fix a build problem. 2014-02-07 23:05:03 +01:00
lioncash
aaf834c032 Fix the destruction proxy blocks in DestroyBlock() in JitBlockCache.cpp.
Prior to this, it was possible for the wrong block to be deleted multiple times.
2014-02-03 14:40:37 -05:00
Unknown W. Brackets
fe2b62c27d Make the "on change" checkbox for memchecks work.
But, for now, only on sw and similar instructions, the rest don't work
yet and just always break.
2014-01-26 11:57:39 -08:00
Unknown W. Brackets
79864a5ee0 Fix some initialization order warnings. 2014-01-10 22:21:24 -08:00
Henrik Rydgård
28a518bfa7 Reformat JitBlockCache 2013-12-19 13:34:06 +01:00
Henrik Rydgård
2eb1f89ad0 Rework proxy blocks a bit 2013-12-19 13:31:13 +01:00
Henrik Rydgård
3957b5fb42 Call ProxyBlock in ArmJit too. Plus various cleanup and one more string function. 2013-12-19 11:45:39 +01:00
Henrik Rydgard
1cb7965cb1 Jit feature preparation: Introduce "proxy blocks".
When these are invalidated, the block they point to gets invalidated too.

Will be useful to implement various types of block merging and function inlining
without affecting correctness of cache clears etc.

Also, with this commit we can now fully inline replaced functions. fabsf() boils
down to 1-2 instructions and the block continues, for example.
2013-12-19 00:39:49 +01:00
Henrik Rydgard
2d4c28826a Show replaced instructions correctly in disassembly 2013-12-18 11:42:19 +01:00
Henrik Rydgard
2eab4aa1bf Play around with function replacement. Turned off by default of course. 2013-12-17 23:40:27 +01:00
Henrik Rydgard
2140892074 Initial preparations for ability to replace game functions with custom implementations.
Also auto-saves hashmap additions and reapplies the hashmap on function
rename so that if you rename a function that exists in several copies
they will all be labelled.

Note that actual function replacement is not activated yet.
2013-12-17 12:27:20 +01:00
Henrik Rydgard
2d8429ac48 Assorted cleanup in the MIPS emulation 2013-12-10 13:15:16 +01:00
Henrik Rydgard
f696650437 Implement vasin (fastasin5 from unittest) in ARM jit, add a sanity check. 2013-12-01 14:14:04 +01:00
Unknown W. Brackets
5ba94aa939 Correct jit block size for profiling. 2013-12-01 02:34:37 -08:00
Unknown W. Brackets
5d2ff64252 Support for modified jit-enabled VerySleepy.
This allows profiling the jit.  Should have zero perf impact when not
in use, since it's entirely triggered by VerySleepy.
2013-11-30 19:20:21 -08:00
Sacha
a41e3d3432 Qt: Remove controls. Undefine emit so that it is easier to use Qt headers in native files. 2013-11-20 01:25:59 +10:00
Henrik Rydgard
58db79672f Fix vmtvc on ARM, fixing issues with our prefix check. Add some logging.
Also improve vcmp on ARM.
2013-11-08 19:59:11 +01:00
Henrik Rydgard
309f904c0c Extract JitState into its own header (arm/x86) 2013-11-08 18:51:52 +01:00
Unknown W. Brackets
394d91371f Avoid clearing the jit cache on savestate.
Downside: saving state could "fix" some issues with games detecting jit,
which won't happen anymore.

However, it's now faster to savestate.
2013-09-29 14:26:13 -07:00
Henrik Rydgard
b661ae6c41 Add very simple jit viewer screen to dev menu. Add untested emitter for cvt.f32.f16 & c:o. 2013-09-29 13:41:56 +02:00
Unknown W. Brackets
14bcca1f53 Fix InvalidateICache() breaking binary searching. 2013-09-01 00:32:42 -07:00
Unknown W. Brackets
97aa1a631e Improve typesafety in the x86 regalloc. 2013-08-24 19:41:10 -07:00
Unknown W. Brackets
109ad17ac6 Use a typesafe struct for opcodes.
Also, correctly read delayslots using Read_Instruction on ARM.
2013-08-24 15:36:24 -07:00
Henrik Rydgård
a678621caf Merge pull request #3191 from Ced2911/ppc_basic
ppc support + ppc jit
2013-08-16 12:16:49 -07:00
Ced2911
1a5c6b59c5 add ppc jit 2013-08-16 14:40:29 +02:00
Ced2911
c332a4af58 Endian and PPC support 2013-08-16 14:34:15 +02:00
Unknown W. Brackets
14b719a7ac Make it possible to have more block exits. 2013-08-16 00:12:49 -07:00
Unknown W. Brackets
7b7801d59a Switch to including Windows.h from an intermediate.
This makes it easier for Xbox which uses a separate header.
2013-07-28 21:04:19 -07:00
Henrik Rydgard
afcb5add51 Minor code cleanup/reindent around ARM jit 2013-07-27 22:14:01 +02:00
Unknown W. Brackets
7c238f4567 Avoid a signed/unsigned compare.
This one is pretty pedantic.
2013-07-26 22:50:55 -07:00
Unknown W. Brackets
fcfcadaef2 Fix potential crash looking up block_num. 2013-04-28 20:59:13 -07:00
Henrik Rydgard
338bc0049d Seems block linking got too slow, speed it up again. 2013-04-27 23:40:17 +02:00