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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <cstdarg> | 7 #include <cstdarg> |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM64 | 9 #if V8_TARGET_ARCH_ARM64 |
10 | 10 |
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3098 } | 3098 } |
3099 | 3099 |
3100 | 3100 |
3101 template <typename T> | 3101 template <typename T> |
3102 T Simulator::FPSqrt(T op) { | 3102 T Simulator::FPSqrt(T op) { |
3103 if (std::isnan(op)) { | 3103 if (std::isnan(op)) { |
3104 return FPProcessNaN(op); | 3104 return FPProcessNaN(op); |
3105 } else if (op < 0.0) { | 3105 } else if (op < 0.0) { |
3106 return FPDefaultNaN<T>(); | 3106 return FPDefaultNaN<T>(); |
3107 } else { | 3107 } else { |
3108 return fast_sqrt(op); | 3108 lazily_initialize_fast_sqrt(isolate_); |
| 3109 return fast_sqrt(op, isolate_); |
3109 } | 3110 } |
3110 } | 3111 } |
3111 | 3112 |
3112 | 3113 |
3113 template <typename T> | 3114 template <typename T> |
3114 T Simulator::FPSub(T op1, T op2) { | 3115 T Simulator::FPSub(T op1, T op2) { |
3115 // NaNs should be handled elsewhere. | 3116 // NaNs should be handled elsewhere. |
3116 DCHECK(!std::isnan(op1) && !std::isnan(op2)); | 3117 DCHECK(!std::isnan(op1) && !std::isnan(op2)); |
3117 | 3118 |
3118 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) { | 3119 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) { |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3836 delete[] format; | 3837 delete[] format; |
3837 } | 3838 } |
3838 | 3839 |
3839 | 3840 |
3840 #endif // USE_SIMULATOR | 3841 #endif // USE_SIMULATOR |
3841 | 3842 |
3842 } // namespace internal | 3843 } // namespace internal |
3843 } // namespace v8 | 3844 } // namespace v8 |
3844 | 3845 |
3845 #endif // V8_TARGET_ARCH_ARM64 | 3846 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |