dynarmic/src/backend/x64/exception_handler.h

38 lines
652 B
C
Raw Normal View History

/* This file is part of the dynarmic project.
* Copyright (c) 2020 MerryMage
2020-04-23 15:25:11 +01:00
* SPDX-License-Identifier: 0BSD
*/
#pragma once
2020-04-08 16:56:57 +01:00
#include <functional>
#include <memory>
2020-04-08 16:56:57 +01:00
#include "common/common_types.h"
namespace Dynarmic::Backend::X64 {
class BlockOfCode;
2020-04-08 16:56:57 +01:00
struct FakeCall {
u64 call_rip;
u64 ret_rip;
};
class ExceptionHandler final {
public:
ExceptionHandler();
~ExceptionHandler();
void Register(BlockOfCode& code);
2020-04-08 16:56:57 +01:00
bool SupportsFastmem() const noexcept;
void SetFastmemCallback(std::function<FakeCall(u64)> cb);
private:
struct Impl;
std::unique_ptr<Impl> impl;
};
} // namespace Dynarmic::Backend::X64