Commit Graph

3609 Commits

Author SHA1 Message Date
65ecf1e43e BitUtils: loosen clz to inline on msvc/arm64 2021-01-09 23:44:00 -08:00
1e5e5ea855 BitUtils: initialize variables
fixes C3615 on some msvc/cmake configs
2021-01-09 22:18:29 -08:00
eafb9de047 Merge pull request #9323 from waddlesplash/haiku
Rehabilitate Haiku support.
2021-01-05 16:09:43 +01:00
6106d6481f BitUtils: __builtin_clz is undefined when value == 0 2021-01-03 17:35:15 +00:00
2df11d3911 Rehabilitate Haiku support. 2021-01-02 16:54:24 -05:00
36af39853d Arm64Emitter: Remove unused OpType enum
This isn't used anywhere, so we can remove it.
2021-01-01 11:06:05 -05:00
95cc53edec Arm64Emitter: Convert ArithOption enums into enum classes
Makes the enums strongly typed. While we're at it, we can also make
these enums private.
2021-01-01 07:10:41 -05:00
f59ee87031 Merge pull request #9402 from lioncash/emitter
Arm64Emitter: Interface cleanup
2021-01-01 00:52:40 +01:00
7bf590ee5a Merge pull request #9403 from lioncash/guard
ArmCommon: Add missing header guard
2020-12-31 12:17:28 +01:00
e45aa019ec ArmCommon: Mark NO_COND as constexpr
Allows it to be used in compile-time expressions if ever necessary.
2020-12-30 20:54:05 -05:00
c9711a5eca ArmCommon: Add missing header guard
Prevents any multiple inclusion errors from occurring.
2020-12-30 20:53:31 -05:00
cca0dffebd Arm64Emitter: Add shorthand member functions for hint instructions
Allows for more concise code.
2020-12-30 20:49:20 -05:00
6046a15267 Arm64Emitter: Make ShiftAmount enum an enum class
Reduces namespace pollution and makes the enum strongly typed.
2020-12-30 20:49:20 -05:00
fab2053439 Arm64Emitter: Make RoundingMode enum an enum class
Prevents namespace pollution and makes the enum members strongly typed.
2020-12-30 20:49:20 -05:00
d87ec71615 Arm64Emitter: Make PStateField enum an enum class
Prevents namespace pollution and makes the enum members strongly typed.
2020-12-30 20:49:20 -05:00
5c3f2fde22 Arm64Emitter: Make BarrierType enum an enum class
Prevents namespace pollution and enforces strong typing.
2020-12-30 20:49:20 -05:00
f21c740919 Arm64Emitter: Make SystemHint enum an enum class
Avoids polluting the namespace and makes the members strongly typed.
2020-12-30 20:49:20 -05:00
5011c155ec Arm64Emitter: Make type member of FixupBranch an enum class
Eliminates some magic numbers and makes the type member strongly typed.
2020-12-30 20:49:20 -05:00
2fa4729815 Arm64Emitter: Annotate switch fallthrough
Silences warnings and makes intent explicit.
2020-12-30 20:49:20 -05:00
d780ad1102 Arm64Emitter: Make use of std::optional
Allows eliminating some out variables in favor of optional, which allows
narrowing visible scope of variables.
2020-12-30 20:49:16 -05:00
c1d041b888 Merge pull request #9318 from JosJuice/android-saf-games
Android: Use storage access framework for game list
2020-12-30 11:10:35 +01:00
9ffd345df0 Config: Fix cache not being invalidated when callbacks are suppressed
The config version should always be incremented whenever config is
changed, regardless of callbacks being suppressed or not.
Otherwise, getters can return stale data until another config change
(with callbacks enabled) happens.
2020-12-29 22:07:47 +01:00
d78277c063 Android: Add specialized content provider implementation of DoFileSearch 2020-12-28 21:00:10 +01:00
3f68aceaca Merge pull request #9348 from lioncash/dsp-deglobal
DSP: Eliminate most global state
2020-12-28 15:48:11 +01:00
a636fcf230 BitUtils: Fix uint64_t gcc compile (Linux) 2020-12-28 11:50:57 +01:00
d695fcb126 BitUtils: Add CountLeadingZeros 2020-12-27 22:56:43 +00:00
7d1bd565a6 DSP: Eliminate most global state
An unfortunately large single commit that deglobalizes the DSP code.
(which I'm very sorry about).

This would have otherwise been extremely difficult to separate due to
extensive use of the globals in very coupling ways that would result in
more scaffolding to work around than is worth it.

Aside from the video code, I believe only the DSP code is the hairiest
to deal with in terms of globals, so I guess it's best to get this dealt
with right off the bat.

A summary of what this commit does:
  - Turns the DSPInterpreter into its own class
    This is the most involved portion of this change.
    The bulk of the changes are turning non-member functions into member
    functions that would be situated into the Interpreter class.

  - Eliminates all usages to globals within DSPCore.
    This generally involves turning a lot of non-member functions into
    member functions that are either situated within SDSP or DSPCore.

  - Discards DSPDebugInterface (it wasn't hooked up to anything,
    and for the sake of eliminating global state, I'd rather get rid of
    it than think up ways for this class to be integrated with
    everything else.

  - Readjusts the DSP JIT to handle calling out to member functions.
    In most cases, this just means wrapping respective member function
    calles into thunk functions.

Surprisingly, this doesn't even make use of the introduced System class.
It was possible all along to do this without it. We can house everything
within the DSPLLE class, which is quite nice =)
2020-12-27 06:38:02 -05:00
d2f9991b0f Merge pull request #9360 from Minty-Meeo/osreport-split
Split OSREPORT logging type
2020-12-26 11:41:18 +01:00
b430d66cdc Split OSREPORT logging type
The enumerated LOG_TYPE "OSREPORT" is currently used in both EXI_DeviceIPL.cpp and HLE_OS.cpp.  In many games, the multitude of game functions detected by HLE_OS.cpp for OSREPORT logging results in poor log readability.  This Pull Request remedies that by adding a new enumerated LOG_TYPE "OSREPORT_HLE" for log usage in HLE_OS.cpp.

In the future, further changing how logging in HLE_OS.cpp works may be desirable.  As it is, game functions are detected that send a single character to the log.  This is a major source of poor readability.
2020-12-24 23:38:59 -06:00
27acba620c Core: Add new Free Look settings and config 2020-12-24 13:49:25 -06:00
29fceeb37f MemoryUtil: Use HW_PHYSMEM64 sysctl in MemPhysical
HW_PHYSMEM is deprecated on OpenBSD and only supplies a 32-bit value on NetBSD
2020-12-20 22:25:36 +00:00
2126f62111 Android: Add content provider support to File::ScanDirectoryTree 2020-12-20 13:24:54 +01:00
a7c05d7e84 Android: Add content provider support to File::FileInfo 2020-12-20 13:24:54 +01:00
99ffee9a0a Android: Add content provider support to File::OpenFStream 2020-12-20 13:24:54 +01:00
LC
0315ca5e37 Merge pull request #9332 from leoetlino/warning-fixes
Core: Fix various warnings
2020-12-19 21:45:21 -05:00
LC
2097de603c Merge pull request #9339 from AdmiralCurtiss/utf8-libpng
Common: Write PNGs in two steps to allow Unicode target paths.
2020-12-19 21:43:05 -05:00
5bbd5fce2f Common: Write PNGs in two steps to allow Unicode target paths. 2020-12-20 03:30:17 +01:00
f5170dc69b Common/LinearDiskCache: Handle truncated shadercache files. 2020-12-19 19:09:33 +01:00
e91a347a07 Common/LinearDiskCache: Use unique_ptr instead of new/delete. 2020-12-19 19:09:33 +01:00
0ad2f3da45 Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings 2020-12-16 16:04:19 +01:00
2c355b81f2 Add NetBSD support 2020-12-15 02:34:25 +01:00
d8744e6db8 Add caching to Config::Info
The goal of this change is to make Config::Get(const Info<T>&)
fast so that we can use it in hot paths.
2020-12-12 13:58:50 +01:00
b285991b88 Turn Config::Info into a class with getters 2020-12-11 19:54:16 +01:00
fd5c69deca Merge pull request #9289 from AdmiralCurtiss/simple-png-api-write
Use Simplified libpng API for writing PNGs.
2020-12-11 10:24:16 +01:00
2e63cc8313 Merge pull request #9307 from Dentomologist/add-deleted-file-missing-warning-flag
Add File::Delete and File::DeleteDir warning flags
2020-12-11 02:06:28 +01:00
75899b0e11 Merge pull request #9221 from JosJuice/android-saf-sd-card
Android: Use storage access framework for custom SD card paths
2020-12-10 16:32:43 -05:00
4a55511e18 Add warning flags to File deletion functions
Adds a flag to File::Delete and File::DeleteDir functions to control
whether a console warning is emitted when the file or directory doesn't
exist. The flag is optional and true by default to match current behavior.
2020-12-05 16:13:46 -08:00
c434eefe94 Change File::DeleteDir return value
Makes File::DeleteDir return true when attempting to delete a
nonexistent path.

The purpose of DeleteDir is to ensure the path doesn't exist after the
call, which is better reflected by the new return value. Additionally,
none of the current callers actually check the return value so this
won't break any existing code.
2020-12-03 13:31:53 -08:00
139d4fc76e General: Convert PanicAlerts over to fmt equivalent
Converts lingering panic alert calls over to the fmt-capable ones.
2020-12-02 13:38:33 -05:00
2a85534805 Merge pull request #9283 from JosJuice/config-get-speedup
Common: Optimize Config::Get
2020-11-27 02:36:33 +01:00