| 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 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2819 (instr->Bits(12, 4) == 0xf)) { | 2819 (instr->Bits(12, 4) == 0xf)) { |
| 2820 // Format(instr, "vmstat'cond"); | 2820 // Format(instr, "vmstat'cond"); |
| 2821 n_flag_ = fp_n_flag_; | 2821 n_flag_ = fp_n_flag_; |
| 2822 z_flag_ = fp_z_flag_; | 2822 z_flag_ = fp_z_flag_; |
| 2823 c_flag_ = fp_c_flag_; | 2823 c_flag_ = fp_c_flag_; |
| 2824 v_flag_ = fp_v_flag_; | 2824 v_flag_ = fp_v_flag_; |
| 2825 } else { | 2825 } else { |
| 2826 UnimplementedInstruction(instr); | 2826 UnimplementedInstruction(instr); |
| 2827 } | 2827 } |
| 2828 } | 2828 } |
| 2829 } else if (instr->IsMrcIdIsar0()) { | |
| 2830 // mrc of ID_ISAR0. | |
| 2831 Register rd = instr->RdField(); | |
| 2832 if (CPUFeatures::integer_division_supported()) { | |
| 2833 set_register(rd, 0x02100010); // sim has sdiv, udiv, bkpt and clz. | |
| 2834 } else { | |
| 2835 set_register(rd, 0x00100010); // simulator has only bkpt and clz. | |
| 2836 } | |
| 2837 } else { | 2829 } else { |
| 2838 UnimplementedInstruction(instr); | 2830 UnimplementedInstruction(instr); |
| 2839 } | 2831 } |
| 2840 } | 2832 } |
| 2841 | 2833 |
| 2842 | 2834 |
| 2843 // Executes the current instruction. | 2835 // Executes the current instruction. |
| 2844 void Simulator::InstructionDecode(Instr* instr) { | 2836 void Simulator::InstructionDecode(Instr* instr) { |
| 2845 pc_modified_ = false; | 2837 pc_modified_ = false; |
| 2846 if (FLAG_trace_sim) { | 2838 if (FLAG_trace_sim) { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3056 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3048 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 3057 } | 3049 } |
| 3058 buf->Longjmp(); | 3050 buf->Longjmp(); |
| 3059 } | 3051 } |
| 3060 | 3052 |
| 3061 } // namespace dart | 3053 } // namespace dart |
| 3062 | 3054 |
| 3063 #endif // !defined(HOST_ARCH_ARM) | 3055 #endif // !defined(HOST_ARCH_ARM) |
| 3064 | 3056 |
| 3065 #endif // defined TARGET_ARCH_ARM | 3057 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |