From 8a33e884f8f482e93e2b90380b158c1417cc50f8 Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Thu, 17 Dec 2020 20:43:41 +0100 Subject: Fix Vnmls_S fast path (F64: losing input d value). Fix Vnmla_S & Vnmls_S slow paths (using fused inst.s). Fix Vfma_V slow path not using StandardFPSCRValue(). (#1775) * Fix Vnmls_S fast path (F64: losing input d value). Fix Vnmla_S & Vnmls_S slow paths (using fused inst.s). Add Vfma_S & Vfms_S Fma fast paths. Add Vfnma_S inst. with Fma/Sse fast paths and slow path. Add Vfnms_S Sse fast path. Add Tests for affected inst.s. Nits. * InternalVersion = 1775 * Nits. * Fix Vfma_V slow path not using StandardFPSCRValue(). * Nit: Fix Vfma_V order. * Add Vfms_V Sse fast path and slow path. * Add Vfma_V and Vfms_V Test. --- ARMeilleure/CodeGen/X86/CodeGenerator.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'ARMeilleure/CodeGen/X86/CodeGenerator.cs') diff --git a/ARMeilleure/CodeGen/X86/CodeGenerator.cs b/ARMeilleure/CodeGen/X86/CodeGenerator.cs index 29a4cd78..5f41ff79 100644 --- a/ARMeilleure/CodeGen/X86/CodeGenerator.cs +++ b/ARMeilleure/CodeGen/X86/CodeGenerator.cs @@ -440,9 +440,12 @@ namespace ARMeilleure.CodeGen.X86 else { EnsureSameReg(dest, src1); + Debug.Assert(src3.GetRegister().Index == 0); + context.Assembler.WriteInstruction(info.Inst, dest, src1, src2); } + break; } @@ -474,11 +477,16 @@ namespace ARMeilleure.CodeGen.X86 Operand src2 = operation.GetSource(1); Operand src3 = operation.GetSource(2); - EnsureSameType(dest, src1, src2, src3); - EnsureSameReg(dest, src1); - Debug.Assert(!dest.Type.IsInteger()); Debug.Assert(HardwareCapabilities.SupportsVexEncoding); + Debug.Assert(dest.Kind == OperandKind.Register && src1.Kind == OperandKind.Register && src2.Kind == OperandKind.Register); + Debug.Assert(src3.Kind == OperandKind.Register || src3.Kind == OperandKind.Memory); + + EnsureSameType(dest, src1, src2, src3); + Debug.Assert(dest.Type == OperandType.V128); + + Debug.Assert(dest.Value == src1.Value); + context.Assembler.WriteInstruction(info.Inst, dest, src2, src3); break; -- cgit v1.2.3