Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 818343002: Do not clobber dead temp registers at RestoreLiveRegisters as it may destroy the content of the res… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | tests/language/issue21957_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 ClobberDeadTempRegisters(locs); 1498 ClobberDeadTempRegisters(locs);
1499 #endif 1499 #endif
1500 1500
1501 // TODO(vegorov): avoid saving non-volatile registers. 1501 // TODO(vegorov): avoid saving non-volatile registers.
1502 __ PushRegisters(locs->live_registers()->cpu_registers(), 1502 __ PushRegisters(locs->live_registers()->cpu_registers(),
1503 locs->live_registers()->fpu_registers()); 1503 locs->live_registers()->fpu_registers());
1504 } 1504 }
1505 1505
1506 1506
1507 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { 1507 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
1508 #if defined(DEBUG)
1509 ClobberDeadTempRegisters(locs);
1510 #endif
1511 __ PopRegisters(locs->live_registers()->cpu_registers(), 1508 __ PopRegisters(locs->live_registers()->cpu_registers(),
1512 locs->live_registers()->fpu_registers()); 1509 locs->live_registers()->fpu_registers());
1513 } 1510 }
1514 1511
1515 1512
1516 #if defined(DEBUG) 1513 #if defined(DEBUG)
1517 void FlowGraphCompiler::ClobberDeadTempRegisters(LocationSummary* locs) { 1514 void FlowGraphCompiler::ClobberDeadTempRegisters(LocationSummary* locs) {
1518 // Clobber temporaries that have not been manually preserved. 1515 // Clobber temporaries that have not been manually preserved.
1519 for (intptr_t i = 0; i < locs->temp_count(); ++i) { 1516 for (intptr_t i = 0; i < locs->temp_count(); ++i) {
1520 Location tmp = locs->temp(i); 1517 Location tmp = locs->temp(i);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 __ movups(reg, Address(RSP, 0)); 1806 __ movups(reg, Address(RSP, 0));
1810 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1807 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1811 } 1808 }
1812 1809
1813 1810
1814 #undef __ 1811 #undef __
1815 1812
1816 } // namespace dart 1813 } // namespace dart
1817 1814
1818 #endif // defined TARGET_ARCH_X64 1815 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | tests/language/issue21957_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698