| 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_MIPS) | 10 #if defined(TARGET_ARCH_MIPS) |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 } | 2021 } |
| 2022 pc_ += Instr::kInstrSize; | 2022 pc_ += Instr::kInstrSize; |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 | 2025 |
| 2026 void Simulator::ExecuteDelaySlot() { | 2026 void Simulator::ExecuteDelaySlot() { |
| 2027 ASSERT(pc_ != kEndSimulatingPC); | 2027 ASSERT(pc_ != kEndSimulatingPC); |
| 2028 delay_slot_ = true; | 2028 delay_slot_ = true; |
| 2029 icount_++; | 2029 icount_++; |
| 2030 Instr* instr = Instr::At(pc_ + Instr::kInstrSize); | 2030 Instr* instr = Instr::At(pc_ + Instr::kInstrSize); |
| 2031 if (icount_ == FLAG_stop_sim_at) { | 2031 if ((FLAG_stop_sim_at != 0) && (icount_ == FLAG_stop_sim_at)) { |
| 2032 SimulatorDebugger dbg(this); | 2032 SimulatorDebugger dbg(this); |
| 2033 dbg.Stop(instr, "Instruction count reached"); | 2033 dbg.Stop(instr, "Instruction count reached"); |
| 2034 } | 2034 } |
| 2035 InstructionDecode(instr); | 2035 InstructionDecode(instr); |
| 2036 delay_slot_ = false; | 2036 delay_slot_ = false; |
| 2037 } | 2037 } |
| 2038 | 2038 |
| 2039 | 2039 |
| 2040 void Simulator::Execute() { | 2040 void Simulator::Execute() { |
| 2041 if (FLAG_stop_sim_at == 0) { | 2041 if (FLAG_stop_sim_at == 0) { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2228 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 2229 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2229 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 2230 buf->Longjmp(); | 2230 buf->Longjmp(); |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 } // namespace dart | 2233 } // namespace dart |
| 2234 | 2234 |
| 2235 #endif // !defined(HOST_ARCH_MIPS) | 2235 #endif // !defined(HOST_ARCH_MIPS) |
| 2236 | 2236 |
| 2237 #endif // defined TARGET_ARCH_MIPS | 2237 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |