diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-11 02:13:31 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-11 02:13:31 +0200 |
commit | 8968c1dfec9e734d8dc3089aae29f5abd6bc6d15 (patch) | |
tree | 7dd4a273b134d123ecd344d7dfde16e168445fff | |
parent | Merge pull request #876 from linkmauve/include-cleanups (diff) | |
parent | Common: Remove thunk.h (diff) | |
download | yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.gz yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.bz2 yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.lz yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.xz yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.zst yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.zip |
-rw-r--r-- | src/common/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/common/thunk.h | 42 |
2 files changed, 0 insertions, 43 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index f025e1186..4c086cd2f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -52,7 +52,6 @@ set(HEADERS synchronized_wrapper.h thread.h thread_queue_list.h - thunk.h timer.h vector_math.h ) diff --git a/src/common/thunk.h b/src/common/thunk.h deleted file mode 100644 index 533480056..000000000 --- a/src/common/thunk.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include <map> - -#include "common/common_types.h" - -// This simple class creates a wrapper around a C/C++ function that saves all fp state -// before entering it, and restores it upon exit. This is required to be able to selectively -// call functions from generated code, without inflicting the performance hit and increase -// of complexity that it means to protect the generated code from this problem. - -// This process is called thunking. - -// There will only ever be one level of thunking on the stack, plus, -// we don't want to pollute the stack, so we store away regs somewhere global. -// NOT THREAD SAFE. This may only be used from the CPU thread. -// Any other thread using this stuff will be FATAL. - -class ThunkManager : public Gen::XCodeBlock -{ - std::map<void *, const u8 *> thunks; - - const u8 *save_regs; - const u8 *load_regs; - -public: - ThunkManager() { - Init(); - } - ~ThunkManager() { - Shutdown(); - } - void *ProtectFunction(void *function, int num_params); -private: - void Init(); - void Shutdown(); - void Reset(); -}; |