| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 __ Pop(left); | 1392 __ Pop(left); |
| 1393 } else { | 1393 } else { |
| 1394 __ cmp(left, Operand(right)); | 1394 __ cmp(left, Operand(right)); |
| 1395 } | 1395 } |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 | 1398 |
| 1399 // This function must be in sync with FlowGraphCompiler::RecordSafepoint and | 1399 // This function must be in sync with FlowGraphCompiler::RecordSafepoint and |
| 1400 // FlowGraphCompiler::SlowPathEnvironmentFor. | 1400 // FlowGraphCompiler::SlowPathEnvironmentFor. |
| 1401 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { | 1401 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { |
| 1402 #if defined(DEBUG) |
| 1403 locs->CheckWritableInputs(); |
| 1404 #endif |
| 1405 |
| 1402 // TODO(vegorov): consider saving only caller save (volatile) registers. | 1406 // TODO(vegorov): consider saving only caller save (volatile) registers. |
| 1403 const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount(); | 1407 const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount(); |
| 1404 if (fpu_regs_count > 0) { | 1408 if (fpu_regs_count > 0) { |
| 1405 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize)); | 1409 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize)); |
| 1406 // Store fpu registers with the lowest register number at the lowest | 1410 // Store fpu registers with the lowest register number at the lowest |
| 1407 // address. | 1411 // address. |
| 1408 intptr_t offset = 0; | 1412 intptr_t offset = 0; |
| 1409 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) { | 1413 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) { |
| 1410 QRegister fpu_reg = static_cast<QRegister>(reg_idx); | 1414 QRegister fpu_reg = static_cast<QRegister>(reg_idx); |
| 1411 if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) { | 1415 if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1780 DRegister dreg = EvenDRegisterOf(reg); | 1784 DRegister dreg = EvenDRegisterOf(reg); |
| 1781 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1785 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1782 } | 1786 } |
| 1783 | 1787 |
| 1784 | 1788 |
| 1785 #undef __ | 1789 #undef __ |
| 1786 | 1790 |
| 1787 } // namespace dart | 1791 } // namespace dart |
| 1788 | 1792 |
| 1789 #endif // defined TARGET_ARCH_ARM | 1793 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |