Exemplo n.º 1
0
        /// <summary>
        /// Compares operands.
        /// </summary>
        public void Compare(CompareFunction function, [NotNull] Operand src1, [NotNull] Operand src2, [NotNull] Operand dst)
        {
            if (!src2.Equals(src1) || src1.IsArray)
            {
                throw new ArgumentException("Compare requires operands to be the same and not array.");
            }

            if (dst.Format != PinFormat.Bool || dst.ArraySize != Pin.NotArray)
            {
                throw new ArgumentException("Destination must be boolean.");
            }

            compiler.Compare(function, src1.Name, src2.Name, dst.Name);
        }