diff options
author | Lioncash <mathew1800@gmail.com> | 2015-07-28 05:45:24 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2015-07-28 08:27:57 +0200 |
commit | 89540ea7618fbaca1c9cd332b24aff7f2865d324 (patch) | |
tree | d5e25da76e20be36e3016beb363b2c25071d9c36 /src/core/arm/dyncom/arm_dyncom_thumb.h | |
parent | dyncom: Remove code duplication regarding thumb instructions (diff) | |
download | yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar.gz yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar.bz2 yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar.lz yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar.xz yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.tar.zst yuzu-89540ea7618fbaca1c9cd332b24aff7f2865d324.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom_thumb.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.h b/src/core/arm/dyncom/arm_dyncom_thumb.h index 74e69e13a..447974363 100644 --- a/src/core/arm/dyncom/arm_dyncom_thumb.h +++ b/src/core/arm/dyncom/arm_dyncom_thumb.h @@ -28,14 +28,15 @@ #include "common/common_types.h" -enum tdstate { - t_undefined, // Undefined Thumb instruction - t_decoded, // Instruction decoded to ARM equivalent - t_branch, // Thumb branch (already processed) - t_uninitialized, +enum class ThumbDecodeStatus { + UNDEFINED, // Undefined Thumb instruction + DECODED, // Instruction decoded to ARM equivalent + BRANCH, // Thumb branch (already processed) + UNINITIALIZED, }; -tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size); +// Translates a Thumb mode instruction into its ARM equivalent. +ThumbDecodeStatus TranslateThumbInstruction(u32 addr, u32 instr, u32* ainstr, u32* inst_size); static inline u32 GetThumbInstruction(u32 instr, u32 address) { // Normally you would need to handle instruction endianness, |