Merge ARM64 Dynarmic (#5620)

* Point dynarmic to citra fork, update dynarmic to AArch64 merge branch

* Enable dynarmic ARM64 support
This commit is contained in:
xperia64 2020-12-28 23:39:00 +00:00 committed by GitHub
parent 94d1f695ee
commit 94013c8e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 17 deletions

2
.gitmodules vendored
View file

@ -12,7 +12,7 @@
url = https://github.com/philsquared/Catch.git
[submodule "dynarmic"]
path = externals/dynarmic
url = https://github.com/MerryMage/dynarmic.git
url = https://github.com/citra-emu/dynarmic.git
[submodule "xbyak"]
path = externals/xbyak
url = https://github.com/herumi/xbyak.git

View file

@ -30,11 +30,16 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
# Crypto++
add_subdirectory(cryptopp)
# Dynarmic
# Xbyak
if (ARCHITECTURE_x86_64)
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
add_library(xbyak INTERFACE)
option(DYNARMIC_TESTS OFF)
target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
# Dynarmic
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
set(DYNARMIC_TESTS OFF)
set(DYNARMIC_NO_BUNDLED_FMT ON)
set(DYNARMIC_FRONTENDS "A32")
add_subdirectory(dynarmic)
@ -74,14 +79,6 @@ target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
# Teakra
add_subdirectory(teakra EXCLUDE_FROM_ALL)
# Xbyak
if (ARCHITECTURE_x86_64)
# Defined before "dynarmic" above
# add_library(xbyak INTERFACE)
target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
# Zstandard
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
target_include_directories(libzstd_static INTERFACE ./zstd/lib)
@ -131,4 +128,4 @@ if (ENABLE_WEB_SERVICE)
endif()
# lodepng
add_subdirectory(lodepng)
add_subdirectory(lodepng)

2
externals/dynarmic vendored

@ -1 +1 @@
Subproject commit 58abdcce5b23ee14e4b7c0759af16cf055c563d4
Subproject commit f9d84871fb6dd41c47945d649dc9017aa3762125

View file

@ -487,7 +487,7 @@ if (ENABLE_WEB_SERVICE)
endif()
endif()
if (ARCHITECTURE_x86_64)
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
target_sources(core PRIVATE
arm/dynarmic/arm_dynarmic.cpp
arm/dynarmic/arm_dynarmic.h

View file

@ -13,7 +13,7 @@
#include "common/logging/log.h"
#include "common/texture.h"
#include "core/arm/arm_interface.h"
#ifdef ARCHITECTURE_x86_64
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_ARM64)
#include "core/arm/dynarmic/arm_dynarmic.h"
#endif
#include "core/arm/dyncom/arm_dyncom.h"
@ -365,7 +365,7 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
*memory, *timing, [this] { PrepareReschedule(); }, system_mode, num_cores, n3ds_mode);
if (Settings::values.use_cpu_jit) {
#ifdef ARCHITECTURE_x86_64
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_ARM64)
for (u32 i = 0; i < num_cores; ++i) {
cpu_cores.push_back(
std::make_shared<ARM_Dynarmic>(this, *memory, i, timing->GetTimer(i)));