diff options
author | Liam <byteslice@airmail.cc> | 2023-06-13 03:34:25 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-06-13 04:11:51 +0200 |
commit | 8506915208dc2d518c821f00e4286824d778642c (patch) | |
tree | ea4c10c78188ca6481896e698f23f4ad9675548f /src/core/arm/dynarmic/arm_dynarmic.h | |
parent | Merge pull request #10743 from FearlessTobi/translations (diff) | |
download | yuzu-8506915208dc2d518c821f00e4286824d778642c.tar yuzu-8506915208dc2d518c821f00e4286824d778642c.tar.gz yuzu-8506915208dc2d518c821f00e4286824d778642c.tar.bz2 yuzu-8506915208dc2d518c821f00e4286824d778642c.tar.lz yuzu-8506915208dc2d518c821f00e4286824d778642c.tar.xz yuzu-8506915208dc2d518c821f00e4286824d778642c.tar.zst yuzu-8506915208dc2d518c821f00e4286824d778642c.zip |
Diffstat (limited to 'src/core/arm/dynarmic/arm_dynarmic.h')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h new file mode 100644 index 000000000..eef7c3116 --- /dev/null +++ b/src/core/arm/dynarmic/arm_dynarmic.h @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <dynarmic/interface/halt_reason.h> + +#include "core/arm/arm_interface.h" + +namespace Core { + +constexpr Dynarmic::HaltReason StepThread = Dynarmic::HaltReason::Step; +constexpr Dynarmic::HaltReason DataAbort = Dynarmic::HaltReason::MemoryAbort; +constexpr Dynarmic::HaltReason BreakLoop = Dynarmic::HaltReason::UserDefined2; +constexpr Dynarmic::HaltReason SupervisorCall = Dynarmic::HaltReason::UserDefined3; +constexpr Dynarmic::HaltReason InstructionBreakpoint = Dynarmic::HaltReason::UserDefined4; +constexpr Dynarmic::HaltReason PrefetchAbort = Dynarmic::HaltReason::UserDefined6; + +constexpr HaltReason TranslateHaltReason(Dynarmic::HaltReason hr) { + static_assert(static_cast<u64>(HaltReason::StepThread) == static_cast<u64>(StepThread)); + static_assert(static_cast<u64>(HaltReason::DataAbort) == static_cast<u64>(DataAbort)); + static_assert(static_cast<u64>(HaltReason::BreakLoop) == static_cast<u64>(BreakLoop)); + static_assert(static_cast<u64>(HaltReason::SupervisorCall) == static_cast<u64>(SupervisorCall)); + static_assert(static_cast<u64>(HaltReason::InstructionBreakpoint) == + static_cast<u64>(InstructionBreakpoint)); + static_assert(static_cast<u64>(HaltReason::PrefetchAbort) == static_cast<u64>(PrefetchAbort)); + + return static_cast<HaltReason>(hr); +} + +} // namespace Core |