aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitMul32.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2020-10-13 22:41:33 +0200
committerGitHub <noreply@github.com>2020-10-13 22:41:33 +0200
commit04e330cc004add7550eef8361cd490fac99255e2 (patch)
tree3383f357cb61b5ba7b0b304d0d9d89c197c21050 /ARMeilleure/Instructions/InstEmitMul32.cs
parent329ba5b39b4402d96aea85f1e97dc35f70aadfab (diff)
Add Umaal & Vabd_I, Vabdl_I, Vaddl_I, Vhadd, Vqshrn, Vshll inst.s (slow paths). (#1577)
* Add Umaal & Vabd_I, Vabdl_I, Vaddl_I, Vhadd, Vqshrn, Vshll inst.s (slow paths). No test provided (i.e. draft). * Ptc InternalVersion = 1577
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitMul32.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitMul32.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/ARMeilleure/Instructions/InstEmitMul32.cs b/ARMeilleure/Instructions/InstEmitMul32.cs
index 6714c5fd..454d44a4 100644
--- a/ARMeilleure/Instructions/InstEmitMul32.cs
+++ b/ARMeilleure/Instructions/InstEmitMul32.cs
@@ -283,6 +283,26 @@ namespace ARMeilleure.Instructions
EmitGenericAluStoreA32(context, op.Rd, false, res);
}
+ public static void Umaal(ArmEmitterContext context)
+ {
+ OpCode32AluUmull op = (OpCode32AluUmull)context.CurrOp;
+
+ Operand n = context.ZeroExtend32(OperandType.I64, GetIntA32(context, op.Rn));
+ Operand m = context.ZeroExtend32(OperandType.I64, GetIntA32(context, op.Rm));
+ Operand dHi = context.ZeroExtend32(OperandType.I64, GetIntA32(context, op.RdHi));
+ Operand dLo = context.ZeroExtend32(OperandType.I64, GetIntA32(context, op.RdLo));
+
+ Operand res = context.Multiply(n, m);
+ res = context.Add(res, dHi);
+ res = context.Add(res, dLo);
+
+ Operand hi = context.ConvertI64ToI32(context.ShiftRightUI(res, Const(32)));
+ Operand lo = context.ConvertI64ToI32(res);
+
+ EmitGenericAluStoreA32(context, op.RdHi, false, hi);
+ EmitGenericAluStoreA32(context, op.RdLo, false, lo);
+ }
+
public static void Umlal(ArmEmitterContext context)
{
EmitMlal(context, false);