diff options
| author | flacs <tilkax@gmail.com> | 2015-07-04 11:59:00 +0200 |
|---|---|---|
| committer | flacs <tilkax@gmail.com> | 2015-07-04 11:59:00 +0200 |
| commit | 3bbb2ede9cc58af1dcdcb56d728e10622cf33dd6 (patch) | |
| tree | 14a1cf3f7518c289057c2494ba3d752e17143d0e /Source | |
| parent | eb3c5a240f2510102d152baa53e7adf3099eebc1 (diff) | |
| parent | c9a25f9484d9a1e1dd6037ebd7a7c130ac40cfde (diff) | |
Merge pull request #2697 from endrift/fix-jit-trampoline
Common: CallLambdaTrampoline can return a value
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/Arm64Emitter.h | 5 | ||||
| -rw-r--r-- | Source/Core/Common/x64Emitter.h | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index 6db19dc890..6939984308 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -711,10 +711,9 @@ public: // (this method might be a thunk in the case of multi-inheritance) so we // have to go through a trampoline function. template <typename T, typename... Args> - static void CallLambdaTrampoline(const std::function<T(Args...)>* f, - Args... args) + static T CallLambdaTrampoline(const std::function<T(Args...)>* f, Args... args) { - (*f)(args...); + return (*f)(args...); } // This function expects you to have set up the state. diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index 7e3b64f49e..f6faea44bd 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -971,10 +971,9 @@ public: // (this method might be a thunk in the case of multi-inheritance) so we // have to go through a trampoline function. template <typename T, typename... Args> - static void CallLambdaTrampoline(const std::function<T(Args...)>* f, - Args... args) + static T CallLambdaTrampoline(const std::function<T(Args...)>* f, Args... args) { - (*f)(args...); + return (*f)(args...); } template <typename T, typename... Args> |
