Wasm instruction opcodes
All instructions are defined as per spec: https://webassembly.github.io/spec/core/appendix/index-instructions.html
@"unreachable" = 0x00nop = 0x01block = 0x02loop = 0x03@"if" = 0x04@"else" = 0x05end = 0x0Bbr = 0x0Cbr_if = 0x0Dbr_table = 0x0E@"return" = 0x0Fcall = 0x10call_indirect = 0x11drop = 0x1Aselect = 0x1Blocal_get = 0x20local_set = 0x21local_tee = 0x22global_get = 0x23global_set = 0x24i32_load = 0x28i64_load = 0x29f32_load = 0x2Af64_load = 0x2Bi32_load8_s = 0x2Ci32_load8_u = 0x2Di32_load16_s = 0x2Ei32_load16_u = 0x2Fi64_load8_s = 0x30i64_load8_u = 0x31i64_load16_s = 0x32i64_load16_u = 0x33i64_load32_s = 0x34i64_load32_u = 0x35i32_store = 0x36i64_store = 0x37f32_store = 0x38f64_store = 0x39i32_store8 = 0x3Ai32_store16 = 0x3Bi64_store8 = 0x3Ci64_store16 = 0x3Di64_store32 = 0x3Ememory_size = 0x3Fmemory_grow = 0x40i32_const = 0x41i64_const = 0x42f32_const = 0x43f64_const = 0x44i32_eqz = 0x45i32_eq = 0x46i32_ne = 0x47i32_lt_s = 0x48i32_lt_u = 0x49i32_gt_s = 0x4Ai32_gt_u = 0x4Bi32_le_s = 0x4Ci32_le_u = 0x4Di32_ge_s = 0x4Ei32_ge_u = 0x4Fi64_eqz = 0x50i64_eq = 0x51i64_ne = 0x52i64_lt_s = 0x53i64_lt_u = 0x54i64_gt_s = 0x55i64_gt_u = 0x56i64_le_s = 0x57i64_le_u = 0x58i64_ge_s = 0x59i64_ge_u = 0x5Af32_eq = 0x5Bf32_ne = 0x5Cf32_lt = 0x5Df32_gt = 0x5Ef32_le = 0x5Ff32_ge = 0x60f64_eq = 0x61f64_ne = 0x62f64_lt = 0x63f64_gt = 0x64f64_le = 0x65f64_ge = 0x66i32_clz = 0x67i32_ctz = 0x68i32_popcnt = 0x69i32_add = 0x6Ai32_sub = 0x6Bi32_mul = 0x6Ci32_div_s = 0x6Di32_div_u = 0x6Ei32_rem_s = 0x6Fi32_rem_u = 0x70i32_and = 0x71i32_or = 0x72i32_xor = 0x73i32_shl = 0x74i32_shr_s = 0x75i32_shr_u = 0x76i32_rotl = 0x77i32_rotr = 0x78i64_clz = 0x79i64_ctz = 0x7Ai64_popcnt = 0x7Bi64_add = 0x7Ci64_sub = 0x7Di64_mul = 0x7Ei64_div_s = 0x7Fi64_div_u = 0x80i64_rem_s = 0x81i64_rem_u = 0x82i64_and = 0x83i64_or = 0x84i64_xor = 0x85i64_shl = 0x86i64_shr_s = 0x87i64_shr_u = 0x88i64_rotl = 0x89i64_rotr = 0x8Af32_abs = 0x8Bf32_neg = 0x8Cf32_ceil = 0x8Df32_floor = 0x8Ef32_trunc = 0x8Ff32_nearest = 0x90f32_sqrt = 0x91f32_add = 0x92f32_sub = 0x93f32_mul = 0x94f32_div = 0x95f32_min = 0x96f32_max = 0x97f32_copysign = 0x98f64_abs = 0x99f64_neg = 0x9Af64_ceil = 0x9Bf64_floor = 0x9Cf64_trunc = 0x9Df64_nearest = 0x9Ef64_sqrt = 0x9Ff64_add = 0xA0f64_sub = 0xA1f64_mul = 0xA2f64_div = 0xA3f64_min = 0xA4f64_max = 0xA5f64_copysign = 0xA6i32_wrap_i64 = 0xA7i32_trunc_f32_s = 0xA8i32_trunc_f32_u = 0xA9i32_trunc_f64_s = 0xAAi32_trunc_f64_u = 0xABi64_extend_i32_s = 0xACi64_extend_i32_u = 0xADi64_trunc_f32_s = 0xAEi64_trunc_f32_u = 0xAFi64_trunc_f64_s = 0xB0i64_trunc_f64_u = 0xB1f32_convert_i32_s = 0xB2f32_convert_i32_u = 0xB3f32_convert_i64_s = 0xB4f32_convert_i64_u = 0xB5f32_demote_f64 = 0xB6f64_convert_i32_s = 0xB7f64_convert_i32_u = 0xB8f64_convert_i64_s = 0xB9f64_convert_i64_u = 0xBAf64_promote_f32 = 0xBBi32_reinterpret_f32 = 0xBCi64_reinterpret_f64 = 0xBDf32_reinterpret_i32 = 0xBEf64_reinterpret_i64 = 0xBFi32_extend8_s = 0xC0i32_extend16_s = 0xC1i64_extend8_s = 0xC2i64_extend16_s = 0xC3i64_extend32_s = 0xC4misc_prefix = 0xFCsimd_prefix = 0xFDatomics_prefix = 0xFE_pub const Opcode = enum(u8) {
@"unreachable" = 0x00,
nop = 0x01,
block = 0x02,
loop = 0x03,
@"if" = 0x04,
@"else" = 0x05,
end = 0x0B,
br = 0x0C,
br_if = 0x0D,
br_table = 0x0E,
@"return" = 0x0F,
call = 0x10,
call_indirect = 0x11,
drop = 0x1A,
select = 0x1B,
local_get = 0x20,
local_set = 0x21,
local_tee = 0x22,
global_get = 0x23,
global_set = 0x24,
i32_load = 0x28,
i64_load = 0x29,
f32_load = 0x2A,
f64_load = 0x2B,
i32_load8_s = 0x2C,
i32_load8_u = 0x2D,
i32_load16_s = 0x2E,
i32_load16_u = 0x2F,
i64_load8_s = 0x30,
i64_load8_u = 0x31,
i64_load16_s = 0x32,
i64_load16_u = 0x33,
i64_load32_s = 0x34,
i64_load32_u = 0x35,
i32_store = 0x36,
i64_store = 0x37,
f32_store = 0x38,
f64_store = 0x39,
i32_store8 = 0x3A,
i32_store16 = 0x3B,
i64_store8 = 0x3C,
i64_store16 = 0x3D,
i64_store32 = 0x3E,
memory_size = 0x3F,
memory_grow = 0x40,
i32_const = 0x41,
i64_const = 0x42,
f32_const = 0x43,
f64_const = 0x44,
i32_eqz = 0x45,
i32_eq = 0x46,
i32_ne = 0x47,
i32_lt_s = 0x48,
i32_lt_u = 0x49,
i32_gt_s = 0x4A,
i32_gt_u = 0x4B,
i32_le_s = 0x4C,
i32_le_u = 0x4D,
i32_ge_s = 0x4E,
i32_ge_u = 0x4F,
i64_eqz = 0x50,
i64_eq = 0x51,
i64_ne = 0x52,
i64_lt_s = 0x53,
i64_lt_u = 0x54,
i64_gt_s = 0x55,
i64_gt_u = 0x56,
i64_le_s = 0x57,
i64_le_u = 0x58,
i64_ge_s = 0x59,
i64_ge_u = 0x5A,
f32_eq = 0x5B,
f32_ne = 0x5C,
f32_lt = 0x5D,
f32_gt = 0x5E,
f32_le = 0x5F,
f32_ge = 0x60,
f64_eq = 0x61,
f64_ne = 0x62,
f64_lt = 0x63,
f64_gt = 0x64,
f64_le = 0x65,
f64_ge = 0x66,
i32_clz = 0x67,
i32_ctz = 0x68,
i32_popcnt = 0x69,
i32_add = 0x6A,
i32_sub = 0x6B,
i32_mul = 0x6C,
i32_div_s = 0x6D,
i32_div_u = 0x6E,
i32_rem_s = 0x6F,
i32_rem_u = 0x70,
i32_and = 0x71,
i32_or = 0x72,
i32_xor = 0x73,
i32_shl = 0x74,
i32_shr_s = 0x75,
i32_shr_u = 0x76,
i32_rotl = 0x77,
i32_rotr = 0x78,
i64_clz = 0x79,
i64_ctz = 0x7A,
i64_popcnt = 0x7B,
i64_add = 0x7C,
i64_sub = 0x7D,
i64_mul = 0x7E,
i64_div_s = 0x7F,
i64_div_u = 0x80,
i64_rem_s = 0x81,
i64_rem_u = 0x82,
i64_and = 0x83,
i64_or = 0x84,
i64_xor = 0x85,
i64_shl = 0x86,
i64_shr_s = 0x87,
i64_shr_u = 0x88,
i64_rotl = 0x89,
i64_rotr = 0x8A,
f32_abs = 0x8B,
f32_neg = 0x8C,
f32_ceil = 0x8D,
f32_floor = 0x8E,
f32_trunc = 0x8F,
f32_nearest = 0x90,
f32_sqrt = 0x91,
f32_add = 0x92,
f32_sub = 0x93,
f32_mul = 0x94,
f32_div = 0x95,
f32_min = 0x96,
f32_max = 0x97,
f32_copysign = 0x98,
f64_abs = 0x99,
f64_neg = 0x9A,
f64_ceil = 0x9B,
f64_floor = 0x9C,
f64_trunc = 0x9D,
f64_nearest = 0x9E,
f64_sqrt = 0x9F,
f64_add = 0xA0,
f64_sub = 0xA1,
f64_mul = 0xA2,
f64_div = 0xA3,
f64_min = 0xA4,
f64_max = 0xA5,
f64_copysign = 0xA6,
i32_wrap_i64 = 0xA7,
i32_trunc_f32_s = 0xA8,
i32_trunc_f32_u = 0xA9,
i32_trunc_f64_s = 0xAA,
i32_trunc_f64_u = 0xAB,
i64_extend_i32_s = 0xAC,
i64_extend_i32_u = 0xAD,
i64_trunc_f32_s = 0xAE,
i64_trunc_f32_u = 0xAF,
i64_trunc_f64_s = 0xB0,
i64_trunc_f64_u = 0xB1,
f32_convert_i32_s = 0xB2,
f32_convert_i32_u = 0xB3,
f32_convert_i64_s = 0xB4,
f32_convert_i64_u = 0xB5,
f32_demote_f64 = 0xB6,
f64_convert_i32_s = 0xB7,
f64_convert_i32_u = 0xB8,
f64_convert_i64_s = 0xB9,
f64_convert_i64_u = 0xBA,
f64_promote_f32 = 0xBB,
i32_reinterpret_f32 = 0xBC,
i64_reinterpret_f64 = 0xBD,
f32_reinterpret_i32 = 0xBE,
f64_reinterpret_i64 = 0xBF,
i32_extend8_s = 0xC0,
i32_extend16_s = 0xC1,
i64_extend8_s = 0xC2,
i64_extend16_s = 0xC3,
i64_extend32_s = 0xC4,
misc_prefix = 0xFC,
simd_prefix = 0xFD,
atomics_prefix = 0xFE,
_,
}