mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-22 11:53:43 +00:00
fix(dynarmic): Remove MSVC-specific fastmem_pointer assignments
Unify fastmem_pointer handling by using reinterpret_cast<uintptr_t>() and std::nullopt consistently across all platforms, fixing MSVC compilation errors with std::optional<uintptr_t> assignment. Fixes: C2679 binary '=' operator errors on MSVC Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -193,11 +193,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ArmDynarmic32::MakeJit(Common::PageTable* pa
|
||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
config.fastmem_pointer = page_table->fastmem_arena;
|
||||
#else
|
||||
config.fastmem_pointer = reinterpret_cast<uintptr_t>(page_table->fastmem_arena);
|
||||
#endif
|
||||
config.fastmem_pointer = reinterpret_cast<uintptr_t>(page_table->fastmem_arena);
|
||||
|
||||
config.fastmem_exclusive_access = config.fastmem_pointer.has_value();
|
||||
config.recompile_on_exclusive_fastmem_failure = true;
|
||||
@@ -256,11 +252,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ArmDynarmic32::MakeJit(Common::PageTable* pa
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem) {
|
||||
#ifdef _MSC_VER
|
||||
config.fastmem_pointer = nullptr;
|
||||
#else
|
||||
config.fastmem_pointer = std::nullopt;
|
||||
#endif
|
||||
config.fastmem_pointer = std::nullopt;
|
||||
config.fastmem_exclusive_access = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||
|
||||
@@ -240,11 +240,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ArmDynarmic64::MakeJit(Common::PageTable* pa
|
||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
config.fastmem_pointer = page_table->fastmem_arena;
|
||||
#else
|
||||
config.fastmem_pointer = reinterpret_cast<uintptr_t>(page_table->fastmem_arena);
|
||||
#endif
|
||||
config.fastmem_pointer = reinterpret_cast<uintptr_t>(page_table->fastmem_arena);
|
||||
config.fastmem_address_space_bits = address_space_bits;
|
||||
config.silently_mirror_fastmem = false;
|
||||
|
||||
@@ -315,11 +311,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ArmDynarmic64::MakeJit(Common::PageTable* pa
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem) {
|
||||
#ifdef _MSC_VER
|
||||
config.fastmem_pointer = nullptr;
|
||||
#else
|
||||
config.fastmem_pointer = std::nullopt;
|
||||
#endif
|
||||
config.fastmem_pointer = std::nullopt;
|
||||
config.fastmem_exclusive_access = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||
|
||||
Reference in New Issue
Block a user