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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.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 | « no previous file | runtime/vm/flow_graph_compiler_arm64.cc » ('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_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 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) { 1487 for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
1488 Register reg = static_cast<Register>(reg_idx); 1488 Register reg = static_cast<Register>(reg_idx);
1489 if (locs->live_registers()->ContainsRegister(reg)) { 1489 if (locs->live_registers()->ContainsRegister(reg)) {
1490 __ Push(reg); 1490 __ Push(reg);
1491 } 1491 }
1492 } 1492 }
1493 } 1493 }
1494 1494
1495 1495
1496 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { 1496 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
1497 #if defined(DEBUG)
1498 ClobberDeadTempRegisters(locs);
1499 #endif
1500
1501 // General purpose registers have the highest register number at the 1497 // General purpose registers have the highest register number at the
1502 // lowest address. 1498 // lowest address.
1503 for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) { 1499 for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
1504 Register reg = static_cast<Register>(reg_idx); 1500 Register reg = static_cast<Register>(reg_idx);
1505 if (locs->live_registers()->ContainsRegister(reg)) { 1501 if (locs->live_registers()->ContainsRegister(reg)) {
1506 __ Pop(reg); 1502 __ Pop(reg);
1507 } 1503 }
1508 } 1504 }
1509 1505
1510 const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount(); 1506 const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 DRegister dreg = EvenDRegisterOf(reg); 1885 DRegister dreg = EvenDRegisterOf(reg);
1890 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1886 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1891 } 1887 }
1892 1888
1893 1889
1894 #undef __ 1890 #undef __
1895 1891
1896 } // namespace dart 1892 } // namespace dart
1897 1893
1898 #endif // defined TARGET_ARCH_ARM 1894 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698