13 #ifndef MLIR_TARGET_WASMBINARYENCODING
14 #define MLIR_TARGET_WASMBINARYENCODING
23 static constexpr std::byte
block{0x02};
24 static constexpr std::byte
loop{0x03};
28 static constexpr std::byte
call{0x10};
41 static constexpr std::byte
eqzI32{0x45};
42 static constexpr std::byte
eqI32{0x46};
43 static constexpr std::byte
neI32{0x47};
44 static constexpr std::byte
ltSI32{0x48};
45 static constexpr std::byte
ltUI32{0x49};
46 static constexpr std::byte
gtSI32{0x4A};
47 static constexpr std::byte
gtUI32{0x4B};
48 static constexpr std::byte
leSI32{0x4C};
49 static constexpr std::byte
leUI32{0x4D};
50 static constexpr std::byte
geSI32{0x4E};
51 static constexpr std::byte
geUI32{0x4F};
52 static constexpr std::byte
eqzI64{0x50};
53 static constexpr std::byte
eqI64{0x51};
54 static constexpr std::byte
neI64{0x52};
55 static constexpr std::byte
ltSI64{0x53};
56 static constexpr std::byte
ltUI64{0x54};
57 static constexpr std::byte
gtSI64{0x55};
58 static constexpr std::byte
gtUI64{0x56};
59 static constexpr std::byte
leSI64{0x57};
60 static constexpr std::byte
leUI64{0x58};
61 static constexpr std::byte
geSI64{0x59};
62 static constexpr std::byte
geUI64{0x5A};
63 static constexpr std::byte
eqF32{0x5B};
64 static constexpr std::byte
neF32{0x5C};
65 static constexpr std::byte
ltF32{0x5D};
66 static constexpr std::byte
gtF32{0x5E};
67 static constexpr std::byte
leF32{0x5F};
68 static constexpr std::byte
geF32{0x60};
69 static constexpr std::byte
eqF64{0x61};
70 static constexpr std::byte
neF64{0x62};
71 static constexpr std::byte
ltF64{0x63};
72 static constexpr std::byte
gtF64{0x64};
73 static constexpr std::byte
leF64{0x65};
74 static constexpr std::byte
geF64{0x66};
77 static constexpr std::byte
clzI32{0x67};
78 static constexpr std::byte
ctzI32{0x68};
80 static constexpr std::byte
addI32{0x6A};
81 static constexpr std::byte
subI32{0x6B};
82 static constexpr std::byte
mulI32{0x6C};
87 static constexpr std::byte
andI32{0x71};
88 static constexpr std::byte
orI32{0x72};
89 static constexpr std::byte
xorI32{0x73};
90 static constexpr std::byte
shlI32{0x74};
95 static constexpr std::byte
clzI64{0x79};
96 static constexpr std::byte
ctzI64{0x7A};
98 static constexpr std::byte
addI64{0x7C};
99 static constexpr std::byte
subI64{0x7D};
106 static constexpr std::byte
orI64{0x84};
139 static constexpr std::byte
wrap{0xA7};
175 static constexpr std::byte
v128{0x7B};
176 static constexpr std::byte
f64{0x7C};
177 static constexpr std::byte
f32{0x7D};
178 static constexpr std::byte
i64{0x7E};
179 static constexpr std::byte
i32{0x7F};
204 static constexpr std::byte
function{0x00};
205 static constexpr std::byte
table{0x01};
Include the generated interface declarations.
Byte encodings describing Wasm exports.
static constexpr std::byte memory
static constexpr std::byte table
static constexpr std::byte global
Byte encodings describing the mutability of globals.
static constexpr std::byte isMutable
static constexpr std::byte isConst
Byte encodings of Wasm imports.
static constexpr std::byte memType
static constexpr std::byte typeID
static constexpr std::byte tableType
static constexpr std::byte globalType
Byte encodings for Wasm instructions.
static constexpr std::byte neF32
static constexpr std::byte extendI3216S
static constexpr std::byte gtSI32
static constexpr std::byte ctzI64
static constexpr std::byte neI64
static constexpr std::byte geSI32
static constexpr std::byte convertSI64F32
static constexpr std::byte andI64
static constexpr std::byte shlI32
static constexpr std::byte mulF32
static constexpr std::byte convertSI32F64
static constexpr std::byte rotlI32
static constexpr std::byte ceilF32
static constexpr std::byte addF32
static constexpr std::byte ltSI32
static constexpr std::byte divF64
static constexpr std::byte divUI64
static constexpr std::byte maxF64
static constexpr std::byte geUI64
static constexpr std::byte truncF32
static constexpr std::byte sqrtF32
static constexpr std::byte leUI32
static constexpr std::byte subF64
static constexpr std::byte neI32
static constexpr std::byte addI64
static constexpr std::byte extendI328S
static constexpr std::byte gtF32
static constexpr std::byte shrSI32
static constexpr std::byte geUI32
static constexpr std::byte reinterpretF64AsI64
static constexpr std::byte rotrI64
static constexpr std::byte orI64
static constexpr std::byte divSI32
static constexpr std::byte minF32
static constexpr std::byte eqzI64
static constexpr std::byte globalGet
static constexpr std::byte absF64
static constexpr std::byte elseOpCode
static constexpr std::byte leSI64
static constexpr std::byte promoteF32ToF64
static constexpr std::byte ltUI32
static constexpr std::byte eqzI32
static constexpr std::byte truncF64
static constexpr std::byte rotlI64
static constexpr std::byte negF64
static constexpr std::byte popcntI32
static constexpr std::byte ltF32
static constexpr std::byte convertSI64F64
static constexpr std::byte extendU
static constexpr std::byte extendI648S
static constexpr std::byte orI32
static constexpr std::byte eqI64
static constexpr std::byte xorI32
static constexpr std::byte reinterpretI32AsF32
static constexpr std::byte divSI64
static constexpr std::byte divUI32
static constexpr std::byte neF64
static constexpr std::byte divF32
static constexpr std::byte shrUI32
static constexpr std::byte shrUI64
static constexpr std::byte copysignF64
static constexpr std::byte rotrI32
static constexpr std::byte eqF32
static constexpr std::byte copysignF32
static constexpr std::byte clzI64
static constexpr std::byte gtUI32
static constexpr std::byte geF64
static constexpr std::byte remUI64
static constexpr std::byte convertUI32F32
static constexpr std::byte andI32
static constexpr std::byte subF32
static constexpr std::byte ctzI32
static constexpr std::byte demoteF64ToF32
static constexpr std::byte constI64
static constexpr std::byte leF32
static constexpr std::byte extendI6416S
static constexpr std::byte subI64
static constexpr std::byte leSI32
static constexpr std::byte subI32
static constexpr std::byte constFP64
static constexpr std::byte mulI64
static constexpr std::byte localTee
static constexpr std::byte ifOpCode
static constexpr std::byte block
static constexpr std::byte convertUI32F64
static constexpr std::byte absF32
static constexpr std::byte addI32
static constexpr std::byte ltSI64
static constexpr std::byte convertUI64F32
static constexpr std::byte floorF64
static constexpr std::byte call
static constexpr std::byte convertUI64F64
static constexpr std::byte gtUI64
static constexpr std::byte localGet
static constexpr std::byte clzI32
static constexpr std::byte eqF64
static constexpr std::byte extendI6432S
static constexpr std::byte extendS
static constexpr std::byte branchIf
static constexpr std::byte localSet
static constexpr std::byte ltF64
static constexpr std::byte sqrtF64
static constexpr std::byte loop
static constexpr std::byte gtF64
static constexpr std::byte reinterpretF32AsI32
static constexpr std::byte gtSI64
static constexpr std::byte constI32
static constexpr std::byte remSI32
static constexpr std::byte geSI64
static constexpr std::byte shrSI64
static constexpr std::byte negF32
static constexpr std::byte ltUI64
static constexpr std::byte mulI32
static constexpr std::byte reinterpretI64AsF64
static constexpr std::byte constFP32
static constexpr std::byte xorI64
static constexpr std::byte leUI64
static constexpr std::byte popcntI64
static constexpr std::byte shlI64
static constexpr std::byte wrap
static constexpr std::byte maxF32
static constexpr std::byte mulF64
static constexpr std::byte remSI64
static constexpr std::byte convertSI32F32
static constexpr std::byte eqI32
static constexpr std::byte leF64
static constexpr std::byte geF32
static constexpr std::byte ceilF64
static constexpr std::byte remUI32
static constexpr std::byte minF64
static constexpr std::byte floorF32
static constexpr std::byte addF64
Byte encodings of types in Wasm binaries.
static constexpr std::byte externRef
static constexpr std::byte i32
static constexpr std::byte funcType
static constexpr std::byte i64
static constexpr std::byte emptyBlockType
static constexpr std::byte funcRef
static constexpr std::byte v128
static constexpr std::byte f64
static constexpr std::byte f32
static constexpr std::byte endByte