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

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

Issue 15899010: Implement a few more features on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months 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/assembler_arm_test.cc ('k') | runtime/vm/intermediate_language_arm.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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1409
1410 1410
1411 void FlowGraphCompiler::EmitSuperEqualityCallPrologue(Register result, 1411 void FlowGraphCompiler::EmitSuperEqualityCallPrologue(Register result,
1412 Label* skip_call) { 1412 Label* skip_call) {
1413 UNIMPLEMENTED(); 1413 UNIMPLEMENTED();
1414 } 1414 }
1415 1415
1416 1416
1417 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { 1417 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
1418 // TODO(vegorov): consider saving only caller save (volatile) registers. 1418 // TODO(vegorov): consider saving only caller save (volatile) registers.
1419 const intptr_t fpu_registers = locs->live_registers()->fpu_registers(); 1419 const intptr_t fpu_regs_count = locs->live_registers()->fpu_regs_count();
1420 if (fpu_registers > 0) { 1420 if (fpu_regs_count > 0) {
1421 UNIMPLEMENTED(); 1421 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize));
1422 // Store fpu registers with the lowest register number at the lowest
1423 // address.
1424 intptr_t offset = 0;
1425 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
1426 DRegister fpu_reg = static_cast<DRegister>(reg_idx);
1427 if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
1428 __ vstrd(fpu_reg, Address(SP, offset));
1429 offset += kFpuRegisterSize;
1430 }
1431 }
1432 ASSERT(offset == (fpu_regs_count * kFpuRegisterSize));
1422 } 1433 }
1423 1434
1424 // Store general purpose registers with the lowest register number at the 1435 // Store general purpose registers with the lowest register number at the
1425 // lowest address. 1436 // lowest address.
1426 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); 1437 const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
1427 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); 1438 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
1428 if (cpu_registers != 0) { 1439 if (cpu_registers != 0) {
1429 __ PushList(cpu_registers); 1440 __ PushList(cpu_registers);
1430 } 1441 }
1431 } 1442 }
1432 1443
1433 1444
1434 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { 1445 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
1435 // General purpose registers have the lowest register number at the 1446 // General purpose registers have the lowest register number at the
1436 // lowest address. 1447 // lowest address.
1437 const intptr_t cpu_registers = locs->live_registers()->cpu_registers(); 1448 const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
1438 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0); 1449 ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
1439 if (cpu_registers != 0) { 1450 if (cpu_registers != 0) {
1440 __ PopList(cpu_registers); 1451 __ PopList(cpu_registers);
1441 } 1452 }
1442 1453
1443 const intptr_t fpu_registers = locs->live_registers()->fpu_registers(); 1454 const intptr_t fpu_regs_count = locs->live_registers()->fpu_regs_count();
1444 if (fpu_registers > 0) { 1455 if (fpu_regs_count > 0) {
1445 UNIMPLEMENTED(); 1456 // Fpu registers have the lowest register number at the lowest address.
1457 intptr_t offset = 0;
1458 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
1459 DRegister fpu_reg = static_cast<DRegister>(reg_idx);
1460 if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
1461 __ vldrd(fpu_reg, Address(SP, offset));
1462 offset += kFpuRegisterSize;
1463 }
1464 }
1465 ASSERT(offset == (fpu_regs_count * kFpuRegisterSize));
1466 __ AddImmediate(SP, offset);
1446 } 1467 }
1447 } 1468 }
1448 1469
1449 1470
1450 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, 1471 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
1451 Register class_id_reg, 1472 Register class_id_reg,
1452 intptr_t argument_count, 1473 intptr_t argument_count,
1453 const Array& argument_names, 1474 const Array& argument_names,
1454 Label* deopt, 1475 Label* deopt,
1455 intptr_t deopt_id, 1476 intptr_t deopt_id,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1751 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1731 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); 1752 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex));
1732 } 1753 }
1733 1754
1734 1755
1735 #undef __ 1756 #undef __
1736 1757
1737 } // namespace dart 1758 } // namespace dart
1738 1759
1739 #endif // defined TARGET_ARCH_ARM 1760 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698