Commit Graph

962 Commits

Author SHA1 Message Date
Unknown W. Brackets
438361d0bc Clean up code pointer naming for the jit.
Now it properly identifies thunk code which is actually a decent percent
when fastmem is off at least.
2013-12-18 23:57:39 -08: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
1e300447e1 Fix some replace-related bugs. Add "jal" replace inlining, not activated. 2013-12-18 16:27:23 +01:00
Henrik Rydgard
2d4c28826a Show replaced instructions correctly in disassembly 2013-12-18 11:42:19 +01:00
Henrik Rydgard
6937719c3b Minor fixes around function replacement, a couple of math funcs 2013-12-18 10:35:50 +01:00
Henrik Rydgard
1d2f1efd06 Fix function replacement on ARM 2013-12-18 00:09:08 +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
ca9efb1619 Linux build fix 2013-12-17 12:41:45 +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
Unknown W. Brackets
b74c62b6a6 Switch to a 64-bit function hash. 2013-12-14 14:56:04 -08:00
Henrik Rydgard
d394282bc6 Don't crash trying to clear the icache in interpreter mode 2013-12-10 20:34:07 +01:00
Henrik Rydgard
5a02ea9ff4 Fix cache instruction on ARM 2013-12-10 13:26:32 +01:00
Henrik Rydgard
70d492e7e2 "cache" instruction: Implement icache invalidation.
Fixes broken math in Tony Hawk so it must be doing self modifying code. Nasty.
2013-12-10 13:15:28 +01:00
Henrik Rydgard
2d8429ac48 Assorted cleanup in the MIPS emulation 2013-12-10 13:15:16 +01:00
Henrik Rydgard
0a5aa78011 ARMJit: Fix bug in instruction mtv, affecting SSX
SSX still has other problems on ARM though.
2013-12-10 00:19:18 +01:00
Henrik Rydgård
980de339ce Fix buildfix: there shouldn't be a zero there at all. 2013-12-09 16:53:46 +01:00
Henrik Rydgård
483bf4c74d Don't leak icon textures when shutting down the graphics system.
Happens on Android task switching for example.

Also update the README (got rid of kitkat fullscreen temporary because
I can't get it to work reliably).
2013-12-09 15:28:47 +01:00
Henrik Rydgård
9e42086e21 Logspam reduction 2013-12-09 13:45:17 +01:00
Henrik Rydgård
e76fc5e56c Clang 3.4 buildfix 2013-12-09 12:52:03 +01:00
Unknown W. Brackets
0636a65ad9 Use ReadEntireFile() a few more places.
This fixes one or two minor memory leaks.
2013-12-08 12:02:37 -08:00
Unknown W. Brackets
f4890288ce Oops, fix a bad sort for the hashmap.
Fixes assertion warnings.  Thanks @Kingcom.
2013-12-06 21:19:05 -08:00
Unknown W. Brackets
2ec73a65ed Use a common func to generate default func names. 2013-12-06 00:17:20 -08:00
Unknown W. Brackets
735968ba9b Add a setting to maintain a global func hash map.
This makes it easier to deal with functions that have a common
implementation between multiple games, e.g. libc funcs.
2013-12-06 00:11:49 -08:00
Henrik Rydgard
245aeecbc0 ARM: Check for VFPv4 before using CVT.F32.F16 (vh2f).
Issue #4730 might be fixed by this.
2013-12-05 22:55:31 +01:00
Henrik Rydgard
32f479b0a6 Assorted log spam reductions.
Also let Java know of some important events. Not used for anything yet.
2013-12-04 17:43:00 +01:00
Unknown W. Brackets
505f509503 Detect tail call when scanning functions. 2013-12-01 22:08:39 -08:00
Unknown W. Brackets
1bccfa4141 Look for downward jumps for elses when scanning.
Otherwise, we often end the function earlier than it should be.
2013-12-01 21:28:09 -08:00
Unknown W. Brackets
43be44947f Correctly reuse symbol map entries when scanning.
Before we created one huge function in place of the old.
2013-12-01 20:25:51 -08:00
Unknown W. Brackets
b2971314b8 Fix hash detection of branches to jr ra.
This makes it more correctly identify functions.
2013-12-01 20:23:16 -08:00
Unknown W. Brackets
dd2e996838 Fix some type comparison warnings. 2013-12-01 11:21:16 -08:00
Unknown W. Brackets
a69ddf840c Fix some formatting warnings. 2013-12-01 11:21:15 -08: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
Henrik Rydgard
23e57b71e0 Revert "Shave one instruction off slti and slt on ARM."
This reverts commit 04742e00fc.
2013-11-30 16:06:16 +01:00
Henrik Rydgard
04742e00fc Shave one instruction off slti and slt on ARM. 2013-11-30 15:53:21 +01:00
Unknown W. Brackets
ec05146ffd Improve vfpu disasm for a few instructions. 2013-11-29 10:07:15 -08:00
Unknown W. Brackets
dffa35ef2f When ins is used with a zero argument, don't OR.
Seems it's used effectively to mask out bits with rs=zero.  Makes sense...
2013-11-29 09:17:12 -08:00
Sacha
90b5097d45 Travis: add Blackberry. Improve Blackberry out-of-box compile. 2013-11-29 00:18:41 +10:00
Henrik Rydgard
50a589ea72 Extend sanity check for vfpu reordering array. 2013-11-28 13:27:52 +01:00
Henrik Rydgard
f9f6e9492d Reorder vfpu data in saved kernel contexts when loading in a new version. 2013-11-28 13:27:51 +01:00
Henrik Rydgard
55500d4bb6 Reorder VFPU registers in memory so that we can flush and reload them in bulk more often.
Doesn't actually do that yet, that's for the NEON branch.
2013-11-28 13:27:51 +01:00
Henrik Rydgård
ed13c21a37 Merge pull request #4649 from Kingcom/Debugger
Rewrite symbol table
2013-11-27 07:43:25 -08:00
Kingcom
5844d0107b Rewrite SymbolTable 2013-11-27 13:33:30 +01:00
Henrik Rydgård
979a7fbdcd Merge pull request #4638 from Kingcom/Debugger
Save labels separately from symbols
2013-11-26 13:32:44 -08:00
Sacha
95881bdaac Blackberry: Add simulator support. 2013-11-26 12:18:34 +10:00
Kingcom
3d4bb3f20b Remove obsolete functions 2013-11-26 00:51:04 +01:00
Kingcom
00a801f6a3 Don't overwrite label name if it already exists, get label value 2013-11-26 00:43:31 +01:00
Kingcom
7c585485bb Save labels separately from symbols 2013-11-26 00:23:17 +01:00
Henrik Rydgard
e5e23f3ce1 ARM: Fix vsgn. Some vertex decoder tweaks. 2013-11-24 18:21:47 +01:00