From 692a93c6045b28cb2a5a44c7dd7bb0ed093bc604 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 16 Feb 2020 00:29:12 -0800 Subject: [PATCH] Adds an optional SetMemoryBase CodeLoader function This is necessary for the code loader to know where the memory base is for unified memory --- include/FEXCore/Core/CodeLoader.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/FEXCore/Core/CodeLoader.h b/include/FEXCore/Core/CodeLoader.h index a84b5bc96..5d67deab8 100644 --- a/include/FEXCore/Core/CodeLoader.h +++ b/include/FEXCore/Core/CodeLoader.h @@ -38,6 +38,12 @@ public: virtual void GetInitLocations(std::vector *Locations) {} virtual uint64_t InitializeThreadSlot(std::function Writer) const { return 0; }; + /** + * @brief Lets the core tell the CodeLoader where the virtual memory region starts and if we are running in an environment + * where host and guest code is unified in a single address space + */ + virtual void SetMemoryBase(uint64_t Base, bool Unified) {} + using MemoryLayout = std::tuple; /** * @brief Gets the default memory layout of the memory object being loaded