opcodesswitch.h

Include dependency graph for opcodesswitch.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="stdbool.h" tooltip="stdbool.h"]
    "31" [label="bif.h" tooltip="bif.h"]
    "16" [label="stdatomic.h" tooltip="stdatomic.h"]
    "32" [label="bitstring.h" tooltip="bitstring.h"]
    "5" [label="atom.h" tooltip="atom.h"]
    "39" [label="trace.h" tooltip="trace.h"]
    "30" [label="assert.h" tooltip="assert.h"]
    "17" [label="synclist.h" tooltip="synclist.h"]
    "34" [label="defaultatoms.h" tooltip="defaultatoms.h"]
    "4" [label="stdint.h" tooltip="stdint.h"]
    "6" [label="stdlib.h" tooltip="stdlib.h"]
    "29" [label="valueshashtable.h" tooltip="valueshashtable.h"]
    "37" [label="scheduler.h" tooltip="scheduler.h"]
    "28" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "8" [label="context.h" tooltip="context.h"]
    "22" [label="utils.h" tooltip="utils.h"]
    "11" [label="term_typedef.h" tooltip="term_typedef.h"]
    "23" [label="stddef.h" tooltip="stddef.h"]
    "12" [label="limits.h" tooltip="limits.h"]
    "38" [label="stacktrace.h" tooltip="stacktrace.h"]
    "24" [label="refc_binary.h" tooltip="refc_binary.h"]
    "20" [label="string.h" tooltip="string.h"]
    "27" [label="mailbox.h" tooltip="mailbox.h"]
    "2" [label="module.h" tooltip="module.h"]
    "19" [label="term.h" tooltip="term.h"]
    "10" [label="erl_nif.h" tooltip="erl_nif.h"]
    "36" [label="opcodes.h" tooltip="opcodes.h"]
    "25" [label="resources.h" tooltip="resources.h"]
    "15" [label="smp.h" tooltip="smp.h"]
    "7" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "35" [label="nifs.h" tooltip="nifs.h"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h" fillcolor="#BFBFBF"]
    "33" [label="debug.h" tooltip="debug.h"]
    "9" [label="globalcontext.h" tooltip="globalcontext.h"]
    "21" [label="memory.h" tooltip="memory.h"]
    "18" [label="stdio.h" tooltip="stdio.h"]
    "26" [label="timer_list.h" tooltip="timer_list.h"]
    "14" [label="list.h" tooltip="list.h"]
    "13" [label="inttypes.h" tooltip="inttypes.h"]
    "31" -> "3" [dir=forward tooltip="include"]
    "31" -> "5" [dir=forward tooltip="include"]
    "31" -> "8" [dir=forward tooltip="include"]
    "31" -> "28" [dir=forward tooltip="include"]
    "31" -> "2" [dir=forward tooltip="include"]
    "32" -> "19" [dir=forward tooltip="include"]
    "32" -> "3" [dir=forward tooltip="include"]
    "32" -> "4" [dir=forward tooltip="include"]
    "5" -> "4" [dir=forward tooltip="include"]
    "5" -> "6" [dir=forward tooltip="include"]
    "17" -> "14" [dir=forward tooltip="include"]
    "17" -> "18" [dir=forward tooltip="include"]
    "17" -> "15" [dir=forward tooltip="include"]
    "34" -> "9" [dir=forward tooltip="include"]
    "37" -> "8" [dir=forward tooltip="include"]
    "37" -> "9" [dir=forward tooltip="include"]
    "28" -> "19" [dir=forward tooltip="include"]
    "8" -> "9" [dir=forward tooltip="include"]
    "8" -> "14" [dir=forward tooltip="include"]
    "8" -> "27" [dir=forward tooltip="include"]
    "8" -> "15" [dir=forward tooltip="include"]
    "8" -> "19" [dir=forward tooltip="include"]
    "8" -> "26" [dir=forward tooltip="include"]
    "22" -> "23" [dir=forward tooltip="include"]
    "11" -> "12" [dir=forward tooltip="include"]
    "11" -> "13" [dir=forward tooltip="include"]
    "11" -> "4" [dir=forward tooltip="include"]
    "38" -> "8" [dir=forward tooltip="include"]
    "38" -> "2" [dir=forward tooltip="include"]
    "38" -> "19" [dir=forward tooltip="include"]
    "24" -> "3" [dir=forward tooltip="include"]
    "24" -> "6" [dir=forward tooltip="include"]
    "24" -> "14" [dir=forward tooltip="include"]
    "24" -> "25" [dir=forward tooltip="include"]
    "24" -> "15" [dir=forward tooltip="include"]
    "27" -> "3" [dir=forward tooltip="include"]
    "27" -> "14" [dir=forward tooltip="include"]
    "27" -> "15" [dir=forward tooltip="include"]
    "27" -> "11" [dir=forward tooltip="include"]
    "27" -> "22" [dir=forward tooltip="include"]
    "2" -> "3" [dir=forward tooltip="include"]
    "2" -> "4" [dir=forward tooltip="include"]
    "2" -> "5" [dir=forward tooltip="include"]
    "2" -> "7" [dir=forward tooltip="include"]
    "2" -> "8" [dir=forward tooltip="include"]
    "2" -> "28" [dir=forward tooltip="include"]
    "2" -> "9" [dir=forward tooltip="include"]
    "2" -> "19" [dir=forward tooltip="include"]
    "2" -> "29" [dir=forward tooltip="include"]
    "19" -> "3" [dir=forward tooltip="include"]
    "19" -> "4" [dir=forward tooltip="include"]
    "19" -> "18" [dir=forward tooltip="include"]
    "19" -> "6" [dir=forward tooltip="include"]
    "19" -> "20" [dir=forward tooltip="include"]
    "19" -> "21" [dir=forward tooltip="include"]
    "19" -> "24" [dir=forward tooltip="include"]
    "19" -> "22" [dir=forward tooltip="include"]
    "19" -> "11" [dir=forward tooltip="include"]
    "10" -> "11" [dir=forward tooltip="include"]
    "25" -> "6" [dir=forward tooltip="include"]
    "25" -> "10" [dir=forward tooltip="include"]
    "25" -> "14" [dir=forward tooltip="include"]
    "25" -> "21" [dir=forward tooltip="include"]
    "15" -> "3" [dir=forward tooltip="include"]
    "15" -> "16" [dir=forward tooltip="include"]
    "7" -> "5" [dir=forward tooltip="include"]
    "35" -> "5" [dir=forward tooltip="include"]
    "35" -> "8" [dir=forward tooltip="include"]
    "35" -> "28" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "30" [dir=forward tooltip="include"]
    "1" -> "20" [dir=forward tooltip="include"]
    "1" -> "31" [dir=forward tooltip="include"]
    "1" -> "32" [dir=forward tooltip="include"]
    "1" -> "33" [dir=forward tooltip="include"]
    "1" -> "34" [dir=forward tooltip="include"]
    "1" -> "28" [dir=forward tooltip="include"]
    "1" -> "35" [dir=forward tooltip="include"]
    "1" -> "36" [dir=forward tooltip="include"]
    "1" -> "37" [dir=forward tooltip="include"]
    "1" -> "22" [dir=forward tooltip="include"]
    "1" -> "27" [dir=forward tooltip="include"]
    "1" -> "38" [dir=forward tooltip="include"]
    "1" -> "39" [dir=forward tooltip="include"]
    "33" -> "8" [dir=forward tooltip="include"]
    "9" -> "4" [dir=forward tooltip="include"]
    "9" -> "5" [dir=forward tooltip="include"]
    "9" -> "10" [dir=forward tooltip="include"]
    "9" -> "14" [dir=forward tooltip="include"]
    "9" -> "15" [dir=forward tooltip="include"]
    "9" -> "17" [dir=forward tooltip="include"]
    "9" -> "19" [dir=forward tooltip="include"]
    "9" -> "26" [dir=forward tooltip="include"]
    "21" -> "10" [dir=forward tooltip="include"]
    "21" -> "11" [dir=forward tooltip="include"]
    "21" -> "22" [dir=forward tooltip="include"]
    "21" -> "4" [dir=forward tooltip="include"]
    "21" -> "6" [dir=forward tooltip="include"]
    "26" -> "3" [dir=forward tooltip="include"]
    "26" -> "4" [dir=forward tooltip="include"]
    "26" -> "14" [dir=forward tooltip="include"]
}

This graph shows which files directly or indirectly include opcodesswitch.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.c"]
    "3" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.c"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=back tooltip="include"]
    "1" -> "3" [dir=back tooltip="include"]
}

Defines

MINIMUM_OTP_COMPILER_VERSION
MAXIMUM_OTP_COMPILER_VERSION
COMPACT_LITERAL
COMPACT_INTEGER
COMPACT_ATOM
COMPACT_XREG
COMPACT_YREG
COMPACT_LABEL
COMPACT_EXTENDED
COMPACT_LARGE_LITERAL
COMPACT_LARGE_INTEGER
COMPACT_LARGE_ATOM
COMPACT_LARGE_YREG
COMPACT_EXTENDED_LIST
COMPACT_EXTENDED_FP_REGISTER
COMPACT_EXTENDED_ALLOCATION_LIST
COMPACT_EXTENDED_LITERAL
COMPACT_EXTENDED_TYPED_REGISTER
COMPACT_EXTENDED_ALLOCATOR_LIST_TAG_WORDS
COMPACT_EXTENDED_ALLOCATOR_LIST_TAG_FLOATS
COMPACT_EXTENDED_ALLOCATOR_LIST_TAG_FUNS
COMPACT_LARGE_IMM_MASK
COMPACT_11BITS_VALUE
COMPACT_NBITS_VALUE
SET_ERROR(error_type_atom)
RAISE_ERROR(error_type_atom)
VM_ABORT()
DEST_REGISTER(reg)
GC_SAFE_DEST_REGISTER(reg)
T_DEST_REG(dreg)
T_DEST_REG_GC_SAFE(dreg_gc_safe)
DECODE_COMPACT_TERM(dest_term, decode_pc)
READ_DEST_REGISTER(dreg)
READ_DEST_REGISTER_GC_SAFE(dreg_gc_safe)
WRITE_REGISTER(dreg, value)
WRITE_REGISTER_GC_SAFE(dreg_gc_safe, value)
DECODE_EXTENDED_LIST_TAG(decode_pc)
DECODE_DEST_REGISTER(dreg, decode_pc)
DECODE_DEST_REGISTER_GC_SAFE(dreg_gc_safe, decode_pc)
DECODE_FP_REGISTER(freg, decode_pc)
DECODE_VALUE(val, decode_pc)
DECODE_ATOM(atom, decode_pc)
DECODE_LABEL(label, decode_pc)
DECODE_LITERAL(val, decode_pc)
DECODE_INTEGER(integer, decode_pc)
DECODE_XREG(reg, decode_pc)
DECODE_YREG(reg, decode_pc)
DECODE_ALLOCATOR_LIST(need, decode_pc)
IS_EXTENDED_ALLOCATOR(decode_pc)
IS_EXTENDED_FP_REGISTER(decode_pc)
JUMP_TO_LABEL(module, label)
JUMP_TO_ADDRESS(address)
SCHEDULE_NEXT(restore_mod, restore_to)
PROCESS_SIGNAL_MESSAGES()
PROCESS_MAYBE_TRAP_RETURN_VALUE(return_value)
PROCESS_MAYBE_TRAP_RETURN_VALUE_RESTORE_PC(return_value, rest_pc)
PROCESS_MAYBE_TRAP_RETURN_VALUE_LAST(return_value)
DO_RETURN()
HANDLE_ERROR()
VERIFY_IS_INTEGER(t, opcode_name)
VERIFY_IS_ANY_INTEGER(t, opcode_name)
VERIFY_IS_BINARY(t, opcode_name)
VERIFY_IS_MATCH_STATE(t, opcode_name)
VERIFY_IS_MATCH_OR_BINARY(t, opcode_name)
CALL_FUN(fun, args_count)
DECODE_FLAGS_LIST(flags_value, flags, opcode)
MIN(X, Y)
SWAP_KV_PAIR(I, J)
TRACE_APPLY(...)
TRACE_CALL(...)
TRACE_CALL_EXT(...)
TRACE_RETURN(...)
TRACE_SEND(...)
TRACE_RECEIVE(...)

Typedefs

typedef term *dreg_t

Functions

static bool sort_kv_pairs(struct kv_pair *kv, int size, GlobalContext *global)
static int get_catch_label_and_change_module(Context *ctx, Module **mod)
static COLD_FUNC void cp_to_mod_lbl_off (term cp, Context *ctx, Module **cp_mod, int *label, int *l_off)
static COLD_FUNC void dump (Context *ctx)
static term maybe_alloc_boxed_integer_fragment(Context *ctx, avm_int64_t value)
static inline term maybe_alloc_boxed_integer_fragment_helper(Context *ctx, avm_int64_t value, unsigned int bytes_count)
static term large_integer_to_term(Context *ctx, int num_bytes, const uint8_t *compact_term)
term make_fun(Context *ctx, const Module *mod, int fun_index)
static bool maybe_call_native(Context *ctx, AtomString module_name, AtomString function_name, int arity, term *return_value)
memcpy (tmp_atom_name+1, function_name, function_len)
free(tmp_atom_name)
if (UNLIKELY(!label))
scheduler_init_ready(ctx)
return scheduler_entry_point (ctx->global)
HOT_FUNC int scheduler_entry_point (GlobalContext *glb)

Variables

int function_len = strlen(function_name)
uint8_t *tmp_atom_name = malloc(function_len + 1)
int label = module_search_exported_function(mod, tmp_atom_name, arity, ctx->global)
ctx saved_module = mod
ctx cp = module_address(mod->module_index, mod->end_instruction_ii)
ctx saved_ip = mod->labels[label]
ctx global running_schedulers   = 1
struct dreg_gc_safe_t

Public Members

term *base
int index
struct Int24

Public Members

int32_t val24
struct Int40

Public Members

int64_t val40
struct Int48

Public Members

int64_t val48
struct Int56

Public Members

int64_t val56
struct kv_pair

Public Members

term key
term value