mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-10 08:28:07 +01:00
thumb32: Implement MLA
This commit is contained in:
parent
153d87c843
commit
cf5058bccb
3 changed files with 16 additions and 1 deletions
|
|
@ -7,6 +7,20 @@
|
|||
|
||||
namespace Dynarmic::A32 {
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_MLA(Reg n, Reg a, Reg d, Reg m) {
|
||||
if (d == Reg::PC || n == Reg::PC || m == Reg::PC) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
const auto reg_a = ir.GetRegister(a);
|
||||
const auto reg_m = ir.GetRegister(m);
|
||||
const auto reg_n = ir.GetRegister(n);
|
||||
const auto result = ir.Add(ir.Mul(reg_n, reg_m), reg_a);
|
||||
|
||||
ir.SetRegister(d, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_MUL(Reg n, Reg d, Reg m) {
|
||||
if (d == Reg::PC || n == Reg::PC || m == Reg::PC) {
|
||||
return UnpredictableInstruction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue