Skip to content

Commit

Permalink
Unbreak build with FakeJit
Browse files Browse the repository at this point in the history
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));
                                                             ^
  • Loading branch information
jbeich committed May 25, 2015
1 parent b10c149 commit c3feb45
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Core/HLE/ReplaceTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion Core/MIPS/JitCommon/JitCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -157,10 +159,12 @@ const char *ppsspp_resolver(struct ud*,
*offset = addr - (uint64_t)MIPSComp::jit->GetBasePtr();
return "jitcode";
}
#if defined(_M_IX86) || defined(_M_X64) || defined(MIPS)
if (MIPSComp::jit->Asm().IsInSpace((u8 *)(intptr_t)addr)) {
*offset = addr - (uint64_t)MIPSComp::jit->Asm().GetBasePtr();
return "dispatcher";
}
#endif

return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion Core/MIPS/fake/FakeJit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions Core/MemMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ static bool Memory_TryBase(u32 flags) {
*view.out_ptr = *views[i - 1].out_ptr;
} else {
*view.out_ptr = (u8*)g_arena.CreateView(
#ifdef _ARCH_32
position, view.size, base + (view.virtual_address & MEMVIEW32_MASK));
#else
position, view.size, base + view.virtual_address);
#endif
if (!*view.out_ptr)
goto bail;
}
Expand Down

0 comments on commit c3feb45

Please sign in to comment.