VM Operations

You are here:
Estimated reading time: 1 min

UserCall Functions

The virtual machine compiler interacts with native code through UserCall functions, which use the following syntax:

$ufX(Y, param1, param2, param3, …)

where, X is the function number fn#, and Y is the ALIAS#. Alias names are also available for more readable code.

Internal Buffer

Most VM operations access the internal byte-aligned general-purpose buffer. This buffer, referred to as the buffer in this document, can be used for multi-byte operations, in which case the index will refer to the index to the first byte of the data.

Operations Summary

Here are available VM functions.

Click on the + button to expand a row. For more information on a specific VM function, click on More to go the API documentation page of that function.

VM Functions

Math functions

Some of the above functions are mathematical operations.

One variable math functions:

  • Math1VarExt_F32(r, rIn, funcID)
  • Math1Var_F32(r, funcID)

Two variables math functions:

  • Math2Var_F32(r1, r2, funcID)
  • Math2Var_I32(r1, r2, funcID)
  • Math2Var_I64(r1, r2, funcID)

The following math operations identified by funcId can be used with the VM math functions above.

One variable math functions

Two variable math functions

Was this article helpful?
Dislike 0
Views: 176
Go to Top