mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
stop using g_jit outside of JitInterface
Replace g_jit in x86-64 ASM routines code by m_jit member reference
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "Common/Timer.h"
|
||||
#include "Core/MemTools.h"
|
||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
|
||||
// include order is important
|
||||
#include <gtest/gtest.h> // NOLINT
|
||||
@ -56,7 +57,7 @@ TEST(PageFault, PageFault)
|
||||
Common::WriteProtectMemory(data, PAGE_GRAN, false);
|
||||
|
||||
PageFaultFakeJit pfjit;
|
||||
g_jit = &pfjit;
|
||||
JitInterface::SetJit(&pfjit);
|
||||
pfjit.m_data = data;
|
||||
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
@ -67,7 +68,7 @@ TEST(PageFault, PageFault)
|
||||
((unsigned long long)std::chrono::duration_cast<std::chrono::nanoseconds>(diff).count())
|
||||
|
||||
EMM::UninstallExceptionHandler();
|
||||
g_jit = nullptr;
|
||||
JitInterface::SetJit(nullptr);
|
||||
|
||||
printf("page fault timing:\n");
|
||||
printf("start->HandleFault %llu ns\n", AS_NS(pfjit.m_pre_unprotect_time - start));
|
||||
|
Reference in New Issue
Block a user