Commit Graph

27310 Commits

Author SHA1 Message Date
b29b56c61a Interpreter_Integer: Clean up casting in mulhwx() and mulhwux()
These can be expressed in a slightly cleaner manner without so many
casts. While we're at it, also get rid of unnecessary indexing (we
already have the result nearby).
2018-05-16 19:45:17 -04:00
3400165171 Jit64: Factor function hooking out of DoJit() 2018-05-16 19:00:39 -04:00
f3c13402e8 Interpreter: Factor function hooking code out of SingleStepInner() 2018-05-16 18:56:40 -04:00
4b25538f2f CachedInterpreter: Factor function hooking code out of Jit()
Extracts the self-contained code into its own function to clean up the
flow of Jit() a little more.

This also introduces a helper function to HLE.h that will be used to
reduce the boilerplate here and in the interpreter and Jit64 in the
following commits.

This function performs all of the preliminary checks required prior to
attempting to hook/replace a function at a given address. The function then
calls a provided object that satisfies the FunctionObject concept in the
C++ standard library. This can be a lambda, a regular function pointer,
an object with an overloaded function call operator, etc. The only
requirement is that the function return a bool, indicating whether or
not the function was replaced, and that it can take parameters in the
form: fn(u32 function, HLE::HookType type)
2018-05-16 18:55:49 -04:00
c7cd1424f4 Interpreter_FPUtils: Use Common::BitCast where applicable
Gets rid of now-unnecessary memcpy boilerplating for different bit
representations between integral and fp types.
2018-05-16 17:48:30 -04:00
e7403e121e EXI_DeviceEthernet: In-class initialize members
Gets rid of a second pair of ifdefs in the constructor. This also makes
sure the fd on Unix/BSD platforms is uniformly initialized. Previously
fd would be in an inconsistent state on FreeBSD or OpenBSD due to the
BSD OS checks not being present in the #elif within the constructor.
2018-05-16 16:55:07 -04:00
fc78a4c993 EXI_DeviceEthernet: Make internal members and functions private
Previously, the entirety of CEXIETHERNET was exposed publically, which
wasn't necessary. We simply make the thread function part of the
internal interface, which gives it access to internal data members,
while keeping everything else outside of it.
2018-05-16 16:55:02 -04:00
b547f72878 Merge pull request #6871 from lioncash/virtual
DSPHLE/UCodes: Replace unnecessary virtual keywords with override
2018-05-16 22:16:26 +02:00
8fa8aa3e1b Merge pull request #6870 from lioncash/hash
Common/Hash: Namespace code under the Common namespace
2018-05-16 22:04:20 +02:00
a7b8b15e7f DSPHLE/UCodes: Replace unnecessary virtual keywords with override
Given these HLE classes inherit from a common base with a virtual
destructor, override is more appropriate here, as virtual propagates to
these destructors anyway.

This is also safer. If the base class' destructor is ever made
non-virtual, then these classes will cause a compilation error if they
aren't taken into account, as they'd be overriding a non-virtual
function (the destructor).
2018-05-16 15:57:55 -04:00
011ee110bc Common/Hash: Namespace code under the Common namespace
Brings more common code under the Common namespace.
2018-05-16 15:39:23 -04:00
2a9283ee3d Fix "Show Input Display" 2018-05-16 21:07:15 +02:00
b203024a26 Merge pull request #6868 from aldelaro5/qt-debugger-fix-updatediasm
Qt/Debugger: Use QApplication::instance() as the connection context in Host_UpdateDisasmDialog()
2018-05-16 18:54:21 +02:00
47fd8c6eff Merge pull request #6855 from aldelaro5/qt-render-min-width
Qt: allow to resize the render widget however wanted on render to main
2018-05-16 14:11:51 +02:00
4de2c5040d Merge pull request #6867 from jackoalan/code-view-bg
Qt/CodeViewWidget: Dynamic background dimming for dark themes
2018-05-16 14:08:02 +02:00
9335400f65 Merge pull request #6862 from aldelaro5/qt-unify-pause-play
Qt: make the pause play button only one button
2018-05-16 14:07:35 +02:00
d14f6e9ee6 Qt/CodeViewWidget: Dynamic background dimming for dark themes 2018-05-15 18:59:40 -10:00
33ed5b2e99 Qt/Debugger: Use QApplication::instance() as the connection context in Host_UpdateDisasmDialog()
Because running on the host instance doesn't actually allow to fire the event.  This fix a regression where stepping would not udpate the GUI at all.
2018-05-16 00:42:35 -04:00
bc43f45119 Qt: make the pause play button only one button
This is to avoid several issue with using 2 actions and switching between them.  This commit will instead have one action get his property changed on pause and play.
2018-05-15 23:37:50 -04:00
947fa271be Common: Add MemArena.h/cpp to the Common namespace
Brings more common code under the Common namespace.
2018-05-15 18:27:32 -04:00
6c09ce3d95 Qt: Use proper signals 2018-05-15 20:13:12 +02:00
79533ef789 Qt/PathPane: Disable "Remove" button when not applicable 2018-05-15 20:13:12 +02:00
40e6abad09 Qt/AudioPane: Improve layout 2018-05-15 20:13:12 +02:00
54d81ed13a Qt/SettingsWindow: Wrap tabs in scrollareas 2018-05-15 20:13:12 +02:00
b9bd4ecbcb Qt/Host: Fix random crashes when exiting fullscreen 2018-05-15 18:22:26 +02:00
71f5fafb3b Merge pull request #6861 from spycrab/qt_adapter_save
Qt/GeneralWidget: Restore the adapter properly
2018-05-15 11:10:12 +02:00
b4324847fb Merge pull request #6863 from booto/jit-ps-dsi
Prevent paired singles routines clobbering PC,SRR0
2018-05-15 11:07:21 +02:00
c880302c6b Prevent paired singles routines clobbering PC,SRR0
Paired single (ps) instructions can call asm_routines that try to update
PowerPC::ppcState.pc. At the time the asm_routine is built, emulation has
not started and the PC is invalid (0). If the ps instruction causes an
exception (e.g. DSI), SRR0 gets clobbered with the invalid PC.

