/* * nanowasm, a tiny WebAssembly/Wasm interpreter * Copyright (C) 2023-2024 Xavier Del Campo Romero * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef OPCODES_H #define OPCODES_H enum opcode { OP_UNREACHABLE, OP_NOP, OP_BLOCK, OP_LOOP, OP_IF, OP_ELSE, OP_END = 0xb, OP_BR, OP_BR_IF, OP_BR_TABLE, OP_RETURN = 0xf, OP_CALL, OP_CALL_INDIRECT, OP_DROP = 0x1a, OP_SELECT, OP_GET_LOCAL = 0x20, OP_SET_LOCAL, OP_TEE_LOCAL, OP_GET_GLOBAL, OP_SET_GLOBAL, OP_I32_LOAD = 0x28, OP_I64_LOAD, OP_F32_LOAD, OP_F64_LOAD, OP_I32_LOAD8_S, OP_I32_LOAD8_U, OP_I32_LOAD16_S, OP_I32_LOAD16_U, OP_I64_LOAD8_S, OP_I64_LOAD8_U, OP_I64_LOAD16_S, OP_I64_LOAD16_U, OP_I64_LOAD32_S, OP_I64_LOAD32_U, OP_I32_STORE, OP_I64_STORE, OP_F32_STORE, OP_F64_STORE, OP_I32_STORE8, OP_I32_STORE16, OP_I64_STORE8, OP_I64_STORE16, OP_I64_STORE32, OP_CURRENT_MEMORY, OP_GROW_MEMORY, OP_I32_CONST, OP_I64_CONST, OP_F32_CONST, OP_F64_CONST, OP_I32_SUB = 0x6b }; #endif