Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: src/compiler/machine-operator.cc

Issue 2776753004: [wasm] Make Opcode names consistent across architectures, implementations (Closed)
Patch Set: Fix Saturates Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator.cc
diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc
index f05e3dc120e1aea033e049e058560e0a0d22344d..bbd2904a018a74352e5d0251ee2f89c5f0da6298 100644
--- a/src/compiler/machine-operator.cc
+++ b/src/compiler/machine-operator.cc
@@ -134,216 +134,210 @@ MachineType AtomicCompareExchangeRepresentationOf(Operator const* op) {
V(Uint64LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)
-#define PURE_OP_LIST(V) \
- PURE_BINARY_OP_LIST_32(V) \
- PURE_BINARY_OP_LIST_64(V) \
- V(Word32Clz, Operator::kNoProperties, 1, 0, 1) \
- V(Word64Clz, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastTaggedToWord, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeFloat64ToUint64, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateFloat32ToUint32, Operator::kNoProperties, 1, 0, 1) \
- V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2) \
- V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2) \
- V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2) \
- V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2) \
- V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1) \
- V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
- V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
- V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
- V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \
- V(Float32Add, Operator::kCommutative, 2, 0, 1) \
- V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Float32Mul, Operator::kCommutative, 2, 0, 1) \
- V(Float32Div, Operator::kNoProperties, 2, 0, 1) \
- V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \
- V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Log, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Add, Operator::kCommutative, 2, 0, 1) \
- V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Mul, Operator::kCommutative, 2, 0, 1) \
- V(Float64Div, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Tan, Operator::kNoProperties, 1, 0, 1) \
- V(Float64Tanh, Operator::kNoProperties, 1, 0, 1) \
- V(Float32Equal, Operator::kCommutative, 2, 0, 1) \
- V(Float32LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Float64Equal, Operator::kCommutative, 2, 0, 1) \
- V(Float64LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1) \
- V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1) \
- V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
- V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
- V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \
- V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
- V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
- V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
- V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
- V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
- V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
- V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
- V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
- V(Float32x4Splat, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4Abs, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4Add, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4Mul, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4Div, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4Min, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4Max, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4MinNum, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4RecipRefine, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4RecipSqrtRefine, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4Equal, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
- V(Float32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
- V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
- V(Int32x4Splat, Operator::kNoProperties, 1, 0, 1) \
- V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
- V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
- V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
- V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
- V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
- V(Int16x8Splat, Operator::kNoProperties, 1, 0, 1) \
- V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
- V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
- V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
- V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
- V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
- V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
- V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Int8x16Splat, Operator::kNoProperties, 1, 0, 1) \
- V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
- V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
- V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
- V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
- V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
- V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
- V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
- V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
- V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
- V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
- V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \
- V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \
- V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \
- V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \
- V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \
- V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \
- V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \
- V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \
- V(Simd128Zero, Operator::kNoProperties, 0, 0, 1) \
- V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd128Not, Operator::kNoProperties, 1, 0, 1) \
- V(Simd32x4Select, Operator::kNoProperties, 3, 0, 1) \
- V(Simd16x8Select, Operator::kNoProperties, 3, 0, 1) \
- V(Simd8x16Select, Operator::kNoProperties, 3, 0, 1) \
- V(Simd1x4Zero, Operator::kNoProperties, 0, 0, 1) \
- V(Simd1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x4Not, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x8Zero, Operator::kNoProperties, 0, 0, 1) \
- V(Simd1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x8Not, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x16Zero, Operator::kNoProperties, 0, 0, 1) \
- V(Simd1x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
- V(Simd1x16Not, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
- V(Simd1x16AllTrue, Operator::kNoProperties, 1, 0, 1)
+#define PURE_OP_LIST(V) \
+ PURE_BINARY_OP_LIST_32(V) \
+ PURE_BINARY_OP_LIST_64(V) \
+ V(Word32Clz, Operator::kNoProperties, 1, 0, 1) \
+ V(Word64Clz, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastTaggedToWord, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeFloat64ToUint64, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateFloat32ToUint32, Operator::kNoProperties, 1, 0, 1) \
+ V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2) \
+ V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2) \
+ V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2) \
+ V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2) \
+ V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
+ V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
+ V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \
+ V(Float32Add, Operator::kCommutative, 2, 0, 1) \
+ V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(Float32Mul, Operator::kCommutative, 2, 0, 1) \
+ V(Float32Div, Operator::kNoProperties, 2, 0, 1) \
+ V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \
+ V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Log, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Add, Operator::kCommutative, 2, 0, 1) \
+ V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Mul, Operator::kCommutative, 2, 0, 1) \
+ V(Float64Div, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Tan, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64Tanh, Operator::kNoProperties, 1, 0, 1) \
+ V(Float32Equal, Operator::kCommutative, 2, 0, 1) \
+ V(Float32LessThan, Operator::kNoProperties, 2, 0, 1) \
+ V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64Equal, Operator::kCommutative, 2, 0, 1) \
+ V(Float64LessThan, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1) \
+ V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
+ V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
+ V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \
+ V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
+ V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
+ V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
+ V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
+ V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
+ V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
+ V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
+ V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
+ V(F32x4Splat, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4SConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4UConvertI32x4, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4Abs, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
+ V(F32x4Add, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(F32x4Mul, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4Div, Operator::kNoProperties, 2, 0, 1) \
+ V(F32x4Min, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4Max, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4MinNum, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4RecipRefine, Operator::kNoProperties, 2, 0, 1) \
+ V(F32x4RecipSqrtRefine, Operator::kNoProperties, 2, 0, 1) \
+ V(F32x4Eq, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4Ne, Operator::kCommutative, 2, 0, 1) \
+ V(F32x4Lt, Operator::kNoProperties, 2, 0, 1) \
+ V(F32x4Le, Operator::kNoProperties, 2, 0, 1) \
+ V(I32x4Splat, Operator::kNoProperties, 1, 0, 1) \
+ V(I32x4SConvertF32x4, Operator::kNoProperties, 1, 0, 1) \
+ V(I32x4Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(I32x4Add, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(I32x4Mul, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4MinS, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4MaxS, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4Eq, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4Ne, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4LtS, Operator::kNoProperties, 2, 0, 1) \
+ V(I32x4LeS, Operator::kNoProperties, 2, 0, 1) \
+ V(I32x4UConvertF32x4, Operator::kNoProperties, 1, 0, 1) \
+ V(I32x4MinU, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4MaxU, Operator::kCommutative, 2, 0, 1) \
+ V(I32x4LtU, Operator::kNoProperties, 2, 0, 1) \
+ V(I32x4LeU, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8Splat, Operator::kNoProperties, 1, 0, 1) \
+ V(I16x8Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(I16x8Add, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8AddSaturateS, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8SubSaturateS, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8Mul, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8MinS, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8MaxS, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8Eq, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8Ne, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8LtS, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8LeS, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8AddSaturateU, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8SubSaturateU, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8MinU, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8MaxU, Operator::kCommutative, 2, 0, 1) \
+ V(I16x8LtU, Operator::kNoProperties, 2, 0, 1) \
+ V(I16x8LeU, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16Splat, Operator::kNoProperties, 1, 0, 1) \
+ V(I8x16Neg, Operator::kNoProperties, 1, 0, 1) \
+ V(I8x16Add, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16AddSaturateS, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16Sub, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16SubSaturateS, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16Mul, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16MinS, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16MaxS, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16Eq, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16Ne, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16LtS, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16LeS, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16AddSaturateU, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16SubSaturateU, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16MinU, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16MaxU, Operator::kCommutative, 2, 0, 1) \
+ V(I8x16LtU, Operator::kNoProperties, 2, 0, 1) \
+ V(I8x16LeU, Operator::kNoProperties, 2, 0, 1) \
+ V(S128Load, Operator::kNoProperties, 2, 0, 1) \
+ V(S128Store, Operator::kNoProperties, 3, 0, 1) \
+ V(S128Zero, Operator::kNoProperties, 0, 0, 1) \
+ V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S128Not, Operator::kNoProperties, 1, 0, 1) \
+ V(S32x4Select, Operator::kNoProperties, 3, 0, 1) \
+ V(S16x8Select, Operator::kNoProperties, 3, 0, 1) \
+ V(S8x16Select, Operator::kNoProperties, 3, 0, 1) \
+ V(S1x4Zero, Operator::kNoProperties, 0, 0, 1) \
+ V(S1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x4Not, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x8Zero, Operator::kNoProperties, 0, 0, 1) \
+ V(S1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x8Not, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x16Zero, Operator::kNoProperties, 0, 0, 1) \
+ V(S1x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
+ V(S1x16Not, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
+ V(S1x16AllTrue, Operator::kNoProperties, 1, 0, 1)
#define PURE_OPTIONAL_OP_LIST(V) \
V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \
@@ -414,10 +408,10 @@ MachineType AtomicCompareExchangeRepresentationOf(Operator const* op) {
V(kWord32)
#define SIMD_LANE_OP_LIST(V) \
- V(Float32x4, 4) \
- V(Int32x4, 4) \
- V(Int16x8, 8) \
- V(Int8x16, 16)
+ V(F32x4, 4) \
+ V(I32x4, 4) \
+ V(I16x8, 8) \
+ V(I8x16, 16)
#define SIMD_FORMAT_LIST(V) \
V(32x4, 32) \
@@ -921,38 +915,35 @@ const Operator* MachineOperatorBuilder::AtomicCompareExchange(MachineType rep) {
SIMD_LANE_OP_LIST(SIMD_LANE_OPS)
#undef SIMD_LANE_OPS
-#define SIMD_SHIFT_OPS(format, bits) \
- const Operator* MachineOperatorBuilder::Int##format##ShiftLeftByScalar( \
- int32_t shift) { \
- DCHECK(0 <= shift && shift < bits); \
- return new (zone_) Operator1<int32_t>( \
- IrOpcode::kInt##format##ShiftLeftByScalar, Operator::kPure, \
- "Shift left", 1, 0, 0, 1, 0, 0, shift); \
- } \
- const Operator* MachineOperatorBuilder::Int##format##ShiftRightByScalar( \
- int32_t shift) { \
- DCHECK(0 < shift && shift <= bits); \
- return new (zone_) Operator1<int32_t>( \
- IrOpcode::kInt##format##ShiftRightByScalar, Operator::kPure, \
- "Arithmetic shift right", 1, 0, 0, 1, 0, 0, shift); \
- } \
- const Operator* MachineOperatorBuilder::Uint##format##ShiftRightByScalar( \
- int32_t shift) { \
- DCHECK(0 <= shift && shift < bits); \
- return new (zone_) Operator1<int32_t>( \
- IrOpcode::kUint##format##ShiftRightByScalar, Operator::kPure, \
- "Shift right", 1, 0, 0, 1, 0, 0, shift); \
+#define SIMD_SHIFT_OPS(format, bits) \
+ const Operator* MachineOperatorBuilder::I##format##Shl(int32_t shift) { \
+ DCHECK(0 <= shift && shift < bits); \
+ return new (zone_) \
+ Operator1<int32_t>(IrOpcode::kI##format##Shl, Operator::kPure, \
+ "Shift left", 1, 0, 0, 1, 0, 0, shift); \
+ } \
+ const Operator* MachineOperatorBuilder::I##format##ShrS(int32_t shift) { \
+ DCHECK(0 < shift && shift <= bits); \
+ return new (zone_) \
+ Operator1<int32_t>(IrOpcode::kI##format##ShrS, Operator::kPure, \
+ "Arithmetic shift right", 1, 0, 0, 1, 0, 0, shift); \
+ } \
+ const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \
+ DCHECK(0 <= shift && shift < bits); \
+ return new (zone_) \
+ Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \
+ "Shift right", 1, 0, 0, 1, 0, 0, shift); \
}
SIMD_FORMAT_LIST(SIMD_SHIFT_OPS)
#undef SIMD_SHIFT_OPS
// TODO(bbudge) Add Shuffle, DCHECKs based on format.
-#define SIMD_PERMUTE_OPS(format, bits) \
- const Operator* MachineOperatorBuilder::Simd##format##Swizzle( \
- uint32_t swizzle) { \
- return new (zone_) \
- Operator1<uint32_t>(IrOpcode::kSimd##format##Swizzle, Operator::kPure, \
- "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \
+#define SIMD_PERMUTE_OPS(format, bits) \
+ const Operator* MachineOperatorBuilder::S##format##Swizzle( \
+ uint32_t swizzle) { \
+ return new (zone_) \
+ Operator1<uint32_t>(IrOpcode::kS##format##Swizzle, Operator::kPure, \
+ "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \
}
SIMD_FORMAT_LIST(SIMD_PERMUTE_OPS)
#undef SIMD_PERMUTE_OPS
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698