5#ifndef V8_COMPILER_OPCODES_H_
6#define V8_COMPILER_OPCODES_H_
13#define CONTROL_OP_LIST(V) \
37#define MACHINE_LEVEL_CONSTANT_OP_LIST(V) \
40 V(TaggedIndexConstant) \
43 V(CompressedHeapConstant) \
44 V(RelocatableInt32Constant) \
45 V(RelocatableInt64Constant)
47#define JS_LEVEL_CONSTANT_OP_LIST(V) \
52 V(TrustedHeapConstant)
55#define CONSTANT_OP_LIST(V) \
56 JS_LEVEL_CONSTANT_OP_LIST(V) \
57 MACHINE_LEVEL_CONSTANT_OP_LIST(V)
59#define INNER_OP_LIST(V) \
63 V(InductionVariablePhi) \
70 V(ArgumentsElementsState) \
71 V(ArgumentsLengthState) \
85 V(EnterMachineGraph) \
88#define COMMON_OP_LIST(V) \
100#define JS_COMPARE_BINOP_LIST(V) \
102 V(JSStrictEqual, StrictEqual) \
103 V(JSLessThan, LessThan) \
104 V(JSGreaterThan, GreaterThan) \
105 V(JSLessThanOrEqual, LessThanOrEqual) \
106 V(JSGreaterThanOrEqual, GreaterThanOrEqual)
108#define JS_BITWISE_BINOP_LIST(V) \
109 V(JSBitwiseOr, BitwiseOr) \
110 V(JSBitwiseXor, BitwiseXor) \
111 V(JSBitwiseAnd, BitwiseAnd) \
112 V(JSShiftLeft, ShiftLeft) \
113 V(JSShiftRight, ShiftRight) \
114 V(JSShiftRightLogical, ShiftRightLogical)
116#define JS_ARITH_BINOP_LIST(V) \
118 V(JSSubtract, Subtract) \
119 V(JSMultiply, Multiply) \
120 V(JSDivide, Divide) \
121 V(JSModulus, Modulus) \
122 V(JSExponentiate, Exponentiate)
124#define JS_SIMPLE_BINOP_LIST(V) \
125 JS_COMPARE_BINOP_LIST(V) \
126 JS_BITWISE_BINOP_LIST(V) \
127 JS_ARITH_BINOP_LIST(V) \
128 V(JSHasInPrototypeChain) \
130 V(JSOrdinaryHasInstance)
132#define JS_CONVERSION_UNOP_LIST(V) \
136 V(JSToNumberConvertBigInt) \
138 V(JSToBigIntConvertNumber) \
144#define JS_BITWISE_UNOP_LIST(V) \
145 V(JSBitwiseNot, BitwiseNot) \
148#define JS_ARITH_UNOP_LIST(V) \
149 V(JSDecrement, Decrement) \
150 V(JSIncrement, Increment)
152#define JS_SIMPLE_UNOP_LIST(V) \
153 JS_ARITH_UNOP_LIST(V) \
154 JS_BITWISE_UNOP_LIST(V) \
155 JS_CONVERSION_UNOP_LIST(V)
157#define JS_CREATE_OP_LIST(V) \
160 V(JSCreateArguments) \
162 V(JSCreateArrayFromIterable) \
163 V(JSCreateArrayIterator) \
164 V(JSCreateAsyncFunctionObject) \
165 V(JSCreateBoundFunction) \
167 V(JSCreateCollectionIterator) \
168 V(JSCreateEmptyLiteralArray) \
169 V(JSCreateEmptyLiteralObject) \
170 V(JSCreateGeneratorObject) \
171 V(JSCreateIterResultObject) \
172 V(JSCreateKeyValueArray) \
173 V(JSCreateLiteralArray) \
174 V(JSCreateLiteralObject) \
175 V(JSCreateLiteralRegExp) \
177 V(JSCreateStringWrapper) \
179 V(JSCreateStringIterator) \
180 V(JSCreateTypedArray) \
181 V(JSGetTemplateObject)
183#define JS_OBJECT_OP_LIST(V) \
184 JS_CREATE_OP_LIST(V) \
187 V(JSLoadNamedFromSuper) \
189 V(JSSetKeyedProperty) \
190 V(JSDefineKeyedOwnProperty) \
191 V(JSSetNamedProperty) \
192 V(JSDefineNamedOwnProperty) \
194 V(JSDefineKeyedOwnPropertyInLiteral) \
195 V(JSStoreInArrayLiteral) \
196 V(JSDeleteProperty) \
198 V(JSGetSuperConstructor) \
199 V(JSFindNonDefaultConstructorOrConstruct)
201#define JS_CONTEXT_OP_LIST(V) \
202 V(JSHasContextExtension) \
204 V(JSLoadScriptContext) \
206 V(JSStoreScriptContext) \
207 V(JSCreateFunctionContext) \
208 V(JSCreateCatchContext) \
209 V(JSCreateWithContext) \
210 V(JSCreateBlockContext)
212#define JS_CALL_OP_LIST(V) \
214 V(JSCallForwardVarargs) \
215 V(JSCallWithArrayLike) \
216 V(JSCallWithSpread) \
217 IF_WASM(V, JSWasmCall)
219#define JS_CONSTRUCT_OP_LIST(V) \
220 V(JSConstructForwardVarargs) \
221 V(JSConstructForwardAllArgs) \
223 V(JSConstructWithArrayLike) \
224 V(JSConstructWithSpread)
226#define JS_OTHER_OP_LIST(V) \
228 JS_CONSTRUCT_OP_LIST(V) \
229 V(JSAsyncFunctionEnter) \
230 V(JSAsyncFunctionReject) \
231 V(JSAsyncFunctionResolve) \
233 V(JSForInEnumerate) \
242 V(JSGeneratorStore) \
243 V(JSGeneratorRestoreContinuation) \
244 V(JSGeneratorRestoreContext) \
245 V(JSGeneratorRestoreRegister) \
246 V(JSGeneratorRestoreInputOrDebugPos) \
247 V(JSFulfillPromise) \
248 V(JSPerformPromiseThen) \
249 V(JSPromiseResolve) \
251 V(JSResolvePromise) \
257#define JS_OP_LIST(V) \
258 JS_SIMPLE_BINOP_LIST(V) \
259 JS_SIMPLE_UNOP_LIST(V) \
260 JS_OBJECT_OP_LIST(V) \
261 JS_CONTEXT_OP_LIST(V) \
265#define SIMPLIFIED_CHANGE_OP_LIST(V) \
266 V(ChangeTaggedSignedToInt32) \
267 V(ChangeTaggedSignedToInt64) \
268 V(ChangeTaggedToInt32) \
269 V(ChangeTaggedToInt64) \
270 V(ChangeTaggedToUint32) \
271 V(ChangeTaggedToFloat64) \
272 V(ChangeTaggedToTaggedSigned) \
273 V(ChangeInt31ToTaggedSigned) \
274 V(ChangeInt32ToTagged) \
275 V(ChangeInt64ToTagged) \
276 V(ChangeUint32ToTagged) \
277 V(ChangeUint64ToTagged) \
278 V(ChangeFloat64ToTagged) \
279 V(ChangeFloat64ToTaggedPointer) \
280 V(ChangeTaggedToBit) \
281 V(ChangeBitToTagged) \
282 V(ChangeInt64ToBigInt) \
283 V(ChangeUint64ToBigInt) \
284 V(TruncateBigIntToWord64) \
285 V(TruncateTaggedToWord32) \
286 V(TruncateTaggedToFloat64) \
287 V(TruncateTaggedToBit) \
288 V(TruncateTaggedPointerToBit)
290#define SIMPLIFIED_CHECKED_OP_LIST(V) \
295 V(CheckedUint32Div) \
296 V(CheckedUint32Mod) \
299 V(CheckedAdditiveSafeIntegerAdd) \
300 V(CheckedAdditiveSafeIntegerSub) \
305 V(CheckedInt32ToTaggedSigned) \
306 V(CheckedInt64ToInt32) \
307 V(CheckedInt64ToTaggedSigned) \
308 V(CheckedUint32Bounds) \
309 V(CheckedUint32ToInt32) \
310 V(CheckedUint32ToTaggedSigned) \
311 V(CheckedUint64Bounds) \
312 V(CheckedUint64ToInt32) \
313 V(CheckedUint64ToInt64) \
314 V(CheckedUint64ToTaggedSigned) \
315 V(CheckedFloat64ToInt32) \
316 V(CheckedFloat64ToInt64) \
317 V(CheckedFloat64ToAdditiveSafeInteger) \
318 V(CheckedTaggedSignedToInt32) \
319 V(CheckedTaggedToInt32) \
320 V(CheckedTaggedToArrayIndex) \
321 V(CheckedTruncateTaggedToWord32) \
322 V(CheckedTaggedToFloat64) \
323 V(CheckedTaggedToAdditiveSafeInteger) \
324 V(CheckedTaggedToInt64) \
325 V(CheckedTaggedToTaggedSigned) \
326 V(CheckedTaggedToTaggedPointer)
328#define SIMPLIFIED_COMPARE_BINOP_LIST(V) \
331 V(NumberLessThanOrEqual) \
332 V(SpeculativeNumberEqual) \
333 V(SpeculativeNumberLessThan) \
334 V(SpeculativeNumberLessThanOrEqual) \
337 V(SameValueNumbersOnly) \
341 V(StringLessThanOrEqual) \
344 V(BigIntLessThanOrEqual) \
345 V(SpeculativeBigIntEqual) \
346 V(SpeculativeBigIntLessThan) \
347 V(SpeculativeBigIntLessThanOrEqual)
349#define SIMPLIFIED_NUMBER_BINOP_LIST(V) \
356 V(NumberBitwiseXor) \
357 V(NumberBitwiseAnd) \
359 V(NumberShiftRight) \
360 V(NumberShiftRightLogical) \
367#define SIMPLIFIED_BIGINT_BINOP_LIST(V) \
373 V(BigIntBitwiseAnd) \
375 V(BigIntBitwiseXor) \
379#define SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \
380 V(SpeculativeNumberAdd) \
381 V(SpeculativeNumberSubtract) \
382 V(SpeculativeNumberMultiply) \
383 V(SpeculativeNumberPow) \
384 V(SpeculativeNumberDivide) \
385 V(SpeculativeNumberModulus) \
386 V(SpeculativeNumberBitwiseAnd) \
387 V(SpeculativeNumberBitwiseOr) \
388 V(SpeculativeNumberBitwiseXor) \
389 V(SpeculativeNumberShiftLeft) \
390 V(SpeculativeNumberShiftRight) \
391 V(SpeculativeNumberShiftRightLogical) \
392 V(SpeculativeAdditiveSafeIntegerAdd) \
393 V(SpeculativeAdditiveSafeIntegerSubtract) \
394 V(SpeculativeSmallIntegerAdd) \
395 V(SpeculativeSmallIntegerSubtract)
397#define SIMPLIFIED_NUMBER_UNOP_LIST(V) \
430 V(NumberToUint8Clamped) \
431 V(Integral32OrMinusZeroToBigInt) \
434#define SIMPLIFIED_BIGINT_UNOP_LIST(V) \
437 V(CheckedBigIntToBigInt64)
439#define SIMPLIFIED_SPECULATIVE_NUMBER_UNOP_LIST(V) V(SpeculativeToNumber)
441#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
442#define SIMPLIFIED_CPED_OP_LIST(V) \
443 V(GetContinuationPreservedEmbedderData) \
444 V(SetContinuationPreservedEmbedderData)
446#define SIMPLIFIED_CPED_OP_LIST(V)
449#define SIMPLIFIED_OTHER_OP_LIST(V) \
455 V(ChangeFloat64HoleToTagged) \
458 V(CheckEqualsInternalizedString) \
459 V(CheckEqualsSymbol) \
460 V(CheckFloat64Hole) \
463 V(CheckInternalizedString) \
465 V(CheckNotTaggedHole) \
467 V(CheckNumberFitsInt32) \
469 V(CheckReceiverOrNullOrUndefined) \
472 V(CheckStringOrStringWrapper) \
474 V(CheckTurboshaftTypeOf) \
477 V(ConvertTaggedHoleToUndefined) \
481 V(EnsureWritableFastElements) \
483 V(FindOrderedHashMapEntry) \
484 V(FindOrderedHashMapEntryForInt32Key) \
485 V(FindOrderedHashSetEntry) \
486 V(InitializeImmutableInObject) \
487 V(LoadDataViewElement) \
490 V(LoadFieldByIndex) \
492 V(LoadImmutableFromObject) \
494 V(LoadStackArgument) \
495 V(LoadTypedElement) \
496 V(MaybeGrowFastElements) \
497 V(NewArgumentsElements) \
499 V(NewDoubleElements) \
500 V(NewSmiOrObjectElements) \
502 V(NumberIsFloat64Hole) \
504 V(NumberIsMinusZero) \
506 V(NumberIsSafeInteger) \
507 V(ObjectIsArrayBufferView) \
509 V(ObjectIsCallable) \
510 V(ObjectIsConstructor) \
511 V(ObjectIsDetectableCallable) \
512 V(ObjectIsFiniteNumber) \
514 V(ObjectIsMinusZero) \
516 V(ObjectIsNonCallable) \
518 V(ObjectIsReceiver) \
519 V(ObjectIsSafeInteger) \
523 V(ObjectIsUndetectable) \
524 V(PlainPrimitiveToFloat64) \
525 V(PlainPrimitiveToNumber) \
526 V(PlainPrimitiveToWord32) \
529 V(StoreDataViewElement) \
533 V(StoreSignedSmallElement) \
535 V(StoreTypedElement) \
536 V(StringCharCodeAt) \
537 V(StringCodePointAt) \
539 V(StringFromCodePointAt) \
540 V(StringFromSingleCharCode) \
541 V(StringFromSingleCodePoint) \
544 V(StringWrapperLength) \
546 V(StringToLowerCaseIntl) \
548 V(StringToUpperCaseIntl) \
550 V(TransitionAndStoreElement) \
551 V(TransitionAndStoreNonNumberElement) \
552 V(TransitionAndStoreNumberElement) \
553 V(TransitionElementsKind) \
554 V(TransitionElementsKindOrCheckMap) \
555 V(TypedArrayLength) \
557 V(Unsigned32Divide) \
559 SIMPLIFIED_CPED_OP_LIST(V)
561#define SIMPLIFIED_SPECULATIVE_BIGINT_BINOP_LIST(V) \
562 V(SpeculativeBigIntAdd) \
563 V(SpeculativeBigIntSubtract) \
564 V(SpeculativeBigIntMultiply) \
565 V(SpeculativeBigIntDivide) \
566 V(SpeculativeBigIntModulus) \
567 V(SpeculativeBigIntBitwiseAnd) \
568 V(SpeculativeBigIntBitwiseOr) \
569 V(SpeculativeBigIntBitwiseXor) \
570 V(SpeculativeBigIntShiftLeft) \
571 V(SpeculativeBigIntShiftRight)
573#define SIMPLIFIED_SPECULATIVE_BIGINT_UNOP_LIST(V) \
574 V(SpeculativeBigIntAsIntN) \
575 V(SpeculativeBigIntAsUintN) \
576 V(SpeculativeBigIntNegate) \
577 V(SpeculativeToBigInt)
579#define SIMPLIFIED_WASM_OP_LIST(V) \
586 V(WasmTypeCastAbstract) \
588 V(WasmTypeCheckAbstract) \
589 V(WasmAnyConvertExtern) \
590 V(WasmExternConvertAny) \
596 V(WasmArrayInitializeLength) \
598 V(StringPrepareForGetCodeunit)
600#define SIMPLIFIED_OP_LIST(V) \
601 SIMPLIFIED_CHANGE_OP_LIST(V) \
602 SIMPLIFIED_CHECKED_OP_LIST(V) \
603 SIMPLIFIED_COMPARE_BINOP_LIST(V) \
604 SIMPLIFIED_NUMBER_BINOP_LIST(V) \
605 SIMPLIFIED_BIGINT_BINOP_LIST(V) \
606 SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \
607 SIMPLIFIED_NUMBER_UNOP_LIST(V) \
608 SIMPLIFIED_BIGINT_UNOP_LIST(V) \
609 SIMPLIFIED_SPECULATIVE_NUMBER_UNOP_LIST(V) \
610 SIMPLIFIED_SPECULATIVE_BIGINT_UNOP_LIST(V) \
611 SIMPLIFIED_SPECULATIVE_BIGINT_BINOP_LIST(V) \
612 IF_WASM(SIMPLIFIED_WASM_OP_LIST, V) \
613 SIMPLIFIED_OTHER_OP_LIST(V)
616#define MACHINE_UNOP_32_LIST(V) \
619 V(Int32AbsWithOverflow) \
620 V(Word32ReverseBits) \
621 V(Word32ReverseBytes)
623#define MACHINE_COMPARE_BINOP_LIST(V) \
627 V(Int32LessThanOrEqual) \
629 V(Uint32LessThanOrEqual) \
631 V(Int64LessThanOrEqual) \
633 V(Uint64LessThanOrEqual) \
636 V(Float32LessThanOrEqual) \
639 V(Float64LessThanOrEqual)
641#define MACHINE_BINOP_32_LIST(V) \
651 V(Int32AddWithOverflow) \
653 V(Int32SubWithOverflow) \
655 V(Int32MulWithOverflow) \
663#define MACHINE_BINOP_64_LIST(V) \
672 V(Word64RolLowerable) \
673 V(Word64RorLowerable) \
675 V(Int64AddWithOverflow) \
677 V(Int64SubWithOverflow) \
680 V(Int64MulWithOverflow) \
687#define MACHINE_FLOAT32_UNOP_LIST(V) \
690 V(Float32RoundDown) \
691 V(Float32RoundTiesEven) \
692 V(Float32RoundTruncate) \
696#define MACHINE_FLOAT32_BINOP_LIST(V) \
704#define MACHINE_FLOAT64_UNOP_LIST(V) \
722 V(Float64RoundDown) \
723 V(Float64RoundTiesAway) \
724 V(Float64RoundTiesEven) \
725 V(Float64RoundTruncate) \
733#define MACHINE_FLOAT64_BINOP_LIST(V) \
744#define MACHINE_ATOMIC_OP_LIST(V) \
745 V(Word32AtomicLoad) \
746 V(Word32AtomicStore) \
747 V(Word32AtomicExchange) \
748 V(Word32AtomicCompareExchange) \
754 V(Word32AtomicPairLoad) \
755 V(Word32AtomicPairStore) \
756 V(Word32AtomicPairAdd) \
757 V(Word32AtomicPairSub) \
758 V(Word32AtomicPairAnd) \
759 V(Word32AtomicPairOr) \
760 V(Word32AtomicPairXor) \
761 V(Word32AtomicPairExchange) \
762 V(Word32AtomicPairCompareExchange) \
763 V(Word64AtomicLoad) \
764 V(Word64AtomicStore) \
770 V(Word64AtomicExchange) \
771 V(Word64AtomicCompareExchange)
773#define MACHINE_OP_LIST(V) \
774 MACHINE_UNOP_32_LIST(V) \
775 MACHINE_BINOP_32_LIST(V) \
776 MACHINE_BINOP_64_LIST(V) \
777 MACHINE_COMPARE_BINOP_LIST(V) \
778 MACHINE_FLOAT32_BINOP_LIST(V) \
779 MACHINE_FLOAT32_UNOP_LIST(V) \
780 MACHINE_FLOAT64_BINOP_LIST(V) \
781 MACHINE_FLOAT64_UNOP_LIST(V) \
782 MACHINE_ATOMIC_OP_LIST(V) \
790 V(StoreIndirectPointer) \
796 V(Word64ClzLowerable) \
797 V(Word64CtzLowerable) \
798 V(Word64ReverseBits) \
799 V(Word64ReverseBytes) \
800 V(Simd128ReverseBytes) \
801 V(Int64AbsWithOverflow) \
802 V(BitcastTaggedToWord) \
803 V(BitcastTaggedToWordForTagAndSmiBits) \
804 V(BitcastWordToTagged) \
805 V(BitcastWordToTaggedSigned) \
806 V(TruncateFloat64ToWord32) \
807 V(ChangeFloat32ToFloat64) \
808 V(ChangeFloat64ToInt32) \
809 V(ChangeFloat64ToInt64) \
810 V(ChangeFloat64ToUint32) \
811 V(ChangeFloat64ToUint64) \
812 V(Float64SilenceNaN) \
813 V(TruncateFloat64ToInt64) \
814 V(TruncateFloat64ToUint32) \
815 V(TruncateFloat32ToInt32) \
816 V(TruncateFloat32ToUint32) \
817 V(TryTruncateFloat32ToInt64) \
818 V(TryTruncateFloat64ToInt64) \
819 V(TryTruncateFloat32ToUint64) \
820 V(TryTruncateFloat64ToUint64) \
821 V(TryTruncateFloat64ToInt32) \
822 V(TryTruncateFloat64ToUint32) \
823 V(ChangeInt32ToFloat64) \
824 V(BitcastWord32ToWord64) \
825 V(ChangeInt32ToInt64) \
826 V(ChangeInt64ToFloat64) \
827 V(ChangeUint32ToFloat64) \
828 V(ChangeUint32ToUint64) \
829 V(ChangeFloat16RawBitsToFloat64) \
830 V(TruncateFloat64ToFloat32) \
831 V(TruncateFloat64ToFloat16RawBits) \
832 V(TruncateInt64ToInt32) \
833 V(RoundFloat64ToInt32) \
834 V(RoundInt32ToFloat32) \
835 V(RoundInt64ToFloat32) \
836 V(RoundInt64ToFloat64) \
837 V(RoundUint32ToFloat32) \
838 V(RoundUint64ToFloat32) \
839 V(RoundUint64ToFloat64) \
840 V(BitcastFloat32ToInt32) \
841 V(BitcastFloat64ToInt64) \
842 V(BitcastInt32ToFloat32) \
843 V(BitcastInt64ToFloat64) \
844 V(Float64ExtractLowWord32) \
845 V(Float64ExtractHighWord32) \
846 V(Float64InsertLowWord32) \
847 V(Float64InsertHighWord32) \
852 V(LoadStackCheckOffset) \
853 V(LoadFramePointer) \
854 IF_WASM(V, LoadStackPointer) \
855 IF_WASM(V, SetStackPointer) \
856 V(LoadParentFramePointer) \
857 V(LoadRootRegister) \
871 V(SignExtendWord8ToInt32) \
872 V(SignExtendWord16ToInt32) \
873 V(SignExtendWord8ToInt64) \
874 V(SignExtendWord16ToInt64) \
875 V(SignExtendWord32ToInt64) \
876 V(StackPointerGreaterThan) \
879#define MACHINE_SIMD128_OP_LIST(V) \
880 IF_WASM(V, F64x2Splat) \
881 IF_WASM(V, F64x2ExtractLane) \
882 IF_WASM(V, F64x2ReplaceLane) \
883 IF_WASM(V, F64x2Abs) \
884 IF_WASM(V, F64x2Neg) \
885 IF_WASM(V, F64x2Sqrt) \
886 IF_WASM(V, F64x2Add) \
887 IF_WASM(V, F64x2Sub) \
888 IF_WASM(V, F64x2Mul) \
889 IF_WASM(V, F64x2Div) \
890 IF_WASM(V, F64x2Min) \
891 IF_WASM(V, F64x2Max) \
892 IF_WASM(V, F64x2Eq) \
893 IF_WASM(V, F64x2Ne) \
894 IF_WASM(V, F64x2Lt) \
895 IF_WASM(V, F64x2Le) \
896 IF_WASM(V, F64x2Qfma) \
897 IF_WASM(V, F64x2Qfms) \
898 IF_WASM(V, F64x2Pmin) \
899 IF_WASM(V, F64x2Pmax) \
900 IF_WASM(V, F64x2Ceil) \
901 IF_WASM(V, F64x2Floor) \
902 IF_WASM(V, F64x2Trunc) \
903 IF_WASM(V, F64x2NearestInt) \
904 IF_WASM(V, F64x2ConvertLowI32x4S) \
905 IF_WASM(V, F64x2ConvertLowI32x4U) \
906 IF_WASM(V, F64x2PromoteLowF32x4) \
907 IF_WASM(V, F32x4Splat) \
908 IF_WASM(V, F32x4ExtractLane) \
909 IF_WASM(V, F32x4ReplaceLane) \
910 IF_WASM(V, F32x4SConvertI32x4) \
911 IF_WASM(V, F32x4UConvertI32x4) \
912 IF_WASM(V, F32x4Abs) \
913 IF_WASM(V, F32x4Neg) \
914 IF_WASM(V, F32x4Sqrt) \
915 IF_WASM(V, F32x4Add) \
916 IF_WASM(V, F32x4Sub) \
917 IF_WASM(V, F32x4Mul) \
918 IF_WASM(V, F32x4Div) \
919 IF_WASM(V, F32x4Min) \
920 IF_WASM(V, F32x4Max) \
921 IF_WASM(V, F32x4Eq) \
922 IF_WASM(V, F32x4Ne) \
923 IF_WASM(V, F32x4Lt) \
924 IF_WASM(V, F32x4Le) \
925 IF_WASM(V, F32x4Gt) \
926 IF_WASM(V, F32x4Ge) \
927 IF_WASM(V, F32x4Qfma) \
928 IF_WASM(V, F32x4Qfms) \
929 IF_WASM(V, F32x4Pmin) \
930 IF_WASM(V, F32x4Pmax) \
931 IF_WASM(V, F32x4Ceil) \
932 IF_WASM(V, F32x4Floor) \
933 IF_WASM(V, F32x4Trunc) \
934 IF_WASM(V, F32x4NearestInt) \
935 IF_WASM(V, F32x4DemoteF64x2Zero) \
936 IF_WASM(V, F16x8Splat) \
937 IF_WASM(V, F16x8ExtractLane) \
938 IF_WASM(V, F16x8ReplaceLane) \
939 IF_WASM(V, F16x8Abs) \
940 IF_WASM(V, F16x8Neg) \
941 IF_WASM(V, F16x8Sqrt) \
942 IF_WASM(V, F16x8Ceil) \
943 IF_WASM(V, F16x8Floor) \
944 IF_WASM(V, F16x8Trunc) \
945 IF_WASM(V, F16x8NearestInt) \
946 IF_WASM(V, F16x8Add) \
947 IF_WASM(V, F16x8Sub) \
948 IF_WASM(V, F16x8Mul) \
949 IF_WASM(V, F16x8Div) \
950 IF_WASM(V, F16x8Min) \
951 IF_WASM(V, F16x8Max) \
952 IF_WASM(V, F16x8Pmin) \
953 IF_WASM(V, F16x8Pmax) \
954 IF_WASM(V, F16x8Eq) \
955 IF_WASM(V, F16x8Ne) \
956 IF_WASM(V, F16x8Lt) \
957 IF_WASM(V, F16x8Le) \
958 IF_WASM(V, F16x8Gt) \
959 IF_WASM(V, F16x8Ge) \
960 IF_WASM(V, I16x8SConvertF16x8) \
961 IF_WASM(V, I16x8UConvertF16x8) \
962 IF_WASM(V, F16x8SConvertI16x8) \
963 IF_WASM(V, F16x8UConvertI16x8) \
964 IF_WASM(V, F16x8DemoteF32x4Zero) \
965 IF_WASM(V, F16x8DemoteF64x2Zero) \
966 IF_WASM(V, F32x4PromoteLowF16x8) \
967 IF_WASM(V, F16x8Qfma) \
968 IF_WASM(V, F16x8Qfms) \
969 IF_WASM(V, I64x2Splat) \
970 IF_WASM(V, I64x2SplatI32Pair) \
971 IF_WASM(V, I64x2ExtractLane) \
972 IF_WASM(V, I64x2ReplaceLane) \
973 IF_WASM(V, I64x2ReplaceLaneI32Pair) \
974 IF_WASM(V, I64x2Abs) \
975 IF_WASM(V, I64x2Neg) \
976 IF_WASM(V, I64x2SConvertI32x4Low) \
977 IF_WASM(V, I64x2SConvertI32x4High) \
978 IF_WASM(V, I64x2UConvertI32x4Low) \
979 IF_WASM(V, I64x2UConvertI32x4High) \
980 IF_WASM(V, I64x2BitMask) \
981 IF_WASM(V, I64x2Shl) \
982 IF_WASM(V, I64x2ShrS) \
983 IF_WASM(V, I64x2Add) \
984 IF_WASM(V, I64x2Sub) \
985 IF_WASM(V, I64x2Mul) \
986 IF_WASM(V, I64x2Eq) \
987 IF_WASM(V, I64x2Ne) \
988 IF_WASM(V, I64x2GtS) \
989 IF_WASM(V, I64x2GeS) \
990 IF_WASM(V, I64x2ShrU) \
991 IF_WASM(V, I64x2ExtMulLowI32x4S) \
992 IF_WASM(V, I64x2ExtMulHighI32x4S) \
993 IF_WASM(V, I64x2ExtMulLowI32x4U) \
994 IF_WASM(V, I64x2ExtMulHighI32x4U) \
995 IF_WASM(V, I32x4Splat) \
996 IF_WASM(V, I32x4ExtractLane) \
997 IF_WASM(V, I32x4ReplaceLane) \
998 IF_WASM(V, I32x4SConvertF32x4) \
999 IF_WASM(V, I32x4SConvertI16x8Low) \
1000 IF_WASM(V, I32x4SConvertI16x8High) \
1001 IF_WASM(V, I32x4Neg) \
1002 IF_WASM(V, I32x4Shl) \
1003 IF_WASM(V, I32x4ShrS) \
1004 IF_WASM(V, I32x4Add) \
1005 IF_WASM(V, I32x4Sub) \
1006 IF_WASM(V, I32x4Mul) \
1007 IF_WASM(V, I32x4MinS) \
1008 IF_WASM(V, I32x4MaxS) \
1009 IF_WASM(V, I32x4Eq) \
1010 IF_WASM(V, I32x4Ne) \
1011 IF_WASM(V, I32x4LtS) \
1012 IF_WASM(V, I32x4LeS) \
1013 IF_WASM(V, I32x4GtS) \
1014 IF_WASM(V, I32x4GeS) \
1015 IF_WASM(V, I32x4UConvertF32x4) \
1016 IF_WASM(V, I32x4UConvertI16x8Low) \
1017 IF_WASM(V, I32x4UConvertI16x8High) \
1018 IF_WASM(V, I32x4ShrU) \
1019 IF_WASM(V, I32x4MinU) \
1020 IF_WASM(V, I32x4MaxU) \
1021 IF_WASM(V, I32x4LtU) \
1022 IF_WASM(V, I32x4LeU) \
1023 IF_WASM(V, I32x4GtU) \
1024 IF_WASM(V, I32x4GeU) \
1025 IF_WASM(V, I32x4Abs) \
1026 IF_WASM(V, I32x4BitMask) \
1027 IF_WASM(V, I32x4DotI16x8S) \
1028 IF_WASM(V, I32x4ExtMulLowI16x8S) \
1029 IF_WASM(V, I32x4ExtMulHighI16x8S) \
1030 IF_WASM(V, I32x4ExtMulLowI16x8U) \
1031 IF_WASM(V, I32x4ExtMulHighI16x8U) \
1032 IF_WASM(V, I32x4ExtAddPairwiseI16x8S) \
1033 IF_WASM(V, I32x4ExtAddPairwiseI16x8U) \
1034 IF_WASM(V, I32x4TruncSatF64x2SZero) \
1035 IF_WASM(V, I32x4TruncSatF64x2UZero) \
1036 IF_WASM(V, I16x8Splat) \
1037 IF_WASM(V, I16x8ExtractLaneU) \
1038 IF_WASM(V, I16x8ExtractLaneS) \
1039 IF_WASM(V, I16x8ReplaceLane) \
1040 IF_WASM(V, I16x8SConvertI8x16Low) \
1041 IF_WASM(V, I16x8SConvertI8x16High) \
1042 IF_WASM(V, I16x8Neg) \
1043 IF_WASM(V, I16x8Shl) \
1044 IF_WASM(V, I16x8ShrS) \
1045 IF_WASM(V, I16x8SConvertI32x4) \
1046 IF_WASM(V, I16x8Add) \
1047 IF_WASM(V, I16x8AddSatS) \
1048 IF_WASM(V, I16x8Sub) \
1049 IF_WASM(V, I16x8SubSatS) \
1050 IF_WASM(V, I16x8Mul) \
1051 IF_WASM(V, I16x8MinS) \
1052 IF_WASM(V, I16x8MaxS) \
1053 IF_WASM(V, I16x8Eq) \
1054 IF_WASM(V, I16x8Ne) \
1055 IF_WASM(V, I16x8LtS) \
1056 IF_WASM(V, I16x8LeS) \
1057 IF_WASM(V, I16x8GtS) \
1058 IF_WASM(V, I16x8GeS) \
1059 IF_WASM(V, I16x8UConvertI8x16Low) \
1060 IF_WASM(V, I16x8UConvertI8x16High) \
1061 IF_WASM(V, I16x8ShrU) \
1062 IF_WASM(V, I16x8UConvertI32x4) \
1063 IF_WASM(V, I16x8AddSatU) \
1064 IF_WASM(V, I16x8SubSatU) \
1065 IF_WASM(V, I16x8MinU) \
1066 IF_WASM(V, I16x8MaxU) \
1067 IF_WASM(V, I16x8LtU) \
1068 IF_WASM(V, I16x8LeU) \
1069 IF_WASM(V, I16x8GtU) \
1070 IF_WASM(V, I16x8GeU) \
1071 IF_WASM(V, I16x8RoundingAverageU) \
1072 IF_WASM(V, I16x8Q15MulRSatS) \
1073 IF_WASM(V, I16x8Abs) \
1074 IF_WASM(V, I16x8BitMask) \
1075 IF_WASM(V, I16x8ExtMulLowI8x16S) \
1076 IF_WASM(V, I16x8ExtMulHighI8x16S) \
1077 IF_WASM(V, I16x8ExtMulLowI8x16U) \
1078 IF_WASM(V, I16x8ExtMulHighI8x16U) \
1079 IF_WASM(V, I16x8ExtAddPairwiseI8x16S) \
1080 IF_WASM(V, I16x8ExtAddPairwiseI8x16U) \
1082 IF_WASM(V, I8x16ExtractLaneU) \
1083 IF_WASM(V, I8x16ExtractLaneS) \
1084 IF_WASM(V, I8x16ReplaceLane) \
1085 IF_WASM(V, I8x16SConvertI16x8) \
1086 IF_WASM(V, I8x16Neg) \
1087 IF_WASM(V, I8x16Shl) \
1088 IF_WASM(V, I8x16ShrS) \
1089 IF_WASM(V, I8x16Add) \
1090 IF_WASM(V, I8x16AddSatS) \
1091 IF_WASM(V, I8x16Sub) \
1092 IF_WASM(V, I8x16SubSatS) \
1093 IF_WASM(V, I8x16MinS) \
1094 IF_WASM(V, I8x16MaxS) \
1096 IF_WASM(V, I8x16Ne) \
1097 IF_WASM(V, I8x16LtS) \
1098 IF_WASM(V, I8x16LeS) \
1099 IF_WASM(V, I8x16GtS) \
1100 IF_WASM(V, I8x16GeS) \
1101 IF_WASM(V, I8x16UConvertI16x8) \
1102 IF_WASM(V, I8x16AddSatU) \
1103 IF_WASM(V, I8x16SubSatU) \
1104 IF_WASM(V, I8x16ShrU) \
1105 IF_WASM(V, I8x16MinU) \
1106 IF_WASM(V, I8x16MaxU) \
1107 IF_WASM(V, I8x16LtU) \
1108 IF_WASM(V, I8x16LeU) \
1109 IF_WASM(V, I8x16GtU) \
1110 IF_WASM(V, I8x16GeU) \
1111 IF_WASM(V, I8x16RoundingAverageU) \
1112 IF_WASM(V, I8x16Popcnt) \
1113 IF_WASM(V, I8x16Abs) \
1115 IF_WASM(V, S128Zero) \
1116 IF_WASM(V, S128Const) \
1117 IF_WASM(V, S128Not) \
1118 IF_WASM(V, S128And) \
1119 IF_WASM(V, S128Or) \
1120 IF_WASM(V, S128Xor) \
1121 IF_WASM(V, S128Select) \
1122 IF_WASM(V, S128AndNot) \
1123 IF_WASM(V, I8x16Swizzle) \
1124 IF_WASM(V, I8x16RelaxedLaneSelect) \
1125 IF_WASM(V, I16x8RelaxedLaneSelect) \
1126 IF_WASM(V, I32x4RelaxedLaneSelect) \
1127 IF_WASM(V, I64x2RelaxedLaneSelect) \
1128 IF_WASM(V, F32x4RelaxedMin) \
1129 IF_WASM(V, F32x4RelaxedMax) \
1130 IF_WASM(V, F64x2RelaxedMin) \
1131 IF_WASM(V, F64x2RelaxedMax) \
1132 IF_WASM(V, I32x4RelaxedTruncF32x4S) \
1133 IF_WASM(V, I32x4RelaxedTruncF32x4U) \
1134 IF_WASM(V, I32x4RelaxedTruncF64x2SZero) \
1135 IF_WASM(V, I32x4RelaxedTruncF64x2UZero) \
1136 IF_WASM(V, I16x8RelaxedQ15MulRS) \
1137 IF_WASM(V, I16x8DotI8x16I7x16S) \
1138 IF_WASM(V, I32x4DotI8x16I7x16AddS) \
1139 IF_WASM(V, I8x16AddReduce) \
1140 IF_WASM(V, I16x8AddReduce) \
1141 IF_WASM(V, I32x4AddReduce) \
1142 IF_WASM(V, I64x2AddReduce) \
1143 IF_WASM(V, F32x4AddReduce) \
1144 IF_WASM(V, F64x2AddReduce) \
1145 IF_WASM(V, I8x16Shuffle) \
1146 IF_WASM(V, I8x8Shuffle) \
1147 IF_WASM(V, I8x4Shuffle) \
1148 IF_WASM(V, I8x2Shuffle) \
1149 IF_WASM(V, V128AnyTrue) \
1150 IF_WASM(V, I64x2AllTrue) \
1151 IF_WASM(V, I32x4AllTrue) \
1152 IF_WASM(V, I16x8AllTrue) \
1153 IF_WASM(V, I8x16AllTrue) \
1154 IF_WASM(V, LoadTransform) \
1155 IF_WASM(V, LoadLane) \
1156 IF_WASM(V, StoreLane)
1159#define MACHINE_SIMD256_OP_LIST(V) \
1238 V(I32x8SConvertF32x8) \
1239 V(I32x8UConvertF32x8) \
1240 V(F64x4ConvertI32x4S) \
1241 V(F32x8SConvertI32x8) \
1242 V(F32x8UConvertI32x8) \
1243 V(F32x4DemoteF64x4) \
1244 V(I64x4SConvertI32x4) \
1245 V(I64x4UConvertI32x4) \
1246 V(I32x8SConvertI16x8) \
1247 V(I32x8UConvertI16x8) \
1248 V(I16x16SConvertI8x16) \
1249 V(I16x16UConvertI8x16) \
1250 V(I16x16SConvertI32x8) \
1251 V(I16x16UConvertI32x8) \
1252 V(I8x32SConvertI16x16) \
1253 V(I8x32UConvertI16x16) \
1271 V(I32x8DotI16x16S) \
1272 V(I16x16RoundingAverageU) \
1273 V(I8x32RoundingAverageU) \
1274 V(I64x4ExtMulI32x4S) \
1275 V(I64x4ExtMulI32x4U) \
1276 V(I32x8ExtMulI16x8S) \
1277 V(I32x8ExtMulI16x8U) \
1278 V(I16x16ExtMulI8x16S) \
1279 V(I16x16ExtMulI8x16U) \
1280 V(I32x8ExtAddPairwiseI16x16S) \
1281 V(I32x8ExtAddPairwiseI16x16U) \
1282 V(I16x16ExtAddPairwiseI8x32S) \
1283 V(I16x16ExtAddPairwiseI8x32U) \
1306 V(I64x4RelaxedLaneSelect) \
1307 V(I32x8RelaxedLaneSelect) \
1308 V(I16x16RelaxedLaneSelect) \
1309 V(I8x32RelaxedLaneSelect) \
1310 V(I32x8DotI8x32I7x32AddS) \
1311 V(I16x16DotI8x32I7x32S) \
1312 V(F32x8RelaxedMin) \
1313 V(F32x8RelaxedMax) \
1314 V(F64x4RelaxedMin) \
1315 V(F64x4RelaxedMax) \
1316 V(I32x8RelaxedTruncF32x8S) \
1317 V(I32x8RelaxedTruncF32x8U)
1319#define VALUE_OP_LIST(V) \
1321 SIMPLIFIED_OP_LIST(V) \
1322 MACHINE_OP_LIST(V) \
1323 MACHINE_SIMD128_OP_LIST(V) \
1324 IF_WASM(MACHINE_SIMD256_OP_LIST, V) \
1328#define ALL_OP_LIST(V) \
1329 CONTROL_OP_LIST(V) \
1341#define DECLARE_OPCODE(x, ...) k##x,
1343#undef DECLARE_OPCODE
1345#define COUNT_OPCODE(...) +1
1351 static char const* Mnemonic(
Value value);
1355 return kStart <= value && value <= kStaticAssert;
1365 return kJSEqual <= value && value <= kJSDebugger;
1370 return kWord32Clz <= value && value <= kTraceInstruction;
1401 return value ==
kPhi || value == kEffectPhi;
1405 return value == kMerge || value ==
kLoop;
1409 return kIfTrue <= value && value <= kIfDefault;
1416 return value == kDeoptimize || value == kReturn || value == kTailCall ||
1417 value == kTerminate || value == kThrow;
1422 return value == kJSConstruct || value == kJSCall;
1427#define CASE(Name, ...) \
1442 return kJSCreateFunctionContext <= value && value <= kJSCreateBlockContext;
1448#define CASE(Name, ...) \
1458 case kJSCallWithArrayLike:
1459 case kJSCallWithSpread:
1460 case kJSCloneObject:
1462 case kJSConstructWithArrayLike:
1463 case kJSConstructWithSpread:
1464 case kJSCreateEmptyLiteralArray:
1465 case kJSCreateLiteralArray:
1466 case kJSCreateLiteralObject:
1467 case kJSCreateLiteralRegExp:
1468 case kJSDefineKeyedOwnProperty:
1470 case kJSForInPrepare:
1471 case kJSGetIterator:
1472 case kJSGetTemplateObject:
1473 case kJSHasProperty:
1477 case kJSLoadNamedFromSuper:
1478 case kJSLoadProperty:
1479 case kJSDefineKeyedOwnPropertyInLiteral:
1480 case kJSStoreGlobal:
1481 case kJSStoreInArrayLiteral:
1482 case kJSSetNamedProperty:
1483 case kJSDefineNamedOwnProperty:
1484 case kJSSetKeyedProperty:
1495 return IsFeedbackCollectingOpcode(
static_cast<IrOpcode::Value>(value));
1500 #define CASE(Name, ...) \
1511#if V8_ENABLE_WEBASSEMBLY
1512 static bool IsSimd128Opcode(
Value value) {
1513#define CASE(Name, ...) case k##Name:
static bool isAtomicOpOpcode(Value value)
static bool IsConstantOpcode(Value value)
static bool IsContextChainExtendingOpcode(Value value)
static bool IsMachineOpcode(Value value)
static bool IsJsOpcode(Value value)
static bool IsMergeOpcode(Value value)
static bool IsGraphTerminator(Value value)
static bool IsFeedbackCollectingOpcode(int16_t value)
static bool IsCommonOpcode(Value value)
static bool IsPhiOpcode(Value value)
static bool IsInlineeOpcode(Value value)
static bool IsMachineConstantOpcode(Value value)
static bool IsComparisonOpcode(Value value)
static bool IsControlOpcode(Value value)
static bool IsIfProjectionOpcode(Value value)
static bool IsFeedbackCollectingOpcode(Value value)
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
#define CONSTANT_OP_LIST(V)
#define JS_COMPARE_BINOP_LIST(V)
#define JS_BITWISE_BINOP_LIST(V)
#define COUNT_OPCODE(...)
#define JS_BITWISE_UNOP_LIST(V)
#define SIMPLIFIED_COMPARE_BINOP_LIST(V)
#define JS_ARITH_UNOP_LIST(V)
#define MACHINE_COMPARE_BINOP_LIST(V)
#define MACHINE_ATOMIC_OP_LIST(V)
#define MACHINE_SIMD128_OP_LIST(V)
#define DECLARE_OPCODE(x,...)
#define JS_ARITH_BINOP_LIST(V)
#define MACHINE_LEVEL_CONSTANT_OP_LIST(V)
#define DCHECK(condition)
#define V8_EXPORT_PRIVATE