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"]
    "5" [label="atom.h" tooltip="atom.h"]
    "7" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "31" [label="bif.h" tooltip="bif.h"]
    "32" [label="bitstring.h" tooltip="bitstring.h"]
    "8" [label="context.h" tooltip="context.h"]
    "33" [label="debug.h" tooltip="debug.h"]
    "34" [label="defaultatoms.h" tooltip="defaultatoms.h"]
    "10" [label="erl_nif.h" tooltip="erl_nif.h"]
    "28" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "9" [label="globalcontext.h" tooltip="globalcontext.h"]
    "14" [label="list.h" tooltip="list.h"]
    "27" [label="mailbox.h" tooltip="mailbox.h"]
    "21" [label="memory.h" tooltip="memory.h"]
    "2" [label="module.h" tooltip="module.h"]
    "35" [label="nifs.h" tooltip="nifs.h"]
    "36" [label="opcodes.h" tooltip="opcodes.h"]
    "1" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h" fillcolor="#BFBFBF"]
    "24" [label="refc_binary.h" tooltip="refc_binary.h"]
    "25" [label="resources.h" tooltip="resources.h"]
    "37" [label="scheduler.h" tooltip="scheduler.h"]
    "15" [label="smp.h" tooltip="smp.h"]
    "38" [label="stacktrace.h" tooltip="stacktrace.h"]
    "17" [label="synclist.h" tooltip="synclist.h"]
    "19" [label="term.h" tooltip="term.h"]
    "11" [label="term_typedef.h" tooltip="term_typedef.h"]
    "26" [label="timer_list.h" tooltip="timer_list.h"]
    "39" [label="trace.h" tooltip="trace.h"]
    "22" [label="utils.h" tooltip="utils.h"]
    "29" [label="valueshashtable.h" tooltip="valueshashtable.h"]
    "30" [label="assert.h" tooltip="assert.h"]
    "13" [label="inttypes.h" tooltip="inttypes.h"]
    "12" [label="limits.h" tooltip="limits.h"]
    "16" [label="stdatomic.h" tooltip="stdatomic.h"]
    "3" [label="stdbool.h" tooltip="stdbool.h"]
    "23" [label="stddef.h" tooltip="stddef.h"]
    "4" [label="stdint.h" tooltip="stdint.h"]
    "18" [label="stdio.h" tooltip="stdio.h"]
    "6" [label="stdlib.h" tooltip="stdlib.h"]
    "20" [label="string.h" tooltip="string.h"]
    "5" -> "4" [dir=forward tooltip="include"]
    "5" -> "6" [dir=forward tooltip="include"]
    "7" -> "5" [dir=forward tooltip="include"]
    "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"]
    "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"]
    "33" -> "8" [dir=forward tooltip="include"]
    "34" -> "9" [dir=forward tooltip="include"]
    "10" -> "11" [dir=forward tooltip="include"]
    "28" -> "19" [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"]
    "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"]
    "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"]
    "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"]
    "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"]
    "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"]
    "25" -> "6" [dir=forward tooltip="include"]
    "25" -> "10" [dir=forward tooltip="include"]
    "25" -> "14" [dir=forward tooltip="include"]
    "37" -> "8" [dir=forward tooltip="include"]
    "37" -> "9" [dir=forward tooltip="include"]
    "15" -> "3" [dir=forward tooltip="include"]
    "15" -> "16" [dir=forward tooltip="include"]
    "38" -> "8" [dir=forward tooltip="include"]
    "38" -> "2" [dir=forward tooltip="include"]
    "38" -> "19" [dir=forward tooltip="include"]
    "17" -> "14" [dir=forward tooltip="include"]
    "17" -> "18" [dir=forward tooltip="include"]
    "17" -> "15" [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"]
    "11" -> "12" [dir=forward tooltip="include"]
    "11" -> "13" [dir=forward tooltip="include"]
    "11" -> "4" [dir=forward tooltip="include"]
    "26" -> "3" [dir=forward tooltip="include"]
    "26" -> "4" [dir=forward tooltip="include"]
    "26" -> "14" [dir=forward tooltip="include"]
    "22" -> "23" [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/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.c"]
    "3" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.c"]
    "1" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=back tooltip="include"]
    "1" -> "3" [dir=back tooltip="include"]
}

Defines

ENABLE_OTP21
ENABLE_OTP22
ENABLE_OTP23
ENABLE_OTP24
ENABLE_OTP25
ENABLE_OTP26
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()
T_DEST_REG(dreg_type, dreg)
DECODE_COMPACT_TERM(dest_term, code_chunk, base_index, off)
READ_DEST_REGISTER(dreg_type, dreg)
WRITE_REGISTER(dreg_type, dreg, value)
DECODE_EXTENDED_LIST_TAG(code_chunk, base_index, off)
DECODE_DEST_REGISTER(dreg, dreg_type, code_chunk, base_index, off)
DECODE_FP_REGISTER(freg, code_chunk, base_index, off)
DECODE_VALUE(val, code_chunk, base_index, off)
DECODE_ATOM(atom, code_chunk, base_index, off)
DECODE_LABEL(label, code_chunk, base_index, off)
DECODE_LITERAL(val, code_chunk, base_index, off)
DECODE_INTEGER(integer, code_chunk, base_index, off)
DECODE_XREG(reg, code_chunk, base_index, off)
DECODE_YREG(reg, code_chunk, base_index, off)
DECODE_ALLOCATOR_LIST(need, code_chunk, base_index, off)
IS_EXTENDED_ALLOCATOR(code_chunk, base_index, off)
IS_EXTENDED_FP_REGISTER(code_chunk, base_index, off)
NEXT_INSTRUCTION(operands_size)
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_I(return_value, rest_i)
PROCESS_MAYBE_TRAP_RETURN_VALUE_LAST(return_value)
INSTRUCTION_POINTER()
DO_RETURN()
POINTER_TO_II(instruction_pointer)
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, next_off)
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 int 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, uint8_t *compact_term, int *next_operand_offset)
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 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
union dreg_type_t

Public Members

term **ptr
int reg_type
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