Opens up for having multiple JIT implementations available at runtime,
which could be use for experimenting with new JIT compiler types or for
unit testing one JIT on another architecture.
Very few of the newly virtual calls are on any sort of critical path so
hopefully there will not be a performance loss.
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💯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));
^
For a long time we've done this with GetPointer() only, but it's better if
it's the same for all methods of memory access.
Technically, we should do the swizzling (and also swizzle the depth data in
softgpu), but there's no indication games depend on this, and GetPointer
would need changes anyway.
Also, I'm not sure the extra ram is being handled correctly, I think it's
not meant to be exposed to games except homebrew, not sure of the exact
method...