OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2492 protected: | 2492 protected: |
2493 bool DataEquals(HValue* other) override { | 2493 bool DataEquals(HValue* other) override { |
2494 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); | 2494 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); |
2495 return op_ == b->op(); | 2495 return op_ == b->op(); |
2496 } | 2496 } |
2497 | 2497 |
2498 private: | 2498 private: |
2499 // Indicates if we support a double (and int32) output for Math.floor and | 2499 // Indicates if we support a double (and int32) output for Math.floor and |
2500 // Math.round. | 2500 // Math.round. |
2501 bool SupportsFlexibleFloorAndRound() const { | 2501 bool SupportsFlexibleFloorAndRound() const { |
2502 #ifdef V8_TARGET_ARCH_ARM64 | 2502 #if V8_TARGET_ARCH_ARM64 |
2503 // TODO(rmcilroy): Re-enable this for Arm64 once http://crbug.com/476477 is | 2503 return true; |
2504 // fixed. | 2504 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
2505 return false; | 2505 return CpuFeatures::IsSupported(SSE4_1); |
2506 #else | 2506 #else |
2507 return false; | 2507 return false; |
2508 #endif | 2508 #endif |
2509 } | 2509 } |
2510 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) | 2510 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) |
2511 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) { | 2511 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) { |
2512 SetOperandAt(0, context); | 2512 SetOperandAt(0, context); |
2513 SetOperandAt(1, value); | 2513 SetOperandAt(1, value); |
2514 switch (op) { | 2514 switch (op) { |
2515 case kMathFloor: | 2515 case kMathFloor: |
(...skipping 4749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7265 | 7265 |
7266 | 7266 |
7267 | 7267 |
7268 #undef DECLARE_INSTRUCTION | 7268 #undef DECLARE_INSTRUCTION |
7269 #undef DECLARE_CONCRETE_INSTRUCTION | 7269 #undef DECLARE_CONCRETE_INSTRUCTION |
7270 | 7270 |
7271 } // namespace internal | 7271 } // namespace internal |
7272 } // namespace v8 | 7272 } // namespace v8 |
7273 | 7273 |
7274 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7274 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |