Core: Add base 64bit Recompiler classes
This commit is contained in:
parent
7afbba08eb
commit
f7b1891c91
|
@ -49,12 +49,12 @@ add_library(Project64-core STATIC
|
|||
N64System/Mips/TLB.cpp
|
||||
N64System/Recompiler/CodeBlock.cpp
|
||||
N64System/Recompiler/CodeSection.cpp
|
||||
N64System/Recompiler/SectionInfo.cpp
|
||||
N64System/Recompiler/ExitInfo.cpp
|
||||
N64System/Recompiler/FunctionInfo.cpp
|
||||
N64System/Recompiler/FunctionMap.cpp
|
||||
N64System/Recompiler/JumpInfo.cpp
|
||||
N64System/Recompiler/LoopAnalysis.cpp
|
||||
N64System/Recompiler/Recompiler.cpp
|
||||
N64System/Recompiler/RecompilerCodeLog.cpp
|
||||
N64System/Recompiler/RecompilerMemory.cpp
|
||||
N64System/Recompiler/RegBase.cpp
|
||||
N64System/Recompiler/Aarch64/Aarch64RegInfo.cpp
|
||||
|
|
|
@ -1446,7 +1446,7 @@ void CN64System::SyncCPU(CN64System * const SecondCPU)
|
|||
|
||||
if (bFastSP() && m_Recomp)
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__amd64__)
|
||||
#if defined(__aarch64__) || defined(__amd64__) || defined(_M_X64)
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
#else
|
||||
if (m_Recomp->MemoryStackPos() != (uint32_t)(m_MMU_VM.Rdram() + (m_Reg.m_GPR[29].W[0] & 0x1FFFFFFF)))
|
||||
|
@ -1616,7 +1616,7 @@ void CN64System::DumpSyncErrors(CN64System * SecondCPU)
|
|||
}
|
||||
if (bFastSP() && m_Recomp)
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__amd64__)
|
||||
#if defined(__aarch64__) || defined(__amd64__) || defined(_M_X64)
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
#else
|
||||
if (m_Recomp->MemoryStackPos() != (uint32_t)(m_MMU_VM.Rdram() + (m_Reg.m_GPR[29].W[0] & 0x1FFFFFFF)))
|
||||
|
|
|
@ -33,6 +33,8 @@ CCodeBlock::CCodeBlock(CMipsMemoryVM & MMU, uint32_t VAddrEnter, uint8_t * Compi
|
|||
m_RecompilerOps = new CX86RecompilerOps(MMU, *this);
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
m_RecompilerOps = new CArmRecompilerOps(MMU);
|
||||
#else
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
#endif
|
||||
if (m_RecompilerOps == nullptr)
|
||||
{
|
||||
|
@ -88,6 +90,8 @@ CCodeBlock::~CCodeBlock()
|
|||
{
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
delete (CX86RecompilerOps *)m_RecompilerOps;
|
||||
#else
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
#endif
|
||||
m_RecompilerOps = nullptr;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include <Project64-core/N64System/Recompiler/RegInfo.h>
|
||||
#include <Project64-core/N64System/N64Types.h>
|
||||
|
||||
class CCodeBlock;
|
||||
|
||||
struct CExitInfo
|
||||
{
|
||||
CExitInfo(CCodeBlock & CodeBlock);
|
||||
|
|
|
@ -394,7 +394,7 @@ CCompiledFunc * CRecompiler::CompileCode()
|
|||
ret.first->second->SetNext(Func);
|
||||
}
|
||||
|
||||
#if defined(__aarch64__) || defined(__amd64__)
|
||||
#if defined(__aarch64__) || defined(__amd64__) || defined(_M_X64)
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
#else
|
||||
if (g_ModuleLogLevel[TraceRecompiler] >= TraceDebug)
|
||||
|
@ -518,7 +518,7 @@ void CRecompiler::ResetLog()
|
|||
|
||||
void CRecompiler::ResetMemoryStackPos()
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__amd64__)
|
||||
#if defined(__aarch64__) || defined(__amd64__) || defined(_M_X64)
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
#else
|
||||
if (m_Registers.m_GPR[29].UW[0] == 0)
|
||||
|
@ -542,7 +542,7 @@ void CRecompiler::ResetMemoryStackPos()
|
|||
|
||||
void CRecompiler::DumpFunctionTimes()
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__amd64__)
|
||||
#if defined(__aarch64__) || defined(__amd64__) || defined(_M_X64)
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
#else
|
||||
CPath LogFileName(g_Settings->LoadStringVal(Directory_Log).c_str(), "FunctionTimes.csv");
|
||||
|
|
|
@ -40,4 +40,12 @@ enum RecompilerTrapCompare
|
|||
|
||||
typedef CX86RecompilerOps CRecompilerOps;
|
||||
|
||||
#elif defined(__amd64__) || defined(_M_X64)
|
||||
#include <Project64-core/N64System/Recompiler/x64-86/x64RecompilerOps.h>
|
||||
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
#include <Project64-core/N64System/Recompiler/Arm/ArmRecompilerOps.h>
|
||||
|
||||
typedef CX86RecompilerOps CArmRecompilerOps;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,890 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/N64System/Recompiler/x64-86/x64RecompilerOps.h>
|
||||
|
||||
CX64RecompilerOps::CX64RecompilerOps(CMipsMemoryVM & /*MMU*/, CCodeBlock & CodeBlock) :
|
||||
m_Assembler(CodeBlock),
|
||||
m_RegWorkingSet(CodeBlock, m_Assembler)
|
||||
{
|
||||
}
|
||||
|
||||
CX64RecompilerOps::~CX64RecompilerOps()
|
||||
{
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::Compile_TrapCompare(RecompilerTrapCompare /*CompareType*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::Compile_BranchCompare(RecompilerBranchCompare /*CompareType*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::Compile_Branch(RecompilerBranchCompare /*CompareType*/, bool /*Link*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::Compile_BranchLikely(RecompilerBranchCompare /*CompareType*/, bool /*Link*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BNE_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BEQ_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BGTZ_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BLEZ_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BLTZ_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::BGEZ_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_BCF_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_BCT_Compare()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::J()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::JAL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::ADDI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::ADDIU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SLTI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SLTIU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::ANDI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::ORI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::XORI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LUI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::DADDI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::DADDIU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LDL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LDR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LH()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LWL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LW()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LBU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LHU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LWR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LWU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SH()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SWL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SW()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SWR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SDL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SDR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CACHE()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LWC1()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LDC1()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SC()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SWC1()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SDC1()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SLL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SRL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SRA()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SLLV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SRLV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SRAV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_JR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_JALR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SYSCALL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MFLO()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MTLO()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MFHI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MTHI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSLLV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRLV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRAV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MULT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_MULTU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DIV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DIVU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DMULT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DMULTU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DDIV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DDIVU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_ADD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_ADDU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SUB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SUBU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_AND()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_OR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_XOR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_NOR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SLT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_SLTU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DADD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DADDU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSUB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSUBU()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSLL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRA()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSLL32()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRL32()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SPECIAL_DSRA32()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_MF()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_MT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_CO_TLBR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_CO_TLBWI()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_CO_TLBWR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_CO_TLBP()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP0_CO_ERET()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_MF()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_DMF()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_CF()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_MT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_DMT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_CT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_ADD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_SUB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_MUL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_DIV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_ABS()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_NEG()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_SQRT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_MOV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_ROUND_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_TRUNC_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CEIL_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_FLOOR_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_ROUND_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_TRUNC_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CEIL_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_FLOOR_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CVT_D()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CVT_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CVT_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_S_CMP()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_ADD()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_SUB()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_MUL()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_DIV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_ABS()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_NEG()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_SQRT()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_MOV()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_ROUND_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_TRUNC_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CEIL_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_FLOOR_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_ROUND_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_TRUNC_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CEIL_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_FLOOR_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CVT_S()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CVT_W()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CVT_L()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_D_CMP()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_W_CVT_S()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_W_CVT_D()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_L_CVT_S()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::COP1_L_CVT_D()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::UnknownOpcode()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::EnterCodeBlock()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileExitCode()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileInPermLoop(CRegInfo & /*RegSet*/, uint32_t /*ProgramCounter*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SyncRegState(const CRegInfo & /*SyncTo*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
CRegInfo & CX64RecompilerOps::GetRegWorkingSet(void)
|
||||
{
|
||||
return m_RegWorkingSet;
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SetRegWorkingSet(const CRegInfo & /*RegInfo*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
bool CX64RecompilerOps::InheritParentInfo()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::LinkJump(CJumpInfo & /*JumpInfo*/, uint32_t /*SectionID*/, uint32_t /*FromSectionID*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::JumpToSection(CCodeSection * /*Section*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::JumpToUnknown(CJumpInfo * /*JumpInfo*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SetCurrentPC(uint32_t /*ProgramCounter*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
uint32_t CX64RecompilerOps::GetCurrentPC(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SetCurrentSection(CCodeSection * /*section*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::SetNextStepType(PIPELINE_STAGE /*StepType*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
PIPELINE_STAGE CX64RecompilerOps::GetNextStepType(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return PIPELINE_STAGE_NORMAL;
|
||||
}
|
||||
|
||||
const R4300iOpcode & CX64RecompilerOps::GetOpcode(void) const
|
||||
{
|
||||
return m_Opcode;
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::PreCompileOpcode(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::PostCompileOpcode(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileExit(uint32_t /*JumpPC*/, uint32_t /*TargetPC*/, CRegInfo & /*ExitRegSet*/, CExitInfo::EXIT_REASON /*reason*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::UpdateCounters(CRegInfo & /*RegSet*/, bool /*CheckTimer*/, bool /*ClearValues*/, bool /*UpdateTimer*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileSystemCheck(uint32_t /*TargetPC*/, const CRegInfo & /*RegSet*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileExecuteBP(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CX64RecompilerOps::CompileExecuteDelaySlotBP(void)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
|
@ -0,0 +1,236 @@
|
|||
#pragma once
|
||||
#if defined(__amd64__) || defined(_M_X64)
|
||||
|
||||
#include <Project64-core/N64System/Recompiler/RegInfo.h>
|
||||
#include <Project64-core/N64System/Recompiler/ExitInfo.h>
|
||||
#include <Project64-core/N64System/Recompiler/x64-86/x64ops.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerOps.h>
|
||||
#include <Project64-core/N64System/Mips/R4300iOpcode.h>
|
||||
|
||||
class CMipsMemoryVM;
|
||||
class CCodeBlock;
|
||||
class CCodeSection;
|
||||
class CX64Ops;
|
||||
struct CJumpInfo;
|
||||
|
||||
class CX64RecompilerOps
|
||||
{
|
||||
public:
|
||||
CX64RecompilerOps(CMipsMemoryVM & MMU, CCodeBlock & CodeBlock);
|
||||
~CX64RecompilerOps();
|
||||
|
||||
// Trap functions
|
||||
void Compile_TrapCompare(RecompilerTrapCompare CompareType);
|
||||
|
||||
// Branch functions
|
||||
void Compile_BranchCompare(RecompilerBranchCompare CompareType);
|
||||
void Compile_Branch(RecompilerBranchCompare CompareType, bool Link);
|
||||
void Compile_BranchLikely(RecompilerBranchCompare CompareType, bool Link);
|
||||
void BNE_Compare();
|
||||
void BEQ_Compare();
|
||||
void BGTZ_Compare();
|
||||
void BLEZ_Compare();
|
||||
void BLTZ_Compare();
|
||||
void BGEZ_Compare();
|
||||
void COP1_BCF_Compare();
|
||||
void COP1_BCT_Compare();
|
||||
|
||||
// Opcode functions
|
||||
void J();
|
||||
void JAL();
|
||||
void ADDI();
|
||||
void ADDIU();
|
||||
void SLTI();
|
||||
void SLTIU();
|
||||
void ANDI();
|
||||
void ORI();
|
||||
void XORI();
|
||||
void LUI();
|
||||
void DADDI();
|
||||
void DADDIU();
|
||||
void LDL();
|
||||
void LDR();
|
||||
void LB();
|
||||
void LH();
|
||||
void LWL();
|
||||
void LW();
|
||||
void LBU();
|
||||
void LHU();
|
||||
void LWR();
|
||||
void LWU();
|
||||
void SB();
|
||||
void SH();
|
||||
void SWL();
|
||||
void SW();
|
||||
void SWR();
|
||||
void SDL();
|
||||
void SDR();
|
||||
void CACHE();
|
||||
void LL();
|
||||
void LWC1();
|
||||
void LDC1();
|
||||
void LD();
|
||||
void SC();
|
||||
void SWC1();
|
||||
void SDC1();
|
||||
void SD();
|
||||
|
||||
// R4300i opcodes: Special
|
||||
void SPECIAL_SLL();
|
||||
void SPECIAL_SRL();
|
||||
void SPECIAL_SRA();
|
||||
void SPECIAL_SLLV();
|
||||
void SPECIAL_SRLV();
|
||||
void SPECIAL_SRAV();
|
||||
void SPECIAL_JR();
|
||||
void SPECIAL_JALR();
|
||||
void SPECIAL_SYSCALL();
|
||||
void SPECIAL_MFLO();
|
||||
void SPECIAL_MTLO();
|
||||
void SPECIAL_MFHI();
|
||||
void SPECIAL_MTHI();
|
||||
void SPECIAL_DSLLV();
|
||||
void SPECIAL_DSRLV();
|
||||
void SPECIAL_DSRAV();
|
||||
void SPECIAL_MULT();
|
||||
void SPECIAL_MULTU();
|
||||
void SPECIAL_DIV();
|
||||
void SPECIAL_DIVU();
|
||||
void SPECIAL_DMULT();
|
||||
void SPECIAL_DMULTU();
|
||||
void SPECIAL_DDIV();
|
||||
void SPECIAL_DDIVU();
|
||||
void SPECIAL_ADD();
|
||||
void SPECIAL_ADDU();
|
||||
void SPECIAL_SUB();
|
||||
void SPECIAL_SUBU();
|
||||
void SPECIAL_AND();
|
||||
void SPECIAL_OR();
|
||||
void SPECIAL_XOR();
|
||||
void SPECIAL_NOR();
|
||||
void SPECIAL_SLT();
|
||||
void SPECIAL_SLTU();
|
||||
void SPECIAL_DADD();
|
||||
void SPECIAL_DADDU();
|
||||
void SPECIAL_DSUB();
|
||||
void SPECIAL_DSUBU();
|
||||
void SPECIAL_DSLL();
|
||||
void SPECIAL_DSRL();
|
||||
void SPECIAL_DSRA();
|
||||
void SPECIAL_DSLL32();
|
||||
void SPECIAL_DSRL32();
|
||||
void SPECIAL_DSRA32();
|
||||
|
||||
// COP0 functions
|
||||
void COP0_MF();
|
||||
void COP0_MT();
|
||||
|
||||
// COP0 CO functions
|
||||
void COP0_CO_TLBR();
|
||||
void COP0_CO_TLBWI();
|
||||
void COP0_CO_TLBWR();
|
||||
void COP0_CO_TLBP();
|
||||
void COP0_CO_ERET();
|
||||
|
||||
// COP1 functions
|
||||
void COP1_MF();
|
||||
void COP1_DMF();
|
||||
void COP1_CF();
|
||||
void COP1_MT();
|
||||
void COP1_DMT();
|
||||
void COP1_CT();
|
||||
|
||||
// COP1: S functions
|
||||
void COP1_S_ADD();
|
||||
void COP1_S_SUB();
|
||||
void COP1_S_MUL();
|
||||
void COP1_S_DIV();
|
||||
void COP1_S_ABS();
|
||||
void COP1_S_NEG();
|
||||
void COP1_S_SQRT();
|
||||
void COP1_S_MOV();
|
||||
void COP1_S_ROUND_L();
|
||||
void COP1_S_TRUNC_L();
|
||||
void COP1_S_CEIL_L();
|
||||
void COP1_S_FLOOR_L();
|
||||
void COP1_S_ROUND_W();
|
||||
void COP1_S_TRUNC_W();
|
||||
void COP1_S_CEIL_W();
|
||||
void COP1_S_FLOOR_W();
|
||||
void COP1_S_CVT_D();
|
||||
void COP1_S_CVT_W();
|
||||
void COP1_S_CVT_L();
|
||||
void COP1_S_CMP();
|
||||
|
||||
// COP1: D functions
|
||||
void COP1_D_ADD();
|
||||
void COP1_D_SUB();
|
||||
void COP1_D_MUL();
|
||||
void COP1_D_DIV();
|
||||
void COP1_D_ABS();
|
||||
void COP1_D_NEG();
|
||||
void COP1_D_SQRT();
|
||||
void COP1_D_MOV();
|
||||
void COP1_D_ROUND_L();
|
||||
void COP1_D_TRUNC_L();
|
||||
void COP1_D_CEIL_L();
|
||||
void COP1_D_FLOOR_L();
|
||||
void COP1_D_ROUND_W();
|
||||
void COP1_D_TRUNC_W();
|
||||
void COP1_D_CEIL_W();
|
||||
void COP1_D_FLOOR_W();
|
||||
void COP1_D_CVT_S();
|
||||
void COP1_D_CVT_W();
|
||||
void COP1_D_CVT_L();
|
||||
void COP1_D_CMP();
|
||||
|
||||
// COP1: W functions
|
||||
void COP1_W_CVT_S();
|
||||
void COP1_W_CVT_D();
|
||||
|
||||
// COP1: L functions
|
||||
void COP1_L_CVT_S();
|
||||
void COP1_L_CVT_D();
|
||||
|
||||
// Other functions
|
||||
void UnknownOpcode();
|
||||
|
||||
void EnterCodeBlock();
|
||||
void CompileExitCode();
|
||||
void CompileInPermLoop(CRegInfo & RegSet, uint32_t ProgramCounter);
|
||||
void SyncRegState(const CRegInfo & SyncTo);
|
||||
CRegInfo & GetRegWorkingSet(void);
|
||||
void SetRegWorkingSet(const CRegInfo & RegInfo);
|
||||
bool InheritParentInfo();
|
||||
void LinkJump(CJumpInfo & JumpInfo, uint32_t SectionID = -1, uint32_t FromSectionID = -1);
|
||||
void JumpToSection(CCodeSection * Section);
|
||||
void JumpToUnknown(CJumpInfo * JumpInfo);
|
||||
void SetCurrentPC(uint32_t ProgramCounter);
|
||||
uint32_t GetCurrentPC(void);
|
||||
void SetCurrentSection(CCodeSection * section);
|
||||
void SetNextStepType(PIPELINE_STAGE StepType);
|
||||
PIPELINE_STAGE GetNextStepType(void);
|
||||
const R4300iOpcode & GetOpcode(void) const;
|
||||
void PreCompileOpcode(void);
|
||||
void PostCompileOpcode(void);
|
||||
void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason);
|
||||
|
||||
void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false, bool UpdateTimer = true);
|
||||
void CompileSystemCheck(uint32_t TargetPC, const CRegInfo & RegSet);
|
||||
void CompileExecuteBP(void);
|
||||
void CompileExecuteDelaySlotBP(void);
|
||||
|
||||
CX64Ops & Assembler() { return m_Assembler; }
|
||||
|
||||
private:
|
||||
CX64RecompilerOps(const CX64RecompilerOps&);
|
||||
CX64RecompilerOps& operator=(const CX64RecompilerOps&);
|
||||
|
||||
CX64RegInfo m_RegWorkingSet;
|
||||
CX64Ops m_Assembler;
|
||||
R4300iOpcode m_Opcode;
|
||||
};
|
||||
|
||||
typedef CX64RecompilerOps CRecompilerOps;
|
||||
|
||||
#endif
|
|
@ -3,11 +3,21 @@
|
|||
#if defined(__amd64__) || defined(_M_X64)
|
||||
#include <Project64-core/N64System/Recompiler/RegBase.h>
|
||||
|
||||
class CCodeBlock;
|
||||
class CX64Ops;
|
||||
|
||||
class CX64RegInfo :
|
||||
public CRegBase
|
||||
{
|
||||
public:
|
||||
CX64RegInfo(CCodeBlock & CodeBlock, CX64Ops & Assembler);
|
||||
CX64RegInfo(const CX64RegInfo&);
|
||||
~CX64RegInfo();
|
||||
|
||||
CX64RegInfo& operator=(const CX64RegInfo&);
|
||||
|
||||
bool operator==(const CX64RegInfo& right) const;
|
||||
bool operator!=(const CX64RegInfo& right) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/N64System/Recompiler/x64-86/x64ops.h>
|
||||
|
||||
CX64Ops::CX64Ops(CCodeBlock & CodeBlock) :
|
||||
m_CodeBlock(CodeBlock)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#if defined(__amd64__) || defined(_M_X64)
|
||||
|
||||
class CCodeBlock;
|
||||
|
||||
class CX64Ops
|
||||
{
|
||||
public:
|
||||
CX64Ops(CCodeBlock & CodeBlock);
|
||||
|
||||
private:
|
||||
CX64Ops(void);
|
||||
CX64Ops(const CX64Ops&);
|
||||
CX64Ops& operator=(const CX64Ops&);
|
||||
|
||||
CCodeBlock & m_CodeBlock;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,34 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/N64System/Recompiler/x64-86/x64RegInfo.h>
|
||||
|
||||
CX64RegInfo::CX64RegInfo(CCodeBlock & /*CodeBlock*/, CX64Ops & /*Assembler*/)
|
||||
{
|
||||
}
|
||||
|
||||
CX64RegInfo::CX64RegInfo(const CX64RegInfo&)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
CX64RegInfo::~CX64RegInfo()
|
||||
{
|
||||
}
|
||||
|
||||
CX64RegInfo& CX64RegInfo::operator=(const CX64RegInfo & right)
|
||||
{
|
||||
CRegBase::operator=(right);
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool CX64RegInfo::operator==(const CX64RegInfo & /*right*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CX64RegInfo::operator!=(const CX64RegInfo & /*right*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
|
@ -47,7 +47,6 @@ public:
|
|||
FPU_Double = 4,
|
||||
};
|
||||
|
||||
public:
|
||||
CX86RegInfo(CCodeBlock & CodeBlock, CX86Ops & Assembler);
|
||||
CX86RegInfo(const CX86RegInfo&);
|
||||
~CX86RegInfo();
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
static const char * x86_HalfName(x86Reg Reg);
|
||||
static const char * fpu_Name(x86FpuValues Reg);
|
||||
|
||||
public:
|
||||
CX86Ops(CCodeBlock & CodeBlock);
|
||||
|
||||
// Logging functions
|
||||
|
|
|
@ -101,6 +101,9 @@
|
|||
<ClCompile Include="N64System\Recompiler\Recompiler.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerMemory.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RegBase.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x64ops.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x64RecompilerOps.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x86RegInfo.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86\x86ops.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86\x86RecompilerOps.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86\x86RegInfo.cpp" />
|
||||
|
@ -209,6 +212,7 @@
|
|||
<ClInclude Include="N64System\N64System.h" />
|
||||
<ClInclude Include="N64System\N64Types.h" />
|
||||
<ClInclude Include="N64System\Profiling.h" />
|
||||
<ClInclude Include="N64System\Recompiler\Aarch64\Aarch64RegInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\Arm\ArmOpCode.h" />
|
||||
<ClInclude Include="N64System\Recompiler\Arm\ArmOps.h" />
|
||||
<ClInclude Include="N64System\Recompiler\Arm\ArmRecompilerOps.h" />
|
||||
|
@ -226,6 +230,8 @@
|
|||
<ClInclude Include="N64System\Recompiler\RegBase.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RegInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\SectionInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64ops.h" />
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64RecompilerOps.h" />
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64RegInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\x86\x86ops.h" />
|
||||
<ClInclude Include="N64System\Recompiler\x86\x86RecompilerOps.h" />
|
||||
|
|
|
@ -109,6 +109,15 @@
|
|||
<Filter Include="Header Files\Plugin Spec">
|
||||
<UniqueIdentifier>{a29536c1-cda4-43b0-b3c6-12a24f42be64}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\N64 System\Recompiler\x64-86">
|
||||
<UniqueIdentifier>{ec8602cf-3980-4a8e-8cac-25f9ad4f7a42}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\N64 System\Recompiler\Aarch64">
|
||||
<UniqueIdentifier>{ae9f1045-e15e-4a27-8891-937c7608ee06}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\N64 System\Recompiler\x64-86">
|
||||
<UniqueIdentifier>{56644680-2b82-4343-8619-660b68685cba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -408,6 +417,15 @@
|
|||
<ClCompile Include="N64System\Recompiler\JumpInfo.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x64RecompilerOps.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x86RegInfo.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\x64-86\x64ops.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
|
@ -686,9 +704,6 @@
|
|||
<ClInclude Include="N64System\Recompiler\RegBase.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64RegInfo.h">
|
||||
<Filter>Header Files\N64 System\Recompiler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -794,6 +809,18 @@
|
|||
<ClInclude Include="N64System\MemoryHandler\ISViewerHandler.h">
|
||||
<Filter>Header Files\N64 System\MemoryHandler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64RegInfo.h">
|
||||
<Filter>Header Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\Aarch64\Aarch64RegInfo.h">
|
||||
<Filter>Header Files\N64 System\Recompiler\Aarch64</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64RecompilerOps.h">
|
||||
<Filter>Header Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\x64-86\x64ops.h">
|
||||
<Filter>Header Files\N64 System\Recompiler\x64-86</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Version.h.in">
|
||||
|
|
|
@ -20,7 +20,7 @@ void WelcomeScreen::SelectGameDir(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
|||
bi.lpszTitle = wTitle.c_str();
|
||||
bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
|
||||
bi.lpfn = (BFFCALLBACK)SelectDirCallBack;
|
||||
bi.lParam = (DWORD)InitialDir.c_str();
|
||||
bi.lParam = (LPARAM)InitialDir.c_str();
|
||||
if ((pidl = SHBrowseForFolder(&bi)) != nullptr)
|
||||
{
|
||||
if (SHGetPathFromIDList(pidl, Directory))
|
||||
|
|
Loading…
Reference in New Issue