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 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 protected: | 2491 protected: |
2492 bool DataEquals(HValue* other) override { | 2492 bool DataEquals(HValue* other) override { |
2493 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); | 2493 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); |
2494 return op_ == b->op(); | 2494 return op_ == b->op(); |
2495 } | 2495 } |
2496 | 2496 |
2497 private: | 2497 private: |
2498 // Indicates if we support a double (and int32) output for Math.floor and | 2498 // Indicates if we support a double (and int32) output for Math.floor and |
2499 // Math.round. | 2499 // Math.round. |
2500 bool SupportsFlexibleFloorAndRound() const { | 2500 bool SupportsFlexibleFloorAndRound() const { |
2501 #if V8_TARGET_ARCH_ARM64 | 2501 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC |
2502 return true; | 2502 return true; |
2503 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 | 2503 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
2504 return CpuFeatures::IsSupported(SSE4_1); | 2504 return CpuFeatures::IsSupported(SSE4_1); |
2505 #else | 2505 #else |
2506 return false; | 2506 return false; |
2507 #endif | 2507 #endif |
2508 } | 2508 } |
2509 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) | 2509 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) |
2510 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) { | 2510 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) { |
2511 SetOperandAt(0, context); | 2511 SetOperandAt(0, context); |
(...skipping 4730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7242 bool IsDeletable() const override { return true; } | 7242 bool IsDeletable() const override { return true; } |
7243 }; | 7243 }; |
7244 | 7244 |
7245 #undef DECLARE_INSTRUCTION | 7245 #undef DECLARE_INSTRUCTION |
7246 #undef DECLARE_CONCRETE_INSTRUCTION | 7246 #undef DECLARE_CONCRETE_INSTRUCTION |
7247 | 7247 |
7248 } // namespace internal | 7248 } // namespace internal |
7249 } // namespace v8 | 7249 } // namespace v8 |
7250 | 7250 |
7251 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7251 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |