Ribbon Bytecode Instruction Set Architecture

This is the canonical instruction set architecture (ISA) definition for the Ribbon virtual machine bytecode.

Overview

Basic layout

The ISA is divided into Categories;

Categories are further divided into Mnemonic bases;

Mnemonics then contain tables describing each concrete instruction variation.

Example

callc and call_v are both under the call mnemonic, within the Control Flow category.

JIT-only Instructions

Instructions with a jit tag above their name are only available when Rvm is compiled with the jit option.

Encoding

We display the encoding of each instruction as segmented bytes. The Ribbon bytecode is always in little endian order, and we display these bytes as they are ordered in memory.

The opcode is shown first, as a two byte hexadecimal number.

Padding bytes are shown as __.

In addition to standard hex characters and underscores, we utilize operand encoding symbology, such as Rx, indicating the first register operand to use. Symbolic operand character sequences will begin with a capital letter, and will be the appropriate width for the operand’s bytes if they were shown in hex form.

Nybbles displayed with . continue the value to the left of them.

Some instructions take up multiple words. We display word boundaries as line breaks within the tables’ Encoding columns, with subsequent instruction address representations arranged lower within these lines. Where the number of words used is dynamic, a trailing line containing ... will be shown.

Example

An instruction with a u16 immediate operand will use the notation I. .., because it is 2 bytes.

Similarly, Register operands are simply R. or Rx, Ry, etc because they are 1-byte identifiers.

As a concrete example, store64c, an instruction which stores a 64-bit immediate value (encoded as Iy) to memory at the address in a designated register (encoded as R), offset by another 32-bit immediate value (encoded as Ix), has an encoding column entry like this:

Encoding
2d 00 R. Ix .. .. .. __
Iy .. .. .. .. .. .. ..

Immediate Operands

Immediate operands are formatted with I; immediate in this context means that the value is literally encoded into the byte stream, rather than encoding a reference to the value. We allow up to 64-bit immediates for all operations that are binary or greater in arity; in all cases the bit size of the immediate operand and the bit size of the operation must match. (I.e. there is no ‘add 8 bit imm to 32 bit reg’ instruction.)

Where instructions utilizing immediate operands are commutative, the version of the instruction taking a constant will be suffixed with c.

For instructions that do not commute, the two constant versions will be suffixed with a and b respectively, indicating whether the constant is used on the left or right side.

Example
NameDescription Excerpt
mem_set… up to an offset of Rz, is set to … Ry
mem_set_a… up to an offset of I, is set to Ry
mem_set_b… up to an offset of Ry, is set to I
mem_swap… up to an offset of Rz
mem_swap_c… up to an offset of I

Operand Types

TypeShortcodeSize
RegisterR8 bits
Id.of(Upvalue)U8 bits
Id.of(Global)G16 bits
Id.of(Function)F16 bits
AbiA8 bits
Id.of(BuiltinAddress)B16 bits
Id.of(ForeignAddress)X16 bits
Id.of(Effect)E16 bits
Id.of(HandlerSet)H16 bits
Id.of(Constant)C16 bits
u8I8 bits
u16I16 bits
u32I32 bits
u64I64 bits

Instructions

There are 8 categories. Separated into those categories, there are a total of 57 mnemonics. With an average of 7.842105263157895 instructions per mnemonic, we have a grand total of 447 unique instructions.

Miscellaneous

Items that do not fit into another category

nop

NameEncodingDescription
nop00 00 __ __ __ __ __ __No operation

breakpoint

NameEncodingDescription
breakpoint01 00 __ __ __ __ __ __Triggers a breakpoint in debuggers; does nothing otherwise

Control flow

Instructions that control the flow of execution

halt

NameEncodingDescription
halt02 00 __ __ __ __ __ __Halts execution at this instruction offset

trap

Marks a point in the code as not normally reachable, in two ways

NameEncodingDescription
trap03 00 __ __ __ __ __ __Traps execution of the Rvm.Fiber at this instruction offset
Unlike unreachable, this indicates expected behavior; optimizing compilers should not assume it is never reached
unreachable04 00 __ __ __ __ __ __Marks a point in the code as unreachable; if executed in Rvm, it is the same as trap
Unlike trap, however, this indicates undefined behavior; optimizing compilers should assume it is never reached

set

Effect handler set stack manipulation

NameEncodingDescription
push_set05 00 H. .. __ __ __ __Pushes H onto the stack.
The handlers in this set will be first in line for their effects’ prompts until a corresponding pop operation.
pop_set06 00 __ __ __ __ __ __Pops the top most Id.of(HandlerSet) from the stack, restoring the previous if present

br

Instruction pointer manipulation

NameEncodingDescription
br07 00 I. .. .. .. __ __Applies a signed integer offset I to the instruction pointer
br_if08 00 R. I. .. .. .. __Applies a signed integer offset I to the instruction pointer, if the value stored in R is non-zero

call

Various ways of calling functions, in all cases taking up to max(u8) number of arguments. Arguments are expected to be Register values, encoded in the instruction stream after the call instruction.

  • Register is not instruction-aligned; padding bytes may need to be added and accounted for following the arguments, to ensure the next instruction is aligned
NameEncodingDescription
call09 00 Rx Ry A. I. __ __
...
Calls the function in Ry using A, placing the result in Rx
call_c0a 00 R. F. .. A. I. __
...
Calls the function at F using A, placing the result in R
prompt0b 00 R. E. .. A. I. __
...
Calls the effect handler designated by E using A, placing the result in R.

return

End the current function, in one of two ways

NameEncodingDescription
return0c 00 R. __ __ __ __ __Returns flow control to the caller of current function, yielding R to the caller
cancel0d 00 R. __ __ __ __ __Returns flow control to the offset associated with the current effect handler’s Id.of(HandlerSet), yielding R as the cancellation value

Memory

Instructions that provide memory access

mem_set

Set bytes in memory

NameEncodingDescription
mem_set0e 00 Rx Ry Rz __ __ __Each byte, starting from the address in Rx, up to an offset of Rz, is set to the least significant byte of Ry
mem_set_a0f 00 Rx Ry I. .. .. ..Each byte, starting from the address in Rx, up to an offset of I, is set to Ry
mem_set_b10 00 Rx Ry I. __ __ __Each byte, starting from the address in Rx, up to an offset of Ry, is set to I

mem_copy

Copy bytes in memory

NameEncodingDescription
mem_copy11 00 Rx Ry Rz __ __ __Each byte, starting from the address in Ry, up to an offset of Rz, is copied to the same offset of the address in Rx
mem_copy_a12 00 Rx Ry I. .. .. ..Each byte, starting from the address in Ry, up to an offset of I, is copied to the same offset from the address in Rx
mem_copy_b13 00 Rx Ry C. .. __ __Each byte, starting from the address of C, up to an offset of Ry, is copied to the same offset from the address in Rx

mem_swap

Swap bytes in memory.

NameEncodingDescription
mem_swap14 00 Rx Ry Rz __ __ __Each byte, starting from the addresses in Rx and Ry, up to an offset of Rz, are swapped with each-other
mem_swap_c15 00 Rx Ry I. .. .. ..Each byte, starting from the addresses in Rx and Ry, up to an offset of I, are swapped with each-other

addr

Get addresses from special values.

NameEncodingDescription
addr_l16 00 R. I. .. .. .. __Get the address of a signed integer frame-relative operand stack offset I, placing it in R.

An operand stack offset of 1 is equivalent to 8 bytes down from the base of the stack frame
addr_u17 00 R. U. __ __ __ __Get the address of U, placing it in R
addr_g18 00 R. G. .. __ __ __Get the address of G, placing it in R
addr_f19 00 R. F. .. __ __ __Get the address of F, placing it in R
addr_b1a 00 R. B. .. __ __ __Get the address of B, placing it in R
addr_x1b 00 R. X. .. __ __ __Get the address of X, placing it in R
addr_c1c 00 R. C. .. __ __ __Get the address of C, placing it in R

load

Loads a value from memory

NameEncodingDescription
load81d 00 Rx Ry I. .. .. ..Loads an 8-bit value from memory at the address in Ry offset by I, placing the result in Rx
load161e 00 Rx Ry I. .. .. ..Loads a 16-bit value from memory at the address in Ry offset by I, placing the result in Rx
load321f 00 Rx Ry I. .. .. ..Loads a 32-bit value from memory at the address in Ry offset by I, placing the result in Rx
load6420 00 Rx Ry I. .. .. ..Loads a 64-bit value from memory at the address in Ry offset by I, placing the result in Rx

store

Stores a value to memory

NameEncodingDescription
store821 00 Rx Ry I. .. .. ..Stores an 8-bit value from Ry to memory at the address in Rx offset by I
store1622 00 Rx Ry I. .. .. ..Stores a 16-bit value from Ry to memory at the address in Rx offset by I
store3223 00 Rx Ry I. .. .. ..Stores a 32-bit value from Ry to memory at the address in Rx offset by I
store6424 00 Rx Ry I. .. .. ..Stores a 64-bit value from Ry to memory at the address in Rx offset by I
store8c25 00 R. Ix Iy .. .. ..Stores an 8-bit value to memory at the address in R offset by Iy
store16c26 00 R. __ __ __ __ __
Ix .. Iy .. .. .. __ __
Stores a 16-bit value to memory at the address in R offset by Iy
store32c27 00 R. __ __ __ __ __
Ix .. .. .. Iy .. .. ..
Stores a 32-bit value to memory at the address in R offset by Iy
store64c28 00 R. Ix .. .. .. __
Iy .. .. .. .. .. .. ..
Stores a 64-bit value (encoded as Iy) to memory at the address in R offset by Ix

Bitwise

Instructions that manipulate values at the bit level.

  • Where the size is < 64-bits, the least significant bits of the input value(s) are used, and the remainder of the output value is zeroed

bit_swap

Swaps bits of two registers

NameEncodingDescription
bit_swap829 00 Rx Ry __ __ __ __8-bit RxRy
bit_swap162a 00 Rx Ry __ __ __ __16-bit RxRy
bit_swap322b 00 Rx Ry __ __ __ __32-bit RxRy
bit_swap642c 00 Rx Ry __ __ __ __64-bit RxRy

bit_copy

Copies bits from one register into another

NameEncodingDescription
bit_copy82d 00 Rx Ry __ __ __ __8-bit Rx = Ry
bit_copy162e 00 Rx Ry __ __ __ __16-bit Rx = Ry
bit_copy322f 00 Rx Ry __ __ __ __32-bit Rx = Ry
bit_copy6430 00 Rx Ry __ __ __ __64-bit Rx = Ry
bit_copy8c31 00 R. I. __ __ __ __Copies an 8-bit I value into R
bit_copy16c32 00 R. I. .. __ __ __Copies a 16-bit I value into R
bit_copy32c33 00 R. I. .. .. .. __Copies a 32-bit I value into R
bit_copy64c34 00 R. __ __ __ __ __
I. .. .. .. .. .. .. ..
Copies a 64-bit I value into R

bit_clz

Counts the number of leading zero bits in the provided value

NameEncodingDescription
bit_clz835 00 Rx Ry __ __ __ __Counts the leading zeroes in 8-bits of Ry, placing the result in Rx
bit_clz1636 00 Rx Ry __ __ __ __Counts the leading zeroes in 16-bits of Ry, placing the result in Rx
bit_clz3237 00 Rx Ry __ __ __ __Counts the leading zeroes in 32-bits of Ry, placing the result in Rx
bit_clz6438 00 Rx Ry __ __ __ __Counts the leading zeroes in 64-bits of Ry, placing the result in Rx

bit_pop

Counts the number of bits that are set to 1 in the provided value

NameEncodingDescription
bit_pop839 00 Rx Ry __ __ __ __Counts the set bits in 8-bits of Ry, placing the result in Rx
bit_pop163a 00 Rx Ry __ __ __ __Counts the set bits in 16-bits of Ry, placing the result in Rx
bit_pop323b 00 Rx Ry __ __ __ __Counts the set bits in 32-bits of Ry, placing the result in Rx
bit_pop643c 00 Rx Ry __ __ __ __Counts the set bits in 64-bits of Ry, placing the result in Rx

bit_not

Performs a bitwise NOT operation on the provided value

NameEncodingDescription
bit_not83d 00 Rx Ry __ __ __ __8-bit Rx = ~Ry
bit_not163e 00 Rx Ry __ __ __ __16-bit Rx = ~Ry
bit_not323f 00 Rx Ry __ __ __ __32-bit Rx = ~Ry
bit_not6440 00 Rx Ry __ __ __ __64-bit Rx = ~Ry

bit_and

Performs a bitwise AND operation on the provided values

NameEncodingDescription
bit_and841 00 Rx Ry Rz __ __ __8-bit Rx = Ry & Rz
bit_and1642 00 Rx Ry Rz __ __ __6-bit Rx = Ry & Rz
bit_and3243 00 Rx Ry Rz __ __ __32-bit Rx = Ry & Rz
bit_and6444 00 Rx Ry Rz __ __ __64-bit Rx = Ry & Rz
bit_and8c45 00 Rx Ry I. __ __ __8-bit Rx = Ry & I
bit_and16c46 00 Rx Ry I. .. __ __6-bit Rx = Ry & I
bit_and32c47 00 Rx Ry I. .. .. ..32-bit Rx = Ry & I
bit_and64c48 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry & I

bit_or

Performs a bitwise OR operation on the provided values

NameEncodingDescription
bit_or849 00 Rx Ry Rz __ __ __8-bit Rx = Ry | Rz
bit_or164a 00 Rx Ry Rz __ __ __16-bit Rx = Ry | Rz
bit_or324b 00 Rx Ry Rz __ __ __32-bit Rx = Ry | Rz
bit_or644c 00 Rx Ry Rz __ __ __64-bit Rx = Ry | Rz
bit_or8c4d 00 Rx Ry I. __ __ __8-bit Rx = Ry | I
bit_or16c4e 00 Rx Ry I. .. __ __16-bit Rx = Ry | I
bit_or32c4f 00 Rx Ry I. .. .. ..32-bit Rx = Ry | I
bit_or64c50 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry | I

bit_xor

Performs a bitwise XOR operation on the provided values

NameEncodingDescription
bit_xor851 00 Rx Ry Rz __ __ __8-bit Rx = Ry ^ Rz
bit_xor1652 00 Rx Ry Rz __ __ __16-bit Rx = Ry ^ Rz
bit_xor3253 00 Rx Ry Rz __ __ __32-bit Rx = Ry ^ Rz
bit_xor6454 00 Rx Ry Rz __ __ __64-bit Rx = Ry ^ Rz
bit_xor8c55 00 Rx Ry I. __ __ __8-bit Rx = Ry ^ I
bit_xor16c56 00 Rx Ry I. .. __ __16-bit Rx = Ry ^ I
bit_xor32c57 00 Rx Ry I. .. .. ..32-bit Rx = Ry ^ I
bit_xor64c58 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry ^ I

bit_lshift

Performs a bitwise left shift operation on the provided values

NameEncodingDescription
bit_lshift859 00 Rx Ry Rz __ __ __8-bit Rx = Ry << Rz
bit_lshift165a 00 Rx Ry Rz __ __ __16-bit Rx = Ry << Rz
bit_lshift325b 00 Rx Ry Rz __ __ __32-bit Rx = Ry << Rz
bit_lshift645c 00 Rx Ry Rz __ __ __64-bit Rx = Ry << Rz
bit_lshift8a5d 00 Rx Ry I. __ __ __8-bit Rx = I << Ry
bit_lshift16a5e 00 Rx Ry I. .. __ __16-bit Rx = I << Ry
bit_lshift32a5f 00 Rx Ry I. .. .. ..32-bit Rx = I << Ry
bit_lshift64a60 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I << Ry
bit_lshift8b61 00 Rx Ry I. __ __ __8-bit Rx = Ry << I
bit_lshift16b62 00 Rx Ry I. __ __ __16-bit Rx = Ry << I
bit_lshift32b63 00 Rx Ry I. __ __ __32-bit Rx = Ry << I
bit_lshift64b64 00 Rx Ry I. __ __ __64-bit Rx = Ry << I

bit_rshift

Performs a bitwise right shift operation on the provided values

NameEncodingDescription
u_rshift865 00 Rx Ry Rz __ __ __8-bit unsigned/logical Rx = Ry >> Rz
u_rshift1666 00 Rx Ry Rz __ __ __16-bit unsigned/logical Rx = Ry >> Rz
u_rshift3267 00 Rx Ry Rz __ __ __32-bit unsigned/logical Rx = Ry >> Rz
u_rshift6468 00 Rx Ry Rz __ __ __64-bit unsigned/logical Rx = Ry >> Rz
u_rshift8a69 00 Rx Ry I. __ __ __8-bit unsigned/logical Rx = I >> Ry
u_rshift16a6a 00 Rx Ry I. .. __ __16-bit unsigned/logical Rx = I >> Ry
u_rshift32a6b 00 Rx Ry I. .. .. ..32-bit unsigned/logical Rx = I >> Ry
u_rshift64a6c 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned/logical Rx = I >> Ry
u_rshift8b6d 00 Rx Ry I. __ __ __8-bit unsigned/logical Rx = Ry >> I
u_rshift16b6e 00 Rx Ry I. __ __ __16-bit unsigned/logical Rx = Ry >> I
u_rshift32b6f 00 Rx Ry I. __ __ __32-bit unsigned/logical Rx = Ry >> I
u_rshift64b70 00 Rx Ry I. __ __ __64-bit unsigned/logical Rx = Ry >> I
s_rshift871 00 Rx Ry Rz __ __ __8-bit signed/arithmetic Rx = Ry >> Rz
s_rshift1672 00 Rx Ry Rz __ __ __16-bit signed/arithmetic Rx = Ry >> Rz
s_rshift3273 00 Rx Ry Rz __ __ __32-bit signed/arithmetic Rx = Ry >> Rz
s_rshift6474 00 Rx Ry Rz __ __ __64-bit signed/arithmetic Rx = Ry >> Rz
s_rshift8a75 00 Rx Ry I. __ __ __8-bit signed/arithmetic Rx = I >> Ry
s_rshift16a76 00 Rx Ry I. .. __ __16-bit signed/arithmetic Rx = I >> Ry
s_rshift32a77 00 Rx Ry I. .. .. ..32-bit signed/arithmetic Rx = I >> Ry
s_rshift64a78 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed/arithmetic Rx = I >> Ry
s_rshift8b79 00 Rx Ry I. __ __ __8-bit signed/arithmetic Rx = Ry >> I
s_rshift16b7a 00 Rx Ry I. __ __ __16-bit signed/arithmetic Rx = Ry >> I
s_rshift32b7b 00 Rx Ry I. __ __ __32-bit signed/arithmetic Rx = Ry >> I
s_rshift64b7c 00 Rx Ry I. __ __ __64-bit signed/arithmetic Rx = Ry >> I

Comparison

Instructions that compare values

eq

Performs an equality comparison on the provided values

NameEncodingDescription
i_eq87d 00 Rx Ry Rz __ __ __8-bit integer Rx = Ry == Rz
i_eq167e 00 Rx Ry Rz __ __ __16-bit integer Rx = Ry == Rz
i_eq327f 00 Rx Ry Rz __ __ __32-bit integer Rx = Ry == Rz
i_eq6480 00 Rx Ry Rz __ __ __64-bit integer Rx = Ry == Rz
i_eq8c81 00 Rx Ry I. __ __ __8-bit integer Rx = Ry == I
i_eq16c82 00 Rx Ry I. .. __ __16-bit integer Rx = Ry == I
i_eq32c83 00 Rx Ry I. .. .. ..32-bit integer Rx = Ry == I
i_eq64c84 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit integer Rx = Ry == I
f_eq3285 00 Rx Ry Rz __ __ __32-bit floating point Rx = Ry == Rz
f_eq6486 00 Rx Ry Rz __ __ __64-bit floating point Rx = Ry == Rz
f_eq32c87 00 Rx Ry I. .. .. ..32-bit floating point Rx = Ry == I
f_eq64c88 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry == I

ne

Performs an inequality comparison on the provided values

NameEncodingDescription
i_ne889 00 Rx Ry Rz __ __ __8-bit integer Rx = Ry != Rz
i_ne168a 00 Rx Ry Rz __ __ __16-bit integer Rx = Ry != Rz
i_ne328b 00 Rx Ry Rz __ __ __32-bit integer Rx = Ry != Rz
i_ne648c 00 Rx Ry Rz __ __ __64-bit integer Rx = Ry != Rz
i_ne8c8d 00 Rx Ry I. __ __ __8-bit integer Rx = Ry != I
i_ne16c8e 00 Rx Ry I. .. __ __16-bit integer Rx = Ry != I
i_ne32c8f 00 Rx Ry I. .. .. ..32-bit integer Rx = Ry != I
i_ne64c90 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit integer Rx = Ry != I
f_ne3291 00 Rx Ry Rz __ __ __32-bit floating point Rx = Ry != Rz
f_ne6492 00 Rx Ry Rz __ __ __64-bit floating point Rx = Ry != Rz
f_ne32c93 00 Rx Ry I. .. .. ..32-bit floating point Rx = Ry != I
f_ne64c94 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry != I

lt

Performs a less-than comparison on the provided values

NameEncodingDescription
u_lt895 00 Rx Ry Rz __ __ __8-bit unsigned integer Rx = Ry < Rz
u_lt1696 00 Rx Ry Rz __ __ __16-bit unsigned integer Rx = Ry < Rz
u_lt3297 00 Rx Ry Rz __ __ __32-bit unsigned integer Rx = Ry < Rz
u_lt6498 00 Rx Ry Rz __ __ __64-bit unsigned integer Rx = Ry < Rz
u_lt8a99 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = I < Ry
u_lt16a9a 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = I < Ry
u_lt32a9b 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = I < Ry
u_lt64a9c 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = I < Ry
u_lt8b9d 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = Ry < I
u_lt16b9e 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = Ry < I
u_lt32b9f 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = Ry < I
u_lt64ba0 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = Ry < I
s_lt8a1 00 Rx Ry Rz __ __ __8-bit signed integer Rx = Ry < Rz
s_lt16a2 00 Rx Ry Rz __ __ __16-bit signed integer Rx = Ry < Rz
s_lt32a3 00 Rx Ry Rz __ __ __32-bit signed integer Rx = Ry < Rz
s_lt64a4 00 Rx Ry Rz __ __ __64-bit signed integer Rx = Ry < Rz
s_lt8aa5 00 Rx Ry I. __ __ __8-bit signed integer Rx = I < Ry
s_lt16aa6 00 Rx Ry I. .. __ __16-bit signed integer Rx = I < Ry
s_lt32aa7 00 Rx Ry I. .. .. ..32-bit signed integer Rx = I < Ry
s_lt64aa8 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = I < Ry
s_lt8ba9 00 Rx Ry I. __ __ __8-bit signed integer Rx = Ry < I
s_lt16baa 00 Rx Ry I. .. __ __16-bit signed integer Rx = Ry < I
s_lt32bab 00 Rx Ry I. .. .. ..32-bit signed integer Rx = Ry < I
s_lt64bac 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = Ry < I
f_lt32ad 00 Rx Ry Rz __ __ __32-bit floating point Rx = Ry < Rz
f_lt32aae 00 Rx Ry I. .. .. ..32-bit floating point Rx = I < Ry
f_lt32baf 00 Rx Ry I. .. .. ..32-bit floating point Rx = Ry < I
f_lt64b0 00 Rx Ry Rz __ __ __64-bit floating point Rx = Ry < Rz
f_lt64ab1 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = I < Ry
f_lt64bb2 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry < I

gt

Performs a greater-than comparison on the provided values

NameEncodingDescription
u_gt8b3 00 Rx Ry Rz __ __ __8-bit unsigned integer Rx = Ry > Rz
u_gt16b4 00 Rx Ry Rz __ __ __16-bit unsigned integer Rx = Ry > Rz
u_gt32b5 00 Rx Ry Rz __ __ __32-bit unsigned integer Rx = Ry > Rz
u_gt64b6 00 Rx Ry Rz __ __ __64-bit unsigned integer Rx = Ry > Rz
u_gt8ab7 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = I > Ry
u_gt16ab8 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = I > Ry
u_gt32ab9 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = I > Ry
u_gt64aba 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = I > Ry
u_gt8bbb 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = Ry > I
u_gt16bbc 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = Ry > I
u_gt32bbd 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = Ry > I
u_gt64bbe 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = Ry > I
s_gt8bf 00 Rx Ry Rz __ __ __8-bit signed integer Rx = Ry > Rz
s_gt16c0 00 Rx Ry Rz __ __ __16-bit signed integer Rx = Ry > Rz
s_gt32c1 00 Rx Ry Rz __ __ __32-bit signed integer Rx = Ry > Rz
s_gt64c2 00 Rx Ry Rz __ __ __64-bit signed integer Rx = Ry > Rz
s_gt8ac3 00 Rx Ry I. __ __ __8-bit signed integer Rx = I > Ry
s_gt16ac4 00 Rx Ry I. .. __ __16-bit signed integer Rx = I > Ry
s_gt32ac5 00 Rx Ry I. .. .. ..32-bit signed integer Rx = I > Ry
s_gt64ac6 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = I > Ry
s_gt8bc7 00 Rx Ry I. __ __ __8-bit signed integer Rx = Ry > I
s_gt16bc8 00 Rx Ry I. .. __ __16-bit signed integer Rx = Ry > I
s_gt32bc9 00 Rx Ry I. .. .. ..32-bit signed integer Rx = Ry > I
s_gt64bca 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = Ry > I
f_gt32cb 00 Rx Ry Rz __ __ __32-bit floating point Rx = Ry > Rz
f_gt32acc 00 Rx Ry I. .. .. ..32-bit floating point Rx = I > Ry
f_gt32bcd 00 Rx Ry I. .. .. ..32-bit floating point Rx = Ry > I
f_gt64ce 00 Rx Ry Rz __ __ __64-bit floating point Rx = Ry > Rz
f_gt64acf 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = I > Ry
f_gt64bd0 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry > I

le

Performs a less-than-or-equal comparison on the provided values

NameEncodingDescription
u_le8d1 00 Rx Ry Rz __ __ __8-bit unsigned integer Rx = Ry Rz
u_le16d2 00 Rx Ry Rz __ __ __16-bit unsigned integer Rx = Ry Rz
u_le32d3 00 Rx Ry Rz __ __ __32-bit unsigned integer Rx = Ry Rz
u_le64d4 00 Rx Ry Rz __ __ __64-bit unsigned integer Rx = Ry Rz
u_le8ad5 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = I Ry
u_le16ad6 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = I Ry
u_le32ad7 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = I Ry
u_le64ad8 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = I Ry
u_le8bd9 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = Ry I
u_le16bda 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = Ry I
u_le32bdb 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = Ry I
u_le64bdc 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = Ry I
s_le8dd 00 Rx Ry Rz __ __ __8-bit signed integer Rx = Ry Rz
s_le16de 00 Rx Ry Rz __ __ __16-bit signed integer Rx = Ry Rz
s_le32df 00 Rx Ry Rz __ __ __32-bit signed integer Rx = Ry Rz
s_le64e0 00 Rx Ry Rz __ __ __64-bit signed integer Rx = Ry Rz
s_le8ae1 00 Rx Ry I. __ __ __8-bit signed integer Rx = I Ry
s_le16ae2 00 Rx Ry I. .. __ __16-bit signed integer Rx = I Ry
s_le32ae3 00 Rx Ry I. .. .. ..32-bit signed integer Rx = I Ry
s_le64ae4 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = I Ry
s_le8be5 00 Rx Ry I. __ __ __8-bit signed integer Rx = Ry I
s_le16be6 00 Rx Ry I. .. __ __16-bit signed integer Rx = Ry I
s_le32be7 00 Rx Ry I. .. .. ..32-bit signed integer Rx = Ry I
s_le64be8 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = Ry I
f_le32e9 00 Rx Ry Rz __ __ __32-bit floating point Rx = Ry Rz
f_le32aea 00 Rx Ry I. .. .. ..32-bit floating point Rx = I Ry
f_le32beb 00 Rx Ry I. .. .. ..32-bit floating point Rx = Ry I
f_le64ec 00 Rx Ry Rz __ __ __64-bit floating point Rx = Ry Rz
f_le64aed 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = I Ry
f_le64bee 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry I

ge

Performs a greater-than-or-equal comparison on the provided values

NameEncodingDescription
u_ge8ef 00 Rx Ry Rz __ __ __8-bit unsigned integer Rx = Ry >= Rz
u_ge16f0 00 Rx Ry Rz __ __ __16-bit unsigned integer Rx = Ry >= Rz
u_ge32f1 00 Rx Ry Rz __ __ __32-bit unsigned integer Rx = Ry >= Rz
u_ge64f2 00 Rx Ry Rz __ __ __64-bit unsigned integer Rx = Ry >= Rz
u_ge8af3 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = I >= Ry
u_ge16af4 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = I >= Ry
u_ge32af5 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = I >= Ry
u_ge64af6 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = I >= Ry
u_ge8bf7 00 Rx Ry I. __ __ __8-bit unsigned integer Rx = Ry >= I
u_ge16bf8 00 Rx Ry I. .. __ __16-bit unsigned integer Rx = Ry >= I
u_ge32bf9 00 Rx Ry I. .. .. ..32-bit unsigned integer Rx = Ry >= I
u_ge64bfa 00 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned integer Rx = Ry >= I
s_ge8fb 00 Rx Ry Rz __ __ __8-bit signed integer Rx = Ry >= Rz
s_ge16fc 00 Rx Ry Rz __ __ __16-bit signed integer Rx = Ry >= Rz
s_ge32fd 00 Rx Ry Rz __ __ __32-bit signed integer Rx = Ry >= Rz
s_ge64fe 00 Rx Ry Rz __ __ __64-bit signed integer Rx = Ry >= Rz
s_ge8aff 00 Rx Ry I. __ __ __8-bit signed integer Rx = I >= Ry
s_ge16a00 01 Rx Ry I. .. __ __16-bit signed integer Rx = I >= Ry
s_ge32a01 01 Rx Ry I. .. .. ..32-bit signed integer Rx = I >= Ry
s_ge64a02 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = I >= Ry
s_ge8b03 01 Rx Ry I. __ __ __8-bit signed integer Rx = Ry >= I
s_ge16b04 01 Rx Ry I. .. __ __16-bit signed integer Rx = Ry >= I
s_ge32b05 01 Rx Ry I. .. .. ..32-bit signed integer Rx = Ry >= I
s_ge64b06 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed integer Rx = Ry >= I
f_ge3207 01 Rx Ry Rz __ __ __32-bit floating point Rx = Ry >= Rz
f_ge32a08 01 Rx Ry I. .. .. ..32-bit floating point Rx = I >= Ry
f_ge32b09 01 Rx Ry I. .. .. ..32-bit floating point Rx = Ry >= I
f_ge640a 01 Rx Ry Rz __ __ __64-bit floating point Rx = Ry >= Rz
f_ge64a0b 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = I >= Ry
f_ge64b0c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit floating point Rx = Ry >= I

Integer arithmetic

Instructions that perform integer arithmetic operations on values. Because we use two’s compliment integers, the signedness of the operands does not affect all operations. Where it does, the mnemonic will be prefixed with “u” or “s”, otherwise with “i”.

  • Where the size is < 64-bits, the least significant bits of the input value(s) are used, and the remainder of the output value is zeroed

i_neg

Performs integer negation on the provided value.

NameEncodingDescription
s_neg80d 01 Rx Ry __ __ __ __8-bit Rx = -Ry
s_neg160e 01 Rx Ry __ __ __ __16-bit Rx = -Ry
s_neg320f 01 Rx Ry __ __ __ __32-bit Rx = -Ry
s_neg6410 01 Rx Ry __ __ __ __64-bit Rx = -Ry

i_abs

Finds the absolute value of the provided value

NameEncodingDescription
s_abs811 01 Rx Ry __ __ __ __8-bit Rx = |Ry|
s_abs1612 01 Rx Ry __ __ __ __16-bit Rx = |Ry|
s_abs3213 01 Rx Ry __ __ __ __32-bit Rx = |Ry|
s_abs6414 01 Rx Ry __ __ __ __64-bit Rx = |Ry|

i_add

Performs integer addition on the provided values.

NameEncodingDescription
i_add815 01 Rx Ry Rz __ __ __8-bit Rx = Ry + Rz
i_add1616 01 Rx Ry Rz __ __ __16-bit Rx = Ry + Rz
i_add3217 01 Rx Ry Rz __ __ __32-bit Rx = Ry + Rz
i_add6418 01 Rx Ry Rz __ __ __64-bit Rx = Ry + Rz
i_add8c19 01 Rx Ry I. __ __ __8-bit Rx = Ry + I
i_add16c1a 01 Rx Ry I. .. __ __16-bit Rx = Ry + I
i_add32c1b 01 Rx Ry I. .. .. ..32-bit Rx = Ry + I
i_add64c1c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry + I

i_sub

Performs integer subtraction on the provided values.

NameEncodingDescription
i_sub81d 01 Rx Ry Rz __ __ __8-bit Rx = Ry - Rz
i_sub161e 01 Rx Ry Rz __ __ __16-bit Rx = Ry - Rz
i_sub321f 01 Rx Ry Rz __ __ __32-bit Rx = Ry - Rz
i_sub6420 01 Rx Ry Rz __ __ __64-bit Rx = Ry - Rz
i_sub8a21 01 Rx Ry I. __ __ __8-bit Rx = I - Ry
i_sub16a22 01 Rx Ry I. .. __ __16-bit Rx = I - Ry
i_sub32a23 01 Rx Ry I. .. .. ..32-bit Rx = I - Ry
i_sub64a24 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I - Ry
i_sub8b25 01 Rx Ry I. __ __ __8-bit Rx = Ry - I
i_sub16b26 01 Rx Ry I. .. __ __16-bit Rx = Ry - I
i_sub32b27 01 Rx Ry I. .. .. ..32-bit Rx = Ry - I
i_sub64b28 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry - I

i_mul

Performs integer multiplication on the provided values.

NameEncodingDescription
i_mul829 01 Rx Ry Rz __ __ __8-bit Rx = Ry * Rz
i_mul162a 01 Rx Ry Rz __ __ __16-bit Rx = Ry * Rz
i_mul322b 01 Rx Ry Rz __ __ __32-bit Rx = Ry * Rz
i_mul642c 01 Rx Ry Rz __ __ __64-bit Rx = Ry * Rz
i_mul8c2d 01 Rx Ry I. __ __ __8-bit Rx = Ry * I
i_mul16c2e 01 Rx Ry I. .. __ __16-bit Rx = Ry * I
i_mul32c2f 01 Rx Ry I. .. .. ..32-bit Rx = Ry * I
i_mul64c30 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry * I

i_div

Performs integer division on the provided values.

NameEncodingDescription
u_div831 01 Rx Ry Rz __ __ __8-bit unsigned Rx = Ry / Rz
u_div1632 01 Rx Ry Rz __ __ __16-bit unsigned Rx = Ry / Rz
u_div3233 01 Rx Ry Rz __ __ __32-bit unsigned Rx = Ry / Rz
u_div6434 01 Rx Ry Rz __ __ __64-bit unsigned Rx = Ry / Rz
u_div8a35 01 Rx Ry I. __ __ __8-bit unsigned Rx = I / Ry
u_div16a36 01 Rx Ry I. .. __ __16-bit unsigned Rx = I / Ry
u_div32a37 01 Rx Ry I. .. .. ..32-bit unsigned Rx = I / Ry
u_div64a38 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned Rx = I / Ry
u_div8b39 01 Rx Ry I. __ __ __8-bit unsigned Rx = Ry / I
u_div16b3a 01 Rx Ry I. .. __ __16-bit unsigned Rx = Ry / I
u_div32b3b 01 Rx Ry I. .. .. ..32-bit unsigned Rx = Ry / I
u_div64b3c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned Rx = Ry / I
s_div83d 01 Rx Ry Rz __ __ __8-bit signed Rx = Ry / Rz
s_div163e 01 Rx Ry Rz __ __ __16-bit signed Rx = Ry / Rz
s_div323f 01 Rx Ry Rz __ __ __32-bit signed Rx = Ry / Rz
s_div6440 01 Rx Ry Rz __ __ __64-bit signed Rx = Ry / Rz
s_div8a41 01 Rx Ry I. __ __ __8-bit signed Rx = I / Ry
s_div16a42 01 Rx Ry I. .. __ __16-bit signed Rx = I / Ry
s_div32a43 01 Rx Ry I. .. .. ..32-bit signed Rx = I / Ry
s_div64a44 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed Rx = I / Ry
s_div8b45 01 Rx Ry I. __ __ __8-bit signed Rx = Ry / I
s_div16b46 01 Rx Ry I. .. __ __16-bit signed Rx = Ry / I
s_div32b47 01 Rx Ry I. .. .. ..32-bit signed Rx = Ry / I
s_div64b48 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed Rx = Ry / I

i_rem

Gets the remainder of integer division on the provided values.

NameEncodingDescription
u_rem849 01 Rx Ry Rz __ __ __8-bit unsigned Rx = Ry % Rz
u_rem164a 01 Rx Ry Rz __ __ __16-bit unsigned Rx = Ry % Rz
u_rem324b 01 Rx Ry Rz __ __ __32-bit unsigned Rx = Ry % Rz
u_rem644c 01 Rx Ry Rz __ __ __64-bit unsigned Rx = Ry % Rz
u_rem8a4d 01 Rx Ry I. __ __ __8-bit unsigned Rx = I % Ry
u_rem16a4e 01 Rx Ry I. .. __ __16-bit unsigned Rx = I % Ry
u_rem32a4f 01 Rx Ry I. .. .. ..32-bit unsigned Rx = I % Ry
u_rem64a50 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned Rx = I % Ry
u_rem8b51 01 Rx Ry I. __ __ __8-bit unsigned Rx = Ry % I
u_rem16b52 01 Rx Ry I. .. __ __16-bit unsigned Rx = Ry % I
u_rem32b53 01 Rx Ry I. .. .. ..32-bit unsigned Rx = Ry % I
u_rem64b54 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit unsigned Rx = Ry % I
s_rem855 01 Rx Ry Rz __ __ __8-bit signed Rx = Ry % Rz
s_rem1656 01 Rx Ry Rz __ __ __16-bit signed Rx = Ry % Rz
s_rem3257 01 Rx Ry Rz __ __ __32-bit signed Rx = Ry % Rz
s_rem6458 01 Rx Ry Rz __ __ __64-bit signed Rx = Ry % Rz
s_rem8a59 01 Rx Ry I. __ __ __8-bit signed Rx = I % Ry
s_rem16a5a 01 Rx Ry I. .. __ __16-bit signed Rx = I % Ry
s_rem32a5b 01 Rx Ry I. .. .. ..32-bit signed Rx = I % Ry
s_rem64a5c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed Rx = I % Ry
s_rem8b5d 01 Rx Ry I. __ __ __8-bit signed Rx = Ry % I
s_rem16b5e 01 Rx Ry I. .. __ __16-bit signed Rx = Ry % I
s_rem32b5f 01 Rx Ry I. .. .. ..32-bit signed Rx = Ry % I
s_rem64b60 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit signed Rx = Ry % I

i_pow

Raises a provided value to the power of the other provided value.

NameEncodingDescription
i_pow861 01 Rx Ry Rz __ __ __8-bit Rx = Ry ** Rz
i_pow1662 01 Rx Ry Rz __ __ __16-bit Rx = Ry ** Rz
i_pow3263 01 Rx Ry Rz __ __ __32-bit Rx = Ry ** Rz
i_pow6464 01 Rx Ry Rz __ __ __64-bit Rx = Ry ** Rz
i_pow8a65 01 Rx Ry I. __ __ __8-bit Rx = I ** Ry
i_pow16a66 01 Rx Ry I. .. __ __16-bit Rx = I ** Ry
i_pow32a67 01 Rx Ry I. .. .. ..32-bit Rx = I ** Ry
i_pow64a68 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I ** Ry
i_pow8b69 01 Rx Ry I. __ __ __8-bit Rx = Ry ** I
i_pow16b6a 01 Rx Ry I. .. __ __16-bit Rx = Ry ** I
i_pow32b6b 01 Rx Ry I. .. .. ..32-bit Rx = Ry ** I
i_pow64b6c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry ** I

Floating point arithmetic

Instructions that perform floating point arithmetic operations on values.

  • Where the size is < 64-bits, the least significant bits of the input value(s) are used and the remainder of the output value is zeroed

f_neg

Performs floating point negation on the provided value

NameEncodingDescription
f_neg326d 01 Rx Ry __ __ __ __32-bit Rx = -Ry
f_neg646e 01 Rx Ry __ __ __ __64-bit Rx = -Ry

f_abs

Performs a floating point absolute value operation on the provided value

NameEncodingDescription
f_abs326f 01 Rx Ry __ __ __ __32-bit Rx = |Ry|
f_abs6470 01 Rx Ry __ __ __ __64-bit Rx = |Ry|

f_sqrt

Performs a square root operation on the provided value

NameEncodingDescription
f_sqrt3271 01 Rx Ry __ __ __ __32-bit Rx = sqrt(Ry)
f_sqrt6472 01 Rx Ry __ __ __ __64-bit Rx = sqrt(Ry)

f_floor

Performs a flooring operation on the provided value

NameEncodingDescription
f_floor3273 01 Rx Ry __ __ __ __32-bit Rx = floor(Ry)
f_floor6474 01 Rx Ry __ __ __ __64-bit Rx = floor(Ry)

f_ceil

Performs a ceiling operation on the provided value

NameEncodingDescription
f_ceil3275 01 Rx Ry __ __ __ __32-bit Rx = ceil(Ry)
f_ceil6476 01 Rx Ry __ __ __ __64-bit Rx = ceil(Ry)

f_round

Performs a rounding operation on the provided value

NameEncodingDescription
f_round3277 01 Rx Ry __ __ __ __32-bit Rx = round(Ry)
f_round6478 01 Rx Ry __ __ __ __64-bit Rx = round(Ry)

f_trunc

Performs a truncation operation on the provided value

NameEncodingDescription
f_trunc3279 01 Rx Ry __ __ __ __32-bit Rx = truncate(Ry)
f_trunc647a 01 Rx Ry __ __ __ __64-bit Rx = truncate(Ry)

f_whole

Extracts the whole number part of the provided value

NameEncodingDescription
f_whole327b 01 Rx Ry __ __ __ __32-bit Rx = whole(Ry)
f_whole647c 01 Rx Ry __ __ __ __64-bit Rx = whole(Ry)

f_frac

Extracts the fractional part of the provided value

NameEncodingDescription
f_frac327d 01 Rx Ry __ __ __ __32-bit Rx = frac(Ry)
f_frac647e 01 Rx Ry __ __ __ __64-bit Rx = frac(Ry)

f_add

Performs floating point addition on the provided values

NameEncodingDescription
f_add327f 01 Rx Ry Rz __ __ __32-bit Rx = Ry + Rz
f_add32c80 01 Rx Ry I. .. .. ..32-bit Rx = Ry + I
f_add6481 01 Rx Ry Rz __ __ __64-bit Rx = Ry + Rz
f_add64c82 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry + I

f_sub

Performs floating point subtraction on the provided values

NameEncodingDescription
f_sub3283 01 Rx Ry Rz __ __ __32-bit Rx = Ry - Rz
f_sub32a84 01 Rx Ry I. .. .. ..32-bit Rx = I - Ry
f_sub32b85 01 Rx Ry I. .. .. ..32-bit Rx = Ry - I
f_sub6486 01 Rx Ry Rz __ __ __64-bit Rx = Ry - Rz
f_sub64a87 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I - Ry
f_sub64b88 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry - I

f_mul

Performs floating point multiplication on the provided values

NameEncodingDescription
f_mul3289 01 Rx Ry Rz __ __ __32-bit Rx = Ry * Rz
f_mul32c8a 01 Rx Ry I. .. .. ..32-bit Rx = Ry * I
f_mul648b 01 Rx Ry Rz __ __ __64-bit Rx = Ry * Rz
f_mul64c8c 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry * I

f_div

Performs floating point division on the provided values

NameEncodingDescription
f_div328d 01 Rx Ry Rz __ __ __32-bit Rx = Ry / Rz
f_div32a8e 01 Rx Ry I. .. .. ..32-bit Rx = I / Ry
f_div32b8f 01 Rx Ry I. .. .. ..32-bit Rx = Ry / I
f_div6490 01 Rx Ry Rz __ __ __64-bit Rx = Ry / Rz
f_div64a91 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I / Ry
f_div64b92 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry / I

f_rem

Gets the remainder of floating point division on the provided values

NameEncodingDescription
f_rem3293 01 Rx Ry Rz __ __ __32-bit Rx = Ry % Rz
f_rem32a94 01 Rx Ry I. .. .. ..32-bit Rx = I % Ry
f_rem32b95 01 Rx Ry I. .. .. ..32-bit Rx = Ry % I
f_rem6496 01 Rx Ry Rz __ __ __64-bit Rx = Ry % Rz
f_rem64a97 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I % Ry
f_rem64b98 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry % I

f_pow

Raises a provided value to the power of the other provided value

NameEncodingDescription
f_pow3299 01 Rx Ry Rz __ __ __32-bit Rx = Ry ** Rz
f_pow32a9a 01 Rx Ry I. .. .. ..32-bit Rx = I ** Ry
f_pow32b9b 01 Rx Ry I. .. .. ..32-bit Rx = Ry ** I
f_pow649c 01 Rx Ry Rz __ __ __64-bit Rx = Ry ** Rz
f_pow64a9d 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = I ** Ry
f_pow64b9e 01 Rx Ry __ __ __ __
I. .. .. .. .. .. .. ..
64-bit Rx = Ry ** I

Value conversion

Instructions that convert values between different bit representations

s_ext

Signed bit extension

NameEncodingDescription
s_ext8_169f 01 Rx Ry __ __ __ __Sign extend 8-bits of Ry to 16-bits, placing the result in Rx
s_ext8_32a0 01 Rx Ry __ __ __ __Sign extend 8-bits of Ry to 32-bits, placing the result in Rx
s_ext8_64a1 01 Rx Ry __ __ __ __Sign extend 8-bits of Ry to 64-bits, placing the result in Rx
s_ext16_32a2 01 Rx Ry __ __ __ __Sign extend 16-bits of Ry to 32-bits, placing the result in Rx
s_ext16_64a3 01 Rx Ry __ __ __ __Sign extend 16-bits of Ry to 64-bits, placing the result in Rx
s_ext32_64a4 01 Rx Ry __ __ __ __Sign extend 32-bits of Ry to 64-bits, placing the result in Rx

f_to_i

Convert floats to various integer representations.

NameEncodingDescription
f32_to_u8a5 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 8-bit integer; discards sign, places the result in Rx
f32_to_u16a6 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 16-bit integer; discards sign, places the result in Rx
f32_to_u32a7 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 32-bit integer; discards sign, places the result in Rx
f32_to_u64a8 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 64-bit integer; discards sign, places the result in Rx
f32_to_s8a9 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 8-bit integer; keeps sign, places the result in Rx
f32_to_s16aa 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 16-bit integer; keeps sign, places the result in Rx
f32_to_s32ab 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 32-bit integer; keeps sign, places the result in Rx
f32_to_s64ac 01 Rx Ry __ __ __ __Convert of 32-bit float in Ry to 64-bit integer; keeps sign, places the result in Rx

i_to_f

Convert various integers to float representations.

  • Information loss is possible if the integer’s most significant bit index is larger than the float’s mantissa bit size
NameEncodingDescription
u8_to_f32ad 01 Rx Ry __ __ __ __Convert 8-bits in Ry to 32-bit float; discards sign, places result in Rx
u16_to_f32ae 01 Rx Ry __ __ __ __Convert 16-bits in Ry to 32-bit float; discards sign, places result in Rx
u32_to_f32af 01 Rx Ry __ __ __ __Convert 32-bits in Ry to 32-bit float; discards sign, places result in Rx
u64_to_f32b0 01 Rx Ry __ __ __ __Convert 64-bits in Ry to 32-bit float; discards sign, places result in Rx
s8_to_f32b1 01 Rx Ry __ __ __ __Convert 8-bits in Ry to 32-bit float; keeps sign, places result in Rx
s16_to_f32b2 01 Rx Ry __ __ __ __Convert 16-bits in Ry to 32-bit float; keeps sign, places result in Rx
s32_to_f32b3 01 Rx Ry __ __ __ __Convert 32-bits in Ry to 32-bit float; keeps sign, places result in Rx
s64_to_f32b4 01 Rx Ry __ __ __ __Convert 64-bits in Ry to 32-bit float; keeps sign, places result in Rx
u8_to_f64b5 01 Rx Ry __ __ __ __Convert 8-bits in Ry to 64-bit float; discards sign, places result in Rx
u16_to_f64b6 01 Rx Ry __ __ __ __Convert 16-bits in Ry to 64-bit float; discards sign, places result in Rx
u32_to_f64b7 01 Rx Ry __ __ __ __Convert 32-bits in Ry to 64-bit float; discards sign, places result in Rx
u64_to_f64b8 01 Rx Ry __ __ __ __Convert 64-bits in Ry to 64-bit float; discards sign, places result in Rx
s8_to_f64b9 01 Rx Ry __ __ __ __Convert 8-bits in Ry to 64-bit float; keeps sign, places result in Rx
s16_to_f64ba 01 Rx Ry __ __ __ __Convert 16-bits in Ry to 64-bit float; keeps sign, places result in Rx
s32_to_f64bb 01 Rx Ry __ __ __ __Convert 32-bits in Ry to 64-bit float; keeps sign, places result in Rx
s64_to_f64bc 01 Rx Ry __ __ __ __Convert 64-bits in Ry to 64-bit float; keeps sign, places result in Rx

f_to_f

Floating point to floating point conversion

NameEncodingDescription
f32_to_f64bd 01 Rx Ry __ __ __ __Convert 32-bit float in Ry to 64-bit float; places the result in Rx
f64_to_f32be 01 Rx Ry __ __ __ __Convert 64-bit float in Ry to 32-bit float; places the result in Rx