aboutsummaryrefslogtreecommitdiff
path: root/tools/translate_xmacro.h
blob: 5e5bd797d11c9fe4083d1d5842d6a88b9ea3cd38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* X-macro-like definition of translation routines for each webasm opcode */

/*  wasm_opcode_______**translation_routine**argument_types**result_type*/
TS (WASM_I32_ADD,      add,                 i32_i32,        i32)
TS (WASM_I32_SUB,      sub,                 i32_i32,        i32)
TS (WASM_I32_DIV_U,    div,                 i32_i32,        i32)
TS (WASM_I32_MUL,      mul,                 i32_i32,        i32)

TLS(WASM_I32_LOAD,     load_p,              i32,            i32)
TLS(WASM_I32_LOAD8_S,  loadbsx_p,           i32,            i32)
TLS(WASM_I32_LOAD8_U,  loadbzx_p,           i32,            i32)
TLS(WASM_I32_LOAD16_S, loadwsx_p,           i32,            i32)
TLS(WASM_I32_LOAD16_U, loadwzx_p,           i32,            i32)
TLS(WASM_I32_STORE,    store_p,             i32_i32,        empty)
TLS(WASM_I32_STORE8,   storeb_p,            i32_i32,        empty)
TLS(WASM_I32_STORE16,  storew_p,            i32_i32,        empty)

TC (WASM_CALL,         call,                custom,         custom)
TC (WASM_LOCAL_GET,    local_get,           empty,          custom)
TC (WASM_I32_CONST,    const,               empty,          i32)