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 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_ARM64 | 10 #if V8_TARGET_ARCH_ARM64 |
11 | 11 |
12 #include "src/arm64/decoder-arm64-inl.h" | 12 #include "src/arm64/decoder-arm64-inl.h" |
13 #include "src/arm64/simulator-arm64.h" | 13 #include "src/arm64/simulator-arm64.h" |
14 #include "src/assembler.h" | 14 #include "src/assembler.h" |
| 15 #include "src/codegen.h" |
15 #include "src/disasm.h" | 16 #include "src/disasm.h" |
16 #include "src/macro-assembler.h" | 17 #include "src/macro-assembler.h" |
17 #include "src/ostreams.h" | 18 #include "src/ostreams.h" |
18 | 19 |
19 namespace v8 { | 20 namespace v8 { |
20 namespace internal { | 21 namespace internal { |
21 | 22 |
22 #if defined(USE_SIMULATOR) | 23 #if defined(USE_SIMULATOR) |
23 | 24 |
24 | 25 |
(...skipping 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3093 } | 3094 } |
3094 | 3095 |
3095 | 3096 |
3096 template <typename T> | 3097 template <typename T> |
3097 T Simulator::FPSqrt(T op) { | 3098 T Simulator::FPSqrt(T op) { |
3098 if (std::isnan(op)) { | 3099 if (std::isnan(op)) { |
3099 return FPProcessNaN(op); | 3100 return FPProcessNaN(op); |
3100 } else if (op < 0.0) { | 3101 } else if (op < 0.0) { |
3101 return FPDefaultNaN<T>(); | 3102 return FPDefaultNaN<T>(); |
3102 } else { | 3103 } else { |
3103 return std::sqrt(op); | 3104 return fast_sqrt(op); |
3104 } | 3105 } |
3105 } | 3106 } |
3106 | 3107 |
3107 | 3108 |
3108 template <typename T> | 3109 template <typename T> |
3109 T Simulator::FPSub(T op1, T op2) { | 3110 T Simulator::FPSub(T op1, T op2) { |
3110 // NaNs should be handled elsewhere. | 3111 // NaNs should be handled elsewhere. |
3111 DCHECK(!std::isnan(op1) && !std::isnan(op2)); | 3112 DCHECK(!std::isnan(op1) && !std::isnan(op2)); |
3112 | 3113 |
3113 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) { | 3114 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) { |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3830 | 3831 |
3831 delete[] format; | 3832 delete[] format; |
3832 } | 3833 } |
3833 | 3834 |
3834 | 3835 |
3835 #endif // USE_SIMULATOR | 3836 #endif // USE_SIMULATOR |
3836 | 3837 |
3837 } } // namespace v8::internal | 3838 } } // namespace v8::internal |
3838 | 3839 |
3839 #endif // V8_TARGET_ARCH_ARM64 | 3840 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |