backend_x64: Rename UnwindHandler to ExceptionHandler

This commit is contained in:
MerryMage 2017-04-20 14:08:56 +01:00
parent 0d47f50f57
commit 2c9dcfa2db
5 changed files with 15 additions and 15 deletions

View file

@ -96,9 +96,9 @@ if (ARCHITECTURE_x86_64)
) )
if (WIN32) if (WIN32)
list(APPEND SRCS backend_x64/unwind_windows.cpp) list(APPEND SRCS backend_x64/exception_handler_windows.cpp)
else() else()
list(APPEND SRCS backend_x64/unwind_generic.cpp) list(APPEND SRCS backend_x64/exception_handler_generic.cpp)
endif() endif()
else() else()
message(FATAL_ERROR "Unsupported architecture") message(FATAL_ERROR "Unsupported architecture")

View file

@ -30,7 +30,7 @@ BlockOfCode::BlockOfCode(UserCallbacks cb, LookupBlockCallback lookup_block, voi
{ {
GenRunCode(); GenRunCode();
GenMemoryAccessors(); GenMemoryAccessors();
unwind_handler.Register(this); exception_handler.Register(this);
near_code_begin = getCurr(); near_code_begin = getCurr();
far_code_begin = getCurr() + FAR_CODE_OFFSET; far_code_begin = getCurr() + FAR_CODE_OFFSET;
ClearCache(); ClearCache();

View file

@ -158,17 +158,17 @@ private:
const void* write_memory_64 = nullptr; const void* write_memory_64 = nullptr;
void GenMemoryAccessors(); void GenMemoryAccessors();
class UnwindHandler final { class ExceptionHandler final {
public: public:
UnwindHandler(); ExceptionHandler();
~UnwindHandler(); ~ExceptionHandler();
void Register(BlockOfCode* code); void Register(BlockOfCode* code);
private: private:
struct Impl; struct Impl;
std::unique_ptr<Impl> impl; std::unique_ptr<Impl> impl;
}; };
UnwindHandler unwind_handler; ExceptionHandler exception_handler;
}; };
} // namespace BackendX64 } // namespace BackendX64

View file

@ -9,13 +9,13 @@
namespace Dynarmic { namespace Dynarmic {
namespace BackendX64 { namespace BackendX64 {
struct BlockOfCode::UnwindHandler::Impl final { struct BlockOfCode::ExceptionHandler::Impl final {
}; };
BlockOfCode::UnwindHandler::UnwindHandler() = default; BlockOfCode::ExceptionHandler::ExceptionHandler() = default;
BlockOfCode::UnwindHandler::~UnwindHandler() = default; BlockOfCode::ExceptionHandler::~ExceptionHandler() = default;
void BlockOfCode::UnwindHandler::Register(BlockOfCode*) { void BlockOfCode::ExceptionHandler::Register(BlockOfCode*) {
// Do nothing // Do nothing
} }

View file

@ -157,7 +157,7 @@ static PrologueInformation GetPrologueInformation() {
return ret; return ret;
} }
struct BlockOfCode::UnwindHandler::Impl final { struct BlockOfCode::ExceptionHandler::Impl final {
Impl(RUNTIME_FUNCTION* rfuncs_, const u8* base_ptr) : rfuncs(rfuncs_) { Impl(RUNTIME_FUNCTION* rfuncs_, const u8* base_ptr) : rfuncs(rfuncs_) {
RtlAddFunctionTable(rfuncs, 1, reinterpret_cast<DWORD64>(base_ptr)); RtlAddFunctionTable(rfuncs, 1, reinterpret_cast<DWORD64>(base_ptr));
} }
@ -170,10 +170,10 @@ private:
RUNTIME_FUNCTION* rfuncs = nullptr; RUNTIME_FUNCTION* rfuncs = nullptr;
}; };
BlockOfCode::UnwindHandler::UnwindHandler() = default; BlockOfCode::ExceptionHandler::ExceptionHandler() = default;
BlockOfCode::UnwindHandler::~UnwindHandler() = default; BlockOfCode::ExceptionHandler::~ExceptionHandler() = default;
void BlockOfCode::UnwindHandler::Register(BlockOfCode* code) { void BlockOfCode::ExceptionHandler::Register(BlockOfCode* code) {
const auto prolog_info = GetPrologueInformation(); const auto prolog_info = GetPrologueInformation();
code->align(16); code->align(16);