diff options
| author | 2021-06-23 14:18:27 -0700 | |
|---|---|---|
| committer | 2021-06-24 09:27:40 -0700 | |
| commit | 4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c (patch) | |
| tree | 591792bc47e26bc812e753b0891aab94a8a88352 /src/core/arm | |
| parent | Merge pull request #6504 from Kelebek1/samples-played (diff) | |
| download | yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.tar.gz yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.tar.xz yuzu-4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c.zip | |
common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.
To keep the global namespace clean, users will have to use:
```
using namespace Common::Literals;
```
to access these literals.
Diffstat (limited to 'src/core/arm')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 7 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_64.cpp | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index f871f7bf4..77a44f862 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <dynarmic/interface/A32/config.h> | 8 | #include <dynarmic/interface/A32/config.h> |
| 9 | #include <dynarmic/interface/A32/context.h> | 9 | #include <dynarmic/interface/A32/context.h> |
| 10 | #include "common/assert.h" | 10 | #include "common/assert.h" |
| 11 | #include "common/literals.h" | ||
| 11 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 12 | #include "common/page_table.h" | 13 | #include "common/page_table.h" |
| 13 | #include "common/settings.h" | 14 | #include "common/settings.h" |
| @@ -22,6 +23,8 @@ | |||
| 22 | 23 | ||
| 23 | namespace Core { | 24 | namespace Core { |
| 24 | 25 | ||
| 26 | using namespace Common::Literals; | ||
| 27 | |||
| 25 | class DynarmicCallbacks32 : public Dynarmic::A32::UserCallbacks { | 28 | class DynarmicCallbacks32 : public Dynarmic::A32::UserCallbacks { |
| 26 | public: | 29 | public: |
| 27 | explicit DynarmicCallbacks32(ARM_Dynarmic_32& parent_) | 30 | explicit DynarmicCallbacks32(ARM_Dynarmic_32& parent_) |
| @@ -143,8 +146,8 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* | |||
| 143 | config.wall_clock_cntpct = uses_wall_clock; | 146 | config.wall_clock_cntpct = uses_wall_clock; |
| 144 | 147 | ||
| 145 | // Code cache size | 148 | // Code cache size |
| 146 | config.code_cache_size = 512 * 1024 * 1024; | 149 | config.code_cache_size = 512_MiB; |
| 147 | config.far_code_offset = 400 * 1024 * 1024; | 150 | config.far_code_offset = 400_MiB; |
| 148 | 151 | ||
| 149 | // Safe optimizations | 152 | // Safe optimizations |
| 150 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::DebugMode) { | 153 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::DebugMode) { |
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index ba524cd05..75332e348 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <dynarmic/interface/A64/a64.h> | 7 | #include <dynarmic/interface/A64/a64.h> |
| 8 | #include <dynarmic/interface/A64/config.h> | 8 | #include <dynarmic/interface/A64/config.h> |
| 9 | #include "common/assert.h" | 9 | #include "common/assert.h" |
| 10 | #include "common/literals.h" | ||
| 10 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 11 | #include "common/page_table.h" | 12 | #include "common/page_table.h" |
| 12 | #include "common/settings.h" | 13 | #include "common/settings.h" |
| @@ -24,6 +25,7 @@ | |||
| 24 | namespace Core { | 25 | namespace Core { |
| 25 | 26 | ||
| 26 | using Vector = Dynarmic::A64::Vector; | 27 | using Vector = Dynarmic::A64::Vector; |
| 28 | using namespace Common::Literals; | ||
| 27 | 29 | ||
| 28 | class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks { | 30 | class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks { |
| 29 | public: | 31 | public: |
| @@ -184,8 +186,8 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* | |||
| 184 | config.wall_clock_cntpct = uses_wall_clock; | 186 | config.wall_clock_cntpct = uses_wall_clock; |
| 185 | 187 | ||
| 186 | // Code cache size | 188 | // Code cache size |
| 187 | config.code_cache_size = 512 * 1024 * 1024; | 189 | config.code_cache_size = 512_MiB; |
| 188 | config.far_code_offset = 400 * 1024 * 1024; | 190 | config.far_code_offset = 400_MiB; |
| 189 | 191 | ||
| 190 | // Safe optimizations | 192 | // Safe optimizations |
| 191 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::DebugMode) { | 193 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::DebugMode) { |