diff --git a/src/frontend/A32/decoder/thumb16.h b/src/frontend/A32/decoder/thumb16.h index 934e4c80..cdc6834e 100644 --- a/src/frontend/A32/decoder/thumb16.h +++ b/src/frontend/A32/decoder/thumb16.h @@ -92,6 +92,7 @@ std::optional>> DecodeThumb16(u16 INST(&V::thumb16_SEV, "SEV", "1011111101000000"), // v7 INST(&V::thumb16_WFE, "WFE", "1011111100100000"), // v7 INST(&V::thumb16_WFI, "WFI", "1011111100110000"), // v7 + INST(&V::thumb16_YIELD, "YIELD", "1011111100010000"), // v7 // Miscellaneous 16-bit instructions INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6 diff --git a/src/frontend/A32/disassembler/disassembler_thumb.cpp b/src/frontend/A32/disassembler/disassembler_thumb.cpp index 12aa0238..a496abc2 100644 --- a/src/frontend/A32/disassembler/disassembler_thumb.cpp +++ b/src/frontend/A32/disassembler/disassembler_thumb.cpp @@ -262,6 +262,10 @@ public: return "wfi"; } + std::string thumb16_YIELD() { + return "yield"; + } + std::string thumb16_SXTH(Reg m, Reg d) { return fmt::format("sxth {}, {}", d, m); } diff --git a/src/frontend/A32/translate/translate_thumb.cpp b/src/frontend/A32/translate/translate_thumb.cpp index bdefe327..9ecadbfa 100644 --- a/src/frontend/A32/translate/translate_thumb.cpp +++ b/src/frontend/A32/translate/translate_thumb.cpp @@ -694,6 +694,11 @@ struct ThumbTranslatorVisitor final { return RaiseException(Exception::WaitForInterrupt); } + // YIELD + bool thumb16_YIELD() { + return RaiseException(Exception::Yield); + } + // SXTH , // Rd cannot encode R15. bool thumb16_SXTH(Reg m, Reg d) {