summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_32.cpp48
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.cpp48
-rw-r--r--src/core/settings.h7
3 files changed, 57 insertions, 46 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
index 369a081cd..443ca72eb 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
@@ -143,29 +143,31 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable&
config.wall_clock_cntpct = uses_wall_clock;
// Safe optimizations
- if (!Settings::values.cpuopt_page_tables) {
- config.page_table = nullptr;
- }
- if (!Settings::values.cpuopt_block_linking) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking;
- }
- if (!Settings::values.cpuopt_return_stack_buffer) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer;
- }
- if (!Settings::values.cpuopt_fast_dispatcher) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch;
- }
- if (!Settings::values.cpuopt_context_elimination) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination;
- }
- if (!Settings::values.cpuopt_const_prop) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp;
- }
- if (!Settings::values.cpuopt_misc_ir) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt;
- }
- if (!Settings::values.cpuopt_reduce_misalign_checks) {
- config.only_detect_misalignment_via_page_table_on_page_boundary = false;
+ if (Settings::values.cpu_accuracy != Settings::CPUAccuracy::Accurate) {
+ if (!Settings::values.cpuopt_page_tables) {
+ config.page_table = nullptr;
+ }
+ if (!Settings::values.cpuopt_block_linking) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking;
+ }
+ if (!Settings::values.cpuopt_return_stack_buffer) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer;
+ }
+ if (!Settings::values.cpuopt_fast_dispatcher) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch;
+ }
+ if (!Settings::values.cpuopt_context_elimination) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination;
+ }
+ if (!Settings::values.cpuopt_const_prop) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp;
+ }
+ if (!Settings::values.cpuopt_misc_ir) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt;
+ }
+ if (!Settings::values.cpuopt_reduce_misalign_checks) {
+ config.only_detect_misalignment_via_page_table_on_page_boundary = false;
+ }
}
return std::make_unique<Dynarmic::A32::Jit>(config);
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
index e208a4aa7..a63a04a25 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
@@ -195,29 +195,31 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable&
config.wall_clock_cntpct = uses_wall_clock;
// Safe optimizations
- if (!Settings::values.cpuopt_page_tables) {
- config.page_table = nullptr;
- }
- if (!Settings::values.cpuopt_block_linking) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking;
- }
- if (!Settings::values.cpuopt_return_stack_buffer) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer;
- }
- if (!Settings::values.cpuopt_fast_dispatcher) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch;
- }
- if (!Settings::values.cpuopt_context_elimination) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination;
- }
- if (!Settings::values.cpuopt_const_prop) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp;
- }
- if (!Settings::values.cpuopt_misc_ir) {
- config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt;
- }
- if (!Settings::values.cpuopt_reduce_misalign_checks) {
- config.only_detect_misalignment_via_page_table_on_page_boundary = false;
+ if (Settings::values.cpu_accuracy != Settings::CPUAccuracy::Accurate) {
+ if (!Settings::values.cpuopt_page_tables) {
+ config.page_table = nullptr;
+ }
+ if (!Settings::values.cpuopt_block_linking) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking;
+ }
+ if (!Settings::values.cpuopt_return_stack_buffer) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer;
+ }
+ if (!Settings::values.cpuopt_fast_dispatcher) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch;
+ }
+ if (!Settings::values.cpuopt_context_elimination) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination;
+ }
+ if (!Settings::values.cpuopt_const_prop) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp;
+ }
+ if (!Settings::values.cpuopt_misc_ir) {
+ config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt;
+ }
+ if (!Settings::values.cpuopt_reduce_misalign_checks) {
+ config.only_detect_misalignment_via_page_table_on_page_boundary = false;
+ }
}
return std::make_shared<Dynarmic::A64::Jit>(config);
diff --git a/src/core/settings.h b/src/core/settings.h
index c081c083f..b3451a704 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -382,6 +382,11 @@ enum class GPUAccuracy : u32 {
Extreme = 2,
};
+enum class CPUAccuracy {
+ Accurate = 0,
+ DebugMode = 1,
+};
+
extern bool configuring_global;
template <typename Type>
@@ -428,6 +433,8 @@ struct Values {
Setting<bool> use_multi_core;
// Cpu
+ CPUAccuracy cpu_accuracy;
+
bool cpuopt_page_tables;
bool cpuopt_block_linking;
bool cpuopt_return_stack_buffer;