Exemplo n.º 1
0
        /// <summary>
        /// A simply move operation (e.g. a copy).
        /// </summary>
        /// <param name="inOp">An input operand.</param>
        /// <param name="outOp">Copy destination.</param>
        public void Mov(Operand inOp, Operand outOp)
        {
            if (!inOp.Equals(outOp) || !outOp.IsWritable)
            {
                throw new IncompatibleOperandsException("Mov operation requires both operands " +
                                                        "to be the same and destination must be writable.");
            }

            // There is no constant (no op operation) on those (driver may create it a no-op
            // operation but since outOp is not constant, we must move it).
            compiler.Mov(inOp.Name, outOp.Name);
        }