mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-09 04:23:35 +00:00
25 lines
692 B
C++
25 lines
692 B
C++
/* This file is part of the dynarmic project.
|
|
* Copyright (c) 2018 MerryMage
|
|
* SPDX-License-Identifier: 0BSD
|
|
*/
|
|
|
|
#include "frontend/A64/translate/impl/impl.h"
|
|
|
|
namespace Dynarmic::A64 {
|
|
|
|
bool TranslatorVisitor::BRK([[maybe_unused]] Imm<16> imm16) {
|
|
ir.ExceptionRaised(Exception::Breakpoint);
|
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
|
return false;
|
|
}
|
|
|
|
bool TranslatorVisitor::SVC(Imm<16> imm16) {
|
|
ir.PushRSB(ir.current_location->AdvancePC(4));
|
|
ir.SetPC(ir.Imm64(ir.current_location->PC() + 4));
|
|
ir.CallSupervisor(imm16.ZeroExtend());
|
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::PopRSBHint{}});
|
|
return false;
|
|
}
|
|
|
|
} // namespace Dynarmic::A64
|