| 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 "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 // Only build the simulator if not compiling for real MIPS hardware. | 8 // Only build the simulator if not compiling for real MIPS hardware. |
| 9 #if !defined(HOST_ARCH_MIPS) | 9 #if !defined(HOST_ARCH_MIPS) |
| 10 | 10 |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 } | 704 } |
| 705 case AND: { | 705 case AND: { |
| 706 ASSERT(instr->SaField() == 0); | 706 ASSERT(instr->SaField() == 0); |
| 707 // Format(instr, "and 'rd, 'rs, 'rt"); | 707 // Format(instr, "and 'rd, 'rs, 'rt"); |
| 708 int32_t rs_val = get_register(instr->RsField()); | 708 int32_t rs_val = get_register(instr->RsField()); |
| 709 int32_t rt_val = get_register(instr->RtField()); | 709 int32_t rt_val = get_register(instr->RtField()); |
| 710 set_register(instr->RdField(), rs_val & rt_val); | 710 set_register(instr->RdField(), rs_val & rt_val); |
| 711 break; | 711 break; |
| 712 } | 712 } |
| 713 case BREAK: { | 713 case BREAK: { |
| 714 SimulatorDebugger dbg(this); | 714 if (instr->BreakCodeField() == Instr::kStopMessageCode) { |
| 715 dbg.Stop(instr, "breakpoint"); | 715 SimulatorDebugger dbg(this); |
| 716 const char* message = *reinterpret_cast<const char**>( |
| 717 reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize); |
| 718 set_pc(get_pc() + Instr::kInstrSize); |
| 719 dbg.Stop(instr, message); |
| 720 } else { |
| 721 SimulatorDebugger dbg(this); |
| 722 dbg.Stop(instr, "breakpoint"); |
| 723 } |
| 716 break; | 724 break; |
| 717 } | 725 } |
| 718 case DIV: { | 726 case DIV: { |
| 719 ASSERT(instr->RdField() == 0); | 727 ASSERT(instr->RdField() == 0); |
| 720 ASSERT(instr->SaField() == 0); | 728 ASSERT(instr->SaField() == 0); |
| 721 // Format(instr, "div 'rs, 'rt"); | 729 // Format(instr, "div 'rs, 'rt"); |
| 722 int32_t rs_val = get_register(instr->RsField()); | 730 int32_t rs_val = get_register(instr->RsField()); |
| 723 int32_t rt_val = get_register(instr->RtField()); | 731 int32_t rt_val = get_register(instr->RtField()); |
| 724 if (rt_val == 0) { | 732 if (rt_val == 0) { |
| 725 // Results are unpredictable. | 733 // Results are unpredictable. |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 // Restore the SP register and return R1:R0. | 1395 // Restore the SP register and return R1:R0. |
| 1388 set_register(SP, sp_before_call); | 1396 set_register(SP, sp_before_call); |
| 1389 return Utils::LowHighTo64Bits(get_register(V0), get_register(V1)); | 1397 return Utils::LowHighTo64Bits(get_register(V0), get_register(V1)); |
| 1390 } | 1398 } |
| 1391 | 1399 |
| 1392 } // namespace dart | 1400 } // namespace dart |
| 1393 | 1401 |
| 1394 #endif // !defined(HOST_ARCH_MIPS) | 1402 #endif // !defined(HOST_ARCH_MIPS) |
| 1395 | 1403 |
| 1396 #endif // defined TARGET_ARCH_MIPS | 1404 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |