Example #1
0
        public static Operand EmitSoftFloatCallDefaultFpscr(
            ArmEmitterContext context,
            _F32_F32_F32_Bool f32,
            _F64_F64_F64_Bool f64,
            params Operand[] callArgs)
        {
            IOpCodeSimd op = (IOpCodeSimd)context.CurrOp;

            Delegate dlg = (op.Size & 1) == 0 ? (Delegate)f32 : (Delegate)f64;

            Array.Resize(ref callArgs, callArgs.Length + 1);
            callArgs[callArgs.Length - 1] = Const(1);

            return(context.Call(dlg, callArgs));
        }
Example #2
0
        private static void EmitCmpOpF32(
            ArmEmitterContext context,
            _F32_F32_F32_Bool f32,
            _F64_F64_F64_Bool f64,
            bool zero)
        {
            Operand one = Const(1);

            if (zero)
            {
                EmitVectorUnaryOpF32(context, (m) =>
                {
                    OperandType type = m.Type;

                    if (type == OperandType.FP64)
                    {
                        return(context.Call(f64, m, ConstF(0.0), one));
                    }
                    else
                    {
                        return(context.Call(f32, m, ConstF(0.0f), one));
                    }
                });
            }
            else
            {
                EmitVectorBinaryOpF32(context, (n, m) =>
                {
                    OperandType type = n.Type;

                    if (type == OperandType.FP64)
                    {
                        return(context.Call(f64, n, m, one));
                    }
                    else
                    {
                        return(context.Call(f32, n, m, one));
                    }
                });
            }
        }