Example #1
0
        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));
        }
Example #3
0
        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));
        }
Example #4
0
        private static Operand[] GetHfmaSrcA(EmitterContext context)
        {
            IOpCodeHfma op = (IOpCodeHfma)context.CurrOp;

            return(GetHalfSources(context, GetSrcA(context), op.SwizzleA));
        }