Interpreter: Use local variables for action PCs

This commit is contained in:
Stenzek 2023-06-24 22:16:19 +10:00 committed by Connor McLaughlin
parent 129efbda40
commit 4d22102fd1
1 changed files with 5 additions and 2 deletions

View File

@ -525,6 +525,7 @@ static void intExecute()
// Avoid reloading every instruction. // Avoid reloading every instruction.
u32 elf_entry_point = VMManager::Internal::GetCurrentELFEntryPoint(); u32 elf_entry_point = VMManager::Internal::GetCurrentELFEntryPoint();
u32 eeload_main = g_eeloadMain; u32 eeload_main = g_eeloadMain;
u32 eeload_exec = g_eeloadExec;
while (true) while (true)
{ {
@ -539,7 +540,7 @@ static void intExecute()
eeload_main = g_eeloadMain; eeload_main = g_eeloadMain;
} }
else if (cpuRegs.pc == g_eeloadMain) else if (cpuRegs.pc == eeload_main)
{ {
eeloadHook(); eeloadHook();
if (VMManager::Internal::IsFastBootInProgress()) if (VMManager::Internal::IsFastBootInProgress())
@ -555,11 +556,13 @@ static void intExecute()
g_eeloadExec = EELOAD_START + 0x170; g_eeloadExec = EELOAD_START + 0x170;
else else
Console.WriteLn("intExecute: Could not enable launch arguments for fast boot mode; unidentified BIOS version! Please report this to the PCSX2 developers."); Console.WriteLn("intExecute: Could not enable launch arguments for fast boot mode; unidentified BIOS version! Please report this to the PCSX2 developers.");
eeload_exec = g_eeloadExec;
} }
elf_entry_point = VMManager::Internal::GetCurrentELFEntryPoint(); elf_entry_point = VMManager::Internal::GetCurrentELFEntryPoint();
} }
else if (cpuRegs.pc == g_eeloadExec) else if (cpuRegs.pc == eeload_exec)
{ {
eeloadHook2(); eeloadHook2();
} }