Commit graph

15890 commits

Author SHA1 Message Date
Ryan Houdek
0dd3804cf7 [AArch64] Implement 13 integer instructions. 2015-01-08 19:56:47 -06:00
Ryan Houdek
be0d552d54 [AArch64] Enable the full range of integer loadstores. 2015-01-08 19:56:47 -06:00
Ryan Houdek
b1169a9773 [AArch64] Flush FPRs if they won't be used be used the rest of the block. 2015-01-08 19:56:47 -06:00
Ryan Houdek
3fe0b5b969 [AArch64] Add floating point backpatching support. 2015-01-08 19:56:47 -06:00
Ryan Houdek
f1443bec1e [AArch64] Add a memory dump routine.
Allows me to easily disassemble a block of code from the Nexus 9 by dumping it to logcat.
2015-01-08 19:56:47 -06:00
Ryan Houdek
b3201be95f [AArch64] Add some static_asserts.
Makes sure we have a few PPCState values within range of STRB's range.
2015-01-08 19:56:47 -06:00
Ryan Houdek
74de345b51 [AArch64] Fix loads with update.
Update register wasn't being loaded in to the cache prior pushing the address in to it.
Adds float push and pop routines around the calls that need it as well.
2015-01-08 19:56:47 -06:00
Ryan Houdek
52a532370a [AArch64] Implement FPR Cache. 2015-01-08 19:56:47 -06:00
Ryan Houdek
c511ee763a [AArch64] Add the float emitter. 2015-01-08 19:55:31 -06:00
Ryan Houdek
5a0133c478 [AArch64] Add a few more VFP register helpers.
Renames Is128Bit to IsQuad to line up more with the other helpers.
2015-01-07 13:05:55 -06:00
Ryan Houdek
2b4f1aed40 [AArch64] Minor shifted register adjustment.
If we have a shift amount that is the full length of the source register then we have an invalid instruction.
This can happen when dealing with a couple of PowerPC instructions.
This same adjustment is already in the ARMv7 emitter.
2015-01-07 13:03:51 -06:00
Ryan Houdek
0a23ca9461 [AArch64] Add MUL/MNEG instruction aliases to the emitter. 2015-01-07 13:03:01 -06:00
Ryan Houdek
d2eaba5cb7 [AArch64] Minor MOVI2R improvement.
Use the ZR for both input arguments in the case the immediate is the maximum immediate value.
This allows it to be aliased to MVN when disassembling.
2015-01-07 13:00:39 -06:00
Ryan Houdek
8dba84dd7c [AArch64] Fix 8 & 16 bit loadstore indexes.
I wasn't bit shifting correctly for 8 and 16bit loadstores.
2015-01-07 12:58:37 -06:00
Ryan Houdek
f4f59ea71e [AArch64] Fix ADDS/SUBS emitter functions.
These weren't emitting the flag bit. So they were regular ADD and SUB emitters.
2015-01-07 12:56:45 -06:00
skidau
c6e2449bff Merge pull request #1843 from skidau/GC-Adapter-origin
Corrects the origin of a GC Controller
2015-01-07 19:06:46 +11:00
skidau
0d952534c7 Corrects the origin in the case where a GC Controller has been set in the controller properties, but a controller has not been plugged into the adapter. 2015-01-07 17:12:30 +11:00
skidau
ab87309917 Merge pull request #1838 from JosJuice/clearcoverinterrupt-timing
DVDInterface: Use default delay for DVDLowClearCoverInterrupt
2015-01-07 12:41:21 +11:00
skidau
c0ff677674 Merge pull request #1763 from skidau/GC-Adapter-error-recovery
Added an error recovery mechanism for the GC Adapter.
2015-01-07 12:40:14 +11:00
Dolphin Bot
89b7f1057f Merge pull request #1804 from FioraAeterna/fastermmu2_master
MMU: various improvements, bugfixes, optimizations
2015-01-07 00:49:58 +01:00
Markus Wick
a2ec4d5f51 Merge pull request #1836 from FioraAeterna/catchillegalinst
JIT: catch illegal instruction errors
2015-01-06 23:10:46 +01:00
JosJuice
5162ed4d5f DVDInterface: Use default delay for DVDLowClearCoverInterrupt
The old delay was probably a hack to make up for the incorrect
disc speeds. Using it with the new disc speeds made
Resident Evil Archives: Resident Evil Zero freeze when starting.
2015-01-06 21:25:17 +01:00
Markus Wick
f63361ad26 Merge pull request #1810 from Stevoisiak/FreelookDefaultHotkeyFix
Changed default freelook hotkey to match description
2015-01-06 20:52:00 +01:00
Markus Wick
f080e0221e Merge pull request #1758 from rohit-n/build-pch
Fix building with PCH disabled.
2015-01-06 20:42:50 +01:00
Markus Wick
09a10622dd Merge pull request #1621 from FioraAeterna/pscleanup
JIT: cleanups/optimizations for ps loadstore
2015-01-06 20:12:50 +01:00
Fiora
8f7c799794 JIT: catch illegal instruction errors
Still crash, but at least give a message informing the world that it happened.
2015-01-06 11:06:49 -08:00
Markus Wick
25fac0282c Merge pull request #1764 from Armada651/safe-exclusive
D3D: Only try to apply exclusive mode when the renderer is in focus.
2015-01-06 11:00:47 +01:00
Markus Wick
d8d4c94e07 Merge pull request #1819 from Tilka/cmake
CMake: simplify some expressions
2015-01-06 09:27:59 +01:00
Ryan Houdek
7033b371c2 Merge pull request #1784 from lioncash/android
Android: Fix a few warnings. Misc other things.
2015-01-05 14:32:01 -06:00
Fiora
e85f0ff179 MMU: fix problems with blocks that cross vmem page boundaries
In rare cases, this can result in a violation of the JIT block cache constraint
that blocks must end in the same place. This can cause instability, lockups,
due to blocks not properly being invalidated properly.
l Please enter the commit message for your changes. Lines starting
2015-01-05 10:46:04 -08:00
Fiora
b058bbd223 JIT: move mfcr code to JitAsmCommon
It's like 80+ instructions, so inlining it on every use of mfcr is probably
not the best for the icache.
2015-01-05 10:46:03 -08:00
Fiora
821db9798c Memmap: clean up function argument names.
To be more consistent overall.
2015-01-05 10:46:02 -08:00
Fiora
3d2492627f Fastmem: increase the size of trampoline cache in MMU mode, check space
Fastmem in MMU mode generates way more trampolines than normal, so we need
a bunch more space too, lest we run out of room.
2015-01-05 10:46:01 -08:00
Fiora
1ee83e332e MMU: optimize PTE lookup code
Pull out calculation of PTE1 instead of comparing the separate parts.
2015-01-05 10:46:01 -08:00
Fiora
16e756cb39 MMU: fix TLB behavior on setting C bit
We shouldn't be updating the TLB when setting the C bit.

