|
| ckheight | |||||||
| · Operation | Check the height of the stack | ||||||
| · Format |
| ||||||
| · Direct Format |
| ||||||
| · Forms | ckheight = 64 (0x40) | ||||||
| · Description | Check that the stack has at least 8 words of space available for pushing values. | ||||||
| · Notes | This instruction is used at the start of a method to
check that that there is sufficient stack space to hold the
local variables and temporary stack values used by the method. The opcode is followed by 4 zero bytes so that this instruction has the same length as ckheight_n. This makes it easier to back-patch the height after translating the method. | ||||||
| · Exceptions | System.StackOverflowException -- Raised if
there is insufficient space available on the stack. |
| ckheight_n | ||||
| · Operation | Check the height of the stack for N words of available space | |||
| · Format |
| |||
| · Direct Format |
| |||
| · Forms | ckheight_n = 65 (0x41) | |||
| · Description | Check that the stack has at least N words of space available for pushing values. | |||
| · Notes | This instruction is used at the start of a method to check that that there is sufficient stack space to hold the local variables and temporary stack values used by the method. | |||
| · Exceptions | System.StackOverflowException -- Raised if
there is insufficient space available on the stack. |
| dup | |||
| · Operation | Duplicate the top of stack | ||
| · Format |
| ||
| · Direct Format |
| ||
| · Forms | dup = 56 (0x38) | ||
| · Stack | ..., value => ..., value, value | ||
| · Description | Pop the single-word value from the stack, and then push it twice. |
| dup2 | |||
| · Operation | Duplicate the top two stack words | ||
| · Format |
| ||
| · Direct Format |
| ||
| · Forms | dup2 = 57 (0x39) | ||
| · Stack | ..., value1, value2 => ..., value1, value2, value1, value2 | ||
| · Description | Pop the words value1 and value2 from the stack and then push them twice. |
| dup_n | ||||||||
| · Operation | Duplicate the top N stack words | |||||||
| · Format |
| |||||||
| · Direct Format |
| |||||||
| · Forms | dup_n = 58 (0x3A) | |||||||
| · Stack | ..., value1, ..., valueN => ..., value1, ..., valueN, value1, ..., valueN | |||||||
| · Description | Pop the top N words from the stack and then push them twice. | |||||||
| · Notes | This is typically used for value type instances that are larger than 2 words in size. |
| dup_word_n | ||||||||
| · Operation | Duplicate a stack word that is N words down the stack | |||||||
| · Format |
| |||||||
| · Direct Format |
| |||||||
| · Forms | dup_word_n = 59 (0x3B) | |||||||
| · Stack | ..., value, word1, ..., wordN => ..., value, word1, ..., wordN, value | |||||||
| · Description | Retrieve the value that is N words down the stack and push it onto the top of the stack. |
| local_alloc | ||||
| · Operation | Allocate local stack space | |||
| · Format |
| |||
| · Direct Format |
| |||
| · Forms | local_alloc = 255, 92 (0xFF, 0x5C) | |||
| · Stack | ..., size => ..., pointer | |||
| · Description | Pop size from the stack as type uint,
and then push a pointer to a block of memory of size bytes
in size. | |||
| · Notes | The block is not expected to last beyond the lifetime of the current method, but implementations may allocate longer-term memory if it is difficult to do direct stack allocation. | |||
| · Exceptions | System.OutOfMemoryException -- Raised if
there is insufficient memory to allocate the block. |
| pop | |||
| · Operation | Pop the top-most word from the stack | ||
| · Format |
| ||
| · Direct Format |
| ||
| · Forms | pop = 60 (0x3C) | ||
| · Stack | ..., value => ... | ||
| · Description | Pop the single-word value from the stack. |
| pop2 | |||
| · Operation | Pop the top two words from the stack | ||
| · Format |
| ||
| · Direct Format |
| ||
| · Forms | pop2 = 61 (0x3D) | ||
| · Stack | ..., value1, value2 => ... | ||
| · Description | Pop the two stack words value1 and value2 from the stack. |
| pop_n | ||||||||
| · Operation | Pop the top N words from the stack | |||||||
| · Format |
| |||||||
| · Direct Format |
| |||||||
| · Forms | pop_n = 62 (0x3E) | |||||||
| · Stack | ..., value1, ..., valueN => ... | |||||||
| · Description | Pop the top N stack words from the stack. |
| squash | ||||||||||
| · Operation | Squash a number of words out of the stack | |||||||||
| · Format |
| |||||||||
| · Direct Format |
| |||||||||
| · Forms | squash = 63 (0x3F) | |||||||||
| · Stack | ..., word1, ..., wordM, value1, ..., valueN => ..., value1, ..., valueN | |||||||||
| · Description | Remove the M words from the stack, N words down the stack. |
Copyright © Southern
Storm Software Pty Ltd 2002
Licensed under GNU FDL