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.cpp | |
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 'src/core/arm/dyncom/arm_dyncom_thumb.cpp')
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom_thumb.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.cpp b/src/core/arm/dyncom/arm_dyncom_thumb.cpp index 6eb03fb5a..29272fd5d 100644 --- a/src/core/arm/dyncom/arm_dyncom_thumb.cpp +++ b/src/core/arm/dyncom/arm_dyncom_thumb.cpp @@ -12,8 +12,8 @@ // with the following Thumb instruction held in the high 16-bits. Passing in two Thumb instructions // allows easier simulation of the special dual BL instruction. -tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { - tdstate valid = t_uninitialized; +ThumbDecodeStatus TranslateThumbInstruction(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { + ThumbDecodeStatus valid = ThumbDecodeStatus::UNINITIALIZED; u32 tinstr = GetThumbInstruction(instr, addr); *ainstr = 0xDEADC0DE; // Debugging to catch non updates @@ -351,21 +351,21 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { else *ainstr |= (tinstr & 0x00FF); } else if ((tinstr & 0x0F00) != 0x0E00) - valid = t_branch; + valid = ThumbDecodeStatus::BRANCH; else // UNDEFINED : cc=1110(AL) uses different format - valid = t_undefined; + valid = ThumbDecodeStatus::UNDEFINED; break; case 28: // B - valid = t_branch; + valid = ThumbDecodeStatus::BRANCH; break; case 29: - if(tinstr & 0x1) - valid = t_undefined; + if (tinstr & 0x1) + valid = ThumbDecodeStatus::UNDEFINED; else - valid = t_branch; + valid = ThumbDecodeStatus::BRANCH; break; case 30: // BL instruction 1 @@ -374,7 +374,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { // simulation simple (from the user perspective) we check if the following instruction is // the second half of this BL, and if it is we simulate it immediately - valid = t_branch; + valid = ThumbDecodeStatus::BRANCH; break; case 31: // BL instruction 2 @@ -383,7 +383,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { // ever be matched with the fmt19 "BL instruction 1" instruction. However, we do allow the // simulation of it on its own, with undefined results if r14 is not suitably initialised. - valid = t_branch; + valid = ThumbDecodeStatus::BRANCH; break; } |