| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 <math.h> // for isnan. | 5 #include <math.h> // for isnan. |
| 6 #include <setjmp.h> | 6 #include <setjmp.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #if defined(TARGET_ARCH_ARM) | 10 #if defined(TARGET_ARCH_ARM) |
| (...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 ud_val = INT_MAX; | 2820 ud_val = INT_MAX; |
| 2821 } else if (dm_val > 0.0) { | 2821 } else if (dm_val > 0.0) { |
| 2822 ud_val = static_cast<uint32_t>(dm_val); | 2822 ud_val = static_cast<uint32_t>(dm_val); |
| 2823 } | 2823 } |
| 2824 } else { | 2824 } else { |
| 2825 // Format(instr, "vcvtid'cond 'sd, 'dm"); | 2825 // Format(instr, "vcvtid'cond 'sd, 'dm"); |
| 2826 if (dm_val <= INT_MIN) { | 2826 if (dm_val <= INT_MIN) { |
| 2827 id_val = INT_MIN; | 2827 id_val = INT_MIN; |
| 2828 } else if (dm_val >= INT_MAX) { | 2828 } else if (dm_val >= INT_MAX) { |
| 2829 id_val = INT_MAX; | 2829 id_val = INT_MAX; |
| 2830 } else if (isnan(dm_val)) { |
| 2831 id_val = 0; |
| 2830 } else { | 2832 } else { |
| 2831 id_val = static_cast<int32_t>(dm_val); | 2833 id_val = static_cast<int32_t>(dm_val); |
| 2832 } | 2834 } |
| 2833 ASSERT((id_val >= 0) || !(dm_val >= 0.0)); | 2835 ASSERT((id_val >= 0) || !(dm_val >= 0.0)); |
| 2834 } | 2836 } |
| 2835 } | 2837 } |
| 2836 int32_t sd_val; | 2838 int32_t sd_val; |
| 2837 if (instr->Bit(16) == 0) { | 2839 if (instr->Bit(16) == 0) { |
| 2838 sd_val = static_cast<int32_t>(ud_val); | 2840 sd_val = static_cast<int32_t>(ud_val); |
| 2839 } else { | 2841 } else { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3116 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3118 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 3117 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3119 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 3118 buf->Longjmp(); | 3120 buf->Longjmp(); |
| 3119 } | 3121 } |
| 3120 | 3122 |
| 3121 } // namespace dart | 3123 } // namespace dart |
| 3122 | 3124 |
| 3123 #endif // !defined(HOST_ARCH_ARM) | 3125 #endif // !defined(HOST_ARCH_ARM) |
| 3124 | 3126 |
| 3125 #endif // defined TARGET_ARCH_ARM | 3127 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |