diff options
| author | 2015-07-10 17:13:31 -0700 | |
|---|---|---|
| committer | 2015-07-10 17:13:31 -0700 | |
| 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.gz yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.tar.xz yuzu-8968c1dfec9e734d8dc3089aae29f5abd6bc6d15.zip | |
Merge pull request #916 from lioncash/unused
Common: Remove thunk.h
Diffstat (limited to '')
| -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 | |||
| 52 | synchronized_wrapper.h | 52 | synchronized_wrapper.h |
| 53 | thread.h | 53 | thread.h |
| 54 | thread_queue_list.h | 54 | thread_queue_list.h |
| 55 | thunk.h | ||
| 56 | timer.h | 55 | timer.h |
| 57 | vector_math.h | 56 | vector_math.h |
| 58 | ) | 57 | ) |
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 @@ | |||
| 1 | // Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <map> | ||
| 8 | |||
| 9 | #include "common/common_types.h" | ||
| 10 | |||
| 11 | // This simple class creates a wrapper around a C/C++ function that saves all fp state | ||
| 12 | // before entering it, and restores it upon exit. This is required to be able to selectively | ||
| 13 | // call functions from generated code, without inflicting the performance hit and increase | ||
| 14 | // of complexity that it means to protect the generated code from this problem. | ||
| 15 | |||
| 16 | // This process is called thunking. | ||
| 17 | |||
| 18 | // There will only ever be one level of thunking on the stack, plus, | ||
| 19 | // we don't want to pollute the stack, so we store away regs somewhere global. | ||
| 20 | // NOT THREAD SAFE. This may only be used from the CPU thread. | ||
| 21 | // Any other thread using this stuff will be FATAL. | ||
| 22 | |||
| 23 | class ThunkManager : public Gen::XCodeBlock | ||
| 24 | { | ||
| 25 | std::map<void *, const u8 *> thunks; | ||
| 26 | |||
| 27 | const u8 *save_regs; | ||
| 28 | const u8 *load_regs; | ||
| 29 | |||
| 30 | public: | ||
| 31 | ThunkManager() { | ||
| 32 | Init(); | ||
| 33 | } | ||
| 34 | ~ThunkManager() { | ||
| 35 | Shutdown(); | ||
| 36 | } | ||
| 37 | void *ProtectFunction(void *function, int num_params); | ||
| 38 | private: | ||
| 39 | void Init(); | ||
| 40 | void Shutdown(); | ||
| 41 | void Reset(); | ||
| 42 | }; | ||