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)) pc++; |
zra
2016/10/31 17:28:15
Please use {}
Florian Schneider
2016/10/31 18:48:17
Done.
| |
2235 DISPATCH(); | 2235 DISPATCH(); |
2236 } | 2236 } |
2237 | 2237 |
2238 { | 2238 { |
2239 BYTECODE(DoubleIsInfinite, A_D); | 2239 BYTECODE(DoubleIsInfinite, A); |
2240 const double v = bit_cast<double, RawObject*>(FP[rD]); | 2240 const double v = bit_cast<double, RawObject*>(FP[rA]); |
2241 FP[rA] = isinf(v) ? true_value : false_value; | 2241 if (!isinf(v)) pc++; |
zra
2016/10/31 17:28:15
ditto
Florian Schneider
2016/10/31 18:48:17
Done.
| |
2242 DISPATCH(); | 2242 DISPATCH(); |
2243 } | 2243 } |
2244 | 2244 |
2245 { | 2245 { |
2246 BYTECODE(LoadIndexedFloat32, A_B_C); | 2246 BYTECODE(LoadIndexedFloat32, A_B_C); |
2247 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]); | 2247 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]); |
2248 const uint32_t value = *reinterpret_cast<uint32_t*>(data); | 2248 const uint32_t value = *reinterpret_cast<uint32_t*>(data); |
2249 const uint64_t value64 = value; | 2249 const uint64_t value64 = value; |
2250 FP[rA] = reinterpret_cast<RawObject*>(value64); | 2250 FP[rA] = reinterpret_cast<RawObject*>(value64); |
2251 DISPATCH(); | 2251 DISPATCH(); |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3738 pc_ = pc; | 3738 pc_ = pc; |
3739 special_[kExceptionSpecialIndex] = raw_exception; | 3739 special_[kExceptionSpecialIndex] = raw_exception; |
3740 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3740 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
3741 buf->Longjmp(); | 3741 buf->Longjmp(); |
3742 UNREACHABLE(); | 3742 UNREACHABLE(); |
3743 } | 3743 } |
3744 | 3744 |
3745 } // namespace dart | 3745 } // namespace dart |
3746 | 3746 |
3747 #endif // defined TARGET_ARCH_DBC | 3747 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |