MACROS

AT8U

UTF-8 Atoms table section

ATOM_STR(LENSTR, STR)

No-op macro: just syntax sugar for avoiding mistakes or clang-format dividing atoms in multiple lines. Usage: ATOM_STR(“\x5”, “hello”).

BEGIN_WITH_STACK_HEAP(size, name)
END_WITH_STACK_HEAP(name, global)
CALL_FUN(fun, args_count)
CODE

Code chunk section

CONTAINER_OF(ptr, type, member)
DECODE_ALLOCATOR_LIST(need, decode_pc)
DECODE_ATOM(atom, decode_pc)
DECODE_COMPACT_TERM(dest_term, decode_pc)
DECODE_DEST_REGISTER(dreg, decode_pc)
DECODE_EXTENDED_LIST_TAG(decode_pc)
DECODE_FLAGS_LIST(flags_value, flags, opcode)
DECODE_FP_REGISTER(freg, decode_pc)
DECODE_INTEGER(integer, decode_pc)
DECODE_LABEL(label, decode_pc)
DECODE_LITERAL(val, decode_pc)
DECODE_VALUE(val, decode_pc)
DECODE_XREG(reg, decode_pc)
DECODE_YREG(reg, decode_pc)
END_WITH_STACK_HEAP(name, global)
ENDIAN_SWAP_32(value)
EXPT

Exported functions table section

FUNT

Funs table section

GET_LIST_ENTRY(list_item, type, list_head_member)

gets a pointer to the struct that contains a certain list head

This macro should be used to retrieve a pointer to the struct that is containing the given ListHead.

IFF_SECTION_HEADER_SIZE

sizeof IFF section header in bytes

IMPT

Imported functions table section

IS_EXTENDED_ALLOCATOR(decode_pc)
IS_EXTENDED_FP_REGISTER(decode_pc)
IS_NULL_PTR(x)
JUMP_TO_ADDRESS(address)
LIKELY(x)
LINT

Str table section

LIST_FOR_EACH(item, head)
LITU

Uncompressed literals table section

LOCT

Local functions table section

MAX_OFFS

Required size for offsets array

MAX_SIZES

Required size for sizes array

MIN(X, Y)
MUTABLE_LIST_FOR_EACH(item, tmp, head)

Warning

doxygendefine: Cannot find define “NEXT_INSTRUCTION” in doxygen xml output for project “libatomvm” from directory: /home/runner/work/AtomVM/AtomVM/build/doc/xml/

NO_DISCARD(...)

Warning

doxygendefine: Cannot find define “POINTER_TO_II” in doxygen xml output for project “libatomvm” from directory: /home/runner/work/AtomVM/AtomVM/build/doc/xml/

PRINTF_FORMAT_ARGS(...)
PROCESS_MAYBE_TRAP_RETURN_VALUE(return_value)
PROCESS_MAYBE_TRAP_RETURN_VALUE_LAST(return_value)

Warning

doxygendefine: Cannot find define “PROCESS_MAYBE_TRAP_RETURN_VALUE_RESTORE_I” in doxygen xml output for project “libatomvm” from directory: /home/runner/work/AtomVM/AtomVM/build/doc/xml/

RAISE_ERROR(error_type_atom)
READ_16_UNALIGNED(ptr)
READ_32_ALIGNED(ptr)
READ_32_UNALIGNED(ptr)
READ_DEST_REGISTER(dreg)
SCHEDULE_NEXT(restore_mod, restore_to)
SELECT_INT_DEFAULT(i_val)

An idiomatic macro for marking an AtomStringIntPair table entry as a interop_atom_term_select_int default.

SET_ERROR(error_type_atom)
STRT

Str table section

SWAP_KV_PAIR(I, J)
T_DEST_REG(dreg)
TO_ATOMSHASHTABLE_VALUE(value)
TRACE(...)
TRACE_APPLY(...)
TRACE_CALL(...)
TRACE_CALL_EXT(...)
TRACE_RECEIVE(...)
TRACE_RETURN(...)
TRACE_SEND(...)
UNLIKELY(x)
UNUSED(x)
USED_BY_TRACE(x)
VALIDATE_VALUE(value, verify_function)
VERIFY_IS_ANY_INTEGER(t, opcode_name)
VERIFY_IS_BINARY(t, opcode_name)
VERIFY_IS_INTEGER(t, opcode_name)
VERIFY_IS_MATCH_OR_BINARY(t, opcode_name)
VERIFY_IS_MATCH_STATE(t, opcode_name)
VM_ABORT()
WRITE_16_UNALIGNED(ptr, val)
WRITE_16LE_UNALIGNED(t, ptr, val)
WRITE_32_UNALIGNED(ptr, val)
WRITE_32LE_UNALIGNED(t, ptr, val)
WRITE_64LE_UNALIGNED(t, ptr, val)
WRITE_REGISTER(dreg, value)