Compare commits

...

4 Commits

Author SHA1 Message Date
Vince Ricosti
040c79f681 Use forked dynarmic 2021-04-18 00:17:03 +02:00
Vince Ricosti
ead95d6217 Fix compilation 2021-04-17 23:22:28 +02:00
Vince Ricosti
4ff39c5094 Minor changes to not compile specific x64 code on other arch and add dependency on xbyak_aarch64 on aarch64 platform. 2021-04-17 23:22:21 +02:00
Vince Ricosti
5a3987e7a8 Add xbyak_aarch64 2021-04-17 23:22:13 +02:00
10 changed files with 41 additions and 10 deletions

5
.gitmodules vendored
View File

@@ -6,7 +6,7 @@
url = https://github.com/kinetiknz/cubeb.git
[submodule "dynarmic"]
path = externals/dynarmic
url = https://github.com/MerryMage/dynarmic.git
url = https://github.com/vricosti/dynarmic.git
[submodule "soundtouch"]
path = externals/soundtouch
url = https://github.com/citra-emu/ext-soundtouch.git
@@ -40,3 +40,6 @@
[submodule "ffmpeg"]
path = externals/ffmpeg
url = https://git.ffmpeg.org/ffmpeg.git
[submodule "externals/xbyak_aarch64"]
path = externals/xbyak_aarch64
url = https://github.com/herumi/xbyak_aarch64.git

View File

@@ -9,6 +9,10 @@ if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
add_library(xbyak INTERFACE)
target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
elseif(ARCHITECTURE_ARM64)
add_library(xbyak_aarch64 INTERFACE)
target_include_directories(xbyak_aarch64 SYSTEM INTERFACE ./xbyak_aarch64/xbyak_aarch64)
target_compile_definitions(xbyak_aarch64 INTERFACE XBYAK_NO_OP_NAMES)
endif()
# Catch
@@ -16,7 +20,7 @@ add_library(catch-single-include INTERFACE)
target_include_directories(catch-single-include INTERFACE catch/single_include)
# Dynarmic
if (ARCHITECTURE_x86_64)
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
set(DYNARMIC_TESTS OFF)
set(DYNARMIC_NO_BUNDLED_FMT ON)
add_subdirectory(dynarmic)

1
externals/xbyak_aarch64 vendored Submodule

Submodule externals/xbyak_aarch64 added at c0dd2c3e35

View File

@@ -187,7 +187,7 @@ add_library(common STATIC
zstd_compression.h
)
if(ARCHITECTURE_x86_64)
if(ARCHITECTURE STREQUAL "x86_64")
target_sources(common
PRIVATE
x64/cpu_detect.cpp
@@ -220,7 +220,13 @@ endif()
create_target_directory_groups(common)
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile)
target_link_libraries(common PRIVATE lz4::lz4 xbyak)
target_link_libraries(common PRIVATE lz4::lz4)
if (ARCHITECTURE STREQUAL "x86_64")
target_link_libraries(common PRIVATE xbyak)
elseif(ARCHITECTURE STREQUAL "arm64")
target_link_libraries(common PRIVATE xbyak_aarch64)
endif()
if (MSVC)
target_link_libraries(common PRIVATE zstd::zstd)
else()

View File

@@ -7,6 +7,7 @@
#include <cstring>
#include <utility>
#ifdef ARCHITECTURE_x86_64
#ifdef _MSC_VER
#include <intrin.h>
#pragma intrinsic(__umulh)
@@ -15,6 +16,7 @@
#else
#include <x86intrin.h>
#endif
#endif
#include "common/common_types.h"

View File

@@ -684,7 +684,7 @@ if (ENABLE_WEB_SERVICE)
target_link_libraries(core PRIVATE web_service)
endif()
if (ARCHITECTURE_x86_64)
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
target_sources(core PRIVATE
arm/dynarmic/arm_dynarmic_32.cpp
arm/dynarmic/arm_dynarmic_32.h

View File

@@ -21,7 +21,7 @@ PhysicalCore::PhysicalCore(std::size_t core_index, Core::System& system,
PhysicalCore::~PhysicalCore() = default;
void PhysicalCore::Initialize([[maybe_unused]] bool is_64_bit) {
#ifdef ARCHITECTURE_x86_64
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_ARM64)
auto& kernel = system.Kernel();
if (is_64_bit) {
arm_interface = std::make_unique<Core::ARM_Dynarmic_64>(

View File

@@ -54,8 +54,6 @@ add_library(video_core STATIC
macro/macro_hle.h
macro/macro_interpreter.cpp
macro/macro_interpreter.h
macro/macro_jit_x64.cpp
macro/macro_jit_x64.h
fence_manager.h
gpu.cpp
gpu.h
@@ -261,10 +259,24 @@ add_library(video_core STATIC
vulkan_common/nsight_aftermath_tracker.h
)
if(ARCHITECTURE_x86_64)
target_sources(video_core
PRIVATE
macro/macro_jit_x64.cpp
macro/macro_jit_x64.h
)
endif()
create_target_directory_groups(video_core)
target_link_libraries(video_core PUBLIC common core)
target_link_libraries(video_core PRIVATE glad xbyak)
target_link_libraries(video_core PRIVATE glad)
if (ARCHITECTURE_x86_64)
target_link_libraries(video_core PRIVATE xbyak)
elseif(ARCHITECTURE_ARM64)
target_link_libraries(video_core PRIVATE xbyak_aarch64)
endif()
if (YUZU_USE_BUNDLED_FFMPEG AND NOT WIN32)
add_dependencies(video_core ffmpeg-build)

View File

@@ -11,8 +11,11 @@
#include "video_core/macro/macro.h"
#include "video_core/macro/macro_hle.h"
#include "video_core/macro/macro_interpreter.h"
#ifdef ARCHITECTURE_x86_64
#include "video_core/macro/macro_jit_x64.h"
#elif ARCHITECTURE_ARM64
#endif
namespace Tegra {
MacroEngine::MacroEngine(Engines::Maxwell3D& maxwell3d)