Mat M
c3398c9e2c
Merge pull request #6559 from spycrab/qt_crashes
...
Qt/PatchesWidget: Fix segfault
2018-03-29 18:51:22 -04:00
Mat M
fc99b21080
Merge pull request #6560 from JosJuice/invalid-games-in-game-list
...
DolphinQt2: Don't show invalid games in game list
2018-03-29 18:49:38 -04:00
Mat M
65a1065cde
Merge pull request #6561 from JosJuice/uid-version-last-changed
...
Put a "last changed in PR" comment next to UID cache version
2018-03-29 18:48:12 -04:00
Mat M
8185b5f1fd
Merge pull request #6562 from JosJuice/translate-qos
...
Translate the netplay chat info message about QoS
2018-03-29 18:47:29 -04:00
Lioncash
b818cc682c
VideoCommon/Vulkan: Explicitly link in xxhash
...
Lessens the dependency on the LIBS variable (and also makes the required
libraries explicit).
2018-03-28 17:03:16 -04:00
Lioncash
fd7ac0d4a3
VideoCommon/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-03-28 09:57:50 -04:00
Lioncash
a2a18380a7
UICommon/CMakeLists: Migrate off of add_dolphin_library
...
Continues the migration work started in
3a4c3bbe01
2018-03-28 06:29:09 -04:00
Lioncash
df4ca7f05e
SearchBar: Remove unused class variables
2018-03-27 22:47:02 -04:00
Lioncash
306d132232
MainWindow: Remove unused std::string variable in NetPlayHost()
2018-03-27 22:47:02 -04:00
Lioncash
833c030496
WiiPane: Remove unused variable in OnUSBWhitelistRemoveButton()
2018-03-27 22:47:01 -04:00
Lioncash
eb8a853d8e
Resources: Remove unused string in Init()
2018-03-27 22:47:01 -04:00
Lioncash
568490fdfb
MD5Dialog: Call .empty() instead of testing against an empty string
2018-03-27 22:47:01 -04:00
Lioncash
d3283a881f
MenuBar: Remove unnecessary c_str() call
...
Also uses the character overload for find_last_of
2018-03-27 22:47:01 -04:00
Lioncash
b637163704
CodeWidget: Remove unnecessary c_str() calls
2018-03-27 22:46:51 -04:00
Lioncash
4a1123f519
HacksWidget: Remove duplicate AddDescription() call in AddDescriptions()
2018-03-27 22:36:37 -04:00
Lioncash
aa42534fed
FilesystemWidget: Pass path QString by const reference instead of by value in ExtractDirectory()
...
Makes it consistent with the surrounding API.
Also corrects a typo in ExtractFile's parameter list.
2018-03-27 22:00:40 -04:00
Lioncash
fc531993a9
DiscExtractor: Pass partition by reference rather than by value in ExtractDirectory()
2018-03-27 21:49:42 -04:00
Lioncash
008442898c
LinearDiskCache: Don't cast away const in Read()
...
We really shouldn't make the out pointer in the read function const and
then summarily cast it away. Also alters Write to be consistent with
casting.
2018-03-27 21:09:18 -04:00
Lioncash
f10198500e
PixelShaderGen: Invert conditional in WriteColor()
...
Puts the true condition body first instead of the false one for better
reading.
2018-03-27 18:53:17 -04:00
Lioncash
c9e0045881
PixelShaderGen: Remove dead code in WriteColor()
...
The outer conditional executes only whenever destination alpha is used.
2018-03-27 18:46:25 -04:00
Lioncash
2da8d98b2f
HiresTextures: Use std::minmax or std::minmax_element where applicable in GenBaseName()
...
Minimizes repetition.
std::minmax_element can be used for the 256 * 2 case, as it's only performing byte comparisons
and thus, there will always be an element smaller than 0xffff, so it doesn't need to be included
in the set of compared values.
2018-03-27 15:39:05 -04:00
Lioncash
d5a1edba09
HiresTextures: Remove unnecessary pointer casts in GenBaseName()
...
swap16 has an overload that accepts a u8*, performing the same behavior
in a well-defined manner.
2018-03-27 15:19:02 -04:00
Lioncash
9feb18866b
BPStructs: Remove an unnecessary pointer cast in GetBPRegInfo
...
swap32 has an overload that accepts a u8*, performing the same behavior
in a well-defined manner.
2018-03-27 12:04:16 -04:00
Lioncash
476c71efc1
x64Emitter: Make eligible register and immediate functions constexpr
...
Pointer variants aren't eligible as expressions with reinterpret cast
within them cannot be constexpr.
2018-03-26 18:21:22 -04:00
Lioncash
8b072e1383
x64Emitter: Make remaining eligible functions in OpArg constexpr
2018-03-26 18:21:21 -04:00
Lioncash
964201f2d3
x64Emitter: Use std::tie in OpArg's operator==. Provide operator!= for symmetry
2018-03-26 18:21:21 -04:00
Lioncash
7f583b66cb
x64Emitter: Clean up constructors for OpArg
...
Default initializes members and moves initial assignments into the
initializer list.
2018-03-26 18:21:17 -04:00
Lioncash
4a4538abbf
Interpreter_LoadStore: Amend variable naming
...
Amends variable names to follow our code style. Also makes code const correct where possible.
2018-03-26 07:47:50 -04:00
Lioncash
1519e4dbb3
DSPEmitter: Remove uses of the DSP JIT global in CompileCurrent()
...
With this, the DSPEmitter itself no longer makes use of the DSP JIT global
2018-03-26 01:14:17 -04:00
Lioncash
8b29997ed1
Interpreter: Remove an unnecessary UReg_MSR& cast from SingleStepInner
...
This is technically undefined behavior, but regardless of that, it's not
even necessary since we can just make a temporary around the MSR value
and just discard it when done with it, since all we do is query the FP
bit value with it.
2018-03-25 21:36:39 -04:00
Lioncash
b0efcdc8ef
Interpreter: Get rid of static state within SingleStepInner()
...
Given how the hooking operates, we may not execute an instruction.
Instead of making the state a static local to the function, just make it
part of the lifecycle of the Interpreter class.
2018-03-25 21:30:00 -04:00
Lioncash
c4a597171c
MMU: Make XCheckTLBFlag an enum class
2018-03-25 19:51:47 -04:00
Lioncash
9967c24f5d
MMU: Make TLBLookupResult an enum class
2018-03-25 19:44:14 -04:00
Lioncash
0f25627614
DSPCodeUtil: Don't return data via an out parameter
...
We can just return directly in these cases.
2018-03-25 18:55:08 -04:00
Lioncash
e42db3594b
DSPAssembler: Make error code enum an enum class
...
Prevents the error codes from littering the surrounding scope.
2018-03-25 18:19:08 -04:00
Lioncash
8c421ffbb7
DSPTables: Remove opc_t typedef
...
This was only ever used by the DSP assembler, and even then it was
sparsely used. Get rid of it to be consistent with types in other
sections of the DSP code.
2018-03-25 17:53:23 -04:00
Lioncash
2861e8f868
x64Emitter: Clean up constructor and destructors of XEmitter
...
In-class initializes members, defaults the default constructor and
virtual destructor, and puts members in the initializer list.
2018-03-25 16:50:02 -04:00
Lioncash
7bd41a3b55
Jit64/Jit_Integer: Remove dead code in arithXex()
...
The conditional this code is within already checks whether d == b, so this
conditional will never be true.
2018-03-25 15:35:02 -04:00
Lioncash
efcdb3debb
JitArm64/JitAsm: Remove usages of the JIT global
...
With this, the entire ARM JIT makes no use of the JIT global whatsoever.
2018-03-25 15:23:49 -04:00
Lioncash
a45631c4ca
Interpreter_LoadStore: Remove unnecessary casts
...
These aren't necessary as the type being stored into a u32 are of the
same signedness and are smaller in data size, so there's no truncation
being performed.
2018-03-25 15:09:32 -04:00
Lioncash
48e2e9a41d
CachedInterpreter: Use using aliases instead of typedef
2018-03-25 02:57:25 -04:00
Lioncash
9829083241
CachedInterpreter: Use an enum class for instruction type
2018-03-25 02:57:16 -04:00
Lioncash
89df65aa25
Interpreter_Integer: Correct precedence of overflow check in nego
...
The overflow check needs to occur before the condition register update
due to the fact that the summary overflow (SO) bit is used in the
updating of the condition register. If we set any overflow bits after
updating the CR, then we can potentially incorrectly report that an
overflow did not happen (in the case the SO bit wasn't set previously).
2018-03-24 20:48:05 -04:00
Lioncash
96014e74a3
Interpreter_Paired: Don't dump the entire MathUtils namespace into scope
...
Functions from the namespace are only used four times within the entire
file.
2018-03-24 19:42:14 -04:00
Lioncash
46f61a48c7
Interpreter_FloatingPoint: Don't dump the entire MathUtils namespace into scope
...
Given functions from the MathUtils namespace are only used six times in
the whole file, dumping the namespace seems a little excessive.
2018-03-24 19:40:22 -04:00
Lioncash
27611d55ff
Interpreter_FPUtils: Get rid of a pointer cast
...
This is undefined behavior according to the standard. We can just use
the built in means of retrieving a quiet NaN.
2018-03-24 19:33:44 -04:00
Lioncash
8a7abd72b4
PPCTables: Remove prefixed underscores from parameter names
2018-03-24 16:46:49 -04:00
Lioncash
2381aeecc3
PPCTables: Namespace all exposed functions
...
It's somewhat inconsistent to have two straggler functions outside the
namespace.
2018-03-24 16:46:12 -04:00
Lioncash
397b3fb976
CPUCoreBase: Make the GetName() member function const qualified
...
This function should have no need to modify internal class state.
2018-03-24 16:17:39 -04:00
Lioncash
c738ddc4aa
CPUCoreBase: Default the virtual destructor
2018-03-24 16:09:19 -04:00
Lioncash
ef6e747a68
PowerPC: Remove commented out PanicAlert
2018-03-24 14:52:22 -04:00
Lioncash
3dc3b0caa5
Interpreter_LoadStore: Remove commented out code
...
Also removes long separation lines that aren't really necessary.
2018-03-24 14:49:18 -04:00
Lioncash
f9e0645b99
Interpreter_SystemRegisters: Remove commented out code
2018-03-24 14:45:46 -04:00
Lioncash
288b579c09
Interpreter_Integer: Remove commented out code in subfic
2018-03-24 14:43:25 -04:00
Lioncash
01308330d9
InputCommon/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-03-24 14:13:53 -04:00
Lioncash
680ceb7f43
DiscIO/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-03-24 13:54:06 -04:00
Mat M
5669841e83
Merge pull request #6505 from lioncash/arm
...
Arm64Emitter: Minor cleanup
2018-03-23 19:25:50 -04:00
Lioncash
f889cae8c4
Arm64Emitter: Satisfy unrelated linter issues that cropped up by modifying the cpp file
2018-03-23 19:17:44 -04:00
Lioncash
91cefe6c8a
Arm64Emitter: Make IsImmArithmetic, IsImmLogical, FPImm8ToFloat, and FPImm8FromFloat internally linked
...
These aren't used anywhere outside of the emitter. Centralizes them under an anonymous namespace.
2018-03-23 19:17:26 -04:00
Lioncash
2548ccda8e
Common/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work that was started in 3a4c3bbe01
2018-03-23 19:08:30 -04:00
Lioncash
b11c237c43
Arm64Emitter: Remove unnecessary V8_UINT64_C preprocessor macro
...
UINT64_C is provided via <cstdint>, so we can just use that instead.
2018-03-23 13:31:48 -04:00
Lioncash
03671a5534
Arm64Emitter: Remove duplicate IsPowerOf2 function
...
We can just use the generified version in MathUtil.
2018-03-23 13:31:44 -04:00
Lioncash
a52cc8d52b
PixelShaderGen/UberShaderPixel: Silence -Wmissing-braces warnings
2018-03-23 10:06:27 -04:00
Lioncash
2ab29a40eb
AbstractFramebuffer: Silence a -Wlogical-op-parentheses warning in ValidateConfig()
2018-03-23 09:58:19 -04:00
Lioncash
79f40fb8d7
MathUtil: Generify IsPow2
...
This will allow it to also be used in the AArch64 emitter.
2018-03-23 09:50:49 -04:00
Lioncash
38f045cee5
DolphinQt2/GameCubePane: Correct duplicate condition in LoadSettings()
...
Also turns a std::string const reference into a value instance.
While this is well-defined, it does look out of place, given a new string
is being created.
2018-03-23 07:38:26 -04:00
Lioncash
fc16a78f6a
Jit_Integer: Handle NOP case for xori and xoris
...
Like ori and oris, xori and xoris can also be used to introduce a NOP.
In that case, just don't do anything.
2018-03-22 22:51:43 -04:00
Lioncash
007f9e5309
Jit_Integer: Handle NOP case for oris as well
...
Like ori, this can also be used as a NOP under the same conditions.
2018-03-22 22:49:02 -04:00
Lioncash
42fce74f39
Jit_Integer: Handle NOP case where RA == RS for ori
...
ori can be used as a NOP if the two register operands are the same, and
the immediate is zero, not only if the two register operands are r0.
Also removes the check for !inst.Rc, as ori only has one encoding, and
said encoding doesn't even have a record bit in it.
2018-03-22 22:47:19 -04:00
Lioncash
b96bbc8f8d
AudioCommon/CMakelists: Migrate off add_dolphin_library
...
Continues the changes that were introduced in 3a4c3bbe01
2018-03-22 22:07:11 -04:00
Mat M
71846a6daa
Merge pull request #6469 from lioncash/cmake
...
Core/CMakeLists: Migrate off add_dolphin_library
2018-03-22 21:52:44 -04:00
Lioncash
4c97deb364
PowerPC: Namespace all header contents for PowerPC.h
...
Puts everything under the same namespace. Previously the header was only
partially namespaced, which is inconsistent.
2018-03-22 19:01:47 -04:00
Lioncash
796d67e1ec
Interpreter_Integer: Handle OE bit for subf, subfc, subfe, subfme, and subfze
...
With this, overflow flag support is now fully implemented for all
instructions that support it.
2018-03-22 13:08:03 -04:00
Lioncash
9d21425449
Interpreter_Integer: Handle overflow flag when OE bit is set in add, addc, adde, addme, and addze
2018-03-22 09:09:31 -04:00
Lioncash
e53fffeb90
PowerPC: Properly unset the overflow bit
...
The OV bit is non-sticky. Therefore, after an overflow-enabled
instruction executes, if an overflow does *not* occur, then OV is
cleared. SO is sticky however, so it staying set in this case is
correct.
2018-03-21 23:59:15 -04:00
Lioncash
355509653e
Interpreter_Integer: Handle the overflow flag when the OE bit is set for mullw
2018-03-21 20:28:37 -04:00
Lioncash
7a2d98b948
JitAsm: Remove use of the JIT global in Generate()
...
With this, JitAsm code doesn't have any reliance on the JIT global
variable. This means the core JIT64 code no longer relies on said
global at all. The Jit64 common code, however, still has some offenders.
Notably, EmuCodeBlock and Jit64AsmCommon are the remaining places in the
common code that make use of the global variable.
2018-03-21 04:41:37 -04:00
Lioncash
e0165a62da
JitBase: Remove use of the JIT global in Dispatch() and JitTrampoline()
...
Trims down a few more uses of the global variable by just passing the
JIT instance we're dispatching or trampolining with as a parameter.
2018-03-21 04:41:30 -04:00
Lioncash
51cfeb8c7d
JitBase: Ensure JitOptions and JitState instances are consistently initialized
...
Ensures that upon construction of a JitBase instance, that all
underlying members within the option and state structs are guaranteed
to be initialized.
This prevents potentially using a member uninitialized in some form.
2018-03-19 15:58:32 -04:00
Lioncash
2fa0cb91a1
Interpreter_Integer: Set the overflow flag if the OE bit is set for neg
...
Also amends the condition that was being checked. Previously it was
checking if the destination register value was 0x80000000, however it's
actually the source register that should be checked.
2018-03-19 13:27:36 -04:00
Lioncash
675d2fb774
Interpreter_Integer: Set the overflow flag if the OE bit is set for divw and divwu
...
divw and divwu won't panic now if the OE bit is set for these instructions.
2018-03-19 11:51:10 -04:00
Lioncash
f129c936e7
PowerPC: Add functions for getting and setting the XER OV bit
...
While we're at it, change GetXER_SO's return value to u32
to prevent potential sign bit wonkyness given we're performing bit arithmetic.
2018-03-19 11:51:04 -04:00
Lioncash
3a4c3bbe01
Core/CMakeLists: Migrate off add_dolphin_library
...
This macro (that has unfortunately become the de-facto way of
introducing targets) has a lot of disadvantages that outweigh the fact
that you avoid writing two extra lines of CMake script.
- It encourages the use of variables. In a build system the last thing
we want to care about is mutable state that can be avoided.
- It only handles linking in the libraries and nothing else. It's a
laziness macro.
- We should be explicit about what we're doing by introducing the target
first, not last.
This gets the ball rolling by migrating Core off the macro. Note that
this is essentially 1-to-1 unrolling of the macro, therefore we're
still linking in all libraries as public, even though that may not be
necessary.
This can be revisited once everything is off the macro for a quicker
transition period.
2018-03-19 04:02:12 -04:00
Lioncash
14b204a9bb
JitInterface: Remove a downcast within InitJitCore
...
This isn't necessary as JitBase is already within the type hierarchy that
CPUCoreBase is.
2018-03-19 03:13:16 -04:00
Lioncash
a0164e14bc
BreakPoints: Avoid direct use of the JIT global
...
Trims the direct usages of the global by making the code go through the
JIT interface (where it should have been going in the first place).
This also removes direct JIT header dependencies from the breakpoints as
well. Now, no code uses the JIT global other than JIT code itself, and
the unit tests.
2018-03-19 03:08:57 -04:00
Lioncash
b4cd11c7c9
BreakPoints: Invert if statements where reasonable
...
Puts the early-exit condition first, unindenting code that doesn't need
to be.
2018-03-19 03:08:53 -04:00
Lioncash
3137d4f75f
BreakPoints: Use std algorithms where applicable
2018-03-19 03:08:17 -04:00
Lioncash
eea99de118
Interpreter_SystemRegisters: Handle mffs, mtfsb0, mtfsb1, mtfsf, and mtfsfi with the record bit set
...
All of these with the record bit set update condition register 1 with the
contents of the FPSCR's FX, FEX, VX and OX bits.
Helper_UpdateCR1() does exactly that, so we use it here to perform this
for us.
2018-03-19 00:05:00 -04:00
Lioncash
6ae8a2b5f8
JitArm64_RegCache: Remove using namespace declaration from header
...
Dumping a namespace in a header file should be avoided since it can
cause random name and type clashing in unexpected ways.
2018-03-18 19:39:58 -04:00
Lioncash
6428cee939
PPCTables: Make the op type enum an enum class
...
Reduces the amount of identifiers dropped into the global namespace when
the PPCTables header is included.
2018-03-18 18:53:58 -04:00
Lioncash
975ba4abf0
x64Emitter: Make FloatOp and NormalOp enum classes
...
Reduces the amount of identifiers placed in the Gen namespace internally.
2018-03-18 18:04:54 -04:00
Lioncash
c22a6f4551
x64Emitter: Move FloatOp and NormalOp enums to the cpp file
...
These are only used internally. This also allows us to eliminate some
symbols that get dumped into the exposed Gen namespace.
By extension this also hides the Write[X] functions from OpArg's public
interface. This is only used internally by XEmitter, so they shouldn't
be usable by anything else.
2018-03-18 18:04:48 -04:00
Lioncash
b21a00d290
DataReader: Provide a const qualified variant of GetPointer()
...
This wouldn't be much of a data reader if it can't access the
read-only data pointer in read-only contexts. Especially if it
can get a writable equivalent in contexts that aren't read-only.
2018-03-18 16:53:04 -04:00
Lioncash
ce29c1c42f
DataReader: Correct return type of operator=
...
It's questionable to not return a reference to the instance being
assigned to. It's also quite misleading in terms of expected behavior
relative to everything else. This fixes it to make it consistent with
other classes.
2018-03-18 16:50:59 -04:00
Lioncash
ffade65c55
DataReader: Remove __forceinline from trivial functions
2018-03-18 16:49:50 -04:00
Lioncash
4c2ec39199
DataReader: In-class initialize member variables where applicable
...
Allows the default constructor to be defaulted and ensures the default
values are associated with the member variables directly.
Also corrects a prefixed underscore in the two parameter constructor.
2018-03-18 16:34:51 -04:00
Lioncash
fd956f6c69
DataReader: Make size() and Peek() const member functions
...
These don't modify class state, so they can be const qualified.
2018-03-18 16:33:14 -04:00
Lioncash
2b3b1e8d09
VertexShaderGen: Convert defines to an enum
...
Unlike defines, these will actually obey namespacing (should one be
added), and also provide a symbol when debugging, as opposed to a magic
value.
2018-03-18 15:45:20 -04:00
Lioncash
b68e8b872e
VideoBackendBase: Migrate functions from MainBase.cpp to VideoBackendBase.cpp
...
Given that this only contains functions from the VideoBackendBase class,
it makes more sense to move these to the relevant cpp file to keep them
all together.
2018-03-18 15:33:59 -04:00
Lioncash
13ed716419
MainBase: Remove effectively unused s_FifoShuttingDown variable
...
This is only ever set and cleared, which is fine, however nothing else
ever actually reads its state to perform differing behavior.
2018-03-17 18:10:43 -04:00