Bug reported by tueidj.
2015-01-05 10:45:59 -08:00
Fiora
8903df7300 MMU: simplify code to restore original data register after failed load
Instead of passing the value around constantly, just store it in the regcache,
note where it is, and restore it on the exception path.

This saves a whole bunch of pushing and popping and gives a ~5% speed boost
in Rebel Strike. It's a bit ugly, but it simplifies a lot of code and is
faster, too.
2015-01-05 10:45:59 -08:00
Fiora
53b44ccb3a x64ABI: enhance MOVTwo to take an offset
This lets us merge displacements into MOVTwo in trampolines.
2015-01-05 10:45:58 -08:00
Fiora
2a8936312e Fastmem: jump to trampolines instead of calling them
Should be slightly faster, and also lets us skip the nops on the way back.

Remove the trampoline cache, since it isn't really useful anymore with this.
2015-01-05 10:45:54 -08:00
Fiora
9923d705df JIT: simplify and optimize memcheck macros
Instead of jumping over update code and similar, just jump directly to the
handler.

This avoids redundant exception checks in the case where we can't do fastmem
memory operations (e.g. paired loadstore).
2015-01-05 10:34:59 -08:00
Fiora
6dc7cf29f3 JIT: implement crset special case
Rebel Strike seems to use this one.
2015-01-05 10:34:59 -08:00
Fiora
0ff6ad5734 MMU: handle exception checks in fastmem
Inspired by a patch by magumagu.
2015-01-05 10:34:58 -08:00
Fiora
190312e1a6 MMU: enable fastmem stores 2015-01-05 10:34:58 -08:00
Fiora
8e1c92f2e7 MMU: remove goto in MMU fast past check
Split into a separate patch to avoid rebasing conflicts and to split from
functional changes.
2015-01-05 10:34:57 -08:00
Fiora
6f028257d7 MMU: remove code that looks totally wrong
I don't think this affects any games (who puts PTEs in MEM2?) but it didn't
make any sense.
2015-01-05 10:34:57 -08:00
Fiora
dde8b24d00 MMU: small simplification of TLB structure
We only need one "recent" per set, not NUM_WAYS recents. Slightly faster.
Breaks savestate compatibility.
2015-01-05 10:34:56 -08:00
Fiora
a0e5c76a1f Memmapfunctions: more refactoring and optimizations
Try to clean up some redundant code, simplify a few checks, and simplify
page accesses.
2015-01-05 10:34:56 -08:00
Fiora
c2ed29fe0d MemmapFunctions: various MMU optimizations
Small TLB lookup optimizations: this is the hot path for MMU code, so try to
make it better.

Template the TLB lookup functions based on the lookup type (opcode, data,
no exception).

Clean up the Read/Write functions and make them more consistent.

Add an early-exit path for MMU accesses to ReadFromHardware/WriteToHardware.
2015-01-05 10:34:55 -08:00
Fiora
ea23ce2726 MMU: fix rollback in DSIs on page-crossing stores
I don't know if this affected anything, but it was subtly wrong.
Also reorganize the loads to match, for consistency.
2015-01-05 10:34:55 -08:00
Markus Wick
acb583e607 Merge pull request #1815 from degasus/fix_det_dual_core
VideoCommon: fix deterministic dual core
2015-01-05 11:50:33 +01:00
skidau
519970c003 Added a callback option instead of using a thread to read the GC adapter. 2015-01-05 12:43:26 +11:00