#ifndef V8_WASM_MACRO_GEN_H_
#define V8_WASM_MACRO_GEN_H_
#include "src/wasm/wasm-opcodes.h"
#define U32_LE(v) …
#define U16_LE(v) …
#define WASM_MODULE_HEADER …
#define SIG_INDEX(v) …
#define FUNC_INDEX(v) …
#define EXCEPTION_INDEX(v) …
#define NO_NAME …
#define ENTRY_COUNT(v) …
#define ACTIVE_NO_INDEX …
#define PASSIVE …
#define ACTIVE_WITH_INDEX …
#define DECLARATIVE …
#define PASSIVE_WITH_ELEMENTS …
#define ACTIVE_WITH_ELEMENTS …
#define DECLARATIVE_WITH_ELEMENTS …
#define TABLE_INDEX0 …
#define TABLE_INDEX(v) …
#define ZERO_ALIGNMENT …
#define ZERO_OFFSET …
#define BR_TARGET(v) …
#define MASK_7 …
#define MASK_14 …
#define MASK_21 …
#define MASK_28 …
#define U32V_1(x) …
#define U32V_2(x) …
#define U32V_3(x) …
#define U32V_4(x) …
#define U32V_5(x) …
#define U64V_1(x) …
#define U64V_2(x) …
#define U64V_3(x) …
#define U64V_4(x) …
#define U64V_5(x) …
#define U64V_6(x) …
#define U64V_10(x) …
#define WASM_NOP …
#define WASM_END …
#define ARITY_0 …
#define ARITY_1 …
#define ARITY_2 …
#define DEPTH_0 …
#define DEPTH_1 …
#define DEPTH_2 …
#define WASM_HEAP_TYPE(heap_type) …
#define WASM_REF_TYPE(type) …
#define WASM_BLOCK(...) …
#define WASM_BLOCK_I(...) …
#define WASM_BLOCK_L(...) …
#define WASM_BLOCK_F(...) …
#define WASM_BLOCK_D(...) …
#define WASM_BLOCK_T(t, ...) …
#define WASM_BLOCK_R(type, ...) …
#define WASM_BLOCK_X(index, ...) …
#define WASM_INFINITE_LOOP …
#define WASM_LOOP(...) …
#define WASM_LOOP_I(...) …
#define WASM_LOOP_L(...) …
#define WASM_LOOP_F(...) …
#define WASM_LOOP_D(...) …
#define WASM_LOOP_T(t, ...) …
#define WASM_LOOP_R(t, ...) …
#define WASM_LOOP_X(index, ...) …
#define WASM_IF(cond, ...) …
#define WASM_IF_T(t, cond, ...) …
#define WASM_IF_R(t, cond, ...) …
#define WASM_IF_X(index, cond, ...) …
#define WASM_IF_ELSE(cond, tstmt, fstmt) …
#define WASM_IF_ELSE_I(cond, tstmt, fstmt) …
#define WASM_IF_ELSE_L(cond, tstmt, fstmt) …
#define WASM_IF_ELSE_F(cond, tstmt, fstmt) …
#define WASM_IF_ELSE_D(cond, tstmt, fstmt) …
#define WASM_IF_ELSE_T(t, cond, tstmt, fstmt) …
#define WASM_IF_ELSE_R(t, cond, tstmt, fstmt) …
#define WASM_IF_ELSE_X(index, cond, tstmt, fstmt) …
#define WASM_TRY_T(t, trystmt) …
#define WASM_TRY_CATCH_T(t, trystmt, catchstmt, except) …
#define WASM_TRY_CATCH_CATCH_T(t, trystmt, except1, catchstmt1, except2, \
catchstmt2) …
#define WASM_TRY_CATCH_R(t, trystmt, catchstmt) …
#define WASM_TRY_CATCH_ALL_T(t, trystmt, catchstmt) …
#define WASM_TRY_DELEGATE(trystmt, depth) …
#define WASM_TRY_DELEGATE_T(t, trystmt, depth) …
#define WASM_SELECT(tval, fval, cond) …
#define WASM_SELECT_I(tval, fval, cond) …
#define WASM_SELECT_L(tval, fval, cond) …
#define WASM_SELECT_F(tval, fval, cond) …
#define WASM_SELECT_D(tval, fval, cond) …
#define WASM_SELECT_R(tval, fval, cond) …
#define WASM_SELECT_A(tval, fval, cond) …
#define WASM_BR(depth) …
#define WASM_BR_IF(depth, cond) …
#define WASM_BR_IFD(depth, val, cond) …
#define WASM_CONTINUE(depth) …
#define WASM_UNREACHABLE …
#define WASM_RETURN(...) …
#define WASM_RETURN0 …
#define WASM_BR_TABLE(key, count, ...) …
#define WASM_THROW(index) …
#define WASM_STMTS(...) …
#define WASM_ZERO …
#define WASM_ONE …
#define WASM_ZERO64 …
#define WASM_ONE64 …
#define I32V_MIN(length) …
#define I32V_MAX(length) …
#define I64V_MIN(length) …
#define I64V_MAX(length) …
#define I32V_IN_RANGE(value, length) …
#define I64V_IN_RANGE(value, length) …
#define WASM_NO_LOCALS …
template <typename... Args>
std::integral_constant<size_t, sizeof...(Args)> CountArgsHelper(Args...);
#define COUNT_ARGS(...) …
template <size_t num>
struct CheckLEB1 : std::integral_constant<size_t, num> { … };
#define CHECK_LEB1(num) …
#define ADD_COUNT(...) …
#define SECTION(name, ...) …
namespace v8 {
namespace internal {
namespace wasm {
inline void CheckI32v(int32_t value, int length) { … }
inline void CheckI64v(int64_t value, int length) { … }
inline WasmOpcode LoadStoreOpcodeOf(MachineType type, bool store) { … }
inline uint16_t ExtractPrefixedOpcodeBytes(WasmOpcode opcode) { … }
}
}
}
#define WASM_I32V(val) …
#define WASM_I32V_1(val) …
#define WASM_I32V_2(val) …
#define WASM_I32V_3(val) …
#define WASM_I32V_4(val) …
#define WASM_I32V_5(val) …
#define WASM_I64V(val) …
#define WASM_I64V_1(val) …
#define WASM_I64V_2(val) …
#define WASM_I64V_3(val) …
#define WASM_I64V_4(val) …
#define WASM_I64V_5(val) …
#define WASM_I64V_6(val) …
#define WASM_I64V_7(val) …
#define WASM_I64V_8(val) …
#define WASM_I64V_9(val) …
#define WASM_I64V_10(val) …
#define WASM_F32(val) …
#define WASM_F64(val) …
#define WASM_LOCAL_GET(index) …
#define WASM_LOCAL_SET(index, val) …
#define WASM_LOCAL_TEE(index, val) …
#define WASM_DROP …
#define WASM_GLOBAL_GET(index) …
#define WASM_GLOBAL_SET(index, val) …
#define WASM_TABLE_GET(table_index, index) …
#define WASM_TABLE_SET(table_index, index, val) …
#define WASM_LOAD_MEM(type, index) …
#define WASM_STORE_MEM(type, index, val) …
#define WASM_LOAD_MEM_OFFSET(type, offset, index) …
#define WASM_STORE_MEM_OFFSET(type, offset, index, val) …
#define WASM_LOAD_MEM_ALIGNMENT(type, index, alignment) …
#define WASM_STORE_MEM_ALIGNMENT(type, index, alignment, val) …
#define WASM_F16_LOAD_MEM(index) …
#define WASM_F16_STORE_MEM(index, val) …
#define WASM_RETHROW(index) …
#define WASM_CALL_FUNCTION0(index) …
#define WASM_CALL_FUNCTION(index, ...) …
#define WASM_RETURN_CALL_FUNCTION0(index) …
#define WASM_RETURN_CALL_FUNCTION(index, ...) …
#define TABLE_ZERO …
#define WASM_GC_OP(op) …
#define WASM_STRUCT_NEW(index, ...) …
#define WASM_STRUCT_NEW_DEFAULT(index) …
#define WASM_STRUCT_GET(typeidx, fieldidx, struct_obj) …
#define WASM_STRUCT_GET_S(typeidx, fieldidx, struct_obj) …
#define WASM_STRUCT_GET_U(typeidx, fieldidx, struct_obj) …
#define WASM_STRUCT_SET(typeidx, fieldidx, struct_obj, value) …
#define WASM_REF_NULL(type_encoding) …
#define WASM_REF_FUNC(index) …
#define WASM_REF_IS_NULL(val) …
#define WASM_REF_AS_NON_NULL(val) …
#define WASM_REF_EQ(lhs, rhs) …
#define WASM_REF_TEST(ref, typeidx) …
#define WASM_REF_TEST_NULL(ref, typeidx) …
#define WASM_REF_CAST(ref, typeidx) …
#define WASM_REF_CAST_NULL(ref, typeidx) …
#define WASM_BR_ON_CAST(depth, sourcetype, targettype) …
#define WASM_BR_ON_CAST_NULL(depth, sourcetype, targettype) …
#define WASM_BR_ON_CAST_FAIL(depth, sourcetype, targettype) …
#define WASM_BR_ON_CAST_FAIL_NULL(depth, sourcetype, targettype) …
#define WASM_GC_ANY_CONVERT_EXTERN(extern) …
#define WASM_GC_EXTERN_CONVERT_ANY(ref) …
#define WASM_ARRAY_NEW(index, default_value, length) …
#define WASM_ARRAY_NEW_DEFAULT(index, length) …
#define WASM_ARRAY_GET(typeidx, array, index) …
#define WASM_ARRAY_GET_U(typeidx, array, index) …
#define WASM_ARRAY_GET_S(typeidx, array, index) …
#define WASM_ARRAY_SET(typeidx, array, index, value) …
#define WASM_ARRAY_LEN(array) …
#define WASM_ARRAY_COPY(dst_idx, src_idx, dst_array, dst_index, src_array, \
src_index, length) …
#define WASM_ARRAY_NEW_FIXED(index, length, ...) …
#define WASM_REF_I31(val) …
#define WASM_I31_GET_S(val) …
#define WASM_I31_GET_U(val) …
#define WASM_BR_ON_NULL(depth, ref_object) …
#define WASM_BR_ON_NON_NULL(depth, ref_object) …
#define WASM_CALL_INDIRECT(sig_index, ...) …
#define WASM_CALL_INDIRECT_TABLE(table, sig_index, ...) …
#define WASM_RETURN_CALL_INDIRECT(sig_index, ...) …
#define WASM_CALL_REF(func_ref, sig_index, ...) …
#define WASM_RETURN_CALL_REF(func_ref, sig_index, ...) …
#define WASM_NOT(x) …
#define WASM_SEQ(...) …
#define WASM_WHILE(x, y) …
#define WASM_INC_LOCAL(index) …
#define WASM_INC_LOCAL_BYV(index, count) …
#define WASM_INC_LOCAL_BY(index, count) …
#define WASM_UNOP(opcode, x) …
#define WASM_BINOP(opcode, x, y) …
#define WASM_I32_ADD(x, y) …
#define WASM_I32_SUB(x, y) …
#define WASM_I32_MUL(x, y) …
#define WASM_I32_DIVS(x, y) …
#define WASM_I32_DIVU(x, y) …
#define WASM_I32_REMS(x, y) …
#define WASM_I32_REMU(x, y) …
#define WASM_I32_AND(x, y) …
#define WASM_I32_IOR(x, y) …
#define WASM_I32_XOR(x, y) …
#define WASM_I32_SHL(x, y) …
#define WASM_I32_SHR(x, y) …
#define WASM_I32_SAR(x, y) …
#define WASM_I32_ROR(x, y) …
#define WASM_I32_ROL(x, y) …
#define WASM_I32_EQ(x, y) …
#define WASM_I32_NE(x, y) …
#define WASM_I32_LTS(x, y) …
#define WASM_I32_LES(x, y) …
#define WASM_I32_LTU(x, y) …
#define WASM_I32_LEU(x, y) …
#define WASM_I32_GTS(x, y) …
#define WASM_I32_GES(x, y) …
#define WASM_I32_GTU(x, y) …
#define WASM_I32_GEU(x, y) …
#define WASM_I32_CLZ(x) …
#define WASM_I32_CTZ(x) …
#define WASM_I32_POPCNT(x) …
#define WASM_I32_EQZ(x) …
#define WASM_I32_ASMJS_DIVS(x, y) …
#define WASM_I32_ASMJS_REMS(x, y) …
#define WASM_I32_ASMJS_DIVU(x, y) …
#define WASM_I32_ASMJS_REMU(x, y) …
#define WASM_I64_ADD(x, y) …
#define WASM_I64_SUB(x, y) …
#define WASM_I64_MUL(x, y) …
#define WASM_I64_DIVS(x, y) …
#define WASM_I64_DIVU(x, y) …
#define WASM_I64_REMS(x, y) …
#define WASM_I64_REMU(x, y) …
#define WASM_I64_AND(x, y) …
#define WASM_I64_IOR(x, y) …
#define WASM_I64_XOR(x, y) …
#define WASM_I64_SHL(x, y) …
#define WASM_I64_SHR(x, y) …
#define WASM_I64_SAR(x, y) …
#define WASM_I64_ROR(x, y) …
#define WASM_I64_ROL(x, y) …
#define WASM_I64_EQ(x, y) …
#define WASM_I64_NE(x, y) …
#define WASM_I64_LTS(x, y) …
#define WASM_I64_LES(x, y) …
#define WASM_I64_LTU(x, y) …
#define WASM_I64_LEU(x, y) …
#define WASM_I64_GTS(x, y) …
#define WASM_I64_GES(x, y) …
#define WASM_I64_GTU(x, y) …
#define WASM_I64_GEU(x, y) …
#define WASM_I64_CLZ(x) …
#define WASM_I64_CTZ(x) …
#define WASM_I64_POPCNT(x) …
#define WASM_I64_EQZ(x) …
#define WASM_F32_ADD(x, y) …
#define WASM_F32_SUB(x, y) …
#define WASM_F32_MUL(x, y) …
#define WASM_F32_DIV(x, y) …
#define WASM_F32_MIN(x, y) …
#define WASM_F32_MAX(x, y) …
#define WASM_F32_ABS(x) …
#define WASM_F32_NEG(x) …
#define WASM_F32_COPYSIGN(x, y) …
#define WASM_F32_CEIL(x) …
#define WASM_F32_FLOOR(x) …
#define WASM_F32_TRUNC(x) …
#define WASM_F32_NEARESTINT(x) …
#define WASM_F32_SQRT(x) …
#define WASM_F32_EQ(x, y) …
#define WASM_F32_NE(x, y) …
#define WASM_F32_LT(x, y) …
#define WASM_F32_LE(x, y) …
#define WASM_F32_GT(x, y) …
#define WASM_F32_GE(x, y) …
#define WASM_F64_ADD(x, y) …
#define WASM_F64_SUB(x, y) …
#define WASM_F64_MUL(x, y) …
#define WASM_F64_DIV(x, y) …
#define WASM_F64_MIN(x, y) …
#define WASM_F64_MAX(x, y) …
#define WASM_F64_ABS(x) …
#define WASM_F64_NEG(x) …
#define WASM_F64_COPYSIGN(x, y) …
#define WASM_F64_CEIL(x) …
#define WASM_F64_FLOOR(x) …
#define WASM_F64_TRUNC(x) …
#define WASM_F64_NEARESTINT(x) …
#define WASM_F64_SQRT(x) …
#define WASM_F64_EQ(x, y) …
#define WASM_F64_NE(x, y) …
#define WASM_F64_LT(x, y) …
#define WASM_F64_LE(x, y) …
#define WASM_F64_GT(x, y) …
#define WASM_F64_GE(x, y) …
#define WASM_I32_SCONVERT_F32(x) …
#define WASM_I32_SCONVERT_F64(x) …
#define WASM_I32_UCONVERT_F32(x) …
#define WASM_I32_UCONVERT_F64(x) …
#define WASM_I32_CONVERT_I64(x) …
#define WASM_I64_SCONVERT_F32(x) …
#define WASM_I64_SCONVERT_F64(x) …
#define WASM_I64_UCONVERT_F32(x) …
#define WASM_I64_UCONVERT_F64(x) …
#define WASM_I64_SCONVERT_I32(x) …
#define WASM_I64_UCONVERT_I32(x) …
#define WASM_F32_SCONVERT_I32(x) …
#define WASM_F32_UCONVERT_I32(x) …
#define WASM_F32_SCONVERT_I64(x) …
#define WASM_F32_UCONVERT_I64(x) …
#define WASM_F32_CONVERT_F64(x) …
#define WASM_F32_REINTERPRET_I32(x) …
#define WASM_F64_SCONVERT_I32(x) …
#define WASM_F64_UCONVERT_I32(x) …
#define WASM_F64_SCONVERT_I64(x) …
#define WASM_F64_UCONVERT_I64(x) …
#define WASM_F64_CONVERT_F32(x) …
#define WASM_F64_REINTERPRET_I64(x) …
#define WASM_I32_REINTERPRET_F32(x) …
#define WASM_I64_REINTERPRET_F64(x) …
#define WASM_NUMERIC_OP(op) …
#define WASM_I32_SCONVERT_SAT_F32(x) …
#define WASM_I32_UCONVERT_SAT_F32(x) …
#define WASM_I32_SCONVERT_SAT_F64(x) …
#define WASM_I32_UCONVERT_SAT_F64(x) …
#define WASM_I64_SCONVERT_SAT_F32(x) …
#define WASM_I64_UCONVERT_SAT_F32(x) …
#define WASM_I64_SCONVERT_SAT_F64(x) …
#define WASM_I64_UCONVERT_SAT_F64(x) …
#define MEMORY_ZERO …
#define WASM_MEMORY_INIT(seg, dst, src, size) …
#define WASM_DATA_DROP(seg) …
#define WASM_MEMORY0_COPY(dst, src, size) …
#define WASM_MEMORY_COPY(dst_index, src_index, dst, src, size) …
#define WASM_MEMORY_FILL(dst, val, size) …
#define WASM_TABLE_INIT(table, seg, dst, src, size) …
#define WASM_ELEM_DROP(seg) …
#define WASM_TABLE_COPY(table_dst, table_src, dst, src, size) …
#define WASM_TABLE_GROW(table, initial_value, delta) …
#define WASM_TABLE_SIZE(table) …
#define WASM_TABLE_FILL(table, times, value, start) …
#define WASM_MEMORY_GROW(x) …
#define WASM_MEMORY_SIZE …
#define SIG_ENTRY_v_v …
#define SIZEOF_SIG_ENTRY_v_v …
#define SIG_ENTRY_v_x(a) …
#define SIG_ENTRY_v_xx(a, b) …
#define SIG_ENTRY_v_xxx(a, b, c) …
#define SIZEOF_SIG_ENTRY_v_x …
#define SIZEOF_SIG_ENTRY_v_xx …
#define SIZEOF_SIG_ENTRY_v_xxx …
#define SIG_ENTRY_x(r) …
#define SIG_ENTRY_x_x(r, a) …
#define SIG_ENTRY_x_xx(r, a, b) …
#define SIG_ENTRY_xx_xx(r, s, a, b) …
#define SIG_ENTRY_x_xxx(r, a, b, c) …
#define SIZEOF_SIG_ENTRY_x …
#define SIZEOF_SIG_ENTRY_x_x …
#define SIZEOF_SIG_ENTRY_x_xx …
#define SIZEOF_SIG_ENTRY_xx_xx …
#define SIZEOF_SIG_ENTRY_x_xxx …
#define WASM_BRV(depth, ...) …
#define WASM_BRV_IF(depth, val, cond) …
#define WASM_BRV_IFD(depth, val, cond) …
#define WASM_ATOMICS_OP(op) …
#define WASM_ATOMICS_BINOP(op, x, y, representation) …
#define WASM_ATOMICS_TERNARY_OP(op, x, y, z, representation) …
#define WASM_ATOMICS_LOAD_OP(op, x, representation) …
#define WASM_ATOMICS_STORE_OP(op, x, y, representation) …
#define WASM_ATOMICS_WAIT(op, index, value, timeout, alignment, offset) …
#define WASM_ATOMICS_FENCE …
#define WASM_I32_SIGN_EXT_I8(x) …
#define WASM_I32_SIGN_EXT_I16(x) …
#define WASM_I64_SIGN_EXT_I8(x) …
#define WASM_I64_SIGN_EXT_I16(x) …
#define WASM_I64_SIGN_EXT_I32(x) …
#define TO_BYTE(val) …
#define WASM_SIMD_OP(op) …
#define WASM_SIMD_OPN(op, ...) …
#define WASM_SIMD_SPLAT(Type, ...) …
#define WASM_SIMD_UNOP(op, x) …
#define WASM_SIMD_BINOP(op, x, y) …
#define WASM_SIMD_TERNOP(op, x, y, z) …
#define WASM_SIMD_SHIFT_OP(op, x, y) …
#define WASM_SIMD_CONCAT_OP(op, bytes, x, y) …
#define WASM_SIMD_SELECT(format, x, y, z) …
#define WASM_SIMD_CONSTANT(v) …
#define WASM_SIMD_F64x2_SPLAT(x) …
#define WASM_SIMD_F64x2_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_F64x2_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_F32x4_SPLAT(x) …
#define WASM_SIMD_F32x4_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_F32x4_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_F16x8_SPLAT(x) …
#define WASM_SIMD_F16x8_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_F16x8_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_I64x2_SPLAT(x) …
#define WASM_SIMD_I64x2_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_I64x2_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_I32x4_SPLAT(x) …
#define WASM_SIMD_I32x4_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_I32x4_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_I16x8_SPLAT(x) …
#define WASM_SIMD_I16x8_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_I16x8_EXTRACT_LANE_U(lane, x) …
#define WASM_SIMD_I16x8_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_I8x16_SPLAT(x) …
#define WASM_SIMD_I8x16_EXTRACT_LANE(lane, x) …
#define WASM_SIMD_I8x16_EXTRACT_LANE_U(lane, x) …
#define WASM_SIMD_I8x16_REPLACE_LANE(lane, x, y) …
#define WASM_SIMD_I8x16_SHUFFLE_OP(opcode, m, x, y) …
#define WASM_SIMD_LOAD_MEM(index) …
#define WASM_SIMD_LOAD_MEM_OFFSET(offset, index) …
#define WASM_SIMD_STORE_MEM(index, val) …
#define WASM_SIMD_STORE_MEM_OFFSET(offset, index, val) …
#define WASM_SIMD_F64x2_QFMA(a, b, c) …
#define WASM_SIMD_F64x2_QFMS(a, b, c) …
#define WASM_SIMD_F32x4_QFMA(a, b, c) …
#define WASM_SIMD_F32x4_QFMS(a, b, c) …
#define WASM_SIMD_F16x8_QFMA(a, b, c) …
#define WASM_SIMD_F16x8_QFMS(a, b, c) …
#define WASM_SIMD_LOAD_OP(opcode, index) …
#define WASM_SIMD_LOAD_OP_OFFSET(opcode, index, offset) …
#define WASM_SIMD_LOAD_OP_ALIGNMENT(opcode, index, alignment) …
#ifdef V8_TARGET_BIG_ENDIAN
#define LANE …
#else
#define LANE(ptr, index) …
#endif
#define COMPILE_STRATEGY_DEFAULT …
#define COMPILE_STRATEGY_LAZY …
#define COMPILE_STRATEGY_EAGER …
#define BASELINE_TIER_DEFAULT …
#define BASELINE_TIER_BASELINE …
#define BASELINE_TIER_OPTIMIZED …
#define TOP_TIER_DEFAULT …
#define TOP_TIER_BASELINE …
#define TOP_TIER_OPTIMIZED …
#endif