A32: Implement Thumb-1 variant of SEV

This commit is contained in:
Lioncash 2019-05-03 10:43:39 -04:00 committed by MerryMage
parent 07699b47ba
commit 57675fe592
3 changed files with 10 additions and 0 deletions

View file

@ -89,6 +89,7 @@ std::optional<std::reference_wrapper<const Thumb16Matcher<V>>> DecodeThumb16(u16
// Hint instructions // Hint instructions
INST(&V::thumb16_NOP, "NOP", "1011111100000000"), // v6T2 INST(&V::thumb16_NOP, "NOP", "1011111100000000"), // v6T2
INST(&V::thumb16_SEV, "SEV", "1011111101000000"), // v7
// Miscellaneous 16-bit instructions // Miscellaneous 16-bit instructions
INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6 INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6

View file

@ -250,6 +250,10 @@ public:
return "nop"; return "nop";
} }
std::string thumb16_SEV() {
return "sev";
}
std::string thumb16_SXTH(Reg m, Reg d) { std::string thumb16_SXTH(Reg m, Reg d) {
return fmt::format("sxth {}, {}", d, m); return fmt::format("sxth {}, {}", d, m);
} }

View file

@ -679,6 +679,11 @@ struct ThumbTranslatorVisitor final {
return true; return true;
} }
// SEV<c>
bool thumb16_SEV() {
return RaiseException(Exception::SendEvent);
}
// SXTH <Rd>, <Rm> // SXTH <Rd>, <Rm>
// Rd cannot encode R15. // Rd cannot encode R15.
bool thumb16_SXTH(Reg m, Reg d) { bool thumb16_SXTH(Reg m, Reg d) {