Jit: Fix compilation of FakeJit.

Maybe should just remove this...
This commit is contained in:
Unknown W. Brackets committed 2021-02-08 23:17:15 -08:00
1 parent c1fa4958d9
commit c7635a5d2f
8 files changed
+74 -80

No files matched your search

+2
View File
@@ -457,6 +457,7 @@
<ClCompile Include="Instance.cpp" />
<ClCompile Include="KeyMap.cpp" />
<ClCompile Include="MemFault.cpp" />
<ClCompile Include="MIPS\fake\FakeJit.cpp" />
<ClCompile Include="MIPS\IR\IRAsm.cpp" />
<ClCompile Include="MIPS\IR\IRCompALU.cpp" />
<ClCompile Include="MIPS\IR\IRCompBranch.cpp" />
@@ -1004,6 +1005,7 @@
<ClInclude Include="Instance.h" />
<ClInclude Include="KeyMap.h" />
<ClInclude Include="MemFault.h" />
<ClInclude Include="MIPS\fake\FakeJit.h" />
<ClInclude Include="MIPS\IR\IRFrontend.h" />
<ClInclude Include="MIPS\IR\IRInst.h" />
<ClInclude Include="MIPS\IR\IRInterpreter.h" />
+9
View File
@@ -88,6 +88,9 @@
<Filter Include="Ext\libzip">
<UniqueIdentifier>{0201ff27-4fa8-4cf3-bbb9-accfdc0c7046}</UniqueIdentifier>
</Filter>
<Filter Include="MIPS\fake">
<UniqueIdentifier>{678fa299-0ff7-4983-982d-2da47b52e238}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ELF\ElfReader.cpp">
@@ -971,6 +974,9 @@
<ClCompile Include="Debugger\WebSocket\InputBroadcaster.cpp">
<Filter>Debugger\WebSocket</Filter>
</ClCompile>
<ClCompile Include="MIPS\fake\FakeJit.cpp">
<Filter>MIPS\fake</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ELF\ElfReader.h">
@@ -1661,6 +1667,9 @@
<ClInclude Include="Debugger\WebSocket\InputBroadcaster.h">
<Filter>Debugger\WebSocket</Filter>
</ClInclude>
<ClInclude Include="MIPS\fake\FakeJit.h">
<Filter>MIPS\fake</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
+1 -1
View File
@@ -82,7 +82,7 @@ void MipsJit::FlushPrefixV()
void MipsJit::ClearCache()
{
blocks.Clear();
ClearCodeSpace();
ClearCodeSpace(0);
//GenerateFixedCode();
}
+13 -8
View File
@@ -16,10 +16,12 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Core/Reporting.h"
#include "Core/Config.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/MemMap.h"
#include "Core/MIPS/MIPS.h"
@@ -45,19 +47,22 @@ FakeJit::FakeJit(MIPSState *mips) : blocks(mips, this), mips_(mips)
blocks.Init();
}
void FakeJit::DoState(PointerWrap &p)
{
auto s = p.Section("FakeJit", 1, 2);
void FakeJit::DoState(PointerWrap &p) {
auto s = p.Section("Jit", 1, 2);
if (!s)
return;
p.Do(js.startDefaultPrefix);
Do(p, js.startDefaultPrefix);
if (s >= 2) {
p.Do(js.hasSetRounding);
Do(p, js.hasSetRounding);
js.lastSetRounding = 0;
} else {
js.hasSetRounding = 1;
}
// The debugger sets this so that "go" on a breakpoint will actually... go.
// But if they load a state, we can end up hitting it by mistake, since it's based on PC and ticks.
CBreakPoints::SetSkipFirst(0);
}
// This is here so the savestate matches between jit and non-jit.
@@ -68,10 +73,10 @@ void FakeJit::DoDummyState(PointerWrap &p)
return;
bool dummy = false;
p.Do(dummy);
Do(p, dummy);
if (s >= 2) {
dummy = true;
p.Do(dummy);
Do(p, dummy);
}
}
@@ -89,7 +94,7 @@ void FakeJit::FlushPrefixV()
void FakeJit::ClearCache()
{
blocks.Clear();
ClearCodeSpace();
ClearCodeSpace(0);
//GenerateFixedCode();
}
+22 -5
View File
@@ -18,8 +18,9 @@
#pragma once
#include "Common/FakeEmitter.h"
#include "Core/MIPS/JitCommon/JitState.h"
#include "Core/MIPS/JitCommon/JitBlockCache.h"
#include "Core/MIPS/JitCommon/JitState.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
#include "../MIPSVFPUUtils.h"
#ifndef offsetof
@@ -30,7 +31,7 @@ namespace MIPSComp {
typedef int FakeReg;
class FakeJit : public FakeGen::FakeXCodeBlock {
class FakeJit : public FakeGen::FakeXCodeBlock, public JitInterface, public MIPSFrontendInterface {
public:
FakeJit(MIPSState *mips);
@@ -46,7 +47,9 @@ public:
void Compile(u32 em_address); // Compiles a block at current MIPS PC
const u8 *DoJit(u32 em_address, JitBlock *b);
bool DescribeCodePtr(const u8 *ptr, std::string &name);
const u8 *GetCrashHandler() const override { return nullptr; }
bool CodeInRange(const u8 *ptr) const override { return IsInSpace(ptr); }
bool DescribeCodePtr(const u8 *ptr, std::string &name) override;
void CompileDelaySlot(int flags);
void EatInstruction(MIPSOpcode op);
@@ -126,9 +129,23 @@ public:
int Replace_fabsf() { return 0; }
JitBlockCache *GetBlockCache() { return &blocks; }
JitBlockCacheDebugInterface *GetBlockCacheDebugInterface() override { return &blocks; }
void ClearCache();
void InvalidateCacheAt(u32 em_address, int length = 4);
MIPSOpcode GetOriginalOp(MIPSOpcode op) override { return op; }
std::vector<u32> SaveAndClearEmuHackOps() override { return blocks.SaveAndClearEmuHackOps(); }
void RestoreSavedEmuHackOps(std::vector<u32> saved) override { blocks.RestoreSavedEmuHackOps(saved); }
void ClearCache() override;
void InvalidateCacheAt(u32 em_address, int length = 4) override;
void UpdateFCR31() override {}
const u8 *GetDispatcher() const override {
return nullptr;
}
void LinkBlock(u8 *exitPoint, const u8 *checkedEntry) override {}
void UnlinkBlock(u8 *checkedEntry, u32 originalAddress) override {}
void EatPrefix() { js.EatPrefix(); }