|
|
|
|
@ -859,12 +859,19 @@ void CPU::ARM64Recompiler::EndBlockWithException(Exception excode)
|
|
|
|
|
Flush(FLUSH_END_BLOCK | FLUSH_FOR_EXCEPTION | FLUSH_FOR_C_CALL);
|
|
|
|
|
|
|
|
|
|
// TODO: flush load delay
|
|
|
|
|
// TODO: break for pcdrv
|
|
|
|
|
|
|
|
|
|
EmitMov(RWARG1, Cop0Registers::CAUSE::MakeValueForException(excode, m_current_instruction_branch_delay_slot, false,
|
|
|
|
|
inst->cop.cop_n));
|
|
|
|
|
EmitMov(RWARG2, m_current_instruction_pc);
|
|
|
|
|
EmitCall(reinterpret_cast<const void*>(static_cast<void (*)(u32, u32)>(&CPU::RaiseException)));
|
|
|
|
|
if (excode != Exception::BP)
|
|
|
|
|
{
|
|
|
|
|
EmitCall(reinterpret_cast<const void*>(static_cast<void (*)(u32, u32)>(&CPU::RaiseException)));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
EmitMov(RWARG3, inst->bits);
|
|
|
|
|
EmitCall(reinterpret_cast<const void*>(&CPU::RaiseBreakException));
|
|
|
|
|
}
|
|
|
|
|
m_dirty_pc = false;
|
|
|
|
|
|
|
|
|
|
EndAndLinkBlock(std::nullopt, true, false);
|
|
|
|
|
|