This change makes the relevant ps instructions store PC before calling out
to asm_routines, and prevents the asm_routine from trying to store PC
itself.
2018-05-14 20:49:13 -04:00
e922f91cc3 Qt/GeneralWidget: Restore the adapter properly 2018-05-14 21:16:20 +02:00
159f6115e2 Merge pull request #6851 from lioncash/usage
BreakpointWidget: Move variables closer to usage sites in OnLoad()
2018-05-14 19:18:05 +02:00
b5761f9dc7 Merge pull request #6852 from lioncash/code
CodeViewWidget: Minor changes
2018-05-14 19:17:35 +02:00
5b15060127 Merge pull request #6857 from spycrab/qt_minor_win
Qt: Minor window fixes
2018-05-14 19:11:56 +02:00
ff971b1a6f Qt/GeneralWidget remove unnecesary description wiring 2018-05-14 18:18:18 +02:00
ca5dc25694 Merge pull request #6858 from lioncash/capture
DolphinQt2: Resolve unused lambda capture warnings
2018-05-14 16:47:55 +02:00
26b1048975 Merge pull request #6850 from lioncash/moc
DolphinQt2: Add missing Q_OBJECT macro to all QObject-related classes missing it
2018-05-14 16:29:53 +02:00
e2543ea801 DolphinQt2: Resolve unused lambda capture warnings
Resolves -Wunused-lambda-capture warnings.
2018-05-14 10:11:47 -04:00
7e9bf12246 Qt: Minor window fixes
* Remove some more "What's this?" buttons
* Add some missing titles
2018-05-14 11:10:04 +02:00
db4d8d7ad3 Merge pull request #6854 from lioncash/access
Jit/CachedInterpreter: Minor cleanup to code buffer accesses
2018-05-14 07:49:22 +02:00
6f2d8fad8f Qt: allow to resize the render widget however wanted on render to main 2018-05-14 00:43:31 -04:00
7437f2efdc JitArm64: Clean up code buffer accesses in DoJit()
Done for the same reason this was done for Jit64. Avoids constantly
indexing for the same known object instance over and over.
2018-05-13 22:11:01 -04:00
f4affa3d1d CachedInterpreter: Clean up code buffer accesses in Jit()
Done similarly for the reasons Jit64 was done. Localizes indexing to one
place instead of repeatedly indexing the same place.
2018-05-13 22:11:01 -04:00
a16c0a6e16 Jit64: Clean up code buffer accesses in DoJit()
Moves the codebuffer access variables closer to their first use, and
gets rid of multiple indexing expressions. We already know which op
we're accessing in particular, so just make a reference to it and access
it instead of duplicating the expression all over the place.
2018-05-13 22:10:56 -04:00
d7a3ce26de CodeViewWidget: Get rid of magic values in OnInsertBLR() and OnInsertNOP()
A call like ReplaceAddress(address, 0) is pretty ambiguous; so is
ReplaceAddress(address, false), so use an enum class that tells people
straight-up what the replacer is.

This also gets rid of the really weird naming, where if 'blr' is true,
we'd be replacing the address with a NOP, rather than an actual BLR
instruction, so we invert that so it actually makes sense. There's no
actual bug fixed here though, considering the OnInsert functions
specified the correct values; it's literally just weird naming.
2018-05-13 18:33:51 -04:00
bbc0aee5ea CodeViewWidget: Replaces usages of QString::fromStdString with QStringLiteral where applicable
There's no need to construct a std::string here, when there's no dynamic
elements to the text.
2018-05-13 18:11:09 -04:00
644bbb29f3 CodeViewWidget: Remove unnecessary includes 2018-05-13 18:06:37 -04:00
7032863569 CodeViewWidget: Remove unnecessary QColor constructions
QBrush also accepts regular GlobalColor values as well.
2018-05-13 18:01:10 -04:00
a0a0295f9d BreakpointWidget: Move variables closer to usage sites in OnLoad()
In the early-out case, we now don't end up constructing two vectors
that aren't even used. It also keeps relevant code together.
2018-05-13 17:56:03 -04:00
2c861e75f5 Qt/debugger: only consider debugger hotkeys if debugging is enabled 2018-05-13 17:39:44 -04:00
f8e5e7126c Merge pull request #6849 from leoetlino/oops
WiiSave: Fix out-of-bounds read
2018-05-13 23:34:32 +02:00
345838d517 Merge pull request #6842 from spycrab/qt_map_apply
Qt/Mapping: Fix mapping changes not being applied instantly
2018-05-13 23:34:18 +02:00