mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-14 05:00:51 -04:00
Rather than *MemTools.cpp checking whether the address is in the
emulated range itself (which, as of the next commit, doesn't cover every
kind of access the JIT might want to intercept) and doing PC
replacement, they just pass the access address and context to
jit->HandleFault, which does the rest itself.
Because SContext is now in JitInterface, I wanted JitBackpatch.h (which
defines it) to be lightweight, so I moved TrampolineCache and associated
x64{Analyzer,Emitter} dependencies into its own file. I hate adding new
files in three places, two of which are MSVC...
While I'm at it, edit a misleading comment.
40 lines
793 B
C++
40 lines
793 B
C++
// Copyright 2013 Dolphin Emulator Project
|
|
// Licensed under GPLv2
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "Common/ChunkFile.h"
|
|
#include "Core/PowerPC/CPUCoreBase.h"
|
|
#include "Core/PowerPC/JitCommon/JitBackpatch.h"
|
|
|
|
namespace JitInterface
|
|
{
|
|
void DoState(PointerWrap &p);
|
|
|
|
CPUCoreBase *InitJitCore(int core);
|
|
void InitTables(int core);
|
|
CPUCoreBase *GetCore();
|
|
|
|
// Debugging
|
|
void WriteProfileResults(const std::string& filename);
|
|
|
|
// Memory Utilities
|
|
bool HandleFault(uintptr_t access_address, SContext* ctx);
|
|
|
|
// used by JIT to read instructions
|
|
u32 Read_Opcode_JIT(const u32 _Address);
|
|
|
|
// Clearing CodeCache
|
|
void ClearCache();
|
|
|
|
void ClearSafe();
|
|
|
|
void InvalidateICache(u32 address, u32 size);
|
|
|
|
void Shutdown();
|
|
}
|
|
extern bool bMMU;
|
|
|