diff --git a/src/dynarmic/backend/A64/block_of_code.h b/src/dynarmic/backend/A64/block_of_code.h index d7f698c7..43ad502c 100644 --- a/src/dynarmic/backend/A64/block_of_code.h +++ b/src/dynarmic/backend/A64/block_of_code.h @@ -16,6 +16,7 @@ #include "dynarmic/backend/A64/constant_pool.h" #include "dynarmic/backend/A64/emitter/a64_emitter.h" #include "dynarmic/backend/A64/jitstate_info.h" +#include "dynarmic/common/cast_util.h" #include "dynarmic/interface/halt_reason.h" namespace Dynarmic::BackendA64 { @@ -66,6 +67,12 @@ public: /// @note this clobbers ABI caller-save registers void LookupBlock(); + /// Code emitter: Calls the lambda. Lambda must not have any captures. + template + void CallLambda(Lambda l) { + QuickCallFunction(Common::FptrCast(l)); + } + u64 MConst(u64 lower, u64 upper = 0); void EmitPatchLDR(Arm64Gen::ARM64Reg Rt, u64 lower, u64 upper = 0);