2016-08-01 20:20:22 +01:00
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2016 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 {
|
2018-01-01 15:23:56 +00:00
|
|
|
namespace A32 {
|
2016-08-01 20:20:22 +01:00
|
|
|
|
2017-11-28 19:44:33 +00:00
|
|
|
bool ArmTranslatorVisitor::arm_BKPT(Cond /*cond*/, Imm12 /*imm12*/, Imm4 /*imm4*/) {
|
2016-08-01 20:20:22 +01:00
|
|
|
return InterpretThisInstruction();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
|
|
|
u32 imm32 = imm24;
|
|
|
|
// SVC<c> #<imm24>
|
|
|
|
if (ConditionPassed(cond)) {
|
2016-08-15 15:02:08 +01:00
|
|
|
ir.PushRSB(ir.current_location.AdvancePC(4));
|
2016-08-07 22:19:39 +01:00
|
|
|
ir.BranchWritePC(ir.Imm32(ir.current_location.PC() + 4));
|
2016-08-01 20:20:22 +01:00
|
|
|
ir.CallSupervisor(ir.Imm32(imm32));
|
2016-08-15 15:02:08 +01:00
|
|
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::PopRSBHint{}});
|
2016-08-07 22:19:39 +01:00
|
|
|
return false;
|
2016-08-01 20:20:22 +01:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ArmTranslatorVisitor::arm_UDF() {
|
|
|
|
return InterpretThisInstruction();
|
|
|
|
}
|
|
|
|
|
2018-01-01 15:23:56 +00:00
|
|
|
} // namespace A32
|
2016-08-01 20:20:22 +01:00
|
|
|
} // namespace Dynarmic
|