diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6408fb49..b54a9980 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,7 @@ set(SRCS frontend/translate/translate_arm/multiply.cpp frontend/translate/translate_arm/parallel.cpp frontend/translate/translate_arm/reversal.cpp + frontend/translate/translate_arm/status_register_access.cpp frontend/translate/translate_arm/synchronization.cpp frontend/translate/translate_arm/vfp2.cpp frontend/translate/translate_thumb.cpp diff --git a/src/frontend/translate/translate_arm/status_register_access.cpp b/src/frontend/translate/translate_arm/status_register_access.cpp new file mode 100644 index 00000000..c935b29b --- /dev/null +++ b/src/frontend/translate/translate_arm/status_register_access.cpp @@ -0,0 +1,40 @@ +/* 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 { +namespace Arm { + +bool ArmTranslatorVisitor::arm_CPS() { + return InterpretThisInstruction(); +} + +bool ArmTranslatorVisitor::arm_MRS() { + return InterpretThisInstruction(); +} + +bool ArmTranslatorVisitor::arm_MSR() { + return InterpretThisInstruction(); +} + +bool ArmTranslatorVisitor::arm_RFE() { + return InterpretThisInstruction(); +} + +bool ArmTranslatorVisitor::arm_SETEND(bool E) { + // SETEND {BE,LE} + ir.SetTerm(ir.current_location.AdvancePC(4).SetEFlag(E)); + return false; +} + +bool ArmTranslatorVisitor::arm_SRS() { + return InterpretThisInstruction(); +} + + +} // namespace Arm +} // namespace Dynarmic diff --git a/src/frontend/translate/translate_arm/translate_arm.h b/src/frontend/translate/translate_arm/translate_arm.h index 8abca956..2ce7381a 100644 --- a/src/frontend/translate/translate_arm/translate_arm.h +++ b/src/frontend/translate/translate_arm/translate_arm.h @@ -317,12 +317,12 @@ struct ArmTranslatorVisitor final { bool arm_SWPB(Cond cond, Reg n, Reg d, Reg m); // Status register access instructions - bool arm_CPS() { return InterpretThisInstruction(); } - bool arm_MRS() { return InterpretThisInstruction(); } - bool arm_MSR() { return InterpretThisInstruction(); } - bool arm_RFE() { return InterpretThisInstruction(); } - bool arm_SETEND(bool E) { return InterpretThisInstruction(); } - bool arm_SRS() { return InterpretThisInstruction(); } + bool arm_CPS(); + bool arm_MRS(); + bool arm_MSR(); + bool arm_RFE(); + bool arm_SETEND(bool E); + bool arm_SRS(); // Floating-point three-register data processing instructions bool vfp2_VADD(Cond cond, bool D, size_t Vn, size_t Vd, bool sz, bool N, bool M, size_t Vm);