mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
FakeJit was the native JIT for architectures without one, but the config already forces those onto the IR interpreter, so CreateNativeJit() now returns that instead. The vertex decoder fallback no longer needs FakeEmitter. JitBlockCache was the block cache of the pre-IR JITs. Its header keeps the debug interface types the IR block caches use. Also removes the JitInterface link hooks only it called, and the JitState fields tied to it. This fixes a null dereference in the ImDebugger memory section, which read GetBlockCache(), always null with the IR JITs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
65 lines
2.1 KiB
C++
65 lines
2.1 KiB
C++
// Copyright (c) 2013- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#include "ppsspp_config.h"
|
|
#include "Common/CPUDetect.h"
|
|
#include "Core/Config.h"
|
|
#include "Core/MIPS/JitCommon/JitState.h"
|
|
#include "Core/MemMap.h"
|
|
#include "Common/MemoryUtil.h"
|
|
|
|
namespace MIPSComp {
|
|
|
|
JitOptions::JitOptions() {
|
|
disableFlags = (JitDisable)g_Config.uJitDisableFlags;
|
|
|
|
// x86
|
|
enableVFPUSIMD = !Disabled(JitDisable::SIMD);
|
|
// Set by Asm if needed.
|
|
reserveR15ForAsm = false;
|
|
|
|
// ARM/ARM64
|
|
useBackJump = false;
|
|
useForwardJump = false;
|
|
cachePointers = !Disabled(JitDisable::CACHE_POINTERS);
|
|
|
|
// ARM only
|
|
downcountInRegister = true;
|
|
|
|
// Common
|
|
|
|
// We can get block linking to work with W^X by doing even more unprotect/re-protect, but let's try without first.
|
|
// enableBlocklink = !PlatformIsWXExclusive(); // Revert to this line if block linking is slow in W^X mode
|
|
enableBlocklink = !Disabled(JitDisable::BLOCKLINK);
|
|
useStaticAlloc = false;
|
|
enablePointerify = false;
|
|
#if PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(RISCV64) || PPSSPP_ARCH(LOONGARCH64)
|
|
useStaticAlloc = !Disabled(JitDisable::STATIC_ALLOC);
|
|
// iOS/etc. may disable at runtime if Memory::base is not nicely aligned.
|
|
enablePointerify = !Disabled(JitDisable::POINTERIFY);
|
|
#endif
|
|
#if PPSSPP_ARCH(RISCV64)
|
|
// Seems to perform slightly better than a checked entry at the start.
|
|
useBackJump = true;
|
|
#endif
|
|
}
|
|
|
|
bool JitOptions::Disabled(JitDisable bit) {
|
|
return (disableFlags & bit) != 0;
|
|
}
|
|
}
|