From a4eb49f009b45ec01630f810fdef5a7cec6b5aec Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 25 May 2015 12:26:40 +0000 Subject: [PATCH] Unbreak build with FakeJit Core/MIPS/fake/FakeJit.cpp:141:46: error: unknown type name 'FakeJitBlock'; did you mean 'JitBlock'? const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b) ^~~~~~~~~~~~ JitBlock Core/MIPS/JitCommon/JitBlockCache.h:59:8: note: 'JitBlock' declared here struct JitBlock { ^ Core/MIPS/fake/FakeJit.cpp:141:20: error: out-of-line definition of 'DoFakeJit' does not match any declaration in 'MIPSComp::FakeJit' const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b) ^~~~~~~~~ Core/HLE/ReplaceTables.cpp:1044:29: error: use of undeclared identifier 'JITFUNC' { "fabsf", &Replace_fabsf, JITFUNC(Replace_fabsf), REPFLAG_ALLOWINLI... ^ Core/HLE/ReplaceTables.cpp:1101:27: error: invalid application of 'sizeof' to an incomplete type 'const ReplacementTableEntry []' for (int i = 0; i < (int)ARRAY_SIZE(entries); i++) { ^~~~~~~~~~~~~~~~~~~ native/math/../base/basictypes.h:67:30: note: expanded from macro 'ARRAY_SIZE' #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ^~~ Core/HLE/ReplaceTables.cpp:1117:9: error: invalid application of 'sizeof' to an incomplete type 'const ReplacementTableEntry []' return ARRAY_SIZE(entries); ^~~~~~~~~~~~~~~~~~~ native/math/../base/basictypes.h:67:30: note: expanded from macro 'ARRAY_SIZE' #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ^~~ Core/MIPS/JitCommon/JitCommon.cpp:31:2: error: unknown type name 'Jit' Jit *jit; ^ Core/MIPS/JitCommon/JitCommon.cpp:100:21: error: no member named 'Asm' in 'MIPSComp::FakeJit' if (MIPSComp::jit->Asm().IsInSpace((u8 *)(intptr_t)addr)) { ~~~~~~~~~~~~~ ^ Core/MIPS/JitCommon/JitCommon.cpp:101:45: error: no member named 'Asm' in 'MIPSComp::FakeJit' *offset = addr - (uint64_t)MIPSComp::jit->Asm().GetBasePtr(); ~~~~~~~~~~~~~ ^ Core/MemMap.cpp:197:57: error: use of undeclared identifier 'MEMVIEW32_MASK' ...position, view.size, base + (view.virtual_address & MEMVIEW32_MASK)); ^ --- Core/HLE/ReplaceTables.cpp | 2 ++ Core/MIPS/JitCommon/JitCommon.cpp | 6 ++++-- Core/MIPS/fake/FakeJit.cpp | 2 +- Core/MemMap.cpp | 2 +- UI/DevScreens.cpp | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 4587e8f6a2..4f8e18f968 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -1031,6 +1031,8 @@ static int Hook_youkosohitsujimura_download_frame() { #define JITFUNC(f) (&MIPSComp::Jit::f) #elif defined(MIPS) #define JITFUNC(f) (&MIPSComp::Jit::f) +#else +#define JITFUNC(f) (&MIPSComp::FakeJit::f) #endif // Can either replace with C functions or functions emitted in Asm/ArmAsm. diff --git a/Core/MIPS/JitCommon/JitCommon.cpp b/Core/MIPS/JitCommon/JitCommon.cpp index 90f3c9e533..d96a69ce65 100644 --- a/Core/MIPS/JitCommon/JitCommon.cpp +++ b/Core/MIPS/JitCommon/JitCommon.cpp @@ -34,8 +34,10 @@ namespace MIPSComp { ArmJit *jit; #elif defined(ARM64) Arm64Jit *jit; -#else +#elif defined(_M_IX86) || defined(_M_X64) || defined(MIPS) Jit *jit; +#else + FakeJit *jit; #endif void JitAt() { jit->Compile(currentMIPS->pc); @@ -138,7 +140,7 @@ std::vector DisassembleArm64(const u8 *data, int size) { } #endif -#if !defined(ARM) && !defined(ARM64) +#if defined(_M_IX86) || defined(_M_X64) const char *ppsspp_resolver(struct ud*, uint64_t addr, diff --git a/Core/MIPS/fake/FakeJit.cpp b/Core/MIPS/fake/FakeJit.cpp index 8f73b153e5..6a4f8b4b01 100644 --- a/Core/MIPS/fake/FakeJit.cpp +++ b/Core/MIPS/fake/FakeJit.cpp @@ -130,7 +130,7 @@ void FakeJit::RunLoopUntil(u64 globalticks) ((void (*)())enterCode)(); } -const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b) +const u8 *FakeJit::DoJit(u32 em_address, JitBlock *b) { return b->normalEntry; } diff --git a/Core/MemMap.cpp b/Core/MemMap.cpp index 3ef061b88b..9a90c2b8a8 100644 --- a/Core/MemMap.cpp +++ b/Core/MemMap.cpp @@ -185,7 +185,7 @@ static bool Memory_TryBase(u32 flags) { if (!*view.out_ptr_low) goto bail; } -#if defined(_M_X64) || defined(ARM64) +#if defined(_ARCH_64) *view.out_ptr = (u8*)g_arena.CreateView( position, view.size, base + view.virtual_address); #else diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index ace5459b1a..229ecd9e03 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -622,12 +622,14 @@ void JitCompareScreen::UpdateDisasm() { std::vector targetDis = DisassembleArm2(block->normalEntry, block->codeSize); #elif defined(ARM64) std::vector targetDis = DisassembleArm64(block->normalEntry, block->codeSize); -#else +#elif defined(_M_IX86) || defined(_M_X64) std::vector targetDis = DisassembleX86(block->normalEntry, block->codeSize); #endif +#if defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64) for (size_t i = 0; i < targetDis.size(); i++) { rightDisasm_->Add(new TextView(targetDis[i]))->SetFocusable(true); } +#endif int numMips = leftDisasm_->GetNumSubviews(); int numHost = rightDisasm_->GetNumSubviews();