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" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 offset -= kWordSize; | 1513 offset -= kWordSize; |
1514 __ sw(r, Address(SP, offset)); | 1514 __ sw(r, Address(SP, offset)); |
1515 } | 1515 } |
1516 } | 1516 } |
1517 ASSERT(offset == 0); | 1517 ASSERT(offset == 0); |
1518 } | 1518 } |
1519 } | 1519 } |
1520 | 1520 |
1521 | 1521 |
1522 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { | 1522 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { |
1523 #if defined(DEBUG) | |
1524 ClobberDeadTempRegisters(locs); | |
1525 #endif | |
1526 // General purpose registers have the highest register number at the | 1523 // General purpose registers have the highest register number at the |
1527 // lowest address. | 1524 // lowest address. |
1528 __ TraceSimMsg("RestoreLiveRegisters"); | 1525 __ TraceSimMsg("RestoreLiveRegisters"); |
1529 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); | 1526 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); |
1530 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); | 1527 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); |
1531 const int register_count = Utils::CountOneBits(cpu_registers); | 1528 const int register_count = Utils::CountOneBits(cpu_registers); |
1532 if (register_count > 0) { | 1529 if (register_count > 0) { |
1533 intptr_t offset = register_count * kWordSize; | 1530 intptr_t offset = register_count * kWordSize; |
1534 for (int i = 0; i < kNumberOfCpuRegisters; i++) { | 1531 for (int i = 0; i < kNumberOfCpuRegisters; i++) { |
1535 Register r = static_cast<Register>(i); | 1532 Register r = static_cast<Register>(i); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 __ AddImmediate(SP, kDoubleSize); | 1860 __ AddImmediate(SP, kDoubleSize); |
1864 } | 1861 } |
1865 | 1862 |
1866 | 1863 |
1867 #undef __ | 1864 #undef __ |
1868 | 1865 |
1869 | 1866 |
1870 } // namespace dart | 1867 } // namespace dart |
1871 | 1868 |
1872 #endif // defined TARGET_ARCH_MIPS | 1869 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |