diff options
Diffstat (limited to 'tools/wasm.h')
-rw-r--r-- | tools/wasm.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/wasm.h b/tools/wasm.h index fc6a910..07252fc 100644 --- a/tools/wasm.h +++ b/tools/wasm.h @@ -20,3 +20,26 @@ #define EXPORT_TABLEIDX 0x01 #define EXPORT_MEMIDX 0x02 #define EXPORT_GLOBALIDX 0x03 + +/* WebAssembly opcodes */ +#define WASM_END 0x0B +#define WASM_CALL 0x10 + +#define WASM_LOCAL_GET 0x20 + +#define WASM_I32_LOAD 0x28 +#define WASM_I32_LOAD8_S 0x2C +#define WASM_I32_LOAD8_U 0x2D +#define WASM_I32_LOAD16_S 0x2E +#define WASM_I32_LOAD16_U 0x2F +#define WASM_I32_STORE 0x36 +#define WASM_I32_STORE8 0x3A +#define WASM_I32_STORE16 0x3B +#define WASM_I64_STORE32 0x3E + +#define WASM_I32_CONST 0x41 + +#define WASM_I32_ADD 0x6A +#define WASM_I32_SUB 0x6B +#define WASM_I32_MUL 0x6C +#define WASM_I32_DIV_U 0x6E |