diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index f9722923ff..6fe6c61886 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -91,9 +91,9 @@ void CBoot::SetupHID(bool is_wii) // HID1 is initialized in PowerPC.cpp to 0x80000000 // HID2 is 0xe0000000 - HID2.PSE = 1; - HID2.WPE = 1; - HID2.LSQE = 1; + HID2(PowerPC::ppcState).PSE = 1; + HID2(PowerPC::ppcState).WPE = 1; + HID2(PowerPC::ppcState).LSQE = 1; // HID4 is 0 on GC and 0x83900000 on Wii if (is_wii) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index f2d7ceef9c..7825d492bf 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -64,10 +64,11 @@ bool IsPairedSingleInstruction(UGeckoInstruction inst) // but HID2.LSQE is not set. bool IsInvalidPairedSingleExecution(UGeckoInstruction inst) { - if (!HID2.PSE && IsPairedSingleInstruction(inst)) + if (!HID2(PowerPC::ppcState).PSE && IsPairedSingleInstruction(inst)) return true; - return HID2.PSE && !HID2.LSQE && IsPairedSingleQuantizedNonIndexedInstruction(inst); + return HID2(PowerPC::ppcState).PSE && !HID2(PowerPC::ppcState).LSQE && + IsPairedSingleQuantizedNonIndexedInstruction(inst); } void UpdatePC() diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp index e436a67a04..3a02f61b03 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -525,7 +525,7 @@ void Interpreter::dcbz(UGeckoInstruction inst) void Interpreter::dcbz_l(UGeckoInstruction inst) { - if (!HID2.LCE) + if (!HID2(PowerPC::ppcState).LCE) { GenerateProgramException(ProgramExceptionCause::IllegalInstruction); return; diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp index 6905c7a2ab..723e9af457 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp @@ -310,7 +310,7 @@ static void Helper_Dequantize(PowerPC::PowerPCState* ppcs, u32 addr, u32 instI, void Interpreter::psq_l(UGeckoInstruction inst) { - if (HID2.LSQE == 0) + if (HID2(PowerPC::ppcState).LSQE == 0) { GenerateProgramException(ProgramExceptionCause::IllegalInstruction); return; @@ -322,7 +322,7 @@ void Interpreter::psq_l(UGeckoInstruction inst) void Interpreter::psq_lu(UGeckoInstruction inst) { - if (HID2.LSQE == 0) + if (HID2(PowerPC::ppcState).LSQE == 0) { GenerateProgramException(ProgramExceptionCause::IllegalInstruction); return; @@ -341,7 +341,7 @@ void Interpreter::psq_lu(UGeckoInstruction inst) void Interpreter::psq_st(UGeckoInstruction inst) { - if (HID2.LSQE == 0) + if (HID2(PowerPC::ppcState).LSQE == 0) { GenerateProgramException(ProgramExceptionCause::IllegalInstruction); return; @@ -353,7 +353,7 @@ void Interpreter::psq_st(UGeckoInstruction inst) void Interpreter::psq_stu(UGeckoInstruction inst) { - if (HID2.LSQE == 0) + if (HID2(PowerPC::ppcState).LSQE == 0) { GenerateProgramException(ProgramExceptionCause::IllegalInstruction); return; diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h index e5fc426f69..16b871b4b7 100644 --- a/Source/Core/Core/PowerPC/PowerPC.h +++ b/Source/Core/Core/PowerPC/PowerPC.h @@ -236,7 +236,7 @@ void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst); // Easy register access macros. #define HID0(ppc_state) ((UReg_HID0&)(ppc_state).spr[SPR_HID0]) -#define HID2 ((UReg_HID2&)PowerPC::ppcState.spr[SPR_HID2]) +#define HID2(ppc_state) ((UReg_HID2&)(ppc_state).spr[SPR_HID2]) #define HID4 ((UReg_HID4&)PowerPC::ppcState.spr[SPR_HID4]) #define DMAU (*(UReg_DMAU*)&PowerPC::ppcState.spr[SPR_DMAU]) #define DMAL (*(UReg_DMAL*)&PowerPC::ppcState.spr[SPR_DMAL])