mirror of
https://github.com/Retropex/dolphin.git
synced 2025-08-04 22:14:47 +02:00

Puts the comment in the header where it's more likely to be seen initially. We can also remove the TODO, given doing nothing or returning an error is what is generally done for the JIT interface if the JIT instance isn't valid.
70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
// Copyright 2008 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "Core/MachineContext.h"
|
|
|
|
class CPUCoreBase;
|
|
class PointerWrap;
|
|
|
|
namespace PowerPC
|
|
{
|
|
enum class CPUCore;
|
|
}
|
|
|
|
namespace Profiler
|
|
{
|
|
struct ProfileStats;
|
|
}
|
|
|
|
namespace JitInterface
|
|
{
|
|
enum class ExceptionType
|
|
{
|
|
FIFOWrite,
|
|
PairedQuantize,
|
|
SpeculativeConstants
|
|
};
|
|
|
|
void DoState(PointerWrap& p);
|
|
|
|
CPUCoreBase* InitJitCore(PowerPC::CPUCore core);
|
|
CPUCoreBase* GetCore();
|
|
|
|
// Debugging
|
|
enum class ProfilingState
|
|
{
|
|
Enabled,
|
|
Disabled
|
|
};
|
|
|
|
void SetProfilingState(ProfilingState state);
|
|
void WriteProfileResults(const std::string& filename);
|
|
void GetProfileResults(Profiler::ProfileStats* prof_stats);
|
|
int GetHostCode(u32* address, const u8** code, u32* code_size);
|
|
|
|
// Memory Utilities
|
|
bool HandleFault(uintptr_t access_address, SContext* ctx);
|
|
bool HandleStackFault();
|
|
|
|
// Clearing CodeCache
|
|
void ClearCache();
|
|
|
|
// This clear is "safe" in the sense that it's okay to run from
|
|
// inside a JIT'ed block: it clears the instruction cache, but not
|
|
// the JIT'ed code.
|
|
void ClearSafe();
|
|
|
|
// If "forced" is true, a recompile is being requested on code that hasn't been modified.
|
|
void InvalidateICache(u32 address, u32 size, bool forced);
|
|
|
|
void CompileExceptionCheck(ExceptionType type);
|
|
|
|
void Shutdown();
|
|
}
|