Format | Assembly Format | Description |
---|---|---|
FE 18 | initblk |
Set all bytes in a block of memory to a given byte value. |
…, addr, value, size → …
The initblk
instruction sets size (of type unsigned int32
) bytes starting at addr (of type native int
, or &
) to value (of type unsigned int8
). initblk
assumes that addr is aligned to the natural size of the machine (but see the unaligned.
prefix instruction).
[Rationale: initblk
is intended for initializing structures (rather than arbitrary byte-runs). All such structures, allocated by the CLI, are naturally aligned for the current platform. Therefore, there is no need for the compiler that generates initblk
instructions to be aware of whether the code will eventually execute on a 32-bit or 64-bit platform. end rationale]
The operation of the initblk
instructions can be altered by an immediately preceding volatile.
or unaligned.
prefix instruction.
System.NullReferenceException
can be thrown if an invalid address is detected.
Correct CIL code ensures the restrictions specified above.
The initblk
instruction is never verifiable.