PowerPC: Parametrize LR macro.
This commit is contained in:
13 files changed
+37
-32
No files matched your search
@@ -346,7 +346,7 @@ void Interpreter::unknown_instruction(UGeckoInstruction inst)
|
||||
NOTICE_LOG_FMT(
|
||||
POWERPC,
|
||||
"\nIntCPU: Unknown instruction {:08x} at PC = {:08x} last_PC = {:08x} LR = {:08x}\n",
|
||||
inst.hex, PowerPC::ppcState.pc, last_pc, LR);
|
||||
inst.hex, PowerPC::ppcState.pc, last_pc, LR(PowerPC::ppcState));
|
||||
for (int i = 0; i < 32; i += 4)
|
||||
{
|
||||
NOTICE_LOG_FMT(POWERPC, "r{}: {:#010x} r{}: {:#010x} r{}: {:#010x} r{}: {:#010x}", i,
|
||||
@@ -355,7 +355,7 @@ void Interpreter::unknown_instruction(UGeckoInstruction inst)
|
||||
}
|
||||
ASSERT_MSG(POWERPC, 0,
|
||||
"\nIntCPU: Unknown instruction {:08x} at PC = {:08x} last_PC = {:08x} LR = {:08x}\n",
|
||||
inst.hex, PowerPC::ppcState.pc, last_pc, LR);
|
||||
inst.hex, PowerPC::ppcState.pc, last_pc, LR(PowerPC::ppcState));
|
||||
if (Core::System::GetInstance().IsPauseOnPanicMode())
|
||||
CPU::Break();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
void Interpreter::bx(UGeckoInstruction inst)
|
||||
{
|
||||
if (inst.LK)
|
||||
LR = PowerPC::ppcState.pc + 4;
|
||||
LR(PowerPC::ppcState) = PowerPC::ppcState.pc + 4;
|
||||
|
||||
const auto address = u32(SignExt26(inst.LI << 2));
|
||||
|
||||
@@ -42,7 +42,7 @@ void Interpreter::bcx(UGeckoInstruction inst)
|
||||
if (counter && condition)
|
||||
{
|
||||
if (inst.LK)
|
||||
LR = PowerPC::ppcState.pc + 4;
|
||||
LR(PowerPC::ppcState) = PowerPC::ppcState.pc + 4;
|
||||
|
||||
const auto address = u32(SignExt16(s16(inst.BD << 2)));
|
||||
|
||||
@@ -67,7 +67,7 @@ void Interpreter::bcctrx(UGeckoInstruction inst)
|
||||
{
|
||||
PowerPC::ppcState.npc = CTR & (~3);
|
||||
if (inst.LK_3)
|
||||
LR = PowerPC::ppcState.pc + 4;
|
||||
LR(PowerPC::ppcState) = PowerPC::ppcState.pc + 4;
|
||||
}
|
||||
|
||||
m_end_block = true;
|
||||
@@ -84,9 +84,9 @@ void Interpreter::bclrx(UGeckoInstruction inst)
|
||||
|
||||
if ((counter & condition) != 0)
|
||||
{
|
||||
PowerPC::ppcState.npc = LR & (~3);
|
||||
PowerPC::ppcState.npc = LR(PowerPC::ppcState) & (~3);
|
||||
if (inst.LK_3)
|
||||
LR = PowerPC::ppcState.pc + 4;
|
||||
LR(PowerPC::ppcState) = PowerPC::ppcState.pc + 4;
|
||||
}
|
||||
|
||||
m_end_block = true;
|
||||
|
||||
Reference in new issue
Block a user