From dcab1dd7d0f351e97b7da85d948dbcf98fdaa809 Mon Sep 17 00:00:00 2001 From: Douglas Whittingham Date: Tue, 4 Aug 2026 13:15:00 -1000 Subject: [PATCH] Include StaticRecompCore.h where the interpreter uses it unknown_instruction reads g_static_recomp_core and ppc_state, but the translation unit includes neither the header that declares the former nor a binding for the latter, so core does not compile: Interpreter.cpp(294): error C2065: 'g_static_recomp_core': undeclared identifier Interpreter.cpp(299): error C2065: 'ppc_state': undeclared identifier It is not reached through the PCH either -- pch.h does not pull in StaticRecompCore.h. The ppc_state binding already existed further down the same function, past the first use. Moving it to the top serves both uses rather than adding a second one, which would be a redefinition. --- Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 4d0bbbfa59..2fa8cde1dc 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -23,6 +23,7 @@ #include "Core/PowerPC/MMU.h" #include "Core/PowerPC/PPCTables.h" #include "Core/PowerPC/PowerPC.h" +#include "Core/PowerPC/StaticRecomp/StaticRecompCore.h" #include "Core/System.h" namespace @@ -287,6 +288,7 @@ void Interpreter::Run() void Interpreter::unknown_instruction(Interpreter& interpreter, UGeckoInstruction inst) { ASSERT(Core::IsCPUThread()); + auto& ppc_state = interpreter.m_ppc_state; auto& system = interpreter.m_system; Core::CPUThreadGuard guard(system); @@ -337,7 +339,6 @@ void Interpreter::unknown_instruction(Interpreter& interpreter, UGeckoInstructio Dolphin_Debugger::PrintCallstack(guard, Common::Log::LogType::POWERPC, Common::Log::LogLevel::LNOTICE); - const auto& ppc_state = interpreter.m_ppc_state; NOTICE_LOG_FMT( POWERPC, "\nIntCPU: Unknown instruction {:08x} at PC = {:08x} last_PC = {:08x} LR = {:08x}\n",