diff --git a/src/frontend/A32/decoder/thumb16.h b/src/frontend/A32/decoder/thumb16.h index 6fddedd9..a063ff78 100644 --- a/src/frontend/A32/decoder/thumb16.h +++ b/src/frontend/A32/decoder/thumb16.h @@ -87,6 +87,9 @@ std::optional>> DecodeThumb16(u16 INST(&V::thumb16_ADD_sp_t2, "ADD (SP plus imm, T2)", "101100000vvvvvvv"), // v4T INST(&V::thumb16_SUB_sp, "SUB (SP minus imm)", "101100001vvvvvvv"), // v4T + // Hint instructions + INST(&V::thumb16_NOP, "NOP", "1011111100000000"), // v6T2 + // Miscellaneous 16-bit instructions INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6 INST(&V::thumb16_SXTB, "SXTB", "1011001001mmmddd"), // v6 diff --git a/src/frontend/A32/disassembler/disassembler_thumb.cpp b/src/frontend/A32/disassembler/disassembler_thumb.cpp index 9ed44da0..2ae57711 100644 --- a/src/frontend/A32/disassembler/disassembler_thumb.cpp +++ b/src/frontend/A32/disassembler/disassembler_thumb.cpp @@ -246,6 +246,10 @@ public: return fmt::format("sub sp, sp, #{}", imm32); } + std::string thumb16_NOP() { + return "nop"; + } + 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 e940184a..31ef1c94 100644 --- a/src/frontend/A32/translate/translate_thumb.cpp +++ b/src/frontend/A32/translate/translate_thumb.cpp @@ -667,6 +667,11 @@ struct ThumbTranslatorVisitor final { return true; } + // NOP + bool thumb16_NOP() { + return true; + } + // SXTH , // Rd cannot encode R15. bool thumb16_SXTH(Reg m, Reg d) {