This commit is contained in:
lif 2020-08-01 01:03:22 -07:00
parent 17fc254342
commit 334bc6b27f
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,45 @@
// 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/CachedInterpreter/InterpreterBlockCache.h"
#include "Core/PowerPC/JitCommon/JitBase.h"
#include "Core/PowerPC/PPCAnalyst.h"
class CachedInterpreter : public JitBase
{
public:
CachedInterpreter();
~CachedInterpreter();
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 "Cached Interpreter"; }
const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; }
private:
struct Instruction;
u8* GetCodePtr();
void ExecuteOneBlock();
bool HandleFunctionHooking(u32 address);
BlockCache m_block_cache{*this};
std::vector<Instruction> m_code;
};

View File

@ -15,6 +15,10 @@
#include "Core/PowerPC/PPCAnalyst.h"
#include "Core/PowerPC/PowerPC.h"
#include <sys/mman.h>
#include <pthread.h>
#include <linux/kvm.h>
struct JitKvm::Instruction
{
using CommonCallback = void (*)(UGeckoInstruction);

7
lif-build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -exo pipefail
#cmake -BBuild -H. -DENABLE_GENERIC=ON -DLINUX_LOCAL_DEV=true -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake -BBuild -H. -DLINUX_LOCAL_DEV=true -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
make -CBuild -j`nproc`
cp -r Data/Sys Build/Binaries/
touch Build/Binaries/portable.txt