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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 kFloat64RoundTiesAway = 1u << 12, | 121 kFloat64RoundTiesAway = 1u << 12, |
122 kInt32DivIsSafe = 1u << 13, | 122 kInt32DivIsSafe = 1u << 13, |
123 kUint32DivIsSafe = 1u << 14, | 123 kUint32DivIsSafe = 1u << 14, |
124 kWord32ShiftIsSafe = 1u << 15, | 124 kWord32ShiftIsSafe = 1u << 15, |
125 kWord32Ctz = 1u << 16, | 125 kWord32Ctz = 1u << 16, |
126 kWord64Ctz = 1u << 17, | 126 kWord64Ctz = 1u << 17, |
127 kWord32Popcnt = 1u << 18, | 127 kWord32Popcnt = 1u << 18, |
128 kWord64Popcnt = 1u << 19, | 128 kWord64Popcnt = 1u << 19, |
129 kWord32ReverseBits = 1u << 20, | 129 kWord32ReverseBits = 1u << 20, |
130 kWord64ReverseBits = 1u << 21, | 130 kWord64ReverseBits = 1u << 21, |
131 kFloat32Neg = 1u << 22, | 131 kWord32ReverseBytes = 1u << 22, |
132 kFloat64Neg = 1u << 23, | 132 kWord64ReverseBytes = 1u << 23, |
133 kWord32ReverseBytes = 1u << 24, | |
134 kWord64ReverseBytes = 1u << 25, | |
135 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | | 133 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | |
136 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | | 134 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | |
137 kFloat64RoundUp | kFloat32RoundTruncate | | 135 kFloat64RoundUp | kFloat32RoundTruncate | |
138 kFloat64RoundTruncate | kFloat64RoundTiesAway | | 136 kFloat64RoundTruncate | kFloat64RoundTiesAway | |
139 kFloat32RoundTiesEven | kFloat64RoundTiesEven | | 137 kFloat32RoundTiesEven | kFloat64RoundTiesEven | |
140 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | | 138 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | |
141 kWord32ReverseBits | kWord64ReverseBits | kFloat32Neg | | 139 kWord32ReverseBits | kWord64ReverseBits | |
142 kFloat64Neg | kWord32ReverseBytes | kWord64ReverseBytes | 140 kWord32ReverseBytes | kWord64ReverseBytes |
143 }; | 141 }; |
144 typedef base::Flags<Flag, unsigned> Flags; | 142 typedef base::Flags<Flag, unsigned> Flags; |
145 | 143 |
146 class AlignmentRequirements { | 144 class AlignmentRequirements { |
147 public: | 145 public: |
148 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; | 146 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; |
149 | 147 |
150 bool IsUnalignedLoadSupported(const MachineType& machineType, | 148 bool IsUnalignedLoadSupported(const MachineType& machineType, |
151 uint8_t alignment) const { | 149 uint8_t alignment) const { |
152 return IsUnalignedSupported(unalignedLoadUnsupportedTypes_, machineType, | 150 return IsUnalignedSupported(unalignedLoadUnsupportedTypes_, machineType, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 const OptionalOperator Float64RoundDown(); | 382 const OptionalOperator Float64RoundDown(); |
385 const OptionalOperator Float32RoundUp(); | 383 const OptionalOperator Float32RoundUp(); |
386 const OptionalOperator Float64RoundUp(); | 384 const OptionalOperator Float64RoundUp(); |
387 const OptionalOperator Float32RoundTruncate(); | 385 const OptionalOperator Float32RoundTruncate(); |
388 const OptionalOperator Float64RoundTruncate(); | 386 const OptionalOperator Float64RoundTruncate(); |
389 const OptionalOperator Float64RoundTiesAway(); | 387 const OptionalOperator Float64RoundTiesAway(); |
390 const OptionalOperator Float32RoundTiesEven(); | 388 const OptionalOperator Float32RoundTiesEven(); |
391 const OptionalOperator Float64RoundTiesEven(); | 389 const OptionalOperator Float64RoundTiesEven(); |
392 | 390 |
393 // Floating point neg. | 391 // Floating point neg. |
394 const OptionalOperator Float32Neg(); | 392 const Operator* Float32Neg(); |
395 const OptionalOperator Float64Neg(); | 393 const Operator* Float64Neg(); |
396 | 394 |
397 // Floating point trigonometric functions (double-precision). | 395 // Floating point trigonometric functions (double-precision). |
398 const Operator* Float64Acos(); | 396 const Operator* Float64Acos(); |
399 const Operator* Float64Acosh(); | 397 const Operator* Float64Acosh(); |
400 const Operator* Float64Asin(); | 398 const Operator* Float64Asin(); |
401 const Operator* Float64Asinh(); | 399 const Operator* Float64Asinh(); |
402 const Operator* Float64Atan(); | 400 const Operator* Float64Atan(); |
403 const Operator* Float64Atan2(); | 401 const Operator* Float64Atan2(); |
404 const Operator* Float64Atanh(); | 402 const Operator* Float64Atanh(); |
405 const Operator* Float64Cos(); | 403 const Operator* Float64Cos(); |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 }; | 702 }; |
705 | 703 |
706 | 704 |
707 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 705 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
708 | 706 |
709 } // namespace compiler | 707 } // namespace compiler |
710 } // namespace internal | 708 } // namespace internal |
711 } // namespace v8 | 709 } // namespace v8 |
712 | 710 |
713 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 711 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |