private static Operand[] GetHfmaSrcC(EmitterContext context) { IOpCodeHfma op = (IOpCodeHfma)context.CurrOp; Operand[] operands = GetHalfSources(context, GetSrcC(context), op.SwizzleC); return(FPAbsNeg(context, operands, false, op.NegateC)); }
private static Operand[] GetHfmaSrcB(EmitterContext context) { IOpCodeHfma op = (IOpCodeHfma)context.CurrOp; Operand[] operands = GetHalfUnpacked(context, GetSrcB(context), op.SwizzleB); return(FPAbsNeg(context, operands, false, op.NegateB)); }
public static void Hfma2(EmitterContext context) { IOpCodeHfma op = (IOpCodeHfma)context.CurrOp; Operand[] srcA = GetHfmaSrcA(context); Operand[] srcB = GetHfmaSrcB(context); Operand[] srcC = GetHfmaSrcC(context); Operand[] res = new Operand[2]; for (int index = 0; index < res.Length; index++) { res[index] = context.FPFusedMultiplyAdd(srcA[index], srcB[index], srcC[index]); res[index] = context.FPSaturate(res[index], op.Saturate); } context.Copy(GetDest(context), GetHalfPacked(context, res)); }
private static Operand[] GetHfmaSrcA(EmitterContext context) { IOpCodeHfma op = (IOpCodeHfma)context.CurrOp; return(GetHalfSources(context, GetSrcA(context), op.SwizzleA)); }