| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx); | 1463 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx); |
| 1464 if (locs->live_registers()->ContainsFpuRegister(xmm_reg)) { | 1464 if (locs->live_registers()->ContainsFpuRegister(xmm_reg)) { |
| 1465 __ movups(Address(ESP, offset), xmm_reg); | 1465 __ movups(Address(ESP, offset), xmm_reg); |
| 1466 offset += kFpuRegisterSize; | 1466 offset += kFpuRegisterSize; |
| 1467 } | 1467 } |
| 1468 } | 1468 } |
| 1469 ASSERT(offset == (xmm_regs_count * kFpuRegisterSize)); | 1469 ASSERT(offset == (xmm_regs_count * kFpuRegisterSize)); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 // Store general purpose registers with the highest register number at the | 1472 // Store general purpose registers with the highest register number at the |
| 1473 // lowest address. | 1473 // lowest address. The order in which the registers are pushed must match the |
| 1474 // order in which the registers are encoded in the safe point's stack map. |
| 1474 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) { | 1475 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) { |
| 1475 Register reg = static_cast<Register>(reg_idx); | 1476 Register reg = static_cast<Register>(reg_idx); |
| 1476 if (locs->live_registers()->ContainsRegister(reg)) { | 1477 if (locs->live_registers()->ContainsRegister(reg)) { |
| 1477 __ pushl(reg); | 1478 __ pushl(reg); |
| 1478 } | 1479 } |
| 1479 } | 1480 } |
| 1480 } | 1481 } |
| 1481 | 1482 |
| 1482 | 1483 |
| 1483 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { | 1484 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 __ movups(reg, Address(ESP, 0)); | 1818 __ movups(reg, Address(ESP, 0)); |
| 1818 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1819 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1819 } | 1820 } |
| 1820 | 1821 |
| 1821 | 1822 |
| 1822 #undef __ | 1823 #undef __ |
| 1823 | 1824 |
| 1824 } // namespace dart | 1825 } // namespace dart |
| 1825 | 1826 |
| 1826 #endif // defined TARGET_ARCH_IA32 | 1827 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |