A32: Implement Thumb-1 variant of YIELD
This commit is contained in:
parent
ebab7ede55
commit
e89ca42048
3 changed files with 10 additions and 0 deletions
|
@ -92,6 +92,7 @@ std::optional<std::reference_wrapper<const Thumb16Matcher<V>>> DecodeThumb16(u16
|
||||||
INST(&V::thumb16_SEV, "SEV", "1011111101000000"), // v7
|
INST(&V::thumb16_SEV, "SEV", "1011111101000000"), // v7
|
||||||
INST(&V::thumb16_WFE, "WFE", "1011111100100000"), // v7
|
INST(&V::thumb16_WFE, "WFE", "1011111100100000"), // v7
|
||||||
INST(&V::thumb16_WFI, "WFI", "1011111100110000"), // v7
|
INST(&V::thumb16_WFI, "WFI", "1011111100110000"), // v7
|
||||||
|
INST(&V::thumb16_YIELD, "YIELD", "1011111100010000"), // v7
|
||||||
|
|
||||||
// Miscellaneous 16-bit instructions
|
// Miscellaneous 16-bit instructions
|
||||||
INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6
|
INST(&V::thumb16_SXTH, "SXTH", "1011001000mmmddd"), // v6
|
||||||
|
|
|
@ -262,6 +262,10 @@ public:
|
||||||
return "wfi";
|
return "wfi";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string thumb16_YIELD() {
|
||||||
|
return "yield";
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -694,6 +694,11 @@ struct ThumbTranslatorVisitor final {
|
||||||
return RaiseException(Exception::WaitForInterrupt);
|
return RaiseException(Exception::WaitForInterrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// YIELD<c>
|
||||||
|
bool thumb16_YIELD() {
|
||||||
|
return RaiseException(Exception::Yield);
|
||||||
|
}
|
||||||
|
|
||||||
// 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) {
|
||||||
|
|
Loading…
Reference in a new issue