OpCodes.Cpblk 字段
定义
将指定数目的字节从源地址复制到目标地址。Copies a specified number bytes from a source address to a destination address.
public: static initonly System::Reflection::Emit::OpCode Cpblk;
public static readonly System.Reflection.Emit.OpCode Cpblk;
staticval mutable Cpblk : System.Reflection.Emit.OpCode
Public Shared ReadOnly Cpblk As OpCode
字段值
注解
下表列出了指令的十六进制和 Microsoft 中间语言 (MSIL) 程序集格式,以及简短的参考摘要:The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:
| 格式Format | 程序集格式Assembly Format | 说明Description |
|---|---|---|
| FE 17FE 17 | cpblkcpblk | 将数据从一个内存块复制到另一个内存块。Copy data from one memory block to another. |
堆栈转换行为顺序如下:The stack transitional behavior, in sequential order, is:
目标地址被推送到堆栈上。The destination address is pushed onto the stack.
源地址被推送到堆栈上。The source address is pushed onto the stack.
要复制的字节数将被推送到堆栈上。The number of bytes to copy is pushed onto the stack.
从堆栈中弹出的字节数、源地址和目标地址;指定的字节数从源地址复制到目标地址。The number of bytes, the source address, and the destination address are popped from the stack; the specified number of bytes are copied from the source address to the destination address.
cpblk指令将一个数字 (类型 unsigned int32) 字节从类型、或) 的源地址 (* 复制 native int & 到类型 * 、 native int 或 (的目标地址) & 。The cpblk instruction copies a number (type unsigned int32) of bytes from a source address (of type *, native int, or &) to a destination address (of type *, native int, or &). cpblk如果源区域和目标区域重叠,则的行为是未指定的。The behavior of cpblk is unspecified if the source and destination areas overlap.
cpblk 假设源和目标地址都与计算机的自然大小对齐。cpblk assumes that both the source and destination addressed are aligned to the natural size of the machine. cpblk指令前面可以紧跟 unaligned.<prefix> 指令,以指示源或目标是未对齐的。The cpblk instruction can be immediately preceded by the unaligned.<prefix> instruction to indicate that either the source or the destination is unaligned.
指令的操作 cpblk 可以通过紧靠上 Volatile 或前缀指令来更改 Unaligned 。The operation of the cpblk instruction can be altered by an immediately preceding Volatile or Unaligned prefix instruction.
NullReferenceException 如果检测到无效地址,则可能会引发。NullReferenceException may be thrown if an invalid address is detected.
以下 Emit 方法重载可以使用 cpblk 操作码:The following Emit method overload can use the cpblk opcode: