Merge pull request #9448 from JosJuice/blr-x30

JitArm64: Avoid using X30 with BLR
This commit is contained in:
Markus Wick
2021-01-27 20:07:24 +01:00
committed by GitHub
5 changed files with 47 additions and 47 deletions

View File

@ -912,14 +912,14 @@ public:
}
// This function expects you to have set up the state.
// Overwrites X0 and X30
// Overwrites X0 and X8
template <typename T, typename... Args>
ARM64Reg ABI_SetupLambda(const std::function<T(Args...)>* f)
{
auto trampoline = &ARM64XEmitter::CallLambdaTrampoline<T, Args...>;
MOVI2R(X30, (uintptr_t)trampoline);
MOVI2R(X0, (uintptr_t) const_cast<void*>((const void*)f));
return X30;
MOVP2R(X8, trampoline);
MOVP2R(X0, const_cast<void*>((const void*)f));
return X8;
}
// Plain function call