mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
PowerPC: Make the PowerPCState's msr member variable a UReg_MSR instance
Gets rid of the need to construct UReg_MSR values around the the actual member in order to query information from it (without using shifts and masks). This makes it more concise in some areas, while helping with readability in some other places (such as copying the ILE bit to the LE bit in the exception checking functions).
This commit is contained in:
@ -196,7 +196,7 @@ static void ApplyPatches(const std::vector<Patch>& patches)
|
||||
// We require at least 2 stack frames, if the stack is shallower than that then it won't work.
|
||||
static bool IsStackSane()
|
||||
{
|
||||
DEBUG_ASSERT(UReg_MSR(MSR).DR && UReg_MSR(MSR).IR);
|
||||
DEBUG_ASSERT(MSR.DR && MSR.IR);
|
||||
|
||||
// Check the stack pointer
|
||||
u32 SP = GPR(1);
|
||||
@ -220,13 +220,12 @@ bool ApplyFramePatches()
|
||||
// callback hook we can end up catching the game in an exception vector.
|
||||
// We deal with this by returning false so that SystemTimers will reschedule us in a few cycles
|
||||
// where we can try again after the CPU hopefully returns back to the normal instruction flow.
|
||||
UReg_MSR msr = MSR;
|
||||
if (!msr.DR || !msr.IR || !IsStackSane())
|
||||
if (!MSR.DR || !MSR.IR || !IsStackSane())
|
||||
{
|
||||
DEBUG_LOG(
|
||||
ACTIONREPLAY,
|
||||
"Need to retry later. CPU configuration is currently incorrect. PC = 0x%08X, MSR = 0x%08X",
|
||||
PC, MSR);
|
||||
PC, MSR.Hex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user