From 0eb5e2b3320df921ac0b03259bbc84834b9d935c Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 16 Feb 2020 00:24:31 -0800 Subject: [PATCH] Adds unified memory option without supporting it yet This allows you to set the option from the frontend but it doesn't yet do anything. --- Source/Interface/Config/Config.cpp | 6 ++++++ Source/Interface/Context/Context.h | 1 + include/FEXCore/Config/Config.h | 1 + 3 files changed, 8 insertions(+) diff --git a/Source/Interface/Config/Config.cpp b/Source/Interface/Config/Config.cpp index e16574ed6..d0953fc23 100644 --- a/Source/Interface/Config/Config.cpp +++ b/Source/Interface/Config/Config.cpp @@ -27,6 +27,9 @@ namespace FEXCore::Config { case FEXCore::Config::CONFIG_ACCURATESTDOUT: CTX->Config.AccurateSTDOut = Config != 0; break; + case FEXCore::Config::CONFIG_UNIFIED_MEMORY: + CTX->Config.UnifiedMemory = Config != 0; + break; default: LogMan::Msg::A("Unknown configuration option"); } } @@ -62,6 +65,9 @@ namespace FEXCore::Config { case FEXCore::Config::CONFIG_ACCURATESTDOUT: return CTX->Config.AccurateSTDOut; break; + case FEXCore::Config::CONFIG_UNIFIED_MEMORY: + return CTX->Config.UnifiedMemory; + break; default: LogMan::Msg::A("Unknown configuration option"); } diff --git a/Source/Interface/Context/Context.h b/Source/Interface/Context/Context.h index 7d892fc4f..5e7188219 100644 --- a/Source/Interface/Context/Context.h +++ b/Source/Interface/Context/Context.h @@ -46,6 +46,7 @@ namespace FEXCore::Context { uint64_t VirtualMemSize {1ULL << 36}; FEXCore::Config::ConfigCore Core {FEXCore::Config::CONFIG_INTERPRETER}; bool GdbServer {false}; + bool UnifiedMemory {false}; std::string RootFSPath; // LLVM JIT options diff --git a/include/FEXCore/Config/Config.h b/include/FEXCore/Config/Config.h index 663341cdf..4da9281ea 100644 --- a/include/FEXCore/Config/Config.h +++ b/include/FEXCore/Config/Config.h @@ -13,6 +13,7 @@ namespace FEXCore::Config { CONFIG_GDBSERVER, CONFIG_ACCURATESTDOUT, CONFIG_ROOTFSPATH, + CONFIG_UNIFIED_MEMORY, }; enum ConfigCore {