Commit Graph

121 Commits

Author SHA1 Message Date
Henrik Rydgård efd44a6933 Merge branch 'debugger2' of https://github.com/unknownbrackets/ppsspp into unknownbrackets-debugger2
Conflicts:
	Core/Debugger/Breakpoints.cpp
2014-01-26 23:10:37 +01: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 76afb2a8d5 Avoid returning points from the symbol map.
Now that it uses a lookup, this is even more dangerous.  But, the maps
could be reordered while it's trying to print the pointer and cause that
data to become invalid.

This should be safe from race conditions.
2014-01-25 21:40:23 -08:00
Unknown W. Brackets 2347498667 x86jit: Use templates to avoid some void * casts.
Makes it a bit cleaner and potentially safer.
2014-01-18 09:57:13 -08:00
Henrik Rydgård be74da8f3c More include cleanup, hopefully buildfix Symbian 2013-12-30 00:23:04 +01:00
Henrik Rydgard 455a73bba7 Bugfix replace function inlining (compilerPC needs to be increased). Misc. 2013-12-20 15:37:37 +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
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 6937719c3b Minor fixes around function replacement, a couple of math funcs 2013-12-18 10:35:50 +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
Henrik Rydgard 2d8429ac48 Assorted cleanup in the MIPS emulation 2013-12-10 13:15:16 +01:00
Unknown W. Brackets fd38b10ab6 x86jit: Rename imm funcs to match armjit. 2013-11-10 21:59:49 -08:00
Unknown W. Brackets 359110f010 x86/armjit: Add jump following (off by default.)
Inlines function calls up to a certain extent.  Allows us to get
immediates all the way to a syscall, for example, usually.

Not sure if faster.
2013-11-10 21:59:49 -08:00
Unknown W. Brackets aacb31bc18 armjit: Copy over (disabled) immbranch optim.
This does a little loop unrolling.  Costs a bit more cache space, but
avoids flushing regs for longer.

Not enabled.
2013-11-10 21:59:48 -08:00
Henrik Rydgard 5ad04a23f4 x86 jit: Rename BindToRegister to MapReg 2013-11-09 15:23:31 +01:00
Unknown W. Brackets da20bda729 Make memchecks ignore cached/uncached memory.
You usually want both.
2013-10-27 13:15:12 -07:00
Unknown W. Brackets 1283a93492 Avoid some minor warnings. 2013-10-19 14:57:45 -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
Henrik Rydgard 20174d9410 Delete the lookup table version of vh2f 2013-09-28 22:15:29 +02:00
Henrik Rydgard 7ca6d73857 Two approaches to vh2f (half-float to float): lookuptable and fast SSE 2013-09-28 22:08:44 +02:00
Unknown W. Brackets 50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Unknown W. Brackets 157b682344 Always use fastmem for sw/lw on SP. 2013-09-07 22:44:18 -07:00
Henrik Rydgard 8c88dff5a4 More log categories, use them (and existing ones). Improve log config. 2013-09-07 22:02:55 +02:00
Henrik Rydgard 324cde5a79 Let's actually use the log category mechanism. A first step. 2013-09-07 21:19:21 +02:00
Henrik Rydgard 78d3ee3d6a Misc cleanup, mostly logging code 2013-09-07 13:01:19 +02:00
Unknown W. Brackets b558189c37 Just invalidate blocks on ClearCacheAt().
This makes it safe to call from a jitted syscall, etc.
2013-09-01 00:32:43 -07:00
The Dax a35a407207 Add two new instructions to the MIPS interpreter for logging. vertex.pbp demo seems to use one of them. 2013-08-25 16:28:19 -04:00
Unknown W. Brackets 97aa1a631e Improve typesafety in the x86 regalloc. 2013-08-24 19:41:10 -07:00
Unknown W. Brackets 3156b95d3f Make sure there's enough space while compiling. 2013-08-24 17:38:22 -07:00
Unknown W. Brackets 52d6080fb4 Pass in some analysis results, don't use yet. 2013-08-24 15:36:24 -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
Unknown W. Brackets b37f09cedf Make MIPSInfo a struct for typesafety.
Found a bug in ReadsFromReg().
2013-08-24 13:22:10 -07:00
Unknown W. Brackets df32c99be6 Attempt to follow branches to a max # of ops.
Seems to make it slower also.  Maybe taking the branch would be better...
hmmph.
2013-08-16 01:07:11 -07:00
Unknown W. Brackets 6b0b5145e5 Clean up some inconsistency in jit branches. 2013-08-16 00:44:23 -07:00
Unknown W. Brackets 14b719a7ac Make it possible to have more block exits. 2013-08-16 00:12:49 -07:00
Unknown W. Brackets 64c2ea86c0 Add a method to save the gpr/fpr state in jit. 2013-08-16 00:12:49 -07:00
Unknown W. Brackets 8266063394 Make sure we're reporting unknown instructions. 2013-08-11 18:20:43 -07:00
Henrik Rydgard 0dac2b4783 Update native, minor UI stuff and cleanups 2013-08-10 23:04:23 +02:00
Henrik Rydgard 51596b636a Fix numerous ARM JIT bugs. Activate vmtvc and vscl, and vadd/vmul/vdiv/vsub for real this time. 2013-07-31 10:34:58 +02:00
Unknown W. Brackets b307d77b61 Oops, need to still rewind on breakpoint. 2013-07-27 15:05:16 -07:00
Unknown W. Brackets 1a9b190188 Treat CORE_NEXTFRAME like CORE_RUNNING is bps.
Fixes some cases where breakpoints skip instructions incorrectly.
2013-07-27 13:26:43 -07:00
Unknown W. Brackets 25cc09b81b Improve perf when ignore illegal is off.
Most users will have it on, but this improves perf a bit when it isn't.
2013-07-06 13:04:19 -07:00
Unknown W. Brackets 77670876cd Fix memcheck range intersect check. 2013-07-06 12:08:34 -07:00
Unknown W. Brackets 2b4344f61d Don't rewind the PC on memcheck w/ CORE_NEXTFRAME.
If the memcheck doesn't hit, we'll still rewind the PC, causing weirdness.
This is likely if you try to memcheck an address hit first thing in a
vblank interrupt handler or something.
2013-07-06 03:30:21 -07:00
Unknown W. Brackets 662ae77214 Save regs before/after 3-arg func calls on x86.
This fixes bugs only on x64 when ABI_CallFunctionACC and etc. were used.
This was breaking things since R8 was not being saved (arg 3.)
2013-07-06 00:54:53 -07:00
Unknown W. Brackets 19f2b35679 Keep the stack aligned when tripping memchecks. 2013-07-06 00:22:09 -07:00