| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
| 10 | 10 |
| (...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2222 | 2222 |
| 2223 { | 2223 { |
| 2224 BYTECODE(FloatToDouble, A_D); | 2224 BYTECODE(FloatToDouble, A_D); |
| 2225 const float valuef = *reinterpret_cast<float*>(&FP[rD]); | 2225 const float valuef = *reinterpret_cast<float*>(&FP[rD]); |
| 2226 const double value = static_cast<double>(valuef); | 2226 const double value = static_cast<double>(valuef); |
| 2227 FP[rA] = bit_cast<RawObject*, double>(value); | 2227 FP[rA] = bit_cast<RawObject*, double>(value); |
| 2228 DISPATCH(); | 2228 DISPATCH(); |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 { | 2231 { |
| 2232 BYTECODE(DoubleIsNaN, A_D); | 2232 BYTECODE(DoubleIsNaN, A); |
| 2233 const double v = bit_cast<double, RawObject*>(FP[rD]); | 2233 const double v = bit_cast<double, RawObject*>(FP[rA]); |
| 2234 FP[rA] = isnan(v) ? true_value : false_value; | 2234 if (!isnan(v)) { |
| 2235 pc++; |
| 2236 } |
| 2235 DISPATCH(); | 2237 DISPATCH(); |
| 2236 } | 2238 } |
| 2237 | 2239 |
| 2238 { | 2240 { |
| 2239 BYTECODE(DoubleIsInfinite, A_D); | 2241 BYTECODE(DoubleIsInfinite, A); |
| 2240 const double v = bit_cast<double, RawObject*>(FP[rD]); | 2242 const double v = bit_cast<double, RawObject*>(FP[rA]); |
| 2241 FP[rA] = isinf(v) ? true_value : false_value; | 2243 if (!isinf(v)) { |
| 2244 pc++; |
| 2245 } |
| 2242 DISPATCH(); | 2246 DISPATCH(); |
| 2243 } | 2247 } |
| 2244 | 2248 |
| 2245 { | 2249 { |
| 2246 BYTECODE(LoadIndexedFloat32, A_B_C); | 2250 BYTECODE(LoadIndexedFloat32, A_B_C); |
| 2247 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]); | 2251 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]); |
| 2248 const uint32_t value = *reinterpret_cast<uint32_t*>(data); | 2252 const uint32_t value = *reinterpret_cast<uint32_t*>(data); |
| 2249 const uint64_t value64 = value; | 2253 const uint64_t value64 = value; |
| 2250 FP[rA] = reinterpret_cast<RawObject*>(value64); | 2254 FP[rA] = reinterpret_cast<RawObject*>(value64); |
| 2251 DISPATCH(); | 2255 DISPATCH(); |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3738 pc_ = pc; | 3742 pc_ = pc; |
| 3739 special_[kExceptionSpecialIndex] = raw_exception; | 3743 special_[kExceptionSpecialIndex] = raw_exception; |
| 3740 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3744 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
| 3741 buf->Longjmp(); | 3745 buf->Longjmp(); |
| 3742 UNREACHABLE(); | 3746 UNREACHABLE(); |
| 3743 } | 3747 } |
| 3744 | 3748 |
| 3745 } // namespace dart | 3749 } // namespace dart |
| 3746 | 3750 |
| 3747 #endif // defined TARGET_ARCH_DBC | 3751 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |