mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 15:10:04 +00:00
Merge pull request #3352 from linkmauve/no-dynarmic
Tie dynarmic to ARCHITECTURE_x86_64
This commit is contained in:
commit
80025792d6
@ -65,14 +65,16 @@ function(detect_architecture symbol arch)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if (MSVC)
|
if (NOT ENABLE_GENERIC)
|
||||||
detect_architecture("_M_AMD64" x86_64)
|
if (MSVC)
|
||||||
detect_architecture("_M_IX86" x86)
|
detect_architecture("_M_AMD64" x86_64)
|
||||||
detect_architecture("_M_ARM" ARM)
|
detect_architecture("_M_IX86" x86)
|
||||||
else()
|
detect_architecture("_M_ARM" ARM)
|
||||||
detect_architecture("__x86_64__" x86_64)
|
else()
|
||||||
detect_architecture("__i386__" x86)
|
detect_architecture("__x86_64__" x86_64)
|
||||||
detect_architecture("__arm__" ARM)
|
detect_architecture("__i386__" x86)
|
||||||
|
detect_architecture("__arm__" ARM)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
set(ARCHITECTURE "GENERIC")
|
set(ARCHITECTURE "GENERIC")
|
||||||
|
12
externals/CMakeLists.txt
vendored
12
externals/CMakeLists.txt
vendored
@ -11,11 +11,13 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
|
|||||||
add_subdirectory(cryptopp)
|
add_subdirectory(cryptopp)
|
||||||
|
|
||||||
# Dynarmic
|
# Dynarmic
|
||||||
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
|
if (ARCHITECTURE_x86_64)
|
||||||
add_library(xbyak INTERFACE)
|
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
|
||||||
option(DYNARMIC_TESTS OFF)
|
add_library(xbyak INTERFACE)
|
||||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
option(DYNARMIC_TESTS OFF)
|
||||||
add_subdirectory(dynarmic)
|
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||||
|
add_subdirectory(dynarmic)
|
||||||
|
endif()
|
||||||
|
|
||||||
# libfmt
|
# libfmt
|
||||||
add_subdirectory(fmt)
|
add_subdirectory(fmt)
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
add_library(core STATIC
|
add_library(core STATIC
|
||||||
3ds.h
|
3ds.h
|
||||||
arm/arm_interface.h
|
arm/arm_interface.h
|
||||||
arm/dynarmic/arm_dynarmic.cpp
|
|
||||||
arm/dynarmic/arm_dynarmic.h
|
|
||||||
arm/dynarmic/arm_dynarmic_cp15.cpp
|
|
||||||
arm/dynarmic/arm_dynarmic_cp15.h
|
|
||||||
arm/dyncom/arm_dyncom.cpp
|
arm/dyncom/arm_dyncom.cpp
|
||||||
arm/dyncom/arm_dyncom.h
|
arm/dyncom/arm_dyncom.h
|
||||||
arm/dyncom/arm_dyncom_dec.cpp
|
arm/dyncom/arm_dyncom_dec.cpp
|
||||||
@ -404,7 +400,17 @@ add_library(core STATIC
|
|||||||
create_target_directory_groups(core)
|
create_target_directory_groups(core)
|
||||||
|
|
||||||
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
|
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
|
||||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt)
|
target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt)
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
target_link_libraries(core PUBLIC json-headers web_service)
|
target_link_libraries(core PUBLIC json-headers web_service)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (ARCHITECTURE_x86_64)
|
||||||
|
target_sources(core PRIVATE
|
||||||
|
arm/dynarmic/arm_dynarmic.cpp
|
||||||
|
arm/dynarmic/arm_dynarmic.h
|
||||||
|
arm/dynarmic/arm_dynarmic_cp15.cpp
|
||||||
|
arm/dynarmic/arm_dynarmic_cp15.h
|
||||||
|
)
|
||||||
|
target_link_libraries(core PRIVATE dynarmic)
|
||||||
|
endif()
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
#include "audio_core/audio_core.h"
|
#include "audio_core/audio_core.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/arm/arm_interface.h"
|
#include "core/arm/arm_interface.h"
|
||||||
|
#ifdef ARCHITECTURE_x86_64
|
||||||
#include "core/arm/dynarmic/arm_dynarmic.h"
|
#include "core/arm/dynarmic/arm_dynarmic.h"
|
||||||
|
#endif
|
||||||
#include "core/arm/dyncom/arm_dyncom.h"
|
#include "core/arm/dyncom/arm_dyncom.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
@ -147,7 +149,12 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
|||||||
LOG_DEBUG(HW_Memory, "initialized OK");
|
LOG_DEBUG(HW_Memory, "initialized OK");
|
||||||
|
|
||||||
if (Settings::values.use_cpu_jit) {
|
if (Settings::values.use_cpu_jit) {
|
||||||
|
#ifdef ARCHITECTURE_x86_64
|
||||||
cpu_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
cpu_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
||||||
|
#else
|
||||||
|
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
|
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "common/scm_rev.h"
|
#include "common/scm_rev.h"
|
||||||
|
#ifdef ARCHITECTURE_x86_64
|
||||||
#include "common/x64/cpu_detect.h"
|
#include "common/x64/cpu_detect.h"
|
||||||
|
#endif
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
#include "core/telemetry_session.h"
|
#include "core/telemetry_session.h"
|
||||||
@ -20,6 +22,7 @@
|
|||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
|
#ifdef ARCHITECTURE_x86_64
|
||||||
static const char* CpuVendorToStr(Common::CPUVendor vendor) {
|
static const char* CpuVendorToStr(Common::CPUVendor vendor) {
|
||||||
switch (vendor) {
|
switch (vendor) {
|
||||||
case Common::CPUVendor::INTEL:
|
case Common::CPUVendor::INTEL:
|
||||||
@ -31,6 +34,7 @@ static const char* CpuVendorToStr(Common::CPUVendor vendor) {
|
|||||||
}
|
}
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static u64 GenerateTelemetryId() {
|
static u64 GenerateTelemetryId() {
|
||||||
u64 telemetry_id{};
|
u64 telemetry_id{};
|
||||||
@ -121,7 +125,8 @@ TelemetrySession::TelemetrySession() {
|
|||||||
AddField(Telemetry::FieldType::App, "BuildDate", Common::g_build_date);
|
AddField(Telemetry::FieldType::App, "BuildDate", Common::g_build_date);
|
||||||
AddField(Telemetry::FieldType::App, "BuildName", Common::g_build_name);
|
AddField(Telemetry::FieldType::App, "BuildName", Common::g_build_name);
|
||||||
|
|
||||||
// Log user system information
|
// Log user system information
|
||||||
|
#ifdef ARCHITECTURE_x86_64
|
||||||
AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string);
|
AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string);
|
||||||
AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString",
|
AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString",
|
||||||
Common::GetCPUCaps().brand_string);
|
Common::GetCPUCaps().brand_string);
|
||||||
@ -143,6 +148,9 @@ TelemetrySession::TelemetrySession() {
|
|||||||
Common::GetCPUCaps().sse4_1);
|
Common::GetCPUCaps().sse4_1);
|
||||||
AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_SSE42",
|
AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_SSE42",
|
||||||
Common::GetCPUCaps().sse4_2);
|
Common::GetCPUCaps().sse4_2);
|
||||||
|
#else
|
||||||
|
AddField(Telemetry::FieldType::UserSystem, "CPU_Model", "Other");
|
||||||
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
AddField(Telemetry::FieldType::UserSystem, "OsPlatform", "Apple");
|
AddField(Telemetry::FieldType::UserSystem, "OsPlatform", "Apple");
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
|
Loading…
Reference in New Issue
Block a user