llvm.org GIT mirror llvm / 1162e1b
[WebAssembly] Define more wasm binary encoding constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288411 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 3 years ago
1 changed file(s) with 29 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5151 WASM_SEC_DATA = 11 // Data segments
5252 };
5353
54 // Type immediate encodings used in various contexts.
55 enum : unsigned {
56 WASM_TYPE_I32 = 0x7f,
57 WASM_TYPE_I64 = 0x7e,
58 WASM_TYPE_F32 = 0x7d,
59 WASM_TYPE_F64 = 0x7c,
60 WASM_TYPE_ANYFUNC = 0x70,
61 WASM_TYPE_FUNC = 0x60,
62 WASM_TYPE_NORESULT = 0x40, // for blocks with no result values
63 };
64
65 // Kinds of externals (for imports and exports).
66 enum : unsigned {
67 WASM_EXTERNAL_FUNCTION = 0x0,
68 WASM_EXTERNAL_TABLE = 0x1,
69 WASM_EXTERNAL_MEMORY = 0x2,
70 WASM_EXTERNAL_GLOBAL = 0x3,
71 };
72
73 // Opcodes used in initializer expressions.
74 enum : unsigned {
75 WASM_OPCODE_END = 0x0b,
76 WASM_OPCODE_GET_GLOBAL = 0x23,
77 WASM_OPCODE_I32_CONST = 0x41,
78 WASM_OPCODE_I64_CONST = 0x42,
79 WASM_OPCODE_F32_CONST = 0x43,
80 WASM_OPCODE_F64_CONST = 0x44,
81 };
82
5483 } // end namespace wasm
5584 } // end namespace llvm
5685