v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
machine-operator.cc
Go to the documentation of this file.
1// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
7#include <optional>
8
12
13namespace v8 {
14namespace internal {
15namespace compiler {
16
21
22
24 return !(lhs == rhs);
25}
26
27
31
32
33std::ostream& operator<<(std::ostream& os, StoreRepresentation rep) {
34 return os << rep.representation() << ", " << rep.write_barrier_kind();
35}
36
38 return lhs.store_representation() == rhs.store_representation() &&
39 lhs.order() == rhs.order() && lhs.kind() == rhs.kind();
40}
41
43 return !(lhs == rhs);
44}
45
47 return base::hash_combine(hash_value(params.store_representation()),
48 params.order(), params.kind());
49}
50
51std::ostream& operator<<(std::ostream& os, AtomicStoreParameters params) {
52 return os << params.store_representation() << ", " << params.order();
53}
54
56 return lhs.representation() == rhs.representation() &&
57 lhs.order() == rhs.order() && lhs.kind() == rhs.kind();
58}
59
61 return !(lhs == rhs);
62}
63
65 return base::hash_combine(params.representation(), params.order(),
66 params.kind());
67}
68
69std::ostream& operator<<(std::ostream& os, AtomicLoadParameters params) {
70 return os << params.representation() << ", " << params.order();
71}
72
74 return lhs.type() == rhs.type() && lhs.kind() == rhs.kind();
75}
76
78 return !(lhs == rhs);
79}
80
82 return base::hash_combine(params.type(), params.kind());
83}
84
85std::ostream& operator<<(std::ostream& os, AtomicOpParameters params) {
86 return os << params.type() << ", " << params.kind();
87}
88
89size_t hash_value(MemoryAccessKind kind) { return static_cast<size_t>(kind); }
90
91std::ostream& operator<<(std::ostream& os, MemoryAccessKind kind) {
92 switch (kind) {
94 return os << "kNormal";
96 return os << "kUnaligned";
98 return os << "kProtected";
99 }
100 UNREACHABLE();
101}
102
103size_t hash_value(LoadTransformation rep) { return static_cast<size_t>(rep); }
104
105std::ostream& operator<<(std::ostream& os, LoadTransformation rep) {
106 switch (rep) {
108 return os << "kS128Load8Splat";
110 return os << "kS128Load16Splat";
112 return os << "kS128Load32Splat";
114 return os << "kS128Load64Splat";
116 return os << "kS128Load8x8S";
118 return os << "kS128Load8x8U";
120 return os << "kS128Load16x4S";
122 return os << "kS128Load16x4U";
124 return os << "kS128Load32x2S";
126 return os << "kS128Load32x2U";
128 return os << "kS128Load32Zero";
130 return os << "kS128Load64Zero";
131 // Simd256
133 return os << "kS256Load8Splat";
135 return os << "kS256Load16Splat";
137 return os << "kS256Load32Splat";
139 return os << "kS256Load64Splat";
141 return os << "kS256Load8x16S";
143 return os << "kS256Load8x16U";
145 return os << "kS256Load8x8U";
147 return os << "kS256Load16x8S";
149 return os << "kS256Load16x8U";
151 return os << "kS256Load32x4S";
153 return os << "kS256Load32x4U";
154 }
155 UNREACHABLE();
156}
157
159 return base::hash_combine(params.kind, params.transformation);
160}
161
162std::ostream& operator<<(std::ostream& os, LoadTransformParameters params) {
163 return os << "(" << params.kind << " " << params.transformation << ")";
164}
165
166#if V8_ENABLE_WEBASSEMBLY
167LoadTransformParameters const& LoadTransformParametersOf(Operator const* op) {
168 DCHECK_EQ(IrOpcode::kLoadTransform, op->opcode());
170}
171
172bool operator==(LoadTransformParameters lhs, LoadTransformParameters rhs) {
173 return lhs.transformation == rhs.transformation && lhs.kind == rhs.kind;
174}
175
176bool operator!=(LoadTransformParameters lhs, LoadTransformParameters rhs) {
177 return !(lhs == rhs);
178}
179
180size_t hash_value(LoadLaneParameters params) {
181 return base::hash_combine(params.kind, params.rep, params.laneidx);
182}
183
184std::ostream& operator<<(std::ostream& os, LoadLaneParameters params) {
185 return os << "(" << params.kind << " " << params.rep << " "
186 << static_cast<uint32_t>(params.laneidx) << ")";
187}
188
189LoadLaneParameters const& LoadLaneParametersOf(Operator const* op) {
190 DCHECK_EQ(IrOpcode::kLoadLane, op->opcode());
192}
193
194bool operator==(LoadLaneParameters lhs, LoadLaneParameters rhs) {
195 return lhs.kind == rhs.kind && lhs.rep == rhs.rep &&
196 lhs.laneidx == rhs.laneidx;
197}
198
199size_t hash_value(StoreLaneParameters params) {
200 return base::hash_combine(params.kind, params.rep, params.laneidx);
201}
202
203std::ostream& operator<<(std::ostream& os, StoreLaneParameters params) {
204 return os << "(" << params.kind << " " << params.rep << " "
205 << static_cast<unsigned int>(params.laneidx) << ")";
206}
207
208StoreLaneParameters const& StoreLaneParametersOf(Operator const* op) {
209 DCHECK_EQ(IrOpcode::kStoreLane, op->opcode());
211}
212
213bool operator==(StoreLaneParameters lhs, StoreLaneParameters rhs) {
214 return lhs.kind == rhs.kind && lhs.rep == rhs.rep &&
215 lhs.laneidx == rhs.laneidx;
216}
217#endif // V8_ENABLE_WEBASSEMBLY
218
220 DCHECK(IrOpcode::kLoad == op->opcode() ||
221 IrOpcode::kProtectedLoad == op->opcode() ||
222 IrOpcode::kLoadTrapOnNull == op->opcode() ||
223 IrOpcode::kUnalignedLoad == op->opcode() ||
224 IrOpcode::kLoadImmutable == op->opcode());
226}
227
229 DCHECK(IrOpcode::kWord32AtomicLoad == op->opcode() ||
230 IrOpcode::kWord64AtomicLoad == op->opcode());
232}
233
238
240 DCHECK(IrOpcode::kStore == op->opcode() ||
241 IrOpcode::kProtectedStore == op->opcode() ||
242 IrOpcode::kStoreTrapOnNull == op->opcode() ||
243 IrOpcode::kStoreIndirectPointer == op->opcode());
245}
246
248 DCHECK(IrOpcode::kStorePair == op->opcode());
250}
251
253 DCHECK(IrOpcode::kWord32AtomicStore == op->opcode() ||
254 IrOpcode::kWord64AtomicStore == op->opcode());
256}
257
259 Operator const* op) {
260 DCHECK_EQ(IrOpcode::kUnalignedStore, op->opcode());
262}
263
265 return lhs.size() == rhs.size() && lhs.alignment() == rhs.alignment();
266}
267
269 return !(lhs == rhs);
270}
271
273 return base::hash_combine(rep.size(), rep.alignment());
274}
275
276std::ostream& operator<<(std::ostream& os, StackSlotRepresentation rep) {
277 return os << rep.size() << ", " << rep.alignment();
278}
279
281 DCHECK_EQ(IrOpcode::kStackSlot, op->opcode());
283}
284
287 return params.type();
288}
289
290size_t hash_value(ShiftKind kind) { return static_cast<size_t>(kind); }
291V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, ShiftKind kind) {
292 switch (kind) {
294 return os << "Normal";
296 return os << "ShiftOutZeros";
297 }
298}
299
301 DCHECK(IrOpcode::kWord32Sar == op->opcode() ||
302 IrOpcode::kWord64Sar == op->opcode());
303 return OpParameter<ShiftKind>(op);
304}
305
306size_t hash_value(TruncateKind kind) { return static_cast<size_t>(kind); }
307
308std::ostream& operator<<(std::ostream& os, TruncateKind kind) {
309 switch (kind) {
311 return os << "kArchitectureDefault";
313 return os << "kSetOverflowToMin";
314 }
315}
316
317// The format is:
318// V(Name, properties, value_input_count, control_input_count, output_count)
319#define PURE_BINARY_OP_LIST_32(V) \
320 V(Word32And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
321 V(Word32Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
322 V(Word32Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
323 V(Word32Shl, Operator::kNoProperties, 2, 0, 1) \
324 V(Word32Shr, Operator::kNoProperties, 2, 0, 1) \
325 V(Word32Ror, Operator::kNoProperties, 2, 0, 1) \
326 V(Word32Equal, Operator::kCommutative, 2, 0, 1) \
327 V(Int32Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
328 V(Int32Sub, Operator::kNoProperties, 2, 0, 1) \
329 V(Int32Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
330 V(Int32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
331 V(Int32Div, Operator::kNoProperties, 2, 1, 1) \
332 V(Int32Mod, Operator::kNoProperties, 2, 1, 1) \
333 V(Int32LessThan, Operator::kNoProperties, 2, 0, 1) \
334 V(Int32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
335 V(Uint32Div, Operator::kNoProperties, 2, 1, 1) \
336 V(Uint32LessThan, Operator::kNoProperties, 2, 0, 1) \
337 V(Uint32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
338 V(Uint32Mod, Operator::kNoProperties, 2, 1, 1) \
339 V(Uint32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)
340
341// The format is:
342// V(Name, properties, value_input_count, control_input_count, output_count)
343#define PURE_BINARY_OP_LIST_64(V) \
344 V(Word64And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
345 V(Word64Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
346 V(Word64Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
347 V(Word64Shl, Operator::kNoProperties, 2, 0, 1) \
348 V(Word64Shr, Operator::kNoProperties, 2, 0, 1) \
349 V(Word64Ror, Operator::kNoProperties, 2, 0, 1) \
350 V(Word64RorLowerable, Operator::kNoProperties, 2, 1, 1) \
351 V(Word64Equal, Operator::kCommutative, 2, 0, 1) \
352 V(Int64Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
353 V(Int64Sub, Operator::kNoProperties, 2, 0, 1) \
354 V(Int64Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
355 V(Int64MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
356 V(Int64Div, Operator::kNoProperties, 2, 1, 1) \
357 V(Int64Mod, Operator::kNoProperties, 2, 1, 1) \
358 V(Int64LessThan, Operator::kNoProperties, 2, 0, 1) \
359 V(Int64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
360 V(Uint64MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
361 V(Uint64Div, Operator::kNoProperties, 2, 1, 1) \
362 V(Uint64Mod, Operator::kNoProperties, 2, 1, 1) \
363 V(Uint64LessThan, Operator::kNoProperties, 2, 0, 1) \
364 V(Uint64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)
365
366// The format is:
367// V(Name, properties, value_input_count, control_input_count, output_count)
368#define PURE_SIMD_OP_LIST(V) \
369 IF_WASM(V, F64x2Splat, Operator::kNoProperties, 1, 0, 1) \
370 IF_WASM(V, F64x2Abs, Operator::kNoProperties, 1, 0, 1) \
371 IF_WASM(V, F64x2Neg, Operator::kNoProperties, 1, 0, 1) \
372 IF_WASM(V, F64x2Sqrt, Operator::kNoProperties, 1, 0, 1) \
373 IF_WASM(V, F64x2Add, Operator::kCommutative, 2, 0, 1) \
374 IF_WASM(V, F64x2Sub, Operator::kNoProperties, 2, 0, 1) \
375 IF_WASM(V, F64x2Mul, Operator::kCommutative, 2, 0, 1) \
376 IF_WASM(V, F64x2Div, Operator::kNoProperties, 2, 0, 1) \
377 IF_WASM(V, F64x2Min, Operator::kAssociative | Operator::kCommutative, 2, 0, \
378 1) \
379 IF_WASM(V, F64x2Max, Operator::kAssociative | Operator::kCommutative, 2, 0, \
380 1) \
381 IF_WASM(V, F64x2Eq, Operator::kCommutative, 2, 0, 1) \
382 IF_WASM(V, F64x2Ne, Operator::kCommutative, 2, 0, 1) \
383 IF_WASM(V, F64x2Lt, Operator::kNoProperties, 2, 0, 1) \
384 IF_WASM(V, F64x2Le, Operator::kNoProperties, 2, 0, 1) \
385 IF_WASM(V, F64x2Qfma, Operator::kNoProperties, 3, 0, 1) \
386 IF_WASM(V, F64x2Qfms, Operator::kNoProperties, 3, 0, 1) \
387 IF_WASM(V, F64x2Pmin, Operator::kNoProperties, 2, 0, 1) \
388 IF_WASM(V, F64x2Pmax, Operator::kNoProperties, 2, 0, 1) \
389 IF_WASM(V, F64x2Ceil, Operator::kNoProperties, 1, 0, 1) \
390 IF_WASM(V, F64x2Floor, Operator::kNoProperties, 1, 0, 1) \
391 IF_WASM(V, F64x2Trunc, Operator::kNoProperties, 1, 0, 1) \
392 IF_WASM(V, F64x2NearestInt, Operator::kNoProperties, 1, 0, 1) \
393 IF_WASM(V, F64x2ConvertLowI32x4S, Operator::kNoProperties, 1, 0, 1) \
394 IF_WASM(V, F64x2ConvertLowI32x4U, Operator::kNoProperties, 1, 0, 1) \
395 IF_WASM(V, F64x2PromoteLowF32x4, Operator::kNoProperties, 1, 0, 1) \
396 IF_WASM(V, F32x4Splat, Operator::kNoProperties, 1, 0, 1) \
397 IF_WASM(V, F32x4SConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
398 IF_WASM(V, F32x4UConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
399 IF_WASM(V, F32x4Abs, Operator::kNoProperties, 1, 0, 1) \
400 IF_WASM(V, F32x4Neg, Operator::kNoProperties, 1, 0, 1) \
401 IF_WASM(V, F32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
402 IF_WASM(V, F32x4Add, Operator::kCommutative, 2, 0, 1) \
403 IF_WASM(V, F32x4Sub, Operator::kNoProperties, 2, 0, 1) \
404 IF_WASM(V, F32x4Mul, Operator::kCommutative, 2, 0, 1) \
405 IF_WASM(V, F32x4Div, Operator::kNoProperties, 2, 0, 1) \
406 IF_WASM(V, F32x4Min, Operator::kAssociative | Operator::kCommutative, 2, 0, \
407 1) \
408 IF_WASM(V, F32x4Max, Operator::kAssociative | Operator::kCommutative, 2, 0, \
409 1) \
410 IF_WASM(V, F32x4Eq, Operator::kCommutative, 2, 0, 1) \
411 IF_WASM(V, F32x4Ne, Operator::kCommutative, 2, 0, 1) \
412 IF_WASM(V, F32x4Lt, Operator::kNoProperties, 2, 0, 1) \
413 IF_WASM(V, F32x4Le, Operator::kNoProperties, 2, 0, 1) \
414 IF_WASM(V, F32x4Qfma, Operator::kNoProperties, 3, 0, 1) \
415 IF_WASM(V, F32x4Qfms, Operator::kNoProperties, 3, 0, 1) \
416 IF_WASM(V, F32x4Pmin, Operator::kNoProperties, 2, 0, 1) \
417 IF_WASM(V, F32x4Pmax, Operator::kNoProperties, 2, 0, 1) \
418 IF_WASM(V, F32x4Ceil, Operator::kNoProperties, 1, 0, 1) \
419 IF_WASM(V, F32x4Floor, Operator::kNoProperties, 1, 0, 1) \
420 IF_WASM(V, F32x4Trunc, Operator::kNoProperties, 1, 0, 1) \
421 IF_WASM(V, F32x4NearestInt, Operator::kNoProperties, 1, 0, 1) \
422 IF_WASM(V, F32x4DemoteF64x2Zero, Operator::kNoProperties, 1, 0, 1) \
423 IF_WASM(V, F16x8Splat, Operator::kNoProperties, 1, 0, 1) \
424 IF_WASM(V, F16x8Abs, Operator::kNoProperties, 1, 0, 1) \
425 IF_WASM(V, F16x8Neg, Operator::kNoProperties, 1, 0, 1) \
426 IF_WASM(V, F16x8Sqrt, Operator::kNoProperties, 1, 0, 1) \
427 IF_WASM(V, F16x8Ceil, Operator::kNoProperties, 1, 0, 1) \
428 IF_WASM(V, F16x8Floor, Operator::kNoProperties, 1, 0, 1) \
429 IF_WASM(V, F16x8Trunc, Operator::kNoProperties, 1, 0, 1) \
430 IF_WASM(V, F16x8NearestInt, Operator::kNoProperties, 1, 0, 1) \
431 IF_WASM(V, F16x8Add, Operator::kCommutative, 2, 0, 1) \
432 IF_WASM(V, F16x8Sub, Operator::kNoProperties, 2, 0, 1) \
433 IF_WASM(V, F16x8Mul, Operator::kCommutative, 2, 0, 1) \
434 IF_WASM(V, F16x8Div, Operator::kNoProperties, 2, 0, 1) \
435 IF_WASM(V, F16x8Min, Operator::kAssociative | Operator::kCommutative, 2, 0, \
436 1) \
437 IF_WASM(V, F16x8Max, Operator::kAssociative | Operator::kCommutative, 2, 0, \
438 1) \
439 IF_WASM(V, F16x8Pmin, Operator::kNoProperties, 2, 0, 1) \
440 IF_WASM(V, F16x8Pmax, Operator::kNoProperties, 2, 0, 1) \
441 IF_WASM(V, F16x8Eq, Operator::kCommutative, 2, 0, 1) \
442 IF_WASM(V, F16x8Ne, Operator::kCommutative, 2, 0, 1) \
443 IF_WASM(V, F16x8Lt, Operator::kNoProperties, 2, 0, 1) \
444 IF_WASM(V, F16x8Le, Operator::kNoProperties, 2, 0, 1) \
445 IF_WASM(V, F16x8SConvertI16x8, Operator::kNoProperties, 1, 0, 1) \
446 IF_WASM(V, F16x8UConvertI16x8, Operator::kNoProperties, 1, 0, 1) \
447 IF_WASM(V, I16x8UConvertF16x8, Operator::kNoProperties, 1, 0, 1) \
448 IF_WASM(V, I16x8SConvertF16x8, Operator::kNoProperties, 1, 0, 1) \
449 IF_WASM(V, F16x8DemoteF32x4Zero, Operator::kNoProperties, 1, 0, 1) \
450 IF_WASM(V, F16x8DemoteF64x2Zero, Operator::kNoProperties, 1, 0, 1) \
451 IF_WASM(V, F32x4PromoteLowF16x8, Operator::kNoProperties, 1, 0, 1) \
452 IF_WASM(V, F16x8Qfma, Operator::kNoProperties, 3, 0, 1) \
453 IF_WASM(V, F16x8Qfms, Operator::kNoProperties, 3, 0, 1) \
454 IF_WASM(V, I64x4Splat, Operator::kNoProperties, 1, 0, 1) \
455 IF_WASM(V, I64x2Splat, Operator::kNoProperties, 1, 0, 1) \
456 IF_WASM(V, I64x2SplatI32Pair, Operator::kNoProperties, 2, 0, 1) \
457 IF_WASM(V, I64x2Abs, Operator::kNoProperties, 1, 0, 1) \
458 IF_WASM(V, I64x2Neg, Operator::kNoProperties, 1, 0, 1) \
459 IF_WASM(V, I64x2SConvertI32x4Low, Operator::kNoProperties, 1, 0, 1) \
460 IF_WASM(V, I64x2SConvertI32x4High, Operator::kNoProperties, 1, 0, 1) \
461 IF_WASM(V, I64x2UConvertI32x4Low, Operator::kNoProperties, 1, 0, 1) \
462 IF_WASM(V, I64x2UConvertI32x4High, Operator::kNoProperties, 1, 0, 1) \
463 IF_WASM(V, I64x2BitMask, Operator::kNoProperties, 1, 0, 1) \
464 IF_WASM(V, I64x2Shl, Operator::kNoProperties, 2, 0, 1) \
465 IF_WASM(V, I64x2ShrS, Operator::kNoProperties, 2, 0, 1) \
466 IF_WASM(V, I64x2Add, Operator::kCommutative, 2, 0, 1) \
467 IF_WASM(V, I64x2Sub, Operator::kNoProperties, 2, 0, 1) \
468 IF_WASM(V, I64x2Mul, Operator::kCommutative, 2, 0, 1) \
469 IF_WASM(V, I64x2Eq, Operator::kCommutative, 2, 0, 1) \
470 IF_WASM(V, I64x2Ne, Operator::kCommutative, 2, 0, 1) \
471 IF_WASM(V, I64x2GtS, Operator::kNoProperties, 2, 0, 1) \
472 IF_WASM(V, I64x2GeS, Operator::kNoProperties, 2, 0, 1) \
473 IF_WASM(V, I64x2ShrU, Operator::kNoProperties, 2, 0, 1) \
474 IF_WASM(V, I64x2ExtMulLowI32x4S, Operator::kCommutative, 2, 0, 1) \
475 IF_WASM(V, I64x2ExtMulHighI32x4S, Operator::kCommutative, 2, 0, 1) \
476 IF_WASM(V, I64x2ExtMulLowI32x4U, Operator::kCommutative, 2, 0, 1) \
477 IF_WASM(V, I64x2ExtMulHighI32x4U, Operator::kCommutative, 2, 0, 1) \
478 IF_WASM(V, I32x8Splat, Operator::kNoProperties, 1, 0, 1) \
479 IF_WASM(V, I32x4Splat, Operator::kNoProperties, 1, 0, 1) \
480 IF_WASM(V, I32x4SConvertF32x4, Operator::kNoProperties, 1, 0, 1) \
481 IF_WASM(V, I32x4SConvertI16x8Low, Operator::kNoProperties, 1, 0, 1) \
482 IF_WASM(V, I32x4SConvertI16x8High, Operator::kNoProperties, 1, 0, 1) \
483 IF_WASM(V, I32x4Neg, Operator::kNoProperties, 1, 0, 1) \
484 IF_WASM(V, I32x4Shl, Operator::kNoProperties, 2, 0, 1) \
485 IF_WASM(V, I32x4ShrS, Operator::kNoProperties, 2, 0, 1) \
486 IF_WASM(V, I32x4Add, Operator::kCommutative, 2, 0, 1) \
487 IF_WASM(V, I32x4Sub, Operator::kNoProperties, 2, 0, 1) \
488 IF_WASM(V, I32x4Mul, Operator::kCommutative, 2, 0, 1) \
489 IF_WASM(V, I32x4MinS, Operator::kCommutative, 2, 0, 1) \
490 IF_WASM(V, I32x4MaxS, Operator::kCommutative, 2, 0, 1) \
491 IF_WASM(V, I32x4Eq, Operator::kCommutative, 2, 0, 1) \
492 IF_WASM(V, I32x4Ne, Operator::kCommutative, 2, 0, 1) \
493 IF_WASM(V, I32x4GtS, Operator::kNoProperties, 2, 0, 1) \
494 IF_WASM(V, I32x4GeS, Operator::kNoProperties, 2, 0, 1) \
495 IF_WASM(V, I32x4UConvertF32x4, Operator::kNoProperties, 1, 0, 1) \
496 IF_WASM(V, I32x4UConvertI16x8Low, Operator::kNoProperties, 1, 0, 1) \
497 IF_WASM(V, I32x4UConvertI16x8High, Operator::kNoProperties, 1, 0, 1) \
498 IF_WASM(V, I32x4ShrU, Operator::kNoProperties, 2, 0, 1) \
499 IF_WASM(V, I32x4MinU, Operator::kCommutative, 2, 0, 1) \
500 IF_WASM(V, I32x4MaxU, Operator::kCommutative, 2, 0, 1) \
501 IF_WASM(V, I32x4GtU, Operator::kNoProperties, 2, 0, 1) \
502 IF_WASM(V, I32x4GeU, Operator::kNoProperties, 2, 0, 1) \
503 IF_WASM(V, I32x4Abs, Operator::kNoProperties, 1, 0, 1) \
504 IF_WASM(V, I32x4BitMask, Operator::kNoProperties, 1, 0, 1) \
505 IF_WASM(V, I32x4DotI16x8S, Operator::kCommutative, 2, 0, 1) \
506 IF_WASM(V, I32x4ExtMulLowI16x8S, Operator::kCommutative, 2, 0, 1) \
507 IF_WASM(V, I32x4ExtMulHighI16x8S, Operator::kCommutative, 2, 0, 1) \
508 IF_WASM(V, I32x4ExtMulLowI16x8U, Operator::kCommutative, 2, 0, 1) \
509 IF_WASM(V, I32x4ExtMulHighI16x8U, Operator::kCommutative, 2, 0, 1) \
510 IF_WASM(V, I32x4ExtAddPairwiseI16x8S, Operator::kNoProperties, 1, 0, 1) \
511 IF_WASM(V, I32x4ExtAddPairwiseI16x8U, Operator::kNoProperties, 1, 0, 1) \
512 IF_WASM(V, I32x4TruncSatF64x2SZero, Operator::kNoProperties, 1, 0, 1) \
513 IF_WASM(V, I32x4TruncSatF64x2UZero, Operator::kNoProperties, 1, 0, 1) \
514 IF_WASM(V, I16x16Splat, Operator::kNoProperties, 1, 0, 1) \
515 IF_WASM(V, I16x8Splat, Operator::kNoProperties, 1, 0, 1) \
516 IF_WASM(V, I16x8SConvertI8x16Low, Operator::kNoProperties, 1, 0, 1) \
517 IF_WASM(V, I16x8SConvertI8x16High, Operator::kNoProperties, 1, 0, 1) \
518 IF_WASM(V, I16x8Neg, Operator::kNoProperties, 1, 0, 1) \
519 IF_WASM(V, I16x8Shl, Operator::kNoProperties, 2, 0, 1) \
520 IF_WASM(V, I16x8ShrS, Operator::kNoProperties, 2, 0, 1) \
521 IF_WASM(V, I16x8SConvertI32x4, Operator::kNoProperties, 2, 0, 1) \
522 IF_WASM(V, I16x8Add, Operator::kCommutative, 2, 0, 1) \
523 IF_WASM(V, I16x8AddSatS, Operator::kCommutative, 2, 0, 1) \
524 IF_WASM(V, I16x8Sub, Operator::kNoProperties, 2, 0, 1) \
525 IF_WASM(V, I16x8SubSatS, Operator::kNoProperties, 2, 0, 1) \
526 IF_WASM(V, I16x8Mul, Operator::kCommutative, 2, 0, 1) \
527 IF_WASM(V, I16x8MinS, Operator::kCommutative, 2, 0, 1) \
528 IF_WASM(V, I16x8MaxS, Operator::kCommutative, 2, 0, 1) \
529 IF_WASM(V, I16x8Eq, Operator::kCommutative, 2, 0, 1) \
530 IF_WASM(V, I16x8Ne, Operator::kCommutative, 2, 0, 1) \
531 IF_WASM(V, I16x8GtS, Operator::kNoProperties, 2, 0, 1) \
532 IF_WASM(V, I16x8GeS, Operator::kNoProperties, 2, 0, 1) \
533 IF_WASM(V, I16x8UConvertI8x16Low, Operator::kNoProperties, 1, 0, 1) \
534 IF_WASM(V, I16x8UConvertI8x16High, Operator::kNoProperties, 1, 0, 1) \
535 IF_WASM(V, I16x8ShrU, Operator::kNoProperties, 2, 0, 1) \
536 IF_WASM(V, I16x8UConvertI32x4, Operator::kNoProperties, 2, 0, 1) \
537 IF_WASM(V, I16x8AddSatU, Operator::kCommutative, 2, 0, 1) \
538 IF_WASM(V, I16x8SubSatU, Operator::kNoProperties, 2, 0, 1) \
539 IF_WASM(V, I16x8MinU, Operator::kCommutative, 2, 0, 1) \
540 IF_WASM(V, I16x8MaxU, Operator::kCommutative, 2, 0, 1) \
541 IF_WASM(V, I16x8GtU, Operator::kNoProperties, 2, 0, 1) \
542 IF_WASM(V, I16x8GeU, Operator::kNoProperties, 2, 0, 1) \
543 IF_WASM(V, I16x8RoundingAverageU, Operator::kCommutative, 2, 0, 1) \
544 IF_WASM(V, I16x8Q15MulRSatS, Operator::kCommutative, 2, 0, 1) \
545 IF_WASM(V, I16x8Abs, Operator::kNoProperties, 1, 0, 1) \
546 IF_WASM(V, I16x8BitMask, Operator::kNoProperties, 1, 0, 1) \
547 IF_WASM(V, I16x8ExtMulLowI8x16S, Operator::kCommutative, 2, 0, 1) \
548 IF_WASM(V, I16x8ExtMulHighI8x16S, Operator::kCommutative, 2, 0, 1) \
549 IF_WASM(V, I16x8ExtMulLowI8x16U, Operator::kCommutative, 2, 0, 1) \
550 IF_WASM(V, I16x8ExtMulHighI8x16U, Operator::kCommutative, 2, 0, 1) \
551 IF_WASM(V, I16x8ExtAddPairwiseI8x16S, Operator::kNoProperties, 1, 0, 1) \
552 IF_WASM(V, I16x8ExtAddPairwiseI8x16U, Operator::kNoProperties, 1, 0, 1) \
553 IF_WASM(V, I8x32Splat, Operator::kNoProperties, 1, 0, 1) \
554 V(I8x16Splat, Operator::kNoProperties, 1, 0, 1) \
555 IF_WASM(V, F64x4Splat, Operator::kNoProperties, 1, 0, 1) \
556 IF_WASM(V, F32x8Splat, Operator::kNoProperties, 1, 0, 1) \
557 IF_WASM(V, I8x16Neg, Operator::kNoProperties, 1, 0, 1) \
558 IF_WASM(V, I8x16Shl, Operator::kNoProperties, 2, 0, 1) \
559 IF_WASM(V, I8x16ShrS, Operator::kNoProperties, 2, 0, 1) \
560 IF_WASM(V, I8x16SConvertI16x8, Operator::kNoProperties, 2, 0, 1) \
561 IF_WASM(V, I8x16Add, Operator::kCommutative, 2, 0, 1) \
562 IF_WASM(V, I8x16AddSatS, Operator::kCommutative, 2, 0, 1) \
563 IF_WASM(V, I8x16Sub, Operator::kNoProperties, 2, 0, 1) \
564 IF_WASM(V, I8x16SubSatS, Operator::kNoProperties, 2, 0, 1) \
565 IF_WASM(V, I8x16MinS, Operator::kCommutative, 2, 0, 1) \
566 IF_WASM(V, I8x16MaxS, Operator::kCommutative, 2, 0, 1) \
567 V(I8x16Eq, Operator::kCommutative, 2, 0, 1) \
568 IF_WASM(V, I8x16Ne, Operator::kCommutative, 2, 0, 1) \
569 IF_WASM(V, I8x16GtS, Operator::kNoProperties, 2, 0, 1) \
570 IF_WASM(V, I8x16GeS, Operator::kNoProperties, 2, 0, 1) \
571 IF_WASM(V, I8x16ShrU, Operator::kNoProperties, 2, 0, 1) \
572 IF_WASM(V, I8x16UConvertI16x8, Operator::kNoProperties, 2, 0, 1) \
573 IF_WASM(V, I8x16AddSatU, Operator::kCommutative, 2, 0, 1) \
574 IF_WASM(V, I8x16SubSatU, Operator::kNoProperties, 2, 0, 1) \
575 IF_WASM(V, I8x16MinU, Operator::kCommutative, 2, 0, 1) \
576 IF_WASM(V, I8x16MaxU, Operator::kCommutative, 2, 0, 1) \
577 IF_WASM(V, I8x16GtU, Operator::kNoProperties, 2, 0, 1) \
578 IF_WASM(V, I8x16GeU, Operator::kNoProperties, 2, 0, 1) \
579 IF_WASM(V, I8x16RoundingAverageU, Operator::kCommutative, 2, 0, 1) \
580 IF_WASM(V, I8x16Popcnt, Operator::kNoProperties, 1, 0, 1) \
581 IF_WASM(V, I8x16Abs, Operator::kNoProperties, 1, 0, 1) \
582 V(I8x16BitMask, Operator::kNoProperties, 1, 0, 1) \
583 IF_WASM(V, S128Zero, Operator::kNoProperties, 0, 0, 1) \
584 IF_WASM(V, S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, \
585 1) \
586 IF_WASM(V, S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
587 IF_WASM(V, S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, \
588 1) \
589 IF_WASM(V, S128Not, Operator::kNoProperties, 1, 0, 1) \
590 IF_WASM(V, S128Select, Operator::kNoProperties, 3, 0, 1) \
591 IF_WASM(V, S128AndNot, Operator::kNoProperties, 2, 0, 1) \
592 IF_WASM(V, V128AnyTrue, Operator::kNoProperties, 1, 0, 1) \
593 IF_WASM(V, I64x2AllTrue, Operator::kNoProperties, 1, 0, 1) \
594 IF_WASM(V, I32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
595 IF_WASM(V, I16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
596 IF_WASM(V, I8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
597 IF_WASM(V, I8x16RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
598 IF_WASM(V, I16x8RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
599 IF_WASM(V, I32x4RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
600 IF_WASM(V, I64x2RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
601 IF_WASM(V, F32x4RelaxedMin, Operator::kNoProperties, 2, 0, 1) \
602 IF_WASM(V, F32x4RelaxedMax, Operator::kNoProperties, 2, 0, 1) \
603 IF_WASM(V, F64x2RelaxedMin, Operator::kNoProperties, 2, 0, 1) \
604 IF_WASM(V, F64x2RelaxedMax, Operator::kNoProperties, 2, 0, 1) \
605 IF_WASM(V, F32x8RelaxedMin, Operator::kNoProperties, 2, 0, 1) \
606 IF_WASM(V, F32x8RelaxedMax, Operator::kNoProperties, 2, 0, 1) \
607 IF_WASM(V, F64x4RelaxedMin, Operator::kNoProperties, 2, 0, 1) \
608 IF_WASM(V, F64x4RelaxedMax, Operator::kNoProperties, 2, 0, 1) \
609 IF_WASM(V, I32x4RelaxedTruncF32x4S, Operator::kNoProperties, 1, 0, 1) \
610 IF_WASM(V, I32x4RelaxedTruncF32x4U, Operator::kNoProperties, 1, 0, 1) \
611 IF_WASM(V, I32x4RelaxedTruncF64x2SZero, Operator::kNoProperties, 1, 0, 1) \
612 IF_WASM(V, I32x4RelaxedTruncF64x2UZero, Operator::kNoProperties, 1, 0, 1) \
613 IF_WASM(V, I16x8RelaxedQ15MulRS, Operator::kCommutative, 2, 0, 1) \
614 IF_WASM(V, I16x8DotI8x16I7x16S, Operator::kNoProperties, 2, 0, 1) \
615 IF_WASM(V, I32x4DotI8x16I7x16AddS, Operator::kNoProperties, 3, 0, 1) \
616 IF_WASM(V, F64x4Min, Operator::kAssociative | Operator::kCommutative, 2, 0, \
617 1) \
618 IF_WASM(V, F64x4Max, Operator::kAssociative | Operator::kCommutative, 2, 0, \
619 1) \
620 IF_WASM(V, F64x4Add, Operator::kCommutative, 2, 0, 1) \
621 IF_WASM(V, F64x4Abs, Operator::kNoProperties, 1, 0, 1) \
622 IF_WASM(V, F64x4Neg, Operator::kNoProperties, 1, 0, 1) \
623 IF_WASM(V, F64x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
624 IF_WASM(V, F32x8Abs, Operator::kNoProperties, 1, 0, 1) \
625 IF_WASM(V, F32x8Neg, Operator::kNoProperties, 1, 0, 1) \
626 IF_WASM(V, F32x8Sqrt, Operator::kNoProperties, 1, 0, 1) \
627 IF_WASM(V, F32x8Add, Operator::kCommutative, 2, 0, 1) \
628 IF_WASM(V, I64x4Add, Operator::kCommutative, 2, 0, 1) \
629 IF_WASM(V, I32x8Add, Operator::kCommutative, 2, 0, 1) \
630 IF_WASM(V, I16x16Add, Operator::kCommutative, 2, 0, 1) \
631 IF_WASM(V, I8x32Add, Operator::kCommutative, 2, 0, 1) \
632 IF_WASM(V, F64x4Sub, Operator::kNoProperties, 2, 0, 1) \
633 IF_WASM(V, F32x8Sub, Operator::kNoProperties, 2, 0, 1) \
634 IF_WASM(V, I64x4Sub, Operator::kNoProperties, 2, 0, 1) \
635 IF_WASM(V, I32x8Sub, Operator::kNoProperties, 2, 0, 1) \
636 IF_WASM(V, I16x16Sub, Operator::kNoProperties, 2, 0, 1) \
637 IF_WASM(V, I8x32Sub, Operator::kNoProperties, 2, 0, 1) \
638 IF_WASM(V, F64x4Mul, Operator::kCommutative, 2, 0, 1) \
639 IF_WASM(V, F32x8Mul, Operator::kCommutative, 2, 0, 1) \
640 IF_WASM(V, I64x4Mul, Operator::kCommutative, 2, 0, 1) \
641 IF_WASM(V, I32x8Mul, Operator::kCommutative, 2, 0, 1) \
642 IF_WASM(V, I16x16Mul, Operator::kCommutative, 2, 0, 1) \
643 IF_WASM(V, F64x4Div, Operator::kNoProperties, 2, 0, 1) \
644 IF_WASM(V, F32x8Div, Operator::kNoProperties, 2, 0, 1) \
645 IF_WASM(V, I16x16AddSatS, Operator::kCommutative, 2, 0, 1) \
646 IF_WASM(V, I8x32AddSatS, Operator::kCommutative, 2, 0, 1) \
647 IF_WASM(V, I16x16AddSatU, Operator::kCommutative, 2, 0, 1) \
648 IF_WASM(V, I8x32AddSatU, Operator::kCommutative, 2, 0, 1) \
649 IF_WASM(V, I16x16SubSatS, Operator::kNoProperties, 2, 0, 1) \
650 IF_WASM(V, I8x32SubSatS, Operator::kNoProperties, 2, 0, 1) \
651 IF_WASM(V, I16x16SubSatU, Operator::kNoProperties, 2, 0, 1) \
652 IF_WASM(V, I8x32SubSatU, Operator::kNoProperties, 2, 0, 1) \
653 IF_WASM(V, F32x8Min, Operator::kAssociative | Operator::kCommutative, 2, 0, \
654 1) \
655 IF_WASM(V, F32x8Max, Operator::kAssociative | Operator::kCommutative, 2, 0, \
656 1) \
657 IF_WASM(V, F32x8Pmin, Operator::kNoProperties, 2, 0, 1) \
658 IF_WASM(V, F32x8Pmax, Operator::kNoProperties, 2, 0, 1) \
659 IF_WASM(V, F32x8Eq, Operator::kCommutative, 2, 0, 1) \
660 IF_WASM(V, F64x4Eq, Operator::kCommutative, 2, 0, 1) \
661 IF_WASM(V, I64x4Eq, Operator::kCommutative, 2, 0, 1) \
662 IF_WASM(V, I32x8Eq, Operator::kCommutative, 2, 0, 1) \
663 IF_WASM(V, I16x16Eq, Operator::kCommutative, 2, 0, 1) \
664 IF_WASM(V, I8x32Eq, Operator::kCommutative, 2, 0, 1) \
665 IF_WASM(V, F32x8Ne, Operator::kCommutative, 2, 0, 1) \
666 IF_WASM(V, F64x4Ne, Operator::kCommutative, 2, 0, 1) \
667 IF_WASM(V, I64x4GtS, Operator::kCommutative, 2, 0, 1) \
668 IF_WASM(V, I32x8GtS, Operator::kCommutative, 2, 0, 1) \
669 IF_WASM(V, I16x16GtS, Operator::kCommutative, 2, 0, 1) \
670 IF_WASM(V, I8x32GtS, Operator::kCommutative, 2, 0, 1) \
671 IF_WASM(V, F64x4Lt, Operator::kNoProperties, 2, 0, 1) \
672 IF_WASM(V, F32x8Lt, Operator::kNoProperties, 2, 0, 1) \
673 IF_WASM(V, F64x4Le, Operator::kNoProperties, 2, 0, 1) \
674 IF_WASM(V, F32x8Le, Operator::kNoProperties, 2, 0, 1) \
675 IF_WASM(V, I32x8MinS, Operator::kNoProperties, 2, 0, 1) \
676 IF_WASM(V, I16x16MinS, Operator::kNoProperties, 2, 0, 1) \
677 IF_WASM(V, I8x32MinS, Operator::kNoProperties, 2, 0, 1) \
678 IF_WASM(V, I32x8MinU, Operator::kNoProperties, 2, 0, 1) \
679 IF_WASM(V, I16x16MinU, Operator::kNoProperties, 2, 0, 1) \
680 IF_WASM(V, I8x32MinU, Operator::kNoProperties, 2, 0, 1) \
681 IF_WASM(V, I32x8MaxS, Operator::kNoProperties, 2, 0, 1) \
682 IF_WASM(V, I16x16MaxS, Operator::kNoProperties, 2, 0, 1) \
683 IF_WASM(V, I8x32MaxS, Operator::kNoProperties, 2, 0, 1) \
684 IF_WASM(V, I32x8MaxU, Operator::kNoProperties, 2, 0, 1) \
685 IF_WASM(V, I16x16MaxU, Operator::kNoProperties, 2, 0, 1) \
686 IF_WASM(V, I8x32MaxU, Operator::kNoProperties, 2, 0, 1) \
687 IF_WASM(V, I64x4Ne, Operator::kCommutative, 2, 0, 1) \
688 IF_WASM(V, I64x4GeS, Operator::kNoProperties, 2, 0, 1) \
689 IF_WASM(V, I32x8Ne, Operator::kCommutative, 2, 0, 1) \
690 IF_WASM(V, I32x8GtU, Operator::kNoProperties, 2, 0, 1) \
691 IF_WASM(V, I32x8GeS, Operator::kNoProperties, 2, 0, 1) \
692 IF_WASM(V, I32x8GeU, Operator::kNoProperties, 2, 0, 1) \
693 IF_WASM(V, I16x16Ne, Operator::kCommutative, 2, 0, 1) \
694 IF_WASM(V, I16x16GtU, Operator::kNoProperties, 2, 0, 1) \
695 IF_WASM(V, I16x16GeS, Operator::kNoProperties, 2, 0, 1) \
696 IF_WASM(V, I16x16GeU, Operator::kNoProperties, 2, 0, 1) \
697 IF_WASM(V, I8x32Ne, Operator::kCommutative, 2, 0, 1) \
698 IF_WASM(V, I8x32GtU, Operator::kNoProperties, 2, 0, 1) \
699 IF_WASM(V, I8x32GeS, Operator::kNoProperties, 2, 0, 1) \
700 IF_WASM(V, I8x32GeU, Operator::kNoProperties, 2, 0, 1) \
701 IF_WASM(V, I32x8SConvertF32x8, Operator::kNoProperties, 1, 0, 1) \
702 IF_WASM(V, I32x8UConvertF32x8, Operator::kNoProperties, 1, 0, 1) \
703 IF_WASM(V, F64x4ConvertI32x4S, Operator::kNoProperties, 1, 0, 1) \
704 IF_WASM(V, F32x8SConvertI32x8, Operator::kNoProperties, 1, 0, 1) \
705 IF_WASM(V, F32x8UConvertI32x8, Operator::kNoProperties, 1, 0, 1) \
706 IF_WASM(V, F32x4DemoteF64x4, Operator::kNoProperties, 1, 0, 1) \
707 IF_WASM(V, I64x4SConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
708 IF_WASM(V, I64x4UConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
709 IF_WASM(V, I32x8SConvertI16x8, Operator::kNoProperties, 1, 0, 1) \
710 IF_WASM(V, I32x8UConvertI16x8, Operator::kNoProperties, 1, 0, 1) \
711 IF_WASM(V, I16x16SConvertI8x16, Operator::kNoProperties, 1, 0, 1) \
712 IF_WASM(V, I16x16UConvertI8x16, Operator::kNoProperties, 1, 0, 1) \
713 IF_WASM(V, I16x16SConvertI32x8, Operator::kNoProperties, 2, 0, 1) \
714 IF_WASM(V, I16x16UConvertI32x8, Operator::kNoProperties, 2, 0, 1) \
715 IF_WASM(V, I8x32SConvertI16x16, Operator::kNoProperties, 2, 0, 1) \
716 IF_WASM(V, I8x32UConvertI16x16, Operator::kNoProperties, 2, 0, 1) \
717 IF_WASM(V, I32x8Neg, Operator::kNoProperties, 1, 0, 1) \
718 IF_WASM(V, I32x8Abs, Operator::kNoProperties, 1, 0, 1) \
719 IF_WASM(V, I16x16Neg, Operator::kNoProperties, 1, 0, 1) \
720 IF_WASM(V, I16x16Abs, Operator::kNoProperties, 1, 0, 1) \
721 IF_WASM(V, I8x32Neg, Operator::kNoProperties, 1, 0, 1) \
722 IF_WASM(V, I8x32Abs, Operator::kNoProperties, 1, 0, 1) \
723 IF_WASM(V, I64x4Shl, Operator::kNoProperties, 2, 0, 1) \
724 IF_WASM(V, I64x4ShrU, Operator::kNoProperties, 2, 0, 1) \
725 IF_WASM(V, I32x8Shl, Operator::kNoProperties, 2, 0, 1) \
726 IF_WASM(V, I32x8ShrS, Operator::kNoProperties, 2, 0, 1) \
727 IF_WASM(V, I32x8ShrU, Operator::kNoProperties, 2, 0, 1) \
728 IF_WASM(V, I16x16Shl, Operator::kNoProperties, 2, 0, 1) \
729 IF_WASM(V, I16x16ShrS, Operator::kNoProperties, 2, 0, 1) \
730 IF_WASM(V, I16x16ShrU, Operator::kNoProperties, 2, 0, 1) \
731 IF_WASM(V, I32x8DotI16x16S, Operator::kCommutative, 2, 0, 1) \
732 IF_WASM(V, I16x16RoundingAverageU, Operator::kCommutative, 2, 0, 1) \
733 IF_WASM(V, I8x32RoundingAverageU, Operator::kCommutative, 2, 0, 1) \
734 IF_WASM(V, I64x4ExtMulI32x4S, Operator::kCommutative, 2, 0, 1) \
735 IF_WASM(V, I64x4ExtMulI32x4U, Operator::kCommutative, 2, 0, 1) \
736 IF_WASM(V, I32x8ExtMulI16x8S, Operator::kCommutative, 2, 0, 1) \
737 IF_WASM(V, I32x8ExtMulI16x8U, Operator::kCommutative, 2, 0, 1) \
738 IF_WASM(V, I16x16ExtMulI8x16S, Operator::kCommutative, 2, 0, 1) \
739 IF_WASM(V, I16x16ExtMulI8x16U, Operator::kCommutative, 2, 0, 1) \
740 IF_WASM(V, I32x8ExtAddPairwiseI16x16S, Operator::kNoProperties, 1, 0, 1) \
741 IF_WASM(V, I32x8ExtAddPairwiseI16x16U, Operator::kNoProperties, 1, 0, 1) \
742 IF_WASM(V, I16x16ExtAddPairwiseI8x32S, Operator::kNoProperties, 1, 0, 1) \
743 IF_WASM(V, I16x16ExtAddPairwiseI8x32U, Operator::kNoProperties, 1, 0, 1) \
744 IF_WASM(V, F64x4Pmin, Operator::kNoProperties, 2, 0, 1) \
745 IF_WASM(V, F64x4Pmax, Operator::kNoProperties, 2, 0, 1) \
746 IF_WASM(V, S256Zero, Operator::kNoProperties, 0, 0, 1) \
747 IF_WASM(V, S256And, Operator::kAssociative | Operator::kCommutative, 2, 0, \
748 1) \
749 IF_WASM(V, S256Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
750 IF_WASM(V, S256Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, \
751 1) \
752 IF_WASM(V, S256Not, Operator::kNoProperties, 1, 0, 1) \
753 IF_WASM(V, S256Select, Operator::kNoProperties, 3, 0, 1) \
754 IF_WASM(V, S256AndNot, Operator::kNoProperties, 2, 0, 1) \
755 IF_WASM(V, F32x8Qfma, Operator::kNoProperties, 3, 0, 1) \
756 IF_WASM(V, F32x8Qfms, Operator::kNoProperties, 3, 0, 1) \
757 IF_WASM(V, F64x4Qfma, Operator::kNoProperties, 3, 0, 1) \
758 IF_WASM(V, F64x4Qfms, Operator::kNoProperties, 3, 0, 1) \
759 IF_WASM(V, I64x4RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
760 IF_WASM(V, I32x8RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
761 IF_WASM(V, I16x16RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
762 IF_WASM(V, I8x32RelaxedLaneSelect, Operator::kNoProperties, 3, 0, 1) \
763 IF_WASM(V, I32x8DotI8x32I7x32AddS, Operator::kNoProperties, 3, 0, 1) \
764 IF_WASM(V, I16x16DotI8x32I7x32S, Operator::kNoProperties, 2, 0, 1) \
765 IF_WASM(V, I32x8RelaxedTruncF32x8S, Operator::kNoProperties, 1, 0, 1) \
766 IF_WASM(V, I32x8RelaxedTruncF32x8U, Operator::kNoProperties, 1, 0, 1)
767
768// The format is:
769// V(Name, properties, value_input_count, control_input_count, output_count)
770#define MACHINE_PURE_OP_LIST(V) \
771 PURE_BINARY_OP_LIST_32(V) \
772 PURE_BINARY_OP_LIST_64(V) \
773 PURE_SIMD_OP_LIST(V) \
774 V(Word32Clz, Operator::kNoProperties, 1, 0, 1) \
775 V(Word64Clz, Operator::kNoProperties, 1, 0, 1) \
776 V(Word64ClzLowerable, Operator::kNoProperties, 1, 1, 1) \
777 V(Word32ReverseBytes, Operator::kNoProperties, 1, 0, 1) \
778 V(Word64ReverseBytes, Operator::kNoProperties, 1, 0, 1) \
779 V(Simd128ReverseBytes, Operator::kNoProperties, 1, 0, 1) \
780 V(BitcastTaggedToWordForTagAndSmiBits, Operator::kNoProperties, 1, 0, 1) \
781 V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1) \
782 V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1) \
783 V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
784 V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
785 V(ChangeFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
786 V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
787 V(ChangeFloat64ToUint64, Operator::kNoProperties, 1, 0, 1) \
788 V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
789 V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2) \
790 V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2) \
791 V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2) \
792 V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2) \
793 V(TryTruncateFloat64ToInt32, Operator::kNoProperties, 1, 0, 2) \
794 V(TryTruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 2) \
795 V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
796 V(ChangeInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
797 V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1) \
798 V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
799 V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
800 V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
801 V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
802 V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
803 V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
804 V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
805 V(BitcastWord32ToWord64, Operator::kNoProperties, 1, 0, 1) \
806 V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1) \
807 V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
808 V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1) \
809 V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
810 V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1) \
811 V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
812 V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
813 V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
814 V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
815 V(SignExtendWord8ToInt32, Operator::kNoProperties, 1, 0, 1) \
816 V(SignExtendWord16ToInt32, Operator::kNoProperties, 1, 0, 1) \
817 V(SignExtendWord8ToInt64, Operator::kNoProperties, 1, 0, 1) \
818 V(SignExtendWord16ToInt64, Operator::kNoProperties, 1, 0, 1) \
819 V(SignExtendWord32ToInt64, Operator::kNoProperties, 1, 0, 1) \
820 V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \
821 V(Float32Add, Operator::kCommutative, 2, 0, 1) \
822 V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \
823 V(Float32Mul, Operator::kCommutative, 2, 0, 1) \
824 V(Float32Div, Operator::kNoProperties, 2, 0, 1) \
825 V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \
826 V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \
827 V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
828 V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
829 V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \
830 V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \
831 V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \
832 V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \
833 V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \
834 V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \
835 V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \
836 V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \
837 V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \
838 V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \
839 V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \
840 V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \
841 V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \
842 V(Float64Log, Operator::kNoProperties, 1, 0, 1) \
843 V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \
844 V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \
845 V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \
846 V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
847 V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
848 V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \
849 V(Float64Add, Operator::kCommutative, 2, 0, 1) \
850 V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \
851 V(Float64Mul, Operator::kCommutative, 2, 0, 1) \
852 V(Float64Div, Operator::kNoProperties, 2, 0, 1) \
853 V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \
854 V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \
855 V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \
856 V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \
857 V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \
858 V(Float64Tan, Operator::kNoProperties, 1, 0, 1) \
859 V(Float64Tanh, Operator::kNoProperties, 1, 0, 1) \
860 V(Float32Equal, Operator::kCommutative, 2, 0, 1) \
861 V(Float32LessThan, Operator::kNoProperties, 2, 0, 1) \
862 V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
863 V(Float64Equal, Operator::kCommutative, 2, 0, 1) \
864 V(Float64LessThan, Operator::kNoProperties, 2, 0, 1) \
865 V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
866 V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1) \
867 V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1) \
868 V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
869 V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
870 V(LoadStackCheckOffset, Operator::kNoProperties, 0, 0, 1) \
871 V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
872 V(LoadRootRegister, Operator::kNoProperties, 0, 0, 1) \
873 V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
874 V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
875 V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
876 V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
877 V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
878 V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
879 V(Word32PairSar, Operator::kNoProperties, 3, 0, 2)
880
881// The format is:
882// V(Name, properties, value_input_count, control_input_count, output_count)
883#define PURE_OPTIONAL_OP_LIST(V) \
884 V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \
885 V(Word64Ctz, Operator::kNoProperties, 1, 0, 1) \
886 V(Word64CtzLowerable, Operator::kNoProperties, 1, 1, 1) \
887 V(Word32Rol, Operator::kNoProperties, 2, 0, 1) \
888 V(Word64Rol, Operator::kNoProperties, 2, 0, 1) \
889 V(Word64RolLowerable, Operator::kNoProperties, 2, 1, 1) \
890 V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1) \
891 V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1) \
892 V(Int32AbsWithOverflow, Operator::kNoProperties, 1, 0, 2) \
893 V(Int64AbsWithOverflow, Operator::kNoProperties, 1, 0, 2) \
894 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \
895 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \
896 V(Float32RoundDown, Operator::kNoProperties, 1, 0, 1) \
897 V(Float64RoundDown, Operator::kNoProperties, 1, 0, 1) \
898 V(Float32RoundUp, Operator::kNoProperties, 1, 0, 1) \
899 V(Float64RoundUp, Operator::kNoProperties, 1, 0, 1) \
900 V(Float32RoundTruncate, Operator::kNoProperties, 1, 0, 1) \
901 V(Float64RoundTruncate, Operator::kNoProperties, 1, 0, 1) \
902 V(Float64RoundTiesAway, Operator::kNoProperties, 1, 0, 1) \
903 V(Float32RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \
904 V(Float64RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \
905 V(Word32Select, Operator::kNoProperties, 3, 0, 1) \
906 V(Word64Select, Operator::kNoProperties, 3, 0, 1) \
907 V(Float32Select, Operator::kNoProperties, 3, 0, 1) \
908 V(Float64Select, Operator::kNoProperties, 3, 0, 1)
909
910// The format is:
911// V(Name, properties, value_input_count, control_input_count, output_count)
912#define OVERFLOW_OP_LIST(V) \
913 V(Int32AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \
914 V(Int32SubWithOverflow, Operator::kNoProperties) \
915 V(Int32MulWithOverflow, Operator::kAssociative | Operator::kCommutative) \
916 V(Int64AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \
917 V(Int64SubWithOverflow, Operator::kNoProperties) \
918 V(Int64MulWithOverflow, Operator::kAssociative | Operator::kCommutative)
919
920#define MACHINE_TYPE_LIST(V) \
921 V(Float16) \
922 V(Float32) \
923 V(Float64) \
924 V(Simd128) \
925 V(Int8) \
926 V(Uint8) \
927 V(Int16) \
928 V(Uint16) \
929 V(Int32) \
930 V(Uint32) \
931 V(Int64) \
932 V(Uint64) \
933 V(Pointer) \
934 V(TaggedSigned) \
935 V(TaggedPointer) \
936 V(MapInHeader) \
937 V(AnyTagged) \
938 V(CompressedPointer) \
939 V(ProtectedPointer) \
940 V(SandboxedPointer) \
941 V(AnyCompressed) \
942 V(Simd256)
943
944#define MACHINE_REPRESENTATION_LIST(V) \
945 V(kFloat16) \
946 V(kFloat32) \
947 V(kFloat64) \
948 V(kSimd128) \
949 V(kWord8) \
950 V(kWord16) \
951 V(kWord32) \
952 V(kWord64) \
953 V(kMapWord) \
954 V(kTaggedSigned) \
955 V(kTaggedPointer) \
956 V(kTagged) \
957 V(kCompressedPointer) \
958 V(kSandboxedPointer) \
959 V(kCompressed) \
960 V(kSimd256)
961
962#ifdef V8_TARGET_ARCH_64_BIT
963
964#ifdef V8_COMPRESS_POINTERS
965
966#define STORE_PAIR_MACHINE_REPRESENTATION_LIST(V) \
967 V(kWord32, kWord32) \
968 V(kWord32, kTagged) \
969 V(kWord32, kTaggedSigned) \
970 V(kWord32, kTaggedPointer) \
971 V(kWord32, kCompressed) \
972 V(kWord32, kCompressedPointer) \
973 V(kTagged, kWord32) \
974 V(kTagged, kTagged) \
975 V(kTagged, kTaggedSigned) \
976 V(kTagged, kTaggedPointer) \
977 V(kTagged, kCompressed) \
978 V(kTagged, kCompressedPointer) \
979 V(kTaggedSigned, kWord32) \
980 V(kTaggedSigned, kTagged) \
981 V(kTaggedSigned, kTaggedSigned) \
982 V(kTaggedSigned, kTaggedPointer) \
983 V(kTaggedSigned, kCompressed) \
984 V(kTaggedSigned, kCompressedPointer) \
985 V(kTaggedPointer, kWord32) \
986 V(kTaggedPointer, kTagged) \
987 V(kTaggedPointer, kTaggedSigned) \
988 V(kTaggedPointer, kTaggedPointer) \
989 V(kTaggedPointer, kCompressed) \
990 V(kTaggedPointer, kCompressedPointer) \
991 V(kCompressed, kWord32) \
992 V(kCompressed, kTagged) \
993 V(kCompressed, kTaggedSigned) \
994 V(kCompressed, kTaggedPointer) \
995 V(kCompressed, kCompressed) \
996 V(kCompressed, kCompressedPointer) \
997 V(kCompressedPointer, kWord32) \
998 V(kCompressedPointer, kTagged) \
999 V(kCompressedPointer, kTaggedSigned) \
1000 V(kCompressedPointer, kTaggedPointer) \
1001 V(kCompressedPointer, kCompressed) \
1002 V(kCompressedPointer, kCompressedPointer) \
1003 V(kWord64, kWord64)
1004
1005#else
1006
1007#define STORE_PAIR_MACHINE_REPRESENTATION_LIST(V) \
1008 V(kWord32, kWord32) \
1009 V(kWord64, kWord64) \
1010 V(kWord64, kTagged) \
1011 V(kWord64, kTaggedSigned) \
1012 V(kWord64, kTaggedPointer) \
1013 V(kTagged, kWord64) \
1014 V(kTagged, kTagged) \
1015 V(kTagged, kTaggedSigned) \
1016 V(kTagged, kTaggedPointer) \
1017 V(kTaggedSigned, kWord64) \
1018 V(kTaggedSigned, kTagged) \
1019 V(kTaggedSigned, kTaggedSigned) \
1020 V(kTaggedSigned, kTaggedPointer) \
1021 V(kTaggedPointer, kWord64) \
1022 V(kTaggedPointer, kTagged) \
1023 V(kTaggedPointer, kTaggedSigned) \
1024 V(kTaggedPointer, kTaggedPointer)
1025
1026#endif // V8_COMPRESS_POINTERS
1027
1028#else
1029
1030#define STORE_PAIR_MACHINE_REPRESENTATION_LIST(V)
1031
1032#endif // V8_TARGET_ARCH_64_BIT
1033
1034#define LOAD_TRANSFORM_LIST(V) \
1035 V(S128Load8Splat) \
1036 V(S128Load16Splat) \
1037 V(S128Load32Splat) \
1038 V(S128Load64Splat) \
1039 V(S128Load8x8S) \
1040 V(S128Load8x8U) \
1041 V(S128Load16x4S) \
1042 V(S128Load16x4U) \
1043 V(S128Load32x2S) \
1044 V(S128Load32x2U) \
1045 V(S128Load32Zero) \
1046 V(S128Load64Zero) \
1047 V(S256Load8Splat) \
1048 V(S256Load16Splat) \
1049 V(S256Load32Splat) \
1050 V(S256Load64Splat) \
1051 V(S256Load8x16S) \
1052 V(S256Load8x16U) \
1053 V(S256Load16x8S) \
1054 V(S256Load16x8U) \
1055 V(S256Load32x4S) \
1056 V(S256Load32x4U)
1057
1058#if TAGGED_SIZE_8_BYTES
1059
1060#define ATOMIC_TAGGED_TYPE_LIST(V)
1061
1062#define ATOMIC64_TAGGED_TYPE_LIST(V) \
1063 V(TaggedSigned) \
1064 V(TaggedPointer) \
1065 V(AnyTagged) \
1066 V(CompressedPointer) \
1067 V(AnyCompressed)
1068
1069#else
1070
1071#define ATOMIC_TAGGED_TYPE_LIST(V) \
1072 V(TaggedSigned) \
1073 V(TaggedPointer) \
1074 V(AnyTagged) \
1075 V(CompressedPointer) \
1076 V(AnyCompressed)
1077
1078#define ATOMIC64_TAGGED_TYPE_LIST(V)
1079
1080#endif // TAGGED_SIZE_8_BYTES
1081
1082#define ATOMIC_U32_TYPE_LIST(V) \
1083 V(Uint8) \
1084 V(Uint16) \
1085 V(Uint32)
1086
1087#define ATOMIC_TYPE_LIST(V) \
1088 ATOMIC_U32_TYPE_LIST(V) \
1089 V(Int8) \
1090 V(Int16) \
1091 V(Int32)
1092
1093#define ATOMIC_U64_TYPE_LIST(V) \
1094 ATOMIC_U32_TYPE_LIST(V) \
1095 V(Uint64)
1096
1097#if TAGGED_SIZE_8_BYTES
1098
1099#define ATOMIC_TAGGED_REPRESENTATION_LIST(V)
1100
1101#define ATOMIC64_TAGGED_REPRESENTATION_LIST(V) \
1102 V(kTaggedSigned) \
1103 V(kTaggedPointer) \
1104 V(kTagged)
1105
1106#else
1107
1108#define ATOMIC_TAGGED_REPRESENTATION_LIST(V) \
1109 V(kTaggedSigned) \
1110 V(kTaggedPointer) \
1111 V(kTagged) \
1112 V(kCompressedPointer) \
1113 V(kCompressed)
1114
1115#define ATOMIC64_TAGGED_REPRESENTATION_LIST(V)
1116
1117#endif // TAGGED_SIZE_8_BYTES
1118
1119#define ATOMIC_REPRESENTATION_LIST(V) \
1120 V(kWord8) \
1121 V(kWord16) \
1122 V(kWord32)
1123
1124#define ATOMIC64_REPRESENTATION_LIST(V) \
1125 ATOMIC_REPRESENTATION_LIST(V) \
1126 V(kWord64)
1127
1128#define ATOMIC_PAIR_BINOP_LIST(V) \
1129 V(Add) \
1130 V(Sub) \
1131 V(And) \
1132 V(Or) \
1133 V(Xor) \
1134 V(Exchange)
1135
1136#define SIMD_LANE_OP_LIST(V) \
1137 V(F64x2, 2) \
1138 V(F32x4, 4) \
1139 V(I64x2, 2) \
1140 V(I32x4, 4) \
1141 V(F16x8, 8) \
1142 V(I16x8, 8) \
1143 V(I8x16, 16)
1144
1145#define SIMD_I64x2_LANES(V) V(0) V(1)
1146
1147#define SIMD_I32x4_LANES(V) SIMD_I64x2_LANES(V) V(2) V(3)
1148
1149#define SIMD_I16x8_LANES(V) SIMD_I32x4_LANES(V) V(4) V(5) V(6) V(7)
1150
1151#define SIMD_I8x16_LANES(V) \
1152 SIMD_I16x8_LANES(V) V(8) V(9) V(10) V(11) V(12) V(13) V(14) V(15)
1153
1154#define STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST(V) \
1155 V(4, 0, false) \
1156 V(8, 0, false) V(16, 0, false) V(4, 4, false) V(8, 8, false) V(16, 16, false)
1157
1158struct StackSlotOperator : public Operator1<StackSlotRepresentation> {
1159 explicit StackSlotOperator(int size, int alignment, bool is_tagged)
1162 "StackSlot", 0, 0, 0, 1, 0, 0,
1163 StackSlotRepresentation(size, alignment, is_tagged)) {}
1164};
1165
1167#define PURE(Name, properties, value_input_count, control_input_count, \
1168 output_count) \
1169 struct Name##Operator final : public Operator { \
1170 Name##Operator() \
1171 : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
1172 value_input_count, 0, control_input_count, output_count, 0, \
1173 0) {} \
1174 }; \
1175 Name##Operator k##Name;
1179 : Operator1<ShiftKind>(IrOpcode::kWord32Sar, Operator::kPure,
1180 "Word32Sar", 2, 0, 0, 1, 0, 0,
1181 ShiftKind::kNormal) {}
1182 };
1184 struct ShiftOutZerosWord32SarOperator final : public Operator1<ShiftKind> {
1186 : Operator1<ShiftKind>(IrOpcode::kWord32Sar, Operator::kPure,
1187 "Word32Sar", 2, 0, 0, 1, 0, 0,
1189 };
1191 struct NormalWord64SarOperator final : public Operator1<ShiftKind> {
1193 : Operator1<ShiftKind>(IrOpcode::kWord64Sar, Operator::kPure,
1194 "Word64Sar", 2, 0, 0, 1, 0, 0,
1195 ShiftKind::kNormal) {}
1196 };
1198 struct ShiftOutZerosWord64SarOperator final : public Operator1<ShiftKind> {
1200 : Operator1<ShiftKind>(IrOpcode::kWord64Sar, Operator::kPure,
1201 "Word64Sar", 2, 0, 0, 1, 0, 0,
1203 };
1205
1207 : public Operator1<TruncateKind> {
1209 : Operator1<TruncateKind>(IrOpcode::kTruncateFloat32ToUint32,
1210 Operator::kPure, "TruncateFloat32ToUint32", 1,
1211 0, 0, 1, 0, 0,
1213 };
1214 ArchitectureDefaultTruncateFloat32ToUint32Operator
1217 : public Operator1<TruncateKind> {
1219 : Operator1<TruncateKind>(IrOpcode::kTruncateFloat32ToUint32,
1220 Operator::kPure, "TruncateFloat32ToUint32", 1,
1221 0, 0, 1, 0, 0,
1223 };
1224 SetOverflowToMinTruncateFloat32ToUint32Operator
1226
1228 : public Operator1<TruncateKind> {
1230 : Operator1<TruncateKind>(IrOpcode::kTruncateFloat32ToInt32,
1231 Operator::kPure, "TruncateFloat32ToInt32", 1,
1232 0, 0, 1, 0, 0,
1234 };
1235 ArchitectureDefaultTruncateFloat32ToInt32Operator
1238 : public Operator1<TruncateKind> {
1240 : Operator1<TruncateKind>(IrOpcode::kTruncateFloat32ToInt32,
1241 Operator::kPure, "TruncateFloat32ToInt32", 1,
1242 0, 0, 1, 0, 0,
1244 };
1245 SetOverflowToMinTruncateFloat32ToInt32Operator
1247
1249 : public Operator1<TruncateKind> {
1251 : Operator1(IrOpcode::kTruncateFloat64ToInt64, Operator::kPure,
1252 "TruncateFloat64ToInt64", 1, 0, 0, 1, 0, 0,
1254 };
1255 ArchitectureDefaultTruncateFloat64ToInt64Operator
1258 : public Operator1<TruncateKind> {
1260 : Operator1(IrOpcode::kTruncateFloat64ToInt64, Operator::kPure,
1261 "TruncateFloat64ToInt64", 1, 0, 0, 1, 0, 0,
1263 };
1264 SetOverflowToMinTruncateFloat64ToInt64Operator
1269 "TruncateFloat64ToFloat16RawBits", 1, 0, 0, 1, 0, 0) {}
1270 };
1271
1276 "ChangeFloat16RawBitsToFloat64", 1, 0, 0, 1, 0, 0) {}
1277 };
1280#undef PURE
1281
1282#define OVERFLOW_OP(Name, properties) \
1283 struct Name##Operator final : public Operator { \
1284 Name##Operator() \
1285 : Operator(IrOpcode::k##Name, \
1286 Operator::kEliminatable | Operator::kNoRead | properties, \
1287 #Name, 2, 0, 1, 2, 0, 0) {} \
1288 }; \
1289 Name##Operator k##Name;
1291#undef OVERFLOW_OP
1292
1293// ProtectedLoad and LoadTrapOnNull are not marked kNoWrite, so potentially
1294// trapping loads are not eliminated if their result is unused.
1295#define LOAD(Type) \
1296 struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \
1297 Load##Type##Operator() \
1298 : Operator1<LoadRepresentation>(IrOpcode::kLoad, \
1299 Operator::kEliminatable, "Load", 2, 1, \
1300 1, 1, 1, 0, MachineType::Type()) {} \
1301 }; \
1302 struct UnalignedLoad##Type##Operator final \
1303 : public Operator1<LoadRepresentation> { \
1304 UnalignedLoad##Type##Operator() \
1305 : Operator1<LoadRepresentation>( \
1306 IrOpcode::kUnalignedLoad, Operator::kEliminatable, \
1307 "UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
1308 }; \
1309 struct ProtectedLoad##Type##Operator final \
1310 : public Operator1<LoadRepresentation> { \
1311 ProtectedLoad##Type##Operator() \
1312 : Operator1<LoadRepresentation>( \
1313 IrOpcode::kProtectedLoad, \
1314 Operator::kNoDeopt | Operator::kNoThrow, "ProtectedLoad", 2, 1, \
1315 1, 1, 1, 0, MachineType::Type()) {} \
1316 }; \
1317 struct LoadTrapOnNull##Type##Operator final \
1318 : public Operator1<LoadRepresentation> { \
1319 LoadTrapOnNull##Type##Operator() \
1320 : Operator1<LoadRepresentation>( \
1321 IrOpcode::kLoadTrapOnNull, \
1322 Operator::kNoDeopt | Operator::kNoThrow, "LoadTrapOnNull", 2, 1, \
1323 1, 1, 1, 0, MachineType::Type()) {} \
1324 }; \
1325 struct LoadImmutable##Type##Operator final \
1326 : public Operator1<LoadRepresentation> { \
1327 LoadImmutable##Type##Operator() \
1328 : Operator1<LoadRepresentation>(IrOpcode::kLoadImmutable, \
1329 Operator::kPure, "LoadImmutable", 2, \
1330 0, 0, 1, 0, 0, MachineType::Type()) {} \
1331 }; \
1332 Load##Type##Operator kLoad##Type; \
1333 UnalignedLoad##Type##Operator kUnalignedLoad##Type; \
1334 ProtectedLoad##Type##Operator kProtectedLoad##Type; \
1335 LoadTrapOnNull##Type##Operator kLoadTrapOnNull##Type; \
1336 LoadImmutable##Type##Operator kLoadImmutable##Type;
1338#undef LOAD
1339
1340#if V8_ENABLE_WEBASSEMBLY
1341#define LOAD_TRANSFORM_KIND(TYPE, KIND) \
1342 struct KIND##LoadTransform##TYPE##Operator final \
1343 : public Operator1<LoadTransformParameters> { \
1344 KIND##LoadTransform##TYPE##Operator() \
1345 : Operator1<LoadTransformParameters>( \
1346 IrOpcode::kLoadTransform, \
1347 MemoryAccessKind::k##KIND == \
1348 MemoryAccessKind::kProtectedByTrapHandler \
1349 ? Operator::kNoDeopt | Operator::kNoThrow \
1350 : Operator::kEliminatable, \
1351 #KIND "LoadTransform", 2, 1, 1, 1, 1, 0, \
1352 LoadTransformParameters{MemoryAccessKind::k##KIND, \
1353 LoadTransformation::k##TYPE}) {} \
1354 }; \
1355 KIND##LoadTransform##TYPE##Operator k##KIND##LoadTransform##TYPE;
1356
1357#define LOAD_TRANSFORM(TYPE) \
1358 LOAD_TRANSFORM_KIND(TYPE, Normal) \
1359 LOAD_TRANSFORM_KIND(TYPE, Unaligned) \
1360 LOAD_TRANSFORM_KIND(TYPE, ProtectedByTrapHandler)
1361
1362 LOAD_TRANSFORM_LIST(LOAD_TRANSFORM)
1363#undef LOAD_TRANSFORM
1364#undef LOAD_TRANSFORM_KIND
1365#endif // V8_ENABLE_WEBASSEMBLY
1366
1367#define STACKSLOT(Size, Alignment, IsTagged) \
1368 struct StackSlotOfSize##Size##OfAlignment##Alignment##IsTagged##Operator \
1369 final : public StackSlotOperator { \
1370 StackSlotOfSize##Size##OfAlignment##Alignment##IsTagged##Operator() \
1371 : StackSlotOperator(Size, Alignment, IsTagged) {} \
1372 }; \
1373 StackSlotOfSize##Size##OfAlignment##Alignment##IsTagged##Operator \
1374 kStackSlotOfSize##Size##OfAlignment##Alignment##IsTagged;
1376#undef STACKSLOT
1377
1378#define STORE(Type) \
1379 struct Store##Type##Operator : public Operator1<StoreRepresentation> { \
1380 explicit Store##Type##Operator(WriteBarrierKind write_barrier_kind) \
1381 : Operator1<StoreRepresentation>( \
1382 IrOpcode::kStore, \
1383 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1384 "Store", 3, 1, 1, 0, 1, 0, \
1385 StoreRepresentation(MachineRepresentation::Type, \
1386 write_barrier_kind)) {} \
1387 }; \
1388 struct Store##Type##NoWriteBarrier##Operator final \
1389 : public Store##Type##Operator { \
1390 Store##Type##NoWriteBarrier##Operator() \
1391 : Store##Type##Operator(kNoWriteBarrier) {} \
1392 }; \
1393 struct Store##Type##AssertNoWriteBarrier##Operator final \
1394 : public Store##Type##Operator { \
1395 Store##Type##AssertNoWriteBarrier##Operator() \
1396 : Store##Type##Operator(kAssertNoWriteBarrier) {} \
1397 }; \
1398 struct Store##Type##MapWriteBarrier##Operator final \
1399 : public Store##Type##Operator { \
1400 Store##Type##MapWriteBarrier##Operator() \
1401 : Store##Type##Operator(kMapWriteBarrier) {} \
1402 }; \
1403 struct Store##Type##PointerWriteBarrier##Operator final \
1404 : public Store##Type##Operator { \
1405 Store##Type##PointerWriteBarrier##Operator() \
1406 : Store##Type##Operator(kPointerWriteBarrier) {} \
1407 }; \
1408 struct Store##Type##EphemeronKeyWriteBarrier##Operator final \
1409 : public Store##Type##Operator { \
1410 Store##Type##EphemeronKeyWriteBarrier##Operator() \
1411 : Store##Type##Operator(kEphemeronKeyWriteBarrier) {} \
1412 }; \
1413 struct Store##Type##FullWriteBarrier##Operator final \
1414 : public Store##Type##Operator { \
1415 Store##Type##FullWriteBarrier##Operator() \
1416 : Store##Type##Operator(kFullWriteBarrier) {} \
1417 }; \
1418 struct UnalignedStore##Type##Operator final \
1419 : public Operator1<UnalignedStoreRepresentation> { \
1420 UnalignedStore##Type##Operator() \
1421 : Operator1<UnalignedStoreRepresentation>( \
1422 IrOpcode::kUnalignedStore, \
1423 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1424 "UnalignedStore", 3, 1, 1, 0, 1, 0, \
1425 MachineRepresentation::Type) {} \
1426 }; \
1427 struct ProtectedStore##Type##Operator \
1428 : public Operator1<StoreRepresentation> { \
1429 explicit ProtectedStore##Type##Operator() \
1430 : Operator1<StoreRepresentation>( \
1431 IrOpcode::kProtectedStore, \
1432 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1433 "ProtectedStore", 3, 1, 1, 0, 1, 0, \
1434 StoreRepresentation(MachineRepresentation::Type, \
1435 kNoWriteBarrier)) {} \
1436 }; \
1437 struct StoreTrapOnNull##Type##FullWriteBarrier##Operator \
1438 : public Operator1<StoreRepresentation> { \
1439 explicit StoreTrapOnNull##Type##FullWriteBarrier##Operator() \
1440 : Operator1<StoreRepresentation>( \
1441 IrOpcode::kStoreTrapOnNull, \
1442 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1443 "StoreTrapOnNull", 3, 1, 1, 0, 1, 0, \
1444 StoreRepresentation(MachineRepresentation::Type, \
1445 kFullWriteBarrier)) {} \
1446 }; \
1447 struct StoreTrapOnNull##Type##NoWriteBarrier##Operator \
1448 : public Operator1<StoreRepresentation> { \
1449 explicit StoreTrapOnNull##Type##NoWriteBarrier##Operator() \
1450 : Operator1<StoreRepresentation>( \
1451 IrOpcode::kStoreTrapOnNull, \
1452 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1453 "StoreTrapOnNull", 3, 1, 1, 0, 1, 0, \
1454 StoreRepresentation(MachineRepresentation::Type, \
1455 kNoWriteBarrier)) {} \
1456 }; \
1457 Store##Type##NoWriteBarrier##Operator kStore##Type##NoWriteBarrier; \
1458 Store##Type##AssertNoWriteBarrier##Operator \
1459 kStore##Type##AssertNoWriteBarrier; \
1460 Store##Type##MapWriteBarrier##Operator kStore##Type##MapWriteBarrier; \
1461 Store##Type##PointerWriteBarrier##Operator \
1462 kStore##Type##PointerWriteBarrier; \
1463 Store##Type##EphemeronKeyWriteBarrier##Operator \
1464 kStore##Type##EphemeronKeyWriteBarrier; \
1465 Store##Type##FullWriteBarrier##Operator kStore##Type##FullWriteBarrier; \
1466 UnalignedStore##Type##Operator kUnalignedStore##Type; \
1467 ProtectedStore##Type##Operator kProtectedStore##Type; \
1468 StoreTrapOnNull##Type##FullWriteBarrier##Operator \
1469 kStoreTrapOnNull##Type##FullWriteBarrier; \
1470 StoreTrapOnNull##Type##NoWriteBarrier##Operator \
1471 kStoreTrapOnNull##Type##NoWriteBarrier;
1473#undef STORE
1474
1475 friend std::ostream& operator<<(std::ostream& out,
1476 const StorePairRepresentation rep) {
1477 out << rep.first << "," << rep.second;
1478 return out;
1479 }
1480
1481#define STORE_PAIR(Type1, Type2) \
1482 struct StorePair##Type1##Type2##Operator \
1483 : public Operator1<StorePairRepresentation> { \
1484 explicit StorePair##Type1##Type2##Operator( \
1485 WriteBarrierKind write_barrier_kind1, \
1486 WriteBarrierKind write_barrier_kind2) \
1487 : Operator1<StorePairRepresentation>( \
1488 IrOpcode::kStorePair, \
1489 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1490 "StorePair", 4, 1, 1, 0, 1, 0, \
1491 { \
1492 StoreRepresentation(MachineRepresentation::Type1, \
1493 write_barrier_kind1), \
1494 StoreRepresentation(MachineRepresentation::Type2, \
1495 write_barrier_kind2), \
1496 }) {} \
1497 }; \
1498 struct StorePair##Type1##Type2##NoWriteBarrier##Operator final \
1499 : public StorePair##Type1##Type2##Operator { \
1500 StorePair##Type1##Type2##NoWriteBarrier##Operator() \
1501 : StorePair##Type1##Type2 \
1502 ##Operator(kNoWriteBarrier, kNoWriteBarrier) {} \
1503 }; \
1504 StorePair##Type1##Type2##NoWriteBarrier##Operator \
1505 kStorePair##Type1##Type2##NoWriteBarrier;
1506
1508#undef STORE_PAIR
1509
1510 // Indirect pointer stores have an additional value input (the
1511 // IndirectPointerTag associated with the field being stored to), but
1512 // otherwise are identical to regular stores.
1513 struct StoreIndirectPointerOperator : public Operator1<StoreRepresentation> {
1516 IrOpcode::kStoreIndirectPointer,
1518 "StoreIndirectPointer", 4, 1, 1, 0, 1, 0,
1520 write_barrier_kind)) {}
1521 };
1532
1533 StoreIndirectPointerNoWriteBarrierOperator
1537
1538#define ATOMIC_LOAD_WITH_KIND(Type, Kind) \
1539 struct Word32SeqCstLoad##Type##Kind##Operator \
1540 : public Operator1<AtomicLoadParameters> { \
1541 Word32SeqCstLoad##Type##Kind##Operator() \
1542 : Operator1<AtomicLoadParameters>( \
1543 IrOpcode::kWord32AtomicLoad, Operator::kNoProperties, \
1544 "Word32AtomicLoad", 2, 1, 1, 1, 1, 0, \
1545 AtomicLoadParameters(MachineType::Type(), \
1546 AtomicMemoryOrder::kSeqCst, \
1547 MemoryAccessKind::k##Kind)) {} \
1548 }; \
1549 Word32SeqCstLoad##Type##Kind##Operator kWord32SeqCstLoad##Type##Kind;
1550#define ATOMIC_LOAD(Type) \
1551 ATOMIC_LOAD_WITH_KIND(Type, Normal) \
1552 ATOMIC_LOAD_WITH_KIND(Type, ProtectedByTrapHandler)
1554#undef ATOMIC_LOAD_WITH_KIND
1555#undef ATOMIC_LOAD
1556
1557#define ATOMIC_LOAD_WITH_KIND(Type, Kind) \
1558 struct Word64SeqCstLoad##Type##Kind##Operator \
1559 : public Operator1<AtomicLoadParameters> { \
1560 Word64SeqCstLoad##Type##Kind##Operator() \
1561 : Operator1<AtomicLoadParameters>( \
1562 IrOpcode::kWord64AtomicLoad, Operator::kNoProperties, \
1563 "Word64AtomicLoad", 2, 1, 1, 1, 1, 0, \
1564 AtomicLoadParameters(MachineType::Type(), \
1565 AtomicMemoryOrder::kSeqCst, \
1566 MemoryAccessKind::k##Kind)) {} \
1567 }; \
1568 Word64SeqCstLoad##Type##Kind##Operator kWord64SeqCstLoad##Type##Kind;
1569#define ATOMIC_LOAD(Type) \
1570 ATOMIC_LOAD_WITH_KIND(Type, Normal) \
1571 ATOMIC_LOAD_WITH_KIND(Type, ProtectedByTrapHandler)
1573#undef ATOMIC_LOAD_WITH_KIND
1574#undef ATOMIC_LOAD
1575
1576#define ATOMIC_STORE_WITH_KIND(Type, Kind) \
1577 struct Word32SeqCstStore##Type##Kind##Operator \
1578 : public Operator1<AtomicStoreParameters> { \
1579 Word32SeqCstStore##Type##Kind##Operator() \
1580 : Operator1<AtomicStoreParameters>( \
1581 IrOpcode::kWord32AtomicStore, \
1582 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1583 "Word32AtomicStore", 3, 1, 1, 0, 1, 0, \
1584 AtomicStoreParameters(MachineRepresentation::Type, \
1585 kNoWriteBarrier, \
1586 AtomicMemoryOrder::kSeqCst, \
1587 MemoryAccessKind::k##Kind)) {} \
1588 }; \
1589 Word32SeqCstStore##Type##Kind##Operator kWord32SeqCstStore##Type##Kind;
1590#define ATOMIC_STORE(Type) \
1591 ATOMIC_STORE_WITH_KIND(Type, Normal) \
1592 ATOMIC_STORE_WITH_KIND(Type, ProtectedByTrapHandler)
1594#undef ATOMIC_STORE_WITH_KIND
1595#undef ATOMIC_STORE
1596
1597#define ATOMIC_STORE_WITH_KIND(Type, Kind) \
1598 struct Word64SeqCstStore##Type##Kind##Operator \
1599 : public Operator1<AtomicStoreParameters> { \
1600 Word64SeqCstStore##Type##Kind##Operator() \
1601 : Operator1<AtomicStoreParameters>( \
1602 IrOpcode::kWord64AtomicStore, \
1603 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
1604 "Word64AtomicStore", 3, 1, 1, 0, 1, 0, \
1605 AtomicStoreParameters(MachineRepresentation::Type, \
1606 kNoWriteBarrier, \
1607 AtomicMemoryOrder::kSeqCst, \
1608 MemoryAccessKind::k##Kind)) {} \
1609 }; \
1610 Word64SeqCstStore##Type##Kind##Operator kWord64SeqCstStore##Type##Kind;
1611#define ATOMIC_STORE(Type) \
1612 ATOMIC_STORE_WITH_KIND(Type, Normal) \
1613 ATOMIC_STORE_WITH_KIND(Type, ProtectedByTrapHandler)
1615#undef ATOMIC_STORE_WITH_KIND
1616#undef ATOMIC_STORE
1617
1618#define ATOMIC_OP(op, type, kind) \
1619 struct op##type##kind##Operator : public Operator1<AtomicOpParameters> { \
1620 op##type##kind##Operator() \
1621 : Operator1<AtomicOpParameters>(IrOpcode::k##op, \
1622 Operator::kNoDeopt | Operator::kNoThrow, #op, \
1623 3, 1, 1, 1, 1, 0, \
1624 AtomicOpParameters(MachineType::type(), \
1625 MemoryAccessKind::k##kind) \
1626 ){} \
1627 }; \
1628 op##type##kind##Operator k##op##type##kind;
1629#define ATOMIC_OP_LIST_WITH_KIND(type, kind) \
1630 ATOMIC_OP(Word32AtomicAdd, type, kind) \
1631 ATOMIC_OP(Word32AtomicSub, type, kind) \
1632 ATOMIC_OP(Word32AtomicAnd, type, kind) \
1633 ATOMIC_OP(Word32AtomicOr, type, kind) \
1634 ATOMIC_OP(Word32AtomicXor, type, kind) \
1635 ATOMIC_OP(Word32AtomicExchange, type, kind)
1636#define ATOMIC_OP_LIST(type) \
1637 ATOMIC_OP_LIST_WITH_KIND(type, Normal) \
1638 ATOMIC_OP_LIST_WITH_KIND(type, ProtectedByTrapHandler)
1640#undef ATOMIC_OP_LIST_WITH_KIND
1641#undef ATOMIC_OP_LIST
1642#define ATOMIC64_OP_LIST_WITH_KIND(type, kind) \
1643 ATOMIC_OP(Word64AtomicAdd, type, kind) \
1644 ATOMIC_OP(Word64AtomicSub, type, kind) \
1645 ATOMIC_OP(Word64AtomicAnd, type, kind) \
1646 ATOMIC_OP(Word64AtomicOr, type, kind) \
1647 ATOMIC_OP(Word64AtomicXor, type, kind) \
1648 ATOMIC_OP(Word64AtomicExchange, type, kind)
1649#define ATOMIC64_OP_LIST(type) \
1650 ATOMIC64_OP_LIST_WITH_KIND(type, Normal) \
1651 ATOMIC64_OP_LIST_WITH_KIND(type, ProtectedByTrapHandler)
1653#undef ATOMIC64_OP_LIST_WITH_KIND
1654#undef ATOMIC64_OP_LIST
1655#undef ATOMIC_OP
1656
1657#define ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, Kind) \
1658 struct Word32AtomicCompareExchange##Type##Kind##Operator \
1659 : public Operator1<AtomicOpParameters> { \
1660 Word32AtomicCompareExchange##Type##Kind##Operator() \
1661 : Operator1<AtomicOpParameters>( \
1662 IrOpcode::kWord32AtomicCompareExchange, \
1663 Operator::kNoDeopt | Operator::kNoThrow, \
1664 "Word32AtomicCompareExchange", 4, 1, 1, 1, 1, \
1665 0, \
1666 AtomicOpParameters(MachineType::Type(), \
1667 MemoryAccessKind::k##Kind) \
1668 ) {} \
1669 }; \
1670 Word32AtomicCompareExchange##Type##Kind##Operator \
1671 kWord32AtomicCompareExchange##Type##Kind;
1672#define ATOMIC_COMPARE_EXCHANGE(Type) \
1673 ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, Normal) \
1674 ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, ProtectedByTrapHandler)
1676#undef ATOMIC_COMPARE_EXCHANGE_WITH_KIND
1677#undef ATOMIC_COMPARE_EXCHANGE
1678
1679#define ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, Kind) \
1680 struct Word64AtomicCompareExchange##Type##Kind##Operator \
1681 : public Operator1<AtomicOpParameters> { \
1682 Word64AtomicCompareExchange##Type##Kind##Operator() \
1683 : Operator1<AtomicOpParameters>( \
1684 IrOpcode::kWord64AtomicCompareExchange, \
1685 Operator::kNoDeopt | Operator::kNoThrow, \
1686 "Word64AtomicCompareExchange", 4, 1, 1, 1, 1, \
1687 0, \
1688 AtomicOpParameters(MachineType::Type(), \
1689 MemoryAccessKind::k##Kind) \
1690 ) {} \
1691 }; \
1692 Word64AtomicCompareExchange##Type##Kind##Operator \
1693 kWord64AtomicCompareExchange##Type##Kind;
1694#define ATOMIC_COMPARE_EXCHANGE(Type) \
1695 ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, Normal) \
1696 ATOMIC_COMPARE_EXCHANGE_WITH_KIND(Type, ProtectedByTrapHandler)
1698#undef ATOMIC_COMPARE_EXCHANGE_WITH_KIND
1699#undef ATOMIC_COMPARE_EXCHANGE
1700
1701 struct Word32SeqCstPairLoadOperator : public Operator1<AtomicMemoryOrder> {
1703 : Operator1<AtomicMemoryOrder>(IrOpcode::kWord32AtomicPairLoad,
1705 "Word32AtomicPairLoad", 2, 1, 1, 2, 1, 0,
1707 };
1709
1710 struct Word32SeqCstPairStoreOperator : public Operator1<AtomicMemoryOrder> {
1712 : Operator1<AtomicMemoryOrder>(IrOpcode::kWord32AtomicPairStore,
1714 "Word32AtomicPairStore", 4, 1, 1, 0, 1,
1716 };
1718
1719#define ATOMIC_PAIR_OP(op) \
1720 struct Word32AtomicPair##op##Operator : public Operator { \
1721 Word32AtomicPair##op##Operator() \
1722 : Operator(IrOpcode::kWord32AtomicPair##op, \
1723 Operator::kNoDeopt | Operator::kNoThrow, \
1724 "Word32AtomicPair" #op, 4, 1, 1, 2, 1, 0) {} \
1725 }; \
1726 Word32AtomicPair##op##Operator kWord32AtomicPair##op;
1728#undef ATOMIC_PAIR_OP
1729#undef ATOMIC_PAIR_BINOP_LIST
1730
1735 "Word32AtomicPairCompareExchange", 6, 1, 1, 2, 1, 0) {}
1736 };
1738
1739 template <AtomicMemoryOrder order>
1740 struct MemoryBarrierOperator : public Operator1<AtomicMemoryOrder> {
1743 IrOpcode::kMemoryBarrier, Operator::kNoDeopt | Operator::kNoThrow,
1744 "SeqCstMemoryBarrier", 0, 1, 1, 0, 1, 0, order) {}
1745 };
1748
1749 // The {BitcastWordToTagged} operator must not be marked as pure (especially
1750 // not idempotent), because otherwise the splitting logic in the Scheduler
1751 // might decide to split these operators, thus potentially creating live
1752 // ranges of allocation top across calls or other things that might allocate.
1753 // See https://bugs.chromium.org/p/v8/issues/detail?id=6059 for more details.
1758 "BitcastWordToTagged", 1, 1, 1, 1, 1, 0) {}
1759 };
1761
1766 "BitcastTaggedToWord", 1, 1, 1, 1, 1, 0) {}
1767 };
1769
1774 "BitcastMaybeObjectToWord", 1, 1, 1, 1, 1, 0) {}
1775 };
1777
1781 "AbortCSADcheck", 1, 1, 1, 0, 1, 0) {}
1782 };
1784
1787 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0,
1788 1, 1, 0, 1, 0) {}
1789 };
1791
1792 struct StackPointerGreaterThanOperator : public Operator1<StackCheckKind> {
1795 IrOpcode::kStackPointerGreaterThan, Operator::kEliminatable,
1796 "StackPointerGreaterThan", 1, 1, 0, 1, 1, 0, kind) {}
1797 };
1798#define STACK_POINTER_GREATER_THAN(Kind) \
1799 struct StackPointerGreaterThan##Kind##Operator final \
1800 : public StackPointerGreaterThanOperator { \
1801 StackPointerGreaterThan##Kind##Operator() \
1802 : StackPointerGreaterThanOperator(StackCheckKind::k##Kind) {} \
1803 }; \
1804 StackPointerGreaterThan##Kind##Operator kStackPointerGreaterThan##Kind;
1805
1806 STACK_POINTER_GREATER_THAN(JSFunctionEntry)
1807 STACK_POINTER_GREATER_THAN(CodeStubAssembler)
1809#undef STACK_POINTER_GREATER_THAN
1810
1811#if V8_ENABLE_WEBASSEMBLY
1812 struct I8x16SwizzleOperator final : public Operator1<bool> {
1813 I8x16SwizzleOperator()
1814 : Operator1<bool>(IrOpcode::kI8x16Swizzle, Operator::kPure,
1815 "I8x16Swizzle", 2, 0, 0, 1, 0, 0, false) {}
1816 };
1817 I8x16SwizzleOperator kI8x16Swizzle;
1818 struct I8x16RelaxedSwizzleOperator final : public Operator1<bool> {
1819 I8x16RelaxedSwizzleOperator()
1820 : Operator1<bool>(IrOpcode::kI8x16Swizzle, Operator::kPure,
1821 "I8x16RelaxedSwizzle", 2, 0, 0, 1, 0, 0, true) {}
1822 };
1823 I8x16RelaxedSwizzleOperator kI8x16RelaxedSwizzle;
1824#endif // V8_ENABLE_WEBASSEMBLY
1825};
1826
1827struct CommentOperator : public Operator1<const char*> {
1828 explicit CommentOperator(const char* msg)
1829 : Operator1<const char*>(IrOpcode::kComment,
1831 "Comment", 0, 1, 1, 0, 1, 0, msg) {}
1832};
1833
1834namespace {
1835DEFINE_LAZY_LEAKY_OBJECT_GETTER(MachineOperatorGlobalCache,
1836 GetMachineOperatorGlobalCache)
1837}
1838
1840 Zone* zone, MachineRepresentation word, Flags flags,
1841 AlignmentRequirements alignmentRequirements)
1842 : zone_(zone),
1843 cache_(*GetMachineOperatorGlobalCache()),
1844 word_(word),
1845 flags_(flags),
1846 alignment_requirements_(alignmentRequirements) {
1849}
1850
1852#define LOAD(Type) \
1853 if (rep == MachineType::Type()) { \
1854 return &cache_.kUnalignedLoad##Type; \
1855 }
1857#undef LOAD
1858 UNREACHABLE();
1859}
1860
1863 switch (rep) {
1864#define STORE(kRep) \
1865 case MachineRepresentation::kRep: \
1866 return &cache_.kUnalignedStore##kRep;
1868#undef STORE
1874 UNREACHABLE();
1875 }
1876}
1877
1878#define PURE(Name, properties, value_input_count, control_input_count, \
1879 output_count) \
1880 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
1882#undef PURE
1883
1892
1901
1911
1921
1931
1932#define PURE(Name, properties, value_input_count, control_input_count, \
1933 output_count) \
1934 const OptionalOperator MachineOperatorBuilder::Name() { \
1935 return OptionalOperator(flags_ & k##Name, &cache_.k##Name); \
1936 }
1938#undef PURE
1939
1940// Following operators can't be in PURE_OPTIONAL_OP_LIST
1941// because they're both controlled by the same kFloat16RawBitsConversion flag,
1942// so the getters generated from PURE_OPTIONAL_OP_LIST would fail.
1943const OptionalOperator
1952
1953#define OVERFLOW_OP(Name, properties) \
1954 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
1956#undef OVERFLOW_OP
1957
1959 return zone_->New<Operator1<uint32_t>>(
1960 IrOpcode::kTraceInstruction, Operator::kNoDeopt | Operator::kNoThrow,
1961 "TraceInstruction", 0, 1, 1, 0, 1, 0, markid);
1962}
1963
1965 DCHECK(!rep.IsMapWord());
1966#define LOAD(Type) \
1967 if (rep == MachineType::Type()) { \
1968 return &cache_.kLoad##Type; \
1969 }
1971#undef LOAD
1972 UNREACHABLE();
1973}
1974
1975// Represents a load from a position in memory that is known to be immutable,
1976// e.g. an immutable IsolateRoot or an immutable field of a WasmInstanceObject.
1977// Because the returned value cannot change through the execution of a function,
1978// LoadImmutable is a pure operator and does not have effect or control edges.
1979// Requires that the memory in question has been initialized at function start
1980// even through inlining.
1982#define LOAD(Type) \
1983 if (rep == MachineType::Type()) { \
1984 return &cache_.kLoadImmutable##Type; \
1985 }
1987#undef LOAD
1988 UNREACHABLE();
1989}
1990
1992#define LOAD(Type) \
1993 if (rep == MachineType::Type()) { \
1994 return &cache_.kProtectedLoad##Type; \
1995 }
1997#undef LOAD
1998 UNREACHABLE();
1999}
2000
2002#define LOAD(Type) \
2003 if (rep == MachineType::Type()) { \
2004 return &cache_.kLoadTrapOnNull##Type; \
2005 }
2007#undef LOAD
2008 UNREACHABLE();
2009}
2010
2011#if V8_ENABLE_WEBASSEMBLY
2012const Operator* MachineOperatorBuilder::LoadTransform(
2014#define LOAD_TRANSFORM_KIND(TYPE, KIND) \
2015 if (kind == MemoryAccessKind::k##KIND && \
2016 transform == LoadTransformation::k##TYPE) { \
2017 return &cache_.k##KIND##LoadTransform##TYPE; \
2018 }
2019#define LOAD_TRANSFORM(TYPE) \
2020 LOAD_TRANSFORM_KIND(TYPE, Normal) \
2021 LOAD_TRANSFORM_KIND(TYPE, Unaligned) \
2022 LOAD_TRANSFORM_KIND(TYPE, ProtectedByTrapHandler)
2023
2024 LOAD_TRANSFORM_LIST(LOAD_TRANSFORM)
2025#undef LOAD_TRANSFORM
2026#undef LOAD_TRANSFORM_KIND
2027 UNREACHABLE();
2028}
2029
2030const Operator* MachineOperatorBuilder::LoadLane(MemoryAccessKind kind,
2032 uint8_t laneidx) {
2033#define LOAD_LANE_KIND(TYPE, KIND, LANEIDX) \
2034 if (kind == MemoryAccessKind::k##KIND && rep == MachineType::TYPE() && \
2035 laneidx == LANEIDX) { \
2036 return zone_->New<Operator1<LoadLaneParameters>>( \
2037 IrOpcode::kLoadLane, \
2038 MemoryAccessKind::k##KIND == MemoryAccessKind::kProtectedByTrapHandler \
2039 ? Operator::kNoDeopt | Operator::kNoThrow \
2040 : Operator::kEliminatable, \
2041 "LoadLane", 3, 1, 1, 1, 1, 0, \
2042 LoadLaneParameters{MemoryAccessKind::k##KIND, \
2043 LoadRepresentation::TYPE(), LANEIDX}); \
2044 }
2045
2046#define LOAD_LANE_T(T, LANE) \
2047 LOAD_LANE_KIND(T, Normal, LANE) \
2048 LOAD_LANE_KIND(T, Unaligned, LANE) \
2049 LOAD_LANE_KIND(T, ProtectedByTrapHandler, LANE)
2050
2051#define LOAD_LANE_INT8(LANE) LOAD_LANE_T(Int8, LANE)
2052#define LOAD_LANE_INT16(LANE) LOAD_LANE_T(Int16, LANE)
2053#define LOAD_LANE_INT32(LANE) LOAD_LANE_T(Int32, LANE)
2054#define LOAD_LANE_INT64(LANE) LOAD_LANE_T(Int64, LANE)
2055
2056 // Semicolons unnecessary, but helps formatting.
2057 SIMD_I8x16_LANES(LOAD_LANE_INT8);
2058 SIMD_I16x8_LANES(LOAD_LANE_INT16);
2059 SIMD_I32x4_LANES(LOAD_LANE_INT32);
2060 SIMD_I64x2_LANES(LOAD_LANE_INT64);
2061#undef LOAD_LANE_INT8
2062#undef LOAD_LANE_INT16
2063#undef LOAD_LANE_INT32
2064#undef LOAD_LANE_INT64
2065#undef LOAD_LANE_KIND
2066 UNREACHABLE();
2067}
2068
2069const Operator* MachineOperatorBuilder::StoreLane(MemoryAccessKind kind,
2071 uint8_t laneidx) {
2072#define STORE_LANE_KIND(REP, KIND, LANEIDX) \
2073 if (kind == MemoryAccessKind::k##KIND && \
2074 rep == MachineRepresentation::REP && laneidx == LANEIDX) { \
2075 return zone_->New<Operator1<StoreLaneParameters>>( \
2076 IrOpcode::kStoreLane, \
2077 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
2078 "StoreLane", 3, 1, 1, 0, 1, 0, \
2079 StoreLaneParameters{MemoryAccessKind::k##KIND, \
2080 MachineRepresentation::REP, LANEIDX}); \
2081 }
2082
2083#define STORE_LANE_T(T, LANE) \
2084 STORE_LANE_KIND(T, Normal, LANE) \
2085 STORE_LANE_KIND(T, Unaligned, LANE) \
2086 STORE_LANE_KIND(T, ProtectedByTrapHandler, LANE)
2087
2088#define STORE_LANE_WORD8(LANE) STORE_LANE_T(kWord8, LANE)
2089#define STORE_LANE_WORD16(LANE) STORE_LANE_T(kWord16, LANE)
2090#define STORE_LANE_WORD32(LANE) STORE_LANE_T(kWord32, LANE)
2091#define STORE_LANE_WORD64(LANE) STORE_LANE_T(kWord64, LANE)
2092
2093 // Semicolons unnecessary, but helps formatting.
2094 SIMD_I8x16_LANES(STORE_LANE_WORD8);
2095 SIMD_I16x8_LANES(STORE_LANE_WORD16);
2096 SIMD_I32x4_LANES(STORE_LANE_WORD32);
2097 SIMD_I64x2_LANES(STORE_LANE_WORD64);
2098#undef STORE_LANE_WORD8
2099#undef STORE_LANE_WORD16
2100#undef STORE_LANE_WORD32
2101#undef STORE_LANE_WORD64
2102#undef STORE_LANE_KIND
2103 UNREACHABLE();
2104}
2105#endif // V8_ENABLE_WEBASSEMBLY
2106
2107const Operator* MachineOperatorBuilder::StackSlot(int size, int alignment,
2108 bool is_tagged) {
2109 DCHECK_LE(0, size);
2110 DCHECK(alignment == 0 || alignment == 4 || alignment == 8 || alignment == 16);
2111#define CASE_CACHED_SIZE(Size, Alignment, IsTagged) \
2112 if (size == Size && alignment == Alignment && is_tagged == IsTagged) { \
2113 return &cache_.kStackSlotOfSize##Size##OfAlignment##Alignment##IsTagged; \
2114 }
2115
2117
2118#undef CASE_CACHED_SIZE
2119 return zone_->New<StackSlotOperator>(size, alignment, is_tagged);
2120}
2121
2123 int alignment) {
2124 return StackSlot(1 << ElementSizeLog2Of(rep), alignment);
2125}
2126
2129 DCHECK_NE(store_rep.representation(),
2131 switch (store_rep.representation()) {
2132#define STORE(kRep) \
2133 case MachineRepresentation::kRep: \
2134 switch (store_rep.write_barrier_kind()) { \
2135 case kNoWriteBarrier: \
2136 return &cache_.k##Store##kRep##NoWriteBarrier; \
2137 case kAssertNoWriteBarrier: \
2138 return &cache_.k##Store##kRep##AssertNoWriteBarrier; \
2139 case kMapWriteBarrier: \
2140 return &cache_.k##Store##kRep##MapWriteBarrier; \
2141 case kPointerWriteBarrier: \
2142 return &cache_.k##Store##kRep##PointerWriteBarrier; \
2143 case kIndirectPointerWriteBarrier: \
2144 UNREACHABLE(); \
2145 case kEphemeronKeyWriteBarrier: \
2146 return &cache_.k##Store##kRep##EphemeronKeyWriteBarrier; \
2147 case kFullWriteBarrier: \
2148 return &cache_.k##Store##kRep##FullWriteBarrier; \
2149 } \
2150 break;
2152#undef STORE
2158 UNREACHABLE();
2159 }
2160}
2161
2163 WriteBarrierKind write_barrier_kind) {
2164 switch (write_barrier_kind) {
2165 case kNoWriteBarrier:
2169 default:
2170 UNREACHABLE();
2171 }
2172}
2173
2174std::optional<const Operator*> MachineOperatorBuilder::TryStorePair(
2175 StoreRepresentation store_rep1, StoreRepresentation store_rep2) {
2177
2178#define STORE(kRep1, kRep2) \
2179 static_assert(ElementSizeLog2Of(MachineRepresentation::kRep1) == \
2180 ElementSizeLog2Of(MachineRepresentation::kRep2)); \
2181 if (MachineRepresentation::kRep1 == store_rep1.representation() && \
2182 MachineRepresentation::kRep2 == store_rep2.representation()) { \
2183 if (store_rep1.write_barrier_kind() != kNoWriteBarrier || \
2184 store_rep2.write_barrier_kind() != kNoWriteBarrier) { \
2185 return {}; \
2186 } \
2187 return &cache_.k##StorePair##kRep1##kRep2##NoWriteBarrier; \
2188 }
2190#undef STORE
2191 return {};
2192}
2193
2196 switch (rep) {
2197#define STORE(kRep) \
2198 case MachineRepresentation::kRep: \
2199 return &cache_.kProtectedStore##kRep;
2201#undef STORE
2207 UNREACHABLE();
2208 }
2209}
2210
2212 StoreRepresentation rep) {
2213 switch (rep.representation()) {
2214#define STORE(kRep) \
2215 case MachineRepresentation::kRep: \
2216 if (rep.write_barrier_kind() == kNoWriteBarrier) { \
2217 return &cache_.kStoreTrapOnNull##kRep##NoWriteBarrier; \
2218 } \
2219 DCHECK_EQ(kFullWriteBarrier, rep.write_barrier_kind()); \
2220 return &cache_.kStoreTrapOnNull##kRep##FullWriteBarrier;
2222#undef STORE
2228 UNREACHABLE();
2229 }
2230}
2231
2234 switch (kind) {
2236 return &cache_.kStackPointerGreaterThanJSFunctionEntry;
2238 return &cache_.kStackPointerGreaterThanCodeStubAssembler;
2240 return &cache_.kStackPointerGreaterThanWasm;
2242 UNREACHABLE();
2243 }
2244 UNREACHABLE();
2245}
2246
2250
2254
2258
2262
2266
2268 return zone_->New<CommentOperator>(msg);
2269}
2270
2272 switch (order) {
2277 default:
2278 UNREACHABLE();
2279 }
2280}
2281
2283 AtomicLoadParameters params) {
2284#define CACHED_LOAD_WITH_KIND(Type, Kind) \
2285 if (params.representation() == MachineType::Type() && \
2286 params.order() == AtomicMemoryOrder::kSeqCst && \
2287 params.kind() == MemoryAccessKind::k##Kind) { \
2288 return &cache_.kWord32SeqCstLoad##Type##Kind; \
2289 }
2290#define CACHED_LOAD(Type) \
2291 CACHED_LOAD_WITH_KIND(Type, Normal) \
2292 CACHED_LOAD_WITH_KIND(Type, ProtectedByTrapHandler)
2294#undef CACHED_LOAD_WITH_KIND
2295#undef CACHED_LOAD
2296
2297#define LOAD(Type) \
2298 if (params.representation() == MachineType::Type()) { \
2299 return zone_->New<Operator1<AtomicLoadParameters>>( \
2300 IrOpcode::kWord32AtomicLoad, Operator::kNoProperties, \
2301 "Word32AtomicLoad", 2, 1, 1, 1, 1, 0, params); \
2302 }
2305#undef LOAD
2306
2307 UNREACHABLE();
2308}
2309
2311 AtomicStoreParameters params) {
2312#define CACHED_STORE_WITH_KIND(kRep, Kind) \
2313 if (params.representation() == MachineRepresentation::kRep && \
2314 params.order() == AtomicMemoryOrder::kSeqCst && \
2315 params.kind() == MemoryAccessKind::k##Kind) { \
2316 return &cache_.kWord32SeqCstStore##kRep##Kind; \
2317 }
2318#define CACHED_STORE(kRep) \
2319 CACHED_STORE_WITH_KIND(kRep, Normal) \
2320 CACHED_STORE_WITH_KIND(kRep, ProtectedByTrapHandler)
2322#undef CACHED_STORE_WITH_KIND
2323#undef CACHED_STORE
2324
2325#define STORE(kRep) \
2326 if (params.representation() == MachineRepresentation::kRep) { \
2327 return zone_->New<Operator1<AtomicStoreParameters>>( \
2328 IrOpcode::kWord32AtomicStore, \
2329 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
2330 "Word32AtomicStore", 3, 1, 1, 0, 1, 0, params); \
2331 }
2334#undef STORE
2335 UNREACHABLE();
2336}
2337
2339 AtomicOpParameters params) {
2340#define EXCHANGE_WITH_KIND(kType, Kind) \
2341 if (params.type() == MachineType::kType() \
2342 && params.kind() == MemoryAccessKind::k##Kind) { \
2343 return &cache_.kWord32AtomicExchange##kType##Kind; \
2344 }
2345#define EXCHANGE(kType) \
2346 EXCHANGE_WITH_KIND(kType, Normal) \
2347 EXCHANGE_WITH_KIND(kType, ProtectedByTrapHandler)
2349#undef EXCHANGE_WITH_KIND
2350#undef EXCHANGE
2351 UNREACHABLE();
2352}
2353
2355 AtomicOpParameters params) {
2356#define COMPARE_EXCHANGE_WITH_KIND(kType, Kind) \
2357 if (params.type() == MachineType::kType() \
2358 && params.kind() == MemoryAccessKind::k##Kind) { \
2359 return &cache_.kWord32AtomicCompareExchange##kType##Kind; \
2360 }
2361#define COMPARE_EXCHANGE(kType) \
2362 COMPARE_EXCHANGE_WITH_KIND(kType, Normal) \
2363 COMPARE_EXCHANGE_WITH_KIND(kType, ProtectedByTrapHandler)
2365#undef COMPARE_EXCHANGE_WITH_KIND
2366#undef COMPARE_EXCHANGE
2367 UNREACHABLE();
2368}
2369
2371 AtomicOpParameters params) {
2372#define OP_WITH_KIND(kType, Kind) \
2373 if (params.type() == MachineType::kType() \
2374 && params.kind() == MemoryAccessKind::k##Kind) { \
2375 return &cache_.kWord32AtomicAdd##kType##Kind; \
2376 }
2377#define OP(kType) \
2378 OP_WITH_KIND(kType, Normal) \
2379 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2381#undef OP_WITH_KIND
2382#undef OP
2383 UNREACHABLE();
2384}
2385
2387 AtomicOpParameters params) {
2388#define OP_WITH_KIND(kType, Kind) \
2389 if (params.type() == MachineType::kType() \
2390 && params.kind() == MemoryAccessKind::k##Kind) { \
2391 return &cache_.kWord32AtomicSub##kType##Kind; \
2392 }
2393#define OP(kType) \
2394 OP_WITH_KIND(kType, Normal) \
2395 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2397#undef OP_WITH_KIND
2398#undef OP
2399 UNREACHABLE();
2400}
2401
2403 AtomicOpParameters params) {
2404#define OP_WITH_KIND(kType, Kind) \
2405 if (params.type() == MachineType::kType() \
2406 && params.kind() == MemoryAccessKind::k##Kind) { \
2407 return &cache_.kWord32AtomicAnd##kType##Kind; \
2408 }
2409#define OP(kType) \
2410 OP_WITH_KIND(kType, Normal) \
2411 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2413#undef OP_WITH_KIND
2414#undef OP
2415 UNREACHABLE();
2416}
2417
2419 AtomicOpParameters params) {
2420#define OP_WITH_KIND(kType, Kind) \
2421 if (params.type() == MachineType::kType() \
2422 && params.kind() == MemoryAccessKind::k##Kind) { \
2423 return &cache_.kWord32AtomicOr##kType##Kind; \
2424 }
2425#define OP(kType) \
2426 OP_WITH_KIND(kType, Normal) \
2427 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2429#undef OP_WITH_KIND
2430#undef OP
2431 UNREACHABLE();
2432}
2433
2435 AtomicOpParameters params) {
2436#define OP_WITH_KIND(kType, Kind) \
2437 if (params.type() == MachineType::kType() \
2438 && params.kind() == MemoryAccessKind::k##Kind) { \
2439 return &cache_.kWord32AtomicXor##kType##Kind; \
2440 }
2441#define OP(kType) \
2442 OP_WITH_KIND(kType, Normal) \
2443 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2445#undef OP_WITH_KIND
2446#undef OP
2447 UNREACHABLE();
2448}
2449
2451 AtomicLoadParameters params) {
2452#define CACHED_LOAD_WITH_KIND(Type, Kind) \
2453 if (params.representation() == MachineType::Type() && \
2454 params.order() == AtomicMemoryOrder::kSeqCst && \
2455 params.kind() == MemoryAccessKind::k##Kind) { \
2456 return &cache_.kWord64SeqCstLoad##Type##Kind; \
2457 }
2458#define CACHED_LOAD(Type) \
2459 CACHED_LOAD_WITH_KIND(Type, Normal) \
2460 CACHED_LOAD_WITH_KIND(Type, ProtectedByTrapHandler)
2462#undef CACHED_LOAD_WITH_KIND
2463#undef CACHED_LOAD
2464
2465#define LOAD(Type) \
2466 if (params.representation() == MachineType::Type()) { \
2467 return zone_->New<Operator1<AtomicLoadParameters>>( \
2468 IrOpcode::kWord64AtomicLoad, Operator::kNoProperties, \
2469 "Word64AtomicLoad", 2, 1, 1, 1, 1, 0, params); \
2470 }
2473#undef LOAD
2474
2475 UNREACHABLE();
2476}
2477
2479 AtomicStoreParameters params) {
2480#define CACHED_STORE_WITH_KIND(kRep, Kind) \
2481 if (params.representation() == MachineRepresentation::kRep && \
2482 params.order() == AtomicMemoryOrder::kSeqCst && \
2483 params.kind() == MemoryAccessKind::k##Kind) { \
2484 return &cache_.kWord64SeqCstStore##kRep##Kind; \
2485 }
2486#define CACHED_STORE(kRep) \
2487 CACHED_STORE_WITH_KIND(kRep, Normal) \
2488 CACHED_STORE_WITH_KIND(kRep, ProtectedByTrapHandler)
2490#undef CACHED_STORE_WITH_KIND
2491#undef CACHED_STORE
2492
2493#define STORE(kRep) \
2494 if (params.representation() == MachineRepresentation::kRep) { \
2495 return zone_->New<Operator1<AtomicStoreParameters>>( \
2496 IrOpcode::kWord64AtomicStore, \
2497 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
2498 "Word64AtomicStore", 3, 1, 1, 0, 1, 0, params); \
2499 }
2502#undef STORE
2503
2504 UNREACHABLE();
2505}
2506
2508 AtomicOpParameters params) {
2509#define OP_WITH_KIND(kType, Kind) \
2510 if (params.type() == MachineType::kType() \
2511 && params.kind() == MemoryAccessKind::k##Kind) { \
2512 return &cache_.kWord64AtomicAdd##kType##Kind; \
2513 }
2514#define OP(kType) \
2515 OP_WITH_KIND(kType, Normal) \
2516 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2518#undef OP_WITH_KIND
2519#undef OP
2520 UNREACHABLE();
2521}
2522
2524 AtomicOpParameters params) {
2525#define OP_WITH_KIND(kType, Kind) \
2526 if (params.type() == MachineType::kType() \
2527 && params.kind() == MemoryAccessKind::k##Kind) { \
2528 return &cache_.kWord64AtomicSub##kType##Kind; \
2529 }
2530#define OP(kType) \
2531 OP_WITH_KIND(kType, Normal) \
2532 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2534#undef OP_WITH_KIND
2535#undef OP
2536 UNREACHABLE();
2537}
2538
2540 AtomicOpParameters params) {
2541#define OP_WITH_KIND(kType, Kind) \
2542 if (params.type() == MachineType::kType() \
2543 && params.kind() == MemoryAccessKind::k##Kind) { \
2544 return &cache_.kWord64AtomicAnd##kType##Kind; \
2545 }
2546#define OP(kType) \
2547 OP_WITH_KIND(kType, Normal) \
2548 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2550#undef OP_WITH_KIND
2551#undef OP
2552 UNREACHABLE();
2553}
2554
2556 AtomicOpParameters params) {
2557#define OP_WITH_KIND(kType, Kind) \
2558 if (params.type() == MachineType::kType() \
2559 && params.kind() == MemoryAccessKind::k##Kind) { \
2560 return &cache_.kWord64AtomicOr##kType##Kind; \
2561 }
2562#define OP(kType) \
2563 OP_WITH_KIND(kType, Normal) \
2564 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2566#undef OP_WITH_KIND
2567#undef OP
2568 UNREACHABLE();
2569}
2570
2572 AtomicOpParameters params) {
2573#define OP_WITH_KIND(kType, Kind) \
2574 if (params.type() == MachineType::kType() \
2575 && params.kind() == MemoryAccessKind::k##Kind) { \
2576 return &cache_.kWord64AtomicXor##kType##Kind; \
2577 }
2578#define OP(kType) \
2579 OP_WITH_KIND(kType, Normal) \
2580 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2582#undef OP_WITH_KIND
2583#undef OP
2584 UNREACHABLE();
2585}
2586
2588 AtomicOpParameters params) {
2589#define OP_WITH_KIND(kType, Kind) \
2590 if (params.type() == MachineType::kType() \
2591 && params.kind() == MemoryAccessKind::k##Kind) { \
2592 return &cache_.kWord64AtomicExchange##kType##Kind; \
2593 }
2594#define OP(kType) \
2595 OP_WITH_KIND(kType, Normal) \
2596 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2598#undef OP_WITH_KIND
2599#undef OP
2600 UNREACHABLE();
2601}
2602
2604 AtomicOpParameters params) {
2605#define OP_WITH_KIND(kType, Kind) \
2606 if (params.type() == MachineType::kType() \
2607 && params.kind() == MemoryAccessKind::k##Kind) { \
2608 return &cache_.kWord64AtomicCompareExchange##kType##Kind; \
2609 }
2610#define OP(kType) \
2611 OP_WITH_KIND(kType, Normal) \
2612 OP_WITH_KIND(kType, ProtectedByTrapHandler)
2614#undef OP_WITH_KIND
2615#undef OP
2616 UNREACHABLE();
2617}
2618
2620 AtomicMemoryOrder order) {
2621 if (order == AtomicMemoryOrder::kSeqCst) {
2623 }
2625 IrOpcode::kWord32AtomicPairLoad, Operator::kNoDeopt | Operator::kNoThrow,
2626 "Word32AtomicPairLoad", 2, 1, 1, 2, 1, 0, order);
2627}
2628
2630 AtomicMemoryOrder order) {
2631 if (order == AtomicMemoryOrder::kSeqCst) {
2633 }
2635 IrOpcode::kWord32AtomicPairStore, Operator::kNoDeopt | Operator::kNoThrow,
2636 "Word32AtomicPairStore", 4, 1, 1, 0, 1, 0, order);
2637}
2638
2640 return &cache_.kWord32AtomicPairAdd;
2641}
2642
2644 return &cache_.kWord32AtomicPairSub;
2645}
2646
2648 return &cache_.kWord32AtomicPairAnd;
2649}
2650
2652 return &cache_.kWord32AtomicPairOr;
2653}
2654
2656 return &cache_.kWord32AtomicPairXor;
2657}
2658
2660 return &cache_.kWord32AtomicPairExchange;
2661}
2662
2666
2668 DCHECK_EQ(IrOpcode::kStackPointerGreaterThan, op->opcode());
2669 return OpParameter<StackCheckKind>(op);
2670}
2671
2672#if V8_ENABLE_WEBASSEMBLY
2673#define EXTRACT_LANE_OP(Type, Sign, lane_count) \
2674 const Operator* MachineOperatorBuilder::Type##ExtractLane##Sign( \
2675 int32_t lane_index) { \
2676 DCHECK(0 <= lane_index && lane_index < lane_count); \
2677 return zone_->New<Operator1<int32_t>>( \
2678 IrOpcode::k##Type##ExtractLane##Sign, Operator::kPure, \
2679 "" #Type "ExtractLane" #Sign, 1, 0, 0, 1, 0, 0, lane_index); \
2680 }
2681EXTRACT_LANE_OP(F64x2, , 2)
2682EXTRACT_LANE_OP(F32x4, , 4)
2683EXTRACT_LANE_OP(I64x2, , 2)
2684EXTRACT_LANE_OP(I32x4, , 4)
2685EXTRACT_LANE_OP(F16x8, , 8)
2686EXTRACT_LANE_OP(I16x8, U, 8)
2687EXTRACT_LANE_OP(I16x8, S, 8)
2688EXTRACT_LANE_OP(I8x16, U, 16)
2689EXTRACT_LANE_OP(I8x16, S, 16)
2690#undef EXTRACT_LANE_OP
2691
2692#define REPLACE_LANE_OP(Type, lane_count) \
2693 const Operator* MachineOperatorBuilder::Type##ReplaceLane( \
2694 int32_t lane_index) { \
2695 DCHECK(0 <= lane_index && lane_index < lane_count); \
2696 return zone_->New<Operator1<int32_t>>(IrOpcode::k##Type##ReplaceLane, \
2697 Operator::kPure, "Replace lane", 2, \
2698 0, 0, 1, 0, 0, lane_index); \
2699 }
2700SIMD_LANE_OP_LIST(REPLACE_LANE_OP)
2701#undef REPLACE_LANE_OP
2702
2703const Operator* MachineOperatorBuilder::I64x2ReplaceLaneI32Pair(
2704 int32_t lane_index) {
2705 DCHECK(0 <= lane_index && lane_index < 2);
2706 return zone_->New<Operator1<int32_t>>(IrOpcode::kI64x2ReplaceLaneI32Pair,
2707 Operator::kPure, "Replace lane", 3, 0,
2708 0, 1, 0, 0, lane_index);
2709}
2710
2711S128ImmediateParameter const& S128ImmediateParameterOf(Operator const* op) {
2712 DCHECK(IrOpcode::kI8x16Shuffle == op->opcode() ||
2713 IrOpcode::kS128Const == op->opcode());
2715}
2716
2717S256ImmediateParameter const& S256ImmediateParameterOf(Operator const* op) {
2718 DCHECK(IrOpcode::kI8x32Shuffle == op->opcode() ||
2719 IrOpcode::kS256Const == op->opcode());
2721}
2722
2723const Operator* MachineOperatorBuilder::S128Const(const uint8_t value[16]) {
2724 return zone_->New<Operator1<S128ImmediateParameter>>(
2725 IrOpcode::kS128Const, Operator::kPure, "Immediate", 0, 0, 0, 1, 0, 0,
2726 S128ImmediateParameter(value));
2727}
2728
2729const Operator* MachineOperatorBuilder::S256Const(const uint8_t value[32]) {
2730 return zone_->New<Operator1<S256ImmediateParameter>>(
2731 IrOpcode::kS256Const, Operator::kPure, "Immediate256", 0, 0, 0, 1, 0, 0,
2732 S256ImmediateParameter(value));
2733}
2734
2735const Operator* MachineOperatorBuilder::I8x16Shuffle(
2736 const uint8_t shuffle[16]) {
2737 return zone_->New<Operator1<S128ImmediateParameter>>(
2738 IrOpcode::kI8x16Shuffle, Operator::kPure, "I8x16Shuffle", 2, 0, 0, 1, 0,
2739 0, S128ImmediateParameter(shuffle));
2740}
2741
2742const Operator* MachineOperatorBuilder::I8x16Swizzle(bool relaxed) {
2743 if (relaxed) {
2744 return &cache_.kI8x16RelaxedSwizzle;
2745 } else {
2746 return &cache_.kI8x16Swizzle;
2747 }
2748}
2749
2750const Operator* MachineOperatorBuilder::I8x32Shuffle(
2751 const uint8_t shuffle[32]) {
2752 return zone_->New<Operator1<S256ImmediateParameter>>(
2753 IrOpcode::kI8x32Shuffle, Operator::kPure, "I8x32Shuffle", 2, 0, 0, 1, 0,
2754 0, S256ImmediateParameter(shuffle));
2755}
2756
2757const Operator* MachineOperatorBuilder::ExtractF128(int32_t lane_index) {
2758 DCHECK(0 <= lane_index && lane_index < 2);
2759 class ExtractF128Operator final : public Operator1<int32_t> {
2760 public:
2761 explicit ExtractF128Operator(int32_t lane_index)
2762 : Operator1<int32_t>(IrOpcode::kExtractF128, Operator::kPure,
2763 "ExtractF128", 1, 0, 0, 1, 0, 0, lane_index) {
2764 lane_index_ = lane_index;
2765 }
2766
2767 int32_t lane_index_;
2768 };
2769 return zone_->New<ExtractF128Operator>(lane_index);
2770}
2771
2772const Operator* MachineOperatorBuilder::LoadStackPointer() {
2773 class LoadStackPointerOperator final : public Operator {
2774 public:
2775 LoadStackPointerOperator()
2776 : Operator(IrOpcode::kLoadStackPointer, kNoProperties,
2777 "LoadStackPointer", 0, 1, 0, 1, 1, 0) {}
2778 };
2779 return zone_->New<LoadStackPointerOperator>();
2780}
2781
2782const Operator* MachineOperatorBuilder::SetStackPointer() {
2783 class SetStackPointerOperator final : public Operator {
2784 public:
2785 SetStackPointerOperator()
2786 : Operator(IrOpcode::kSetStackPointer, kNoProperties, "SetStackPointer",
2787 1, 1, 0, 0, 1, 0) {}
2788 };
2789 return zone_->New<SetStackPointerOperator>();
2790}
2791#endif
2792
2793#undef PURE_BINARY_OP_LIST_32
2794#undef PURE_BINARY_OP_LIST_64
2795#undef MACHINE_PURE_OP_LIST
2796#undef PURE_OPTIONAL_OP_LIST
2797#undef OVERFLOW_OP_LIST
2798#undef MACHINE_TYPE_LIST
2799#undef MACHINE_REPRESENTATION_LIST
2800#undef ATOMIC_TYPE_LIST
2801#undef ATOMIC_U64_TYPE_LIST
2802#undef ATOMIC_U32_TYPE_LIST
2803#undef ATOMIC_TAGGED_TYPE_LIST
2804#undef ATOMIC64_TAGGED_TYPE_LIST
2805#undef ATOMIC_REPRESENTATION_LIST
2806#undef ATOMIC_TAGGED_REPRESENTATION_LIST
2807#undef ATOMIC64_REPRESENTATION_LIST
2808#undef ATOMIC64_TAGGED_REPRESENTATION_LIST
2809#undef SIMD_LANE_OP_LIST
2810#undef STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST
2811#undef LOAD_TRANSFORM_LIST
2812
2813} // namespace compiler
2814} // namespace internal
2815} // namespace v8
Builtins::Kind kind
Definition builtins.cc:40
constexpr bool IsMapWord() const
T * New(Args &&... args)
Definition zone.h:114
static bool isAtomicOpOpcode(Value value)
Definition opcodes.h:1498
const Operator * Word64AtomicStore(AtomicStoreParameters params)
const Operator * ProtectedLoad(LoadRepresentation rep)
const Operator * MemoryBarrier(AtomicMemoryOrder order)
const Operator * LoadImmutable(LoadRepresentation rep)
const Operator * Word32AtomicCompareExchange(AtomicOpParameters params)
const Operator * Load(LoadRepresentation rep)
const Operator * TruncateFloat32ToUint32(TruncateKind kind)
const Operator * LoadTrapOnNull(LoadRepresentation rep)
const Operator * Word64AtomicExchange(AtomicOpParameters params)
const Operator * Word64AtomicAdd(AtomicOpParameters params)
const Operator * Word32AtomicPairLoad(AtomicMemoryOrder order)
const Operator * StackPointerGreaterThan(StackCheckKind kind)
const Operator * Word32AtomicAnd(AtomicOpParameters params)
const Operator * Word32AtomicPairStore(AtomicMemoryOrder order)
const Operator * Word64AtomicOr(AtomicOpParameters params)
std::optional< const Operator * > TryStorePair(StoreRepresentation rep1, StoreRepresentation rep2)
const Operator * TruncateFloat64ToInt64(TruncateKind kind)
const Operator * UnalignedLoad(LoadRepresentation rep)
const Operator * ProtectedStore(MachineRepresentation rep)
const Operator * Word64AtomicLoad(AtomicLoadParameters params)
const Operator * StoreTrapOnNull(StoreRepresentation rep)
const Operator * Word32AtomicOr(AtomicOpParameters params)
const Operator * UnalignedStore(UnalignedStoreRepresentation rep)
const Operator * Word64AtomicAnd(AtomicOpParameters params)
const Operator * Word32AtomicXor(AtomicOpParameters params)
const Operator * Word32AtomicAdd(AtomicOpParameters params)
MachineOperatorBuilder(Zone *zone, MachineRepresentation word=MachineType::PointerRepresentation(), Flags supportedOperators=kNoFlags, AlignmentRequirements alignmentRequirements=AlignmentRequirements::FullUnalignedAccessSupport())
const Operator * Word32AtomicSub(AtomicOpParameters params)
MachineOperatorGlobalCache const & cache_
const Operator * Word32AtomicLoad(AtomicLoadParameters params)
const Operator * Word32AtomicStore(AtomicStoreParameters params)
const Operator * StackSlot(int size, int alignment=0, bool is_tagged=false)
const Operator * Word64AtomicSub(AtomicOpParameters params)
const Operator * Store(StoreRepresentation rep)
const Operator * Word32AtomicExchange(AtomicOpParameters params)
const Operator * TruncateFloat32ToInt32(TruncateKind kind)
const Operator * Word64AtomicCompareExchange(AtomicOpParameters params)
const Operator * TraceInstruction(uint32_t markid)
const Operator * StoreIndirectPointer(WriteBarrierKind write_barrier_kind)
const Operator * Word64AtomicXor(AtomicOpParameters params)
constexpr Opcode opcode() const
Definition operator.h:75
MachineRepresentation representation() const
Zone * zone_
JSRegExp::Flags flags_
#define DEFINE_LAZY_LEAKY_OBJECT_GETTER(T, FunctionName,...)
#define SIMD_I8x16_LANES(V)
#define ATOMIC_TAGGED_REPRESENTATION_LIST(V)
#define ATOMIC_OP_LIST(type)
#define STACKSLOT(Size, Alignment, IsTagged)
#define MACHINE_PURE_OP_LIST(V)
#define ATOMIC_TYPE_LIST(V)
#define CACHED_STORE(kRep)
#define ATOMIC_COMPARE_EXCHANGE(Type)
#define STORE_PAIR(Type1, Type2)
#define ATOMIC_PAIR_BINOP_LIST(V)
#define SIMD_I16x8_LANES(V)
#define ATOMIC64_TAGGED_TYPE_LIST(V)
#define CACHED_LOAD(Type)
#define CASE_CACHED_SIZE(Size, Alignment, IsTagged)
#define SIMD_LANE_OP_LIST(V)
#define ATOMIC_PAIR_OP(op)
#define PURE_OPTIONAL_OP_LIST(V)
#define ATOMIC64_TAGGED_REPRESENTATION_LIST(V)
#define ATOMIC_REPRESENTATION_LIST(V)
#define ATOMIC64_OP_LIST(type)
#define STORE_PAIR_MACHINE_REPRESENTATION_LIST(V)
#define PURE(Name, properties, value_input_count, control_input_count, output_count)
#define STACK_SLOT_CACHED_SIZES_ALIGNMENTS_LIST(V)
#define SIMD_I64x2_LANES(V)
#define ATOMIC64_REPRESENTATION_LIST(V)
#define LOAD_TRANSFORM_LIST(V)
#define ATOMIC_LOAD(Type)
#define COMPARE_EXCHANGE(kType)
#define ATOMIC_TAGGED_TYPE_LIST(V)
#define ATOMIC_STORE(Type)
#define SIMD_I32x4_LANES(V)
#define OVERFLOW_OP_LIST(V)
#define STACK_POINTER_GREATER_THAN(Kind)
#define MACHINE_REPRESENTATION_LIST(V)
#define MACHINE_TYPE_LIST(V)
#define EXCHANGE(kType)
#define ATOMIC_U64_TYPE_LIST(V)
#define OVERFLOW_OP(Name, properties)
int int32_t
Definition unicode.cc:40
V8_INLINE size_t hash_combine(size_t seed, size_t hash)
Definition hashing.h:77
AtomicOpParameters AtomicOpParametersOf(Operator const *op)
V8_EXPORT_PRIVATE StoreLaneParameters const & StoreLaneParametersOf(Operator const *) V8_WARN_UNUSED_RESULT
StackCheckKind StackCheckKindOf(Operator const *op)
V8_EXPORT_PRIVATE LoadTransformParameters const & LoadTransformParametersOf(Operator const *) V8_WARN_UNUSED_RESULT
template const Signature< wasm::ValueType > bool
AtomicStoreParameters const & AtomicStoreParametersOf(Operator const *op)
V8_EXPORT_PRIVATE S128ImmediateParameter const & S128ImmediateParameterOf(Operator const *op) V8_WARN_UNUSED_RESULT
StoreRepresentation const & StoreRepresentationOf(Operator const *op)
V8_EXPORT_PRIVATE S256ImmediateParameter const & S256ImmediateParameterOf(Operator const *op) V8_WARN_UNUSED_RESULT
AtomicLoadParameters AtomicLoadParametersOf(Operator const *op)
StackSlotRepresentation const & StackSlotRepresentationOf(Operator const *op)
MachineType AtomicOpType(InstructionSelectorT *selector, OpIndex node)
StorePairRepresentation const & StorePairRepresentationOf(Operator const *op)
size_t hash_value(const BranchParameters &p)
LoadRepresentation LoadRepresentationOf(Operator const *op)
SimdImmediateParameter< kSimd256Size > S256ImmediateParameter
T const & OpParameter(const Operator *op)
Definition operator.h:214
bool operator!=(DeoptimizeParameters lhs, DeoptimizeParameters rhs)
bool operator==(const BranchParameters &lhs, const BranchParameters &rhs)
V8_EXPORT_PRIVATE LoadLaneParameters const & LoadLaneParametersOf(Operator const *) V8_WARN_UNUSED_RESULT
UnalignedStoreRepresentation const & UnalignedStoreRepresentationOf(Operator const *op)
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
ShiftKind ShiftKindOf(Operator const *op)
SimdImmediateParameter< kSimd128Size > S128ImmediateParameter
constexpr int U
constexpr int S
V8_EXPORT_PRIVATE constexpr int ElementSizeLog2Of(MachineRepresentation)
#define DCHECK_LE(v1, v2)
Definition logging.h:490
#define DCHECK_NE(v1, v2)
Definition logging.h:486
#define DCHECK(condition)
Definition logging.h:482
#define DCHECK_EQ(v1, v2)
Definition logging.h:485
#define V8_EXPORT_PRIVATE
Definition macros.h:460
friend std::ostream & operator<<(std::ostream &out, const StorePairRepresentation rep)
SetOverflowToMinTruncateFloat64ToInt64Operator kSetOverflowToMinTruncateFloat64ToInt64
Word32AtomicPairCompareExchangeOperator kWord32AtomicPairCompareExchange
SetOverflowToMinTruncateFloat32ToUint32Operator kSetOverflowToMinTruncateFloat32ToUint32
ArchitectureDefaultTruncateFloat32ToUint32Operator kArchitectureDefaultTruncateFloat32ToUint32
MemoryBarrierOperator< AtomicMemoryOrder::kSeqCst > kSeqCstMemoryBarrier
SetOverflowToMinTruncateFloat32ToInt32Operator kSetOverflowToMinTruncateFloat32ToInt32
BitcastMaybeObjectToWordOperator kBitcastMaybeObjectToWord
TruncateFloat64ToFloat16RawBitsOperator kTruncateFloat64ToFloat16RawBits
MemoryBarrierOperator< AtomicMemoryOrder::kAcqRel > kAcqRelMemoryBarrier
ArchitectureDefaultTruncateFloat32ToInt32Operator kArchitectureDefaultTruncateFloat32ToInt32
StoreIndirectPointerNoWriteBarrierOperator kStoreIndirectPointerNoWriteBarrier
StoreIndirectPointerWithIndirectPointerWriteBarrierOperator kStoreIndirectPointerIndirectPointerWriteBarrier
ChangeFloat16RawBitsToFloat64 kChangeFloat16RawBitsToFloat64
ArchitectureDefaultTruncateFloat64ToInt64Operator kArchitectureDefaultTruncateFloat64ToInt64
StackSlotOperator(int size, int alignment, bool is_tagged)