|
break | ||||
· Operation | Mark the position of a breakpoint | |||
· Format |
| |||
· Direct Format |
| |||
· Forms | break = 254 (0xFE) | |||
· Description | This instruction marks a position in the
CVM bytecode that may be used as a breakpoint in
debug versions of the runtime engine. Every potentional position for a breakpoint is marked, even if those positions will never have active breakpoints set on them. The runtime engine keeps a list of active breakpoints, which is inspected at each potentional breakpoint. |
ldtoken | ||||
· Operation | Load a token pointer onto the stack | |||
· Format |
| |||
· Direct Format |
| |||
· Forms | ldtoken = 234 (0xEA) | |||
· Stack | ... => ..., pointer | |||
· Description | Push pointer onto the stack as a
ptr value. | |||
· Notes | The pointer value is a native pointer to the token
descriptor, which may 32 or 64 bits in size. This instruction is used to load type, field, and method descriptors onto the stack as handle instances. |
memcpy | ||||||||
· Operation | Copy a fixed-size block of non-overlapping memory | |||||||
· Format |
| |||||||
· Direct Format |
| |||||||
· Forms | memcpy = 237 (0xED) | |||||||
· Stack | ..., dest, src => ... | |||||||
· Description | Pop dest and src from the stack as type
ptr . Copy N bytes of memory from src
to dest. | |||||||
· Notes | It is assumed that the source and destination regions do
not overlap. This instruction is typically used to copy value type instances from one location to another. Use memmove for overlapping memory regions, and for regions that do not have a fixed size. |
memmove | |||
· Operation | Move a block of memory | ||
· Format |
| ||
· Direct Format |
| ||
· Forms | memmove = 238 (0xEE) | ||
· Stack | ..., dest, src, length => ... | ||
· Description | Pop dest, src, and length
from the stack as the types ptr , ptr ,
and uint32 respectively. Move length bytes
of memory from src to dest. | ||
· Notes | If the source and destination regions overlap, this instruction will guarantee to produce the correct result. |
memset | |||
· Operation | Fill a block of memory with a byte value | ||
· Format |
| ||
· Direct Format |
| ||
· Forms | memset = 240 (0xF0) | ||
· Stack | ..., dest, value, length => ... | ||
· Description | Pop dest, value, and length
from the stack as the types ptr , int32 ,
and uint32 . Fill length bytes of memory at
dest with value. |
memzero | ||||||||
· Operation | Fill a fixed-size block of memory with zeroes | |||||||
· Format |
| |||||||
· Direct Format |
| |||||||
· Forms | memzero = 239 (0xEF) | |||||||
· Stack | ..., dest => ... | |||||||
· Description | Pop dest from the stack as type
ptr . Fill N bytes of memory at dest
with zero bytes. | |||||||
· Notes | This instruction is typically used to initialize value type
instances. Use memset if the region does not have a fixed size, or the fill value is something other than zero. |
nop | |||
· Operation | Do nothing | ||
· Format |
| ||
· Direct Format |
| ||
· Forms | nop = 0 (0x00) | ||
· Description | Do nothing. |
prefix | |||||
· Operation | Prefix an alternative instruction | ||||
· Format |
| ||||
· Forms | prefix = 255, 255 (0xFF, 0xFF) | ||||
· Description | The prefix instruction is used to switch the runtime engine into an alternative instruction set. The alternative instruction is opcode. Prefixing is necessary because the VM has more than 256 distinct instructions. | ||||
· Notes | There is no direct format for this instruction, because prefix is not required for the direct encoding. |
unroll_method | |||
· Operation | Mark a method for unrolling | ||
· Direct Format |
| ||
· Forms | unroll_method = 255, 83 (0xFF, 0x53) | ||
· Description | The unroll_method instruction is
used in direct code to trigger native code unrolling.
Unrolling converts fragments of the method into native code for the underlying CPU, to speed up execution. | ||
· Notes | There is no bytecode format for this
instruction, because unrolling is not possible
with the bytecode encoding. In a method that can support unrolling, the nop instruction is used to mark a label, so that the unroller can process labels in a single translation pass. The prefix instruction is used to mark the end of the method's code, so that the unroller knows where to stop. |
wide | |||||
· Operation | Modify an instruction to its wide form | ||||
· Format |
| ||||
· Forms | wide = 253 (0xFD) | ||||
· Description | The wide instruction modifies another instruction to take longer operands. The format of the operands depends upon the opcode. | ||||
· Notes | The documentation for other instructions includes
information on their wide forms where appropriate. There is no direct format for this instruction, because wide is not required for the direct encoding. |
Copyright © Southern
Storm Software Pty Ltd 2002
Licensed under GNU FDL