mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-07 23:50:00 +01:00
The SetRegister() IR function doesn't allow specifying the PC as a register. This is a discrepancy that slipped through (my bad). Instead, we can use BranchWritePC(), like how the other similar PC modifying locations do it.
29 lines
783 B
C++
29 lines
783 B
C++
/* This file is part of the dynarmic project.
|
|
* Copyright (c) 2019 MerryMage
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
* General Public License version 2 or any later version.
|
|
*/
|
|
|
|
#include "translate_arm.h"
|
|
|
|
namespace Dynarmic::A32 {
|
|
|
|
bool ArmTranslatorVisitor::arm_DMB([[maybe_unused]] Imm4 option) {
|
|
ir.DataMemoryBarrier();
|
|
return true;
|
|
}
|
|
|
|
bool ArmTranslatorVisitor::arm_DSB([[maybe_unused]] Imm4 option) {
|
|
ir.DataSynchronizationBarrier();
|
|
return true;
|
|
}
|
|
|
|
bool ArmTranslatorVisitor::arm_ISB([[maybe_unused]] Imm4 option) {
|
|
ir.InstructionSynchronizationBarrier();
|
|
ir.BranchWritePC(ir.Imm32(ir.current_location.PC() + 4));
|
|
ir.SetTerm(IR::Term::ReturnToDispatch{});
|
|
return false;
|
|
}
|
|
|
|
} // namespace Dynarmic::A32
|