| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ |
| 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ | 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/machine-type.h" | 9 #include "src/machine-type.h" |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 kFloat64RoundTiesAway = 1u << 12, | 106 kFloat64RoundTiesAway = 1u << 12, |
| 107 kInt32DivIsSafe = 1u << 13, | 107 kInt32DivIsSafe = 1u << 13, |
| 108 kUint32DivIsSafe = 1u << 14, | 108 kUint32DivIsSafe = 1u << 14, |
| 109 kWord32ShiftIsSafe = 1u << 15, | 109 kWord32ShiftIsSafe = 1u << 15, |
| 110 kWord32Ctz = 1u << 16, | 110 kWord32Ctz = 1u << 16, |
| 111 kWord64Ctz = 1u << 17, | 111 kWord64Ctz = 1u << 17, |
| 112 kWord32Popcnt = 1u << 18, | 112 kWord32Popcnt = 1u << 18, |
| 113 kWord64Popcnt = 1u << 19, | 113 kWord64Popcnt = 1u << 19, |
| 114 kWord32ReverseBits = 1u << 20, | 114 kWord32ReverseBits = 1u << 20, |
| 115 kWord64ReverseBits = 1u << 21, | 115 kWord64ReverseBits = 1u << 21, |
| 116 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | | 116 kFloat32Neg = 1u << 22, |
| 117 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | | 117 kFloat64Neg = 1u << 23, |
| 118 kFloat64RoundUp | kFloat32RoundTruncate | | 118 kAllOptionalOps = |
| 119 kFloat64RoundTruncate | kFloat64RoundTiesAway | | 119 kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | |
| 120 kFloat32RoundTiesEven | kFloat64RoundTiesEven | | 120 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | |
| 121 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | | 121 kFloat64RoundUp | kFloat32RoundTruncate | kFloat64RoundTruncate | |
| 122 kWord32ReverseBits | kWord64ReverseBits | 122 kFloat64RoundTiesAway | kFloat32RoundTiesEven | kFloat64RoundTiesEven | |
| 123 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | |
| 124 kWord32ReverseBits | kWord64ReverseBits | kFloat32Neg | kFloat64Neg |
| 123 }; | 125 }; |
| 124 typedef base::Flags<Flag, unsigned> Flags; | 126 typedef base::Flags<Flag, unsigned> Flags; |
| 125 | 127 |
| 126 class AlignmentRequirements { | 128 class AlignmentRequirements { |
| 127 public: | 129 public: |
| 128 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; | 130 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; |
| 129 | 131 |
| 130 bool IsUnalignedLoadSupported(const MachineType& machineType, | 132 bool IsUnalignedLoadSupported(const MachineType& machineType, |
| 131 uint8_t alignment) const { | 133 uint8_t alignment) const { |
| 132 return IsUnalignedSupported(unalignedLoadSupportedTypes_, machineType, | 134 return IsUnalignedSupported(unalignedLoadSupportedTypes_, machineType, |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 const OptionalOperator Float32RoundDown(); | 356 const OptionalOperator Float32RoundDown(); |
| 355 const OptionalOperator Float64RoundDown(); | 357 const OptionalOperator Float64RoundDown(); |
| 356 const OptionalOperator Float32RoundUp(); | 358 const OptionalOperator Float32RoundUp(); |
| 357 const OptionalOperator Float64RoundUp(); | 359 const OptionalOperator Float64RoundUp(); |
| 358 const OptionalOperator Float32RoundTruncate(); | 360 const OptionalOperator Float32RoundTruncate(); |
| 359 const OptionalOperator Float64RoundTruncate(); | 361 const OptionalOperator Float64RoundTruncate(); |
| 360 const OptionalOperator Float64RoundTiesAway(); | 362 const OptionalOperator Float64RoundTiesAway(); |
| 361 const OptionalOperator Float32RoundTiesEven(); | 363 const OptionalOperator Float32RoundTiesEven(); |
| 362 const OptionalOperator Float64RoundTiesEven(); | 364 const OptionalOperator Float64RoundTiesEven(); |
| 363 | 365 |
| 366 // Floating point neg. |
| 367 const OptionalOperator Float32Neg(); |
| 368 const OptionalOperator Float64Neg(); |
| 369 |
| 364 // Floating point bit representation. | 370 // Floating point bit representation. |
| 365 const Operator* Float64ExtractLowWord32(); | 371 const Operator* Float64ExtractLowWord32(); |
| 366 const Operator* Float64ExtractHighWord32(); | 372 const Operator* Float64ExtractHighWord32(); |
| 367 const Operator* Float64InsertLowWord32(); | 373 const Operator* Float64InsertLowWord32(); |
| 368 const Operator* Float64InsertHighWord32(); | 374 const Operator* Float64InsertHighWord32(); |
| 369 | 375 |
| 370 // SIMD operators. | 376 // SIMD operators. |
| 371 const Operator* CreateFloat32x4(); | 377 const Operator* CreateFloat32x4(); |
| 372 const Operator* Float32x4ExtractLane(); | 378 const Operator* Float32x4ExtractLane(); |
| 373 const Operator* Float32x4ReplaceLane(); | 379 const Operator* Float32x4ReplaceLane(); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 }; | 637 }; |
| 632 | 638 |
| 633 | 639 |
| 634 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 640 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 635 | 641 |
| 636 } // namespace compiler | 642 } // namespace compiler |
| 637 } // namespace internal | 643 } // namespace internal |
| 638 } // namespace v8 | 644 } // namespace v8 |
| 639 | 645 |
| 640 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 646 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |