blob: af4ebd5b3de4444e1f9bbbff186c8f8b12c3a4a2 [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9///
10/// \file
Adrian Prantl5f8f34e42018-05-01 15:54:18 +000011/// This file provides WebAssembly-specific target descriptions.
Dan Gohman10e730a2015-06-29 23:51:55 +000012///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
16#define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
17
Zachary Turner264b5d92017-06-07 03:48:56 +000018#include "llvm/BinaryFormat/Wasm.h"
Dan Gohmana11fb232016-01-12 03:09:16 +000019#include "llvm/MC/MCInstrDesc.h"
Dan Gohman10e730a2015-06-29 23:51:55 +000020#include "llvm/Support/DataTypes.h"
Derek Schuff669300d2017-10-10 17:31:43 +000021#include <memory>
Dan Gohman10e730a2015-06-29 23:51:55 +000022
23namespace llvm {
24
Dan Gohman10e730a2015-06-29 23:51:55 +000025class MCAsmBackend;
26class MCCodeEmitter;
27class MCContext;
28class MCInstrInfo;
Peter Collingbournedcd7d6c2018-05-21 19:20:29 +000029class MCObjectTargetWriter;
Dan Gohman10e730a2015-06-29 23:51:55 +000030class MCSubtargetInfo;
Dan Gohman3acb1872016-10-24 23:27:49 +000031class MVT;
Dan Gohman10e730a2015-06-29 23:51:55 +000032class Target;
33class Triple;
Dan Gohman53828fd2015-11-23 16:50:18 +000034class raw_pwrite_stream;
Dan Gohman10e730a2015-06-29 23:51:55 +000035
Mehdi Aminif42454b2016-10-09 23:00:34 +000036Target &getTheWebAssemblyTarget32();
37Target &getTheWebAssemblyTarget64();
Dan Gohman10e730a2015-06-29 23:51:55 +000038
Sam Clegg9d24fb72017-06-16 23:59:10 +000039MCCodeEmitter *createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII);
Dan Gohman53828fd2015-11-23 16:50:18 +000040
Dan Gohmancceedf72016-01-08 00:43:54 +000041MCAsmBackend *createWebAssemblyAsmBackend(const Triple &TT);
Dan Gohman10e730a2015-06-29 23:51:55 +000042
Peter Collingbournedcd7d6c2018-05-21 19:20:29 +000043std::unique_ptr<MCObjectTargetWriter>
44createWebAssemblyELFObjectWriter(bool Is64Bit, uint8_t OSABI);
Dan Gohman05ac43f2015-12-17 01:39:00 +000045
Peter Collingbournedcd7d6c2018-05-21 19:20:29 +000046std::unique_ptr<MCObjectTargetWriter>
47createWebAssemblyWasmObjectWriter(bool Is64Bit);
Dan Gohman18eafb62017-02-22 01:23:18 +000048
Dan Gohmana11fb232016-01-12 03:09:16 +000049namespace WebAssembly {
50enum OperandType {
51 /// Basic block label in a branch construct.
52 OPERAND_BASIC_BLOCK = MCOI::OPERAND_FIRST_TARGET,
Dan Gohman4fc4e422016-10-24 19:49:43 +000053 /// Local index.
54 OPERAND_LOCAL,
Dan Gohmanb89f2d32017-02-02 19:29:44 +000055 /// Global index.
56 OPERAND_GLOBAL,
Dan Gohman5a68ec72016-10-05 21:24:08 +000057 /// 32-bit integer immediates.
58 OPERAND_I32IMM,
59 /// 64-bit integer immediates.
60 OPERAND_I64IMM,
Dan Gohmanaa742912016-02-16 15:14:23 +000061 /// 32-bit floating-point immediates.
Dan Gohman4b8e8be2016-10-03 21:31:31 +000062 OPERAND_F32IMM,
Dan Gohmanaa742912016-02-16 15:14:23 +000063 /// 64-bit floating-point immediates.
Dan Gohman4b8e8be2016-10-03 21:31:31 +000064 OPERAND_F64IMM,
Dan Gohman00d734d2016-12-23 03:23:52 +000065 /// 32-bit unsigned function indices.
66 OPERAND_FUNCTION32,
67 /// 32-bit unsigned memory offsets.
68 OPERAND_OFFSET32,
Dan Gohmanbb372242016-01-26 03:39:31 +000069 /// p2align immediate for load and store address alignment.
Dan Gohman2726b882016-10-06 22:29:32 +000070 OPERAND_P2ALIGN,
71 /// signature immediate for block/loop.
Dan Gohmand934cb82017-02-24 23:18:00 +000072 OPERAND_SIGNATURE,
73 /// type signature immediate for call_indirect.
74 OPERAND_TYPEINDEX,
Dan Gohmana11fb232016-01-12 03:09:16 +000075};
76} // end namespace WebAssembly
77
78namespace WebAssemblyII {
79enum {
80 // For variadic instructions, this flag indicates whether an operand
81 // in the variable_ops range is an immediate value.
Dan Gohman3469ee12016-01-12 20:30:51 +000082 VariableOpIsImmediate = (1 << 0),
Dan Gohman1d68e80f2016-01-12 19:14:46 +000083 // For immediate values in the variable_ops range, this flag indicates
84 // whether the value represents a control-flow label.
Dan Gohman3acb1872016-10-24 23:27:49 +000085 VariableOpImmediateIsLabel = (1 << 1)
Dan Gohmana11fb232016-01-12 03:09:16 +000086};
87} // end namespace WebAssemblyII
88
Dan Gohman10e730a2015-06-29 23:51:55 +000089} // end namespace llvm
90
91// Defines symbolic names for WebAssembly registers. This defines a mapping from
92// register name to register number.
93//
JF Bastien5ca0bac2015-07-10 18:23:10 +000094#define GET_REGINFO_ENUM
95#include "WebAssemblyGenRegisterInfo.inc"
96
JF Bastienb9073fb2015-07-22 21:28:15 +000097// Defines symbolic names for the WebAssembly instructions.
98//
99#define GET_INSTRINFO_ENUM
100#include "WebAssemblyGenInstrInfo.inc"
101
Dan Gohman10e730a2015-06-29 23:51:55 +0000102#define GET_SUBTARGETINFO_ENUM
103#include "WebAssemblyGenSubtargetInfo.inc"
104
Dan Gohmanbb372242016-01-26 03:39:31 +0000105namespace llvm {
106namespace WebAssembly {
107
108/// Return the default p2align value for a load or store with the given opcode.
109inline unsigned GetDefaultP2Align(unsigned Opcode) {
110 switch (Opcode) {
111 case WebAssembly::LOAD8_S_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000112 case WebAssembly::LOAD8_S_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000113 case WebAssembly::LOAD8_U_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000114 case WebAssembly::LOAD8_U_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000115 case WebAssembly::LOAD8_S_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000116 case WebAssembly::LOAD8_S_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000117 case WebAssembly::LOAD8_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000118 case WebAssembly::LOAD8_U_I64_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000119 case WebAssembly::ATOMIC_LOAD8_U_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000120 case WebAssembly::ATOMIC_LOAD8_U_I32_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000121 case WebAssembly::ATOMIC_LOAD8_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000122 case WebAssembly::ATOMIC_LOAD8_U_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000123 case WebAssembly::STORE8_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000124 case WebAssembly::STORE8_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000125 case WebAssembly::STORE8_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000126 case WebAssembly::STORE8_I64_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000127 case WebAssembly::ATOMIC_STORE8_I32:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000128 case WebAssembly::ATOMIC_STORE8_I32_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000129 case WebAssembly::ATOMIC_STORE8_I64:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000130 case WebAssembly::ATOMIC_STORE8_I64_S:
Heejin Ahnfed73822018-07-09 22:30:51 +0000131 case WebAssembly::ATOMIC_RMW8_U_ADD_I32:
132 case WebAssembly::ATOMIC_RMW8_U_ADD_I32_S:
133 case WebAssembly::ATOMIC_RMW8_U_ADD_I64:
134 case WebAssembly::ATOMIC_RMW8_U_ADD_I64_S:
135 case WebAssembly::ATOMIC_RMW8_U_SUB_I32:
136 case WebAssembly::ATOMIC_RMW8_U_SUB_I32_S:
137 case WebAssembly::ATOMIC_RMW8_U_SUB_I64:
138 case WebAssembly::ATOMIC_RMW8_U_SUB_I64_S:
139 case WebAssembly::ATOMIC_RMW8_U_AND_I32:
140 case WebAssembly::ATOMIC_RMW8_U_AND_I32_S:
141 case WebAssembly::ATOMIC_RMW8_U_AND_I64:
142 case WebAssembly::ATOMIC_RMW8_U_AND_I64_S:
143 case WebAssembly::ATOMIC_RMW8_U_OR_I32:
144 case WebAssembly::ATOMIC_RMW8_U_OR_I32_S:
145 case WebAssembly::ATOMIC_RMW8_U_OR_I64:
146 case WebAssembly::ATOMIC_RMW8_U_OR_I64_S:
147 case WebAssembly::ATOMIC_RMW8_U_XOR_I32:
148 case WebAssembly::ATOMIC_RMW8_U_XOR_I32_S:
149 case WebAssembly::ATOMIC_RMW8_U_XOR_I64:
150 case WebAssembly::ATOMIC_RMW8_U_XOR_I64_S:
151 case WebAssembly::ATOMIC_RMW8_U_XCHG_I32:
152 case WebAssembly::ATOMIC_RMW8_U_XCHG_I32_S:
153 case WebAssembly::ATOMIC_RMW8_U_XCHG_I64:
154 case WebAssembly::ATOMIC_RMW8_U_XCHG_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000155 return 0;
156 case WebAssembly::LOAD16_S_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000157 case WebAssembly::LOAD16_S_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000158 case WebAssembly::LOAD16_U_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000159 case WebAssembly::LOAD16_U_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000160 case WebAssembly::LOAD16_S_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000161 case WebAssembly::LOAD16_S_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000162 case WebAssembly::LOAD16_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000163 case WebAssembly::LOAD16_U_I64_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000164 case WebAssembly::ATOMIC_LOAD16_U_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000165 case WebAssembly::ATOMIC_LOAD16_U_I32_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000166 case WebAssembly::ATOMIC_LOAD16_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000167 case WebAssembly::ATOMIC_LOAD16_U_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000168 case WebAssembly::STORE16_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000169 case WebAssembly::STORE16_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000170 case WebAssembly::STORE16_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000171 case WebAssembly::STORE16_I64_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000172 case WebAssembly::ATOMIC_STORE16_I32:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000173 case WebAssembly::ATOMIC_STORE16_I32_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000174 case WebAssembly::ATOMIC_STORE16_I64:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000175 case WebAssembly::ATOMIC_STORE16_I64_S:
Heejin Ahnfed73822018-07-09 22:30:51 +0000176 case WebAssembly::ATOMIC_RMW16_U_ADD_I32:
177 case WebAssembly::ATOMIC_RMW16_U_ADD_I32_S:
178 case WebAssembly::ATOMIC_RMW16_U_ADD_I64:
179 case WebAssembly::ATOMIC_RMW16_U_ADD_I64_S:
180 case WebAssembly::ATOMIC_RMW16_U_SUB_I32:
181 case WebAssembly::ATOMIC_RMW16_U_SUB_I32_S:
182 case WebAssembly::ATOMIC_RMW16_U_SUB_I64:
183 case WebAssembly::ATOMIC_RMW16_U_SUB_I64_S:
184 case WebAssembly::ATOMIC_RMW16_U_AND_I32:
185 case WebAssembly::ATOMIC_RMW16_U_AND_I32_S:
186 case WebAssembly::ATOMIC_RMW16_U_AND_I64:
187 case WebAssembly::ATOMIC_RMW16_U_AND_I64_S:
188 case WebAssembly::ATOMIC_RMW16_U_OR_I32:
189 case WebAssembly::ATOMIC_RMW16_U_OR_I32_S:
190 case WebAssembly::ATOMIC_RMW16_U_OR_I64:
191 case WebAssembly::ATOMIC_RMW16_U_OR_I64_S:
192 case WebAssembly::ATOMIC_RMW16_U_XOR_I32:
193 case WebAssembly::ATOMIC_RMW16_U_XOR_I32_S:
194 case WebAssembly::ATOMIC_RMW16_U_XOR_I64:
195 case WebAssembly::ATOMIC_RMW16_U_XOR_I64_S:
196 case WebAssembly::ATOMIC_RMW16_U_XCHG_I32:
197 case WebAssembly::ATOMIC_RMW16_U_XCHG_I32_S:
198 case WebAssembly::ATOMIC_RMW16_U_XCHG_I64:
199 case WebAssembly::ATOMIC_RMW16_U_XCHG_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000200 return 1;
201 case WebAssembly::LOAD_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000202 case WebAssembly::LOAD_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000203 case WebAssembly::LOAD_F32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000204 case WebAssembly::LOAD_F32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000205 case WebAssembly::STORE_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000206 case WebAssembly::STORE_I32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000207 case WebAssembly::STORE_F32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000208 case WebAssembly::STORE_F32_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000209 case WebAssembly::LOAD32_S_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000210 case WebAssembly::LOAD32_S_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000211 case WebAssembly::LOAD32_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000212 case WebAssembly::LOAD32_U_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000213 case WebAssembly::STORE32_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000214 case WebAssembly::STORE32_I64_S:
Derek Schuff18ba1922017-08-30 18:07:45 +0000215 case WebAssembly::ATOMIC_LOAD_I32:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000216 case WebAssembly::ATOMIC_LOAD_I32_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000217 case WebAssembly::ATOMIC_LOAD32_U_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000218 case WebAssembly::ATOMIC_LOAD32_U_I64_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000219 case WebAssembly::ATOMIC_STORE_I32:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000220 case WebAssembly::ATOMIC_STORE_I32_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000221 case WebAssembly::ATOMIC_STORE32_I64:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000222 case WebAssembly::ATOMIC_STORE32_I64_S:
Heejin Ahnfed73822018-07-09 22:30:51 +0000223 case WebAssembly::ATOMIC_RMW_ADD_I32:
224 case WebAssembly::ATOMIC_RMW_ADD_I32_S:
225 case WebAssembly::ATOMIC_RMW32_U_ADD_I64:
226 case WebAssembly::ATOMIC_RMW32_U_ADD_I64_S:
227 case WebAssembly::ATOMIC_RMW_SUB_I32:
228 case WebAssembly::ATOMIC_RMW_SUB_I32_S:
229 case WebAssembly::ATOMIC_RMW32_U_SUB_I64:
230 case WebAssembly::ATOMIC_RMW32_U_SUB_I64_S:
231 case WebAssembly::ATOMIC_RMW_AND_I32:
232 case WebAssembly::ATOMIC_RMW_AND_I32_S:
233 case WebAssembly::ATOMIC_RMW32_U_AND_I64:
234 case WebAssembly::ATOMIC_RMW32_U_AND_I64_S:
235 case WebAssembly::ATOMIC_RMW_OR_I32:
236 case WebAssembly::ATOMIC_RMW_OR_I32_S:
237 case WebAssembly::ATOMIC_RMW32_U_OR_I64:
238 case WebAssembly::ATOMIC_RMW32_U_OR_I64_S:
239 case WebAssembly::ATOMIC_RMW_XOR_I32:
240 case WebAssembly::ATOMIC_RMW_XOR_I32_S:
241 case WebAssembly::ATOMIC_RMW32_U_XOR_I64:
242 case WebAssembly::ATOMIC_RMW32_U_XOR_I64_S:
243 case WebAssembly::ATOMIC_RMW_XCHG_I32:
244 case WebAssembly::ATOMIC_RMW_XCHG_I32_S:
245 case WebAssembly::ATOMIC_RMW32_U_XCHG_I64:
246 case WebAssembly::ATOMIC_RMW32_U_XCHG_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000247 return 2;
248 case WebAssembly::LOAD_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000249 case WebAssembly::LOAD_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000250 case WebAssembly::LOAD_F64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000251 case WebAssembly::LOAD_F64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000252 case WebAssembly::STORE_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000253 case WebAssembly::STORE_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000254 case WebAssembly::STORE_F64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000255 case WebAssembly::STORE_F64_S:
Derek Schuff885dc592017-10-05 21:18:42 +0000256 case WebAssembly::ATOMIC_LOAD_I64:
Wouter van Oortmerssen48dac312018-06-18 21:22:44 +0000257 case WebAssembly::ATOMIC_LOAD_I64_S:
Heejin Ahn402b4902018-07-02 21:22:59 +0000258 case WebAssembly::ATOMIC_STORE_I64:
Heejin Ahn80d9f172018-07-05 21:27:09 +0000259 case WebAssembly::ATOMIC_STORE_I64_S:
Heejin Ahnfed73822018-07-09 22:30:51 +0000260 case WebAssembly::ATOMIC_RMW_ADD_I64:
261 case WebAssembly::ATOMIC_RMW_ADD_I64_S:
262 case WebAssembly::ATOMIC_RMW_SUB_I64:
263 case WebAssembly::ATOMIC_RMW_SUB_I64_S:
264 case WebAssembly::ATOMIC_RMW_AND_I64:
265 case WebAssembly::ATOMIC_RMW_AND_I64_S:
266 case WebAssembly::ATOMIC_RMW_OR_I64:
267 case WebAssembly::ATOMIC_RMW_OR_I64_S:
268 case WebAssembly::ATOMIC_RMW_XOR_I64:
269 case WebAssembly::ATOMIC_RMW_XOR_I64_S:
270 case WebAssembly::ATOMIC_RMW_XCHG_I64:
271 case WebAssembly::ATOMIC_RMW_XCHG_I64_S:
Dan Gohmanbb372242016-01-26 03:39:31 +0000272 return 3;
Derek Schuffc64d7652016-08-01 22:25:02 +0000273 default:
274 llvm_unreachable("Only loads and stores have p2align values");
Dan Gohmanbb372242016-01-26 03:39:31 +0000275 }
276}
277
Derek Schuffc97ba932016-01-30 21:43:08 +0000278/// The operand number of the load or store address in load/store instructions.
Dan Gohman48abaa92016-10-25 00:17:11 +0000279static const unsigned LoadAddressOperandNo = 3;
280static const unsigned StoreAddressOperandNo = 2;
Dan Gohman7f1bdb22016-10-06 22:08:28 +0000281
282/// The operand number of the load or store p2align in load/store instructions.
Dan Gohman48abaa92016-10-25 00:17:11 +0000283static const unsigned LoadP2AlignOperandNo = 1;
284static const unsigned StoreP2AlignOperandNo = 0;
Dan Gohmanbb372242016-01-26 03:39:31 +0000285
Dan Gohman2726b882016-10-06 22:29:32 +0000286/// This is used to indicate block signatures.
Heejin Ahn0c69a3e2018-03-02 20:52:59 +0000287enum class ExprType : unsigned {
Heejin Ahn0de58722018-03-08 04:05:37 +0000288 Void = 0x40,
289 I32 = 0x7F,
290 I64 = 0x7E,
291 F32 = 0x7D,
292 F64 = 0x7C,
293 I8x16 = 0x7B,
294 I16x8 = 0x7A,
295 I32x4 = 0x79,
296 F32x4 = 0x78,
297 B8x16 = 0x77,
298 B16x8 = 0x76,
299 B32x4 = 0x75,
300 ExceptRef = 0x68
Dan Gohman4fc4e422016-10-24 19:49:43 +0000301};
302
Dan Gohman3acb1872016-10-24 23:27:49 +0000303/// Instruction opcodes emitted via means other than CodeGen.
304static const unsigned Nop = 0x01;
305static const unsigned End = 0x0b;
306
Derek Schuffe2688c42017-03-14 20:23:22 +0000307wasm::ValType toValType(const MVT &Ty);
Dan Gohman3acb1872016-10-24 23:27:49 +0000308
Dan Gohmanbb372242016-01-26 03:39:31 +0000309} // end namespace WebAssembly
310} // end namespace llvm
311
Dan Gohman10e730a2015-06-29 23:51:55 +0000312#endif