mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00: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:
parent
3fa81f39fb
commit
2f490e44fb
14 changed files with 57 additions and 41 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue