Exemple #1
0
        public static void Pset(EmitterContext context)
        {
            OpCodePset op = (OpCodePset)context.CurrOp;

            bool boolFloat = op.RawOpCode.Extract(44);

            Operand srcA = context.BitwiseNot(Register(op.Predicate12), op.InvertA);
            Operand srcB = context.BitwiseNot(Register(op.Predicate29), op.InvertB);
            Operand srcC = context.BitwiseNot(Register(op.Predicate39), op.InvertP);

            Operand res = GetPredLogicalOp(context, op.LogicalOpAB, srcA, srcB);

            res = GetPredLogicalOp(context, op.LogicalOp, res, srcC);

            Operand dest = GetDest(context);

            if (boolFloat)
            {
                context.Copy(dest, context.ConditionalSelect(res, ConstF(1), Const(0)));
            }
            else
            {
                context.Copy(dest, res);
            }
        }
Exemple #2
0
        public static void Csetp(EmitterContext context)
        {
            OpCodePset op = (OpCodePset)context.CurrOp;

            // TODO: Implement that properly

            Operand p0Res = Const(IrConsts.True);

            Operand p1Res = context.BitwiseNot(p0Res);

            Operand pred = GetPredicate39(context);

            p0Res = GetPredLogicalOp(context, op.LogicalOp, p0Res, pred);
            p1Res = GetPredLogicalOp(context, op.LogicalOp, p1Res, pred);

            context.Copy(Register(op.Predicate3), p0Res);
            context.Copy(Register(op.Predicate0), p1Res);
        }
Exemple #3
0
        public static void Psetp(EmitterContext context)
        {
            OpCodePset op = (OpCodePset)context.CurrOp;

            Operand srcA = context.BitwiseNot(Register(op.Predicate12), op.InvertA);
            Operand srcB = context.BitwiseNot(Register(op.Predicate29), op.InvertB);

            Operand p0Res = GetPredLogicalOp(context, op.LogicalOpAB, srcA, srcB);

            Operand p1Res = context.BitwiseNot(p0Res);

            Operand pred = GetPredicate39(context);

            p0Res = GetPredLogicalOp(context, op.LogicalOp, p0Res, pred);
            p1Res = GetPredLogicalOp(context, op.LogicalOp, p1Res, pred);

            context.Copy(Register(op.Predicate3), p0Res);
            context.Copy(Register(op.Predicate0), p1Res);
        }