A32: Implement ARM-mode SDIV/UDIV

Now that we have Unicorn in place, we can freely implement instructions
introduced in newer versions of the ARM architecture.
This commit is contained in:
Lioncash
2019-04-20 08:06:18 -04:00
committed by MerryMage
parent d4a531c21f
commit b2f7a0e7ba
6 changed files with 77 additions and 0 deletions

View File

@@ -634,6 +634,14 @@ public:
return fmt::format("usat16{} {}, #{}, {}", CondToString(cond), d, sat_imm, n);
}
// Divide instructions
std::string arm_SDIV(Cond cond, Reg d, Reg m, Reg n) {
return fmt::format("sdiv{} {}, {}, {}", CondToString(cond), d, n, m);
}
std::string arm_UDIV(Cond cond, Reg d, Reg m, Reg n) {
return fmt::format("udiv{} {}, {}, {}", CondToString(cond), d, n, m);
}
// Multiply (Normal) instructions
std::string arm_MLA(Cond cond, bool S, Reg d, Reg a, Reg m, Reg n) {
return fmt::format("mla{}{} {}, {}, {}, {}", S ? "s" : "", CondToString(cond), d, n, m, a);