|
beq | |||||||||||||||
· Operation | Branch conditionally if int32 values
are equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | beq = 162 (0xA2) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If the values are equal,
then the program branches to pc + offset. Otherwise,
the program continues with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with br_peq.
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
bge | |||||||||||||||
· Operation | Branch conditionally if int32 values
are greater than or equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | bge = 170 (0xAA) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If value1 is greater
than or equal to value2, then the program branches to
pc + offset. Otherwise, the program continues with the
next instruction. |
bge_un | |||||||||||||||
· Operation | Branch conditionally if uint32 values
are greater than or equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | bge_un = 171 (0xAB) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type uint32. If value1 is greater than or equal to value2, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. |
bgt | |||||||||||||||
· Operation | Branch conditionally if int32 values
are greater than | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | bgt = 168 (0xA8) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If value1 is greater
than value2, then the program branches to pc + offset.
Otherwise, the program continues with the next instruction. |
bgt_un | |||||||||||||||
· Operation | Branch conditionally if uint32 values
are greater than | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | bgt_un = 169 (0xA9) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type uint32. If value1 is greater than value2, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. |
ble | |||||||||||||||
· Operation | Branch conditionally if int32 values
are less than or equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | ble = 166 (0xA6) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If value1 is less
than or equal to value2, then the program branches to
pc + offset. Otherwise, the program continues with the
next instruction. |
ble_un | |||||||||||||||
· Operation | Branch conditionally if uint32 values
are less than or equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | ble_un = 167 (0xA7) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type uint32. If value1 is less than or equal to value2, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. |
blt | |||||||||||||||
· Operation | Branch conditionally if int32 values
are less than | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | blt = 164 (0xA4) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If value1 is less
than value2, then the program branches to pc + offset.
Otherwise, the program continues with the next instruction. |
blt_un | |||||||||||||||
· Operation | Branch conditionally if uint32 values
are less than | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | blt_un = 165 (0xA5) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type uint32. If value1 is less than value2, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. |
bne | |||||||||||||||
· Operation | Branch conditionally if int32 values
are not equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | bne = 163 (0xA3) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped
from the stack as type int32 . If the values are not equal,
then the program branches to pc + offset. Otherwise,
the program continues with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with br_pne.
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
br | |||||||||||||||
· Operation | Branch unconditionally | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | br = 161 (0xA1) | ||||||||||||||
· Stack | ... => ... | ||||||||||||||
· Description | In the first form, the program branches to the
address pc + offset, where pc is the address of
the first byte of the br instruction, and offset
is a signed 8-bit quantity. In the second form, offset is constructed by interpreting offset1, ..., offset4 as a 32-bit signed quantity in little-endian order. | ||||||||||||||
· Notes | Branch instructions are always 6 bytes long, but may contain either short or long forms of a branch. The short form is always "opcode offset pad" where offset is an 8-bit offset and pad is 4 bytes of padding. The long form is always "br.long opcode loffset" where loffset is a 32-bit offset. This allows the code generator to output branch instructions with a uniform length, while the interpreter runs faster on short branches. |
br_long | |||||
· Operation | Modify a branch instruction to its long form | ||||
· Format |
| ||||
· Forms | br_long = 178 (0xB2) | ||||
· Description | The br_long instruction modifies a branch instruction to take longer operands. | ||||
· Notes | The documentation for other branch instructions includes
information on their long forms. There is no direct format for this instruction, because br_long is not required for the direct encoding. |
br_peq | |||||||||||||||
· Operation | Branch conditionally if ptr values
are equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | br_peq = 176 (0xB0) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type ptr. If the values are equal, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with beq.
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
br_pne | |||||||||||||||
· Operation | Branch conditionally if ptr values
are not equal | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | br_pne = 177 (0xB1) | ||||||||||||||
· Stack | ..., value1, value2 => ... | ||||||||||||||
· Description | Both value1 and value2 are popped from the stack as type ptr. If the values are not equal, then the program branches to pc + offset. Otherwise, the program continues with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with bne.
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
brfalse | |||||||||||||||
· Operation | Branch conditionally if int32 value
is zero | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | brfalse = 173 (0xAD) | ||||||||||||||
· Stack | ..., value => ... | ||||||||||||||
· Description | The value is popped from the stack as type
int32 . If value is zero, then the program branches
to pc + offset. Otherwise, the program continues with the
next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with brnull .
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
brnonnull | |||||||||||||||
· Operation | Branch conditionally if ptr value
is not null | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | brnonnull = 175 (0xAF) | ||||||||||||||
· Stack | ..., value => ... | ||||||||||||||
· Description | The value is popped from the stack as type
ptr. If value is not null , then the program
branches to pc + offset. Otherwise, the program continues
with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with brtrue .
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
brnull | |||||||||||||||
· Operation | Branch conditionally if ptr value
is null | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | brnull = 174 (0xAE) | ||||||||||||||
· Stack | ..., value => ... | ||||||||||||||
· Description | The value is popped from the stack as type
ptr. If value is null , then the program
branches to pc + offset. Otherwise, the program continues
with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with brfalse .
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
brtrue | |||||||||||||||
· Operation | Branch conditionally if int32 value
is non-zero | ||||||||||||||
· Format |
| ||||||||||||||
· Direct Format |
| ||||||||||||||
· Forms | brtrue = 172 (0xAC) | ||||||||||||||
· Stack | ..., value => ... | ||||||||||||||
· Description | The value is popped from the stack as type
int32 . If value is non-zero, then the program
branches to pc + offset. Otherwise, the program continues
with the next instruction. | ||||||||||||||
· Notes | This instruction must not be confused with brnonnull .
Values of type int32 and ptr do not
necessarily occupy the same amount of space in a stack word on
all platforms. |
switch | ||||||
· Operation | Switch on uint32 value | |||||
· Format |
| |||||
· Direct Format |
| |||||
· Forms | switch = 179 (0xB3) | |||||
· Stack | ..., value => ... | |||||
· Description | The value is popped from the stack as
type uint32 . If it is greater than or equal to
max, then the program continues at pc + defoffset.
Otherwise, the 32-bit signed value at pc + 9 + value * 4
is fetched and added to pc. | |||||
· Notes | The max value is an unsigned 32-bit value, and the defoffset is a signed 32-bit value. All 32-bit values are in little-endian byte order. |
Copyright © Southern
Storm Software Pty Ltd 2002
Licensed under GNU FDL