dolphin/Source/Core/Core/PowerPC/JitKvm/JitKvm.h

46 lines
1.0 KiB
C++

// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <vector>
#include "Common/CommonTypes.h"
#include "Core/PowerPC/JitKvm/KvmBlockCache.h"
#include "Core/PowerPC/JitCommon/JitBase.h"
#include "Core/PowerPC/PPCAnalyst.h"
class JitKvm : public JitBase
{
public:
JitKvm();
~JitKvm();
void Init() override;
void Shutdown() override;
bool HandleFault(uintptr_t access_address, SContext* ctx) override { return false; }
void ClearCache() override;
void Run() override;
void SingleStep() override;
void Jit(u32 address) override;
JitBaseBlockCache* GetBlockCache() override { return &m_block_cache; }
const char* GetName() const override { return "KVM"; }
const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; }
private:
struct Instruction;
u8* GetCodePtr();
void ExecuteOneBlock();
bool HandleFunctionHooking(u32 address);
KvmBlockCache m_block_cache{*this};
std::vector<Instruction> m_code;
};