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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) { | 1479 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) { |
1480 Register reg = static_cast<Register>(reg_idx); | 1480 Register reg = static_cast<Register>(reg_idx); |
1481 if (locs->live_registers()->ContainsRegister(reg)) { | 1481 if (locs->live_registers()->ContainsRegister(reg)) { |
1482 __ pushl(reg); | 1482 __ pushl(reg); |
1483 } | 1483 } |
1484 } | 1484 } |
1485 } | 1485 } |
1486 | 1486 |
1487 | 1487 |
1488 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { | 1488 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { |
1489 #if defined(DEBUG) | |
1490 ClobberDeadTempRegisters(locs); | |
1491 #endif | |
1492 | |
1493 // General purpose registers have the highest register number at the | 1489 // General purpose registers have the highest register number at the |
1494 // lowest address. | 1490 // lowest address. |
1495 for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) { | 1491 for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) { |
1496 Register reg = static_cast<Register>(reg_idx); | 1492 Register reg = static_cast<Register>(reg_idx); |
1497 if (locs->live_registers()->ContainsRegister(reg)) { | 1493 if (locs->live_registers()->ContainsRegister(reg)) { |
1498 __ popl(reg); | 1494 __ popl(reg); |
1499 } | 1495 } |
1500 } | 1496 } |
1501 | 1497 |
1502 const intptr_t xmm_regs_count = locs->live_registers()->FpuRegisterCount(); | 1498 const intptr_t xmm_regs_count = locs->live_registers()->FpuRegisterCount(); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 __ movups(reg, Address(ESP, 0)); | 1837 __ movups(reg, Address(ESP, 0)); |
1842 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1838 __ addl(ESP, Immediate(kFpuRegisterSize)); |
1843 } | 1839 } |
1844 | 1840 |
1845 | 1841 |
1846 #undef __ | 1842 #undef __ |
1847 | 1843 |
1848 } // namespace dart | 1844 } // namespace dart |
1849 | 1845 |
1850 #endif // defined TARGET_ARCH_IA32 | 1846 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |