quick and dirty pure lua webassembly interpreter
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

opcodes

arthomnix c0f8e293

+189
+189
constants.lua
··· 1 + opcodes = { 2 + -- Control 3 + OP_UNREACHABLE = 0x00 4 + OP_NOP = 0x01 5 + OP_BLOCK = 0x02 6 + OP_LOOP = 0x03 7 + OP_IF = 0x04 8 + OP_ELSE = 0x05 9 + OP_END = 0x0B 10 + OP_BR = 0x0C 11 + OP_BR_IF = 0x0D 12 + OP_BR_TABLE = 0x0E 13 + OP_RETURN = 0x0F 14 + OP_CALL = 0x10 15 + OP_CALL_INDIRECT = 0x11 16 + -- Parametric 17 + OP_DROP = 0x1A 18 + OP_SELECT = 0x1B 19 + -- Variable 20 + OP_LOCAL_GET = 0x20 21 + OP_LOCAL_SET = 0x21 22 + OP_LOCAL_TEE = 0x22 23 + OP_GLOBAL_GET = 0x23 24 + OP_GLOBAL_SET = 0x24 25 + -- Memory 26 + OP_I32_LOAD = 0x28 27 + OP_I64_LOAD = 0x29 28 + OP_F32_LOAD = 0x2A 29 + OP_F64_LOAD = 0x2B 30 + OP_I32_LOAD8_S = 0x2C 31 + OP_I32_LOAD8_U = 0x2D 32 + OP_I32_LOAD16_S = 0x2E 33 + OP_I32_LOAD16_U = 0x2F 34 + OP_I64_LOAD8_S = 0x30 35 + OP_I64_LOAD8_U = 0x31 36 + OP_I64_LOAD16_S = 0x32 37 + OP_I64_LOAD16_U = 0x33 38 + OP_I64_LOAD32_S = 0x34 39 + OP_I64_LOAD32_U = 0x35 40 + OP_I32_STORE = 0x36 41 + OP_I64_STORE = 0x37 42 + OP_F32_STORE = 0x38 43 + OP_F64_STORE = 0x39 44 + OP_I32_STORE8 = 0x3A 45 + OP_I32_STORE16 = 0x3B 46 + OP_I64_STORE8 = 0x3C 47 + OP_I64_STORE16 = 0x3D 48 + OP_I64_STORE32 = 0x3E 49 + OP_MEMORY_SIZE = 0x3F 50 + OP_MEMORY_GROW = 0x40 51 + -- Numeric Constants 52 + OP_I32_CONST = 0x41 53 + OP_I64_CONST = 0x42 54 + OP_F32_CONST = 0x43 55 + OP_F64_CONST = 0x44 56 + -- Numeric Operations 57 + --- i32 comparisons 58 + OP_I32_EQZ = 0x45 59 + OP_I32_EQ = 0x46 60 + OP_I32_NE = 0x47 61 + OP_I32_LT_S = 0x48 62 + OP_I32_LT_U = 0x49 63 + OP_I32_GT_S = 0x50 64 + OP_I32_GT_U = 0x51 65 + OP_I32_LE_S = 0x52 66 + OP_I32_LE_U = 0x53 67 + OP_I32_GE_S = 0x54 68 + OP_I32_GE_U = 0x55 69 + --- i64 comparisons 70 + OP_I64_EQZ = 0x50 71 + OP_I64_EQ = 0x51 72 + OP_I64_NE = 0x52 73 + OP_I64_LT_S = 0x53 74 + OP_I64_LT_U = 0x54 75 + OP_I64_GT_S = 0x55 76 + OP_I64_GT_U = 0x56 77 + OP_I64_LE_S = 0x57 78 + OP_I64_LE_U = 0x58 79 + OP_I64_GE_S = 0x59 80 + OP_I64_GE_U = 0x5A 81 + --- f32 comparisons 82 + OP_F32_EQ = 0x5B 83 + OP_F32_NE = 0x5C 84 + OP_F32_LT = 0x5D 85 + OP_F32_GT = 0x5E 86 + OP_F32_LE = 0x5F 87 + OP_F32_GE = 0x60 88 + --- f64 comparisons 89 + OP_F64_EQ = 0x61 90 + OP_F64_NE = 0x62 91 + OP_F64_LT = 0x63 92 + OP_F64_GT = 0x64 93 + OP_F64_LE = 0x65 94 + OP_F64_GE = 0x66 95 + --- i32 operations 96 + OP_I32_CLZ = 0x67 97 + OP_I32_CTZ = 0x68 98 + OP_I32_POPCNT = 0x69 99 + OP_I32_ADD = 0x6A 100 + OP_I32_SUB = 0x6B 101 + OP_I32_MUL = 0x6C 102 + OP_I32_DIV_S = 0x6D 103 + OP_I32_DIV_U = 0x6E 104 + OP_I32_REM_S = 0x6F 105 + OP_I32_REM_U = 0x70 106 + OP_I32_AND = 0x71 107 + OP_I32_OR = 0x72 108 + OP_I32_XOR = 0x73 109 + OP_I32_SHL = 0x74 110 + OP_I32_SHR_S = 0x75 111 + OP_I32_SHR_U = 0x76 112 + OP_I32_ROTL = 0x77 113 + OP_I32_ROTR = 0x78 114 + --- i64 operations 115 + OP_I64_CLZ = 0x79 116 + OP_I64_CTZ = 0x7A 117 + OP_I64_POPCNT = 0x7B 118 + OP_I64_ADD = 0x7C 119 + OP_I64_SUB = 0x7D 120 + OP_I64_MUL = 0x7E 121 + OP_I64_DIV_S = 0x7F 122 + OP_I64_DIV_U = 0x80 123 + OP_I64_REM_S = 0x81 124 + OP_I64_REM_U = 0x82 125 + OP_I64_AND = 0x83 126 + OP_I64_OR = 0x84 127 + OP_I64_XOR = 0x85 128 + OP_I64_SHL = 0x86 129 + OP_I64_SHR_S = 0x87 130 + OP_I64_SHR_U = 0x88 131 + OP_I64_ROTL = 0x89 132 + OP_I64_ROTR = 0x8A 133 + --- f32 operations 134 + OP_F32_ABS = 0x8B 135 + OP_F32_NEG = 0x8C 136 + OP_F32_CEIL = 0x8D 137 + OP_F32_FLOOR = 0x8E 138 + OP_F32_TRUNC = 0x8F 139 + OP_F32_NEAREST = 0x90 140 + OP_F32_SQRT = 0x91 141 + OP_F32_ADD = 0x92 142 + OP_F32_SUB = 0x93 143 + OP_F32_MUL = 0x94 144 + OP_F32_DIV = 0x95 145 + OP_F32_MIN = 0x96 146 + OP_F32_MAX = 0x97 147 + OP_F32_COPYSIGN = 0x98 148 + --- f64 operations 149 + OP_F64_ABS = 0x99 150 + OP_F64_NEG = 0x9A 151 + OP_F64_CEIL = 0x9B 152 + OP_F64_FLOOR = 0x9C 153 + OP_F64_TRUNC = 0x9D 154 + OP_F64_NEAREST = 0x9E 155 + OP_F64_SQRT = 0x9F 156 + OP_F64_ADD = 0xA0 157 + OP_F64_SUB = 0xA1 158 + OP_F64_MUL = 0xA2 159 + OP_F64_DIV = 0xA3 160 + OP_F64_MIN = 0xA4 161 + OP_F64_MAX = 0xA5 162 + OP_F64_COPYSIGN = 0xA6 163 + --- conversions 164 + OP_I32_WRAP_I64 = 0xA7 165 + OP_I32_TRUNC_F32_S = 0xA8 166 + OP_I32_TRUNC_F32_U = 0xA9 167 + OP_I32_TRUNC_F64_S = 0xAA 168 + OP_I32_TRUNC_F64_U = 0xAB 169 + OP_I64_EXTEND_I32_S = 0xAC 170 + OP_I64_EXTEND_I32_U = 0xAD 171 + OP_I64_TRUNC_F32_S = 0xAE 172 + OP_I64_TRUNC_F32_U = 0xAF 173 + OP_I64_TRUNC_F64_S = 0xB0 174 + OP_I64_TRUNC_F64_U = 0xB1 175 + OP_F32_CONVERT_I32_S = 0xB2 176 + OP_F32_CONVERT_I32_U = 0xB3 177 + OP_F32_CONVERT_I64_S = 0xB4 178 + OP_F32_CONVERT_I64_U = 0xB5 179 + OP_F32_DEMOTE_F64 = 0xB6 180 + OP_F64_CONVERT_I32_S = 0xB7 181 + OP_F64_CONVERT_I32_U = 0xB8 182 + OP_F64_CONVERT_I64_S = 0xB9 183 + OP_F64_CONVERT_I64_U = 0xBA 184 + OP_F64_PROMOTE_F32 = 0xBB 185 + OP_I32_REINTERPRET_F32 = 0xBC 186 + OP_I64_REINTERPRET_F64 = 0xBD 187 + OP_F32_REINTERPRET_I32 = 0xBE 188 + OP_F64_REINTERPRET_I64 = 0xBF 189 + }